Data processing method and device of gas alarm and gas alarm

By filtering and aging factor correction on the initial voltage value collected by the gas alarm, the impact of external environment and aging on the gas concentration value is solved, and more accurate gas concentration measurement is achieved.

CN120028387APending Publication Date: 2025-05-23GOLDCARD HIGH TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311564691.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-21
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

Existing gas alarms are susceptible to external environments such as temperature, humidity, electromagnetic waves, and aging caused by long-term use, resulting in inaccurate gas concentration values.

Method used

By obtaining multiple initial voltage values ​​and aging factors, determining the proportion of environmental filtering factors based on the target operation scene identification, filtering the initial voltage values, obtaining the target voltage values, and calculating the target gas concentration value based on the aging factors.

Benefits of technology

Effectively remove the impact of external environment and aging on gas concentration values, improving the accuracy of gas concentration values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120028387A_ABST
    Figure CN120028387A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device of a gas alarm and the gas alarm, which can be used in the field of gas detection and alarm. The method comprises the following steps: determining an environment filtering factor proportion according to an acquired target operation scene identifier; filtering the plurality of initial voltage values according to the environmental filtering factor proportion to obtain a plurality of target voltage values; and after an initial gas concentration value corresponding to an average value of a plurality of target voltage values is determined, a target gas concentration value is calculated in combination with the obtained aging factor. According to the scheme, the initial voltage value is filtered, and the target gas concentration value is obtained according to the aging factor, so that the influence of an external environment and aging is removed, and the obtained gas concentration value is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of gas detection alarms, and in particular to a data processing method and device for a gas alarm, and a gas alarm. Background Art

[0002] With the development of technology, various types of gas alarms have emerged, which will sound an alarm when a gas leak is detected to reduce the harm caused by the gas leak.

[0003] In the prior art, a gas alarm obtains a voltage value through its own gas sensor, converts it into a corresponding gas concentration value, and then determines whether the gas concentration value is greater than an alarm threshold, and issues an alarm when the gas concentration is greater than the alarm threshold.

[0004] However, gas alarms are easily affected by external environments, such as temperature, humidity, and electromagnetic waves, and gas alarms will age over time, all of which can lead to inaccurate gas concentration values. Summary of the invention

[0005] The embodiments of the present application provide a data processing method, device and gas alarm for a gas alarm, which are used to solve the problem that the existing gas alarm is easily affected by the external environment, such as temperature, humidity, and electromagnetic waves, and the gas alarm will age after long-term use, which will lead to inaccurate gas concentration values.

[0006] In a first aspect, an embodiment of the present application provides a data processing method for a gas alarm, which is applied to a gas alarm, and the method includes:

[0007] Acquire multiple initial voltage values ​​collected by the gas sensor in the current sampling period, as well as a target operation scenario identifier and an aging factor, wherein the aging factor is used to indicate the aging degree of the gas alarm;

[0008] Determining the ratio of environmental filtering factors according to the target operation scenario identifier;

[0009] filtering the multiple initial voltage values ​​according to the environmental filtering factor ratio to obtain multiple target voltage values;

[0010] Determining an initial gas concentration value corresponding to an average value of the plurality of target voltage values ​​according to a preset correspondence relationship between voltage values ​​and concentration values;

[0011] A target gas concentration value is calculated according to the initial gas concentration value and the aging factor.

[0012] In a specific implementation, determining the ratio of environmental filtering factors according to the target operation scenario identifier includes:

[0013] According to the correspondence between the preset operation scenario identifier and the environmental influencing factor, determine multiple environmental influencing factors corresponding to the target operation scenario identifier and the influencing factor corresponding to each environmental influencing factor, wherein the influencing factor is less than a preset ratio threshold;

[0014] The largest influencing factor among the influencing factors corresponding to the multiple environmental influencing factors is used as the environmental filtering factor ratio.

[0015] In a specific implementation, the multiple initial voltage values ​​are filtered according to the environmental filtering factor ratio to obtain multiple target voltage values;

[0016] Sorting the multiple initial voltage values ​​according to the voltage values ​​to obtain a voltage value sequence;

[0017] The voltage values ​​satisfying the first preset condition or the second preset condition in the voltage value sequence are removed to obtain the multiple target voltage values; wherein the first preset condition is the voltage values ​​before the environmental filtering number in the voltage value sequence, and the second preset condition is the voltage values ​​after the environmental filtering number in the voltage value sequence, and the environmental filtering number is the product of the number of initial voltage values ​​and the ratio of the environmental filtering factor.

[0018] In a specific implementation, before acquiring a plurality of initial voltage values ​​collected by the gas sensor in the current sampling period, as well as the target operating scenario identifier and the aging factor, the method further includes:

[0019] Get the initial gas concentration value;

