Gas concentration detection method, device and system, model training method and device

By heating the gas sensor on an FPGA development board and using a deep learning model for signal processing, the problem of low flexibility in existing gas concentration detection methods is solved, achieving efficient and accurate gas concentration detection.

CN116429835BActive Publication Date: 2026-03-24SOUTHERN UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-12
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing gas concentration detection methods are inflexible and difficult to adapt to the detection needs of different gas concentrations and types.

Method used

A gas concentration detection device based on an FPGA development board is used. It generates an analog signal by heating a gas sensor, and then uses a deep learning model to perform digital conversion and calculation on the signal to achieve gas concentration detection.

Benefits of technology

It improves the flexibility and accuracy of gas concentration detection, reduces power consumption in the detection process, and enables real-time gas concentration detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116429835B_ABST
    Figure CN116429835B_ABST
Patent Text Reader

Abstract

The application relates to a gas concentration detection method and device, a system, a model training method and device. The gas concentration detection method is applied to a gas concentration detection device based on an FPGA development board, and comprises the following steps: heating a gas-sensitive sensor located in a sealed cavity, so that the gas-sensitive sensor generates a first detection signal in the form of an analog signal, and the sealed cavity is ventilated with a to-be-detected gas; converting the first detection signal in the form of the analog signal into a second detection signal in the form of a digital signal; and performing operation on the second detection signal according to a deep learning model in the gas concentration detection device to obtain a concentration detection result of the to-be-detected gas in the sealed cavity. The gas concentration detection method can realize real-time gas concentration detection of the to-be-detected gas through the deep learning model stored in the gas concentration detection device based on the FPGA development board. Compared with the prior art, the detection process does not require a computer device, and the flexibility of the gas concentration detection can be improved while the detection accuracy is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of gas concentration detection technology, and in particular to a gas concentration detection method and apparatus, system, and model training method and apparatus. Background Technology

[0002] With the development of gas concentration detection technology, more and more detection technologies have emerged.

[0003] In existing technologies, the method for detecting gas concentration involves electrically heating a gas sensor. Once the temperature reaches the optimal operating temperature of the gas-sensitive material coated on the sensor, the voltage data output by the sensor is collected. A computer then determines the concentration of the gas being measured based on this voltage data. However, this method suffers from low detection flexibility. Summary of the Invention

[0004] Therefore, it is necessary to provide a gas concentration detection method, device, system, and model training method and device that can improve the flexibility of gas concentration detection in response to the above-mentioned technical problems.

[0005] In a first aspect, this application provides a gas concentration detection method, applied to a gas concentration detection device based on an FPGA development board; the method includes:

[0006] The gas sensor located in the sealed cavity is heated to generate a first detection signal in the form of an analog signal, and the gas to be measured is introduced into the sealed cavity.

[0007] The first detection signal is converted into a second detection signal in digital form;

[0008] The second detection signal is processed by the deep learning model in the gas concentration detection device to obtain the concentration detection result of the gas to be tested in the sealed cavity.

[0009] In one embodiment, heating the gas sensor includes:

[0010] A pulse voltage is used to drive the heating electrode in the gas sensor to heat the gas-sensitive material in the gas sensor.

[0011] In one embodiment, the pulse period of the pulse voltage is 8s to 10s, and the duration of the pulse in each pulse period is 1s to 3s.

[0012] In one embodiment, before processing the second detection signal based on the deep learning model in the gas concentration detection device to obtain the concentration detection result of the gas to be tested in the sealed cavity, the method further includes a step of acquiring the deep learning model, including:

[0013] Receive parameter information of the deep learning model sent by the model training device;

[0014] The calculation circuit is obtained based on the parameter information;

[0015] The deep learning model is obtained based on the computing circuit.

[0016] In one embodiment, the deep learning model is a BP neural network model.

[0017] Secondly, this application also provides a model training method for constructing a deep learning model in the gas concentration detection method described in the above embodiments, the method comprising:

[0018] The gas concentration detection device acquires second detection signals corresponding to the gas to be tested at multiple concentrations in the sealed cavity at a preset period to form multiple first signal arrays.

