Kitchen fire leaving alarm method, device and equipment and storage medium
Through the combination of the camera and the range hood, a humanoid recognition algorithm is used to determine whether there is someone in the kitchen, and trigger a voice alarm and cut off the fire source when the fire is fired and the fire source is cut off, solving the problems of low monitoring accuracy and inability to linkage in the existing technology, and effectively guaranteeing kitchen safety.
Patent Information
- Application Number
- CN202510313947.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-06-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing kitchen fire separation monitoring technology has problems such as low accuracy, high false alarm rate, inability to accurately distinguish between humanoid and non-humanoid objects, and inability to link with kitchen stove power supply or gas valves, which makes it difficult to eliminate safety hazards.
The camera is connected to the exhaust hood, and the humanoid recognition algorithm is used to determine whether there is someone in the kitchen. When the exhaust hood is turned on and there is no one, it is determined to be a fire-off state, and the duration is recorded. When the duration reaches or exceeds the preset alarm delay time, a voice alarm is triggered and can be linked to the control circuit of the kitchen stove power supply or gas valve to cut off the fire source.
It realizes accurate monitoring and alarm reminder of the state of fire breaking in the kitchen, reduces the risk of false alarms and missed reports, and can cut off the fire source in a timely manner, effectively ensuring kitchen safety.
Smart Images

