A household gas detection device
By integrating an AI dynamic calibration model and a CNN-LSTM-Attention architecture into a household gas detector, batch calibration of the household gas detector was achieved, solving the problems of low calibration efficiency and difficulty in guaranteeing accuracy in existing technologies, and achieving efficient and accurate calibration results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-23
- Publication Date
- 2026-04-03
AI Technical Summary
Existing household gas detection devices require individual processing during calibration, resulting in excessive workload, low efficiency, and difficulty in guaranteeing accuracy.
An AI dynamic calibration model is adopted and integrated into a household gas detection device. The calibration process is automatically completed through detection commands issued by a remote platform. The data processing and compensation are combined with a CNN-LSTM-Attention architecture model to achieve synchronous calibration of batch devices.
It significantly improves calibration efficiency and accuracy, reduces the impact of human factors, ensures the consistency and precision of calibration results, and simplifies the operation process.
Smart Images

Figure CN121384852B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gas concentration detection technology, and more particularly to a household gas detection device. Background Technology
[0002] National hazardous gas inspection and calibration requirements mandate calibration operations for the gas industry and other measuring and testing equipment. This operation primarily involves centralized testing, combined with rapid on-site testing. The gas-using industry requires testing for the concentration of gases such as methane in the air in specific scenarios such as residential and commercial small kitchens. Traditionally, semiconductor-based methods were used, but the market is now seeing laser products replacing traditional measuring equipment.
[0003] Referring to the invention patent with publication number CN115839924A, a methane gas concentration detection algorithm and its integrated laser methane detection device are disclosed. This device employs an MCU signal processing circuit module with AD and DA functions to convert an analog signal containing gas absorption signals into a digital signal, and to convert the laser drive digital signal into an analog signal, driving the laser to emit laser light of a specific wavelength. After methane gas absorbs the specific wavelength of the laser light, the signal is converted into an electrical signal by a photodetector. This signal is then amplified by a preamplifier circuit and processed by the MCU signal processing circuit to determine the methane gas concentration in the environment.
[0004] To comply with national metrological standards, the aforementioned existing methane detection devices must undergo testing and calibration before entering the market. The standard calibration method for these existing devices involves sending them to a metrology unit, where metrology personnel record the status of each device, the calibration results, and issue a corresponding testing and calibration report.
[0005] However, for large-scale applications of household gas testing devices, the aforementioned testing methods, requiring individual testing, are not only time-consuming and labor-intensive but also fail to meet the market's demand for rapid response. Furthermore, traditional calibration methods are susceptible to human error, making it difficult to guarantee the accuracy and consistency of calibration results. Therefore, developing a household gas testing device suitable for batch calibration has become an urgent problem to be solved. Summary of the Invention
[0006] Based on the above situation, the main objective of this invention is to provide a household gas detection device to solve the problems of existing gas detection devices, which require individual calibration, resulting in excessive workload, low efficiency, and difficulty in guaranteeing accuracy when calibrating a large number of devices.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0008] A household gas detection device includes a detection module, a control module, and a data transmission module;
[0009] The control module is equipped with an AI dynamic calibration model;
[0010] The AI dynamic calibration model includes the following steps:
[0011] S1: Receive calibration trigger signal and enter preprocessing mode;
[0012] S2: Verify whether the environment meets the calibration requirements;
[0013] S3: After confirmation, the calibration process is initiated;
[0014] S4: Collect laser measurement data, environmental parameter data, equipment historical data, and standard gas reference data;
[0015] S5: Clean, denoise, normalize, and extract features from the collected data;
[0016] S6: The control module loads the AI dynamic calibration model and performs calibration calculations;
[0017] S7: Store calibration parameters, send calibration results back to the display module, and upload calibration data through the data transmission module.
[0018] Preferably, the detection module includes a housing, a lens, a signal detection unit, a measuring laser, a signal processing circuit, and a temperature and pressure detection module;
[0019] The outer casing is open, and the cover can be closed by snap-fit.
[0020] Preferably, a micro switch is provided inside the housing, and the spring of the micro switch is positioned close to the latch;
[0021] In step S1, removing the cover plate can trigger the spring of the micro switch and send a calibration trigger signal to the control module.
[0022] Preferably, the control module includes a CPU, a storage unit, an interface unit, and a power management unit;
[0023] The storage unit includes a read-only partition, which stores the device electronic ID.
[0024] Step S3 includes two confirmation methods:
[0025] Confirm the button operation by pressing the hardware trigger button for 3-5 seconds to trigger the AI dynamic calibration model.
[0026] The remote platform confirms that it sends a command to the CPU through the data transmission module. The CPU reads and retrieves the device's electronic ID from the storage unit. At the same time, the remote platform sends an ID verification command through the data transmission module. The CPU retrieves the device's electronic ID from the storage unit and compares it with the ID verification command to confirm the calibration device. The CPU then sends a command to trigger the AI dynamic calibration model.
[0027] Preferably, in step S4, the laser measurement data and environmental parameter data are stamped with a unified timestamp, the environmental parameter data is collected in sets every 10ms-15ms, and a device electronic ID field is added to the header of the data frame.
[0028] Preferably, in step S5, outliers are removed using the 3σ criterion, missing values are filled using the sliding window average, and the original voltage signal is decomposed into noise using a 3-layer decomposition with a db4 wavelet basis. The feature extraction includes original signal features, environmental features, aging features, and time features, and the environmental features include a temperature and humidity coupling term.
[0029] Preferably, the calibration calculation in step S6 includes: performing concentration calibration calculation, dynamic compensation calculation, and dual-model cross-validation calculation.
[0030] Preferably, the data transmission module includes a communication unit, a buffer unit, and a transmission status detection unit;
[0031] When the control module is in calibration mode, it transmits the calibration result data to the cache unit, which stores the calibration result data in an independent partition.
[0032] The calibration result data is encapsulated into a structured data packet with a fixed format. The size of a single data packet is set according to the preset data block size. A single or multiple data packets contain a complete class / group of data. If the last data packet of a single class / group of data is less than the preset data block size, invalid bytes are padded to the end of the data packet to the preset data block size. Then, a progress node number is assigned to each data packet.
[0033] Preferably, after the control module stores the calibration result data into the cache unit, the control module instructs the transmission status detection unit to detect the communication mode, which includes: WIFI, GPRS, 4G, and 5G.
[0034] The transmission status detection unit detects communication modes in the following order: WIFI, 5G, 4G, GPRS.
[0035] Preferably, the communication unit reads calibration result data from the cache unit, and during the upload process, the communication unit uses the size of a single data packet as a progress node and provides real-time feedback to the control module.
[0036] The transmission status detection unit can detect network outages or signal loss, send a request to stop transmitting data to the control module, and issue a record instruction to the buffer unit.
[0037] The recording instruction is: Record that the record has been uploaded to the Nth complete progress node;
[0038] Once the network is restored, resume uploading from the N+1th progress node.
[0039] The beneficial effects of this invention are as follows: The household gas detection device of this invention, by integrating an AI dynamic calibration model, allows multiple gas detection devices to simultaneously receive detection commands from a remote platform of the metering unit, automatically completing the calibration process without requiring manual operation of each device, thus significantly improving calibration efficiency. Simultaneously, the application of the AI dynamic calibration model effectively reduces the impact of human factors on the calibration results, ensuring the accuracy and consistency of the calibration results.
[0040] Furthermore, the data transmission module of this application can change the communication mode according to network conditions, ensuring that calibration result data can be stably transmitted to the remote platform. It also features a power-off resume mechanism to prevent repeated and disordered data uploads, thus improving transmission efficiency.
[0041] Other beneficial effects of the present invention will be explained in detail through the introduction of specific technical features and technical solutions in specific embodiments. Those skilled in the art should be able to understand the beneficial technical effects brought about by these technical features and technical solutions through the introduction of these technical features and technical solutions. Attached Figure Description
[0042] Figure 1 This is a schematic diagram of the module structure of a household gas detection device according to the present invention.
[0043] Figure 2 This is a three-dimensional structural diagram of the outer casing of a household gas detection device according to the present invention.
[0044] Figure 3 This is a schematic diagram of the module connection structure of a household gas detection device according to the present invention.
[0045] Figure 4 This is a flowchart illustrating the working steps of an AI dynamic calibration model for a household gas detection device according to the present invention.
[0046] Explanation of reference numerals in the attached figures:
[0047] 1. Detection module; 11. Housing; 12. Lens; 13. Signal detection unit; 14. Measuring laser; 15. Signal processing circuit; 2. Control module; 21. CPU; 22. Storage unit; 23. Interface unit; 24. Power management unit; 3. Data transmission module; 31. Communication unit; 32. Buffer unit; 33. Transmission status detection unit; 4. Display module. Detailed Implementation
[0048] The present invention is described below based on embodiments, but the present invention is not limited to these embodiments. In the following detailed description of the present invention, some specific details are described in detail, but well-known methods, processes, procedures, and elements are not described in detail in order to avoid obscuring the essence of the present invention.
[0049] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.
[0050] Unless the context explicitly requires it, the words "comprising," "including," and similar terms throughout the specification and claims should be interpreted as encompassing rather than being exclusive or exhaustive; that is, meaning "including but not limited to."
[0051] In the description of this invention, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0052] Reference Figure 1 This invention provides a household gas detection device, including a detection module 1, a control module 2, a data transmission module 3, and a display module 4. The detection module 1 is used to detect the concentration of gases such as methane in the air. The control module 2 is connected to the detection module 1 and is responsible for receiving the gas concentration data transmitted from the detection module 1 and performing preliminary processing on this data. Additionally, the control module 2 can control the switching between detection mode and calibration mode of the gas detection device. The data transmission module 3 is connected to the control module 2 and is used to send the processed data to a metrology unit for remote reception and further analysis. The display module 4 is connected to the control module 2 and is used to display the currently detected gas concentration value or calibration status in real time, allowing users to intuitively understand the environmental conditions.
[0053] Reference Figure 2 and Figure 3Specifically, the detection module 1 includes a housing 11, a lens 12, a signal detection unit 13, a measurement laser 14, and a signal processing circuit 15. The lens 12, signal detection unit 13, and measurement laser 14 are all installed within the housing 11. The laser output end of the measurement laser 14 faces the lens 12, and the lens 12 is positioned between the measurement laser 14 and the signal detection unit 13 by a fixed bracket.
[0054] Furthermore, to facilitate calibration testing in conjunction with control module 2, detection module 1 also includes a temperature and pressure detection module (not shown in the figure), which is used to collect environmental parameters and reduce environmental interference.
[0055] The measuring laser 14 emits laser light, which is converted into parallel light by the lens 12 and then shines on the signal detection unit 13. The signal detection unit 13 is electrically connected to the signal processing circuit 15, thereby enabling the received optical signal to be converted into an electrical signal and transmitted to the signal processing circuit 15. The signal processing circuit 15 can be connected to the control module 2 to transmit data to the control module 2 for subsequent transmission to the display module 4 or the remote data processing module.
[0056] Reference Figure 2 As one embodiment, the housing 11 of the detection module 1 adopts a detachable design. Specifically, the housing 11 can be configured as an open type, closed by an external cover plate, and the cover plate and the housing 11 are connected by easy-to-remove buckles. The detachable nature of the housing 11 allows the optical structure to be quickly exposed to the environment of measurement, testing and calibration operations, thereby facilitating the testing and calibration of the optical system, conforming to the national standard gas detection calibration method, and facilitating direct inspection of the optical structure.
[0057] Control module 2 is a microcontroller control circuit. This circuit includes a CPU 21, a storage unit 22, an interface unit 23, and a power management unit 24. The CPU 21 is connected to the storage unit 22, the interface unit 23, and the power management unit 24.
[0058] The control module 2 is electrically connected to the measurement laser 14, the signal processing circuit 15, the data transmission module 3, and the display module 4 through the interface. The transmitted electrical signals are transmitted through the interface unit 23 and the CPU 21.
[0059] Storage unit 22 stores the AI dynamic calibration model, the gas concentration calculation model, and stored data. It is particularly important to note that storage unit 22 includes a temporary computing area. The read-only partition stores immutable data such as the device's electronic ID. Power management unit 24 maintains a stable voltage for the household gas detector, ensuring stable operation.
[0060] CPU21 can read data from storage mode, including AI dynamic calibration model, gas concentration calculation model, device electronic ID, etc. It can switch the working mode of the household gas detector between calibration mode and detection mode.
[0061] When the household gas detector is in detection mode, the CPU 21 receives an electrical signal from the signal processing circuit 15, and the data obtained by the gas concentration calculation model can be transmitted to the display module 4 through the interface unit 23; or, when the household gas detector is in calibration mode, the CPU 21 receives an electrical signal from the signal processing circuit 15, and the calibration result can be sent to the display module 4 for display after calibration measurement by the AI dynamic calibration model. In addition, the calibration result can be transmitted to the metering unit for data recording and collection through the data transmission module 3.
[0062] Reference Figure 4 The household gas detection device of this invention achieves remote synchronous calibration of batch devices by integrating an AI dynamic calibration model. Specifically, the working steps of the AI dynamic calibration model include:
[0063] S1: Trigger calibration signal and enter preprocessing mode.
[0064] As one embodiment, a microswitch can be provided in the housing 11. The spring of the microswitch is located close to the latch. When the cover is removed, the microswitch can be triggered. The microswitch can transmit an electrical signal to the CPU 21 through the interface unit 23, and the working state of the household gas detection device is adjusted from the detection state to the calibration state.
[0065] S2: CPU21 calls the temperature and pressure measurement module to collect data and verify whether the current environment meets the calibration requirements.
[0066] The calibration environment requirements are: temperature fluctuation < ±0.5℃, air pressure stable at 80-110kPa, and humidity fluctuation < ±2% RH. If the requirements are not met, a signal is sent to the display module 4 via the CPU21, and the display module 4 displays "Unstable environment, waiting for calibration". Only after the requirements are met will the next step be performed to avoid environmental interference causing calibration deviation.
[0067] S3: After confirmation, enter calibration mode, trigger the AI dynamic calibration model, and start the calibration process.
[0068] This step includes two confirmation modes. One mode is user button operation, where the user presses the trigger button for 3-5 seconds to trigger the AI dynamic calibration model. The second mode is that the remote platform of the metrology unit sends a "batch calibration" command to the CPU21 through the data transmission module 3, and the CPU21 instructs the AI dynamic calibration model to start the calibration work.
[0069] In the above steps, during user key operation mode, upon entering calibration mode, CPU 21 reads the device's electronic ID from storage unit 22 and generates a calibration data file package. The file package name includes the date the calibration signal was triggered and the device's electronic ID. In the mode of sending batch calibration from a remote platform, the metrology unit's testing platform first sends a batch of device electronic IDs as ID verification instructions. After receiving the ID verification instructions, CPU 21 retrieves the device electronic IDs from storage unit 22 and compares them with the ID verification instructions. If the device electronic ID is confirmed to belong to the current calibration batch, the calibration data file package is generated, and calibration begins. This operation avoids the remote metrology unit from mistakenly sending calibration instructions, which could lead to inconsistent test results.
[0070] S4: CPU21 collects laser measurement data, environmental parameter data, equipment historical data, and standard gas reference data.
[0071] Specifically, step S4 includes:
[0072] S41: CPU21 controls the measurement laser 14 to emit laser light, collects laser measurement data, and stores the laser measurement data in storage unit 22.
[0073] CPU21 sends a drive command to the measurement laser 14, causing it to emit a laser with characteristic methane spectral lines. After the laser passes through the standard gas via an open optical path, the signal detection unit 13 converts the remaining light intensity into a microvolt-level electrical signal. After being amplified and filtered by the signal processing circuit 15, the signal is uploaded to CPU21.
[0074] S42: The CPU21 controls the temperature and pressure measurement module to collect environmental parameter data in real time. It collects a set of temperature, air pressure and humidity data every 10ms-15ms. After the environmental parameter data is collected, the device electronic ID field is added to the header of the data frame.
[0075] As one embodiment, the control module 2 adds a unified timestamp to the environmental parameter data and the laser measurement data to ensure that the two sets of data are strictly synchronized in the time dimension, providing an accurate data foundation for subsequent calibration calculations.
[0076] S43: CPU21 collects historical device data stored in storage unit 22.
[0077] The equipment's historical data includes: last calibration time, cumulative working time, average monthly attenuation rate of laser aging, and cumulative optical path offset, providing a basis for individual difference compensation.
[0078] S44: CPU21 acquires standard gas reference data.
[0079] In this step, during manual calibration of a single device, the testing personnel introduce multiple standard gases of different specifications into the detection optical path, and the device matches the corresponding detection signal according to the preset standard gas concentration information. During batch testing, the remote platform sends the concentration parameters of different standard gases to the device through the interface unit 23, and the device matches the detection signal according to the sent parameters without needing to identify the gas concentration.
[0080] S5: Clean, denoise, normalize, and extract features from the collected data.
[0081] Step S5 includes:
[0082] Step S51: Data cleaning and noise reduction.
[0083] Outliers (such as invalid data with voltage > 5V or < 0V) are removed using the 3σ criterion, and missing values are filled with the sliding window average. The original voltage signal is decomposed into 3 layers using the db4 wavelet basis to filter out high-frequency noise caused by electromagnetic interference and optical path jitter, and a smooth light intensity-voltage curve is output.
[0084] Step S52: Normalize the data.
[0085] Data from different dimensions, such as temperature and pressure data, laser power, and light intensity signals, are normalized to the [0,1] interval to eliminate the influence of dimensional differences on model calculations; at the same time, temperature and humidity data are converted into "temperature and humidity coupling term (T×RH)" to quantify environmental cross-interference.
[0086] Step S53: Extract features.
[0087] Specifically, the extracted features include: original signal features: voltage peak value, light intensity baseline fluctuation value, and absorbance calculation value; environmental features: temperature and humidity coupling term and normalized air pressure value; aging features: cumulative working time, monthly average attenuation rate, and cumulative optical path offset; and time features: last calibration interval and current calibration time.
[0088] S6: CPU21 loads the AI dynamic calibration model and performs calibration calculations. The AI dynamic calibration model is a CNN-LSTM-Attention architecture model, which integrates the local feature extraction capability of convolutional neural networks (CNN), the temporal modeling capability of long short-term memory networks (LSTM), and the weight allocation advantages of attention mechanisms.
[0089] Step S6 includes:
[0090] S61: Concentration calibration calculation.
[0091] Based on the principle of laser spectral absorption and combined with standard gas reference data, the calibration curve parameters of "detection signal - gas concentration" are calculated through a model; at the same time, the deviation between the current detection signal and the standard signal is compared, and the basic calibration concentration value is output.
[0092] S62: Dynamic compensation calculation.
[0093] The dynamic compensation calculation includes environmental compensation, which calls the "temperature-pressure-concentration" coupled compensation sub-model and generates compensation factors based on real-time temperature and pressure data to correct concentration deviations caused by environmental changes; the dynamic compensation calculation also includes individual difference compensation, which combines equipment aging records and historical calibration data, uses the LSTM module to predict the laser attenuation trend, and dynamically adjusts the calibration curve; for errors caused by optical path offset, the weight of optical path offset is strengthened through an attention mechanism for targeted compensation.
[0094] S63: Dual-model cross-validation
[0095] To avoid errors from a single calibration using the AI dynamic calibration model, both the AI dynamic calibration model and the traditional polynomial model are run simultaneously to verify the difference between their outputs. When the difference in output concentration is less than 0.3%, the calibration result is considered valid; if the difference is greater than 0.3%, data re-acquisition is automatically triggered or a "hardware malfunction" message is displayed to prevent calibration failure.
[0096] S7: Store calibration parameters, send calibration results back to display module 4, and upload calibration data through data transmission module 3.
[0097] S71: Store the calibration curve parameters, environmental compensation factor, and aging compensation coefficient in storage unit 22, overwriting the original parameters; after the device switches back to detection mode, call these parameters in real time to correct the detection results and ensure the accuracy of daily detection.
[0098] S72: Feedback the calibration results to the display module 4.
[0099] CPU21 feeds back the calibration results to display module 4 through interface unit 23 to display the calibration results. The calibration results can be divided into:
[0100] ① Qualified prompt: Displays "Calibration qualified" + calibration accuracy + next calibration reminder time.
[0101] ② Abnormal prompt: If the calibration accuracy does not meet the national standard, "Calibration abnormal" + the reason for the abnormality will be displayed, and a yellow LED light will be triggered to flash. The reasons for the abnormality can be "laser attenuation exceeds the standard" or "excessive environmental interference".
[0102] ③ Emergency Alarm: If a hardware failure is detected, such as insufficient laser power, the system will display "Hardware failure, do not use" and trigger a buzzer alarm.
[0103] S73: Transmit calibration data to the remote end via data transmission module 3.
[0104] The transmitted calibration data includes: a unique electronic device ID, calibration time, calibration environmental parameters, standard gas concentration, calibration curve parameters, calibration accuracy, and device status record. Upon receiving the data, the platform generates a metrological testing report for each device according to national standards.
[0105] This application utilizes an AI dynamic calibration model, which not only achieves accurate calibration of household gas detection devices but also significantly improves the efficiency and accuracy of batch device calibration. By integrating an advanced CNN-LSTM-Attention architecture model, the device can automatically adapt to detection needs under different environmental conditions, effectively compensating for detection errors caused by environmental changes, equipment aging, and individual differences, ensuring long-term stable detection performance.
[0106] Furthermore, the household gas detection device designed in this paper is highly intelligent and automated. From the triggering of calibration signals and the verification of environmental conditions, to the synchronous acquisition, processing and analysis of multi-dimensional data, and finally to the feedback and storage of calibration results, the entire process is automatically controlled by the control module 2, requiring minimal human intervention. This greatly simplifies the calibration process and reduces operational difficulty and cost.
[0107] Furthermore, the data transmission module 3 includes a communication unit 31, a buffer unit 32, and a transmission status detection unit 33. The communication unit 31 and the buffer unit 32 are connected via a two-wire SPI bus, and the transmission status detection unit 33 is electrically connected to the communication unit 31. The interface unit 23 is electrically connected to the communication unit 31, the buffer unit 32, and the transmission status detection unit 33. The buffer unit 32 stores the calibration result data sent from the control module 2, the communication unit 31 can use its communication capabilities to send the calibration result data to a remote platform, and the transmission status detection unit 33 is used to verify various communication methods to ensure the stability of information transmission.
[0108] Specifically, the working logic of data transmission module 3 is as follows:
[0109] In calibration mode, after CPU21 completes the calibration of the device using the AI dynamic calibration model, CPU21 transmits the calibration results to cache unit 32. Cache unit 32 sets up an independent partition to store the calibration result data of the device and encapsulates the calibration result data into a fixed-format structured data packet. The size of a single data packet is set according to the preset data block size. In this embodiment, the size of a single data packet is 128 bytes. A single or multiple data packets contain a complete type / group of data. When the last data packet of a single type / group of data is less than 128 bytes, invalid bytes are padded to the end of the data packet to make it 128 bytes. Then, a progress node number is assigned to each data packet.
[0110] After the CPU21 writes the calibration result data of this device into the cache unit 32, the CPU21 instruction transmission status detection unit 33 detects all communication methods, including the communication methods used in this application: WIFI, GPRS, 4G, and 5G.
[0111] Because WIFI, 4G, and 5G signals have wider coverage and lower prices, and are suitable for batch data upload scenarios, CPU21 prioritizes the instruction transmission status detection unit 33 to detect the signal strength of WIFI, 4G, or 5G. When the detected WIFI strength is greater than -85dBm, WIFI is switched as the communication method to transmit data; when the WIFI strength is less than -85dBm, 4G or 5G is selected for data transmission, and other communication methods are disabled to ensure stable data transmission.
[0112] In addition, when the WIFI strength is less than -85dBm and the 4G or 5G signal strength is less than -105dBm, and the transmission status detection unit 33 detects that the WIFI and 4G or 5G signal strengths have not improved after more than 5 seconds, the CPU 21 triggers the GPRS communication mode to transmit data.
[0113] In one embodiment, the communication unit 31 reads the calibration result data from the cache unit 32. During the upload process, the communication unit 31 uses one data packet as a progress node and provides real-time feedback to the CPU 21 on the upload progress node number. If there is a power outage, network interruption, or network signal loss, the transmission status detection unit 33 immediately sends a signal to the CPU 21. The CPU 21 instructs the communication unit 31 to stop transmitting data and sends a record instruction to the cache unit 32 to "record the interruption time and record the Nth complete progress node that has been uploaded." After the network is restored, the upload resumes from the N+1th progress node, ensuring that each node is a complete data packet that can be independently parsed, thus avoiding data corruption or duplicate uploads.
[0114] The gas detection device provided in this application achieves seamless connection with the remote platform of the metering unit through the data transmission module 3, enabling the calibration of batch devices to be completed efficiently at the same time, greatly improving work efficiency and data consistency.
[0115] Those skilled in the art will understand that, without conflict, the above-mentioned preferred solutions can be freely combined and superimposed.
[0116] It should be understood that the above embodiments are merely exemplary and not restrictive. Various obvious or equivalent modifications or substitutions that can be made by those skilled in the art regarding the above details without departing from the basic principles of the present invention will be included within the scope of the claims of the present invention.
Claims
1. A household gas detection device, characterized in that, It includes a detection module, a control module, and a data transmission module; The control module is equipped with an AI dynamic calibration model; The AI dynamic calibration model includes the following steps: S1: Receive calibration trigger signal and enter preprocessing mode; S2: Verify whether the environment meets the calibration requirements; S3: After confirmation, the calibration process is initiated; S4: Collect laser measurement data, environmental parameter data, equipment historical data, and standard gas reference data; S5: Clean, denoise, normalize, and extract features from the collected data; S6: The control module loads the AI dynamic calibration model and performs calibration calculations; S7: Store calibration parameters, send calibration results back to the display module, and upload calibration data through the data transmission module; The calibration calculation in step S6 includes: performing concentration calibration calculation, dynamic compensation calculation, and dual-model cross-validation calculation; The dual models are: the CNN-LSTM-Attention architecture model and the multinomial model.
2. The household gas detection device as described in claim 1, characterized in that, The detection module includes a housing, a lens, a signal detection unit, a measuring laser, a signal processing circuit, and a temperature and pressure detection module; The outer casing is open, and the cover can be closed by snap-fit.
3. The household gas detection device as described in claim 2, characterized in that, A micro switch is provided inside the housing, and the spring of the micro switch is positioned close to the latch. In step S1, removing the cover plate can trigger the spring of the micro switch and send a calibration trigger signal to the control module.
4. The household gas detection device as described in claim 1, characterized in that, The control module includes a CPU, a storage unit, an interface unit, and a power management unit; The storage unit includes a read-only partition, which stores the device electronic ID. Step S3 includes two confirmation methods: Confirm the button operation by pressing the hardware trigger button for 3-5 seconds to trigger the AI dynamic calibration model. The remote platform confirms that it sends a command to the CPU through the data transmission module. The CPU reads and retrieves the device's electronic ID from the storage unit. At the same time, the remote platform sends an ID verification command through the data transmission module. The CPU retrieves the device's electronic ID from the storage unit and compares it with the ID verification command to confirm the calibration device. The CPU then sends a command to trigger the AI dynamic calibration model.
5. The household gas detection device as described in claim 1, characterized in that, In step S4, the laser measurement data and environmental parameter data are stamped with a unified timestamp. The environmental parameter data is collected in sets every 10ms-15ms, and a device electronic ID field is added to the header of the data frame.
6. The household gas detection device as described in claim 1, characterized in that, In step S5, outliers are removed using the 3σ criterion, missing values are filled using the sliding window average, and the original voltage signal is decomposed into noise using a 3-layer decomposition with a db4 wavelet basis. The feature extraction includes original signal features, environmental features, aging features, and time features. The environmental features include a temperature and humidity coupling term.
7. The household gas detection device as described in claim 1, characterized in that, The data transmission module includes a communication unit, a buffer unit, and a transmission status detection unit; When the control module is in calibration mode, it transmits the calibration result data to the cache unit, which stores the calibration result data in an independent partition. The calibration result data is encapsulated into a structured data packet with a fixed format. The size of a single data packet is set according to the preset data block size. A single or multiple data packets contain a complete class / group of data. If the last data packet of a single class / group of data is less than the preset data block size, invalid bytes are padded to the end of the data packet to the preset data block size. Then, a progress node number is assigned to each data packet.
8. The household gas detection device as described in claim 7, characterized in that, After storing the calibration result data in the cache unit, the control module instructs the transmission status detection unit to detect the communication mode, which includes: WIFI, GPRS, 4G, and 5G. The transmission status detection unit detects communication modes in the following order: WIFI, 5G, 4G, GPRS.
9. The household gas detection device as described in claim 8, characterized in that, The communication unit reads calibration result data from the cache unit. During the upload process, the communication unit uses the size of a single data packet as a progress node and provides real-time feedback to the control module. The transmission status detection unit can detect network outages or signal loss, send a request to stop transmitting data to the control module, and issue a record instruction to the buffer unit. The recording instruction is: Record that the record has been uploaded to the Nth complete progress node; Once the network is restored, resume uploading from the N+1th progress node.
Citation Information
Patent Citations
Methane gas concentration detection algorithm and integrated laser methane detection device thereof
CN115839924A
Self-calibration method for NDIR sensor
CN119985380A
Household potential safety hazard intelligent detection and early warning system based on AI
CN120196002A