Gas identification method, device, equipment, storage medium and program product
Data is collected through gas sensors and using pooling operation and dual encoder architecture classification characteristics, the problem of subjectivity and high misdiagnosis rate of traditional lung disease diagnosis methods is solved, and more accurate gas recognition and lung disease diagnosis is achieved.
Patent Information
- Application Number
- CN202410906088.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-07-08
Smart Images

Figure CN118918971A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a gas identification method, device, equipment, storage medium and program product. Background Art
[0002] Lung diseases, such as lung cancer, pneumonia, and COPD (Chronic Obstructive Pulmonary Disease), are the leading causes of death and disability worldwide. Early detection and accurate diagnosis are crucial to improving treatment outcomes and patient survival rates. Traditional diagnostic methods rely on manual film reading, which is highly subjective, inefficient, and has a high rate of misdiagnosis. Summary of the invention
[0003] Based on this, it is necessary to provide a gas identification method, device, equipment, storage medium and program product that can improve the accuracy of lung disease diagnosis in response to the above technical problems.
[0004] In a first aspect, the present application provides a gas identification method, the method comprising:
[0005] Acquire multiple groups of gas data collected from a target object by multiple gas sensors, determine the characteristics of each of the multiple groups of gas data, and obtain multiple gas characteristics;
[0006] classifying the plurality of gas signatures into significant signatures and minor signatures;
[0007] For each important feature, a pooling operation is performed on the important feature to obtain an important pooling feature of the important feature, and the important pooling feature is encoded by an important encoder to obtain an important encoding feature corresponding to the important feature;
[0008] For each secondary feature, a pooling operation is performed on the secondary feature to obtain a secondary pooling feature of the secondary feature, and the secondary pooling feature is encoded by a secondary encoder to obtain a secondary encoded feature corresponding to the secondary feature;
[0009] The gas category to which the exhaled gas of the target object belongs is identified according to the important coding features corresponding to each important feature and the secondary coding features corresponding to each secondary feature.
[0010] In a second aspect, the present application provides a gas identification device, the device comprising:
[0011] An acquisition module, used to acquire multiple groups of gas data collected by multiple gas sensors for a target object, determine the characteristics of each of the multiple groups of gas data, and obtain multiple gas characteristics;
[0012] A classification module, configured to classify the plurality of gas features into important features and minor features;
[0013] A feature processing module is used to perform a pooling operation on each important feature to obtain an important pooling feature of the important feature, encode the important pooling feature through an important encoder, and obtain an important coded feature corresponding to the important feature; for each secondary feature, perform a pooling operation on the secondary feature to obtain a secondary pooling feature of the secondary feature, encode the secondary pooling feature through a secondary encoder, and obtain a secondary coded feature corresponding to the secondary feature;
[0014] The identification module is used to identify the gas category to which the exhaled gas of the target object belongs according to the important coding features corresponding to each important feature and the secondary coding features corresponding to each secondary feature.
[0015] In a third aspect, the present application provides a computer device including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in the method embodiments of the present application are implemented.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the method embodiments of the present application.
[0017] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the steps in the method embodiments of the present application when the computer program is executed by a processor.
[0018] The above-mentioned gas identification method, device, equipment, storage medium and program product obtain multiple groups of gas data collected by multiple gas sensors for the target object, determine the characteristics of each group of gas data, and obtain multiple gas characteristics; classify the multiple gas characteristics into important characteristics and secondary characteristics; for each important characteristic, perform a pooling operation on the important characteristic to obtain the important pooling characteristic of the important characteristic, encode the important pooling characteristic through an important encoder to obtain the important coding characteristic corresponding to the important characteristic; for each secondary characteristic, perform a pooling operation on the secondary characteristic to obtain the secondary pooling characteristic of the secondary characteristic, encode the secondary pooling characteristic through a secondary encoder to obtain the secondary coding characteristic corresponding to the secondary characteristic; identify the gas category to which the exhaled gas of the target object belongs according to the important coding characteristics corresponding to each important characteristic and the secondary coding characteristics corresponding to each secondary characteristic. In this way, the present application classifies gas features into important features and secondary features, and combines pooling operations and dual encoder architecture to differentiate between important features and secondary features, which helps to pay more attention to and process important features in the gas identification process, thereby improving the accuracy of gas identification, thereby assisting the diagnosis process of lung diseases and improving the accuracy of lung disease diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A schematic diagram of a gas identification method according to an embodiment;
[0020] Figure 2 A schematic diagram of the structure of a gas identification model in one embodiment;
[0021] Figure 3 A schematic diagram of the structure of a pyramid pooling network in one embodiment;
[0022] Figure 4 is a structural block diagram of a gas identification device in one embodiment;
[0023] Figure 5 is an internal structure diagram of a computer device in one embodiment;
[0024] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0026] In one embodiment, Figure 1As shown, a gas identification method is provided, which can be applied to a computer device, which can be a terminal or a server, that is, the method can be executed by the terminal or the server alone, or can be implemented through interaction between the terminal and the server. This embodiment takes the method applied to a computer device as an example for explanation, and includes the following steps:
[0027] Step 102, acquiring multiple groups of gas data collected from a target object by multiple gas sensors, determining the characteristics of each of the multiple groups of gas data, and obtaining multiple gas characteristics.
[0028] Among them, the gas sensor is a sensor used to collect gas data of the gas exhaled by the object. For example, the gas data of the gas exhaled by the patient can be collected through the gas sensor.
[0029] Specifically, the gas sensor can collect gas data of the exhaled gas of the target object and send the collected gas data to the computer device. The computer device can obtain multiple sets of gas data collected from the target object by multiple gas sensors, and determine the characteristics of each of the multiple sets of gas data to obtain multiple gas characteristics.
[0030] In one embodiment, determining the characteristics of each of the multiple sets of gas data to obtain multiple gas characteristics includes: performing discrete wavelet transform on the multiple sets of gas data to determine the characteristics of each of the multiple sets of gas data to obtain multiple gas characteristics. Specifically, the gas data is a discrete signal of a time series, and the discrete wavelet transform process can be expressed by the following formula:
[0031] X j,k =∑ n x[n]·ψ j,k [n];
[0032] A j,k =∑ n x[n]·φ j,k [n];
[0033] Among them, X j,k Represents the detail coefficient, which is used to capture the high-frequency characteristics of the signal. j,k represents the approximation coefficient, which is used to capture the low-frequency characteristics of the signal. x[n] is the discrete signal of the time series, ψ j,k [n] is a discrete wavelet function at scale j and translation k, used to extract signal details. j,k[n] is a discrete scaling function at scale j and translation k, which is used to extract approximate information of the signal. j represents the number of decomposition layers or scales, which determines the frequency range of the analysis, and k represents the position of the wavelet function on the time axis. In this way, the discrete wavelet transform can analyze and understand the characteristics of the time series from multiple scales, thereby realizing feature selection, which can significantly reduce the number of features while retaining the key features of the original signal, thereby reducing the resource consumption of data processing.
[0034] For example, the computer device can perform the fourth-level wavelet-based decomposition on the signals of gas data collected by 8 gas sensors. The original gas data collected by each gas sensor contains 4,000 data points. Through discrete wavelet transform, the gas data of each gas sensor can be effectively compressed into 4 new feature points, which mainly represent low-frequency components, while high-frequency components are discarded.
[0035] In step 104, the plurality of gas features are classified into important features and minor features.
[0036] In one embodiment, the multiple gas features are classified into important features and secondary features, including: determining the importance score of each of the multiple gas features; for each gas feature, the importance score of the gas feature is positively correlated with the contribution of the gas feature to the gas identification result; according to the importance score of each of the multiple gas features, the multiple gas features are classified into important features and secondary features; the importance score of the important feature is greater than the importance score of the secondary feature. It can be understood that the contribution of the important feature to the gas identification result is greater than the contribution of the secondary feature to the gas identification result.
[0037] Step 106, for each important feature, a pooling operation is performed on the important feature to obtain an important pooling feature of the important feature, and the important pooling feature is encoded by an important encoder to obtain an important encoded feature corresponding to the important feature.
[0038] In one embodiment, for each important feature, the computer device may input the important feature into a pooling network to perform a pooling operation on the important feature through the pooling network to obtain the important pooling feature of the important feature. Furthermore, the computer device may input the important pooling feature of the important feature into an important encoder to encode the important pooling feature of the important feature through the important encoder to obtain the important encoded feature corresponding to the important feature.
[0039] Step 108, for each secondary feature, perform a pooling operation on the secondary feature to obtain a secondary pooling feature of the secondary feature, and encode the secondary pooling feature through a secondary encoder to obtain a secondary encoded feature corresponding to the secondary feature.
[0040] It can be understood that the important encoder is an encoder for processing important pooling features, and the secondary encoder is an encoder for processing secondary pooling features. The important encoder and the secondary encoder have different configurations. The important encoder has a higher dimension than the secondary encoder. The ability of the important encoder with a higher dimension to refine features is stronger than that of the secondary encoder with a lower dimension. It can be understood that in the gas recognition process, giving more attention and more detailed processing to the important features can improve the gas recognition accuracy while ensuring the recognition efficiency.
[0041] In one embodiment, for each secondary feature, the computer device may input the secondary feature into a pooling network to perform a pooling operation on the secondary feature through the pooling network to obtain a secondary pooling feature of the secondary feature. Furthermore, the computer device may input the secondary pooling feature of the secondary feature into a secondary encoder to encode the secondary pooling feature of the secondary feature through the secondary encoder to obtain a secondary encoded feature corresponding to the secondary feature.
[0042] Step 110 , identifying the gas category to which the exhaled gas of the target object belongs according to the important coding features corresponding to each important feature and the secondary coding features corresponding to each secondary feature.
[0043] The gas category is the category to which the identified gas belongs. For example, the gas category may include but is not limited to smokers, COPD (Chronic Obstructive Pulmonary Disease), healthy people, and air.
[0044] In one embodiment, the computer device may fuse the important coding features corresponding to each important feature and the secondary coding features corresponding to each secondary feature to obtain a fused feature, and identify the gas category to which the exhaled gas of the target object belongs based on the fused feature.
[0045] In one embodiment, the computer device may determine the fusion weight of the important coding features corresponding to each important feature, and determine the fusion weight of the secondary coding features corresponding to each secondary feature. Among them, the fusion weight of the important coding features is greater than the fusion weight of the secondary coding features. Furthermore, the computer device may fuse each important coding and each secondary coding feature based on the fusion weight of each important coding feature and the fusion weight of each secondary coding feature to obtain a fusion feature, and identify the gas category to which the exhaled gas of the target object belongs based on the fusion feature. In the process of gas identification, by giving the important coding features a higher fusion weight than the secondary coding features, so as to further give more attention to the important features, the accuracy of gas identification can be improved.
[0046] In the above-mentioned gas identification method, by acquiring multiple groups of gas data collected by multiple gas sensors for the target object, the characteristics of each of the multiple groups of gas data are determined to obtain multiple gas characteristics; the multiple gas characteristics are classified into important characteristics and secondary characteristics; for each important characteristic, the important characteristic is pooled to obtain the important pooled characteristics of the important characteristic, and the important pooled characteristics are encoded by the important encoder to obtain the important coding characteristics corresponding to the important characteristic; for each secondary characteristic, the secondary characteristic is pooled to obtain the secondary pooled characteristics of the secondary characteristic, and the secondary pooled characteristics are encoded by the secondary encoder to obtain the secondary coding characteristics corresponding to the secondary characteristic; according to the important coding characteristics corresponding to each important characteristic and the secondary coding characteristics corresponding to each secondary characteristic, the gas category to which the exhaled gas of the target object belongs is identified. In this way, the present application classifies gas features into important features and secondary features, and combines pooling operations and dual encoder architecture to differentiate between important features and secondary features, which helps to pay more attention to and process important features in the gas identification process, thereby improving the accuracy of gas identification, thereby assisting the diagnosis process of lung diseases and improving the accuracy of lung disease diagnosis.
[0047] In one embodiment, multiple gas features are classified into important features and secondary features, including: determining the absolute value of the SHAP value of each of the multiple gas features; for each gas feature, the absolute value of the SHAP value of the targeted gas feature is positively correlated with the contribution of the targeted gas feature to the gas identification result; based on the absolute value of the SHAP value of each of the multiple gas features, the multiple gas features are classified into important features and secondary features; the absolute value of the SHAP value of the important feature is greater than the absolute value of the SHAP value of the secondary feature.
[0048] Among them, SHAP (Shapley Additive Explanations) is a model interpretation technology. The SHAP analysis technology can be used to evaluate the contribution of gas characteristics to gas identification results.
[0049] Specifically, the computer device can calculate the absolute value of the SHAP value of each of the multiple gas features. Among them, for each gas feature, the absolute value of the SHAP value of the gas feature is positively correlated with the contribution of the gas feature to the gas identification result. It can be understood that the larger the absolute value of the SHAP value of a gas feature, the greater the contribution of the gas feature to the gas identification result. Conversely, the smaller the absolute value of the SHAP value of a gas feature, the smaller the contribution of the gas feature to the gas identification result. The computer device can classify the multiple gas features into important features and secondary features according to the absolute values of the SHAP values of the multiple gas features. Among them, the absolute value of the SHAP value of the important feature is greater than the absolute value of the SHAP value of the secondary feature.
[0050] In one embodiment, the number of gas sensors is 8, and the number of gas features is also 8. The computer device can calculate the absolute value of the SHAP value of each of the 8 gas features, and sort the 8 gas features in descending order of the absolute value of the SHAP value, and determine the first 4 gas features with larger absolute values of the SHAP value as important features, and determine the last 4 gas features with smaller absolute values of the SHAP value as secondary features.
[0051] In the above embodiment, the contribution of each gas feature to the gas identification result is evaluated by the SHAP analysis technology, so that each gas feature is divided into important features and secondary features, so that the subsequent gas identification process can give more attention and more detailed processing to the important features, thereby improving the accuracy of gas identification.
[0052] In one embodiment, determining the absolute value of the SHAP value for each of the plurality of gas characteristics includes:
[0053]
[0054] Where S represents a set consisting of all feature combinations of multiple gas features, f represents the recognition function, f(s) represents the recognition result when S exists, and f(s∪{i}) is the recognition result after gas feature i is added to S; represents the marginal contribution value of gas feature i in S; N represents a set of multiple gas features, |S| represents the size of S, and |N| represents the total number of features; φ i represents the SHAP value of gas feature i.
[0055] In the above embodiment, by providing a specific calculation method of the SHAP value, each gas feature can be more accurately divided into important features and secondary features, thereby improving the classification accuracy of the gas features, thereby further improving the accuracy of gas identification.
[0056] In one embodiment, for each important feature, a pooling operation is performed on the important feature to obtain an important pooling feature of the important feature, including: for each important feature, performing pooling operations at multiple scales on the important feature to obtain important scale features corresponding to each of the multiple scales; and performing feature fusion on the important scale features corresponding to each of the multiple scales to obtain the important pooling feature of the important feature.
[0057] In one embodiment, for each important feature, the computer device may input the important feature into a pyramid pooling network comprising multiple pooling layers, each of which corresponds to a different scale, so that the pyramid pooling network can perform pooling operations at multiple scales on the important feature to obtain important scale features corresponding to each of the multiple scales, and perform feature fusion on the important scale features corresponding to each of the multiple scales to obtain important pooling features of the important feature.
[0058] In the above embodiment, by performing pooling operations on important features at multiple scales, important scale features corresponding to each scale are obtained, important features are understood from different scales, and information of important features from local to global levels is captured. Furthermore, by performing feature fusion on the important scale features corresponding to each scale, important pooling features that fuse multi-scale information can be obtained, thereby improving the expression ability of important features.
[0059] In one embodiment, for each secondary feature, a pooling operation is performed on the secondary feature to obtain a secondary pooling feature of the secondary feature, including: for each secondary feature, performing pooling operations at multiple scales on the secondary feature to obtain secondary scale features corresponding to the multiple scales; and performing feature fusion on the secondary scale features corresponding to the multiple scales to obtain the secondary pooling feature of the secondary feature.
[0060] In one embodiment, for each secondary feature, the computer device may input the secondary feature into a pyramid pooling network comprising multiple pooling layers, wherein the multiple pooling layers each correspond to a different scale, so as to perform pooling operations at multiple scales on the secondary feature through the pyramid pooling network to obtain secondary scale features corresponding to each of the multiple scales, and perform feature fusion on the secondary scale features corresponding to each of the multiple scales to obtain secondary pooling features of the secondary feature.
[0061] In the above embodiment, secondary features are pooled at multiple scales to obtain secondary scale features corresponding to the multiple scales, understand the secondary features at different scales, and capture information of the secondary features from local to global levels. Then, the secondary scale features corresponding to the multiple scales are fused to obtain secondary pooled features that fuse multi-scale information, thereby improving the expression ability of the secondary features.
[0062] In one embodiment, the gas category to which the exhaled gas of the target object belongs is identified by a trained gas recognition model; the gas recognition model includes a feature classification network, a pyramid pooling network and a dual encoder network; the dual encoder network includes an important encoder and a secondary encoder; the important features and the secondary features are classified by the feature classification network; the important pooling features are processed by the important encoder in the pyramid pooling network; the secondary pooling features are processed by the secondary encoder in the pyramid pooling network.
[0063] In one embodiment, the gas recognition model includes a feature extraction network, a feature classification network, a pyramid pooling network, a dual encoder network and a recognition network. Among them, the dual encoder network includes an important encoder and a secondary encoder. Specifically, the computer device can obtain multiple groups of gas data collected by multiple gas sensors for the target object, and input the multiple groups of gas data into the feature extraction network to determine the characteristics of each of the multiple groups of gas data through the feature extraction network to obtain multiple gas features. The computer device can input multiple gas features into the feature classification network to classify the multiple gas features into important features and secondary features through the feature classification network. For each important feature, the computer device can input the important feature to the pyramid pooling network to perform a pooling operation on the important feature through the pyramid pooling network to obtain the important pooling feature of the important feature, and input the important pooling feature of the important feature to the important encoder to encode the input important pooling feature through the important encoder to obtain the important encoding feature corresponding to the important feature. For each secondary feature, the computer device may input the secondary feature to a pyramid pooling network to perform a pooling operation on the secondary feature through the pyramid pooling network to obtain a secondary pooling feature of the secondary feature, and input the secondary pooling feature of the secondary feature to a secondary encoder to encode the input secondary pooling feature through the secondary encoder to obtain a secondary coding feature corresponding to the secondary feature. The computer device may identify the gas category to which the exhaled gas of the target object belongs according to the important coding features corresponding to each important feature and the secondary coding features corresponding to each secondary feature through the recognition network in the gas recognition model.
[0064] In the above embodiment, the gas category to which the exhaled gas of the target object belongs is identified by using the trained gas identification model, so that the accuracy of gas identification can be further improved.
[0065] In one embodiment, Figure 2 As shown, the gas recognition model to be trained includes a feature extraction network, a feature classification network, a pyramid pooling network, a dual encoder network and a recognition network. Among them, the dual encoder network includes an important encoder and a secondary encoder. Specifically, the computer device can obtain multiple groups of original gas data collected by multiple gas sensors for sample objects, and through a series of data enhancement techniques, the number of samples is expanded to several times the original gas data, and a large amount of sample gas data is obtained. The computer device can add white noise to the sample gas data through the sliding window technology to ensure the diversity of the sample data and avoid overfitting caused by some small samples during the training process. Then, the computer device can input the sample gas data into the feature extraction network to extract the characteristics of each sample gas data through the feature extraction network through discrete wavelet transform to obtain multiple sample gas features. The computer device can input multiple sample gas features into the feature classification network to classify multiple sample gas features into important features and secondary features based on the SHAP analysis technology through the feature classification network. For each important feature, the computer device may input the important feature into a pyramid pooling network including four pooling layers, so as to perform multi-scale pooling operations on the important feature through the pyramid pooling network to obtain the important pooling features of the important feature, and input the important pooling features of the important feature into the important encoder, so as to encode the input important pooling features through the important encoder to obtain the important encoded features corresponding to the important feature. For each secondary feature, the computer device may input the secondary feature into a pyramid pooling network including four pooling layers, so as to perform multi-scale pooling operations on the secondary feature through the pyramid pooling network to obtain the secondary pooling features of the secondary feature, and input the secondary pooling features of the secondary feature into the secondary encoder, so as to encode the input secondary pooling features through the secondary encoder to obtain the secondary encoded features corresponding to the secondary feature. The computer device can identify the gas category to which the exhaled gas of the sample object belongs through the recognition network in the gas recognition model according to the important coding features corresponding to each important feature and the secondary coding features corresponding to each secondary feature, so as to iteratively train the gas recognition model to be trained and obtain a trained gas recognition model.
[0066] In one embodiment, Figure 3As shown, the pyramid pooling network includes 4 pooling layers, a fusion layer, a convolution layer, a normalization layer and an activation function, and each pooling layer corresponds to a different scale. It can be understood that the input of each pooling layer is a feature map, and the size of the feature map required to be input by each pooling layer is different. Specifically, for each important feature, the computer device can input the important feature to the pyramid pooling network including 4 pooling layers, and the 4 pooling layers each correspond to a different scale, so that the important features targeted are respectively pooled at 4 scales through the pyramid pooling network to obtain the important scale features corresponding to each of the 4 scales, and the important scale features corresponding to each of the 4 scales are input to the fusion layer for feature splicing in the channel dimension, and the spliced features are converted into the original number of channels through the convolution layer, and then through the normalization layer and the activation function to enhance the nonlinear expression ability and generalization ability of the network, and finally output the important pooling features of the important features targeted. For each secondary feature, the computer device can input the targeted secondary feature into a pyramid pooling network including 4 pooling layers, and the 4 pooling layers respectively correspond to different scales, so as to perform pooling operations on the targeted secondary features at 4 scales through the pyramid pooling network to obtain secondary scale features corresponding to each of the 4 scales, and input the secondary scale features corresponding to each of the 4 scales into the fusion layer for feature splicing in the channel dimension, and convert the spliced features into the original number of channels through the convolution layer, and then pass through the normalization layer and the activation function to enhance the nonlinear expression ability and generalization ability of the network, and finally output the secondary pooling features of the targeted secondary features.
[0067] It should be understood that, although each step in the flow chart of the above-mentioned embodiments is shown in order, these steps are not necessarily performed in order. Unless there is a clear explanation in this article, the execution of these steps does not have strict order restrictions, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the above-mentioned embodiments may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in order, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0068] In one embodiment, Figure 4 As shown, a gas identification device 400 is provided, which specifically includes:
[0069] An acquisition module 402 is used to acquire multiple sets of gas data collected by multiple gas sensors for a target object, determine the characteristics of each of the multiple sets of gas data, and obtain multiple gas characteristics;
[0070] A classification module 404, for classifying the plurality of gas features into important features and minor features;
[0071] The feature processing module 406 is used to perform a pooling operation on each important feature to obtain an important pooling feature of the important feature, encode the important pooling feature through an important encoder, and obtain an important coded feature corresponding to the important feature; for each secondary feature, perform a pooling operation on the secondary feature to obtain a secondary pooling feature of the secondary feature, encode the secondary pooling feature through a secondary encoder, and obtain a secondary coded feature corresponding to the secondary feature;
[0072] The identification module 408 is used to identify the gas category to which the exhaled gas of the target object belongs according to the important coding features corresponding to each important feature and the secondary coding features corresponding to each secondary feature.
[0073] In one embodiment, the classification module 404 is also used to determine the absolute value of the SHAP value of each of the multiple gas features; for each gas feature, the absolute value of the SHAP value of the targeted gas feature is positively correlated with the contribution of the targeted gas feature to the gas identification result; according to the absolute value of the SHAP value of each of the multiple gas features, the multiple gas features are classified into important features and secondary features; the absolute value of the SHAP value of the important feature is greater than the absolute value of the SHAP value of the secondary feature.
[0074] In one embodiment, the classification module 404 is further configured to calculate:
[0075]
[0076] Where S represents a set consisting of all feature combinations of multiple gas features, f represents the recognition function, f(S) represents the recognition result when S exists, and f(S∪{i}) is the recognition result after gas feature i is added to S; represents the marginal contribution value of gas feature i in S; N represents a set of multiple gas features, |S| represents the size of S, and |N| represents the total number of features; φ i represents the SHAP value of gas feature i.
[0077] In one embodiment, the feature processing module 406 is further used to perform pooling operations at multiple scales on each important feature to obtain important scale features corresponding to the multiple scales; and perform feature fusion on the important scale features corresponding to the multiple scales to obtain important pooled features of the important feature.
[0078] In one embodiment, the feature processing module 406 is further used to perform pooling operations at multiple scales on each secondary feature to obtain secondary scale features corresponding to the multiple scales; and perform feature fusion on the secondary scale features corresponding to the multiple scales to obtain secondary pooling features of the secondary feature.
[0079] In one embodiment, the gas category to which the exhaled gas of the target object belongs is identified by a trained gas recognition model; the gas recognition model includes a feature classification network, a pyramid pooling network and a dual encoder network; the dual encoder network includes an important encoder and a secondary encoder; the important features and the secondary features are classified by the feature classification network; the important pooling features are processed by the important encoder in the pyramid pooling network; the secondary pooling features are processed by the secondary encoder in the pyramid pooling network.
[0080] The above-mentioned gas identification device obtains multiple groups of gas data collected by multiple gas sensors for the target object, determines the characteristics of each of the multiple groups of gas data, and obtains multiple gas characteristics; classifies the multiple gas characteristics into important characteristics and secondary characteristics; for each important characteristic, performs a pooling operation on the important characteristic to obtain the important pooling characteristic of the important characteristic, encodes the important pooling characteristic through an important encoder, and obtains the important coding characteristic corresponding to the important characteristic; for each secondary characteristic, performs a pooling operation on the secondary characteristic to obtain the secondary pooling characteristic of the secondary characteristic, encodes the secondary pooling characteristic through a secondary encoder, and obtains the secondary coding characteristic corresponding to the secondary characteristic; identifies the gas category to which the exhaled gas of the target object belongs according to the important coding characteristics corresponding to each important characteristic and the secondary coding characteristics corresponding to each secondary characteristic. In this way, the present application classifies gas features into important features and secondary features, and combines pooling operations and dual encoder architecture to differentiate between important features and secondary features, which helps to pay more attention to and process important features in the gas identification process, thereby improving the accuracy of gas identification, thereby assisting the diagnosis process of lung diseases and improving the accuracy of lung disease diagnosis.
[0081] Each module in the above-mentioned gas identification device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.
[0082] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a gas identification method is implemented.
[0083] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a gas identification method is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.
[0084] Those skilled in the art will understand that Figure 5 and Figure 6The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0085] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0086] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0087] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0088] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0089] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0090] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0091] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A gas identification method, characterized in that: The method comprises: Acquire multiple groups of gas data collected from a target object by multiple gas sensors, determine the characteristics of each of the multiple groups of gas data, and obtain multiple gas characteristics; classifying the plurality of gas signatures into significant signatures and minor signatures; For each important feature, a pooling operation is performed on the important feature to obtain an important pooling feature of the important feature, and the important pooling feature is encoded by an important encoder to obtain an important encoding feature corresponding to the important feature; For each secondary feature, a pooling operation is performed on the secondary feature to obtain a secondary pooling feature of the secondary feature, and the secondary pooling feature is encoded by a secondary encoder to obtain a secondary encoded feature corresponding to the secondary feature; The gas category to which the exhaled gas of the target object belongs is identified according to the important coding features corresponding to each important feature and the secondary coding features corresponding to each secondary feature.
2. The method according to claim 1, characterized in that The classifying the plurality of gas features into important features and minor features comprises: Determine the absolute value of the SHAP value of each of the multiple gas features; for each gas feature, the absolute value of the SHAP value of the targeted gas feature is positively correlated with the contribution of the targeted gas feature to the gas identification result; The multiple gas features are classified into important features and minor features according to the absolute values of the SHAP values of the multiple gas features; the absolute value of the SHAP value of the important feature is greater than the absolute value of the SHAP value of the minor feature.
3. The method according to claim 2, characterized in that Determining the absolute value of the SHAP value of each of the plurality of gas characteristics comprises: Wherein, S represents a set consisting of all feature combinations of the plurality of gas features, f represents a recognition function, f(S) represents the recognition result when S exists, and f(S∪{i}) is the recognition result after gas feature i is added to S; represents the marginal contribution value of gas feature i in S; N represents the set consisting of the multiple gas features, |S| represents the size of S, and |N| represents the total number of features; φ i represents the SHAP value of gas feature i.
4. The method according to claim 1, characterized in that: For each important feature, a pooling operation is performed on the important feature to obtain an important pooling feature of the important feature, including: For each important feature, a pooling operation of multiple scales is performed on the important feature to obtain important scale features corresponding to each of the multiple scales; The important scale features corresponding to the multiple scales are respectively fused to obtain important pooled features for the important features.
5. The method according to claim 1, characterized in that For each secondary feature, performing a pooling operation on the secondary feature to obtain a secondary pooling feature of the secondary feature includes: For each secondary feature, perform pooling operations at multiple scales on the secondary feature to obtain secondary scale features corresponding to each of the multiple scales; The secondary scale features corresponding to the multiple scales are respectively fused to obtain secondary pooling features for the secondary features.
6. The method according to any one of claims 1 to 5, characterized in that The gas category to which the exhaled gas of the target object belongs is identified by a trained gas recognition model; the gas recognition model includes a feature classification network, a pyramid pooling network and a dual encoder network; the dual encoder network includes the important encoder and the secondary encoder; the important features and the secondary features are classified by the feature classification network; the important pooling features are obtained by processing the important encoder in the pyramid pooling network; the secondary pooling features are obtained by processing the secondary encoder in the pyramid pooling network.
7. A gas identification device, characterized in that: The device comprises: An acquisition module, used to acquire multiple groups of gas data collected by multiple gas sensors for a target object, determine the characteristics of each of the multiple groups of gas data, and obtain multiple gas characteristics; A classification module, configured to classify the plurality of gas features into important features and minor features; A feature processing module is used to perform a pooling operation on each important feature to obtain an important pooling feature of the important feature, encode the important pooling feature through an important encoder, and obtain an important coded feature corresponding to the important feature; for each secondary feature, perform a pooling operation on the secondary feature to obtain a secondary pooling feature of the secondary feature, encode the secondary pooling feature through a secondary encoder, and obtain a secondary coded feature corresponding to the secondary feature; The identification module is used to identify the gas category to which the exhaled gas of the target object belongs according to the important coding features corresponding to each important feature and the secondary coding features corresponding to each secondary feature.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Electronic nose gas recognition method and system, electronic equipment and storage medium
CN113723442A
Gas detection method and device, computer equipment and storage medium
CN115097064A
Expired gas identification method and device, computer equipment and storage medium
CN116168279A
Mode recognition method, device and equipment based on gas detection and storage medium
CN116189800A
Lung cancer classification method and device, equipment and storage medium
CN116628581A
