Graph neural network gas classification and identification method based on edge marking framework

By introducing edge marking mechanisms and spatial attention mechanisms into graph neural networks, explicitly simulating the relationship between samples, the shortcomings of traditional methods in dealing with few-sample learning and sensor drift correction are solved, and the accuracy and stability of gas classification are improved. sex.

CN119128721APending Publication Date: 2024-12-13GUANGXI UNIV

Patent Information

Application Number
CN202411219855.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Traditional graph neural networks are difficult to effectively handle the relationship between samples in gas classification, which leads to challenges in dealing with the problem of learning with few samples. Traditional methods are difficult to effectively correct sensor drift, affecting the stability and accuracy of the model.

Method used

Using the graph neural network method based on edge marking framework, iteratively updates the labels of edges to explicitly simulate the similarity and differences between samples, combining spatial attention mechanisms and residual connections, extract deep features and enhance the learning ability of the model. and stability.

Benefits of technology

It significantly improves the accuracy of gas classification and the stability of the model, can capture structural information between samples more accurately, enhances the ability to identify new gas categories, and improves the adaptability of sensor drift.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128721A_ABST
    Figure CN119128721A_ABST
Patent Text Reader

Abstract

The invention discloses a graph neural network gas classification and recognition method based on an edge marking framework. The method comprises the steps that 1, a gas sensor collects gas feature data; 2, a preprocessing module carries out preprocessing operation on the gas characteristic data; 3, inputting a query set sample and a support set sample into a feature extraction module by an input layer; 4, performing feature extraction operation on the query set sample and the support set sample by a feature extraction module; 5, a graph construction module constructs the query set feature vector and the support set feature vector into a fully connected graph, and initializes the fully connected graph; 6, a graph updating module performs iterative operation of node feature updating and edge feature updating on the initialized feature graph; and 7, classifying and identifying the clustering feature map by a classification and identification module, and outputting a gas classification result. The method has the advantages that by introducing an edge marking mechanism into the graph neural network, not only are the features and labels of the nodes considered, but also the labels are given to the edges, so that the similarity and the clustering relation between the samples are carefully captured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of gas identification technology, and in particular to a graph neural network gas classification and identification method based on an edge labeling framework. Background Art

[0002] Although the performance of chemical sensors is affected by the sensor properties, the gradual changes and unpredictability of their chemosensory signal responses when exposed to the same analyte under the same conditions, the so-called sensor drift, has long been considered a major challenge in the field of chemical sensing. This phenomenon can reduce the stability of electronic nose systems and make models used to distinguish gases or odors obsolete. The reasons may stem from a variety of effects, such as sensor aging due to long-term use, poisoning of sensitive materials due to contamination, and thermal effects of sensors during different operations. Although these drifts are usually classified into first-order and second-order components, it is difficult to distinguish them empirically and it is impossible to develop methods suitable for correcting different drift sources because the origins have not been determined. Therefore, regarding drift reduction, some researchers focus on high-performance sensor materials that can interact reversibly with gases, some minimize the irreversible effects of sensor poisoning through temperature regulation techniques, while other works believe that drift countermeasures should be implemented for first-order and second-order components from a long-term perspective. Nevertheless, the drift mechanism is quite complex and inevitable, so much so that it has plagued the sensor research community for many years and may continue to do so.

[0003] Traditional methods mainly address the drift compensation problem of electronic noses from two aspects:

[0004] (1) Signal preprocessing techniques to reduce the impact of drift by improving data quality, such as baseline processing methods: improving the signal by subtracting a reference baseline value from the sensor response, and frequency domain filtering methods: by focusing on a specific frequency domain, the noise components in the signal can be filtered out, especially those components that are not related to the target gas detection;

[0005] (2) Drift component correction method, which improves the stability and accuracy of the model by correcting the drift component in the data. It includes orthogonal signal correction (OSC): correcting drift by removing variable information irrelevant to the target variable from the data, principal component analysis (PCA): extracting main features through data dimensionality reduction to reveal the hidden and most important structure in the data, generalized least squares weighting (GLSW): optimizing the model fitting effect by assigning different weights to different data points, and direct standardization (DS): adjusting the model to adapt to possible drift by comparing the response of standardized samples with that of actual samples. These methods have been replaced in recent years due to their low sensitivity and accuracy.

[0006] Disadvantages of existing technologies: In traditional graph neural networks (GNNs), node features and labels are the main objects of model learning. However, this approach may encounter challenges when dealing with few-shot learning problems because it relies on node-level information without fully considering the relationship between samples. Summary of the invention

[0007] The present invention provides a graph neural network gas classification and recognition method based on an edge labeling framework, which effectively improves the accuracy of gas classification results.

[0008] To achieve the above object, the present invention provides a graph neural network gas classification and recognition method based on an edge labeling framework, the key of which is to include the following steps:

[0009] Step 1: The gas sensor array collects gas characteristic data a in real time and transmits the gas characteristic data a to a preprocessing module;

[0010] Step 2: The preprocessing module performs a preprocessing operation on the gas characteristic data a to obtain a query set sample b, and passes it to the graph neural network EGN Drift based on the edge labeling framework;

[0011] Step 3: The input layer of the graph neural network EGN Drift based on the edge labeling framework inputs the query set sample b and N types of support set samples into the feature extraction module, and each type of support set sample contains R gas samples;

[0012] Step 4: The feature extraction module performs feature extraction operations on the query set sample b and the N-type support set samples respectively to obtain the query set feature vector c and the N-type support set feature vector, and pass them to the graph construction module;

[0013] Step 5: The graph construction module constructs the query set feature vector c and the N-type support set feature vectors into a fully connected graph d, and initializes the node features and edge features in the fully connected graph d to obtain an initialized feature graph e and pass it to the graph update module;

[0014] Step 6: The graph updating module performs iterative operations of node feature updating and edge feature updating on the initialized feature graph e, and after N iterative operations, outputs the clustering feature graph f to the classification recognition module;

[0015] Step 7: The classification and recognition module classifies and recognizes the cluster feature graph f and outputs the gas classification result.

[0016] Through the above design, the similarities and differences between samples are explicitly simulated by iteratively updating the labels of the edges. Compared with the traditional GNN model, the EGNNDrift model does not rely on implicit cluster similarity simulation, but directly uses edge labels to guide the learning process. This explicit cluster evolution enables the model to more accurately capture the structural information between samples, thereby improving the recognition ability of new gas categories.

[0017] The preprocessing operation is to normalize and standardize the input data so that it meets the input requirements of the graph neural network based on the edge labeling framework.

[0018] Preferably, in step 4, the feature extraction module performs feature extraction operation on the query set sample b or the support set sample, and the steps are as follows:

[0019] Step A1: The spatial attention layer in the feature extraction module obtains the query set sample b or the support set sample, performs a spatial feature extraction operation on it, obtains spatial feature data s1, and passes it to the first batch of normalization layers;

[0020] Step A2: the first batch normalization layer performs a batch normalization operation on the spatial feature data s1 to obtain a first batch of normalized data s2, and passes it to the first residual block;

[0021] Step A3: the first residual block performs a residual convolution operation on the first batch of normalized data s2 to obtain first residual data s3, and passes it to the second batch of normalized layers;

[0022] Step A4: the second batch normalization layer performs a batch normalization operation on the first residual data s3 to obtain a second batch of normalized data s4, and passes it to the second residual block;

[0023] Step A5: The second residual block performs a residual convolution operation on the second batch of normalized data s4 to obtain a query set feature vector c or a support set feature vector, and passes it to the encoding unit.

[0024] The feature extraction module is used to extract abstract features of input data for use by the graph neural network EGN Drift based on the edge labeling framework, thereby improving the efficiency of gas classification.

[0025] The feature extraction module can not only extract the deep features of the samples, but also enhance the learning ability and stability of the model through the spatial attention mechanism SAM and residual connection.

[0026] Preferably, in step A1, the spatial attention layer performs a spatial feature extraction operation on the query set sample b or the support set sample, and the steps are as follows:

[0027] Step B1: Get a one-dimensional feature map: Assume that the input data X∈R of the spatial attention layer C×W , where C and W represent the number of channels and channel width of the input data respectively; by performing average pooling and maximum pooling on the input data X, the average pooling feature map and the maximum pooling feature map are obtained, and the expressions are as follows:

[0028] F avg ∈R 1×W

[0029] F max ∈R 1×W

[0030] Among them, F avg represents the average value of the average pooling feature map in the channel dimension, F max Represents the maximum value of the maximum pooling feature map in the channel dimension;

[0031] Step B2: Feature map concatenation: The average pooled feature map F avg And the maximum pooling feature map F max Splice in the channel dimension to get the spliced ​​feature map F concat ∈R 2×W ;

[0032] Step B3: Get the spatial attention map: for the concatenated feature map F concat Perform a one-dimensional convolution operation and obtain the spatial attention map M through the sigmoid activation function s ∈R 2×W , the expression is as follows:

[0033] M s =σ(Con(F concat ))

[0034] Among them, σ represents the Sigmoid function, Conv represents one-dimensional convolution, and the one-dimensional convolution operation expression is as follows:

[0035]

[0036] Among them, y t is the value of the output feature vector at position t, x i is the value of the input feature vector at position i, w i,t-i is the weight of the convolution kernel at position i, b t is the bias term.

[0037] Step B4: Attention weighting: The original input feature map X is combined with the spatial attention map M s Multiply them together to get the weighted output feature map X′:

[0038]

[0039] in, Represents an element-wise multiplication operation.

[0040] The spatial attention mechanism SAM in the spatial attention layer is used to improve the recognition and response capabilities of the graph neural network EGN Drift based on the edge labeling framework to key spatial region features in the input data, so that EGN Drift can dynamically focus on processing the most critical part of the data for the current task, thereby significantly improving processing efficiency and accuracy. Through the spatial attention mechanism, EGN Drift can not only better capture the essential characteristics of the data, but also optimize at the feature representation level, thereby enhancing the performance of subsequent tasks such as classification, detection or segmentation.

[0041] The spatial attention mechanism SAM has several significant advantages: First, it improves the model's focus, allowing the model to concentrate resources on processing the most critical features in the data, thereby reducing the computational waste on unimportant areas. Second, SAM enhances feature expression, and by highlighting important spatial features, it helps to generate richer and more discriminative feature representations, which is crucial for improving the performance of the model on complex tasks. In addition, SAM is highly adaptable, enabling the model to adaptively adjust its focus and effectively process data under different categories or conditions. SAM also has the convenience of end-to-end learning and can be easily integrated into existing deep learning frameworks. Its generalization ability is also enhanced because the model can focus on key information in the data, thereby performing well on unseen data. In terms of computational efficiency, SAM can increase the computational speed of the model in some cases by reducing the processing of unimportant areas. Finally, the concept of SAM is intuitive, the implementation is simple, and it can be easily implemented and applied through existing deep learning libraries. These advantages make SAM a powerful tool for deep learning models to process complex spatial data.

[0042] The spatial attention mechanism SAM is introduced before the convolutional layer, which significantly improves the performance of the feature extraction module by enhancing the ability to focus on key information in the input feature space.

[0043] Preferably, the first residual block and the second residual block have the same structure, and are both provided with a weight layer and an identity layer connected in parallel, wherein the weight layer is composed of five one-dimensional convolutional layers connected end to end in sequence, and the identity layer is composed of one residual-connected one-dimensional convolutional layer;

[0044] Among them, the expression of the first residual block or the second residual block is as follows:

