A gas sampling fast response processing method

By processing gas sampling data through a three-level data circulating queue and filtering queue, the response and stability issues of gas sensors under environmental changes are resolved. This achieves stable data acquisition under stable conditions and rapid response under rapid changes, ensuring the accuracy of monitoring data.

CN116483311BActive Publication Date: 2026-04-28TIANJIN ZHIYI TIMES TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TIANJIN ZHIYI TIMES TECH CO LTD
Filing Date
2023-03-10
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In existing technologies, gas sensors cannot respond quickly when the environment changes rapidly, and the data collected is unstable when the environment is stable, resulting in large errors in the monitoring results and failing to achieve accurate gas data monitoring.

Method used

Gas sampling data is processed using a three-level data circular queue and a three-level data filtering queue. Data is updated using the first-in-first-out principle, and the maximum and minimum values ​​are removed by filtering algorithm to achieve average storage and sorting of data, ensuring fast data response and stability.

Benefits of technology

It enables stable acquisition of gas sensor data when the environment is stable, and rapid response when the environment changes rapidly, ensuring the accuracy and consistency of monitoring data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116483311B_ABST
    Figure CN116483311B_ABST
Patent Text Reader

Abstract

The application discloses a kind of gas sampling fast response processing method, and the gas sampling data obtained by real-time monitoring of gas sensor is handled by the three-stage data circulation queue and three-stage data filtering queue set;Data circulation queue stores gas sampling value, adopts the way of first-in first-out, realizes gradually circulating update data, and the mean value data filtered by the data circulation queue of previous stage is stored in the data circulation queue of later stage;Data filtering queue is used for the sorting data of corresponding data circulation queue data, for filtering mean value algorithm.The application can achieve stable environment, and gas collection data changes stably, when environment changes rapidly, gas collection data can realize fast response.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gas sampling data processing technology, and in particular to a processing method for rapid response of gas sampling. Background Technology

[0002] With the advancement of industrialization and urbanization, environmental issues such as construction dust and air pollution have gradually become a focus of public concern, as environmental quality directly impacts people's health and quality of life. Therefore, as environmental pollution intensifies, there is a growing emphasis on environmental protection and stricter monitoring and management of enterprises that emit pollutants.

[0003] However, current traditional environmental gas monitoring methods mainly rely on manual laboratory analysis or online monitoring. Manual laboratory analysis is susceptible to human intervention during the monitoring process, leading to significant errors in the results. Online monitoring requires continuous real-time monitoring of pollution sources, making the process complex. Furthermore, online monitoring cannot simultaneously meet the demands of rapid response and stability of gas sensor data. In rapidly changing environments, gas sensor data cannot respond quickly enough, and in stable environments, data changes cannot stabilize quickly enough, resulting in inaccurate gas data monitoring. Summary of the Invention

[0004] The purpose of this invention is to address the technical deficiencies in the existing technology by providing a rapid response processing method for gas sampling.

[0005] The technical solution adopted to achieve the purpose of this invention is:

[0006] A method for rapid response processing of gas sampling includes the following steps:

[0007] The gas sampling data obtained by the gas sensor in real time is moved to the tail of the first data circular queue of a specified length and stored at the tail of the first data circular queue. The gas sampling data in the first data circular queue is copied and stored to the first data filtering queue.

[0008] Determine if the head data of the first data circular queue is zero. If it is, take the tail data of the current first data circular queue and store it in the specified gas sampling mean storage area before exiting. If not, move the data of the second data circular queue of a specified length forward. When it moves to the tail position of the second data circular queue, sort the gas sampling data in the first data filtering queue, remove the data of the first and last fixed lengths in the first data filtering queue, take the mean of the other data and store it in the tail of the second data circular queue, and copy the data in the second data circular queue to the second data filtering queue.