[0019] One-hot encoding is used to transform the one-dimensional first signal array to obtain a multi-dimensional second signal array;

[0020] The second signal array is trained using the ReLU function to construct the deep learning model, and the parameter information of the deep learning model is sent to the gas concentration detection device.

[0021] Thirdly, this application also provides a gas concentration detection device. The gas concentration detection device is a gas concentration detection device based on an FPGA development board, and the device includes:

[0022] A heating module is used to heat a gas sensor located in a sealed cavity, so that the gas sensor generates a first detection signal in the form of an analog signal, and the gas to be measured is introduced into the sealed cavity;

[0023] The signal receiving module is used to convert the first detection signal in analog form into a second detection signal in digital form;

[0024] The data analysis module is used to perform calculations on the second detection signal based on the deep learning model in the gas concentration detection device to obtain the concentration detection result of the gas to be tested in the sealed cavity.

[0025] Fourthly, this application also provides a model training apparatus. The apparatus includes:

[0026] The data acquisition module is used to acquire the second detection signals corresponding to the gas to be tested at multiple concentrations in the sealed cavity collected by the gas concentration detection device at a preset period, so as to form multiple first signal arrays.

[0027] An array conversion module is used to convert a one-dimensional first signal array using one-hot encoding to obtain a multi-dimensional second signal array;

[0028] The model training module is used to train the second signal array based on the ReLU function to build a deep learning model, and send the parameter information of the deep learning model to the gas concentration detection device.

[0029] Fifthly, this application also provides a gas concentration detection system, the system comprising:

[0030] A gas concentration detection device is used to perform the steps of the gas concentration detection method described in the above embodiments;

[0031] A gas-sensitive sensor, connected to the gas concentration detection device, is used to generate a corresponding first detection signal based on the heating of the gas concentration detection device and the different concentrations of the gas to be measured.

[0032] In one embodiment, the system further includes:

[0033] A model training device, connected to the gas concentration detection device, is used to construct the deep learning model of the gas concentration detection device and send the parameter information of the deep learning model to the gas concentration detection device.

[0034] The aforementioned gas concentration detection method, apparatus, system, and model training method and apparatus are applied to a gas concentration detection device based on an FPGA development board. The method includes heating a gas sensor located in a sealed cavity to generate a first detection signal in analog form; introducing a gas to be measured into the sealed cavity; converting the first detection signal in analog form into a second detection signal in digital form; and performing calculations on the second detection signal using a deep learning model in the gas concentration detection device to obtain the concentration detection result of the gas to be measured in the sealed cavity. This gas concentration detection method can perform real-time gas concentration detection using a deep learning model stored in the FPGA-based gas concentration detection device. Compared to existing technologies, the detection process does not require computer equipment, thus improving the flexibility of gas concentration detection while ensuring detection accuracy. Attached Figure Description

[0035] Figure 1 This is a flowchart illustrating a gas concentration detection method in one embodiment;

[0036] Figure 2 This is one of the structural block diagrams of a gas concentration detection device in one embodiment;

[0037] Figure 3 This is a flowchart illustrating the process of obtaining a deep learning model in one embodiment;

[0038] Figure 4 This is a flowchart illustrating a model training method in one embodiment;

[0039] Figure 5 This is a second structural block diagram of a gas concentration detection device in one embodiment;

[0040] Figure 6 This is a structural block diagram of a model training device in one embodiment;

[0041] Figure 7 This is an internal structural diagram of a computer device in one embodiment;

[0042] Figure 8 This is a structural block diagram of a gas concentration detection system in one embodiment. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0044] In one embodiment, such as Figure 1 The flowchart shown illustrates a gas concentration detection method that can be applied to a gas concentration detection device based on an FPGA development board. The gas concentration detection method includes the following steps 102 to 106:

[0045] Step 102: The gas sensor located in the sealed cavity is heated so that the gas sensor generates a first detection signal in the form of an analog signal, and the gas to be measured is introduced into the sealed cavity.