[0020] Putting the initial gas concentration value into the first concentration array in a concentration array set; the concentration array set includes a plurality of ordered concentration arrays;

[0021] Using the first concentration array as the target concentration array;

[0022] According to the concentration values ​​in the target concentration array, a transition concentration value corresponding to the target concentration array is generated, the transition concentration value is placed in a concentration array after the target concentration array, and the data in the target concentration array is cleared, and the concentration array after the target concentration array is used as the target concentration array, and this step is repeated until a transition concentration value corresponding to the last concentration array in the concentration array set is generated;

[0023] The ratio of the transition concentration value corresponding to the last concentration array to the preset concentration reference value is used as the aging factor.

[0024] In a specific implementation, generating the transition concentration value corresponding to the target concentration array according to the concentration value in the target concentration array includes:

[0025] When the number of concentration values ​​in the target concentration array reaches a target number threshold value corresponding to the target concentration array, determining whether a target difference between a maximum concentration value and a minimum concentration value in the target concentration array is less than a preset concentration difference threshold value;

[0026] If the target difference is less than the preset concentration difference threshold, the average value of the concentration values ​​in the target concentration array is used as the transition concentration value corresponding to the target concentration array.

[0027] In a specific embodiment, the method further comprises:

[0028] If the target difference is greater than or equal to the preset concentration difference threshold, the data in the target concentration array is cleared.

[0029] In a specific embodiment, the method further comprises:

[0030] Update the continuous error accumulation number corresponding to the target concentration array;

[0031] If the cumulative number of consecutive errors after updating reaches the preset invalid number, the data in all concentration arrays in the concentration array set are cleared.

[0032] In a specific embodiment, the method further comprises:

[0033] If the aging factor belongs to the preset aging value range, aging alarm information is output.

[0034] In a second aspect, an embodiment of the present application provides a data processing device for a gas alarm, comprising:

[0035] An acquisition module, used to acquire a plurality of initial voltage values ​​collected by the gas sensor in a current sampling period, as well as a target operation scenario identifier and an aging factor, wherein the aging factor is used to indicate the aging degree of the gas alarm;

[0036] Processing modules for:

[0037] Determining the ratio of environmental filtering factors according to the target operation scenario identifier;

[0038] filtering the multiple initial voltage values ​​according to the environmental filtering factor ratio to obtain multiple target voltage values;

[0039] Determining an initial gas concentration value corresponding to an average value of the plurality of target voltage values ​​according to a preset correspondence relationship between voltage values ​​and concentration values;

[0040] A target gas concentration value is calculated according to the initial gas concentration value and the aging factor.

[0041] In a third aspect, an embodiment of the present application provides a gas alarm, comprising:

[0042] Processor, memory, communication interface, gas sensor;

[0043] The memory is used to store executable instructions of the processor;

[0044] Wherein, the processor is configured to execute the data processing method of the gas alarm as described in any one of the first aspects by executing the executable instructions.

[0045] The data processing method, device and gas alarm of the gas alarm provided in the embodiment of the present application determine the ratio of environmental filtering factors according to the obtained target operation scenario identifier; then filter multiple initial voltage values ​​according to the ratio of environmental filtering factors to obtain multiple target voltage values; then determine the initial gas concentration value corresponding to the average value of the multiple target voltage values, and calculate the target gas concentration value in combination with the obtained aging factor. This solution removes the influence of the external environment and aging by filtering the initial voltage value and obtaining the target gas concentration value according to the aging factor, so that the obtained gas concentration value is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0047] Figure 1 A flow chart of a first embodiment of a method for processing data of a gas alarm provided by the present application;

[0048] Figure 2 A flow chart of a second embodiment of a data processing method for a gas alarm provided in the present application;

[0049] Figure 3 A flow chart of a third embodiment of the data processing method for a gas alarm provided in the present application;

[0050] Figure 4 A structural schematic diagram of an embodiment of a data processing device for a gas alarm provided by the present application;

[0051] Figure 5 A schematic diagram of the structure of a gas alarm provided in this application. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments made by ordinary technicians in this field under the enlightenment of the embodiments belong to the scope of protection of the present application.

[0053] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0054] With the development of science and technology, the emergence of gas alarms has greatly ensured people's safety in production and life. Gas alarms will sound an alarm when gas leaks are detected to reduce the harm caused by gas leaks.

[0055] In the prior art, the gas alarm obtains the voltage value through its own gas sensor, converts it into the corresponding gas concentration value, and then determines whether the gas concentration value is greater than the alarm threshold, and alarms when the gas concentration is greater than the alarm threshold. However, the gas alarm is easily affected by the external environment, such as temperature, humidity, and electromagnetic waves, and the gas alarm will age after long-term use, which will lead to the problem of inaccurate gas concentration values.