Figure CN120164296A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of intelligent security, and particularly to a method, device, equipment and storage medium for alarming when leaving a kitchen with fire in progress. Background Art
[0002] As an important area in catering places and family life, the kitchen has a relatively high fire risk. Leaving the kitchen with fire in progress is one of the important causes of kitchen fires. When a cook or operator leaves the kitchen, if there is still a fire source on the stove, it may trigger a fire, causing serious casualties and property losses. Therefore, it is crucial to monitor in real time whether there is a situation of leaving the kitchen with fire in progress and to issue an alarm reminder in a timely manner to ensure kitchen safety.
[0003] Currently, infrared microwave detection technology is mainly used for monitoring leaving the kitchen with fire in progress. This technology determines whether there is someone in the kitchen by detecting the infrared radiation or microwave reflection signal of the human body. When the detector detects the disappearance of the human body signal, it will trigger an alarm reminder.
[0004] However, the existing infrared microwave detection technology has many limitations. First of all, the accuracy of infrared microwave detection is relatively low, and it is easily affected by the environment, with a high false alarm rate. For example, hot air, steam or moving objects in the kitchen may be misjudged as human activities, resulting in frequent false triggering of the alarm. Secondly, infrared microwave detection cannot accurately distinguish between human-shaped and non-human-shaped objects, and cannot accurately determine whether a person has truly left the kitchen. In addition, the existing methods cannot be linked with the kitchen stove power supply or gas valve, and cannot cut off the fire source in a timely manner when a danger is found, and cannot effectively eliminate potential safety hazards. Therefore, how to accurately alarm and remind the situation of leaving the kitchen with fire in progress has become an urgent problem to be solved.
[0005] The above content is only used to assist in understanding the technical solution of the present application, and does not represent an admission that the above content is prior art. Summary of the Invention
[0006] The purpose of the present application is to provide a method, device, equipment and storage medium for alarming when leaving a kitchen with fire in progress, aiming to solve the technical problem of how to accurately alarm and remind the situation of leaving the kitchen with fire in progress.
[0007] To achieve the above purpose, the present application proposes a method for alarming when leaving a kitchen with fire in progress. The method is applied to a kitchen fire departure alarm system. The kitchen fire departure alarm system includes a camera and an alarm device. The camera is connected to an exhaust fan, and the alarm device is connected to the control circuit of the kitchen stove power supply or gas valve. The alarm device supports a normally open signal output mode, a normally closed signal output mode, a continuous signal output mode, and a pulse signal output mode to adapt to the control circuit. The method includes:
[0008] Obtain the opening status of the exhaust fan;
[0009] Perform human shape recognition on the kitchen through the camera to obtain a recognition result;
[0010] When the opening situation is "open" and the recognition result is "no human shape", determine that the kitchen is in the state of leaving the fire with people, and record the duration of the state of leaving the fire with people;
[0011] When the duration is greater than or equal to the preset alarm delay time, trigger a voice alarm.
[0012] In one embodiment, the step of performing human shape recognition on the kitchen through the camera to obtain a recognition result includes:
[0013] Collect video frames in the kitchen through the camera;
[0014] Preprocess the video frames to obtain a target image;
[0015] Perform human shape area recognition on the target image to obtain a human shape area;
[0016] Extract features from the human shape area to obtain human shape area features;
[0017] Perform feature matching on the human shape area features according to the human shape sample library to obtain a recognition result.
[0018] In one embodiment, the step of performing human shape area recognition on the target image to obtain a human shape area includes:
[0019] Slide a detection window pixel by pixel on the target image, and calculate a feature value for the position of the detection window;
[0020] Input the feature value into a cascade classifier to obtain a classification result, and the cascade classifier is trained according to labeled data;
[0021] When the classification result is "non-human shape", return to the step of sliding a detection window pixel by pixel on the target image and calculating a feature value for the position of the detection window;
[0022] When the classification result is "human shape", use the detection window corresponding to the feature value as the human shape area.
[0023] In one embodiment, the step of extracting features from the human shape area to obtain human shape area features includes:
[0024] Use an edge detection algorithm to extract human shape features from the human shape area;
[0025] Use a contour detection algorithm to extract human shape contour features from the human shape area;
[0026] Calculate the local binary pattern features and gray-level co-occurrence matrix of the humanoid region;
[0027] Fuse the humanoid shape features, the humanoid contour features, the local binary pattern features, and the gray-level co-occurrence matrix to obtain humanoid region features.
[0028] In one embodiment, after the step of performing feature matching on the humanoid region features according to the humanoid sample library to obtain an identification result, the method further includes:
[0029] When the identification result indicates the presence of a humanoid, track the humanoid region and mark it in the video frame;
[0030] Send the marked video frame to the fire prevention and human departure monitoring platform for display;
[0031] When the humanoid region leaves the monitoring area of the camera, change the identification result to indicate the absence of a humanoid.
[0032] In one embodiment, before the step of obtaining the opening condition of the range hood, the method further includes:
[0033] Obtain the setting parameter information of the fire prevention and human departure monitoring platform, where the setting parameter information includes output mode setting parameters, preset alarm delay time setting parameters, and preset alarm time threshold setting parameters;
[0034] Adjust the output mode of the alarm device according to the output mode setting parameters;
[0035] Adjust the preset alarm delay time according to the preset alarm delay time setting parameters;
[0036] Adjust the preset alarm time threshold according to the preset alarm time threshold setting parameters.
[0037] In one embodiment, after the step of triggering a voice alarm when the duration is greater than or equal to the preset alarm delay time, the method further includes:
[0038] Record the alarm time of the voice alarm;
[0039] When the alarm time is greater than the preset alarm time threshold, turn off the kitchen stove power supply or the gas valve through the alarm device, and capture a picture of the kitchen scene through the camera;
[0040] Send the kitchen scene picture to a preset device through a preset method for early warning.
[0041] In addition, to achieve the above object, the present application further provides a kitchen fire-starting and leaving-alarm device, which includes:
[0042] A signal acquisition module, configured to acquire the opening condition of the range hood;
[0043] A human form recognition module, configured to perform human form recognition on the kitchen through a camera to obtain a recognition result;
[0044] A state judgment module, configured to determine that the kitchen is in a state of starting a fire and leaving when the opening condition is on and the recognition result is that there is no human form, and record the duration of the state of starting a fire and leaving;
[0045] An alarm module, configured to trigger a voice alarm when the duration is greater than or equal to a preset alarm delay time.
[0046] In addition, to achieve the above object, the present application further provides a kitchen fire-starting and leaving-alarm device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the computer program is configured to implement the steps of the kitchen fire-starting and leaving-alarm method as described above.
[0047] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the kitchen fire-starting and leaving-alarm method as described above are implemented.
[0048] In addition, to achieve the above object, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the kitchen fire-starting and leaving-alarm method as described above are implemented.
[0049] One or more technical solutions proposed by the present application have at least the following technical effects:
[0050] First, the system acquires the opening condition of the range hood through a sensor connected to the range hood, which provides a basis for subsequent judgment of whether the kitchen is in a cooking state. Then, the system uses a camera to perform human form recognition on the kitchen to determine whether there are people in the kitchen, and this step can accurately distinguish whether there are people present. When the range hood is in the on state and the human form recognition result shows that there is no one, the system determines that the kitchen is in a state of starting a fire and leaving, and starts to record the duration of this state, which helps to avoid misjudgment due to a person's short-term absence. Finally, when the recorded duration reaches or exceeds the preset alarm delay time, the system triggers a voice alarm to remind the person to return to their post in time. The present application can accurately alarm and remind the situation of starting a fire and leaving in the kitchen, ensuring the safety of the kitchen. Description of the Drawings
[0051] The accompanying drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application.
[0052] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0053] Figure 1 It is a schematic flowchart provided for the first embodiment of the kitchen fire-starting and leaving-person alarm method of this application;
[0054] Figure 2 It is a schematic diagram of the module of the kitchen fire-starting and leaving-person alarm system provided for the first embodiment of the kitchen fire-starting and leaving-person alarm method of this application;
[0055] Figure 3 It is a schematic diagram of the fire-starting and leaving-person monitoring platform provided for the first embodiment of the kitchen fire-starting and leaving-person alarm method of this application;
[0056] Figure 4 It is a schematic flowchart provided for the second embodiment of the kitchen fire-starting and leaving-person alarm method of this application;
[0057] Figure 5 It is a schematic diagram of the module structure of the kitchen fire-starting and leaving-person alarm device in the embodiment of this application;
[0058] Figure 6 It is a schematic diagram of the device structure of the hardware operating environment involved in the kitchen fire-starting and leaving-person alarm method in the embodiment of this application.
[0059] The realization of the purpose, functional features, and advantages of this application will be further described with reference to the embodiments and the accompanying drawings. Specific Embodiments
[0060] It should be understood that the specific embodiments described here are only used to explain the technical solutions of this application and are not used to limit this application.
[0061] To better understand the technical solutions of this application, the following will be described in detail in combination with the specification drawings and specific embodiments.
[0062] Kitchens are high-risk areas for fires, and one of the main causes of fire is fire. Therefore, real-time monitoring and alarming of whether there are people in the kitchen is crucial. The infrared microwave detection technology currently used determines whether there are people in the kitchen by detecting human body signals, but it has low accuracy and high false alarm rate under environmental interference, and cannot accurately distinguish between human and non-human objects. It cannot be linked with the power supply or gas valve of the kitchen stove to cut off the fire source. It has significant limitations and is difficult to effectively eliminate safety hazards.
[0063] The main solution of the embodiment of the present application is: the system determines whether the range hood is turned on through the sensor connected to the range hood, and performs human recognition in combination with the camera to determine whether there is anyone in the kitchen. When it is detected that the range hood is turned on and no one is there, the system identifies it as a fire-on and no-personnel state and starts timing. If the duration reaches a preset threshold, a voice alarm is triggered to remind the person to return, so as to avoid misjudgment and ensure safety.
[0064] It should be noted that the execution subject of the embodiment of the present application may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a kitchen fire alarm system, etc. The following takes the kitchen fire alarm system as an example to illustrate this embodiment and the following embodiments.
[0065] Based on this, the embodiment of the present application provides a kitchen fire alarm method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the kitchen fire and occupant absence alarm method of the present application.
[0066] In this embodiment, the kitchen fire alarm method is applied to the kitchen fire alarm system. Figure 2 , Figure 2 A schematic diagram of a kitchen fire alarm system module is provided for the first embodiment of the kitchen fire alarm method of the present application. The kitchen fire alarm system includes a camera and an alarm device. The camera is connected to the range hood. The alarm device is connected to the control circuit of the kitchen stove power supply or the gas valve. The alarm device supports a normally open signal output mode, a normally closed signal output mode, a continuous signal output mode, and a pulse signal output mode to adapt to the control circuit. The method includes steps S10 to S40:
[0067] Step S10, obtaining the opening status of the range hood.
[0068] It should be noted that the alarm equipment refers to the device in the kitchen fire alarm system that is used to send out alarm signals and take corresponding safety measures, and it also has a voice reminder function.
[0069] The control circuit refers to the electrical control circuit of the kitchen stove power supply or gas valve. It is responsible for receiving signals sent by the alarm device and performing corresponding operations according to the signal type (normally open, normally closed, continuous, pulse), such as cutting off or restoring the kitchen stove power supply, closing or opening the gas valve. The design of the control circuit varies according to the specific equipment and safety requirements of the kitchen and may include electrical components such as circuit breakers, AC contactors, air switches, relays, etc., as well as corresponding wiring methods and logic control circuits.
[0070] The normally open signal output mode means that when the alarm device does not detect the situation of leaving the scene during hot work, its output terminal is in an open state (the circuit is not connected). When the situation of leaving the scene during hot work is detected and the set delay time is reached, the output terminal of the alarm device closes (the circuit is connected), sending a signal to trigger the control circuit to cut off the kitchen stove power supply or close the gas valve. This mode is applicable to circuit designs that need to take action only when an abnormality is detected. For example, the control circuits of some kitchen stove power supplies or gas valves are open under normal circumstances and only perform the cut-off operation when receiving an alarm signal.
[0071] The normally closed signal output mode means that when the alarm device does not detect the situation of leaving the scene during hot work, its output terminal is in a closed state (the circuit is connected). When the situation of leaving the scene during hot work is detected and the set delay time is reached, the output terminal of the alarm device opens (the circuit is not connected), sending a signal to trigger the control circuit to cut off the kitchen stove power supply or close the gas valve. This mode is applicable to scenarios that need to keep the circuit connected under normal circumstances. For example, the control circuits of some kitchen stove power supplies or gas valves are closed under normal circumstances and only perform the cut-off operation when receiving an alarm signal.
[0072] The continuous signal output mode means that after the alarm device detects the situation of leaving the scene during hot work and the set delay time is reached, it continuously outputs a stable signal (the circuit is continuously connected or disconnected) until manual intervention or the abnormal situation is lifted. This mode is applicable to circuit designs that need to maintain the cut-off state for a long time. For example, the control circuits of some kitchen stove power supplies or gas valves need to continuously cut off the power supply or close the gas after detecting an abnormality until manual reset or the safe state is restored.
[0073] The pulse signal output mode means that after the alarm device detects the situation of leaving the scene during hot work and the set delay time is reached, it outputs a short pulse signal (the circuit is instantaneously connected or disconnected), which is used to trigger the control circuit to perform a cut-off or restoration operation once. This mode is applicable to circuit designs that need to trigger an action instantaneously. For example, the control circuits of some kitchen stove power supplies or gas valves control the action of the relay through a pulse signal to achieve a fast cut-off or restoration function.
[0074] The on - state refers to the working state of the range hood, that is, whether the range hood is in the on state. In the kitchen fire - starting and people - leaving alarm system, the on - signal of the range hood is used as an important auxiliary judgment basis. When the range hood is on, it usually means that cooking activities are taking place in the kitchen. By obtaining the on - state of the range hood, the system can more accurately judge whether the kitchen is in a fire - starting state, thereby improving the accuracy and reliability of the alarm.
[0075] It can be understood that, first, by connecting a current sensor or a voltage sensor to the power supply circuit of the range hood, the current or voltage change of the range hood is monitored in real - time. When the range hood starts, the current or voltage will increase significantly, and the sensor will capture this change and convert it into an electrical signal and transmit it to the control unit of the alarm system. Second, the control unit of the alarm system analyzes and processes the received electrical signal to determine whether the range hood is in the on state. If the detected current or voltage change conforms to the characteristics of the range hood starting, the system will confirm that the range hood has been turned on, record this status information, and trigger the subsequent monitoring process.
[0076] As an example, before the step of obtaining the on - state of the range hood, it further includes: obtaining the setting parameter information of the fire - starting and people - leaving monitoring platform, where the setting parameter information includes output mode setting parameters, preset alarm delay time setting parameters, and preset alarm time threshold setting parameters; adjusting the output mode of the alarm device according to the output mode setting parameters; adjusting the preset alarm delay time according to the preset alarm delay time setting parameters; and adjusting the preset alarm time threshold according to the preset alarm time threshold setting parameters.
[0077] The fire - starting and people - leaving monitoring platform refers to an integrated software system used to manage and configure the functions of the kitchen fire - starting and people - leaving alarm system. It allows users to set parameters, monitor the status, receive alarm information, and adjust the system behavior of the alarm system through a web interface (such as a web page or a mobile application). This platform is the core control center of the system, ensuring that the alarm system can be flexibly configured and operate efficiently according to the specific needs of users and the kitchen environment.
[0078] Please refer to Figure 3 , Figure 3This is a schematic diagram of the monitoring platform for detecting people leaving during kitchen fire ignition in the first embodiment of the method for this application. This platform can display the real-time monitoring situation of the alarm system in the kitchen area and has functions such as drawing the detection area, setting the sensitivity, adjusting the alarm input mode, setting the time when people leave (i.e., preset alarm delay time), setting the alarm output delay, and selecting the alarm output signal. In the figure, the user can define the monitoring area by clicking the drawing button and using the mouse to draw a rectangular area on the screen. The sensitivity can be independently set for each area, ranging from 30 to 120, to adapt to different monitoring requirements. In addition, the user can set the alarm input mode to normally open, which means that when it is detected that people have left for more than the preset delay time (60 seconds in this figure), the system will trigger an alarm. The alarm output delay can also be set, with a range of 30 to 120 seconds, to provide a delay time between triggering the alarm and actually outputting the alarm signal. Finally, the user can select the type of alarm output signal, including continuous output or timed output, to adapt to different alarm devices and response strategies. Through these functions, the monitoring platform can effectively monitor the personnel dynamics in the kitchen, issue an alarm in time when people leave during fire ignition, and ensure the safety of the kitchen.
[0079] Setting parameter information refers to various parameters configured by the user on the monitoring platform for detecting people leaving during kitchen fire ignition. These parameters determine the behavior and response mode of the alarm system, specifically including output mode setting parameters, preset alarm delay time setting parameters, preset alarm time threshold setting parameters, etc. The configuration of these parameters enables the alarm system to adapt to different kitchen environments and user requirements, improving the flexibility and reliability of the system.
[0080] The output mode setting parameter refers to the type of the output mode of the alarm device configured by the user on the monitoring platform. The alarm device supports multiple output modes, including normally open signal output mode, normally closed signal output mode, continuous signal output mode, and pulse signal output mode. The user can select the appropriate output mode according to the control circuit type of the kitchen stove power supply or gas valve to ensure that the alarm device can correctly be compatible with the control circuit and perform the operation of cutting off the power supply or closing the gas valve.
[0081] The preset alarm delay time setting parameter refers to the setting parameter including the alarm delay time set by the user on the monitoring platform. The alarm delay time refers to the time interval from when the camera detects the situation of people leaving during fire ignition to when the alarm device officially issues an alarm. This delay time is set to avoid false alarms caused by people briefly leaving the kitchen. For example, if the user sets the delay time to 30 seconds, then after detecting people leaving during fire ignition, the system will wait for 30 seconds. If people return to the kitchen within this period, the alarm will not be triggered; if people still do not return, the alarm device will issue an alarm.
[0082] The preset alarm time threshold setting parameter refers to the setting parameter that includes the alarm time threshold set by the user on the monitoring platform. The alarm time threshold means the time limit after the alarm device issues an alarm. If the person still has not returned to the kitchen, the system will take further measures (such as cutting off the power supply or closing the gas valve). For example, if the user sets the alarm time threshold to 1 minute, then after the alarm device issues an alarm, if the person has not returned to the kitchen within 1 minute, the system will automatically cut off the power supply of the cooking stove or close the gas valve to eliminate potential safety hazards.
[0083] First, the kitchen fire-starting and people-leaving alarm system obtains the parameter information preset by the user from the fire-starting and people-leaving monitoring platform through its built-in communication module, including the output mode, alarm delay time, and specific values of the alarm time threshold. The purpose of doing this is to ensure that the system can be personalized configured according to the specific needs of the user and the kitchen environment. Secondly, the system automatically adjusts the output interface mode of the alarm device according to the obtained output mode parameter, such as switching to normally open, normally closed, continuous, or pulse output mode, to adapt to the control circuit of the cooking stove power supply or gas valve in the kitchen, ensuring that the operation of cutting off the power supply or closing the gas valve can be correctly executed when an alarm occurs. Finally, the system sets the initial value and maximum value of the internal timer according to the preset alarm delay time and alarm time threshold parameters. Thus, when the situation of fire-starting and people-leaving is detected, it will first wait for the set delay time to avoid false alarms caused by the person's short-term departure; if the person still has not returned and the alarm time reaches the threshold, the power supply will be automatically cut off or the gas valve will be closed to eliminate potential safety hazards. Through these steps, the system can flexibly adapt to different kitchen environments, improve the accuracy and safety of the alarm, and at the same time reduce the risk of false alarms and missed alarms.
[0084] Step S20, perform human form recognition on the kitchen through the camera to obtain the recognition result.
[0085] It should be noted that human form recognition refers to the process of analyzing the images in the kitchen scene by using a camera in combination with a human form recognition algorithm to detect and identify the human form contour. The recognition result refers to the conclusion obtained after the camera processes through the human form recognition algorithm, that is, whether there is a human form in the kitchen. There are two possibilities: (1) There is a human form: The camera detects a human form target in the kitchen, indicating that the person is present, and at this time the system will not trigger an alarm. (2) There is no human form: The camera does not detect a human form target, indicating that the person is not present, and at this time the system will combine other conditions (such as whether the range hood is turned on) to determine whether to trigger the fire-starting and people-leaving alarm.
[0086] It can be understood that, first of all, the camera in the kitchen fire-starting-without-people alarm system collects video images in the kitchen in real time and transmits each frame of the picture to the built-in chip, or the fire-starting-without-people monitoring platform, or the remote server, so as to analyze and process the image through the human form recognition algorithm to accurately identify whether there is a human target in the picture.
[0087] Step S30, when the opening situation is on and the recognition result is that there is no human form, it is determined that the kitchen is in the state of fire-starting without people, and the duration of the fire-starting without people state is recorded.
[0088] It should be noted that the state of fire-starting without people means that the kitchen is in the middle of a cooking activity, but the human form recognition result of the camera shows that there is no one in the kitchen.
[0089] It can be understood that, first of all, the system will detect whether the range hood is in the on state, because the opening of the range hood usually means that the kitchen is using a fire source for cooking activities. Then, the system conducts human form recognition on the kitchen through the camera to judge whether there are people in the kitchen. If the range hood is in the on state and the recognition result of the camera shows that there is no one in the kitchen, the system will determine that the kitchen is in the state of fire-starting without people. At this time, the system will start a timer to record the duration of the fire-starting without people state.
[0090] Step S40, when the duration is greater than or equal to the preset alarm delay time, trigger a voice alarm.
[0091] It should be noted that the voice alarm is a user-friendly sound reminder function used to notify the people in the kitchen or the staff nearby that the kitchen is currently in a dangerous state of fire-starting without people.
[0092] It can be understood that, first of all, the system monitors the duration of the fire-starting without people state in real time. When this time reaches or exceeds the preset alarm delay time, it immediately triggers the voice alarm function of the alarm device. Secondly, the alarm device plays a pre-set voice prompt tone, such as "Fire-starting without people, please return to your post in time", to remind the people in the kitchen or the staff nearby through the sound. This voice alarm can attract their attention in time when the personnel leave briefly and do not return in time, prompting them to quickly return to the kitchen to handle the fire source, thus effectively avoiding potential safety hazards caused by personnel leaving their posts and improving the safety of the kitchen.
[0093] As an example, when the duration is greater than or equal to the preset alarm delay time, after the step of triggering the voice alarm, it also includes: recording the alarm time of the voice alarm; when the alarm time is greater than the preset alarm time threshold, turning off the power supply of the kitchen stove or the gas valve through the alarm device, and capturing a picture of the kitchen scene through the camera; and sending the kitchen scene picture to a preset device in a preset manner for early warning.
[0094] The alarm time refers to the duration of the alarm from the time the voice alarm is triggered. The preset method refers to the method and channel for sending kitchen scene pictures that are preset by the system, which may include SMS, applet push, email or other instant messaging tools, etc. The preset device refers to the terminal device that is preset by the system to receive alarm information and kitchen scene pictures, which may be the mobile phone of the store manager, the tablet computer of the manager, the computer of the monitoring center or other smart devices with receiving function.
[0095] First, the system records the alarm time of the voice alarm, that is, the length of time from the triggering of the voice alarm to the current time. Secondly, when the alarm time exceeds the preset threshold, the system uses the alarm device to cut off the power supply of the kitchen stove or close the gas valve to eliminate safety hazards. At the same time, the system controls the camera to capture a picture of the kitchen scene as evidence of the fire. Finally, the system sends the captured kitchen scene picture to the preset device, such as the store manager’s mobile phone or the manager’s tablet computer, through a preset method, such as SMS or mini-program push, to achieve early warning and notify relevant personnel to handle it in time.
[0096] This embodiment provides a kitchen fire alarm method.
[0097] First, the system obtains the opening status of the range hood through the sensor connected to the range hood. This operation provides a basis for the subsequent judgment of whether the kitchen is in a cooking state. Then, the system uses the camera to perform human figure recognition in the kitchen to determine whether there is anyone in the kitchen. This step can accurately distinguish whether a person is present or not. When the range hood is turned on and the human figure recognition result shows that there is no one, the system determines that the kitchen is in a state of fire and no one is allowed to leave, and starts recording the duration of this state, which helps to avoid misjudgment due to the short departure of personnel. Finally, when the recorded duration reaches or exceeds the preset alarm delay time, the system triggers a voice alarm to remind personnel to return to their posts in time. This embodiment can accurately alarm and remind people of fire and no one is allowed to leave the kitchen to ensure the safety of the kitchen.
[0098] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later. Figure 4 , Figure 4This is a schematic flowchart of the second embodiment of the kitchen fire-starting and people-leaving alarm method of this application. Step S20 of the kitchen fire-starting and people-leaving alarm method includes steps S21 to S25:
[0099] Step S21, collect video frames in the kitchen through the camera.
[0100] It can be understood that the camera captures real-time images in the kitchen through its built-in image sensor and lens, converts the optical signal into an electrical signal, and generates continuous video frames. This is the basis for the system to obtain dynamic information in the kitchen, ensuring that the system can monitor the activities in the kitchen in real time.
[0101] Step S22, preprocess the video frames to obtain a target image.
[0102] It should be noted that preprocessing refers to performing a series of image processing operations on the video frames collected by the camera to optimize the image quality and extract useful information, providing clearer and more accurate input data for the subsequent human form recognition algorithm, including: image scaling, filtering and denoising, grayscale conversion, histogram equalization, background subtraction, etc. The target image refers to the image obtained after the above preprocessing steps. It has removed noise and unnecessary background information and retained clear foreground targets (such as human forms) and key features.
[0103] It can be understood that first, after the system obtains the original video frames from the camera, it removes the noise in the image through a filtering algorithm to enhance the clarity of the image; second, it performs grayscale processing and histogram equalization on the image to adjust the brightness and contrast, making the details in the image more prominent; finally, it removes the fixed background through background subtraction technology to highlight the dynamic target. This is done to reduce interference information, improve the image quality, ensure the accuracy and efficiency of subsequent human form recognition, and thus provide a more reliable basis for judging the state of fire-starting and people-leaving.
[0104] Step S23, perform human form area recognition on the target image to obtain a human form area.
[0105] It should be noted that the human form area refers to the part of the image that may contain a human form detected by the human form recognition algorithm after target image processing. These areas are usually represented by rectangular frames or other shaped bounding boxes, used to mark the possible positions of people in the image.
[0106] It can be understood that, first, the system inputs the pre - processed target image into the human - form recognition algorithm. The algorithm extracts key features in the image, such as edges, shapes, and textures. Then, by comparing with the existing human - form feature models, the algorithm searches for regions similar to human forms in the image and marks the possible human - form positions with bounding boxes (such as rectangular boxes). Finally, the system outputs these marked regions as human - form regions for subsequent judgment of whether there are people in the kitchen, so as to achieve precise monitoring of the state of leaving the fire unattended.
[0107] As an example, the steps of performing human - form region recognition on the target image to obtain human - form regions include: sliding a detection window pixel - by - pixel on the target image and calculating feature values at the positions of the detection window; inputting the feature values into a cascade classifier to obtain a classification result, where the cascade classifier is trained based on labeled data; when the classification result is non - human form, returning to the step of sliding the detection window pixel - by - pixel on the target image and calculating feature values at the positions of the detection window; when the classification result is human form, taking the detection window corresponding to the feature values as the human - form region.
[0108] Sliding a detection window pixel - by - pixel on the target image means that the system moves a window of a fixed size (usually a rectangular box) pixel - by - pixel on the image, gradually covering each region of the entire image. The role of this window is to frame local regions in the image for feature calculation and analysis of each region. The purpose of sliding pixel - by - pixel is to ensure that every part of the image is detected, so as not to miss any possible human - form regions.
[0109] Feature values refer to the quantified features extracted from the image region in the detection window, used to describe the visual information of this region. These features may include edge intensity, texture information, shape features, etc. In human - form recognition, common feature - value calculation methods include Haar features, HOG (Histogram of Oriented Gradients) features, etc. These feature values can reflect whether the image region has typical features of a human form and are the basis for subsequent classifier judgment. Edge intensity calculation formula:
[0110] G(x, y) = max(|i x |, |I y |)
[0111] where, I x and I y are the gradients of the image in the x and y directions respectively.
[0112] A cascade classifier is a multi-stage classifier structure commonly used for fast detection and classification tasks. It consists of multiple weak classifiers, each of which is responsible for detecting whether an image region has certain basic features. The design idea of the cascade classifier is that if an image region is determined to be non-humanoid at an early stage, it can be quickly excluded, thus saving computational resources. Only the image regions that pass through all stages will be determined to be humanoid. This classifier is usually trained based on machine learning algorithms (such as AdaBoost) and can efficiently process large-scale image data. Cascade classifier voting formula:
[0113]
[0114] where h i (x) is the i-th weak classifier, α i is its weight, and f(x) is the final classification result.
[0115] Cascade classifier sample weight update formula:
[0116]
[0117] where is the weight of the i-th sample in the t-th round, α t is the weight of the t-th weak classifier, y i is the true label of the i-th sample, and h t (x i ) is the prediction result of the t-th weak classifier for the i-th sample.
[0118] The classification result refers to the judgment obtained after the cascade classifier analyzes the image region in the detection window. There are two possibilities: (1) Non-humanoid: The classifier determines that the region in the detection window does not contain a humanoid. (2) Humanoid: The classifier determines that the region in the detection window contains a humanoid.
[0119] Annotated data refers to the image dataset used to train the cascade classifier, in which the images have been manually annotated whether they contain a humanoid. For example, the annotated data may contain a large number of images containing humanoids (positive samples) and images not containing humanoids (negative samples). Through these annotated data, the cascade classifier can learn the feature patterns of humanoids, so as to accurately distinguish humanoid and non-humanoid regions in practical applications.
[0120] First, move a detection window of a fixed size pixel by pixel from left to right and from top to bottom on the target image, and extract the internal image feature values for each window position. These feature values can reflect whether the region may contain visual features of a human figure, and doing so ensures that no possible human figure regions are missed. Second, input the extracted feature values into a pre-trained cascade classifier. By learning a large amount of labeled data, this classifier can quickly determine whether the image region within the detection window is a human figure. If the classification result is non-human figure, it means that the region is not a human figure target, and the system will continue to move the detection window to the next position and repeat the above process until the entire image is covered. This can effectively filter out a large number of non-human figure regions and improve the detection efficiency. Finally, when the classification result is a human figure, the system records the position of this detection window and marks it as a human figure region.
[0121] Step S24: Extract features from the human figure region to obtain human figure region features.
[0122] It should be noted that the human figure region features refer to a series of quantitative information extracted from the recognized human figure region that can characterize the unique attributes of a human figure. These information are used to further confirm and describe the existence and state of the human figure.
[0123] It can be understood that first, after the system locates the human figure region, it analyzes the pixel data within this region and extracts features that can characterize the unique attributes of a human figure, such as shape, texture, edge, etc. information. Then, by calculating the specific parameters of these features, such as the aspect ratio of the human figure region, the gray-level co-occurrence matrix of the texture, the intensity and direction of the edge, etc., the visual information of the human figure region is transformed into quantitative data. Finally, these quantitative data are integrated into human figure region features for subsequent analysis and judgment, ensuring that the system can more accurately identify and confirm the existence of a human figure, thereby improving the accuracy of the fire alarm when people leave.
[0124] As an example, the step of extracting features from the human figure region to obtain human figure region features includes: using an edge detection algorithm to extract human figure shape features from the human figure region; using a contour detection algorithm to extract human figure contour features from the human figure region; calculating the local binary pattern features and gray-level co-occurrence matrix of the human figure region; and fusing the human figure shape features, the human figure contour features, the local binary pattern features, and the gray-level co-occurrence matrix to obtain human figure region features.
[0125] Edge detection algorithms are a type of image processing technique used to detect regions in an image where there are significant changes in brightness, which typically correspond to the boundaries of objects. Edge detection algorithms (such as the Canny algorithm) are used to extract edge information from the humanoid region, and this edge information can clearly outline the contour of the humanoid, providing a basis for subsequent shape analysis. Filtering formula in edge detection:
[0126]
[0127] where G(x, y) is the filtering function and σ is the standard deviation.
[0128] Gradient calculation formula in edge detection:
[0129]
[0130] I x = I * G x I y = I * G y
[0131] where I x and I y are the gradients of the image in the x and y directions respectively.
[0132] Humanoid shape features refer to the geometric properties of the humanoid region extracted through edge detection algorithms, such as width, height, aspect ratio, perimeter, etc. These features can describe the overall shape of the humanoid and help the system distinguish the humanoid from other objects. For example, the aspect ratio of a humanoid usually conforms to the natural proportion of the human body, while other objects may not have such a proportional relationship.
[0133] Contour detection algorithms are algorithms used to detect continuous boundaries in an image. Contour detection algorithms (such as methods based on contour tracing) are used to extract complete contour lines from the humanoid region. These contour lines can more precisely describe the outer shape of the humanoid. Especially in a complex background, contour detection can better separate the humanoid from the background.
[0134] Humanoid contour features refer to the attributes of the contour lines extracted through contour detection algorithms, such as the area, perimeter, curvature, etc. of the contour. These features can describe the complexity and shape characteristics of the humanoid contour and help the system more accurately identify and distinguish the humanoid. For example, the contour of the human body usually has certain curvature changes, while the contours of other objects may be relatively regular.
[0135] Local Binary Pattern (LBP) feature is a feature used to describe local texture of an image and is used to describe the texture information of the human-shaped area. By comparing each pixel with the pixels in its neighborhood to generate a binary pattern, LBP can capture the texture details of the human-shaped area, such as the texture of clothes or skin. This feature has good robustness to illumination changes and can enhance the accuracy of human shape recognition. LBP calculation formula:
[0136]
[0137] where I(p) is the intensity value of the pixel point, P is the neighborhood intensity value, and s(x) is the sign function.
[0138] Gray Level Co-occurrence Matrix (GLCM) is a statistical method used to describe image texture and is used to calculate the texture features of the human-shaped area. By analyzing the distribution of pixel gray values in the image and the relationship between adjacent pixels, GLCM can extract features such as contrast, correlation, and energy of the texture. These features can describe the texture complexity and consistency of the human-shaped area and help the system more accurately identify and distinguish human shapes. GLCM calculation formula:
[0139]
[0140] where M is the GLCM, I is the image, i and j are gray levels, d is the distance, and θ is the direction.
[0141] First, apply an edge detection algorithm to the human-shaped area to extract clear edge lines, and calculate the shape features of the human shape based on these edges. For example, calculate the aspect ratio by measuring the length and width of the edge, and calculate the area and perimeter of the human-shaped area by closing the edge. These shape features can help the system initially judge whether the overall structure of the human shape conforms to the human body proportion, so as to screen out possible human shape targets. Second, use a contour detection algorithm to find the complete contour of the human-shaped area and extract features such as the curvature, area, and direction of the contour. These contour features can further refine the description of the human shape's appearance and help the system distinguish the human shape from other objects with similar shapes, improving the recognition accuracy. Then, calculate the LBP features of the human-shaped area. By analyzing the gray relationship between each pixel and its neighborhood pixels, generate a texture pattern. At the same time, calculate the GLCM and extract statistical features such as contrast, correlation, and energy of the texture. These texture features can reflect the details and complexity of the human-shaped area and help the system more accurately identify the human shape under complex backgrounds or lighting conditions. Finally, fuse the extracted shape features, contour features, LBP features, and GLCM features to form a comprehensive human-shaped area feature. This fusion can make full use of the advantages of different features, improve the robustness and accuracy of human shape recognition, and provide a more reliable basis for subsequent judgment of the state of leaving the fire area.
[0142] Step S25, performing feature matching on the human shape region features according to the human shape sample library to obtain a recognition result.
[0143] It should be noted that the human sample library refers to a pre-established data set containing a large number of annotated human features. These samples are usually features extracted from human images collected from various angles, postures and lighting conditions, and are used as reference standards to help the system identify and determine whether there is a human figure in the image. The data in the sample library is annotated and classified to clarify which features belong to a human figure and which do not, thereby providing a benchmark for feature matching.
[0144] Feature matching refers to the process of comparing and analyzing the humanoid features extracted from the target image with the features in the humanoid sample library. Specifically, the system calculates the similarity or difference between the target features and the features in the sample library, and determines whether the target features match the humanoid features in the sample library through a set threshold or classification algorithm. If the match is successful, the target area is considered to be a humanoid; if the match fails, the target area is considered not to be a humanoid. Cosine similarity calculation formula:
[0145]
[0146] Where A·B is the dot product of the vectors, and ||A|| and ||B|| are the norms of the vectors.
[0147] It can be understood that, first, the pre-stored standard human feature data is retrieved from the human sample library, which contains the shape, texture and contour features of various typical human figures. Then, the human area features extracted from the target image are calculated one by one with the features in the sample library, and the difference in feature values is compared to determine whether the target features meet the standards of human features. Finally, the recognition result is generated based on the comparison result - if the similarity exceeds the preset threshold, it is determined that a human figure exists; otherwise, it is determined to be non-human. This is done to ensure that the system can accurately identify human figures and avoid misjudgment due to environmental interference or image noise, thereby improving the reliability and accuracy of the system and providing a solid basis for judging the state of fire and absence of people in the kitchen.
[0148] As an example, after the step of matching the features of the human figure area according to the human figure sample library to obtain the recognition result, it also includes: when the recognition result is that a human figure exists, tracking the human figure area and marking it in the video frame; sending the marked video frame to the fire and human absence monitoring platform for display; when the human figure area leaves the monitoring area of the camera, changing the recognition result to the absence of a human figure.
[0149] Annotation refers to visually marking the detected human-shaped areas in video frames, usually by drawing bounding boxes (such as rectangular boxes) or other graphical symbols to highlight the positions of humans. This is done to visually display the presence and position of humans on the monitoring platform, facilitating real-time observation and confirmation of the movements of people in the kitchen by the monitoring personnel.
[0150] First, when the recognition result confirms the presence of a human, the system starts a tracking algorithm to track the human-shaped area in real time, ensuring the continuous positioning of the human's position in consecutive video frames. Then, in each video frame, the human-shaped area is annotated with a bounding box. For example, the human-shaped area is framed with a red rectangular box to clearly show the specific position of the human. Next, the annotated video frames are sent to the fire prevention and human departure monitoring platform, which will display these annotated video frames in real time, facilitating managers to visually observe the movements of people in the kitchen. Finally, when the human-shaped area completely leaves the monitoring range of the camera, the system automatically changes the recognition result from "human present" to "no human present" to ensure the accuracy and real-time nature of the system status.
[0151] In this embodiment, first, video frames in the kitchen are collected by a camera to ensure that the system can obtain real-time image information in the kitchen, providing basic data for subsequent analysis. Next, the collected video frames are preprocessed, such as removing noise, adjusting brightness and contrast, etc., to obtain clear target images, thereby improving the image quality and providing more accurate inputs for subsequent human detection. Then, the target images are subjected to human-shaped area recognition, using algorithms to detect areas that may contain humans, and initially screening out the human-shaped parts in the images to provide positioning information for subsequent feature extraction. After that, feature extraction is performed on the recognized human-shaped areas, calculating feature values such as shape and texture, converting the visual information of the human-shaped areas into quantitative data, and further refining the description of the human. Finally, the extracted features are matched according to the human sample library to determine whether the target area is a human, obtaining the final recognition result. This embodiment can accurately identify whether there are people in the kitchen, avoiding misjudgment caused by environmental interference or image quality problems, thereby providing a reliable basis for the fire prevention and human departure alarm system and ensuring the safety monitoring of the kitchen.
[0152] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the kitchen fire prevention and human departure alarm method of this application. Based on this technical concept, more forms of simple transformations are within the protection scope of this application.
[0153] This application also provides a kitchen fire prevention and human departure alarm device. Please refer to Figure 5 and the kitchen fire prevention and human departure alarm device includes:
[0154] A signal acquisition module 10, used to acquire the opening status of the range hood;
[0155] The human form recognition module 20 is used to perform human form recognition on the kitchen through a camera to obtain a recognition result;
[0156] The status judgment module 30 is used to determine that the kitchen is in the state of leaving the fire when the opening situation is on and the recognition result is that there is no human form, and record the duration of the state of leaving the fire;
[0157] The alarm module 40 is used to trigger a voice alarm when the duration is greater than or equal to a preset alarm delay time.
[0158] In one embodiment, the human form recognition module 20 is further used to collect video frames in the kitchen through the camera; preprocess the video frames to obtain a target image; perform human form area recognition on the target image to obtain a human form area; extract human form area features from the human form area; perform feature matching on the human form area features according to a human form sample library to obtain a recognition result.
[0159] In one embodiment, the human form recognition module 20 is further used to slide a detection window pixel by pixel on the target image and calculate a feature value for the position of the detection window; input the feature value into a cascade classifier to obtain a classification result, and the cascade classifier is trained according to labeled data; when the classification result is non-human form, return to the step of sliding the detection window pixel by pixel on the target image and calculating the feature value for the position of the detection window; when the classification result is human form, use the detection window corresponding to the feature value as the human form area.
[0160] In one embodiment, the human form recognition module 20 is further used to extract human form shape features from the human form area using an edge detection algorithm; extract human form contour features from the human form area using a contour detection algorithm; calculate the local binary pattern features and gray level co-occurrence matrix of the human form area; fuse the human form shape features, the human form contour features, the local binary pattern features, and the gray level co-occurrence matrix to obtain human form area features.
[0161] In one embodiment, the human form recognition module 20 is further used to track the human form area when the recognition result is that there is a human form, and mark it in the video frame; send the marked video frame to a fire-leaving monitoring platform for display; when the human form area leaves the monitoring area of the camera, change the recognition result to no human form.
[0162] In one embodiment, the signal acquisition module 10 is also used to obtain setting parameter information of the fire and occupant monitoring platform, and the setting parameter information includes output mode setting parameters, preset alarm delay time setting parameters and preset alarm time threshold setting parameters; the output mode of the alarm device is adjusted according to the output mode setting parameters; the preset alarm delay time is adjusted according to the preset alarm delay time setting parameters; the preset alarm time threshold is adjusted according to the preset alarm time threshold setting parameters.
[0163] In one embodiment, the alarm module 40 is also used to record the alarm time of the voice alarm; when the alarm time is greater than a preset alarm time threshold, the kitchen stove power supply or the gas valve is turned off by the alarm device, and the kitchen scene picture is captured by the camera; the kitchen scene picture is sent to a preset device in a preset manner for early warning.
[0164] The kitchen fire alarm device provided by the present application adopts the kitchen fire alarm method in the above embodiment, which can solve the technical problem of how to accurately alarm and remind the kitchen fire. Compared with the prior art, the beneficial effects of the kitchen fire alarm device provided by the present application are the same as the beneficial effects of the kitchen fire alarm method provided by the above embodiment, and other technical features of the kitchen fire alarm device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0165] The present application provides a kitchen fire and occupant alarm device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the kitchen fire and occupant alarm method in the above-mentioned embodiment one.
[0166] Reference below Figure 6 , which shows a schematic diagram of the structure of a kitchen fire alarm device suitable for implementing the embodiment of the present application. The kitchen fire alarm device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6The shown kitchen fire alarm device when people leave is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of this application.
[0167] As Figure 6 shown, the kitchen fire alarm device when people leave may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the ROM (Read Only Memory) 1002 or the program loaded from the storage device 1003 into the RAM (Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the kitchen fire alarm device when people leave are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. The input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, an LCD (Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the kitchen fire alarm device when people leave to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a kitchen fire alarm device when people leave having various systems, it should be understood that it is not required to implement or have all the shown systems. Instead, more or fewer systems can be implemented or had.
[0168] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in this application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in this application are executed.
[0169] The kitchen fire-starting and unattended alarm device provided by this application adopts the kitchen fire-starting and unattended alarm method in the above-mentioned embodiment, and can solve the technical problem of how to accurately alarm and remind the situation of kitchen fire-starting and unattended. Compared with the prior art, the beneficial effects of the kitchen fire-starting and unattended alarm device provided by this application are the same as those of the kitchen fire-starting and unattended alarm method provided by the above-mentioned embodiment, and other technical features in this kitchen fire-starting and unattended alarm device are the same as the features disclosed in the method of the previous embodiment, which will not be elaborated here.
[0170] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0171] As mentioned above, it is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0172] This application provides a computer-readable storage medium with computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the kitchen fire-starting and unattended alarm method in the above-mentioned embodiment.
[0173] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory or flash memory), optical fibers, CD-ROM (CD-Read Only Memory, portable compact disk read-only memory), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system, device, or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0174] The above computer-readable storage medium may be included in the kitchen fire-starting and people-leaving alarm device; or it may exist independently and not be assembled into the kitchen fire-starting and people-leaving alarm device.
[0175] The above computer-readable storage medium carries one or more programs. When the one or more programs are executed by the kitchen fire-starting and people-leaving alarm device, the kitchen fire-starting and people-leaving alarm device is caused to: obtain the opening status of the range hood; perform human form recognition on the kitchen through the camera to obtain a recognition result; when the opening status is on and the recognition result is that there is no human form, determine that the kitchen is in a state of fire-starting and people-leaving, and record the duration of the fire-starting and people-leaving state; when the duration is greater than or equal to a preset alarm delay time, trigger a voice alarm.
[0176] Computer program code for performing the operations of the present application may be written in one or more programming languages or combinations thereof. The above programming languages include object-oriented programming languages - such as Java, Smalltalk, C++; and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network - including a LAN (Local Area Network) or a WAN (Wide Area Network), or may be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0177] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0178] The modules involved in the embodiments described in the present application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the unit itself in some cases.
[0179] The readable storage medium provided in the present application is a computer-readable storage medium, and the computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned kitchen fire-starting and leaving-person alarm method, which can solve the technical problem of how to accurately alarm and remind the situation of kitchen fire-starting and leaving-person. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as those of the kitchen fire-starting and leaving-person alarm method provided in the above embodiments, and will not be elaborated here.
[0180] The present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the steps of the kitchen fire-starting and leaving-person alarm method as described above.
[0181] The computer program product provided in the present application can solve the technical problem of how to accurately alarm and remind the situation of kitchen fire-starting and leaving-person. Compared with the prior art, the beneficial effects of the computer program product provided in the present application are the same as those of the kitchen fire-starting and leaving-person alarm method provided in the above embodiments, and will not be elaborated here.
[0182] The above are only some embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structural transformation made under the technical concept of the present application by using the content of the specification and drawings of the present application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.
Claims
1. A kitchen fire alarm method, characterized in that: The method is applied to a kitchen fire alarm system, which includes a camera and an alarm device, wherein the camera is connected to a range hood, and the alarm device is connected to a control circuit of a kitchen stove power supply or a gas valve. The alarm device supports a normally open signal output mode, a normally closed signal output mode, a continuous signal output mode, and a pulse signal output mode to adapt to the control circuit. The method includes: Obtaining the opening status of the range hood; Performing human figure recognition in the kitchen by using the camera to obtain a recognition result; When the opening condition is open and the recognition result is that there is no human figure, the kitchen is determined to be in a fire-in-progress, no-personnel state, and the duration of the fire-in-progress, no-personnel state is recorded; When the duration is greater than or equal to the preset alarm delay time, a voice alarm is triggered.
2. The method according to claim 1, characterized in that The step of performing human figure recognition in the kitchen by using the camera to obtain the recognition result comprises: Capturing video frames in the kitchen by means of the camera; Preprocessing the video frame to obtain a target image; Performing human shape region recognition on the target image to obtain a human shape region; Extracting features from the human-shaped region to obtain features of the human-shaped region; Feature matching is performed on the human shape area features according to the human shape sample library to obtain a recognition result.
3. The method according to claim 2, characterized in that The step of performing human shape area recognition on the target image to obtain the human shape area comprises: Sliding a detection window pixel by pixel on the target image, and calculating a characteristic value for the position of the detection window; Inputting the feature value into a cascade classifier to obtain a classification result, wherein the cascade classifier is trained based on the labeled data; When the classification result is non-human, returning to the step of sliding the detection window pixel by pixel on the target image and calculating the feature value of the detection window position; When the classification result is a human figure, the detection window corresponding to the feature value is used as a human figure area.
4. The method according to claim 2, characterized in that The step of extracting features from the human-shaped region to obtain features of the human-shaped region comprises: Using an edge detection algorithm to extract human shape features from the human shape area; Extracting human outline features from the human area using a contour detection algorithm; Calculating local binary pattern features and gray-level co-occurrence matrix of the human-shaped region; The human shape feature, the human outline feature, the local binary pattern feature and the gray level co-occurrence matrix are fused to obtain a human region feature.
5. The method according to claim 2, characterized in that After the step of matching the features of the human shape region according to the human shape sample library to obtain the recognition result, the method further includes: When the recognition result shows that a human figure exists, the human figure area is tracked and marked in the video frame; The annotated video frames are sent to a fire and human presence monitoring platform for display; When the human-shaped area leaves the monitoring area of the camera, the recognition result is changed to that no human-shaped area exists.
6. The method according to claim 1, characterized in that Before the step of obtaining the opening status of the range hood, the method further includes: Acquire setting parameter information of the fire-prone and unmanned monitoring platform, wherein the setting parameter information includes output mode setting parameters, preset alarm delay time setting parameters, and preset alarm time threshold setting parameters; adjusting the output mode of the alarm device according to the output mode setting parameters; Adjusting the preset alarm delay time according to the preset alarm delay time setting parameters; The preset alarm time threshold is adjusted according to the preset alarm time threshold setting parameter.
7. The method according to any one of claims 1 to 6, characterized in that When the duration is greater than or equal to the preset alarm delay time, after the step of triggering a voice alarm, the method further includes: Recording the alarm time of the voice alarm; When the alarm time is greater than a preset alarm time threshold, the power supply of the kitchen stove or the gas valve is turned off by the alarm device, and a picture of the kitchen scene is captured by the camera; The kitchen scene picture is sent to a preset device in a preset manner for early warning.
8. A kitchen fire alarm device, characterized in that: The device comprises: A signal acquisition module, used to obtain the opening status of the range hood; A human figure recognition module is used to perform human figure recognition in the kitchen through a camera and obtain recognition results; A state judgment module, for judging that the kitchen is in a state of open fire and no people when the opening state is open and the recognition result is that there is no human figure, and recording the duration of the state of open fire and no people; The alarm module is used to trigger a voice alarm when the duration is greater than or equal to a preset alarm delay time.
9. A kitchen fire alarm device, characterized in that: The device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the kitchen fire alarm method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the kitchen fire alarm method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Pedestrian detection method based on combined features
CN102842045A
Method for matching pedestrians under multiple cameras
CN103530638A
Pedestrian real-time detection method based on video
CN106446832A
Escalator passenger detection algorithm based on fast Adaboost training algorithm
CN108182381A
Pedestrian detection method based on multiple features and cascade classifier
CN108875668A