Gas detection method and device, computer equipment, readable storage medium and product
By extracting and fusion of gas response signals, the problem of inaccurate detection results caused by environmental factors is solved, and higher gas detection accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202510144502.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-05-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing gas sensors are susceptible to environmental factors, resulting in inaccurate detection results.
By extracting the gas response signal, the envelope signal and the detailed signal are obtained, and the timing characteristics, envelope signal characteristics and detailed signal characteristics are obtained, and the characteristic fusion is carried out to improve the accuracy of gas detection.
Through multi-feature fusion, signals can be analyzed from different angles, the correlation between features can be fully utilized, the accuracy and efficiency of gas detection can be improved, the feature dimension can be reduced, and the calculation amount and storage space can be reduced.
Smart Images

Figure CN120064568A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of gas detection, and particularly to a gas detection method, device, computer device, readable storage medium, and product. Background Art
[0002] With the increasing social concern about environmental quality and safety, gas detection has begun to be widely used in fields such as environmental monitoring, industrial safety, vehicle emission detection, household appliances, and air quality monitoring.
[0003] Currently, gas sensors are usually used for gas detection. A gas sensor is a converter that converts information such as the composition and concentration of a certain gas into corresponding electrical signals. However, existing gas sensors are easily affected by environmental factors, resulting in inaccurate detection results. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a gas detection method, device, computer device, computer-readable storage medium, and computer program product that can improve the accuracy of gas detection.
[0005] In a first aspect, this application provides a gas detection method, including: in response to a gas detection instruction for a target environment, detecting a gas signal in the target environment to obtain a gas response signal of the target environment; extracting signals from the gas response signal to obtain an envelope signal and a detail signal; the envelope signal refers to a signal that reflects the overall change trend of the gas response signal; the detail signal refers to a signal that contains high-frequency information of the gas response signal; obtaining the timing characteristics of the gas response signal, the envelope signal characteristics of the envelope signal, and the detail signal characteristics of the detail signal; fusing the timing characteristics, envelope signal characteristics, and detail signal characteristics to obtain a feature fusion result; and based on the feature fusion result, performing gas detection on the target environment to obtain a gas detection result of the target environment.
[0006] In one embodiment, extracting signals from the gas response signal to obtain an envelope signal and a detail signal includes: performing smoothing processing on the gas response signal to obtain a smoothed signal; performing a linear transformation on the smoothed signal to obtain an envelope signal; obtaining signal difference information between the envelope signal and the smoothed signal, and using the signal that matches the signal difference information as the detail signal.
[0007] In one embodiment, obtaining the timing characteristics of the gas response signal, the envelope signal characteristics of the envelope signal, and the detail signal characteristics of the detail signal includes: extracting the timing characteristics of the gas response signal by performing feature extraction on the gas response signal in a first convolution manner through a multi-feature fusion model; extracting the envelope signal characteristics of the envelope signal by performing feature extraction on the envelope signal in a second convolution manner through the multi-feature fusion model; and extracting the detail signal characteristics of the detail signal by performing feature extraction on the detail signal in a third convolution manner through the multi-feature fusion model.
[0008] In one embodiment, based on the feature fusion result, performing gas detection on the target environment to obtain the gas detection result of the target environment, including: identifying the gas type of the target environment based on the feature fusion result to obtain the ambient gas type of the target environment; detecting the gas concentration of the target environment based on the feature fusion result to obtain the ambient gas concentration of the target environment; and jointly using the ambient gas type and the ambient gas concentration as the gas detection result of the target environment.
[0009] In one embodiment, the training process of the multi-feature fusion model includes: constructing a sample environment matching each pulse heating method based on each pulse heating method; obtaining sample gases, and respectively detecting the gas signals of the sample gases in each sample environment to obtain the sample response signals of the sample gases; and training the initial feature fusion model based on the sample response signals until the training stop condition is met to obtain the multi-feature fusion model.
[0010] In one embodiment, the sample gases include normal sample gases and abnormal sample gases; detecting the gas signals of the sample gases to obtain the sample response signals of the sample gases, including: detecting the gas signals of the normal sample gases to obtain the normal response signals of the normal sample gases; and detecting the gas signals of the abnormal sample gases to obtain the abnormal response signals of the abnormal sample gases.
[0011] Second aspect, the present application also provides a gas detection device, including: a signal acquisition module, configured to detect a gas signal in a target environment in response to a gas detection instruction for the target environment, so as to obtain a gas response signal of the target environment; a signal extraction module, configured to extract signals from the gas response signal to obtain an envelope signal and a detail signal; the envelope signal refers to a signal reflecting the overall change trend of the gas response signal; the detail signal refers to a signal containing high-frequency information of the gas response signal; a signal feature acquisition module, configured to acquire the timing feature of the gas response signal, the envelope signal feature of the envelope signal, and the detail signal feature of the detail signal; a feature fusion module, configured to fuse the timing feature, the envelope signal feature, and the detail signal feature to obtain a feature fusion result; a gas detection module, configured to perform gas detection on the target environment based on the feature fusion result to obtain a gas detection result of the target environment.
[0012] Third aspect, the present application also provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented: detecting a gas signal in a target environment in response to a gas detection instruction for the target environment, so as to obtain a gas response signal of the target environment; extracting signals from the gas response signal to obtain an envelope signal and a detail signal; the envelope signal refers to a signal reflecting the overall change trend of the gas response signal; the detail signal refers to a signal containing high-frequency information of the gas response signal; acquiring the timing feature of the gas response signal, the envelope signal feature of the envelope signal, and the detail signal feature of the detail signal; fusing the timing feature, the envelope signal feature, and the detail signal feature to obtain a feature fusion result; performing gas detection on the target environment based on the feature fusion result to obtain a gas detection result of the target environment.
[0013] Fourth aspect, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: detecting a gas signal in a target environment in response to a gas detection instruction for the target environment, so as to obtain a gas response signal of the target environment; extracting signals from the gas response signal to obtain an envelope signal and a detail signal; the envelope signal refers to a signal reflecting the overall change trend of the gas response signal; the detail signal refers to a signal containing high-frequency information of the gas response signal; acquiring the timing feature of the gas response signal, the envelope signal feature of the envelope signal, and the detail signal feature of the detail signal; fusing the timing feature, the envelope signal feature, and the detail signal feature to obtain a feature fusion result; performing gas detection on the target environment based on the feature fusion result to obtain a gas detection result of the target environment.
[0014] Fifth aspect, the present application further provides a computer program product, including a computer program, which when executed by a processor implements the following steps: in response to a gas detection instruction for a target environment, detecting a gas signal in the target environment to obtain a gas response signal of the target environment; extracting signals from the gas response signal to obtain an envelope signal and a detail signal; the envelope signal refers to a signal reflecting the overall change trend of the gas response signal; the detail signal refers to a signal containing high-frequency information of the gas response signal; obtaining the timing characteristics of the gas response signal, the envelope signal characteristics of the envelope signal, and the detail signal characteristics of the detail signal; performing feature fusion on the timing characteristics, the envelope signal characteristics, and the detail signal characteristics to obtain a feature fusion result; based on the feature fusion result, performing gas detection on the target environment to obtain a gas detection result of the target environment.
[0015] The above gas detection method, device, computer device, computer-readable storage medium, and computer program product. In response to a gas detection instruction for a target environment, first detect a gas signal in the target environment to obtain a gas response signal of the target environment. Then extract signals from the gas response signal to obtain an envelope signal and a detail signal. The envelope signal refers to a signal reflecting the overall change trend of the response signal, and this change trend is usually closely related to the type of gas, which is beneficial for identifying the type of environmental gas. The detail signal refers to a signal containing high-frequency information of the gas response signal, and these high-frequency information are usually closely related to the concentration change of the gas, which is beneficial for detecting the concentration of environmental gas. In addition, the present application further obtains the timing characteristics of the gas response signal, and the timing characteristics can reflect the law and characteristics of the gas response signal changing with time, which is beneficial for improving the accuracy and reliability of gas detection. Finally, by performing feature fusion on the timing characteristics, the signal characteristics of the envelope signal, and the signal characteristics of the detail signal, a feature fusion result is obtained. Finally, based on the feature fusion result, gas detection is performed on the target environment to obtain a gas detection result of the target environment. Therefore, by performing multi-feature fusion on the timing characteristics, detail signal characteristics, and envelope signal characteristics of the gas response signal, on the one hand, the signal can be analyzed from different angles, making full use of the correlation between different features, so as to obtain a more comprehensive and accurate gas detection result, effectively improving the accuracy of gas detection. On the other hand, multi-feature fusion can reduce the feature dimension, which is beneficial for reducing the calculation amount and storage space, thereby improving the efficiency of gas detection. Brief Description of the Drawings
[0016] To more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the accompanying drawings required for the description of the embodiments of the present application or related technologies. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related accompanying drawings can also be obtained based on these drawings.
[0017] Figure 1 It is an application environment diagram of the gas detection method in an embodiment;
[0018] Figure 2 It is a schematic flowchart of the gas detection method in an embodiment;
[0019] Figure 3 It is a schematic flowchart of signal extraction in an embodiment;
[0020] Figure 4 It is a schematic diagram of signal extraction in another embodiment;
[0021] Figure 5 It is a schematic diagram of three signals in an embodiment;
[0022] Figure 6 It is a schematic flowchart of signal feature extraction in an embodiment;
[0023] Figure 7 It is a schematic flowchart of the training process of the multi-feature fusion model in an embodiment;
[0024] Figure 8 It is a schematic diagram of the response signal of ethanol gas under each pulse heating environment in an embodiment;
[0025] Figure 9 It is a schematic diagram of various types of abnormal samples in an embodiment;
[0026] Figure 10 It is a structural block diagram of the gas detection device in an embodiment;
[0027] Figure 11 It is an internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0028] In order to make the purpose, technical solutions and advantages of the present application more clear, the following further details the present application in combination 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.
[0029] A gas sensor is a converter that converts information such as the composition and concentration of a certain gas into corresponding electrical signals. With its high sensitivity and versatility, gas sensors have become important tools in fields such as industrial safety, environmental protection, medical diagnosis, and food monitoring.
[0030] Existing gas sensors are easily affected by environmental factors, resulting in inaccurate detection results. To solve this problem, sensor array technology has been introduced currently. However, with the increase in the number of gas sensors, the power consumption and volume of the gas sensor recognition system increase, which will instead limit its wider application. Based on this, with the continuous development of microfabrication technology, MEMS (Micro-Electro-Mechanical System) gas sensors based on metal oxides integrate multiple functional modules on a silicon substrate using micro-nano fabrication technology, with small volume and low power consumption, which can effectively avoid the above problems. At the same time, MEMS sensors have more advantages in portable and multi-functional applications, such as in fields like smart devices, portable air quality monitoring devices, and automotive emission monitoring. This application considers that although a single MEMS gas sensor has advantages in terms of volume and power consumption, its recognition performance will be sacrificed. Therefore, a gas detection method is proposed to improve the gas recognition performance of a single MEMS gas sensor, so as to not only ensure the application range of the gas sensor but also improve the accuracy of its gas detection.
[0031] The gas detection method provided by the embodiments of this application can be applied to an application environment as Figure 1 shown. It includes a server 102, a gas sensor 104, and a terminal 106. The server 102 communicates with the gas sensor 104 and the terminal 106 respectively through a network.
[0032] Among them, the server 102 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The gas sensor 104 is a converter that converts information such as the composition and concentration of a certain gas into corresponding electrical signals, and its working principle is mainly based on the interaction between the sensing element inside and the gas. It can include, but is not limited to, any one of metal oxide gas sensors, semiconductor gas sensors, electrochemical gas sensors, catalytic combustion gas sensors, thermal conductivity gas sensors, infrared gas sensors, solid electrolyte gas sensors, etc. It should be noted that in this application, a single metal oxide-based MEMS gas sensor is used. The metal oxide gas sensor is a sensor that uses the chemical reaction between metal oxides and gases to detect gas characteristics. Its working principle involves adsorbing gas molecules onto the surface of a metal oxide (such as tin dioxide, zirconia, etc.) element. The adsorbed gas molecules interact with the surface of the metal oxide element, capturing one or more conduction electrons, thereby adjusting the resistance of the metal oxide element. This change in resistance is related to the gas characteristics, so the gas characteristics can be inferred by measuring the resistance. The terminal 106 can be, but is not limited to, various personal computers, laptop computers, smartphones, tablet computers, and Internet of Things devices.
[0033] It can be understood that even a metal oxide gas sensor with high sensitivity to gases may be affected by external environmental factors such as ambient temperature during actual application, resulting in inaccurate detection results. Therefore, in this application, through a pre-established multi-feature fusion model, the time-series features, envelope signal features, and detail signal features of the gas response signal are feature-fused, making full use of the correlation between different features, so as to obtain a more comprehensive and accurate gas detection result. Moreover, the multi-feature fusion model is trained in sample environments at different temperatures. Therefore, through the technical solution of this application, the influence of environmental factors on the gas detection result can be avoided, and the accuracy of gas detection can be effectively improved.
[0034] Specifically, when the server 102 receives a gas detection instruction initiated by the terminal 106 for a target environment, it can first instruct the gas sensor 104 to detect the gas signal in the target environment and receive the gas response signal of the target environment fed back by the gas sensor 104. Then, signal extraction is performed on the gas response signal to respectively obtain an envelope signal reflecting the overall change trend of the gas response signal and a detail signal containing the high-frequency information of the gas response signal. At the same time, the server 102 obtains the time-series features of the gas response signal. And the signal features of the envelope signal, the signal features of the detail signal, and the time-series features are feature-fused. Finally, based on the feature-fusion result, gas detection is performed on the target environment to obtain the gas detection result of the target environment.
[0035] In one example, the multi - feature fusion model can be configured not only in the server 102, but also in the gas sensor. That is to say, in practical applications, the entire process of gas detection, gas type identification, and gas concentration identification can be performed by the gas sensor.
[0036] In an exemplary embodiment, as Figure 2 shown, a gas detection method is provided. Taking the method applied to the Figure 1 server 102 as an example, it includes the following steps:
[0037] Step S202, in response to a gas detection instruction for a target environment, detect a gas signal in the target environment to obtain a gas response signal of the ambient gas in the target environment.
[0038] Among them, the target environment can refer to the environment where gas detection is required, which can be a certain indoor space or a certain outdoor space. The gas detection instruction can refer to an instruction to detect the ambient gas in the target environment, specifically including a gas type detection instruction and a gas concentration detection instruction. The gas type detection instruction can refer to an instruction to detect the type of ambient gas, and the gas concentration detection instruction can refer to an instruction to detect the concentration of ambient gas.
[0039] In some embodiments, the gas signal in the target environment can be detected by a gas sensor, specifically a single MEMS gas sensor based on metal oxide. It can be that after the server receives the gas detection instruction, it instructs the gas sensor to detect the gas signal in the target environment, or it can be that the gas sensor receives the gas detection instruction and automatically detects the gas signal in the target environment.
[0040] Gas signal detection refers to the process of detecting the ambient gas in the target environment and obtaining a response signal. The ambient gas can refer to the gas existing in the target environment, which can be one or more gases. The gas response signal refers to the electrical signal output, such as a current signal and / or a voltage signal, after the gas sensor completes the detection of the ambient gas.
[0041] Exemplarily, when the server receives a gas detection instruction for a target environment initiated by a terminal, it can first instruct a single MEMS gas sensor based on metal oxide to detect the ambient gas in the target environment. The gas molecules of the ambient gas will adsorb on the surface of the metal oxide element in the gas sensor, interact with the surface of the metal oxide element, causing the resistance of the metal oxide element to change and forming a response signal describing the resistance change. After the gas sensor completes the detection, it can feedback the response signal to the server for the server to identify the gas type and gas concentration of the ambient gas based on the response signal.
[0042] Step S204: Extract the signal from the gas response signal to obtain the envelope signal and the detail signal.
[0043] Among them, the envelope refers to a continuous curve formed by the maximum and minimum values of the signal amplitude. The envelope signal can be understood as the curve of the amplitude of the response signal changing with time, reflecting the overall change trend of the response signal. Specifically, it is the result of plotting the waveform after amplitude modulation of the signal. The detail signal refers to the signal containing the high-frequency information of the response signal. The high-frequency information can be understood as the detailed information of the response signal, such as edges or rapidly changing information. Signal extraction refers to the process of extracting the envelope signal and the detail signal from the response signal.
[0044] Exemplarily, since the envelope signal reflects the overall change trend of the response signal, this change trend is usually closely related to the type of gas, which is beneficial to the type recognition of environmental gases. And the detail signal refers to the signal containing the high-frequency information of the gas response signal, and these high-frequency information are usually closely related to the change of gas concentration. Therefore, after receiving the gas response signal fed back by the gas sensor, the server can further extract the signal from the gas response signal to obtain the envelope signal and the detail signal. So as to facilitate the subsequent signal feature fusion of the envelope signal and the detail signal, and then perform gas detection based on the feature fusion result.
[0045] In one example, the server can select an appropriate signal extraction method to obtain the envelope signal and the detail signal. The specific signal extraction method can be determined according to the actual gas detection requirements, and this embodiment does not limit this.
[0046] Step S206: Obtain the timing feature of the gas response signal, the envelope signal feature of the envelope signal, and the detail signal feature of the detail signal.
[0047] Among them, the timing feature refers to the characteristics of the gas response signal changing with time, including but not limited to the periodicity, trend, randomness and other characteristics of the gas response signal. The envelope signal feature refers to the characteristics of the envelope signal, such as the amplitude change, signal stability, peak value, etc. of the envelope signal. The detail signal feature refers to the characteristics of the detail signal, such as the time domain feature, frequency domain feature, etc. It can be understood that this embodiment does not limit the specific signal features, and the corresponding signal features can be extracted according to actual needs.
[0048] Exemplarily, after the server extracts the envelope signal and the detail signal from the gas response signal, it can extract the features of the two signals respectively to obtain the envelope signal feature and the detail signal feature. It should be noted that since the gas response signals are arranged in a certain time sequence, the gas response signals can be understood as a time series. Therefore, the time series features of the gas response signals can be extracted to obtain the features of the gas response signals in terms of time.
[0049] Optionally, the server can input the gas response signal, the envelope signal, and the detail signal into a pre-trained multi-feature fusion model, so as to extract the features of the three signals respectively through the multi-feature fusion model.
[0050] In some embodiments, the multi-feature fusion model is pre-trained based on the sample gases in each sample environment. The multi-feature fusion model can perform signal feature extraction, signal feature fusion, and gas detection based on the feature fusion result, and output the gas detection result.
[0051] Step S208: Perform feature fusion on the time series feature, the envelope signal feature, and the detail signal feature to obtain a feature fusion result.
[0052] The feature fusion result may include the features obtained after fusing the time series feature, the envelope signal feature, and the detail signal feature. Of course, in addition, the feature fusion result may also include the feature fusion duration, the feature fusion efficiency, etc.
[0053] Exemplarily, after the server extracts the time series feature, the envelope signal feature, and the detail signal feature, or after the multi-feature fusion model extracts the time series feature, the envelope signal feature, and the detail signal feature, the time series feature, the envelope signal feature, and the detail signal feature can be fused to obtain a fusion feature, which reflects the features of the ambient gas in each dimension. Thus, performing gas detection based on this fusion feature is beneficial to improving the accuracy of gas detection.
[0054] Step S210: Based on the feature fusion result, perform gas detection on the target environment to obtain the gas detection result of the target environment.
[0055] Among them, gas detection may include gas type detection and gas concentration detection. The gas detection results may include gas type detection results and gas concentration detection results. Of course, in addition, the gas detection results may also include detection duration, detection times, detection personnel, safety assessment of ambient gas, etc. The gas type refers to the type of ambient gas, such as cetone (CP, ketone), butanol (BA, butanol), butyl acetate (BAC, butyl acetate), ethanol (EA, ethanol), ethyl acetate (EAC, ethyl acetate), ethylene glycol (EG, ethylene glycol), iso butanol (IBA, isobutanol), isopropanol (IPA, isopropanol), methanol (MT, methanol), n-propanol (NPA, n-propanol), etc.
[0056] Compared with the method of identifying gas concentration based on detailed signals and identifying gas type based on response signals, gas detection of the target environment through the fusion feature between the time series feature, detailed signal feature, and envelope signal feature, that is, the feature fusion result, can avoid the isolation between features, so as to more comprehensively and accurately detect the gas concentration and gas type of ambient gas.
[0057] Exemplarily, after the server obtains the feature fusion result through the multi-feature fusion model, it can respectively perform gas type detection and gas concentration detection on the target environment based on the feature fusion result, so as to obtain the gas type and gas concentration of the ambient gas in the target environment.
[0058] In an exemplary embodiment, based on the feature fusion result, gas detection is performed on the target environment to obtain the gas detection result of the target environment, including: based on the feature fusion result, performing gas type identification on the target environment to obtain the ambient gas type of the target environment; based on the feature fusion result, performing gas concentration detection on the target environment to obtain the ambient gas concentration of the target environment; and jointly using the ambient gas type and ambient gas concentration as the gas detection result of the target environment.
[0059] Exemplarily, the fully connected layer and the Dropout layer of the model can further process the feature fusion result. The Dropout layer is a technique used to reduce overfitting in neural networks. During the training process, the Dropout layer randomly "drops out" (i.e., temporarily removes) some neurons, so that each training batch trains a different subnetwork. In this way, the model does not overly rely on certain specific features or neurons, thereby improving the generalization ability of the model. After processing, the fused features can be used to detect the gas type through the softmax function, thereby obtaining the gas type of the ambient gas. And the gas concentration can be detected through the linear regression function, thereby obtaining the gas concentration of the ambient gas.
[0060] In this embodiment, in response to a gas detection instruction for a target environment, first, gas signal detection is performed on the target environment to obtain a gas response signal of the target environment. Then, signal extraction is performed on the gas response signal to obtain an envelope signal and a detail signal. The envelope signal refers to a signal that reflects the overall change trend of the response signal, and this change trend is usually closely related to the type of gas, which is beneficial for identifying the type of ambient gas. The detail signal refers to a signal that contains high-frequency information of the gas response signal, and these high-frequency information are usually closely related to the change in gas concentration, which is beneficial for detecting the gas concentration of the ambient gas. In addition, the present application further obtains the temporal characteristics of the gas response signal. The temporal characteristics can reflect the laws and characteristics of the gas response signal changing over time, which is beneficial for improving the accuracy and reliability of gas detection. Finally, the temporal characteristics, the signal characteristics of the envelope signal, and the signal characteristics of the detail signal are fused to obtain a feature fusion result. Finally, based on the feature fusion result, gas detection is performed on the target environment to obtain a gas detection result of the target environment. Therefore, by performing multi-feature fusion on the temporal characteristics, detail signal characteristics, and envelope signal characteristics of the gas response signal, on the one hand, the signal can be analyzed from different angles, making full use of the correlation between different features, thereby obtaining a more comprehensive and accurate gas detection result and effectively improving the accuracy of gas detection. On the other hand, multi-feature fusion can reduce the feature dimension, which is beneficial for reducing the amount of calculation and storage space, thereby improving the efficiency of gas detection.
[0061] In an exemplary embodiment, as Figure 3 shown, performing signal extraction on the gas response signal to obtain an envelope signal and a detail signal includes:
[0062] Step S302, smoothing the gas response signal to obtain a smoothed signal.
[0063] Among them, the smoothing process is actually a process of reducing noise and eliminating mutations in the signal to make the signal have a smoother characteristic. It can improve the signal quality of the gas response signal, making the signal clearer and more accurate. The smoothed signal refers to the signal generated after smoothing the gas response signal.
[0064] Exemplarily, when the server extracts the signal from the gas response signal, first, it can perform signal processing on the response signal, that is, smoothing processing, to reduce the signal noise and mutations in the response signal, thereby improving the quality of the response signal and further improving the accuracy of subsequent signal extraction.
[0065] In one example, the server can use the dynamic window mean processing method to implement the smoothing processing of the gas response signal. The dynamic window mean processing is a data processing technology mainly used to calculate the average value of consecutive windows in a set of data, and the window size can be adjusted at any time according to needs to better adapt to the changes in the data. This processing method is very useful in the analysis of time series data, which can help smooth the data, reduce the influence of noise, and retain the overall trend of the data. As Figure 4 shown, a window with a fixed size (Size) slides step by step (Window Slide) on the original data (Rawdata), and the average value of the data within each window is calculated. The window slide step refers to the number of data units spanned each time the window is moved. The window size can be dynamically adjusted according to needs to adapt to different characteristics and changes of the data. In this example, the window size is set to 18. Figure 5 Figure (a) shows a schematic diagram of the smoothed signal. It can be seen that the smoothing process can retain the signal response trend and local fluctuations while ensuring that the key features of the signal are not erased due to excessive smoothing, maintaining the diversity of signal features.
[0066] Step S304: Perform a linear transformation on the smoothed signal to obtain an envelope signal.
[0067] Among them, the linear transformation refers to the operation of processing the smoothed signal using a linear transformation function, and the linear transformation function can include the Hilbert transformation function. Among them, the Hilbert transformation is an effective method for extracting the signal envelope. By performing the Hilbert transformation on the signal, the analytic signal of the signal can be obtained, and the modulus of the analytic signal is the envelope of the signal. The Hilbert transformation has the advantage of not being limited by Fourier analysis and can reflect the time-frequency diagram, amplitude diagram, and time-frequency diagram of the response signal, with good local adaptability.
[0068] Exemplarily, the server uses the Hilbert transformation to perform a linear transformation on the smoothed signal, thereby extracting the envelope signal. Figure 5(b) shows a schematic diagram of the envelope signal. It should be noted that in practical applications, other types of linear transformation functions can be selected according to the actual situation, and this embodiment does not limit this.
[0069] Step S306, obtain the signal difference information between the envelope signal and the smoothed signal, and use the signal that matches the signal difference information as the detail signal.
[0070] Among them, the signal difference information can be understood as the difference part between the envelope signal and the smoothed signal, such as high-frequency information.
[0071] Exemplarily, after extracting the envelope signal, the difference information between the envelope signal and the smoothed signal, such as high-frequency information, can be further obtained, and the signal corresponding to this information is the detail signal. Figure 5 (c) shows a schematic diagram of the detail signal.
[0072] Continue to refer to Figure 4 , after the smoothed signal undergoes the Hilbert transform, the envelope signal can be obtained, and at the same time, the detail signal can be obtained. Finally, three signals can be obtained: the smoothed signal, the envelope signal, and the detail signal. Subsequently, by performing feature extraction on the smoothed signal, the time series features can be obtained, by performing feature extraction on the envelope signal, the envelope signal features can be obtained, and by performing feature extraction on the detail signal, the detail signal features can be obtained.
[0073] In this embodiment, by performing smoothing processing on the response signal, the accuracy of the signal can be ensured, laying a foundation for subsequent signal extraction. Then, the envelope signal and the detail signal are extracted from the smoothed signal, improving the accuracy of signal extraction, thereby improving the accuracy of the entire gas detection.
[0074] In an exemplary embodiment, obtaining the time series features of the gas response signal, the envelope signal features of the envelope signal, and the detail signal features of the detail signal includes: using a multi-feature fusion model to perform feature extraction on the gas response signal according to the first convolution method to obtain the time series features of the gas response signal; using a multi-feature fusion model to perform feature extraction on the envelope signal according to the second convolution method to obtain the envelope signal features of the envelope signal; using a multi-feature fusion model to perform feature extraction on the detail signal according to the third convolution method to obtain the detail signal features of the detail signal.
[0075] Among them, the convolution kernel sizes of the first convolution method, the second convolution method, and the third convolution method are different. The first convolution method refers to the convolution method with a convolution kernel size of (1, 3, 5), the second convolution method refers to the convolution method with a convolution kernel size of (1×1, 3×3, and 5×5), and the third convolution method refers to the convolution method with a convolution kernel size of (2×2, 3×3, and 4×4). Of course, other convolution kernel sizes can also be selected according to the actual situation, and this embodiment does not limit this.
[0076] Exemplarily, as Figure 6 shown, the smooth signal is processed by a one-dimensional convolutional layer, and different-sized convolution kernels (1, 3, 5) are used to capture features of different scales, and downsampling and dimensionality reduction are performed through a max pooling layer. Subsequently, through a flattening operation (Flatten), the time series features are extracted. The envelope signal passes through a two-dimensional convolutional layer, using three different-sized convolution kernels (1×1, 3×3, and 5×5), to extract local and global features, and finally flattened to obtain envelope signal features. The detail signal also passes through a two-dimensional convolutional layer, also using three different-sized convolution kernels (2×2, 3×3, and 4×4), to extract local and global features, and finally flattened to obtain detail signal features. The features of these three parts are merged, further processed through a fully connected layer and a Dropout layer, and finally the gas type is identified through a softmax function, and the gas concentration is identified through a linear function. The unit of gas concentration is ppm (parts per million, one in a million).
[0077] In an exemplary embodiment, as Figure 7 shown, the training process of the multi-feature fusion model includes:
[0078] Step S702, based on each pulse heating method, construct a sample environment matching each pulse heating method.
[0079] Among them, pulse heating is a method of heating by using pulse current to generate Joule heat through a high-resistance material. Specifically, pulse heating is to apply a pulse current to a high-resistance material. In this embodiment, a pulse current is applied to a gas sensor. In a preferred example, the pulse heating methods include constant 1500 mV (millivolt) heating, constant 2500 mV heating, and 1500 mV heating for 3 seconds followed by 2500 mV heating for 2 seconds. In this way, the gas sensor can measure the sample response signals of different types of sample gases in different concentration ranges, such as 10 - 50 ppm (parts per million concentration). Of course, in actual applications, other pulse heating methods can also be set according to the actual situation, and this embodiment does not limit this. The sample environment is the environment corresponding to each pulse heating method. Taking constant 1500 mV heating as an example, its corresponding sample environment is the environment of the 1500 mV heating temperature.
[0080] Exemplarily, when the server trains the multi - feature fusion model, it can first construct a sample environment, which can also be understood as the application environment of the gas sensor. In this way, the gas sensor can be controlled to detect gas signals in a variety of different sample environments, improving the reliability and accuracy of gas signal detection, and thus improving the accuracy of subsequent model training based on the sample response signals obtained from gas signal detection.
[0081] In some embodiments, the training process of the multi - feature fusion model, or the experimental process of gas detection, can be carried out in a fully automatic gas - sensitive measurement system, which has functions of full - automatic control, concentration control, and environmental restoration. The full - automatic control is realized through a pre - designed workflow script and can run the experiment automatically according to the predetermined steps. There is no need for manual real - time monitoring, reducing manual intervention, and it is suitable for long - term stable monitoring and batch testing. The fully automatic gas - sensitive measurement system mainly includes a chamber, an automatic ventilation device, a solvent evaporation control system, and a gas - sensitive sensing module, and the gas - sensitive sensing module includes a gas sensor.
[0082] Step S704: Obtain the sample gas, and respectively detect the gas signal of the sample gas in each sample environment to obtain the sample response signal of the sample gas.
[0083] Among them, the training of the multi - feature fusion model requires sample response signals as training data, and the sample response signals are obtained by detecting the gas signal of the sample gas through a gas sensor. The sample gas includes any one or more of cetone (CP, ketone), butanol (BA, butyl alcohol), butyl acetate (BAC, butyl acetate), ethanol (EA, ethanol), ethyl acetate (EAC, ethyl acetate), ethylene glycol (EG, ethylene glycol), iso - butanol (IBA, isobutanol), isopropanol (IPA, isopropyl alcohol), methanol (MT, methanol), n - propanol (NPA, n - propyl alcohol), etc. The sample response signal refers to the electrical signal such as current signal and / or voltage signal output after the gas sensor completes the detection of the sample gas.
[0084] Exemplarily, in each sample environment constructed based on different pulse heating methods, the gas sensor is used to detect the gas signal, so as to obtain the response signal of the sample gas in each sample environment.
[0085] Taking ethanol (EA) gas as an example, Figure 8 shows a schematic curve diagram of the sample response signals of ethanol gas in each sample environment. Among them, Figure 8(a)Sample response signal curves of ethanol gas in sample environments with constant heating at 1500 mV and constant heating at 2500 mV, respectively. Figure 8 (b)Sample response signal curves of ethanol gas in a sample environment with heating at 1500 mV for 3 seconds and then heating at 2500 mV for 2 seconds. Figure 8 (c)shows the overall response curve of ethanol gas within two complete cycles (one cycle is 5 seconds).
[0086] Step S706: Based on each sample response signal, train the initial feature fusion model until the training stop condition is met, and obtain a multi-feature fusion model.
[0087] Among them, the initial feature fusion model is the initial state of the multi-feature fusion model, or in other words, the state before training. In one example, the initial feature fusion model can be an LSTM (Long Short-Term Memory Network) model. The training stop condition can be that the number of training iterations is equal to the preset training number threshold, or the training accuracy is greater than or equal to the preset accuracy threshold.
[0088] Exemplarily, after the server obtains each sample response signal, it can input the sample response signal into the initial feature fusion model. Each sample response signal can have corresponding smoothed signal, detailed signal, and envelope signal. According to the respective convolution methods corresponding to these three types of signals, convolve each signal. The signals after convolution processing will be merged and processed through a fully connected layer and a Dropout layer. Finally, gas type recognition is achieved through the softmax function, and gas concentration recognition is achieved through a linear function. Repeat the above process until the number of training iterations is equal to the preset training number threshold, or the training accuracy is greater than or equal to the preset accuracy threshold, and a multi-feature fusion model is obtained.
[0089] In some embodiments, after training the multi-feature fusion model, the results of the multi-feature fusion model can be compared with machine learning methods such as RF (Random Forest) and DT (Decision Tree) to verify the recognition effect of the multi-feature fusion model in this embodiment.
[0090] In this embodiment, by training the multi-feature fusion model, it is possible to perform feature fusion on each signal feature of the ambient gas. Thus, based on the feature fusion result, gas detection is performed, which can effectively improve the accuracy and efficiency of gas detection.
[0091] In an exemplary embodiment, the sample gas includes a normal sample gas and an abnormal sample gas; gas signal detection is performed on the sample gas to obtain a sample response signal of the sample gas, including: gas signal detection is performed on the normal sample gas to obtain a normal response signal of the normal sample gas; gas signal detection is performed on the abnormal sample gas to obtain an abnormal response signal of the abnormal sample gas.
[0092] It should be noted that during the long-term use of the gas sensor, a series of abnormal phenomena are often caused by the device itself, including baseline drift, data loss, sudden abnormal points, and external environmental interference. These phenomena will not only affect the measurement accuracy, especially prominent in real-time monitoring, but also greatly increase the calibration frequency and data processing complexity, thus increasing the cost and maintenance difficulty. Therefore, in this embodiment, gas samples under various abnormal phenomena will be generated as abnormal sample gases and used for model training together with the normal sample gas.
[0093] Figure 9 Schematic diagrams of four abnormal samples are shown. From top to bottom, they are: drift sample, missing sample, outlier sample, and environmental interference sample. Among them, the drift sample can be generated by adding a resistance drift of random size to the normal sample. The missing sample can be randomly setting some signal data to the empty type. The outlier sample can be generated by randomly generating extreme signal values (each dot in the figure). The environmental interference sample can be generated by adding a sine signal interference to the normal sample to simulate the cross-sensitivity phenomenon between different gases.
[0094] Exemplarily, abnormal sample gases under various abnormal phenomena are constructed, gas signal detection is performed on the normal sample gas to obtain a normal response signal of the normal sample gas. Gas signal detection is performed on the abnormal sample gas to obtain an abnormal response signal of the abnormal sample gas. The normal response signal and the abnormal response signal can be used as input data during model training in different proportions.
[0095] In this embodiment, by generating abnormal sample gases, various abnormal phenomena that may occur in complex actual scenarios of the gas sensor can be effectively simulated, providing rich and diverse data support for model training and verification, and further improving the accuracy of the multi-feature fusion model.
[0096] In a specific embodiment, the gas sensor selected is the gas sensor GM-512 (odor gas sensor). The gas detection method is applied in an electronic nose system for collecting the response gas data of MEMS sensors. The main on-board control part includes a single-chip microcomputer, a wireless communication module, and a lithium battery power supply. Among them, the main control chip (MCU) selects the single-chip microcomputer of the STM32F103 model with a 32-bit ARM Cortex-M3 core from STMicroelectronics, and uses its on-chip ADC peripheral for data acquisition. The LoRa radio frequency module is used for data transmission, and the frequency is selected as 433 MHz (megahertz), which can achieve reliable long-distance communication at low data rates, and the power consumption is as low as 10 mW (milliwatt), which can be used for remote control and IoT devices. During the experiment, wireless duplex communication with a computer is carried out through a dedicated transceiver to achieve real-time data transmission. The lithium battery module directly installed on the circuit board is used to provide power support for the on-board system. The power supply of the lithium battery is usually more stable, reducing the impact of external power fluctuations on the system. The entire electronic nose has a miniature size of 50 mm×30 mm and can be used in embedded systems and portable devices with high space requirements. The heating drive circuit for the MEMS gas sensor mainly includes three parts: First, a duty cycle adjustment circuit is adopted, and the main control chip outputs a PWM square wave signal to adjust the duty cycle to control the heating power. Second, the PWM signal is converted into a DC level through a low-pass filter. Finally, the current drive ability is amplified through an emitter follower circuit to achieve stable drive. Finally, the heating drive MEMS gas sensor of the entire system can achieve a maximum current of 50 mA (milliampere), and the heater drive voltage range can be adjusted from 0 to 2.5 V (volt).
[0097] Specifically, the server, that is, the main control chip, first constructs a multi-feature fusion model. During the construction process, sample environments at different temperatures will be constructed based on heating at a constant 1500 mV (millivolt), heating at a constant 2500 mV, and heating at 1500 mV for 3 seconds and then heating at 2500 mV for 2 seconds. And abnormal sample gases (drift samples, missing samples, outlier samples, and environmental interference samples) under various abnormal phenomena are generated. Together with the normal sample gases, they are used as input data during model training. In actual application, the main control chip responds to the gas detection instruction for the target environment, and detects the gas signal of the target environment through a single gas sensor GM-512 to obtain the gas response signal of the target environment. The gas response signal is smoothed to obtain a smoothed signal, and the Hilbert transform is performed on the smoothed signal to obtain an envelope signal. The signal corresponding to the signal difference information between the envelope signal and the smoothed signal is obtained as the detail signal.
[0098] The smoothed signal, detail signal, and envelope signal are input into the multi-feature fusion model. The smoothed signal is processed by a one-dimensional convolutional layer, using convolutional kernels of different sizes (1, 3, 5) to capture features at different scales, and is downsampled and dimension-reduced through a max pooling layer. Subsequently, after a flattening operation, the temporal features are extracted. The envelope signal passes through a two-dimensional convolutional layer, using three different sizes of convolutional kernels (1×1, 3×3, and 5×5) to extract local and global features, and finally is flattened to obtain the envelope signal features. The detail signal also passes through a two-dimensional convolutional layer, using three different sizes of convolutional kernels (2×2, 3×3, and 4×4) to extract local and global features, and finally is flattened to obtain the detail signal features. The features of these three parts are merged and further processed through a fully connected layer and a Dropout layer. Finally, the gas type is identified through a softmax function, and the gas concentration is identified through a linear function.
[0099] In the 5-fold cross-validation, the experimental results show that among the three heating modes, the combination of pulse temperature modulation and the proposed feature fusion method has the best gas recognition effect, with a classification accuracy rate of 99.19% and a concentration detection accuracy rate of 94.08%. In addition, the power consumption of the pulse heating mode based on a single gas sensor is as low as 24 mW, while the power consumption of the constant 2500 mV heating mode is 48 mW, and the power consumption of the constant 1500 mV heating mode is 36 mW, demonstrating the advantages of high efficiency and low power consumption of pulse heating. Additionally, under the pulse heating mode, through multi-feature fusion, the gas can still be recognized with an accuracy rate of 96.60% under various abnormal interferences (drift, missing values, outliers, and environmental interference), indicating the anti-interference performance of this method. Finally, the gas recognition performance of this embodiment is compared with other traditional machine learning methods including RF and DT, and the method proposed in this embodiment is superior to the performance of other machine learning methods.
[0100] In this embodiment, in response to a gas detection instruction for a target environment, the gas signal in the target environment is first detected to obtain the gas response signal of the target environment. Then, signal extraction is performed on the gas response signal to obtain an envelope signal and a detail signal. The envelope signal refers to a signal that reflects the overall change trend of the response signal, and this change trend is usually closely related to the type of gas, which is beneficial to the type identification of environmental gases. The detail signal refers to a signal that contains high-frequency information of the gas response signal, and these high-frequency information are usually closely related to the concentration change of the gas, which is beneficial to the concentration detection of environmental gases. In addition, the present application further obtains the timing characteristics of the gas response signal. The timing characteristics can reflect the laws and characteristics of the gas response signal changing with time, which is beneficial to improving the accuracy and reliability of gas detection. Finally, the timing characteristics, the signal characteristics of the envelope signal, and the signal characteristics of the detail signal are fused to obtain a feature fusion result. Finally, based on the feature fusion result, gas detection is performed on the target environment to obtain the gas detection result of the target environment. Therefore, by performing multi-feature fusion on the timing characteristics, detail signal characteristics, and envelope signal characteristics of the gas response signal, the present application can, on the one hand, analyze the signal from different angles, make full use of the correlation between different features, and thus obtain a more comprehensive and accurate gas detection result, effectively improving the accuracy of gas detection. On the other hand, multi-feature fusion can reduce the feature dimension, which is beneficial to reducing the amount of calculation and storage space, and thus improving the efficiency of gas detection.
[0101] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0102] Based on the same inventive concept, the embodiment of the present application also provides a gas detection device for implementing the gas detection method involved above. The solution provided by this device to solve the problem is similar to the solution recorded in the above method. Therefore, the specific limitations in one or more embodiments of the gas detection device provided below can refer to the limitations on the gas detection method in the above text, and will not be repeated here.
[0103] In an exemplary embodiment, as Figure 10As shown in the figure, a gas detection device is provided, including: a signal acquisition module 1002, configured to detect a gas signal in a target environment in response to a gas detection instruction for the target environment, so as to obtain a gas response signal of the target environment; a signal extraction module 1004, configured to extract signals from the gas response signal to obtain an envelope signal and a detail signal; the envelope signal refers to a signal reflecting the overall change trend of the gas response signal; the detail signal refers to a signal containing high-frequency information of the gas response signal; a signal feature acquisition module 1006, configured to acquire the timing feature of the gas response signal, the envelope signal feature of the envelope signal, and the detail signal feature of the detail signal; a feature fusion module 1008, configured to perform feature fusion on the timing feature, the envelope signal feature, and the detail signal feature to obtain a feature fusion result; a gas detection module 1010, configured to perform gas detection on the target environment based on the feature fusion result to obtain a gas detection result of the target environment.
[0104] In one embodiment, the signal extraction module 1404 is further configured to: perform smoothing processing on the gas response signal to obtain a smoothed signal; perform linear transformation on the smoothed signal to obtain an envelope signal; obtain signal difference information between the envelope signal and the smoothed signal, and use the signal matching the signal difference information as the detail signal.
[0105] In one embodiment, the signal feature acquisition module 1006 is further configured to: extract features from the gas response signal in a first convolution manner through a multi-feature fusion model to obtain the timing feature of the gas response signal; extract features from the envelope signal in a second convolution manner through the multi-feature fusion model to obtain the envelope signal feature of the envelope signal; extract features from the detail signal in a third convolution manner through the multi-feature fusion model to obtain the detail signal feature of the detail signal.
[0106] In one embodiment, the gas detection module 1010: identifies the gas type of the target environment based on the feature fusion result to obtain the environmental gas type of the target environment; detects the gas concentration of the target environment based on the feature fusion result to obtain the environmental gas concentration of the target environment; uses the environmental gas type and the environmental gas concentration together as the gas detection result of the target environment.
[0107] In one embodiment, the device is further configured to: construct a sample environment matching each pulse heating method based on each pulse heating method; obtain a sample gas, and detect the gas signal of the sample gas in each sample environment respectively to obtain a sample response signal of the sample gas; perform model training on an initial feature fusion model based on each sample response signal until a training stop condition is met to obtain a multi-feature fusion model.
[0108] In one embodiment, the sample gas includes a normal sample gas and an abnormal sample gas, and the device is further configured to: detect a gas signal of the normal sample gas to obtain a normal response signal of the normal sample gas; detect a gas signal of the abnormal sample gas to obtain an abnormal response signal of the abnormal sample gas.
[0109] Each module in the above gas detection device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0110] In an exemplary embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 11 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, 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. Among them, 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 database of the computer device is used to store gas detection data. The input / output interface of the computer device is used to exchange information between the processor and external devices. 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, it implements a gas detection method.
[0111] Those skilled in the art can understand that Figure 11 the structure shown in
[0112] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented: in response to a gas detection instruction for a target environment, detecting a gas signal in the target environment to obtain a gas response signal of the target environment; extracting a signal from the gas response signal to obtain an envelope signal and a detail signal; the envelope signal refers to a signal reflecting the overall change trend of the gas response signal; the detail signal refers to a signal containing high-frequency information of the gas response signal; obtaining a timing feature of the gas response signal, an envelope signal feature of the envelope signal, and a detail signal feature of the detail signal; performing feature fusion on the timing feature, the envelope signal feature, and the detail signal feature to obtain a feature fusion result; based on the feature fusion result, performing gas detection on the target environment to obtain a gas detection result of the target environment.
[0113] In an embodiment, when the processor executes the computer program, the following steps are further implemented: performing smoothing processing on the gas response signal to obtain a smoothed signal; performing a linear transformation on the smoothed signal to obtain an envelope signal; obtaining signal difference information between the envelope signal and the smoothed signal, and using the signal matching the signal difference information as the detail signal.
[0114] In an embodiment, when the processor executes the computer program, the following steps are further implemented: extracting a feature of the gas response signal by a multi-feature fusion model according to a first convolution method to obtain a timing feature of the gas response signal; extracting a feature of the envelope signal by the multi-feature fusion model according to a second convolution method to obtain an envelope signal feature of the envelope signal; extracting a feature of the detail signal by the multi-feature fusion model according to a third convolution method to obtain a detail signal feature of the detail signal.
[0115] In an embodiment, when the processor executes the computer program, the following steps are further implemented: based on the feature fusion result, identifying a gas type in the target environment to obtain an environmental gas type of the target environment; based on the feature fusion result, detecting a gas concentration in the target environment to obtain an environmental gas concentration of the target environment; jointly using the environmental gas type and the environmental gas concentration as the gas detection result of the target environment.
[0116] In an embodiment, when the processor executes the computer program, the following steps are further implemented: based on each pulse heating method, constructing a sample environment matching each pulse heating method; obtaining a sample gas, and respectively detecting a gas signal of the sample gas in each sample environment to obtain a sample response signal of the sample gas; based on each sample response signal, training an initial feature fusion model until a training stop condition is met to obtain a multi-feature fusion model.
[0117] In one embodiment, when the processor executes the computer program, the following steps are further implemented: detecting a gas signal of a normal sample gas to obtain a normal response signal of the normal sample gas; detecting a gas signal of an abnormal sample gas to obtain an abnormal response signal of the abnormal sample gas.
[0118] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: in response to a gas detection instruction for a target environment, detecting a gas signal of the target environment to obtain a gas response signal of the target environment; extracting a signal from the gas response signal to obtain an envelope signal and a detail signal; the envelope signal refers to a signal reflecting the overall change trend of the gas response signal; the detail signal refers to a signal containing high-frequency information of the gas response signal; obtaining a timing feature of the gas response signal, an envelope signal feature of the envelope signal, and a detail signal feature of the detail signal; performing feature fusion on the timing feature, the envelope signal feature, and the detail signal feature to obtain a feature fusion result; based on the feature fusion result, performing gas detection on the target environment to obtain a gas detection result of the target environment.
[0119] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: performing smoothing processing on the gas response signal to obtain a smoothed signal; performing a linear transformation on the smoothed signal to obtain an envelope signal; obtaining signal difference information between the envelope signal and the smoothed signal, and using a signal matching the signal difference information as the detail signal.
[0120] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: extracting features of the gas response signal in a first convolution manner through a multi-feature fusion model to obtain a timing feature of the gas response signal; extracting features of the envelope signal in a second convolution manner through the multi-feature fusion model to obtain an envelope signal feature of the envelope signal; extracting features of the detail signal in a third convolution manner through the multi-feature fusion model to obtain a detail signal feature of the detail signal.
[0121] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: based on the feature fusion result, identifying the gas type of the target environment to obtain the environmental gas type of the target environment; based on the feature fusion result, detecting the gas concentration of the target environment to obtain the environmental gas concentration of the target environment; jointly using the environmental gas type and the environmental gas concentration as the gas detection result of the target environment.
[0122] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: based on each pulse heating method, construct a sample environment matching each pulse heating method; obtain a sample gas, and respectively detect a gas signal of the sample gas in each sample environment to obtain a sample response signal of the sample gas; based on each sample response signal, train an initial feature fusion model until a training stop condition is satisfied to obtain a multi-feature fusion model.
[0123] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: detect a gas signal of a normal sample gas to obtain a normal response signal of the normal sample gas; detect a gas signal of an abnormal sample gas to obtain an abnormal response signal of the abnormal sample gas.
[0124] In one embodiment, a computer program product is provided, including a computer program, which when executed by a processor, implements the following steps: in response to a gas detection instruction for a target environment, detect a gas signal of the target environment to obtain a gas response signal of the target environment; extract signals from the gas response signal to obtain an envelope signal and a detail signal; the envelope signal refers to a signal reflecting the overall change trend of the gas response signal; the detail signal refers to a signal containing high-frequency information of the gas response signal; obtain the timing feature of the gas response signal, the envelope signal feature of the envelope signal, and the detail signal feature of the detail signal; perform feature fusion on the timing feature, the envelope signal feature, and the detail signal feature to obtain a feature fusion result; based on the feature fusion result, perform gas detection on the target environment to obtain a gas detection result of the target environment.
[0125] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: perform smoothing processing on the gas response signal to obtain a smoothed signal; perform a linear transformation on the smoothed signal to obtain an envelope signal; obtain signal difference information between the envelope signal and the smoothed signal, and use the signal matching the signal difference information as the detail signal.
[0126] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: through the multi-feature fusion model, extract features of the gas response signal in accordance with a first convolution method to obtain the timing feature of the gas response signal; through the multi-feature fusion model, extract features of the envelope signal in accordance with a second convolution method to obtain the envelope signal feature of the envelope signal; through the multi-feature fusion model, extract features of the detail signal in accordance with a third convolution method to obtain the detail signal feature of the detail signal.
[0127] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: based on the feature fusion result, perform gas type identification on the target environment to obtain the environmental gas type of the target environment; based on the feature fusion result, perform gas concentration detection on the target environment to obtain the environmental gas concentration of the target environment; use the environmental gas type and the environmental gas concentration together as the gas detection result of the target environment.
[0128] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: based on each pulse heating method, construct a sample environment matching each pulse heating method; obtain a sample gas, and respectively perform gas signal detection on the sample gas in each sample environment to obtain the sample response signal of the sample gas; based on each sample response signal, perform model training on the initial feature fusion model until the training stop condition is met to obtain a multi-feature fusion model.
[0129] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: perform gas signal detection on a normal sample gas to obtain the normal response signal of the normal sample gas; perform gas signal detection on an abnormal sample gas to obtain the abnormal response signal of the abnormal sample gas.
[0130] 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 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 need to comply with relevant regulations.
[0131] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. 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 methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.
[0132] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered to be within the scope recorded in the present application.
[0133] The above embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A gas detection method, characterized in that: The method comprises: In response to a gas detection instruction for a target environment, performing gas signal detection on the target environment to obtain a gas response signal of the target environment; Performing signal extraction on the gas response signal to obtain an envelope signal and a detail signal; the envelope signal refers to a signal reflecting the overall change trend of the gas response signal; the detail signal refers to a signal containing high-frequency information of the gas response signal; Acquire the timing characteristics of the gas response signal, the envelope signal characteristics of the envelope signal, and the detail signal characteristics of the detail signal; Performing feature fusion on the time series feature, the envelope signal feature and the detail signal feature to obtain a feature fusion result; Based on the feature fusion result, gas detection is performed on the target environment to obtain a gas detection result of the target environment.
2. The method according to claim 1, characterized in that The step of extracting the gas response signal to obtain an envelope signal and a detail signal includes: Smoothing the gas response signal to obtain a smoothed signal; Performing linear transformation on the smoothed signal to obtain an envelope signal; Signal difference information between the envelope signal and the smoothed signal is obtained, and a signal matching the signal difference information is used as a detail signal.
3. The method according to claim 1, characterized in that The acquiring the timing characteristics of the gas response signal, the envelope signal characteristics of the envelope signal, and the detail signal characteristics of the detail signal comprises: By using a multi-feature fusion model, according to a first convolution method, feature extraction is performed on the gas response signal to obtain a time series feature of the gas response signal; By using a multi-feature fusion model, according to a second convolution method, feature extraction is performed on the envelope signal to obtain envelope signal features of the envelope signal; Through the multi-feature fusion model, according to the third convolution method, feature extraction is performed on the detail signal to obtain the detail signal feature of the detail signal.
4. The method according to claim 1, characterized in that: The step of performing gas detection on the target environment based on the feature fusion result to obtain the gas detection result of the target environment includes: Based on the feature fusion result, the gas type of the target environment is identified to obtain the ambient gas type of the target environment; Based on the feature fusion result, performing gas concentration detection on the target environment to obtain the ambient gas concentration of the target environment; The ambient gas type and the ambient gas concentration are taken together as the gas detection result of the target environment.
5. The method according to claim 3, characterized in that: The training process of the multi-feature fusion model includes: Based on each pulse heating method, constructing a sample environment matching each of the pulse heating methods; Acquire sample gas, and perform gas signal detection on the sample gas in each sample environment to obtain a sample response signal of the sample gas; Based on each of the sample response signals, the initial feature fusion model is trained until a training stop condition is met to obtain a multi-feature fusion model.
6. The method according to claim 5, characterized in that The sample gas includes a normal sample gas and an abnormal sample gas; the gas signal detection of the sample gas to obtain a sample response signal of the sample gas includes: Performing gas signal detection on the normal sample gas to obtain a normal response signal of the normal sample gas; Gas signal detection is performed on the abnormal sample gas to obtain an abnormal response signal of the abnormal sample gas.
7. A gas detection device, characterized in that: The device comprises: A signal acquisition module, configured to detect a gas signal of a target environment in response to a gas detection instruction for the target environment, and obtain a gas response signal of the target environment; A signal extraction module, used to extract the gas response signal to obtain an envelope signal and a detail signal; the envelope signal refers to a signal reflecting the overall change trend of the gas response signal; the detail signal refers to a signal containing high-frequency information of the gas response signal; A signal feature acquisition module, used to acquire the timing feature of the gas response signal, the envelope signal feature of the envelope signal, and the detail signal feature of the detail signal; A feature fusion module, used for fusing the time series feature, the envelope signal feature and the detail signal feature to obtain a feature fusion result; The gas detection module is used to perform gas detection on the target environment based on the feature fusion result to obtain the gas detection result of the target environment.
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 having a computer program stored thereon, 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
Negative ion concentration detection method, device and equipment and storage medium
CN118243737A
Prediction method and device, computer equipment, readable storage medium and program product
CN118425435A
Gas detection method and device, computer equipment, readable storage medium and product
CN119044417A
Power load prediction method and device, computer equipment, readable storage medium and program product
CN119046877A