[0009] Determine if the head data of the second data circular queue is zero. If so, take the tail data of the current second data circular queue and store it in the specified gas sampling mean storage area before exiting. If not, move the data of the third data circular queue of a specified length forward. When it reaches the tail position of the third data circular queue, sort the gas sampling data in the second data filtering queue, remove the data of the first and last fixed lengths in the second data filtering queue, take the mean of the other data and store it in the tail of the third data circular queue, and copy the data in the third data circular queue to the third data filtering queue.

[0010] The algorithm checks if the head data of the third data loop queue is zero. If so, it retrieves the tail data of the current third data loop queue and stores it in the designated gas sampling average storage area before exiting. If not, it checks if the difference between the tail and the upper part of the third data loop queue appears N times consecutively and is greater than a first set value. If it is greater than the first set value, it clears the three data loop queues and the three data filtering queues, stores the current sampled data at the tail position of the first data loop queue, retrieves the tail data of the current first data loop queue and stores it in the gas sampling average storage area before exiting. If it is not greater than the first set value, it checks if the difference between the tail and the upper part of the second data loop queue appears N times consecutively and is greater than the second set value. If it is greater than the second set value, it clears the three data loop queues and the three data filtering queues, stores the current sampled data at the tail position of the first data loop queue, retrieves the tail data of the current first data loop queue and stores it in the gas sampling average storage area before exiting. If it is not greater than the first set value, it sorts the third data filtering queue, and after the first and last fixed-length data in the third data filtering queue, it retrieves the average of the other data and stores it in the gas sampling average storage area before exiting.

[0011] The first setting value may be the same as or different from the second setting value.

[0012] The second data loop queue stores the real-time gas sampling data from the sensor, the second data loop queue stores the average data after data filtering from the first data loop queue, and the third data loop queue stores the average data after data filtering from the second data loop queue.

[0013] The first data filtering queue is used to store sorted data of the first data circular queue, the second data filtering queue is used to store sorted data of the second data circular queue, and the third data filtering queue is used to store sorted data of the third data circular queue.

[0014] The data in the first data filtering queue, the second data filtering queue, and the third data filtering queue are obtained by processing the data with a filtering mean algorithm to obtain the mean data after filtering.

[0015] The sorting of gas sampling data in the first data filtering queue, the sorting of gas sampling data in the second data filtering queue, and the sorting of gas sampling data in the third data filtering queue are used to remove predetermined maximum and minimum data values.

[0016] This invention addresses the challenge of simultaneously achieving rapid response and stability in gas sensor data acquisition. It enables stable data acquisition under stable environmental conditions, rapid response under rapidly changing environmental conditions, and accurate data collection during initial power-on sampling. Attached Figure Description

[0017] Figure 1 This is a schematic flowchart of the gas sampling rapid response processing method of the present invention.

[0018] Figure 2 This is a schematic diagram of the process of real-time data sampling entering the data circular queue according to the present invention.

[0019] Figure 3 This is a schematic diagram of the process of converting the data circular queue into a data filtering queue according to the present invention. Detailed Implementation

[0020] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0021]

Terminology Explanation

[0022] Data Circular Queue: A custom-length integer array containing data from the head to the tail. This array stores gas sampling values ​​using a first-in, first-out (FIFO) principle. The latest data is inserted at the tail of the queue, and the data is updated sequentially in a circular fashion, with the data at the tail being updated one by one until the head of the queue is reached.

[0023] The data circulating queue consists of three queues, named Data Circulating Queue 1 (First Data Circulating Queue), Data Circulating Queue 2 (Third Data Circulating Queue), and Data Circulating Queue 3 (Third Data Circulating Queue). Data Circulating Queue 1 stores the real-time data of each gas sampling, Data Circulating Queue 2 stores the mean data of Data Circulating Queue 1 after data filtering, and Data Circulating Queue 3 stores the mean data of Data Circulating Queue 2 after data filtering.