[0056] In view of the problems existing in the prior art, the inventor discovered during the research on the data processing method of the gas alarm that the voltage value affected by the external environment will become larger or smaller than the voltage value without external influence, so multiple initial voltage values ​​are obtained in each sampling period, and the excessively large and small voltage values ​​are removed to obtain the target voltage value. Then, the initial gas concentration value corresponding to the target voltage value is determined, and then combined with the aging factor to eliminate the influence of aging, the target gas concentration value is obtained, and the accuracy of the gas concentration value is improved. Based on the above-mentioned inventive concept, the data processing scheme of the gas alarm in this application is designed.

[0057] The following is an example of an application scenario of the data processing method for a gas alarm provided in this application.

[0058] For example, in this application scenario, a gas alarm is installed in the user's home. The gas alarm is an alarm for detecting gas and can sound an alarm when a gas leak is detected to protect the user's life and property.

[0059] The gas alarm collects multiple initial voltage values ​​through the gas sensor in each sampling period and calculates the gas concentration value at the end of the sampling period.

[0060] The gas alarm first obtains multiple initial voltage values ​​within the current sampling period, as well as the target operating scenario identifier and aging factor.

[0061] Then, according to the target operation scenario identifier, the ratio of the environmental filtering factor is determined; and according to the ratio of the environmental filtering factor, multiple initial voltage values ​​are filtered to obtain multiple target voltage values.

[0062] Then, according to the corresponding relationship between the preset voltage value and the concentration value, the initial gas concentration value corresponding to the average value of multiple target voltage values ​​is determined; and then combined with the aging factor, the target gas concentration value is calculated.

[0063] The target gas concentration value is compared with the alarm threshold, and an alarm is issued when the target gas concentration is greater than the alarm threshold, and an alarm message is output. After the user receives the alarm message, he can inspect and repair the gas components, ensuring user safety.

[0064] It should be noted that the above scenario is only an example of an application scenario provided by an embodiment of the present application. The embodiment of the present application does not limit the actual form of the various devices included in the scenario, nor does it limit the interaction method between the devices. In the specific application of the solution, it can be set according to actual needs.

[0065] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0066] Figure 1 This is a flow chart of the first embodiment of the data processing method for the gas alarm provided by the present application. The present embodiment of the present application describes the case where the gas alarm filters the multiple initial voltage values ​​obtained, determines the initial gas concentration value after obtaining the target voltage value, and then obtains the target gas concentration value in combination with the aging factor. The method in this embodiment can be implemented by software, hardware, or a combination of software and hardware. Figure 1 As shown, the data processing method of the gas alarm specifically includes the following steps:

[0067] S101: Acquire multiple initial voltage values ​​collected by the gas sensor in the current sampling period, as well as a target operation scenario identifier and an aging factor.

[0068] The gas alarm can collect multiple initial voltages in each sampling period, and then calculate the gas concentration value corresponding to the sampling period at the end of the sampling period.

[0069] In this step, when the gas alarm needs to calculate the gas concentration value, it first obtains multiple initial voltage values ​​collected by the gas sensor in the current sampling period, as well as the target operating scenario identifier and aging factor.

[0070] The aging factor is used to indicate the aging degree of the gas alarm. The greater the absolute value of the difference between the aging factor and 1, the higher the aging degree of the gas alarm. As the gas alarm is used for a longer time, the absolute value of the difference between the aging factor and 1 becomes larger.

[0071] It should be noted that the gas alarm can perform sampling at a preset frequency within the sampling period, can also perform sampling at random times, and can also perform sampling according to a preset sampling method. The embodiment of the present application does not limit the sampling method and can be set according to actual conditions.

[0072] S102: Determine the ratio of environmental filtering factors according to the target operation scenario identifier.

[0073] In this step, after the gas alarm obtains the initial voltage value, the target operating scenario identifier and the aging factor, in order to eliminate the influence of the external environment, it is necessary to determine the proportion of environmental filtering factors according to the target operating scenario identifier.

[0074] Specifically, according to the correspondence between the preset operation scenario identifier and the environmental influencing factors, a plurality of environmental influencing factors corresponding to the target operation scenario identifier and an influencing factor corresponding to each environmental influencing factor are determined.

[0075] It should be noted that the impact factor is less than the preset ratio threshold, and the preset ratio threshold is less than or equal to 0.5, and can be 0.5, 0.45, 0.3, etc. The embodiment of the present application does not limit the preset ratio threshold and can be set according to actual conditions.

[0076] Illustratively, Table 1 is a schematic table of the correspondence between the operating scenario identifiers and environmental influencing factors provided in this application.

[0077] Table 1

