Low-power-consumption wireless visual doorbell sleep time difference awakening optimization schemeTechnical Field
The invention relates to the technical field of electronics, in particular to a sleep time difference awakening optimization scheme for a low-power-consumption wireless visual doorbell.
Background
Along with the continuous progress of scientific and technological and the popularization of intelligent hardware, the wireless visual doorbell of low-power consumption begins to get into millions of families, has greatly made things convenient for people's life, and the wireless visual doorbell of low-power consumption adopts two kinds of mode usually: the method comprises the steps of awakening and sleeping, stopping video acquisition and uploading to enter a sleeping mode under the condition that most of users do not interact, only maintaining one keep-alive connection with an awakening service so as to fully reduce energy consumption, awakening a remote awakening doorbell through a physical key or operating a control terminal by a user, sending video data to a video service through a video module by the doorbell in the awakening state, and simultaneously forwarding the video data to a mobile control terminal by the video service to display a video;
the direct physical key wake-up is simple, but the problem that the doorbell cannot be woken up due to the sleep time difference existing in the doorbell cannot be avoided even if the mobile control terminal is used for remote wake-up in a good network environment.
Disclosure of Invention
The invention aims to provide a sleep time difference awakening optimization scheme of a low-power-consumption wireless visual doorbell, so as to solve the problems in the background technology.
In order to achieve the purpose, the invention adopts the following technical scheme:
a sleep time difference awakening optimization scheme for a low-power-consumption wireless visual doorbell is designed, and the method comprises the following steps:
the method comprises the following steps that firstly, a mobile terminal is wirelessly connected with a doorbell WIFI module;
step two, when the doorbell is in a sleep mode, controlling the mobile terminal to initiate a wake-up command, wherein the wake-up command reaches a wake-up service and is forwarded to the dormant doorbell through the doorbell keep-alive connection;
step three, the doorbell enters the awakening state from the dormant state, the keep-alive connection is stopped, a message for confirming awakening is sent to the video service immediately, and the video service forwards the confirmation message to the mobile terminal;
the doorbell is connected with a video service and sends real-time video data to the video service, the video service forwards the fact that the doorbell is connected to the mobile terminal, the mobile terminal is connected or is connected with the video service in advance, and the video service forwards the video data to the mobile terminal for playing and displaying;
step five, when needing to enter a sleep mode, the mobile terminal stops video watching, the video service forwards a video-stopping signaling to the doorbell, the doorbell stops pushing flow and starts to prepare for sleep after 15-20s, and the video service forwards a state that the doorbell stops pushing flow to the mobile terminal;
and step six, after stopping the activity of the main MCU, the doorbell wakes up the low-power-consumption WIFI module, establishes the keep-alive connection and formally enters a sleep mode.
Preferably, in the step one, the mobile terminal is an Android APP or an iOS APP.
Preferably, in the second step, when the user controls the mobile terminal to initiate the wake-up, the doorbell state is judged;
s1, the doorbell is in a push flow state and does not perform any processing;
s2, the doorbell is in sleep, and a wake-up command is initiated according to the original steps;
s3, the doorbell is in a ready-to-sleep state, delaying sending the wake-up message until the doorbell determines to enter the sleep state.
Preferably, in the sixth step, after the doorbell formally enters the sleep, when the keep-alive message reaches the wake-up service, the wake-up service immediately notifies the mobile terminal, and if the wake-up service does not receive the keep-alive message within the specified time, it can be determined that the doorbell device network is abnormal, and the state is notified to the mobile terminal.
The invention has the beneficial effects that:
1. the invention combines the doorbell dormancy and wake-up working principle, adopts the mobile control terminal, the doorbell and the service, the interaction protocol optimization and the delay wake-up logic, is not only reliable, but also does not influence the user experience, and can remotely wake up.
2. The invention solves the problem that the original scheme cannot be awakened due to the sleep time difference by adding the preparation sleep state and using the delayed awakening in the protocol, when a user awakens, the doorbell can be awakened successfully at one time no matter which state the doorbell is in as long as the normal connection of the doorbell network is ensured, so that the user is almost unaware, and the user experience can be enhanced;
3. the invention does not relate to the modification of software and hardware of the doorbell, can be realized only by upgrading a protocol and applying a mobile terminal, can be realized only with very little cost, and has better applicability.
Drawings
FIG. 1 is a schematic diagram of a wake-up configuration of the present invention;
fig. 2 is a frame diagram of the complete doorbell wake-up principle of the present invention.
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.
Embodiment 1, referring to fig. 1-2, a sleep time difference wake-up optimization scheme for a low-power wireless visual doorbell includes the following steps:
the method comprises the following steps that firstly, a mobile terminal is wirelessly connected with a doorbell WIFI module, and the terminal is an Android APP or iOSAPP;
step two, when the doorbell is in a sleep mode, controlling the mobile terminal to initiate a wake-up command, wherein the wake-up command reaches a wake-up service and is forwarded to the dormant doorbell through the doorbell keep-alive connection;
when a user controls the mobile terminal to initiate awakening, judging the doorbell state;
s1, the doorbell is in a push flow state and does not perform any processing;
s2, the doorbell is in sleep, and a wake-up command is initiated according to the original steps;
s3, the doorbell is in a sleep preparation state, and the sending of the wake-up message is delayed until the doorbell determines to enter the sleep state;
step three, the doorbell enters the awakening state from the dormant state, the keep-alive connection is stopped, a message for confirming awakening is sent to the video service immediately, and the video service forwards the confirmation message to the mobile terminal;
the doorbell is connected with a video service and sends real-time video data to the video service, the video service forwards the fact that the doorbell is connected to the mobile terminal, the mobile terminal is connected or is connected with the video service in advance, and the video service forwards the video data to the mobile terminal for playing and displaying;
step five, when needing to enter a sleep mode, the mobile terminal stops video watching, the video service forwards a video-stopping signaling to the doorbell, the doorbell stops push flow and starts to prepare for sleep after 15s, and the video service forwards a state that the doorbell stops push flow to the mobile terminal;
and step six, after the doorbell stops the activity of the main MCU, the doorbell wakes up the low-power-consumption WIFI module, establishes the keep-alive connection, formally enters a sleep mode, and after the doorbell formally enters the sleep mode, when the keep-alive message reaches the wake-up service, the wake-up service immediately informs the mobile terminal, if the wake-up service does not receive the keep-alive message within the specified time, the abnormal network of the doorbell equipment can be judged, and the state is informed to the mobile terminal.
Embodiment 2, referring to fig. 1-2, a sleep time difference wake-up optimization scheme for a low-power wireless visual doorbell includes the following steps:
the method comprises the following steps that firstly, a mobile terminal is wirelessly connected with a doorbell WIFI module, and the terminal is an Android APP or iOSAPP;
step two, when the doorbell is in a sleep mode, controlling the mobile terminal to initiate a wake-up command, wherein the wake-up command reaches a wake-up service and is forwarded to the dormant doorbell through the doorbell keep-alive connection;
when a user controls the mobile terminal to initiate awakening, judging the doorbell state;
s1, the doorbell is in a push flow state and does not perform any processing;
s2, the doorbell is in sleep, and a wake-up command is initiated according to the original steps;
s3, the doorbell is in a sleep preparation state, and the sending of the wake-up message is delayed until the doorbell determines to enter the sleep state;
step three, the doorbell enters the awakening state from the dormant state, the keep-alive connection is stopped, a message for confirming awakening is sent to the video service immediately, and the video service forwards the confirmation message to the mobile terminal;
the doorbell is connected with a video service and sends real-time video data to the video service, the video service forwards the fact that the doorbell is connected to the mobile terminal, the mobile terminal is connected or is connected with the video service in advance, and the video service forwards the video data to the mobile terminal for playing and displaying;
step five, when needing to enter a sleep mode, the mobile terminal stops video watching, the video service forwards a video-stopping signaling to the doorbell, the doorbell stops push flow and starts to prepare for sleep after 18s, and the video service forwards a state that the doorbell stops push flow to the mobile terminal;
step six, after the doorbell stops the activity of the main MCU, the doorbell wakes up the low-power-consumption WIFI module, establishes the keep-alive connection, formally enters a sleep mode, after the doorbell formally enters the sleep mode, when the keep-alive message reaches the wake-up service, the wake-up service immediately informs the mobile terminal, if the wake-up service does not receive the keep-alive message within the specified time, the abnormal network of the doorbell equipment can be judged, and the state is informed to the mobile terminal
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.