[0046] The FPGA development board can be a PYNQ-Z2 development board, which can be used to drive a pulse heating circuit in a sealed cavity to heat the gas sensor. Optionally, as follows... Figure 2The diagram shows one of the structural block diagrams of a gas concentration detection device. The gas concentration detection device 200 may include a data acquisition circuit 210 and a pulse heating circuit 220. The data acquisition circuit 210 is connected to the pulse heating circuit 220 and is used to acquire the voltage signal (i.e., the first detection signal) output by the gas sensor 230 obtained by the pulse heating circuit 220, and convert the voltage signal into a concentration detection value (i.e., the second detection signal) corresponding to the voltage value. The gas sensor 230 is located inside a sealed cavity 240, into which the gas to be measured is introduced. It is understood that, in order to enable the gas concentration detection device 200 to perform gas concentration detection more flexibly, both the data acquisition circuit 210 and the pulse heating circuit 220 can be circuits designed based on an FPGA development board.

[0047] The gas sensor is used to detect gas concentration and composition. The gas sensor can convert the gas type and its concentration-related information into an electrical signal in the form of an analog signal (i.e., the first detection signal in this application). Based on the strength of these electrical signals, information related to the presence of the gas to be tested in the environment can be obtained, thereby enabling detection, monitoring, and alarm.

[0048] The gas to be tested can be a VOC (volatile organic compounds) gas.

[0049] Step 104: Convert the first detection signal into a second detection signal in digital form.

[0050] Specifically, for example, a voltage signal in analog form can be converted into a concentration detection value in digital form corresponding to the voltage signal.

[0051] Step 106: Calculate the second detection signal based on the deep learning model in the gas concentration detection device to obtain the concentration detection result of the gas to be tested in the sealed cavity.

[0052] The deep learning model is ported from other devices capable of model training by the gas concentration detection device based on the FPGA development board. It can be stored in the gas concentration detection device, enabling repeated and flexible application of the deep learning model.

[0053] Specifically, the deep learning model consists of six computational layers: an input layer, a flattening layer, three fully connected layers, and an output layer. The deep learning model encompasses all computational processes involved in model training, enabling data conversion and flattening of the acquired second detection signal to obtain accurate concentration detection results for the gas being tested.

[0054] The aforementioned gas concentration detection method is applied to a gas concentration detection device based on an FPGA development board. It includes heating a gas sensor located in a sealed cavity to generate a first detection signal in analog form, and introducing the gas to be measured into the sealed cavity; converting the first detection signal in analog form into a second detection signal in digital form; and performing calculations on the second detection signal using a deep learning model in the gas concentration detection device to obtain the concentration detection result of the gas to be measured in the sealed cavity. It is understood that the gas concentration detection method can perform real-time gas concentration detection using a deep learning model pre-stored in the FPGA-based gas concentration detection device. Compared to existing technologies, the detection process does not require computer equipment, thus improving the flexibility of gas concentration detection while ensuring detection accuracy.

[0055] In one embodiment, heating the gas sensor includes driving the heating electrode in the gas sensor with a pulse voltage to heat the gas-sensitive material in the gas sensor.

[0056] In this embodiment, the gas concentration detection device based on the FPGA development board outputs a pulse voltage to drive the heating motor in the gas sensor to heat the gas-sensitive material in the gas sensor. Compared with the DC heating used in the prior art, this can greatly reduce losses.

[0057] In one embodiment, the pulse period of the pulse voltage is 8s to 12s, and the duration of the pulse in each pulse period is 1s to 3s.

[0058] The pulse period can be 10s, and the pulse duration can be 2s.

[0059] In this embodiment, the pulse period is related to the stability of the gas sensor and the efficiency of acquiring the first detection signal. A pulse period that is too short will lead to instability of the gas sensor, while a pulse period that is too long will reduce the efficiency of acquiring the first detection signal (one period represents a set of first detection signal data). The pulse duration is related to the number of first detection signals acquired in one pulse period and the power consumption. A duration that is too short will result in too few first detection signals in a set of first detection signal data, while a duration that is too long tends towards DC heating, increasing power consumption. Specifically, in this embodiment, the pulse voltage can be 3V to 3.5V, preferably 3.2V. A pulse voltage that is too low will result in insufficient change in the gas sensor's response to different concentrations of the target gas, while a pulse voltage that is too high will easily damage the gas sensor. The settings for the pulse period, the duration of the pulse in each pulse period, and the pulse voltage magnitude are determined based on multiple experiments, enabling the detection of the concentration of the target gas with maximum efficiency.