[0078] Running scene identification Environmental factors 01 Temperature: 0.15; Humidity: 0.2; Electromagnetic wave: 0.3 02 Temperature: 0.1; Humidity: 0.15; Electromagnetic wave: 0.35 03 Temperature: 0.15; Humidity: 0.3

[0079] As shown in Table 1, the operating scenarios are labeled 01, 02, and 03. 01 corresponds to three environmental influencing factors, namely, temperature, humidity, and electromagnetic waves. The influencing factor corresponding to temperature is 0.15, the influencing factor corresponding to humidity is 0.2, and the influencing factor corresponding to electromagnetic waves is 0.3. 02 corresponds to three environmental influencing factors, namely, temperature, humidity, and electromagnetic waves. The influencing factor corresponding to temperature is 0.1, the influencing factor corresponding to humidity is 0.15, and the influencing factor corresponding to electromagnetic waves is 0.35. 03 corresponds to two environmental influencing factors, namely, temperature and humidity. The influencing factor corresponding to temperature is 0.15, and the influencing factor corresponding to humidity is 0.3.

[0080] It should be noted that Table 1 is only an example of the correspondence between the operation scenario identifier and the environmental influencing factors. The embodiment of the present application does not limit the operation scenario identifier, environmental influencing factors, influencing factors, etc., and can be determined according to actual conditions.

[0081] Then, the largest influencing factor among the influencing factors corresponding to the multiple environmental influencing factors is taken as the environmental filtering factor ratio.

[0082] It should be noted that if the ratio of the environmental filtering factor is not an integer, it needs to be rounded.

[0083] S103: filtering the multiple initial voltage values ​​according to the ratio of the environmental filtering factors to obtain multiple target voltage values.

[0084] In this step, after the gas alarm obtains the environmental filtering factor ratio, it can filter multiple initial voltage values ​​according to the environmental filtering factor ratio to obtain multiple target voltage values.

[0085] Specifically, the multiple initial voltage values ​​are sorted according to the voltage values, and can be sorted in order from large to small, or in order from small to large, to obtain a voltage value sequence.

[0086] Then, the voltage values ​​that meet the first preset condition or the second preset condition in the voltage value sequence are removed to obtain multiple target voltage values; wherein the first preset condition is the voltage value before the environmental filtering number in the voltage value sequence, and the second preset condition is the voltage value after the environmental filtering number in the voltage value sequence, and the environmental filtering number is the product of the number of initial voltage values ​​and the ratio of the environmental filtering factor. The filtered voltage value is the voltage value affected by the external environment.

[0087] It should be noted that if the number of target voltage values ​​is only one, the target voltage value needs to be copied to obtain multiple identical target voltage values.

[0088] S104: Determine an initial gas concentration value corresponding to an average value of a plurality of target voltage values ​​according to a preset correspondence relationship between voltage values ​​and concentration values.

[0089] In this step, after obtaining multiple target voltage values, the gas alarm determines an initial gas concentration value corresponding to the average value of the multiple target voltage values ​​according to a preset correspondence between voltage values ​​and concentration values.

[0090] S105: Calculate the target gas concentration value according to the initial gas concentration value and the aging factor.

[0091] In this step, after the gas alarm obtains the initial gas concentration value, in order to eliminate the influence of aging, it is necessary to combine the aging factor and calculate the target gas concentration value.

[0092] Specifically, according to the initial gas concentration value and the aging factor, a preset correction algorithm is used to calculate the target gas concentration value. For example, the initial gas concentration value is divided by the aging factor to obtain the target gas concentration value.

[0093] Subsequently, it can be determined whether an alarm is needed based on the target gas concentration value.

[0094] The data processing method of the gas alarm provided in this embodiment determines the ratio of environmental filtering factors according to the obtained target operation scenario identifier; then, according to the ratio of environmental filtering factors, multiple initial voltage values ​​are filtered to obtain multiple target voltage values; after determining the initial gas concentration value corresponding to the average value of the multiple target voltage values, the target gas concentration value is calculated in combination with the obtained aging factor. This solution removes the influence of the external environment by filtering the initial voltage value, and obtains the target gas concentration value according to the aging factor, thereby removing the influence of aging, so that the obtained gas concentration value is more accurate. In addition, there is no need to add or change hardware, and the cost is low.

[0095] Figure 2 This is a flow chart of the second embodiment of the data processing method for the gas alarm provided by the present application. Based on the above embodiment, the present embodiment of the present application describes the situation in which the gas alarm generates an aging factor. Figure 2 As shown, the data processing method of the gas alarm specifically includes the following steps:

[0096] S201: Obtaining an initial gas concentration value.

[0097] In this step, the gas alarm needs to generate an aging factor before obtaining the target gas concentration value, and still needs to obtain multiple initial voltage values ​​in each sampling period to obtain the initial gas concentration value.

