Gas detection method based on light-weight gas detection model and related equipment
Through the lightweight gas detection model, the expiratory response curve is directly analyzed using structures such as one-dimensional standard convolution layer and Block module, which solves the trauma problem of traditional blood sugar monitoring, and realizes non-invasive and real-time diabetic ketometry monitoring. It is suitable for resource-constrained equipment, improving the accuracy of monitoring and the flexibility of equipment.
Patent Information
- Application Number
- CN202410243012.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-04
- Publication Date
- 2025-09-05
AI Technical Summary
Traditional blood sugar monitoring methods cause trauma and pain to diabetic patients, and the prior art is difficult to effectively monitor the concentration of acetone in the exhaled to prevent diabetic ketopathy, which has problems of inconvenience and inaccuracy.
A lightweight gas detection model is adopted, including one-dimensional standard convolutional layer, Block module, average pooling layer and fully connected layer. The reaction curve is collected through the sensor array and gas concentration analysis is carried out to directly output the target concentration results, avoiding manual feature extraction and cumbersome processes.
It realizes non-invasive, real-time and economical monitoring of acetone concentration in the exhaled breath of diabetic patients, improves the comfort and accuracy of monitoring, is suitable for equipment with limited resources, and has anti-interference ability and high efficiency.
Smart Images