[0060] In one embodiment, such as Figure 3 The flowchart shown illustrates the process of acquiring a deep learning model. Before calculating the second detection signal based on the deep learning model in the gas concentration detection device to obtain the concentration detection result of the gas to be tested in the sealed cavity, the process also includes the step of acquiring a deep learning model, including the following steps 302 to 306:

[0061] Step 302: Receive parameter information of the deep learning model sent by the model training device.

[0062] The model training device can be any computer device capable of model training.

[0063] The parameter information includes the structural information of the deep learning model, specifically the weights and biases of each neuron, which exist in the form of a matrix.

[0064] Step 304: Obtain the calculation circuit based on the parameter information.

[0065] Specifically, the gas concentration detection device based on the FPGA development board, according to the parameter information of the received deep learning model, since these parameter information are the weights and biases of multiple neurons in the form of a matrix, can be designed by compiling and using the same computational circuit as the deep learning model structure.

[0066] Step 306: Obtain a deep learning model based on the computing circuit.

[0067] Specifically, the computing circuitry is packaged into an IP core (Semiconductor intellectual property core), which refers to a mature design of a circuit module with independent functions within a chip. This IP core can be stored in the memory of the gas concentration detection device, thus enabling the device to use the deep learning model at any time, improving the flexibility of gas concentration detection.

[0068] In this embodiment, the gas concentration detection device receives parameter information of the deep learning model sent by the model training device, encodes the parameter information, and encapsulates the encoded computing circuit to obtain the deep learning model. Therefore, the computing device can use the deep learning model independently without relying on the model training device, and can more flexibly complete the concentration detection of the gas to be tested.

[0069] In one embodiment, the deep learning model is a BP neural network model.

[0070] In this embodiment, the BP neural network (Backpropagation Neural Network) model has strong nonlinear mapping capabilities, enabling it to accurately obtain concentration detection results based on the acquired first detection signal, thereby improving the accuracy of the final gas concentration detection. Simultaneously, the BP neural network model possesses high self-learning and adaptive capabilities, enhancing the flexibility in detecting different concentrations and types of gaseous substances.

[0071] In one embodiment, such as Figure 4 The flowchart of the model training method is shown; the above model training method includes the following steps 402 to 406:

[0072] Step 402: Acquire the second detection signals corresponding to the gas to be tested at multiple concentrations in the sealed cavity collected by the gas concentration detection device at a preset cycle, so as to form multiple first signal arrays.

[0073] Specifically, VOC gas (which can be ethanol gas) is configured using a gas concentration configuration machine to achieve concentrations of 10 ppm, 20 ppm, 30 ppm, 40 ppm, 50 ppm, 60 ppm, 70 ppm, 80 ppm, 90 ppm, and 100 ppm, with each concentration of VOC gas continuously introduced for 1 hour. A first detection signal (voltage value signal) is collected through the analog signal interface on the gas concentration detection device, with a sampling rate of 50 Hz.

[0074] Step 404: Use one-hot encoding to transform the one-dimensional first signal array to obtain a multi-dimensional second signal array.

[0075] The one-hot encoding, also known as one-bit valid encoding, can use an N-bit state register to encode N states. Each state has its own independent register bit, and at any given time, only one bit is valid (N is a positive integer).

[0076] Specifically, one-hot encoding can convert a 1×100 one-dimensional signal array into a 100×100 multi-dimensional second signal array. One-hot encoding eliminates the need to convert voltage values ​​to impedance, allowing deep learning models built upon this second signal array to obtain more accurate concentration detection results.

[0077] Step 402: Train the second signal array based on the ReLU function to build a deep learning model, and send the parameter information of the deep learning model to the gas concentration detection device based on the FPGA development board.