[0098] S202: Put the initial gas concentration value into the first concentration array in the concentration array set.

[0099] In this step, after the gas alarm obtains the initial gas concentration value, it puts it into the first concentration array in the concentration array set. The concentration array set includes multiple ordered concentration arrays.

[0100] S203: Using the first concentration array as the target concentration array.

[0101] In this step, after the gas alarm puts the initial gas concentration value into the first concentration array in the concentration array set, the first concentration array is used as the target concentration array.

[0102] S204: Generate a transition concentration value corresponding to the target concentration array according to the concentration value in the target concentration array, put the transition concentration value into the next concentration array of the target concentration array, clear the data in the target concentration array, and use the next concentration array of the target concentration array as the target concentration array. Repeat this step until a transition concentration value corresponding to the last concentration array in the concentration array set is generated.

[0103] In this step, after the gas alarm takes the first concentration array as the target concentration array, it generates a transition concentration value corresponding to the target concentration array based on the concentration value in the target concentration array, puts the transition concentration value into the next concentration array after the target concentration array, clears the data in the target concentration array, and then takes the next concentration array after the target concentration array as the target concentration array, repeating this step until the transition concentration value corresponding to the last concentration array in the concentration array set is generated.

[0104] S205: The ratio of the transition concentration value corresponding to the last concentration array to the preset concentration reference value is used as an aging factor.

[0105] In this step, after the gas alarm obtains the transition concentration value corresponding to the last concentration array in the concentration array set, it uses the ratio of the transition concentration value to the preset concentration reference value as the aging factor.

[0106] It should be noted that the preset concentration reference value may be 0.1%LEL, 0.2%LEL, 0.3%LEL, etc. The embodiment of the present application does not limit the preset concentration reference value and may be set according to actual conditions.

[0107] It can also be judged whether the aging factor belongs to the preset aging value range later. If the aging factor belongs to the preset aging value range, the aging alarm information is output. After the user obtains the aging alarm information, the gas alarm can be replaced.

[0108] It should be noted that the preset aging value range may be 0.5-1.5, 0.8-1.2, 0.9-1.1, etc. The embodiment of the present application does not limit the preset aging value range and may be set according to actual conditions.

[0109] It should be noted that the process of obtaining the aging factor and the process of generating the preset concentration reference value in this embodiment are both performed in the absence of gas leakage.

[0110] The data processing method for the gas alarm provided in this embodiment generates a transition concentration value corresponding to a target concentration array, places the transition concentration value into a concentration array following the target concentration array, until a transition concentration value corresponding to the last concentration array in the concentration array set is generated, and then uses the ratio of the transition concentration value corresponding to the last concentration array to a preset concentration reference value as an aging factor, so that the transition concentration value corresponding to the last concentration array can better reflect the aging condition, and the obtained aging factor is more accurate.

[0111] Figure 3 This is a flow chart of the third embodiment of the data processing method for the gas alarm provided by the present application. Based on the above embodiment, the present embodiment of the present application describes the situation in which the gas alarm generates the transition concentration value corresponding to the target concentration array according to the concentration value in the target concentration array. Figure 3 As shown, the data processing method of the gas alarm specifically includes the following steps:

[0112] S301: When the number of concentration values ​​in the target concentration array reaches the target number threshold corresponding to the target concentration array, determine whether the target difference between the maximum concentration value and the minimum concentration value in the target concentration array is less than the preset concentration difference threshold; if the target difference is less than the preset concentration difference threshold, execute step S302; if the target difference is greater than or equal to the preset concentration difference threshold, execute step S303.

[0113] In this step, when the concentration array in the concentration array set is used as the target concentration array, because the transition concentration value corresponding to the previous concentration array of the target concentration array will be placed in the target concentration array, or the acquired initial gas concentration value will be placed in the target concentration array, the concentration values ​​in the target concentration array will increase. When the number of concentration values ​​in the target concentration array reaches the target number threshold value corresponding to the target concentration array, it is determined whether the target difference between the maximum concentration value and the minimum concentration value in the target concentration array is less than the preset concentration difference threshold value, so as to determine whether the data in the target concentration array is affected by the external environment.

[0114] It should be noted that each concentration array in the concentration array set corresponds to a target quantity threshold, and the target quantity thresholds corresponding to different concentration arrays may be the same or different. The target quantity threshold may be 60, 24, 30, 12, etc. The embodiment of the present application does not limit the target quantity threshold, and it can be set according to actual conditions.

[0115] It should be noted that the preset concentration difference threshold may be 0.03% LEL, 0.05% LEL, 0.1% LEL, etc. The embodiment of the present application does not limit the preset concentration difference threshold, and it may be set according to actual conditions.

[0116] S302: Taking the average value of the concentration values ​​in the target concentration array as the transition concentration value corresponding to the target concentration array.