Figure CN120594742A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning technology, and in particular to a gas detection method and related equipment based on a lightweight gas detection model. Background Art
[0002] As a metabolic disorder, diabetes mellitus has a significant impact on patients' lives due to its complexity and potential chronic effects. Prolonged high blood sugar levels can cause chronic damage to vital organs, including the eyes, kidneys, nervous system, and heart, and can even lead to organ dysfunction and failure.
[0003] At the current medical level, in order to conduct daily monitoring of diabetic patients, it is necessary to monitor the blood sugar of diabetic patients.
[0004] However, traditional blood glucose monitoring methods have a series of inconveniences, such as trauma, pain, and physical and mental burden on patients.
[0005] Research has found that diabetic ketoacidosis (DK) is the most common acute complication of diabetes and can be life-threatening if not diagnosed and treated promptly. A decrease in the ability to synthesize or utilize insulin in diabetic patients can lead to changes in their exhaled breath. Among these changes, exhaled acetone is significantly correlated with blood ketones, urine ketones, blood glucose, triglycerides, and low-density lipoprotein cholesterol. In particular, exhaled acetone is significantly more sensitive than other ketone body indicators in detecting ketosis. Therefore, acetone can be used as a marker for diabetes, allowing patients' condition to be monitored by measuring its concentration in exhaled breath.
[0006] Therefore, in order to better monitor diabetic patients on a daily basis, there is an urgent need for a method that can detect the concentration of acetone in exhaled breath. Summary of the Invention
[0007] The embodiments of the present invention provide a gas detection method and related equipment based on a lightweight gas detection model, which can detect the concentration of acetone in exhaled breath.
[0008] In a first aspect, an embodiment of the present invention provides a gas detection method based on a lightweight gas detection model, the method being applied to a gas detection device, wherein the gas detection device is preset with a trained lightweight gas detection model, the lightweight gas detection model comprising a one-dimensional standard convolution layer, at least one Block module, an average pooling layer, and a fully connected layer, the Block module comprising a plurality of parallel depth convolution blocks, a splicing layer connecting each of the depth convolution blocks, and a channel shuffling layer connected to the splicing layer, the method comprising:
[0009] Collect the gas to be tested;
[0010] Acquiring a reaction curve of the gas to be detected through a sensor array in the gas detection device;
[0011] Inputting the reaction curve into the trained lightweight gas detection model to perform gas concentration analysis and processing to obtain a target object concentration result of the target object in the gas to be tested;
[0012] Output the target concentration result.
[0013] In a second aspect, an embodiment of the present invention further provides a gas detection device based on a lightweight gas detection model, wherein the gas detection device based on the lightweight gas detection model is deployed in a gas detection device, wherein the gas detection device is preset with a trained lightweight gas detection model, wherein the lightweight gas detection model includes a one-dimensional standard convolution layer, at least one Block module, an average pooling layer, and a fully connected layer, wherein the Block module includes multiple parallel depth convolution blocks, a splicing layer connecting each of the depth convolution blocks, and a channel shuffling layer connected to the splicing layer, wherein the gas detection device based on the lightweight gas detection model includes:
[0014] Transceiver unit, used to collect the gas to be tested;
[0015] a processing unit configured to obtain a reaction curve of the gas to be detected through a sensor array in the gas detection device; input the reaction curve into the trained lightweight gas detection model to perform gas concentration analysis and processing, and obtain a target object concentration result of the target object in the gas to be detected;
[0016] The transceiver unit is further configured to output the target concentration result.
[0017] In a third aspect, an embodiment of the present invention further provides a gas detection device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.
[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the above method can be implemented.
[0019] An embodiment of the present invention provides a gas detection method and related equipment based on a lightweight gas detection model. The method is applied to a gas detection device, wherein a trained lightweight gas detection model is preset in the gas detection device, and the lightweight gas detection model includes a one-dimensional standard convolution layer, at least one Block module, an average pooling layer, and a fully connected layer. The Block module includes multiple parallel depth convolution blocks, a splicing layer connecting each of the depth convolution blocks, and a channel shuffling layer connected to the splicing layer. The method includes: collecting the gas to be tested; obtaining the reaction curve of the gas to be tested through the sensor array in the gas detection device; inputting the reaction curve into the trained lightweight gas detection model for gas concentration analysis and processing to obtain the target concentration result of the target object in the gas to be tested; and outputting the target concentration result. In the embodiment of the present invention, a trained lightweight gas detection model is set in the gas detection device. The gas detection device in this solution can detect the target concentration result of the target object in the gas to be tested, such as detecting the concentration of acetone in exhaled breath. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 A schematic diagram of an application scenario of a gas detection method based on a lightweight gas detection model provided by an embodiment of the present invention;
[0022] Figure 2 A schematic structural diagram of a lightweight gas detection model provided by an embodiment of the present invention;
[0023] Figure 3 A schematic diagram of the structure of a deep convolution block in a lightweight gas detection model provided by an embodiment of the present invention;
[0024] Figure 4 A schematic flow chart of a gas detection method based on a lightweight gas detection model provided by an embodiment of the present invention;
[0025] Figure 5 A schematic block diagram of a gas detection device based on a lightweight gas detection model provided by an embodiment of the present invention;
[0026] Figure 6 A schematic block diagram of a gas detection device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0028] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0029] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0030] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0031] The embodiments of the present invention provide a gas detection method and related equipment based on a lightweight gas detection model.
[0032] The executor of the gas detection method based on the lightweight gas detection model can be the gas detection device based on the lightweight gas detection model provided in the embodiment of the present invention, or a gas detection device that integrates the gas detection device based on the lightweight gas detection model, wherein the gas detection device based on the lightweight gas detection model can be implemented in hardware or software, and the gas detection device can be a terminal or a server, and the terminal can be a smart phone, a tablet computer, a PDA, or a laptop computer, etc.
[0033] See also Figure 1 , Figure 1 Schematic diagram of the application scenario of the gas detection method based on the lightweight gas detection model provided by the embodiment of the present invention. The gas detection method based on the lightweight gas detection model is applied to Figure 1In the gas detection device, a trained lightweight gas detection model is preset in the gas detection device, and the method includes: collecting the gas to be tested; obtaining a reaction curve of the gas to be tested through a sensor array in the gas detection device; inputting the reaction curve into the trained lightweight gas detection model to perform gas concentration analysis and processing to obtain a target object concentration result of the target object in the gas to be tested; and outputting the target object concentration result.
[0034] Among them, the lightweight gas detection model in the present invention is Tiny GasNet, which is designed for portable devices (such as gas detection equipment). The model uses an improved lightweight convolutional neural network as the backbone model, and takes the original gas sensor signal as input to achieve the prediction of the acetone content in the exhaled gas. In addition, in addition to diabetes, the gas detection method based on the lightweight gas detection model mentioned in this embodiment can also be applied to other diseases, such as lung cancer, chronic obstructive pulmonary disease (COPD) and other diseases. The monitoring and diagnosis of these diseases will change the concentration of certain volatile organic compounds in the patient's exhaled gas. Therefore, the gas detection method based on the lightweight gas detection model mentioned in this embodiment can also be used to identify and diagnose other diseases. The embodiment of the present invention is only described by monitoring the concentration of acetone in the user's exhaled breath as an example. In actual application, the specific type of the detected gas can be set according to actual needs. Specifically, by using different gas samples to train different lightweight gas detection models, a lightweight gas detection model for detecting different gases is obtained, and the model is deployed in the gas detection equipment.
[0035] like Figure 2 As shown, the lightweight gas detection model provided in this embodiment includes a one-dimensional standard convolution layer, at least one Block module ( Figure 2 Taking two as an example), an average pooling layer and a fully connected layer, wherein the Block module includes multiple parallel depth convolution blocks, a splicing layer connecting each of the depth convolution blocks, and a channel shuffling layer connected to the splicing layer.
[0036] Since the point convolution in the depthwise separable convolution of the traditional MobileNet requires a lot of memory and computation, in order to obtain a lighter-weight convolutional neural network model, the present invention retains the depthwise convolution block in the depthwise separable convolution in the Block module of the model. Since the point convolution in the depthwise separable convolution requires a lot of memory and computation, in order to obtain a lighter-weight convolutional neural network model, this embodiment designs a parallel depthwise convolution block in the Block module and splices the output of the depthwise convolution block to increase the number of output channels, so that while the feature map size is reduced, more convolution kernel groups can be used for feature extraction. Finally, in the absence of point convolution, the present invention uses channel shuffling of the input features in the Block module to recombine the feature channels to increase the interactivity between features and compensate for the feature exchange between different channels. (Since the depthwise convolution itself only focuses on the processing of channel internal information, the channel shuffling method can send the output features of the unused channel layer to the unused convolution kernel group of the next layer, so that the input data and output data can be closely associated). Compared with the traditional MobileNet, in the lightweight gas detection model proposed in this invention, the entire memory and computing amount can be 7-8 times smaller than that of the traditional MobileNet.
[0037] The depthwise convolution in the Block module of this embodiment has the same number of channels as the input data, and is primarily responsible for feature extraction and fusion within a single channel. The outputs of each depthwise convolution are then concatenated through a concatenation layer. This design enables the module to more effectively capture the various features of the input data.
[0038] It can be seen that the lightweight gas detection model provided in the embodiment of the present invention adopts a lightweight convolutional neural network framework structure. The number of parameters of the model is extremely small. While maintaining relatively good performance, it can greatly reduce network parameters and computational burden, making it suitable for resource-constrained equipment (gas detection equipment), and realizing the possibility of painless mobile health monitoring for diabetic patients.
[0039] Among them, the role of the one-dimensional standard convolution layer in the lightweight gas detection model of this embodiment is to perform preliminary extraction and processing of features, helping the model to better understand and utilize the information of the original data (the reaction curve of the gas to be measured). Extract basic feature information from the original data to provide better input for the subsequent deep convolution layer. Specifically, the one-dimensional standard convolution in the one-dimensional standard convolution layer of this example can discover and capture local patterns in the data (for example, the data collected by certain sensors may show a repetitive pattern or waveform within a specific time period), structural features (for example, there may be certain correlations or regularities between certain sensors) or frequency domain information (such as periodic signals or frequency components in the data), thereby providing a meaningful feature representation for the model. The advantage of doing this is that the deep convolution layer (Block module) can focus more on learning higher-level and more abstract features, thereby improving the performance and generalization ability of the model.
[0040] It can be seen that the lightweight gas detection model in this embodiment can directly process the raw data of the gas (reaction curve), avoiding the tedious process of manual extraction and screening of features in traditional machine learning and effectively avoiding information loss.
[0041] Figure 3 This is a schematic diagram of the structure of the deep convolution block in the lightweight gas detection model of the present invention, including the convolution kernel, batch normalization module and Leaky ReLu activation function.
[0042] This embodiment uses Leaky ReLU as the activation function in the Block module. The Leaky ReLU activation function does not have the problem of zero gradient in deep convolution, and is helpful to improve the performance of deep convolution when processing low-dimensional feature vectors. Compared with the Sigmoid and Tanh activation functions, the Leaky ReLU activation function can achieve model convergence faster when training using the gradient descent method. In addition, when the input of the ReLU function is negative, the output will always be 0, and the first-order derivative value will be 0, which may make it impossible to update the parameters of some neurons during the gradient descent process, that is, the neurons are "shielded". In order to solve this problem, the Leaky ReLU function used in the present invention has a small slope for negative inputs based on ReLU, ensuring that the function will not completely output 0 when the input is negative, while keeping the derivative non-0, so that the neuron parameters can continue to be updated.
[0043] Figure 4 This is a flow chart of a gas detection method based on a lightweight gas detection model provided by an embodiment of the present invention. The execution subject is the gas detection device mentioned above, and the gas detection device is preset with a trained lightweight gas detection model, such as Figure 4 As shown, the method includes the following steps S110-S140.
[0044] S110: Collect the gas to be tested.
[0045] In some embodiments, to facilitate gas detection by the user, the present embodiment can directly collect the gas exhaled by the user through the gas inlet in the gas detection device to obtain the gas to be detected.
[0046] In addition, the gas exhaled by the user can also be collected through other gas collection devices, and then the collected gas to be detected is input into the gas detection device (i.e., the gas to be detected is collected indirectly). The present invention does not limit the specific method of collecting gas.
[0047] S120: Acquire a reaction curve of the gas to be detected through a sensor array in the gas detection device.
[0048] Among them, the sensor array in this embodiment can be an electronic nose array. The reaction curve of the gas to be detected is obtained by the interaction between the sensor array and the collected gas to be detected. Obtaining the gas reaction curve through the array can improve the anti-interference ability of the gas detection equipment.
[0049] S130: Input the reaction curve into the trained lightweight gas detection model to perform gas concentration analysis and processing to obtain a target object concentration result of the target object in the gas to be detected.
[0050] Specifically, the lightweight gas detection model performs gas concentration analysis and processing through the following steps:
[0051] The basic characteristic information of the gas is extracted from the reaction curve through the one-dimensional standard convolution layer; the deep feature extraction processing is performed on the basic characteristic information of the gas through each of the depth convolution blocks to obtain the depth feature information corresponding to each of the depth convolution blocks; the multiple depth feature information are spliced through the splicing layer to obtain spliced feature information; the spliced feature information is channel shuffled through the channel shuffling layer to obtain shuffled feature information; the shuffled feature information is averaged pooled through the average pooling layer to obtain pooled feature information; the pooled feature information is linearly transformed and mapped through the fully connected layer to obtain the target concentration result.
[0052] In the Block module:
[0053] Depthwise convolution can be expressed as:
[0054]
[0055] In formula (1), Y i is the value of the i-th position of the output sequence of the depth convolution, X i+jis the value of the input sequence at position i+j, W j is the weight of the convolution kernel of the depthwise convolution.
[0056] The deep convolution block in this embodiment includes a convolution kernel, a batch normalization module, and a Leaky ReLu activation function. Batch normalization implemented by the batch normalization module is a technique in deep learning for accelerating convergence and stabilizing model training, which can be expressed as:
[0057]
[0058] Among them, Y ′ i is the value of the i-th position of the output sequence after batch normalization, X i is the value at position i of the input sequence, μ is the mean of the input sequence, σ is the standard deviation of the input sequence, γ is a learnable scaling parameter, and β is a learnable translation parameter. Batch normalization first normalizes the input data (subtracting the mean and dividing by the standard deviation) and then linearly transforms it using the learnable scaling parameter γ and translation parameter β. This operation helps maintain a stable distribution of each neuron's activations during training, accelerating network convergence.
[0059] In the entire lightweight gas detection model:
[0060] The lightweight gas detection model uses operations such as one-dimensional standard convolution, block stacking, and adaptive average pooling to ultimately obtain a feature representation with a certain dimension. Acetone concentration is then predicted using a fully connected layer, where the activation function in this embodiment is a sigmoid activation function.
[0061] Among them, the one-dimensional standard convolution operation in the one-dimensional standard convolution layer can be expressed as:
[0062]
[0063] Among them, (f i *g)(t) represents the convolution result of the i-th gas sensor signal and the convolution kernel, that is, the output value at position t, f i (a) represents the value of the i-th gas sensor signal at position a, and g(ta) represents the value of the convolution kernel at position ta.
[0064] The adaptive average pooling in the average pooling layer is used to reduce the dimension of features and convert them into feature representations with a certain latitude. Its mathematical expression is as follows:
[0065]
[0066] Here, z iis the value of the i-th position of the average pooled output sequence, N is the length of the input sequence, and Y k is the input value.
[0067] The fully connected layer uses a linear transformation of the feature representation and a sigmoid activation function to predict acetone concentration. After the sigmoid function, the weight parameters of each neuron are obtained. Finally, a fully connected layer combines these neurons to obtain the final prediction result.
[0068] Output=Sigmoid(Linear(X));(5)
[0069] Among them, Linear represents the linear transformation of the fully connected layer, X is the input value, Output is the output value, and Sigmoid is the Sigmoid activation function. The Sigmoid activation function is one of the nonlinear activation functions commonly used in deep learning. It is used to introduce nonlinear characteristics and map the input to the range between 0 and 1. Its mathematical expression is as follows:
[0070]
[0071] Where σ(x) represents the Sigmoid activation function and e is the base of the natural logarithm.
[0072] S140: Output the target concentration result.
[0073] In this embodiment, specifically, the target object concentration result can be displayed on a display screen on the gas detection device.
[0074] In some embodiments, in order to more intuitively obtain the disease detection result of the user, after obtaining the target object concentration result of the target object in the gas to be tested, the method further includes:
[0075] According to the preset correspondence between the disease and the gas concentration, the disease result corresponding to the target concentration result is determined; and the disease result is output.
[0076] For example, when the concentration of acetone in the target substance concentration result is greater than a preset concentration threshold, it indicates that there is a risk of diabetic ketoacidosis; if it is less than the concentration threshold, it indicates that there is no risk of diabetic ketoacidosis.
[0077] The trained lightweight gas detection model in this embodiment is trained based on the following method:
[0078] A gas sample set comprising a plurality of gas samples is obtained; a sample response curve of each of the gas samples is obtained using a sensor array; a preset lightweight gas detection model is used to perform gas concentration analysis and processing on the sample response curves to obtain a concentration prediction value of each of the sample response curves; a true concentration value and a concentration prediction value corresponding to each of the sample response curves are obtained, and the lightweight gas detection model is converged according to the true concentration value and the concentration prediction value of each of the sample response curves to obtain the trained lightweight gas detection model.
[0079] The gas samples in the gas sample set are collected based on the following method:
[0080] The invention relates to a method for collecting a target gas sample by determining a true value of a target concentration; determining a flow control instruction for a flow controller of each gas cylinder in a gas sample preparation device according to the true value of the target concentration, wherein the gas cylinders include an acetone gas cylinder and multiple background gas cylinders; controlling the corresponding flow controller according to each flow control instruction, and collecting the target gas sample in the gas cavity of the gas sample preparation device to obtain the target gas sample.
[0081] In order to produce more accurate gas samples, the inventors used several volatile organic compounds in exhaled gas that are most closely related to diabetes when making gas samples. Based on their approximate concentration range in exhaled gas, they set different concentration gradients and mixed them to obtain gas samples with different concentration gradients.
[0082] Based on the concentration range of volatile acetone compounds, this gas was divided into different concentrations. The acetone gas was then combined with background gas to generate mixed gas datasets of varying concentrations. In addition to acetone gas, a specially prepared background gas containing 16% oxygen, 4% carbon dioxide, and 80% nitrogen was prepared to simulate human exhaled air. Furthermore, hydrogen sulfide and methyl mercaptan were used as markers (acetone) in the background gas because these gases are present in both diabetic and non-diabetic patients and their concentrations do not differ significantly, making them suitable as background gases.
[0083] In the simulated gas experiment, the exhaled marker (acetone) and background gases (hydrogen sulfide, methyl mercaptan, and a special gas) are introduced into the gas chamber. The chamber is connected to a cylinder containing each background gas through a branch of gas paths corresponding to each gas. The concentrations of acetone, hydrogen sulfide, methyl mercaptan, and the special background gas in the cylinders vary, and the concentration of each gas in the mixed gas chamber is controlled by an MFC flow controller. To minimize the impact of different experimental processes on the correlation between the simulated gas dataset and the real exhaled breath dataset, the simulated gas dataset uses the same experimental process as the real exhaled breath experiment to obtain the response curve and the final gas sample set.
[0084] Loss=MSE(Y pre ,Y true );(7)
[0085] MSE stands for mean square error, which is used to measure the pre ,Y true The specific calculation formula is as follows:
[0086]
[0087] m represents the number of samples, and i represents the i-th sample in the sample. true is the true label of the sample, Y pre Is the final predicted label output by the model. Loss is the loss of the final model training process.
[0088] The present invention uses a specially designed network structure to enable the lightweight gas detection model in the present invention to learn the key features of the input data, thereby improving the accuracy of acetone concentration prediction. At the same time, the model significantly reduces the amount of calculation while maintaining accuracy, and is suitable for mobile devices with limited computing resources. The introduction of channel shuffling operations in the Block module not only helps to enhance the ability of feature learning, but also improves the robustness and generalization performance of the model. By adopting appropriate activation functions, adaptive average pooling and other technologies, the present invention effectively reduces the risk of model overfitting and improves the stability of the model. The lightweight gas detection model provided by the present invention can be used for acetone concentration prediction and diabetic health monitoring, has high accuracy, robustness and stability, and is suitable for a variety of application scenarios.
[0089] In summary, the method provided by the present invention is applied to a gas detection device, wherein the gas detection device is preset with a trained lightweight gas detection model, wherein the lightweight gas detection model includes a one-dimensional standard convolution layer, at least one Block module, an average pooling layer, and a fully connected layer, wherein the Block module includes a plurality of parallel depth convolution blocks, a splicing layer connecting each of the depth convolution blocks, and a channel shuffling layer connected to the splicing layer, wherein the method includes: collecting the gas to be tested; obtaining the reaction curve of the gas to be tested through the sensor array in the gas detection device; inputting the reaction curve into the trained lightweight gas detection model for gas concentration analysis and processing to obtain the target concentration result of the target object in the gas to be tested; and outputting the target concentration result. In an embodiment of the present invention, a trained lightweight gas detection model is provided in the gas detection device, and the gas detection device in this scheme can detect the target concentration result of the target object in the gas to be tested, such as detecting the concentration of acetone in the exhaled breath.
[0090] In addition, the present invention also has the following beneficial effects:
[0091] (1) Efficient end-to-end architecture: Compared to existing algorithms for detecting acetone concentration in the exhaled breath of diabetic patients, the proposed model adopts an end-to-end architecture, eliminating the need for manual feature extraction of the input signal. This optimized design significantly improves the algorithm's execution efficiency by directly inputting the response curve to quickly obtain the final recognition result. This efficiency not only improves computing resource utilization but also makes the recognition process more concise and efficient.
[0092] (2) Applicability to Limited Computing Resources: While ensuring high accuracy in identifying acetone concentrations in the exhaled breath of diabetic patients, the proposed model can be trained on devices with limited computing resources. This makes gas detection technology more flexible and adaptable to different hardware environments, opening up the possibility of a wide range of application scenarios.
[0093] (3) Non-invasive monitoring method with multiple advantages: Compared with traditional diabetes health monitoring methods, the present invention has multiple advantages such as non-invasiveness, real-time, economical price and easy operation. It not only improves the comfort of patients receiving monitoring, but also provides a more convenient and economical diabetes monitoring solution for the medical system.
[0094] (4) Strong anti-interference ability: Through array and algorithm processing, the gas detection device of the present invention is able to resist interference, such as water vapor or hydrogen sulfide, further enhancing its stability and reliability in actual use.
[0095] like Figure 5The figure shows a functional module diagram of a preferred embodiment of a gas detection device based on a lightweight gas detection model of the present invention. The gas detection device 500 based on a lightweight gas detection model is deployed in a gas detection device, and a trained lightweight gas detection model is preset in the gas detection device. The lightweight gas detection model includes a one-dimensional standard convolution layer, at least one Block module, an average pooling layer, and a fully connected layer. The Block module includes a plurality of parallel depth convolution blocks, a splicing layer connecting each of the depth convolution blocks, and a channel shuffling layer connected to the splicing layer. The gas detection device 500 based on a lightweight gas detection model includes a transceiver unit 501 and a processing unit 502. The module / unit referred to in the present invention refers to a series of computer program segments that can be executed by a processor and can perform fixed functions, which are stored in a memory. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.
[0096] in:
[0097] The transceiver unit 501 is used to collect the gas to be tested;
[0098] The processing unit 502 is configured to obtain a reaction curve of the gas to be detected through the sensor array in the gas detection device; input the reaction curve into the trained lightweight gas detection model to perform gas concentration analysis and processing to obtain a target concentration result of the target object in the gas to be detected;
[0099] The transceiver unit 501 is further configured to output the target concentration result.
[0100] As can be seen from the above technical solution, the present invention provides a trained lightweight gas detection model in the gas detection device. The gas detection device in this solution can detect the target concentration result of the target object in the gas to be tested, such as detecting the concentration of acetone in the exhaled breath.
[0101] like Figure 6 As shown, it is a structural schematic diagram of a gas detection device of a preferred embodiment of the present invention to implement a gas detection method based on a lightweight gas detection model. The gas detection device is preset with a trained lightweight gas detection model. The lightweight gas detection model includes a one-dimensional standard convolution layer, at least one Block module, an average pooling layer and a fully connected layer. The Block module includes multiple parallel depth convolution blocks, a splicing layer connecting each of the depth convolution blocks, and a channel shuffling layer connected to the splicing layer.
[0102] The gas detection device 1 may include a memory 12 , a processor 13 and a bus, and may further include a computer program stored in the memory 12 and executable on the processor 13 , such as a gas detection program based on a lightweight gas detection model.
[0103] Those skilled in the art will understand that the schematic diagram is merely an example of the gas detection device 1 and does not constitute a limitation on the gas detection device 1. The gas detection device 1 can be either a bus-type structure or a star-type structure. The gas detection device 1 can also include more or less other hardware or software than shown in the figure, or a different arrangement of components. For example, the gas detection device 1 can also include input and output devices, network access devices, etc.
[0104] It should be noted that the gas detection device 1 is only an example. Other existing or future electronic products that are adaptable to the present invention should also be included in the protection scope of the present invention and included herein by reference.
[0105] Among them, the memory 12 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of the gas detection device 1, such as a mobile hard disk of the gas detection device 1. In other embodiments, the memory 12 can also be an external storage device of the gas detection device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. equipped on the gas detection device 1. Furthermore, the memory 12 can also include both an internal storage unit and an external storage device of the gas detection device 1. The memory 12 can not only be used to store application software and various types of data installed in the gas detection device 1, such as the code of the gas detection program based on the lightweight gas detection model, but can also be used to temporarily store data that has been output or is to be output.
[0106] In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor 13 is the control core (Control Unit) of the gas detection device 1, and utilizes various interfaces and lines to connect the various components of the entire gas detection device 1. It executes or executes programs or modules stored in the memory 12 (for example, executing a gas detection program based on a lightweight gas detection model, etc.), and calls data stored in the memory 12 to execute various functions of the gas detection device 1 and process data.
[0107] The processor 13 executes the operating system of the gas detection device 1 and various installed applications. The processor 13 executes the applications to implement the steps in the above-mentioned gas detection method embodiments based on the lightweight gas detection model, for example Figure 4 Steps shown.
[0108] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to implement the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the gas detection device 1. For example, the computer program may be divided into a transceiver unit and a processing unit.
[0109] The above-mentioned integrated unit implemented in the form of a software functional module can be stored in a computer-readable storage medium. The above-mentioned software functional module stored in a storage medium includes a number of instructions for causing a gas detection device (which can be a personal computer, computer device, or network device, etc.) or a processor to execute the portion of the gas detection method based on the lightweight gas detection model described in various embodiments of the present invention.
[0110] If the modules / units integrated in the gas detection device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the present invention can implement all or part of the processes in the above-mentioned embodiment methods by instructing relevant hardware devices to complete them through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments.
[0111] The computer program includes computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory, etc.
[0112] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0113] Blockchain, as used in this article, refers to a novel application model for computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Blockchain is essentially a decentralized database, a series of data blocks generated using cryptographic methods. Each block contains information about a batch of online transactions, used to verify the validity of this information (to prevent counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.
[0114] The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The figure shows that only one straight line is used, but it does not mean that there is only one bus or one type of bus. The bus is configured to realize the connection and communication between the memory 12 and at least one processor 13.
[0115] Although not shown, the gas detection device 1 may also include a power source (such as a battery) to power various components. Preferably, the power source can be logically connected to the at least one processor 13 via a power management device, thereby implementing functions such as charge management, discharge management, and power consumption management through the power management device. The power source may also include one or more DC or AC power sources, a recharging device, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components. The gas detection device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be detailed here.
[0116] Furthermore, the gas detection device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used to establish a communication connection between the gas detection device 1 and other gas detection devices.
[0117] Optionally, the gas detection device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the gas detection device 1 and to display a visual user interface.
[0118] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0119] Figure 6 Only the gas detection device 1 having components 12-13 is shown, and it can be understood by those skilled in the art that Figure 6 The structure shown does not constitute a limitation on the gas detection device 1 , and the gas detection device 1 may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0120] Combine Figure 4 The memory 12 in the gas detection device 1 stores a plurality of instructions to implement a gas detection method based on a lightweight gas detection model, and the processor 13 can execute the plurality of instructions to implement:
[0121] Collect the gas to be tested;
[0122] Acquiring a reaction curve of the gas to be detected through a sensor array in the gas detection device;
[0123] Inputting the reaction curve into the trained lightweight gas detection model to perform gas concentration analysis and processing to obtain a target object concentration result of the target object in the gas to be tested;
[0124] Output the target concentration result.
[0125] Specifically, the specific implementation method of the processor 13 for the above instructions can refer to Figure 4 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0126] It should be noted that the data involved in this case were all obtained legally.
[0127] In the several embodiments provided herein, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is merely a logical functional division, and actual implementation may employ other division methods.
[0128] The present invention can be used in a wide variety of general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0129] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected to achieve the purpose of the solution of this embodiment according to actual needs.
[0130] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional modules.
[0131] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0132] Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the claims are intended to be embraced therein. Any reference to a figure in a claim should not be construed as limiting the claim to which it relates.
[0133] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices described in the present invention may also be implemented by a single unit or device through software or hardware. Terms such as first and second are used to indicate names and do not imply any particular order.
[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A gas detection method based on a lightweight gas detection model, characterized in that: The method is applied to a gas detection device, wherein the gas detection device is pre-set with a trained lightweight gas detection model, the lightweight gas detection model including a one-dimensional standard convolution layer, at least one Block module, an average pooling layer, and a fully connected layer, the Block module including a plurality of parallel depthwise convolution blocks, a splicing layer connecting the depthwise convolution blocks, and a channel shuffling layer connected to the splicing layer, the method comprising: Collect the gas to be tested; Acquiring a reaction curve of the gas to be detected through a sensor array in the gas detection device; Inputting the reaction curve into the trained lightweight gas detection model to perform gas concentration analysis and processing to obtain a target object concentration result of the target object in the gas to be tested; Output the target concentration result.
2. The method according to claim 1, characterized in that The step of inputting the reaction curve into the trained lightweight gas detection model to perform gas concentration analysis and processing to obtain a target concentration result of the target object in the gas to be detected includes: Extracting basic gas characteristic information from the reaction curve through the one-dimensional standard convolution layer; Performing depth feature extraction processing on the basic characteristic information of the gas through each of the depth convolution blocks to obtain depth feature information corresponding to each of the depth convolution blocks; Splicing the plurality of depth feature information through the splicing layer to obtain splicing feature information; Performing channel shuffling processing on the splicing feature information through the channel shuffling layer to obtain shuffled feature information; Performing average pooling processing on the shuffled feature information through the average pooling layer to obtain pooled feature information; The pooled feature information is linearly transformed and mapped through the fully connected layer to obtain the target concentration result.
3. The method according to claim 1, characterized in that The depth convolution block includes a convolution kernel, a batch normalization module and a Leaky ReLu activation function.
4. The method according to claim 1, wherein After inputting the reaction curve into the trained lightweight gas detection model to perform gas concentration analysis and processing to obtain the target object concentration result of the target object in the gas to be detected, the method further includes: Determining the disease result corresponding to the target substance concentration result according to the preset correspondence between the disease and the gas concentration; The disease result is output.
5. The method according to claim 1, wherein The trained lightweight gas detection model is trained based on the following method: Obtaining a gas sample set comprising a plurality of gas samples; Using a sensor array to respectively obtain a sample response curve of each of the gas samples; Using a preset lightweight gas detection model to perform gas concentration analysis on the sample reaction curves to obtain concentration prediction values for each of the sample reaction curves; The true concentration value and the predicted concentration value corresponding to each of the sample response curves are obtained, and the lightweight gas detection model is converged according to the true concentration value and the predicted concentration value of each of the sample response curves to obtain the trained lightweight gas detection model.
6. The method according to claim 5, characterized in that Each gas sample in the gas sample set is collected based on the following method: Determine the target concentration true value of the target gas sample to be collected; Determining a flow control instruction of a flow controller of each gas cylinder in a gas sample preparation device according to the target concentration true value, wherein the gas cylinders include an acetone gas cylinder and a plurality of background gas cylinders; The corresponding flow controllers are controlled respectively according to the flow control instructions, and the target gas sample is collected in the gas cavity of the gas sample production device to obtain the target gas sample.
7. The method according to any one of claims 1 to 6, characterized in that The target substance is acetone.
8. A gas detection device based on a lightweight gas detection model, characterized in that: The gas detection device based on the lightweight gas detection model is deployed in a gas detection device. The gas detection device is pre-set with a trained lightweight gas detection model. The lightweight gas detection model includes a one-dimensional standard convolution layer, at least one Block module, an average pooling layer, and a fully connected layer. The Block module includes multiple parallel depth convolution blocks, a splicing layer connecting each of the depth convolution blocks, and a channel shuffling layer connected to the splicing layer. The gas detection device based on the lightweight gas detection model includes: Transceiver unit, used to collect the gas to be tested; a processing unit configured to obtain a reaction curve of the gas to be detected through a sensor array in the gas detection device; input the reaction curve into the trained lightweight gas detection model to perform gas concentration analysis and processing, and obtain a target object concentration result of the target object in the gas to be detected; The transceiver unit is further configured to output the target concentration result.
9. A gas detection device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the gas detection method based on the lightweight gas detection model according to any one of claims 1 to 7 is implemented.
10. A storage medium, characterized in that: The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the processor executes the gas detection method based on the lightweight gas detection model according to any one of claims 1 to 7.