[0078] Specifically, the deep learning model comprises six layers. The first layer is the input layer, with an input signal array of size 100×100. The second layer is a flattening layer, which converts the multidimensional second signal array into a one-dimensional signal array, with an input signal array of size 100×100. The third layer is a fully connected layer, with 50 neurons due to the flattening operation, an input signal array of size 1×10000, and a ReLU activation function. The fourth layer is a fully connected layer with 20 neurons, an input signal array of size 1×50, and a ReLU activation function. The fifth layer is a fully connected layer with 5 neurons, an input signal array of size 1×20, and a ReLU activation function. The last layer is the output layer, with an input signal array of size 1×5 and an output signal array of size 1×1. To reduce overfitting, a Dropout node, set to 50%, is added after the third layer.

[0079] In this embodiment, to improve the accuracy of the concentration detection results obtained by the deep learning model, a label needs to be provided for the first signal array when acquiring it. Therefore, two gas sensors of the same model can be selected, one using DC heating and the other using pulse heating, to detect the airtightness of the sealed cavity. The parameters for DC heating are a heating voltage of 2.5V; the parameters for pulse heating are: a pulse period of 10s, a heating pulse (high level) duration of 2s in one pulse period, and a pulse voltage of 3.2V. In specific implementation, for the first signal array acquired by DC heating, only the first detection signal within the last half hour is acquired during a concentration period (1 hour), because the data output by the gas sensor under DC heating needs a relatively long time to stabilize. For the first signal array acquired by pulse heating, only the data from the pulse heating phase (2s), i.e., the voltage array of 100 sampling points, is selected. The average value of the first signal array acquired by DC heating within the same time period (also 100 sampling points) is taken, converted into a response value through mathematical operations, and the acquired average value is used as the label for the voltage array under pulse heating. Furthermore, to improve the stability of the acquired deep learning model, each first signal array needs to be acquired multiple times. The final acquired deep learning model is based on the regression equation R. 2The deep learning model with the best detection performance was selected after multiple training iterations (10 times in this embodiment) of the root mean square error (RMSE). Further, before formal concentration detection, a concentration detection test can be performed: a gas of a set concentration (e.g., 40 ppm) is prepared by a gas concentration configuration device and introduced into the gas chamber. After 10 minutes, the gas concentration detection device acquires a first detection signal of 5-10 pulses, and after calculation, predicts the concentration detection result of the gas. If the error between the deep learning model and the known concentration of the gas is within 10%, it indicates that the concentration detection result obtained by the deep learning model is accurate. The deep learning model obtained based on the above method can obtain more accurate concentration detection results.

[0080] In one embodiment, a gas concentration detection method includes: a model training device acquiring second detection signals corresponding to multiple concentrations of the gas to be tested in a sealed cavity collected by a gas concentration detection device at a preset period, forming multiple first signal arrays; converting the one-dimensional first signal arrays using one-hot encoding to obtain a multi-dimensional second signal array; training the second signal arrays based on the ReLU function to construct a BP neural network model, and sending the parameter information of the BP neural network model to the gas concentration detection device; the gas concentration detection device using pulse voltage to drive the heating electrode in the gas sensor located in the sealed cavity to heat the gas-sensitive material in the gas sensor, causing the gas sensor to generate a first detection signal in the form of an analog signal, wherein the gas to be tested is introduced into the sealed cavity; the pulse period of the pulse voltage is 8s to 10s, and the duration of the pulse in each pulse period is 1s to 3s; converting the first detection signal into a second detection signal in the form of a digital signal; receiving the parameter information of the BP neural network model sent by the model training device; acquiring a calculation circuit based on the parameter information; acquiring the BP neural network model based on the calculation circuit; and performing calculations on the second detection signal based on the BP neural network model to obtain the concentration detection result of the gas to be tested in the sealed cavity.

[0081] In the aforementioned gas concentration detection method, the model training device trains a BP neural network model based on the first signal array acquired by the gas concentration detection device. This BP neural network model is trained in the model training device and then ported and stored in the gas concentration detection device, which is an FPGA-based gas concentration detection device. This allows the gas concentration detection device to flexibly use the BP neural network model to detect the concentration of the gas to be tested. Simultaneously, the gas concentration detection device uses pulse voltage to heat the gas-sensitive material of the gas sensor, which significantly reduces power consumption during the acquisition of the first detection signal compared to the use of DC voltage in existing technologies. Therefore, by storing the data in an FPGA-based gas concentration detection device, the aforementioned gas concentration detection method can improve the flexibility of gas concentration detection and reduce power consumption while maintaining detection accuracy.