[0024] Data filtering queue: A custom-length integer array containing data from the head to the tail of the data loop queue. It is used to store the sorted data of the data loop queue and is used for the filtering mean algorithm. There are three data filtering queues, named Data Filtering Queue 1 (first data filtering queue), Data Filtering Queue 2 (second data filtering queue), and Data Filtering Queue 3 (first data filtering queue), which correspond to the sorted data of Data Loop Queue 1, Data Loop Queue 2, and Data Loop Queue 3, respectively.

[0025] The gas sampling fast response processing method disclosed in this embodiment of the invention processes the gas sampling data obtained by the gas sensor in real time through a set three-level data circulating queue and a three-level data filtering queue. The data circulating queue stores the gas sampling values ​​and adopts a first-in-first-out method to realize the gradual cyclical update of data. The subsequent data circulating queue stores the filtered mean data of the previous data circulating queue. The data filtering queue is used to store the sorted data of the corresponding data circulating queue.

[0026] like Figures 1 to 3 As shown, a method for rapid response processing of gas sampling includes the following steps:

[0027] The gas sampling data obtained by the gas sensor in real time is used as the first data circulating queue data, moved to the tail of the first data circulating queue of a specified length and stored at the tail of the first data circulating queue for updating the sampling value, and the gas sampling data in the first data circulating queue is copied and stored sequentially to the first data filtering queue.

[0028] Determine if the head data of the first data circular queue is zero. If it is, take the tail data of the current first data circular queue and store it in the specified gas sampling mean storage area before exiting. If not, move the data of the second data circular queue of a specified length forward. When it moves to the tail position of the second data circular queue, sort the gas sampling data in the first data filtering queue, remove the data of the first and last fixed lengths in the first data filtering queue, take the mean of the other data and store it in the tail of the second data circular queue. Copy the data in the second data circular queue and store it in the second data filtering queue in sequence.

[0029] Determine if the head data of the second data circular queue is zero. If so, take the tail data of the current second data circular queue and store it in the specified gas sampling mean storage area before exiting. If not, move the data of the third data circular queue of a specified length forward. When it reaches the tail position of the third data circular queue, sort the gas sampling data in the second data filtering queue, remove the data of the first and last fixed lengths in the second data filtering queue, take the mean of the other data and store it in the tail of the third data circular queue. Copy the data in the third data circular queue and store it sequentially in the third data filtering queue.

[0030] Determine if the head data of the third data loop queue is zero. If yes, retrieve the current tail data of the third data loop queue and store it in the designated gas sampling average storage area before exiting. If no, determine if the difference between the tail and upper part of the third data loop queue appears N times consecutively and is greater than a first set value. If it is greater than the first set value, clear the three data loop queues and the three data filtering queues, store the current sampled data at the tail position of the first data loop queue, retrieve the current tail data of the first data loop queue and store it in the gas sampling average storage area before exiting. If it is not greater than the first set value, determine the second... If the difference between the tail and the top of the data loop queue appears N times consecutively (e.g., 2 times), and this difference is greater than a second set value, then the three data loop queues and the three data filtering queues are cleared. The current sampled data is stored at the tail position of the first data loop queue. The current tail data of the first data loop queue is stored in the gas sampling mean storage area, and the process exits. If the difference is not greater than the second set value, then the third data filtering queue is sorted, and the data with a fixed length at the beginning and end of the third data filtering queue is removed. The mean of the remaining data is then stored in the gas sampling mean storage area, and the process exits.

[0031] The first setting value may be the same as or different from the second setting value.

[0032] The second data loop queue stores the real-time gas sampling data from the sensor, the second data loop queue stores the average data after data filtering from the first data loop queue, and the third data loop queue stores the average data after data filtering from the second data loop queue.

[0033] The first data filtering queue is used to store sorted data of the first data circular queue, the second data filtering queue is used to store sorted data of the second data circular queue, and the third data filtering queue is used to store sorted data of the third data circular queue.

[0034] The sorted data stored in the first data filtering queue, the second data filtering queue, and the third data filtering queue are used to process the filtered mean data using a mean filtering algorithm.