[0117] In this step, if the target difference is less than the preset concentration difference threshold, it means that the data in the target concentration array is not affected by the external environment but only by the aging condition. Then the average value of the concentration values ​​in the target concentration array is used as the transition concentration value corresponding to the target concentration array.

[0118] S303: Clear the data in the target concentration array.

[0119] In this step, if the target difference is greater than or equal to the preset concentration difference threshold, it means that the data in the target concentration array is affected by the external environment, the data in the target concentration array is unavailable, and the data in the target concentration array is cleared.

[0120] Then, when the number of concentration values ​​in the target concentration array reaches the target number threshold corresponding to the target concentration array again, the new target difference is re-determined whether it is less than the preset concentration difference threshold. If the new target difference is greater than or equal to the preset concentration difference threshold, the data in the target concentration array is cleared, and this process is repeated until the new target difference is less than the preset concentration difference threshold, and the average value of the concentration values ​​in the target concentration array is used as the transition concentration value corresponding to the target concentration array.

[0121] S304: Update the cumulative number of consecutive errors corresponding to the target concentration array.

[0122] In this step, the gas alarm needs to update the continuous error accumulation number corresponding to the target concentration array after obtaining the transition concentration value or clearing the data in the target concentration array each time.

[0123] After obtaining the transition concentration value, the gas alarm updates the cumulative number of consecutive errors corresponding to the target concentration array to 0.

[0124] After clearing the data in the target concentration array, the number of consecutive error accumulations is increased by one to obtain an updated number of consecutive error accumulations.

[0125] S305: If the updated cumulative number of consecutive errors reaches a preset invalid number, clearing the data in all concentration arrays in the concentration array set.

[0126] In this step, after the gas alarm obtains the updated cumulative number of consecutive errors, it determines whether the updated cumulative number of consecutive errors reaches the preset invalid number. If the updated cumulative number of consecutive errors reaches the preset invalid number, it means that the data in the concentration array in the concentration array set are unavailable, then the data in all concentration arrays in the concentration array set are cleared.

[0127] Exemplarily, there are four concentration arrays in the concentration array set. Every time the gas alarm obtains an initial gas concentration value, it is placed in the first concentration array until the number of concentration values ​​in the first concentration array reaches its corresponding target number threshold, and then it is determined whether the target difference is less than the preset concentration difference threshold.

[0128] If the target difference is greater than or equal to the preset concentration difference threshold, the data in the first concentration array is cleared, and the number of consecutive error accumulations is updated to determine whether it is necessary to clear the data in all concentration arrays in the concentration array set. Then, when the number of concentration values ​​in the first concentration array reaches its corresponding target number threshold again, the judgment is repeated until the target difference is less than the preset concentration difference threshold.

[0129] If the target difference is less than the preset concentration difference threshold, the average value of the concentration values ​​in the first concentration array is used as the transition concentration value corresponding to the first concentration array, and the transition concentration value is placed in the second concentration array, and the data in the first concentration array is cleared. When the concentration value in the first concentration array reaches its corresponding target quantity threshold again, this process is repeated.

[0130] For the second concentration array, the third concentration array, and the fourth concentration array, the implementation process is similar to that of the first concentration array and will not be repeated here.

[0131] The data processing method of the gas alarm provided in this embodiment determines whether the concentration value in the target concentration array is affected by the external environment by judging whether the target difference between the maximum concentration value and the minimum concentration value in the target concentration array is less than the preset concentration difference threshold. Then, the transition concentration value is determined using the concentration value that is not affected by the external environment, so that the transition concentration value and the aging factor are more accurate. In addition, the influence of the external environment is removed, so that the operating environment of the gas alarm is not restricted. The use of multiple arrays can effectively reduce the amount of data and reduce memory usage.

[0132] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0133] Figure 4This is a schematic diagram of the structure of the data processing device embodiment of the gas alarm provided by the present application; the device can be integrated into the gas alarm in the above method embodiment, or can be implemented by the gas alarm in the above method embodiment. Figure 4 As shown, the data processing device 40 of the gas alarm includes:

[0134] An acquisition module 41 is used to acquire a plurality of initial voltage values ​​collected by the gas sensor in a current sampling period, as well as a target operation scenario identifier and an aging factor, wherein the aging factor is used to indicate the aging degree of the gas alarm;

[0135] The processing module 42 is used for:

[0136] Determining the ratio of environmental filtering factors according to the target operation scenario identifier;

[0137] filtering the multiple initial voltage values ​​according to the environmental filtering factor ratio to obtain multiple target voltage values;

[0138] Determining an initial gas concentration value corresponding to an average value of the plurality of target voltage values ​​according to a preset correspondence relationship between voltage values ​​and concentration values;