[0082] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed 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 performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0083] Based on the same inventive concept, this application also provides a gas concentration detection device for implementing the gas concentration detection method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of the one or more gas concentration detection device embodiments provided below can be found in the limitations of the gas concentration detection method described above, and will not be repeated here.

[0084] In one embodiment, such as Figure 5 The second structural block diagram of the gas concentration detection device shown is a gas concentration detection device 200 based on an FPGA development board. The gas concentration detection device 200 may also include: a heating module 510, a signal receiving module 520, and a data analysis module 530, wherein...

[0085] The heating module 510 is used to heat the gas sensor located in the sealed cavity so that the gas sensor generates a first detection signal in the form of an analog signal, and the gas to be measured is introduced into the sealed cavity.

[0086] The signal receiving module 520 is used to receive a second detection signal that has been converted from an analog signal to a digital signal.

[0087] The data analysis module 530 is used to perform calculations on the second detection signal based on the deep learning model in the gas concentration detection device to obtain the concentration detection result of the gas to be tested in the sealed cavity.

[0088] In one embodiment, the heating module is further configured to drive the heating electrode in the gas sensor with a pulse voltage to heat the gas-sensitive material in the gas sensor.

[0089] In one embodiment, continue to refer to, as Figure 5 The diagram shows a gas concentration detection device. The gas concentration detection device also includes a model acquisition module 540, which is used to receive parameter information of the initial deep learning model sent by the model training device; acquire the computing circuit based on the parameter information; and acquire the deep learning model based on the computing circuit.

[0090] Based on the same inventive concept, this application also provides a model training apparatus for implementing the model training method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more model training apparatus embodiments provided below can be found in the limitations of the model training method described above, and will not be repeated here.

[0091] In one embodiment, such as Figure 6 The block diagram of the model training device shown above illustrates that the model training device 600 includes: a data acquisition module 610, an array conversion module 620, and a model training module 630, wherein:

[0092] The data acquisition module 610 is used to acquire the second detection signals corresponding to the gas to be tested at multiple concentrations in the sealed cavity collected by the gas concentration detection device at a preset period, so as to form multiple first signal arrays.

[0093] The array conversion module 620 is used to convert a one-dimensional first signal array using one-hot encoding to obtain a multi-dimensional second signal array.

[0094] The model training module 630 is used to train the second signal array based on the ReLU function to build a deep learning model and send the parameter information of the deep learning model to the gas concentration detection device.

[0095] Each module in the aforementioned model training device 600 can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0096] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a model training method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0097] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0098] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the model training method in the above embodiment.

[0099] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the model training method described in the above embodiment.

[0100] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the model training method in the above embodiments.

[0101] Those skilled in the art will understand that all or part of the processes in the model training method of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the model training method described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0102] In one embodiment, such as Figure 8 The diagram shows the structural block diagram of the gas concentration detection system. The gas concentration detection system 800 provided in this application includes a gas concentration detection device 200 and a gas sensor 810, wherein:

[0103] The gas concentration detection device 200 is used to perform the steps of the gas concentration detection method in any of the above embodiments;

[0104] The gas sensor 810 is connected to the gas concentration detection device 200 and is used for heating the gas concentration detection device 200. It generates a corresponding first detection signal according to the different concentrations of the gas to be measured.

[0105] In one embodiment, the gas concentration detection system further includes a model training device 600, which is connected to the gas concentration detection device 200 and is used to build a deep learning model and send the parameter information of the deep learning model to the gas concentration detection device 200.