[0045] x n+1 =F(x n ,{w n,m})+Convn (x n ,{w' n,m})

[0046] Among them, x n is the input feature, in the first residual block x n is the first batch of normalized data s2, in the second residual block x n is the second batch of normalized data s4; x n+1 is the output feature, in the first residual block x n+1 is the first residual data s3, and in the second residual block x n is the query set feature vector c or the support set feature vector; n represents the sequence number of the residual layer; F(x n ,{w n,m}) is the residual function of the weight layer, which represents the input x n The result after the weight layer transformation; Conv n (x n ,{w′ n,m}) indicates input x n The result after the identity layer transformation; {w n,m} is the weight set of the nth residual block, w′ n,m is the identity layer parameter.

[0047] The convolutional layer in the residual block contains multiple convolution kernels W, each of which is responsible for extracting a specific type of local features of the input data.

[0048] In each residual block, the stacking of one-dimensional convolutional layers allows the model to learn local features of different scales. The first convolutional layer is responsible for capturing the most basic local features, while subsequent convolutional layers are able to capture more complex patterns. This stacking method not only increases the learning ability of the model, but also maintains the stability of the network through residual connections.

[0049] Preferably, in step 5, each node in the fully connected graph d represents a feature vector, and each edge represents the type of relationship between two nodes; the node feature initialization expression is as follows:

[0050]

[0051] in, represents the i-th initial node feature, E(x i ) represents the i-th input sample x i Extracted feature vectors;

[0052] The edge feature initialization expression is as follows:

[0053]

[0054]

[0055] Among them, y i represents the i-th node label, y j represents the jth node label, y ij represents the edge feature label between nodes i and j, represents the initial edge feature between nodes i and j, each edge feature is a two-dimensional vector, when d=1, e ij1 Indicates the strength of the inter-class relationship between two connected nodes. When d = 2, e ij2 Indicates the strength of the intra-class relationship between two connected nodes; || is the aggregation of intra-class and inter-class relationships; label indicates the label, and NULL indicates invalid.

[0056] Only the labels of the edges between labeled samples in the support set can be directly initialized to [1||0] or [0||1]. The labels of the edges related to the unlabeled samples in the support set or the samples in the query set are set to [0.5||0.5], indicating that the relationship between the vertices connected by the edge is unknown.

[0057] Preferably, in step 6, the graph update module is provided with L layers of graph neural networks, each layer of the graph neural network is provided with a node feature update unit, a similarity calculation unit and an edge feature update unit, and each layer of the graph neural network performs an iterative operation of node feature update and edge feature update once;

[0058] The graph updating module performs iterative operations of updating node features and edge features on the initialized feature graph e, and the steps are as follows:

[0059] Step C1: the node feature updating unit in the graph updating module performs a node feature updating operation on the initialization feature graph e to obtain a node update feature graph, and passes it to the similarity calculation unit and the edge feature updating unit;

[0060] Step C2: the similarity calculation unit calculates the similarity between every two nodes in the node update feature graph through the metric network, and transmits the calculated similarity to the edge feature update unit;

[0061] Step C3: the edge feature updating unit performs an edge feature updating operation on the node update feature graph according to the similarity, obtains an edge update feature graph and passes it to the next layer of graph feature network for iterative operation;

[0062] Step C4: When the number of iterations is equal to L, the edge feature update unit in the L-th layer graph neural network outputs the cluster feature map f to the classification recognition module.

[0063] Through the above design, the graph structure information of the data is utilized to explicitly perform clustering by iteratively updating node and edge features, thereby improving the performance of small sample learning tasks.

[0064] As a preferred method: the node feature update expression is as follows:

[0065]

[0066]

[0067] in, represents the normalized edge feature, represents the sum of all edges connected to node i, and k represents the index of all other nodes directly connected to node i; represents the node change network, represents the network parameters of node changes, l represents the lth layer of graph neural network, 1≤l≤L;

[0068] In each layer of graph neural network, node features Updated by aggregating the features of neighboring nodes. This process takes into account the edge features. As weights, similar to the attention mechanism.

[0069] The similarity calculation expression between every two nodes is as follows:

[0070]

[0071]

[0072] in, represents the similarity of the intra-class relationship between nodes i and j, represents the similarity of the inter-class relationship between nodes i and j, represents the metric network, represents the parameters of the metric network;

[0073] The edge feature update expression is as follows:

[0074]

[0075] in, The edge feature vector between nodes i and j; represents the unnormalized edge feature vector calculated based on the node feature update; express The L1 norm of , which is the sum of the absolute values ​​of all elements in the vector.

[0076] Preferably, in step 7, the classification identification module extracts the similarity data between the query set sample nodes and each support set sample node in the cluster feature graph f, and calculates the average similarity between the query set samples and each type of support set samples, and then takes the gas category corresponding to the support set sample with the largest average similarity as the gas classification result.

[0077] Each gas category corresponds to multiple support set samples. The similarity data between the support set samples of the same gas category and the query set samples are not the same. Therefore, the average similarity between the query set samples and each type of support set samples is calculated, and then the gas category corresponding to the support set sample with the largest average similarity value is taken as the gas classification result of the query set samples.

[0078] Through the above design, the accuracy of gas classification results is effectively improved.

[0079] Preferably, the gas categories include but are not limited to ammonia, acetaldehyde, acetone, ethylene, ethanol and toluene.

[0080] The beneficial effects of the present invention are as follows: by introducing an edge labeling mechanism into a graph neural network, not only the features and labels of the nodes are considered, but also labels are assigned to the edges, thereby more finely capturing the similarity and clustering relationship between samples. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] Figure 1 It is a schematic diagram of the process of the present invention;

[0082] Figure 2 It is a schematic diagram of the structure of the present invention in Example 1;

[0083] Figure 3 This is a schematic diagram of the structure of the image update module in Example 1;

[0084] Figure 4 Schematic diagram of the calculation steps of the spatial attention mechanism in Example 1;

[0085] Figure 5 A schematic diagram of a process of gas classification and recognition using the graph neural network EGN Drift based on the edge labeling framework in Example 1;

[0086] Figure 6 This is a schematic diagram of the structure of the feature extraction module in Example 1;

[0087] Figure 7 This is a test result diagram of Experimental Setting 1 in Example 2;

[0088] Figure 8 This is a test result diagram of Experimental Setting 2 in Example 2. DETAILED DESCRIPTION

[0089] The present invention is further described in detail below in conjunction with the accompanying drawings and specific examples. The following examples or drawings are used to illustrate the present invention, but are not used to limit the scope of the present invention.

[0090] Embodiment 1:

[0091] like Figure 1 , Figure 2 As shown: A gas classification and recognition method based on a graph neural network with an edge labeling framework comprises the following steps:

[0092] Step 1: The gas sensor array collects gas characteristic data a in real time and transmits the gas characteristic data a to a preprocessing module;

[0093] Step 2: The preprocessing module performs a preprocessing operation on the gas characteristic data a to obtain a query set sample b, and passes it to the graph neural network EGN Drift based on the edge labeling framework;

[0094] Step 3: The input layer of the graph neural network EGN Drift based on the edge labeling framework inputs the query set sample b and N types of support set samples into the feature extraction module, and each type of support set sample contains R gas samples;

[0095] Step 4: The feature extraction module performs feature extraction operations on the query set sample b and the N-type support set samples respectively to obtain the query set feature vector c and the N-type support set feature vector, and pass them to the graph construction module;

[0096] Step 5: The graph construction module constructs the query set feature vector c and the N-type support set feature vectors into a fully connected graph d, and initializes the node features and edge features in the fully connected graph d to obtain an initialized feature graph e and pass it to the graph update module;

[0097] Step 6: The graph updating module performs iterative operations of node feature updating and edge feature updating on the initialized feature graph e, and after N iterative operations, outputs the clustering feature graph f to the classification recognition module;

[0098] Step 7: The classification and recognition module classifies and recognizes the cluster feature graph f and outputs the gas classification result.

[0099] like Figure 6 As shown: the feature extraction module performs feature extraction operation on the query set sample b or the support set sample, the steps are as follows:

[0100] Step A1: The spatial attention layer in the feature extraction module obtains the query set sample b or the support set sample, performs a spatial feature extraction operation on it, obtains spatial feature data s1, and passes it to the first batch of normalization layers;

[0101] Step A2: the first batch normalization layer performs a batch normalization operation on the spatial feature data s1 to obtain a first batch of normalized data s2, and passes it to the first residual block;

[0102] Step A3: the first residual block performs a residual convolution operation on the first batch of normalized data s2 to obtain first residual data s3, and passes it to the second batch of normalized layers;

[0103] Step A4: the second batch normalization layer performs a batch normalization operation on the first residual data s3 to obtain a second batch of normalized data s4, and passes it to the second residual block;

[0104] Step A5: The second residual block performs a residual convolution operation on the second batch of normalized data s4 to obtain a query set feature vector c or a support set feature vector, and passes it to the encoding unit.

[0105] The first residual block and the second residual block have the same structure, and are both provided with a weight layer and an identity layer connected in parallel, wherein the weight layer is composed of five one-dimensional convolutional layers connected end to end in sequence, and the identity layer is composed of one one-dimensional convolutional layer connected by a residual;

[0106] Among them, the expression of the first residual block or the second residual block is as follows:

[0107] x n+1 =F(x n ,{w n,m})+Conv n (x n ,{w′ n,m})

[0108] Among them, x n is the input feature, x n+1 is the output feature, n represents the serial number of the residual layer; F(x n ,{w n,m}) is the residual function of the weight layer, which represents the input x n The result after the weight layer transformation; Conv n (x n ,{w′ n,m}) indicates input x n The result after the identity layer transformation; {w n,m} is the weight set of the nth residual block, w′ n,m is the identity layer parameter.

[0109] like Figure 4 As shown: In step A1, the spatial attention layer performs a spatial feature extraction operation on the query set sample b or the support set sample, and the steps are as follows:

[0110] Step B1: Get a one-dimensional feature map: Assume that the input data X∈R of the spatial attention layer C×W , where C and W represent the number of channels and channel width of the input data respectively; by performing average pooling and maximum pooling on the input data X, the average pooling feature map and the maximum pooling feature map are obtained, and the expressions are as follows:

[0111] F avg ∈R 1×W

[0112] F max ∈R 1×W

[0113] Among them, F avg represents the average value of the average pooling feature map in the channel dimension, F max Represents the maximum value of the maximum pooling feature map in the channel dimension;

[0114] Step B2: Feature map concatenation: concatenate the average pooled feature map F avg And the maximum pooling feature map F max Splice in the channel dimension to get the spliced ​​feature map F concat ∈R 2×W ;

[0115] Step B3: Get the spatial attention map: for the concatenated feature map F concat Perform a one-dimensional convolution operation and obtain the spatial attention map M through the sigmoid activation function s ∈R 2×W , the expression is as follows:

[0116] M s =σ(Conv(F concat ))

[0117] Among them, σ represents the Sigmoid function, Conv represents one-dimensional convolution, and the one-dimensional convolution operation expression is as follows:

[0118]

[0119] Among them, y t is the value of the output eigenvector at position t, x i is the value of the input feature vector at position i, w i,t-i is the weight of the convolution kernel at position i, b t is the bias term;

[0120] Step B4: Attention weighting: The original input feature map X is combined with the spatial attention map M s Multiply them together to get the weighted output feature map X′:

[0121]

[0122] in, Represents an element-wise multiplication operation.

[0123] like Figure 5 As shown: Each node in the fully connected graph d represents a feature vector, and each edge represents the type of relationship between two nodes; the node feature initialization expression is as follows:

[0124]

[0125] in, represents the i-th initial node feature, E(x i ) represents the i-th input sample x i Extracted feature vectors;

[0126] The edge feature initialization expression is as follows:

[0127]

[0128]

[0129] Among them, y i represents the i-th node label, y j represents the jth node label, y ij represents the edge feature label between nodes i and j, represents the initial edge feature between nodes i and j, each edge feature is a two-dimensional vector, when d=1, e ij1 Indicates the strength of the inter-class relationship between two connected nodes. When d = 2, e ij2 Indicates the strength of the intra-class relationship between two connected nodes; || is the aggregation of intra-class and inter-class relationships; label indicates the label, and NULL indicates invalid.

[0130] like Figure 3 As shown: the graph update module is provided with L layers of graph neural networks, each layer of the graph neural network is provided with a node feature update unit, a similarity calculation unit and an edge feature update unit, and each layer of the graph neural network performs an iterative operation of node feature update and edge feature update;

[0131] The graph updating module performs iterative operations of updating node features and edge features on the initialized feature graph e, and the steps are as follows:

[0132] Step C1: the node feature updating unit in the graph updating module performs a node feature updating operation on the initialization feature graph e to obtain a node update feature graph, and passes it to the similarity calculation unit and the edge feature updating unit;

[0133] Step C2: the similarity calculation unit calculates the similarity between every two nodes in the node update feature graph through the metric network, and transmits the calculated similarity to the edge feature update unit;

[0134] Step C3: the edge feature updating unit performs an edge feature updating operation on the node update feature graph according to the similarity, obtains an edge update feature graph and passes it to the next layer of graph feature network for iterative operation;

[0135] Step C4: When the number of iterations is equal to L, the edge feature update unit in the L-th layer graph neural network outputs the cluster feature map f to the classification recognition module.

[0136] The node feature update expression is as follows:

[0137]

[0138]

[0139] in, represents the normalized edge feature, represents the sum of all edges connected to node i, and k represents the index of all other nodes directly connected to node i; represents the node change network, represents the network parameters of node changes, l represents the lth layer of graph neural network, 1≤l≤L;

[0140] The similarity calculation expression between every two nodes is as follows:

[0141]

[0142]

[0143] in, represents the similarity of the intra-class relationship between nodes i and j, represents the similarity of the inter-class relationship between nodes i and j, represents the metric network, represents the parameters of the metric network;

[0144] The edge feature update expression is as follows:

[0145]

[0146] in, The edge feature vector between nodes i and j; represents the unnormalized edge feature vector calculated based on the node feature update; express The L1 norm of , which is the sum of the absolute values ​​of all elements in the vector.

[0147] The classification recognition module extracts the similarity data between the query set sample nodes and each support set sample node in the cluster feature graph f, and calculates the average similarity between the query set sample and each type of support set sample, and then takes the gas category corresponding to the support set sample with the largest average similarity as the gas classification result.

[0148] The gas classes include ammonia, acetaldehyde, acetone, ethylene, ethanol, and toluene.

[0149] Next, the effectiveness of the advanced features and learning mechanism of EGN Drift, a graph neural network based on the edge labeling framework, is explained.

[0150] 1. Explanation of the effectiveness of the conduction learning mechanism

[0151] In the context of graph neural networks, conductive learning usually refers to considering the relationships between nodes in a graph to improve the performance of classifying nodes. In EGN Drift, conductive learning is implemented by iteratively updating edge labels in the graph, which directly exploit the similarities within categories and the differences between categories. In other words, conductive learning enhances the model's understanding of the global structure of the data by exploiting the relationships between all test samples in the graph, thereby improving the performance of classification tasks.

[0152] Conductive learning affects the capabilities of the EGNNDrift model, which can be roughly attributed to the following points:

[0153] (1) Explicit cluster evolution: EGN Drift explicitly evolves clusters by iteratively updating edge labels. This approach enables the model to more directly exploit the relationships between data points, thereby improving the accuracy of query sample classification.

[0154] (2) Relationship Utilization: In a transductive learning network, the model not only learns the features of each node, but also the relationships between nodes. This relationship information helps the model better understand and distinguish different categories.

[0155] (3) Global information integration: Transductive learning methods allow the model to consider the information of the entire graph when reasoning, rather than considering each node independently. This global perspective can improve the model’s understanding of the entire data structure.

[0156] (4) Flexibility and generalization: The transductive learning approach enables EGNNDrift to adapt to different numbers of categories without retraining the model. This flexibility enables the model to better generalize to different task settings.

[0157] (5) Robustness: By considering the relationships between all query samples during inference, the transductive learning method can improve the model’s robustness to noise and outliers.

[0158] (II) Explanation of Model Effectiveness in Semi-Supervised Learning

[0159] In semi-supervised learning scenarios, EGNNDrift is able to effectively utilize unlabeled support samples to enhance the learning process. This is because EGNNDrift explicitly adjusts the node and edge features in the graph by iteratively updating edge labels, allowing the model to learn the similarities and differences between categories from limited labeled data. Even when only some samples in the support set are labeled, EGNNDrift is able to capture the potential information of unlabeled samples through its graph neural network structure, and gradually extract useful signals for unlabeled samples through alternating node and edge feature update processes. In addition, this iterative update mechanism of EGNNDrift allows the model to gradually improve its inference of categories in each round of iteration, thereby improving the performance of semi-supervised learning tasks.

[0160] 3. Explanation of the effectiveness of the model in the category asymmetry problem

[0161] The EGNNDrift model is able to effectively judge the categories of samples of new categories, mainly due to the rich relational structure and data representation learned during the training process. By iteratively updating node and edge features on the graph, EGNNDrift is able to capture subtle differences between different categories and encode these differences into edge labels. When faced with samples of new categories, EGNNDrift can use these learned relationships and representations to infer the relationship between new samples and known categories.

[0162] In addition, EGNNDrift's model architecture allows it to be independent of the number of pre-specified categories, which means it can flexibly adapt to different numbers of categories, including new categories not seen during the training phase. In this way, EGNNDrift is able to make accurate category judgments on samples of new categories without retraining the model.

[0163] Embodiment 2:

[0164] Based on Example 1, Example 2 uses the "Gas Sensor Array Drift Dataset" in the UCI Machine Learning Library to verify the graph neural network gas classification and recognition method based on the node labeling framework. The data set includes 13,910 measurement data collected over a period of 36 months, using an advanced electronic nose system equipped with 16 sturdy metal oxide semiconductor gas sensors. These sensors are divided into four mini sensor arrays, each array containing four different models of sensors manufactured by Figaro, the four models are TGS2600, TGS2602, TGS2610 and TGS2620. The main goal is to detect and classify six volatile organic compounds: ammonia NH3, acetaldehyde C2H4O, acetone C3H6O, ethylene C2H4, ethanol C2H5OH and toluene C7H8. All data are divided into 10 batches according to the collection order. The collection cycle and number of measurements of each batch of data in the data set are shown in Table 1:

[0165] Table 1 Collection cycle and measurement times of each batch of data

[0166]

[0167]

[0168] In order to construct multiple classification tasks, Example 2 adopts two experimental configurations to verify the algorithm performance of EGNNDrift:

[0169] Experimental setting 1: The first batch is used as the source domain dataset for training, and the subsequent batches are used as the target domain dataset for performance evaluation, thus forming a series of 9 independent classification tasks. This setting is mainly to study the performance of the model under short-term drift and long-term drift.

[0170] Experimental setting 2: A sequential training strategy is adopted. For each batch T numbered from 2 to 10, the previous batch, batch T-1, is used as the source domain dataset for training, and the next batch, batch T, is used as the target domain dataset for testing. This setting also generates 9 corresponding classification tasks. This setting is mainly used to study the performance of the model under short-term drift.

[0171] Using these two experimental settings, we can more comprehensively test the model’s long-term drift, i.e., the time interval between the source domain and the target domain is long, and short-term drift, i.e., the time interval between the source domain and the target domain is short.

[0172] The matrix shape of the input feature extraction module E is [16,8]. The feature extraction module converts this matrix into a matrix of shape [64,2], and then flattens it into a vector of shape

[128] . This vector contains the deep features extracted by the feature extraction module, providing rich information for subsequent graph neural network processing.

[0173] EGNNDrift uses binary cross entropy loss BCELoss as the loss function, and its calculation formula is as follows:

[0174]

[0175] Where N is the total number of samples. i is the true label of the i-th sample, 0 or 1; p i is the probability that the model predicts that the i-th sample is category 1, and log is the natural logarithm.

[0176] EGNNDrift uses Adam as the optimizer, which is a gradient descent optimization algorithm used in deep learning. It combines the advantages of momentum and RMSprop. When the parameter θ is given, the gradient of t is g t , then the Adam optimizer update rule is as follows:

[0177] (1) Calculate the first-order moment momentum estimate:

[0178] m t =β1m t-1 +(1-β1)g t

[0179] Among them, m t is the first-order moment at the tth moment; β1 is the decay rate of the first-order moment, which is usually set to 0.9.

[0180] (2) Calculate the estimate of the variance of the second-order moment gradient:

[0181]

[0182] Among them, v t is the second-order moment at the tth moment; β2 is the decay rate of the second-order moment, which is usually set to 0.999.

[0183] (3) Calculate the adjusted values ​​of the first-order moment and the second-order moment:

[0184]

[0185]

[0186] (4) Update parameters:

[0187]

[0188] Among them, θ t+1 is the parameter for the next moment, α is the learning rate; ε is a small constant used to prevent the denominator from being zero, usually set to 1e-8.

[0189] The Adam optimizer aims to adaptively adjust the learning rate of each parameter to improve training efficiency and model performance. The graph neural network model proposed later also uses this optimizer for parameter updates.

[0190] Some important parameters of graph neural network are shown in Table 1.

[0191] This model uses accuracy as the evaluation indicator, which is the most common evaluation indicator in classification tasks and indicates the proportion of samples correctly predicted by the model.

[0192] N-way K-shot is a learning paradigm commonly used in small sample learning to divide the data set for training or testing tasks, where N is the number of categories of the task and K is the number of samples in each category. When verifying the performance of supervised learning and semi-supervised learning, this model uses this strategy to divide the source domain data set and the target domain data set to train the model.

[0193] Table 1

[0194]

[0195]

[0196] Next, seven control models were used to conduct comparative experiments with GNNDrift, EGNNDrift, and CEGNNDrift. These seven models are support vector machine model SVM, principal component analysis model PCA, multi-constrained subspace projection MCSP, linear discriminant analysis model LDA, domain regularized component analysis model DRCA, domain-based subspace learning model DMDMR that considers maximizing label feature dependency and minimizing feature redundancy, and discriminant domain regularized component analysis model DDRCA; EGNNDrift represents a graph neural network based on an edge labeling framework, and CEGNNDrift represents a graph neural network based on contrastive learning and edge labeling frameworks.

[0197] The K values ​​of the three models, GNNDrift, EGNNDrift, and CEGNNDrift, are all set to 1. Both EGNNDrift and CEGNNDrift use the conduction learning mechanism, and EGNNDrift does not use unlabeled samples to assist training.

[0198] For Experimental Setting 1 and Experimental Setting 2, 10 networks are tested respectively to show the superiority of EGNDDrift in long-distance drift and short-distance drift problems. At this time, the categories of the source domain and the target domain are the same, that is, the categories are symmetrical. The test results are plotted as a heat map. The test results of Experimental Setting 1 are as follows: Figure 7 As shown, the test results of experimental setting 2 are as follows Figure 8 As shown in the figure, "ab" means batch a is used as the source domain, batch b is used as the target domain, and Avg represents the average accuracy of the model on each task.

[0199] like Figure 7 , Figure 8 As shown: The following conclusions can be drawn:

[0200] (1) After evaluating the performance of short-term drift and long-term drift, it is found that all models show good performance when dealing with short-term drift, but the performance generally decreases in the case of long-term drift. In particular, the performance decreases more significantly in the experimental settings of 1-10 and 9-10. For experimental setting 1, the model with the highest average accuracy Avg is CEGNNDrift (K=1), which reaches 86.33%. This model shows the best performance in almost all experiments, followed by EGNNDrift (K=1), which reaches 80.54%. Next are DDRCA, MCSP and GNNDrift (K=1), which reach 73.89%, 70.55% and 68.03% respectively. SVM, PCA, LDA, DRCA and DMDMR perform poorly, with average accuracy between 40% and 70%. It can be seen that the three proposed models, especially CEGNNDrift, have high stability and accuracy in this set of experimental settings.

[0201] For the second set of experiments, the model with the highest average precision Avg is CEGNNDrift, which reaches 79.10. It is followed by GNNDrift, EGNNDrift and DDRCA, which reach 78.18%, 75.50% and 71.73% respectively. The performance of the remaining models is poor, with an average precision below 70%. It can be seen that the three proposed models have high stability and accuracy under this set of experimental settings, and CEGNNDrift still maintains the highest performance.

[0202] In general, the GNNDrift, EGNNDrift, and CEGNNDrift models performed well in these two experimental settings, showing high stability and accuracy, while the SVM, PCA, LDA, and DRCA models performed poorly, which may be due to the fact that these models are not suitable for this experimental setting or the parameters of these models are not set properly.

[0203] In addition, we can see that different experimental settings have different effects on the models. For example, under the experimental settings of 1-4, 1-5, 1-7, and 1-8, most models perform better, but under the experimental settings of 1-6, 1-9, and 1-10, most models perform worse. This may be due to the influence of the characteristics of these experimental settings on the models.

[0204] The reasons why the long-term drift performance of most models is worse than the short-term drift can be roughly summarized as follows:

[0205] ① The speed of data distribution change: Short-term drift usually means that the change in data distribution is relatively small, and the model can easily capture these changes and adapt. Long-term drift involves a longer time span, and the data distribution may change more significantly, which makes it more difficult for the model to adapt.

[0206] ② Model adaptability: In the short term, the model may have learned enough features to distinguish different categories, so even if there is drift, the model can still classify well. However, in the case of long-term drift, the features learned by the model may no longer be effective because they may no longer represent the current data distribution.

[0207] ③ Representativeness of training data: In short-term drift, the training data is usually closer to the distribution of the test data, so the model can generalize better to the test data. In contrast, in long-term drift, the training data may no longer be representative, resulting in a decrease in the generalization ability of the model.

[0208] ④Stability of environmental factors: In the short term, environmental factors may be relatively stable, and the model can make effective predictions by learning these stable factors. In the long term, environmental factors may change, such as temperature and humidity, which may affect the performance of the sensor and thus affect the prediction accuracy of the model.

[0209] ⑤ Degradation of sensor materials: Long-term drift may be accompanied by physical degradation of sensor materials, which may lead to nonlinear changes in sensor response that are difficult to capture in models.

[0210] In the overall analysis, the three proposed models all demonstrated excellent performance in facing different drift compensation tasks, which is mainly due to the unique advantages and targeted designs of their respective algorithms.

[0211] (2) In most experimental settings, the average accuracy of the EGNNDrift model is higher than that of other control models. In particular, in experimental settings 1-10, the average accuracy of EGNNDrift reaches 75.04%, which is significantly better than other models, such as SVM's 62.33% and LDA's 46.92%. Its success can be attributed to the following reasons:

[0212] ① Feature extraction module: The feature extraction module enables EGNNDrift to effectively adapt to sensor drift.

[0213] ②Explicit edge labeling mechanism: Compared with traditional graph neural networks (GNNs), the EGN Drift model introduces an explicit edge labeling mechanism, which enables the model to capture the similarity and clustering relationships between samples more finely. By assigning labels to edges, the model can more directly utilize the relationship information between samples, thereby achieving more accurate classification in category symmetry problems.

[0214] ③Conduction learning: The EGN Drift model uses a conduction learning mechanism that explicitly models the similarities and differences between samples by iteratively updating the edge labels in the graph. This mechanism allows the model to consider the information of the entire graph during reasoning, rather than considering each node independently, thereby improving the understanding of the global structure of the data.

[0215] ④ Graph structure learning: When constructing the graph structure, the EGN Drift model not only considers the characteristics of the nodes, but also the connection relationship between the nodes. This fully connected graph structure helps the model capture the similarities within the category and the differences between categories. Especially in the case of symmetric categories, this structure can more effectively reveal the intrinsic connection between samples.

[0216] ⑤ Feature update mechanism: The EGNNDrift model uses an iterative node and edge feature update mechanism. This mechanism allows the model to update node features based on aggregated neighbor node features in each layer, and update edge features based on newly calculated node pair similarities. This update process helps the model gradually extract signals that are useful for classification.

[0217] (1) Verify the impact of semi-supervised learning on the performance of the EGNNDrift model

[0218] When K=1, for experimental setting 1, the EGNNDrift model is analyzed when u (number of unlabeled samples) is 0, 10, 20 and 30. The experimental results are shown in Table 2.

[0219] As shown in Table 2, the performance of the EGNNDrift model in the semi-supervised learning setting is significantly improved as the number of unlabeled samples u increases. Specifically, when u = 10, 20, and 30, the accuracy of the model is significantly improved compared to u = 0, and the performance of the model increases as u increases. This is because as the number of unlabeled samples increases, the model can use more information to learn, thereby improving its prediction accuracy. As u increases, the accuracy improvement of the model on a specific task will gradually flatten out, which may be because the performance of the model is close to the optimal limit of the task.

[0220] Table 2 Improvement of model performance under semi-supervised learning

[0221]

[0222] (2) Verify the impact of K value on the efficiency of EGNNDrift model

[0223] In the context of small sample learning, the size of the K value directly affects the difficulty of the model learning task. When the K value is large, it means that there are more samples in each category for training, which usually helps the model to better learn the characteristics of each category, thereby improving the classification accuracy. On the contrary, when the K value is small, that is, only a few samples in each category can be used for training, the features learned by the model may not be enough to distinguish the categories, resulting in performance degradation.

[0224] Since the introduction of transfer learning mechanism may have the same effect as increasing the K value, as they both cause the model to process more samples at the same time, in the experiment to study the impact of K value on model performance, we chose not to use transfer learning mechanism to avoid the superposition of the two effects and interference with the experimental results.

[0225] The performance of EGNNDrift on experimental setting 1 is tested for the cases where K is 1, 2, 3, 4, and 5 respectively. The performance of EGNNDrift is shown in Table 3:

[0226] Table 3 Performance changes of EGNNDrift when K is different values

[0227]

[0228] For EGNNDrift, the efficiency of both models is at its lowest level when K=1. As K increases, the model efficiency increases, but the growth rate is more gradual as N increases. When K=1, that is, when only one sample per category is used for training, the efficiency of all models is at a low level. This finding is not surprising, because in small-sample learning, it is difficult for models to learn feature representations with strong generalization ability due to the lack of sufficient data to capture the diversity and complexity of the data. However, as the value of K increases, that is, the number of training samples increases, the efficiency of all models improves. This trend shows that more training data provides the model with richer information, enabling it to better understand and simulate the inherent laws of sensor drift. This improvement is particularly significant in the early stages, indicating that in small-sample learning, even a small increase in samples can significantly improve the performance of the model.

[0229] As the value of K increases further, especially when K is large, the improvement in model efficiency begins to slow down. This may mean that the model has approached the upper limit of its performance or is affected by overfitting to some extent. In addition, this may also indicate that there is an optimal number of training samples in small sample learning, and beyond this number, adding more samples has limited contribution to improving model performance.

[0230] (3) The impact of the conduction learning mechanism on EGN Drift

[0231] In order to deeply evaluate the role of the transduction mechanism in the EGNNDrift model and its specific impact on model performance, this embodiment designs a series of comparative experiments. In these experiments, the performance of the model with the transduction mechanism enabled and disabled was directly compared in terms of accuracy. In particular, a challenging situation with only one support sample in each category (i.e., K=1) was selected, and experimental setting 1 was used to perform these comparative experiments. Since semi-supervised learning and transduction learning mechanisms have similar effects, that is, both increase model performance through unlabeled samples, EGNNDrift is trained using supervised learning rather than semi-supervised learning.

[0232] Through this method, we aim to reveal whether the conduction learning mechanism can significantly improve the classification efficiency of the model in small sample learning tasks. The experimental results will effectively explain how the conduction learning mechanism affects the model's ability to capture the similarities and differences between samples under different training and testing conditions, as well as the specific contribution of this mechanism to the accuracy and robustness of the final classification decision.

[0233] In addition, these comparative experiments will also verify the adaptability and effectiveness of the EGNNDrift model for sensor drift compensation tasks under different configurations, thereby providing an experimental basis for model selection and optimization in practical applications.

[0234] The experimental results are shown in Table 4.

[0235] Table 4 Impact of the conduction learning mechanism on the performance of EGNNDrift

[0236]

[0237] As shown in Table 4, the introduction of the conduction learning mechanism significantly improves the classification efficiency of the EGNNDrift model. The experimental results clearly demonstrate the importance of conduction learning in small sample learning tasks, especially when there is only one support sample in each category. This mechanism enhances the model's understanding of the global structure of the data by considering the relationship between all test samples in the graph.

[0238] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A gas classification and recognition method based on graph neural network with edge labeling framework, It is characterized in that The following steps are involved: Step 1: The gas sensor array collects gas characteristic data a in real time and transmits the gas characteristic data a to a preprocessing module; Step 2: The preprocessing module performs a preprocessing operation on the gas characteristic data a to obtain a query set sample b, and passes it to the graph neural network EGN Drift based on the edge labeling framework; Step 3: The input layer of the graph neural network EGN Drift based on the edge labeling framework inputs the query set sample b and N types of support set samples into the feature extraction module, and each type of support set sample contains R gas samples; Step 4: The feature extraction module performs feature extraction operations on the query set sample b and the N-type support set samples respectively to obtain the query set feature vector c and the N-type support set feature vector, and pass them to the graph construction module; Step 5: The graph construction module constructs the query set feature vector c and the N-type support set feature vectors into a fully connected graph d, and initializes the node features and edge features in the fully connected graph d to obtain an initialized feature graph e and pass it to the graph update module; Step 6: The graph updating module performs iterative operations of node feature updating and edge feature updating on the initialized feature graph e, and after N iterative operations, outputs the clustering feature graph f to the classification recognition module; Step 7: The classification and recognition module classifies and recognizes the cluster feature graph f and outputs the gas classification result.

2. According to claim 1, the graph neural network gas classification and recognition method based on the edge labeling framework, Features: In step 4, the feature extraction module performs feature extraction operation on the query set sample b or the support set sample, and the steps are as follows: Step A1: The spatial attention layer in the feature extraction module obtains the query set sample b or the support set sample, performs a spatial feature extraction operation on it, obtains spatial feature data s1, and passes it to the first batch of normalization layers; Step A2: the first batch normalization layer performs a batch normalization operation on the spatial feature data s1 to obtain a first batch of normalized data s2, and passes it to the first residual block; Step A3: the first residual block performs a residual convolution operation on the first batch of normalized data s2 to obtain first residual data s3, and passes it to the second batch of normalized layers; Step A4: the second batch normalization layer performs a batch normalization operation on the first residual data s3 to obtain a second batch of normalized data s4, and passes it to the second residual block; Step A5: The second residual block performs a residual convolution operation on the second batch of normalized data s4 to obtain a query set feature vector c or a support set feature vector, and passes it to the encoding unit.

3. According to claim 2, the graph neural network gas classification and recognition method based on the edge labeling framework, Features: In step A1, the spatial attention layer performs a spatial feature extraction operation on the query set sample b or the support set sample, and the steps are as follows: Step B1: Get a one-dimensional feature map: Assume that the input data X∈R of the spatial attention layer C×W , where C and W represent the number of channels and channel width of the input data respectively; by performing average pooling and maximum pooling on the input data X, the average pooling feature map and the maximum pooling feature map are obtained, and the expressions are as follows: F avg ∈R 1×W F max ∈R 1×W Among them, F avg represents the average value of the average pooling feature map in the channel dimension, F max Represents the maximum value of the maximum pooling feature map in the channel dimension; Step B2: Feature map concatenation: The average pooled feature map F avg And the maximum pooling feature map F max Splice in the channel dimension to get the spliced ​​feature map F concat ∈R 2×W ; Step B3: Get the spatial attention map: for the concatenated feature map F concat Perform a one-dimensional convolution operation and obtain the spatial attention map M through the sigmoid activation function s ∈R 2×W , the expression is as follows: M s =σ(Conv(F concat )) Among them, σ represents the Sigmoid function, Conv represents one-dimensional convolution, and the one-dimensional convolution operation expression is as follows: Among them, y t is the value of the output feature vector at position t, x i is the value of the input feature vector at position i, w i,t-i is the weight of the convolution kernel at position i, b t is the bias term; Step B4: Attention weighting: The original input feature map X is combined with the spatial attention map M s Multiply them together to get the weighted output feature map X′: in, Represents an element-wise multiplication operation.

4. According to claim 2, the graph neural network gas classification and recognition method based on the edge labeling framework, Features: The first residual block and the second residual block have the same structure, and are both provided with a weight layer and an identity layer connected in parallel, wherein the weight layer is composed of five one-dimensional convolutional layers connected end to end in sequence, and the identity layer is composed of one one-dimensional convolutional layer connected by a residual; Among them, the expression of the first residual block or the second residual block is as follows: x n+1 =F(x n ,{w n,m })+Conv n (x n ,{w′ n,m }) Among them, x n is the input feature, x n+1 is the output feature, n represents the serial number of the residual layer; F(x n ,{w m,m }) is the residual function of the weight layer, which represents the input x n The result after the weight layer transformation; Conv n (x n ,{w′ n,m }) indicates input x n The result after the identity layer transformation; {w n,m } is the weight set of the nth residual block, w′ n,m is the identity layer parameter.

5. According to claim 1, the graph neural network gas classification and recognition method based on the edge labeling framework, Features: In step 5, each node in the fully connected graph d represents a feature vector, and each edge represents the type of relationship between two nodes; the node feature initialization expression is as follows: in, represents the i-th initial node feature, E(x i ) represents the i-th input sample x i Extracted feature vectors; The edge feature initialization expression is as follows: Among them, y i represents the i-th node label, y j represents the jth node label, y ij represents the edge feature label between nodes i and j, represents the initial edge feature between nodes i and j, each edge feature is a two-dimensional vector, when d=1, e ij1 Indicates the strength of the inter-class relationship between two connected nodes. When d = 2, e ij2 Indicates the strength of the intra-class relationship between two connected nodes; || is the aggregation of intra-class and inter-class relationships; label indicates the label, and NULL indicates invalid.

6. According to claim 1, the graph neural network gas classification and recognition method based on the edge labeling framework, Features: In step 6, the graph update module is provided with L layers of graph neural networks, each layer of the graph neural network is provided with a node feature update unit, a similarity calculation unit and an edge feature update unit, and each layer of the graph neural network performs an iterative operation of node feature update and edge feature update once; The graph updating module performs iterative operations of updating node features and edge features on the initialized feature graph e, and the steps are as follows: Step C1: the node feature updating unit in the graph updating module performs a node feature updating operation on the initialization feature graph e to obtain a node update feature graph, and passes it to the similarity calculation unit and the edge feature updating unit; Step C2: the similarity calculation unit calculates the similarity between every two nodes in the node update feature graph through the metric network, and transmits the calculated similarity to the edge feature update unit; Step C3: the edge feature updating unit performs an edge feature updating operation on the node update feature graph according to the similarity, obtains an edge update feature graph and passes it to the next layer of graph feature network for iterative operation; Step C4: When the number of iterations is equal to L, the edge feature update unit in the L-th layer graph neural network outputs the cluster feature map f to the classification recognition module.

7. According to claim 6, the method for gas classification and recognition using a graph neural network based on an edge labeling framework, Features: The node feature update expression is as follows: in, represents the normalized edge feature, represents the sum of all edges connected to node i, and k represents the index of all other nodes directly connected to node i; represents the node change network, represents the network parameters of node changes, l represents the lth layer of graph neural network, 1≤l≤L; The similarity calculation expression between every two nodes is as follows: in, represents the similarity of the intra-class relationship between nodes i and j, represents the similarity of the inter-class relationship between nodes i and j, represents the metric network, represents the parameters of the metric network; The edge feature update expression is as follows: in, The edge feature vector between nodes i and j; represents the unnormalized edge feature vector calculated based on the node feature update; express The L1 norm of , which is the sum of the absolute values ​​of all elements in the vector.

8. According to claim 1, the graph neural network gas classification and recognition method based on the edge labeling framework, Features: In step 7, the classification recognition module extracts the similarity data between the query set sample nodes and each support set sample node in the cluster feature graph f, and calculates the average similarity between the query set sample and each type of support set sample, and then takes the gas category corresponding to the support set sample with the largest average similarity as the gas classification result.

9. According to claim 8, the method for gas classification and recognition using a graph neural network based on an edge labeling framework, Features: Such gas classes include, but are not limited to, ammonia, acetaldehyde, acetone, ethylene, ethanol, and toluene.

Citation Information

Patent Citations

  • Small sample image classification method based on graph neural network

    CN113392876A

  • Small sample image classification method based on edge feature relation mapping graph neural network model

    CN113392896A

  • Gas type identification method based on time sequence-graph fusion neural network

    CN115618927A

  • Gas classification method of supervised drift sensor based on meta-learning

    CN117668550A

Cited By

  • Tea disease and pest classification system based on space-frequency mixed node graph neural network

    CN119832322A

  • Cervical cell identification method and system

    CN120164215A