Disclosure of Invention
The embodiment of the invention aims to provide a gas alarm method, a gas alarm device, electronic equipment and a storage medium, so as to reduce false alarm of a gas alarm. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a gas alarm method, where the method includes:
the method comprises the steps that a first moment of alarm request information generated by a gas alarm based on a gas concentration signal and a second moment of an ignition event generated by ignition equipment are obtained, the ignition equipment is used for igniting combustible gas for life use through ignition, and the ignition event is generated by the ignition equipment during ignition;
determining whether to generate an alarm signal for representing gas leakage or not based on the difference value between the first moment and the second moment;
and when the alarm signal is determined to be generated, the gas alarm is instructed to generate the alarm signal.
Optionally, the first time and the second time are both one; determining whether to generate an alarm signal for characterizing gas leakage based on a difference between the first time and the second time, comprising:
when the first moment is within a preset time period before the second moment, determining to generate an alarm signal;
determining not to generate the alarm signal when the first time is outside a preset time period before the second time or when the second time is before the first time.
Optionally, the number of the ignition events sent by the ignition device is multiple, each ignition event corresponds to a second time, and whether to generate an alarm signal for indicating gas leakage is determined based on a difference between the first time and the second time, including:
when the at least one second moment is positioned before the first moment and the difference value between the latest second moment in the plurality of second moments and the first moment is less than or equal to a first preset time difference threshold value, determining not to generate an alarm signal;
and determining to generate an alarm signal when at least one second moment is before the first moment and the difference value between the latest second moment and the first moment is greater than a first preset time difference threshold value.
Optionally, the first time is multiple, and whether to generate an alarm signal for indicating gas leakage is determined based on a difference between the first time and the second time, including:
determining to generate an alarm signal and instructing the ignition device to inhibit ignition if at least one first moment is before a second moment;
when the plurality of first moments are all located after the second moment and the difference value between the latest first moment and the second moment in the plurality of first moments is smaller than or equal to a second preset time difference threshold value, determining not to generate an alarm signal;
and determining to generate an alarm signal when the plurality of first moments are all located after the second moment and the difference value between the latest first moment and the second moment in the plurality of first moments is greater than a second preset time difference threshold value.
Optionally, determining whether to generate an alarm signal for indicating gas leakage based on a difference between the first time and the second time includes:
when a detection signal of a human body detected by human body detection equipment is acquired and the first time is within a preset time period before the second time, determining to generate an alarm signal;
and when the detection signal that the human body detection equipment detects the human body is obtained and the first time is within a preset time period after the second time, determining not to generate the alarm signal.
Instruct gas alarm to generate alarm signal, include:
when a detection signal of a human body detected by human body detection equipment is acquired, indicating a gas alarm to generate voice alarm information so that the gas alarm performs voice alarm;
and when the detection signal of the human body detection equipment is not acquired, indicating the gas alarm to generate a remote alarm signal so that the gas alarm sends the remote alarm signal to the remote equipment.
In a second aspect, an embodiment of the present invention provides a gas alarm device, where the device includes:
the ignition device is used for igniting combustible gas for life use by igniting, and the ignition event is generated by the ignition device during ignition;
the determining module is used for determining whether to generate an alarm signal for representing gas leakage or not based on the difference value between the first moment and the second moment;
and the indicating module is used for indicating the gas alarm to generate an alarm signal when the alarm signal is determined to be generated.
Optionally, the first time and the second time are both one; a determination module specifically configured to:
when the first moment is within a preset time period before the second moment, determining to generate an alarm signal;
determining not to generate the alarm signal when the first time is outside a preset time period before the second time or when the second time is before the first time.
Optionally, the number of the ignition events sent by the ignition device is multiple, and each ignition event corresponds to a second time, and the determining module is specifically configured to:
when the at least one second moment is positioned before the first moment and the difference value between the latest second moment in the plurality of second moments and the first moment is less than or equal to a first preset time difference threshold value, determining not to generate an alarm signal;
and determining to generate an alarm signal when at least one second moment is before the first moment and the difference value between the latest second moment and the first moment is greater than a first preset time difference threshold value.
Optionally, the first time is multiple, and the determining module is specifically configured to:
determining to generate an alarm signal and instructing the ignition device to inhibit ignition if at least one first moment is before a second moment;
when the plurality of first moments are all located after the second moment and the difference value between the latest first moment and the second moment in the plurality of first moments is smaller than or equal to a second preset time difference threshold value, determining not to generate an alarm signal;
and determining to generate an alarm signal when the plurality of first moments are all located after the second moment and the difference value between the latest first moment and the second moment in the plurality of first moments is greater than a second preset time difference threshold value.
Optionally, the determining module is specifically configured to:
when a detection signal of a human body detected by human body detection equipment is acquired and the first time is within a preset time period before the second time, determining to generate an alarm signal;
and when the detection signal that the human body detection equipment detects the human body is obtained and the first time is within a preset time period after the second time, determining not to generate the alarm signal.
Optionally, the indication module is specifically configured to:
when a detection signal of a human body detected by human body detection equipment is acquired, indicating a gas alarm to generate voice alarm information so that the gas alarm performs voice alarm;
and when the detection signal of the human body detection equipment is not acquired, indicating the gas alarm to generate a remote alarm signal so that the gas alarm sends the remote alarm signal to the remote equipment.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions capable of being executed by the processor, and the processor is caused by the machine-executable instructions to: the steps of the gas alarm method provided by the first aspect are realized.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the gas alarm method provided in the first aspect are implemented.
In a fifth aspect, embodiments of the present invention further provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps of the gas alarm method provided in the first aspect.
In a sixth aspect, embodiments of the present invention further provide a computer program, which when run on a computer, causes the computer to execute the steps of the gas alarm method provided in the first aspect.
The embodiment of the invention provides a gas alarm method, a gas alarm device, electronic equipment and a storage medium, a first moment of alarm request information generated by the gas alarm based on the gas concentration signal and a second moment of ignition event generation of the ignition device can be obtained, then determining whether to generate an alarm signal for representing gas leakage or not based on the difference value between the first moment and the second moment, and finally indicating the gas alarm to generate the alarm signal when determining to generate the alarm signal, in the embodiment of the invention, whether the alarm signal for representing the gas leakage is generated or not is determined based on the difference value between the first time and the second time, the condition of alarm request information generated by the gas alarm based on the gas concentration signal and the condition of ignition can be integrated, the alarm signal is generated, so that the problem of false alarm caused by the generation of the alarm signal only based on the gas can be effectively reduced. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the prior art, when people use gas, the ignition device for igniting the gas usually has the condition that ignition cannot be carried out in a short time, so that a small amount of gas which is not combusted leaks to form local high-concentration gas, the local high-concentration gas can be dissipated quickly practically, and potential safety hazards cannot exist. However, when the local high-concentration gas is detected by the gas alarm, the gas alarm is triggered to alarm. Causing false alarm and unnecessary confusion of people, so that the false alarm of the gas alarm is needed to be reduced.
In order to solve the problems in the prior art, embodiments of the present invention provide a gas alarm method, a gas alarm device, an electronic device, and a storage medium, so as to reduce false alarms of a gas alarm.
In the following, a gas alarm method according to an embodiment of the present invention is first described, as shown in fig. 1, which is a flowchart of a first implementation manner of a gas alarm method according to an embodiment of the present invention, where the method may include:
s110, acquiring a first moment of alarm request information generated by the gas alarm based on a gas concentration signal and a second moment of generating an ignition event by the ignition device, wherein the ignition device is used for igniting combustible gas for life use by ignition, and the ignition event is generated by the ignition device during ignition;
s120, determining whether to generate an alarm signal for representing gas leakage or not based on the difference value between the first moment and the second moment;
and S130, when the alarm signal is determined to be generated, indicating the gas alarm to generate the alarm signal.
In some examples, this gas alarm and ignition equipment are smart machine, and this gas alarm also can detect the gas, also can carry out subsequent processing based on gas concentration, can also send gas concentration with this gas alarm communication connection backend device. For example, the gas alarm may generate an alarm event upon alarm request information generated based on the gas concentration signal, and transmit the alarm event to a backend device communicatively connected to the gas alarm.
The gas alarm can generate a gas concentration signal when collecting gas with any concentration, and then generates alarm request information based on the gas concentration signal, or generates alarm request information when the gas concentration represented by the gas concentration signal is greater than a preset gas concentration threshold value.
The preset gas concentration threshold is a value set empirically in advance, and may be set to be low, for example, set to 1%, or may be set to be high, for example, set to 5%, which is not limited herein.
The ignition device may generate an ignition event upon ignition and transmit the ignition event to a backend device communicatively coupled to the ignition device. The ignition device can be a device such as an intelligent gas stove or an intelligent wall-mounted stove. The ignition device may take the moment of ignition as the moment of generating the ignition event when generating the ignition event.
In some examples, the gas alarm and the ignition device may be connected to each other through a local area network, and may also be connected to the same IOT (Internet Of Things) platform. Wherein, this gas alarm and ignition equipment can be located different positions, and the mounted position of this gas alarm can be based on among the prior art to the mounting requirement of gas alarm confirm, and here is no longer repeated.
In still other examples, the gas alarm method of the embodiment of the invention can be applied to an IOT platform, a gas alarm and an ignition device.
When the method is applied to the IOT platform, the gas alarm sends the alarm event to the IOT platform, and the ignition device also sends the ignition event to the IOT platform, so that the IOT platform can acquire the alarm event sent by the gas alarm and the ignition event sent by the ignition device. The IOT platform may then obtain a first time from the alarm event for the alarm request information generated by the gas alarm based on the gas concentration signal, and obtain a second time from the ignition event for the ignition device to generate the ignition event.
When the method is applied to the gas alarm, the ignition device can send the ignition event to the gas alarm, and the gas alarm can acquire the ignition event sent by the ignition device and the alarm event generated by the ignition device, acquire a first moment of alarm request information generated by the gas alarm based on the gas concentration signal from the alarm event and acquire a second moment of the ignition event generated by the ignition device from the ignition event.
When the method is applied to the ignition device, the gas alarm can send the alarm event to the ignition device, the ignition device can obtain the alarm event sent by the gas alarm and the ignition event generated by the ignition device, obtain the first moment of the alarm request information generated by the gas alarm based on the gas concentration signal from the alarm event, and obtain the second moment of the ignition event generated by the ignition device from the ignition event.
After the device applying the gas alarm method of the embodiment of the invention obtains the first time and the second time, whether an alarm signal representing gas leakage is generated or not can be determined based on the difference value between the first time and the second time in order to reduce false alarm; and further, when the alarm signal is determined to be generated, the gas alarm is instructed to generate the alarm signal to alarm. The gas alarm may be instructed not to generate an alarm signal when it is determined not to generate an alarm signal.
Therefore, in the embodiment of the invention, whether the alarm signal for representing the gas leakage is generated is determined based on the difference value between the first time and the second time, the alarm signal can be generated by combining the condition of the alarm request information generated by the gas alarm based on the gas concentration signal and the condition of ignition, and the problem of false alarm caused by the generation of the alarm signal based on the gas can be effectively reduced.
In some examples, the first time may be one or more than one; similarly, the second time may be one or more.
When the first time and the second time are both one, on the basis of the gas alarm method shown in fig. 1, an embodiment of the present invention further provides a possible implementation manner, as shown in fig. 2, which is a flowchart of a second implementation manner of the gas alarm method according to the embodiment of the present invention, where the method may include:
s210, acquiring a first moment of alarm request information generated by the gas alarm based on a gas concentration signal and a second moment of generating an ignition event by the ignition device, wherein the ignition device is used for igniting combustible gas for life use by ignition, and the ignition event is generated by the ignition device during ignition;
s220, when the first moment is within a preset time period before the second moment, determining to generate an alarm signal;
s230, determining not to generate an alarm signal when the first time is out of a preset time period before the second time or when the second time is before the first time;
and S240, when the alarm signal is determined to be generated, indicating the gas alarm to generate the alarm signal.
In some examples, the first time of the alarm request message generated by the gas alarm based on the gas concentration signal may be the same as or different from the second time of the ignition device generating the ignition event.
When the first time is the same as the second time, because the gas alarm and the ignition device are located at different positions, it can be said that when the ignition device ignites, gas is diffused from a gas outlet of the ignition device to the installation position of the gas alarm, and at this time, it can be determined that an alarm signal is generated.
If the first time is before the second time, potential safety hazards may exist when the ignition device ignites, and to this end, when the first time is within a preset time period before the second time, in order to avoid a risk that the gas concentration is still relatively high within a period of time after the alarm request information generated by the gas alarm based on the gas concentration signal, the alarm signal may be determined to be generated when the ignition event is acquired within the period of time; that is, when the first time is within a preset time period before the second time, it is determined that the alarm signal is generated.
In some examples, upon determining to generate the warning signal, the gas alarm may be instructed to generate the warning signal and the ignition device may be instructed to inhibit ignition.
When the first moment is located outside the preset time period before the second moment, the gas concentration can be reduced to be within the safety range at the second moment, and at the moment, the ignition equipment cannot have potential safety hazard if ignition is carried out, so that at the moment, if an ignition event is obtained, an alarm signal does not need to be generated.
In still other examples, if the first time is after the second time, indicating that gas is leaking after ignition, and the safety hazard is relatively small, the alarm signal may not be generated. Therefore, it may be determined not to generate the alarm signal when the first time is outside a preset time period before the second time or when the second time is before the first time. Thereby the false alarm of the gas alarm can be reduced.
In some examples, the number of firing events sent by the firing device is multiple, and each firing event corresponds to a second time, in which case the second time is multiple.
When the first time is one, and the second times are multiple, on the basis of the gas alarm method shown in fig. 1, an embodiment of the present invention further provides a possible implementation manner, and as shown in fig. 3, the method is a flowchart of a third implementation manner of the gas alarm method according to the embodiment of the present invention, and the method may include:
s310, acquiring a first moment of alarm request information generated by the gas alarm based on the gas concentration signal and a second moment of generating an ignition event by the ignition device, wherein the ignition device is used for igniting combustible gas for life use by ignition, and the ignition event is generated by the ignition device during ignition;
s320, when at least one second moment is before the first moment and the difference value between the latest second moment in the second moments and the first moment is less than or equal to a first preset time difference threshold value, determining not to generate an alarm signal;
s330, when at least one second moment is before the first moment and the difference value between the latest second moment and the first moment is greater than a first preset time difference threshold value, determining to generate an alarm signal;
and S340, when the alarm signal is determined to be generated, indicating the gas alarm to generate the alarm signal.
In some examples, when the at least one second time is before the first time, it may be said that the ignition device is ignited before the gas is diffused to the gas alarm, in which case the gas is usually partially diffused due to insufficient combustion of the ignition device or unsuccessful ignition of the ignition device. However, there is a possibility of gas diffusion due to gas pipeline leakage, and therefore, in order to exclude the case that the gas alarm device generates the alarm request message due to gas pipeline leakage, a first preset time difference threshold may be set, and when a difference between the latest second time of the plurality of second times and the first time is less than or equal to the first preset time difference threshold, it may be determined that the gas diffusion is due to unsuccessful ignition of the ignition device. It may be determined that no alarm signal is generated.
If the difference value between the latest second moment and the first moment is greater than a first preset time difference threshold value, the fact that the gas diffusion is not caused by unsuccessful ignition or insufficient combustion of ignition equipment is indicated, and at the moment, an alarm signal can be determined to be generated; and then the gas alarm is instructed to generate an alarm signal.
By the embodiment of the invention, the false alarm of the gas alarm can be reduced on the premise of ensuring the safety.
In some examples, when the first time is multiple and the second time is one, on the basis of the gas alarm method shown in fig. 1, an embodiment of the present invention further provides a possible implementation manner, as shown in fig. 4, which is a flowchart of a fourth implementation manner of the gas alarm method according to the embodiment of the present invention, and the method may include:
s410, acquiring a first moment of alarm request information generated by the gas alarm based on the gas concentration signal and a second moment of generating an ignition event by the ignition device, wherein the ignition device is used for igniting combustible gas for life use by ignition, and the ignition event is generated by the ignition device during ignition;
s420, when at least one first moment is before a second moment, determining to generate an alarm signal and indicating ignition equipment to prohibit ignition;
s430, when the plurality of first moments are all behind the second moment and the difference value between the latest first moment and the second moment in the plurality of first moments is less than or equal to a second preset time difference threshold value, determining not to generate an alarm signal;
s440, when the plurality of first moments are all behind the second moment and the difference value between the latest first moment and the second moment in the plurality of first moments is larger than a second preset time difference threshold value, determining to generate an alarm signal;
and S450, when the alarm signal is determined to be generated, indicating the gas alarm to generate the alarm signal.
In some examples, when the at least one first time is before the second time, it may be said that the gas alarm and the ignition device are in different positions, it may be said that when the ignition device ignites, gas has diffused from the gas outlet of the ignition device to the installation position of the gas alarm, and at this time, if the ignition device ignites successfully, there may be a safety hazard, and therefore, in order to prevent a safety problem, it may be determined that an alarm signal is generated and the ignition device is instructed to prohibit ignition. Thus, open fire can be avoided, thereby avoiding safety problems.
In some examples, when the first time of the alarm request information generated based on the gas concentration signal is after the second time, and the alarm request information generated based on the gas concentration signal is multiple times, the alarm request information may be caused by partial gas diffusion due to insufficient combustion of the ignition device or unsuccessful ignition of the ignition device. Possibly also due to gas duct leakage.
Therefore, in order to exclude the situation of the alarm request information generated based on the gas concentration signal caused by the gas pipeline leakage, a second preset time difference threshold value may be set, and when the plurality of first moments are all located after the second moment and the difference value between the latest first moment and the second moment in the plurality of first moments is less than or equal to the second preset time difference threshold value, it may be indicated that the gas diffusion is caused by the ignition failure of the ignition device or the insufficient combustion of the ignition device, and at this time, it may be determined that the alarm signal is not generated.
If the plurality of first moments are all located after the second moment and the difference value between the latest first moment and the second moment in the plurality of first moments is larger than a second preset time difference threshold value, it is indicated that the gas diffusion is not caused by the fact that ignition of the ignition device is unsuccessful or combustion is insufficient and is caused by gas pipeline leakage, and therefore, the generation of an alarm signal can be determined. And then the gas alarm is instructed to generate an alarm signal.
Therefore, false alarm of the gas alarm can be reduced on the premise of ensuring safety.
On the basis of the gas alarm method shown in fig. 1, an embodiment of the present invention further provides a possible implementation manner, and as shown in fig. 5, the method is a flowchart of a fifth implementation manner of the gas alarm method in the embodiment of the present invention, and the method may include:
s510, acquiring a first moment of alarm request information generated by a gas alarm based on a gas concentration signal and a second moment of generating an ignition event by ignition equipment, wherein the ignition equipment is used for igniting combustible gas for life use by ignition, and the ignition event is generated by the ignition equipment during ignition;
s520, when a detection signal that the human body detection equipment detects a human body is obtained and the first time is within a preset time period before the second time, determining to generate an alarm signal;
s530, when a detection signal of a human body detected by the human body detection equipment is obtained and the first time is within a preset time period after the second time, determining that an alarm signal is not generated;
and S540, when the alarm signal is determined to be generated, indicating the gas alarm to generate the alarm signal.
In some examples, there may also be human activity in a scenario where gas alarms and ignition devices are used, for example, a person is moving in the scenario or a person is stationary in the scenario. In order to avoid false alarm of a gas alarm when a person is in the scene and protect the personal safety of the person. In the embodiment of the invention, the gas alarm and the ignition device can also be in communication connection with the human body detection device, so that the device applying the gas alarm method of the embodiment of the invention can acquire the detection signal when the human body detection device detects the human body. The human body detection device may be an image detection device or an infrared detection device.
When the device applying the gas alarm method of the embodiment of the invention acquires the detection signal, it can be said that there is a person in the scene, at this time, it can be determined whether the first time is within a preset time period before the second time, if so, in order to avoid potential safety hazard due to the fact that the gas concentration in the scene is still high at the second time, an alarm signal can be generated, and the ignition device can be instructed to prohibit ignition.
If the first moment is judged to be before the second moment and is not within the preset time period before the second moment, the gas concentration is reduced to be within the safety range, and at the moment, the alarm signal can be determined not to be generated.
When the device applying the gas alarm method of the embodiment of the invention acquires the detection signal, and the first time is within the preset time period after the second time, it can be shown that the gas diffused in the scene is caused by unsuccessful ignition or insufficient gas combustion after the first time, and at this time, it can be determined that the alarm signal is not generated. If the first time is located outside a preset time period after the second time, it can be stated that the gas diffused in the scene is not unsuccessfully ignited or caused by insufficient gas combustion, and it can be determined that an alarm signal is generated.
Therefore, when a human body is detected, the false alarm of the gas alarm can be reduced on the premise of ensuring the personal safety.
In some examples, when the gas alarm is instructed to generate an alarm signal, a person may or may not be present in a scene in which the gas alarm is deployed, and in order to remind people in time, on the basis of the embodiment shown in any one of fig. 1 to 5, an implementation manner for instructing the gas alarm to generate an alarm signal is further provided in the embodiments of the present invention, for example:
when a detection signal of a human body detected by human body detection equipment is acquired, indicating a gas alarm to generate voice alarm information so that the gas alarm performs voice alarm;
and when the detection signal of the human body detection equipment is not acquired, indicating the gas alarm to generate a remote alarm signal so that the gas alarm sends the remote alarm signal to the remote equipment.
When a detection signal that the human body detection device detects a human body is acquired, it can be stated that a person is in a scene monitored by the human body detection device, at the moment, the gas alarm can be instructed to generate voice alarm information, and then the gas alarm broadcasts the voice alarm information to perform voice alarm, so that the person in the monitored scene can be reminded.
When the detection signal of the human body detection device is not obtained, it is indicated that no person is in the scene monitored by the human body detection device, and at the moment, in order to remind people in time, the gas alarm can be instructed to generate a remote alarm signal.
In some examples, the gas alarm may store identification information of the remote device, where the identification information may be an IP address and an MAC address of the remote device, or an email address and a mobile phone number of the remote device. The remote device may be a smartphone or a personal computer with communication capabilities. After the gas alarm acquires information indicating generation of a remote alarm signal, the gas alarm can generate the remote alarm signal, and then the generated remote alarm signal is sent to the remote equipment based on the identification information of the remote equipment.
The remote alarm signal can be character information, voice information, video information or the combination information of at least two of the three kinds of information. The video information may contain image frames of the ignition device.
Therefore, when the alarm signal is generated, the alarm signal can be timely notified to related personnel.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a gas alarm device, as shown in fig. 6, which is a schematic structural diagram of the gas alarm device according to the embodiment of the present invention, and the gas alarm device may include:
the acquiring module 610 is configured to acquire a first time of alarm request information generated by the gas alarm based on the gas concentration signal and a second time of an ignition event generated by the ignition device, where the ignition device is configured to ignite combustible gas for life use by ignition, and the ignition event is generated by the ignition device during ignition;
a determining module 620, configured to determine whether to generate an alarm signal for indicating gas leakage based on a difference between the first time and the second time;
and an indicating module 630, configured to instruct the gas alarm to generate an alarm signal when it is determined that the alarm signal is generated.
According to the gas alarm device provided by the embodiment of the invention, the first time of the alarm request information generated by the gas alarm device based on the gas concentration signal and the second time of the ignition event generated by the ignition device can be obtained, then whether the alarm signal for representing the gas leakage is generated or not is determined based on the difference value between the first time and the second time, and finally, when the alarm signal is determined to be generated, the gas alarm device is instructed to generate the alarm signal.
In some examples, the first time and the second time are both one; the determining module 620 is specifically configured to:
when the first moment is within a preset time period before the second moment, determining to generate an alarm signal;
determining not to generate the alarm signal when the first time is outside a preset time period before the second time or when the second time is before the first time.
In some examples, the number of firing events sent by the firing device is multiple, and each firing event corresponds to a second time, and the determining module 620 is specifically configured to:
when the at least one second moment is positioned before the first moment and the difference value between the latest second moment in the plurality of second moments and the first moment is less than or equal to a first preset time difference threshold value, determining not to generate an alarm signal;
and determining to generate an alarm signal when at least one second moment is before the first moment and the difference value between the latest second moment and the first moment is greater than a first preset time difference threshold value.
In some examples, the first time is multiple, and the determining module 620 is specifically configured to:
determining to generate an alarm signal and instructing the ignition device to inhibit ignition if at least one first moment is before a second moment;
when the plurality of first moments are all located after the second moment and the difference value between the latest first moment and the second moment in the plurality of first moments is smaller than or equal to a second preset time difference threshold value, determining not to generate an alarm signal;
and determining to generate an alarm signal when the plurality of first moments are all located after the second moment and the difference value between the latest first moment and the second moment in the plurality of first moments is greater than a second preset time difference threshold value.
In some examples, the determining module 620 is specifically configured to:
when a detection signal of a human body detected by human body detection equipment is acquired and the first time is within a preset time period before the second time, determining to generate an alarm signal;
and when the detection signal that the human body detection equipment detects the human body is obtained and the first time is within a preset time period after the second time, determining not to generate the alarm signal.
In some examples, the indicating module 630 is specifically configured to:
when a detection signal of a human body detected by human body detection equipment is acquired, indicating a gas alarm to generate voice alarm information so that the gas alarm performs voice alarm;
and when the detection signal of the human body detection equipment is not acquired, indicating the gas alarm to generate a remote alarm signal so that the gas alarm sends the remote alarm signal to the remote equipment.
An embodiment of the present invention further provides an electronic device, as shown in fig. 7, which is a schematic structural diagram of the electronic device to which a gas alarm method according to the embodiment of the present invention is applied, where the electronic device may include a processor 701 and a machine-readable storage medium 702, where the machine-readable storage medium 702 stores machine-executable instructions that can be executed by the processor 701, and the processor 701 is caused by the machine-executable instructions to: the steps of the gas alarm method shown in any one of the above embodiments are implemented, for example, as follows:
the method comprises the steps that a first moment of alarm request information generated by a gas alarm based on a gas concentration signal and a second moment of an ignition event generated by ignition equipment are obtained, the ignition equipment is used for igniting combustible gas for life use through ignition, and the ignition event is generated by the ignition equipment during ignition;
determining whether to generate an alarm signal for representing gas leakage or not based on the difference value between the first moment and the second moment;
and when the alarm signal is determined to be generated, the gas alarm is instructed to generate the alarm signal.
The machine-readable storage medium 702 may include a Random Access Memory (RAM) and may also include a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor 701 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
According to the electronic equipment provided by the embodiment of the invention, the first time of the alarm request information generated by the gas alarm based on the gas concentration signal and the second time of the ignition event generated by the ignition equipment can be obtained, then whether the alarm signal for representing gas leakage is generated or not is determined based on the difference value between the first time and the second time, and finally, when the alarm signal is determined to be generated, the gas alarm is instructed to generate the alarm signal.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the gas alarm method shown in any of the above embodiments are implemented, for example, the following steps may be implemented:
the method comprises the steps that a first moment of alarm request information generated by a gas alarm based on a gas concentration signal and a second moment of an ignition event generated by ignition equipment are obtained, the ignition equipment is used for igniting combustible gas for life use through ignition, and the ignition event is generated by the ignition equipment during ignition;
determining whether to generate an alarm signal for representing gas leakage or not based on the difference value between the first moment and the second moment;
and when the alarm signal is determined to be generated, the gas alarm is instructed to generate the alarm signal.
The computer-readable storage medium provided by the embodiment of the invention can acquire the first time of the alarm request information generated by the gas alarm based on the gas concentration signal and the second time of the ignition event generated by the ignition device, then determining whether to generate an alarm signal for representing gas leakage or not based on the difference value between the first moment and the second moment, and finally indicating the gas alarm to generate the alarm signal when determining to generate the alarm signal, in the embodiment of the invention, whether the alarm signal for representing the gas leakage is generated or not is determined based on the difference value between the first time and the second time, the condition of alarm request information generated by the gas alarm based on the gas concentration signal and the condition of ignition can be integrated, the alarm signal is generated, so that the problem of false alarm caused by the generation of the alarm signal only based on the gas can be effectively reduced.
Embodiments of the present invention further provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps of a gas alarm method shown in any of the above embodiments, for example, the following steps may be performed:
the method comprises the steps that a first moment of alarm request information generated by a gas alarm based on a gas concentration signal and a second moment of an ignition event generated by ignition equipment are obtained, the ignition equipment is used for igniting combustible gas for life use through ignition, and the ignition event is generated by the ignition equipment during ignition;
determining whether to generate an alarm signal for representing gas leakage or not based on the difference value between the first moment and the second moment;
and when the alarm signal is determined to be generated, the gas alarm is instructed to generate the alarm signal.
The computer program product containing the instructions provided by the embodiment of the invention can acquire the first time of the alarm request information generated by the gas alarm based on the gas concentration signal and the second time of the ignition event generated by the ignition equipment, then determining whether to generate an alarm signal for representing gas leakage or not based on the difference value between the first moment and the second moment, and finally indicating the gas alarm to generate the alarm signal when determining to generate the alarm signal, in the embodiment of the invention, whether the alarm signal for representing the gas leakage is generated or not is determined based on the difference value between the first time and the second time, the condition of alarm request information generated by the gas alarm based on the gas concentration signal and the condition of ignition can be integrated, the alarm signal is generated, so that the problem of false alarm caused by the generation of the alarm signal only based on the gas can be effectively reduced.
An embodiment of the present invention further provides a computer program, which when running on a computer, causes the computer to execute the steps of the gas alarm method shown in any one of the above embodiments, for example, the following steps may be executed:
the method comprises the steps that a first moment of alarm request information generated by a gas alarm based on a gas concentration signal and a second moment of an ignition event generated by ignition equipment are obtained, the ignition equipment is used for igniting combustible gas for life use through ignition, and the ignition event is generated by the ignition equipment during ignition;
determining whether to generate an alarm signal for representing gas leakage or not based on the difference value between the first moment and the second moment;
and when the alarm signal is determined to be generated, the gas alarm is instructed to generate the alarm signal.
According to the computer program provided by the embodiment of the invention, the first time of the alarm request information generated by the gas alarm based on the gas concentration signal and the second time of the ignition event generated by the ignition device can be obtained, then whether the alarm signal for representing the gas leakage is generated or not is determined based on the difference value between the first time and the second time, and finally, when the alarm signal is determined to be generated, the gas alarm is instructed to generate the alarm signal.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.