[0106] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0107] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for detecting gas concentration, characterized in that, A gas concentration detection device applied to an FPGA-based development board; the method includes: A gas sensor located in a sealed cavity is heated to generate a first detection signal in the form of an analog signal, wherein the gas to be measured is introduced into the sealed cavity; the first detection signal is a voltage signal. The first detection signal is converted into a second detection signal in digital form; the second detection signal is a concentration detection value corresponding to the voltage signal. Receive parameter information of the deep learning model sent by the model training device; the parameter information includes the weight and bias of each neuron in the deep learning model; The calculation circuit is obtained based on the parameter information; The deep learning model is obtained based on the computing circuit. The second detection signal is processed according to the deep learning model in the gas concentration detection device to obtain the concentration detection result of the gas to be tested in the sealed cavity; The deep learning model includes an input layer, a flattening layer, three fully connected layers, and an output layer; the deep learning model is used to perform data conversion and flattening processing on the second detection signal.

2. The gas concentration detection method according to claim 1, characterized in that, Heating the gas sensor includes: A pulse voltage is used to drive the heating electrode in the gas sensor to heat the gas-sensitive material in the gas sensor.

3. The gas concentration detection method according to claim 2, characterized in that, The pulse period of the pulse voltage is 8s to 10s, and the duration of the pulse in each pulse period is 1s to 3s.

4. The gas concentration detection method according to any one of claims 1 to 3, characterized in that, The deep learning model is a BP neural network model.

5. A model training method, characterized in that, For training a deep learning model in the gas concentration detection method as described in any one of claims 1-4, the method includes: The gas concentration detection device acquires second detection signals corresponding to the gas to be tested at multiple concentrations in the sealed cavity at a preset period to form multiple first signal arrays. One-hot encoding is used to transform the one-dimensional first signal array to obtain a multi-dimensional second signal array; The second signal array is trained using the ReLU function to construct the deep learning model, and the parameter information of the deep learning model is sent to the gas concentration detection device.

6. A gas concentration detection device, characterized in that, The gas concentration detection device is a gas concentration detection device based on an FPGA development board, and the device includes: A heating module is used to heat a gas sensor located in a sealed cavity, so that the gas sensor generates a first detection signal in the form of an analog signal, wherein the gas to be measured is introduced into the sealed cavity; the first detection signal is a voltage signal. The signal receiving module is used to convert the first detection signal in analog form into a second detection signal in digital form; the second detection signal is a concentration detection value corresponding to the voltage signal; The model acquisition module is used to receive parameter information of the deep learning model sent by the model training device; acquire the computing circuit according to the parameter information; and acquire the deep learning model based on the computing circuit; wherein the parameter information includes the weight and bias of each neuron in the deep learning model; The data analysis module is used to perform calculations on the second detection signal according to the deep learning model in the gas concentration detection device to obtain the concentration detection result of the gas to be tested in the sealed cavity; wherein, the deep learning model includes an input layer, a flattening layer, a three-layer fully connected layer and an output layer; the deep learning model is used to perform data conversion and flattening processing on the second detection signal.

7. A model training device, characterized in that, The device includes: The data acquisition module is used to acquire the second detection signals corresponding to the gas to be tested at multiple concentrations in the sealed cavity collected by the gas concentration detection device at a preset period, so as to form multiple first signal arrays. The array conversion module is used to convert the one-dimensional first signal array using one-hot encoding to obtain a multi-dimensional second signal array; the model training module is used to train the second signal array based on the ReLU function to build a deep learning model, and send the parameter information of the deep learning model to the gas concentration detection device.

8. A gas concentration detection system, characterized in that, The system includes: A gas concentration detection device for performing the steps of the gas concentration detection method as described in any one of claims 1 to 4; A gas-sensitive sensor, connected to the gas concentration detection device, is used to generate a corresponding first detection signal based on the heating of the gas concentration detection device and the different concentrations of the gas to be measured.

9. The gas concentration detection system according to claim 8, characterized in that, The system also includes: A model training device, connected to the gas concentration detection device, is used to construct the deep learning model of the gas concentration detection device and send the parameter information of the deep learning model to the gas concentration detection device.

Citation Information

Patent Citations

  • Gas concentration detection method and system, computer equipment and storage medium

    CN111521647A

  • Hazardous chemical gas detection method based on MEMS sensor

    CN115629107A