[0139] A target gas concentration value is calculated according to the initial gas concentration value and the aging factor.

[0140] Furthermore, the processing module 42 is specifically configured to:

[0141] According to the correspondence between the preset operation scenario identifier and the environmental influencing factor, determine multiple environmental influencing factors corresponding to the target operation scenario identifier and the influencing factor corresponding to each environmental influencing factor, wherein the influencing factor is less than a preset ratio threshold;

[0142] The largest influencing factor among the influencing factors corresponding to the multiple environmental influencing factors is used as the environmental filtering factor ratio.

[0143] Furthermore, the processing module 42 is specifically configured to:

[0144] Sorting the multiple initial voltage values ​​according to the voltage values ​​to obtain a voltage value sequence;

[0145] The voltage values ​​satisfying the first preset condition or the second preset condition in the voltage value sequence are removed to obtain the multiple target voltage values; wherein the first preset condition is the voltage values ​​before the environmental filtering number in the voltage value sequence, and the second preset condition is the voltage values ​​after the environmental filtering number in the voltage value sequence, and the environmental filtering number is the product of the number of initial voltage values ​​and the ratio of the environmental filtering factor.

[0146] Furthermore, the acquisition module 41 is also used to obtain an initial gas concentration value;

[0147] Furthermore, the processing module 42 is also used for:

[0148] Putting the initial gas concentration value into the first concentration array in a concentration array set; the concentration array set includes a plurality of ordered concentration arrays;

[0149] Using the first concentration array as the target concentration array;

[0150] According to the concentration values ​​in the target concentration array, a transition concentration value corresponding to the target concentration array is generated, the transition concentration value is placed in a concentration array after the target concentration array, and the data in the target concentration array is cleared, and the concentration array after the target concentration array is used as the target concentration array, and this step is repeated until a transition concentration value corresponding to the last concentration array in the concentration array set is generated;

[0151] The ratio of the transition concentration value corresponding to the last concentration array to the preset concentration reference value is used as the aging factor.

[0152] Furthermore, the processing module 42 is also used for:

[0153] When the number of concentration values ​​in the target concentration array reaches a target number threshold value corresponding to the target concentration array, determining whether a target difference between a maximum concentration value and a minimum concentration value in the target concentration array is less than a preset concentration difference threshold value;

[0154] If the target difference is less than the preset concentration difference threshold, the average value of the concentration values ​​in the target concentration array is used as the transition concentration value corresponding to the target concentration array.

[0155] Furthermore, the processing module 42 is also used for:

[0156] If the target difference is greater than or equal to the preset concentration difference threshold, the data in the target concentration array is cleared.

[0157] Furthermore, the processing module 42 is also used to

[0158] Update the continuous error accumulation number corresponding to the target concentration array;

[0159] If the cumulative number of consecutive errors after updating reaches the preset invalid number, the data in all concentration arrays in the concentration array set are cleared.

[0160] Furthermore, the processing module 42 is also used to

[0161] If the aging factor belongs to the preset aging value range, aging alarm information is output.

[0162] The data processing device for the gas alarm provided in this embodiment is used to execute the technical solution of the gas alarm in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0163] Figure 5 This is a schematic diagram of the structure of a gas alarm provided in this application. Figure 5 As shown, the gas alarm 50 comprises:

[0164] Processor 51, memory 52, communication interface 53, and gas sensor 54;

[0165] The memory 52 is used to store executable instructions of the processor 51;

[0166] The processor 51 is configured to execute the technical solution of the gas alarm in any of the aforementioned method embodiments by executing the executable instructions.

[0167] Optionally, the memory 52 may be independent or integrated with the processor 51 .

[0168] Optionally, when the memory 52 is a device independent of the processor 51, the gas alarm 50 may further include:

[0169] The bus 55 , the gas sensor 54 , the memory 52 and the communication interface 53 are connected to the processor 51 via the bus 55 and communicate with each other. The communication interface 53 is used to communicate with other devices.

[0170] Optionally, the communication interface 53 may be implemented by a transceiver. The communication interface is used to implement communication between the database access device and other devices (such as a client, a read-write library, and a read-only library). The memory may include a random access memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.

[0171] The bus 55 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0172] The above-mentioned processor can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0173] The gas alarm is used to implement the technical solution of the gas alarm in any of the aforementioned method embodiments, and its implementation principle and technical effect are similar and will not be repeated here.

[0174] An embodiment of the present application also provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the technical solution provided by any of the aforementioned method embodiments is implemented.

[0175] An embodiment of the present application also provides a computer program product, including a computer program, which is used to implement the technical solution provided by any of the aforementioned method embodiments when executed by a processor.