[0035] The sorting of gas sampling data in the first data filtering queue, the sorting of gas sampling data in the second data filtering queue, and the sorting of gas sampling data in the third data filtering queue are used to remove predetermined maximum and minimum data values.

[0036] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or basic features of the present invention.

[0037] Therefore, the embodiments should be regarded as exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, it is intended that all variations falling within the meaning and scope of the equivalents of the claims be included within the invention.

[0038] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A method for rapid response processing of gas sampling, characterized in that, Includes the following steps: The gas sampling data obtained by the gas sensor in real time is moved to the tail of the first data circular queue of a specified length and stored at the tail of the first data circular queue. The gas sampling data in the first data circular queue is copied and stored to the first data filtering queue. Determine if the data at the head of the first data circular queue is zero. If it is, take the current data at the tail of the first data circular queue and store it in the specified gas sampling mean storage area before exiting. If not, move the data of the second data circular queue of a specified length forward. When it reaches the tail of the second data circular queue, sort the gas sampling data in the first data filtering queue, remove the data of the first and last fixed lengths in the first data filtering queue, take the mean of the other data and store it at the tail of the second data circular queue, and copy the data in the second data circular queue to the second data filtering queue. Determine if the first data in the second data loop queue is zero. If it is, take the last data in the second data loop queue and store it in the specified gas sampling mean storage area before exiting. If not, move the data in the third data loop queue of a specified length forward. When it reaches the last position of the third data loop queue, sort the gas sampling data in the second data filter queue, remove the data of the first and last fixed lengths in the second data filter queue, take the mean of the other data and store it in the last position of the third data loop queue. Copy the data in the third data loop queue to the third data filter queue. If the head data of the third data loop queue is zero, and if so, the tail data of the current third data loop queue is stored in the designated gas sampling average storage area and the process exits. If not, the process checks if the difference between the tail and the upper part of the third data loop queue appears N times consecutively and is greater than a first set value. If it is greater than the first set value, the process clears the three data loop queues and the three data filtering queues, stores the current sampled data at the tail position of the first data loop queue, stores the current tail data of the first data loop queue in the gas sampling average storage area, and exits. If it is not greater than the first set value, the process checks if the difference between the tail and the upper part of the second data loop queue appears N times consecutively and is greater than the second set value. If it is greater than the second set value, the process clears the three data loop queues and the three data filtering queues, stores the current sampled data at the tail position of the first data loop queue, stores the current tail data of the first data loop queue in the gas sampling average storage area, and exits. If it is not greater than the second set value, the process sorts the third data filtering queue, removes the data of fixed length at the beginning and end of the third data filtering queue, stores the average of the remaining data in the gas sampling average storage area, and exits.

2. The gas sampling fast response processing method according to claim 1, characterized in that, The first setting value may be the same as or different from the second setting value.

3. The gas sampling rapid response processing method according to claim 1, characterized in that, The second data loop queue stores the real-time gas sampling data from the sensor. The second data loop queue stores the average data after data filtering from the first data loop queue. The third data loop queue stores the average data after data filtering from the second data loop queue.

4. The gas sampling fast response processing method according to claim 1, characterized in that, The first data filtering queue is used to store sorted data of the first data circular queue, the second data filtering queue is used to store sorted data of the second data circular queue, and the third data filtering queue is used to store sorted data of the third data circular queue.

5. The gas sampling rapid response processing method according to claim 1, characterized in that, The data stored in the first data filtering queue, the second data filtering queue, and the third data filtering queue are the mean data obtained after data filtering through the filtering mean algorithm.

6. The gas sampling fast response processing method according to claim 1, characterized in that, The sorting of gas sampling data in the first data filtering queue, the sorting of gas sampling data in the second data filtering queue, and the sorting of gas sampling data in the third data filtering queue are used to remove predetermined maximum and minimum data values.

Citation Information

Patent Citations

  • Method for automatically detecting human physiological states and movement bracelet

    CN106388771A

  • Method, apparatus and device for storing data in queue

    WO2017088180A1