[0176] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0177] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A data processing method for a gas alarm, It is characterized in that Applied to a gas alarm, the method comprises: Acquire multiple initial voltage values ​​collected by the gas sensor in the current sampling period, as well as a target operation scenario identifier and an aging factor, wherein the aging factor is used to indicate the aging degree of the gas alarm; Determining the ratio of environmental filtering factors according to the target operation scenario identifier; filtering the multiple initial voltage values ​​according to the environmental filtering factor ratio to obtain multiple target voltage values; Determining an initial gas concentration value corresponding to an average value of the plurality of target voltage values ​​according to a preset correspondence relationship between voltage values ​​and concentration values; A target gas concentration value is calculated according to the initial gas concentration value and the aging factor.

2. The method according to claim 1, It is characterized in that Determining the ratio of environmental filtering factors according to the target operation scenario identifier includes: According to the correspondence between the preset operation scenario identifier and the environmental influencing factor, determine multiple environmental influencing factors corresponding to the target operation scenario identifier and the influencing factor corresponding to each environmental influencing factor, wherein the influencing factor is less than a preset ratio threshold; The largest influencing factor among the influencing factors corresponding to the multiple environmental influencing factors is used as the environmental filtering factor ratio.

3. The method according to claim 1, It is characterized in that filtering the multiple initial voltage values ​​according to the environmental filtering factor ratio to obtain multiple target voltage values; Sorting the multiple initial voltage values ​​according to the voltage values ​​to obtain a voltage value sequence; The voltage values ​​satisfying the first preset condition or the second preset condition in the voltage value sequence are removed to obtain the multiple target voltage values; wherein the first preset condition is the voltage values ​​before the environmental filtering number in the voltage value sequence, and the second preset condition is the voltage values ​​after the environmental filtering number in the voltage value sequence, and the environmental filtering number is the product of the number of initial voltage values ​​and the ratio of the environmental filtering factor.

4. The method according to claim 1, It is characterized in that Before acquiring a plurality of initial voltage values ​​collected by the gas sensor in the current sampling period, as well as the target operation scenario identifier and the aging factor, the method further includes: Get the initial gas concentration value; Putting the initial gas concentration value into the first concentration array in a concentration array set; the concentration array set includes a plurality of ordered concentration arrays; Using the first concentration array as the target concentration array; According to the concentration values ​​in the target concentration array, a transition concentration value corresponding to the target concentration array is generated, the transition concentration value is placed in a concentration array after the target concentration array, and the data in the target concentration array is cleared, and the concentration array after the target concentration array is used as the target concentration array, and this step is repeated until a transition concentration value corresponding to the last concentration array in the concentration array set is generated; The ratio of the transition concentration value corresponding to the last concentration array to the preset concentration reference value is used as the aging factor.

5. The method according to claim 4, It is characterized in that The step of generating a transition concentration value corresponding to the target concentration array according to the concentration values ​​in the target concentration array includes: When the number of concentration values ​​in the target concentration array reaches a target number threshold value corresponding to the target concentration array, determining whether a target difference between a maximum concentration value and a minimum concentration value in the target concentration array is less than a preset concentration difference threshold value; If the target difference is less than the preset concentration difference threshold, the average value of the concentration values ​​in the target concentration array is used as the transition concentration value corresponding to the target concentration array.

6. The method according to claim 5, It is characterized in that The method further comprises: If the target difference is greater than or equal to the preset concentration difference threshold, the data in the target concentration array is cleared.

7. The method according to claim 5 or 6, It is characterized in that The method further comprises: Update the continuous error accumulation number corresponding to the target concentration array; If the cumulative number of consecutive errors after updating reaches the preset invalid number, the data in all concentration arrays in the concentration array set are cleared.

8. The method according to claim 4, It is characterized in that The method further comprises: If the aging factor belongs to the preset aging value range, aging alarm information is output.

9. A data processing device for a gas alarm, It is characterized in that include: An acquisition module, used to acquire a plurality of initial voltage values ​​collected by the gas sensor in a current sampling period, as well as a target operation scenario identifier and an aging factor, wherein the aging factor is used to indicate the aging degree of the gas alarm; Processing modules for: Determining the ratio of environmental filtering factors according to the target operation scenario identifier; filtering the multiple initial voltage values ​​according to the environmental filtering factor ratio to obtain multiple target voltage values; Determining an initial gas concentration value corresponding to an average value of the plurality of target voltage values ​​according to a preset correspondence relationship between voltage values ​​and concentration values; A target gas concentration value is calculated according to the initial gas concentration value and the aging factor.

10. A gas alarm, It is characterized in that include: Processor, memory, communication interface, gas sensor; The memory is used to store executable instructions of the processor; Wherein, the processor is configured to execute the data processing method of the gas alarm according to any one of claims 1 to 8 by executing the executable instructions.