CN112530056A - Method for reducing power consumption of intelligent door lock, intelligent door lock and storage medium - Google Patents

Method for reducing power consumption of intelligent door lock, intelligent door lock and storage medium Download PDF

Info

Publication number
CN112530056A
CN112530056A CN202011299093.4A CN202011299093A CN112530056A CN 112530056 A CN112530056 A CN 112530056A CN 202011299093 A CN202011299093 A CN 202011299093A CN 112530056 A CN112530056 A CN 112530056A
Authority
CN
China
Prior art keywords
door lock
intelligent door
power consumption
idle
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011299093.4A
Other languages
Chinese (zh)
Other versions
CN112530056B (en
Inventor
董文杰
王志红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202011299093.4A priority Critical patent/CN112530056B/en
Publication of CN112530056A publication Critical patent/CN112530056A/en
Application granted granted Critical
Publication of CN112530056B publication Critical patent/CN112530056B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)
  • Lock And Its Accessories (AREA)

Abstract

The application discloses a method for reducing power consumption of an intelligent door lock, the intelligent door lock and a storage medium, wherein the method for reducing the power consumption of the intelligent door lock comprises the following steps: when the intelligent door lock system is detected to enter an idle state, acquiring the current idle time; when the idle time meets the dormancy condition, acquiring data of each functional interface; and if the user task is determined to be in the idle state based on the data, controlling the intelligent door lock system to enter the dormant state. The technical problems that the power consumption of the intelligent door lock is high and the battery needs to be frequently replaced due to the fact that the number of functional modules of the intelligent door lock is large are solved, the power consumption of the intelligent electric door lock is effectively reduced, the replacement times of the battery are reduced, and the service life of the intelligent door lock is prolonged.

Description

Method for reducing power consumption of intelligent door lock, intelligent door lock and storage medium
Technical Field
The application relates to the technical field of intelligent door locks, in particular to a method for reducing power consumption of an intelligent door lock, the intelligent door lock and a storage medium.
Background
With the continuous development of scientific technology, the household industry gradually develops towards intellectualization, the common door lock can not meet the requirements of people on safety performance, the intelligent door lock has great advantages on safety performance and user experience, the intelligent door lock has great development prospect, and the intelligent door lock can occupy important position in the field of household application. The battery is mostly used for supplying power for the intelligent door lock, and the power consumption of the whole intelligent door lock is increased and the battery replacement period is too short due to the multiple functional modules of the intelligent door lock, so that the cost is increased, the environment is polluted, and the user experience is influenced.
Disclosure of Invention
The embodiment of the application provides a method for reducing power consumption of an intelligent door lock, the intelligent door lock and a storage medium, and aims to solve the problems that the power consumption of the intelligent door lock is high and a battery needs to be frequently replaced due to the fact that the number of functional modules of the intelligent door lock is large.
In order to achieve the above object, an aspect of the present application provides a method for reducing power consumption of an intelligent door lock, where the method for reducing power consumption of an intelligent door lock includes the following steps:
when the intelligent door lock system is detected to enter an idle state, acquiring the current idle time;
when the idle time meets the dormancy condition, acquiring data of each functional interface;
and if the user task is determined to be in the idle state based on the data, controlling the intelligent door lock system to enter a dormant state.
Optionally, the step of controlling the intelligent door lock system to enter the sleep state includes:
performing low-power consumption configuration on each external module; and
and setting the awakening time and controlling the main control chip to enter a dormant state.
Optionally, when the idle duration satisfies the sleep condition, the step of acquiring data of each functional interface includes:
acquiring a first preset dormancy duration;
and if the first preset dormancy duration is less than the idle duration, acquiring the data of each functional interface.
Optionally, the step of setting the wake-up duration includes:
acquiring a second preset sleep time, and comparing the second preset sleep time with the idle time;
if the second preset sleeping time is smaller than the idle time, determining the second preset sleeping time as the awakening time; or
And if the second preset sleeping time length is greater than the idle time length, determining the idle time length as the awakening time length.
Optionally, after the step of controlling the intelligent door lock system to enter the sleep state, the method further includes:
when the current dormancy duration reaches the awakening duration, automatically awakening the intelligent door lock system;
and acquiring a current first idle time, and if the first idle time meets the sleep condition and the user task is in an idle state, controlling the intelligent door lock system to enter the sleep state again.
Optionally, after the step of controlling the intelligent door lock system to enter the sleep state, the method further includes:
when receiving a wake-up signal, waking up the main control chip; and
and performing awakening configuration on each external module, and correcting the beat of the intelligent door lock system.
Optionally, when receiving the wake-up signal, the step of waking up the main control chip includes:
generating a high level signal when detecting that the target key is in a pressed state;
and awakening the main control chip according to the high-level signal.
Optionally, after the step of performing wakeup configuration on each external module and correcting the beat of the intelligent door lock system, the method further includes:
acquiring a scheduling instruction, wherein the scheduling instruction is used for indicating the user task to be executed;
and starting the intelligent door lock system to process the user task according to the scheduling instruction.
In addition, in order to achieve the above object, in another aspect of the present application, an intelligent door lock is further provided, where the intelligent door lock includes a memory, a processor, and a program stored in the memory and running on the processor, and the processor implements the steps of the method for reducing the power consumption of the intelligent door lock when executing the program for reducing the power consumption of the intelligent door lock.
In addition, in order to achieve the above object, another aspect of the present application further provides a computer-readable storage medium, on which a program for reducing power consumption of an intelligent door lock is stored, and when the program for reducing power consumption of an intelligent door lock is executed by a processor, the program for reducing power consumption of an intelligent door lock implements the steps of the method for reducing power consumption of an intelligent door lock.
The method comprises the steps of acquiring the current idle time when detecting that an intelligent door lock system enters an idle state; when the idle time meets the dormancy condition, acquiring data of each functional interface; and if the user task is determined to be in the idle state based on the data, controlling the intelligent door lock system to enter the dormant state. Through when intelligent lock system and each user task all are in idle state, carry out the low-power consumption setting to each outside module to and set up awakening time and make master control MCU get into the dormancy state, solved because intelligent lock functional module is more, the consumption that leads to intelligent lock is higher, need frequently change the problem of battery, effectively reduced the consumption of intelligent electric lock, reduce the change number of times of battery and improved the life-span of intelligent lock.
Drawings
Fig. 1 is a schematic structural diagram of an intelligent door lock in a hardware operating environment according to an embodiment of the present application;
FIG. 2 is a schematic flowchart of a first embodiment of a method for reducing power consumption of an intelligent door lock according to the present application;
FIG. 3 is a schematic flowchart of a second embodiment of the method for reducing power consumption of an intelligent door lock according to the present application;
fig. 4 is a schematic flow chart illustrating a process of controlling the intelligent door lock system to enter a sleep state in the method for reducing power consumption of the intelligent door lock according to the present application;
FIG. 5 is a schematic flow chart illustrating setting of a wake-up duration in the method for reducing power consumption of an intelligent door lock according to the present application;
fig. 6 is a schematic flowchart illustrating a process after a step of controlling the intelligent door lock system to enter a sleep state in the method for reducing power consumption of the intelligent door lock according to the present application;
fig. 7 is a schematic flow diagram illustrating a process of waking up the main control chip when a wake-up signal is received in the method for reducing power consumption of an intelligent door lock according to the present application;
fig. 8 is a schematic flowchart of a process after the steps of performing wakeup configuration on each external module and correcting the beat of the intelligent door lock system in the method for reducing power consumption of the intelligent door lock according to the present application;
fig. 9 is a schematic software flow diagram of the method for reducing power consumption of the intelligent door lock according to the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The main solution of the embodiment of the application is as follows: when the intelligent door lock system is detected to enter an idle state, acquiring the current idle time; when the idle time meets the dormancy condition, acquiring data of each functional interface; and if the user task is determined to be in the idle state based on the data, controlling the intelligent door lock system to enter a dormant state.
Because the battery power supply is mostly used to current intelligent lock, and functional module is various, leads to complete machine consumption to increase, battery replacement cycle is too short, and this has not only increased the cost, also causes the pollution to the environment moreover, influences user's experience simultaneously. The method comprises the steps of acquiring the current idle time when detecting that the intelligent door lock system enters an idle state; when the idle time meets the dormancy condition, acquiring data of each functional interface; and if the user task is determined to be in the idle state based on the data, controlling the intelligent door lock system to enter the dormant state. Through when intelligent lock system and each user task all are in idle state, carry out the low-power consumption setting to each outside module to and set up awakening time and make master control MCU get into the dormancy state, solved because intelligent lock functional module is more, the consumption that leads to intelligent lock is higher, need frequently change the problem of battery, effectively reduced the consumption of intelligent electric lock, reduce the change number of times of battery and improved the life-span of intelligent lock.
As shown in fig. 1, fig. 1 is a schematic diagram of an intelligent door lock structure in a hardware operating environment according to an embodiment of the present application.
As shown in fig. 1, the smart door lock may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the smart door lock may further include a camera, a Radio Frequency (RF) circuit, a sensor, a remote controller, an audio circuit, a WiFi module, a detector, and the like. Of course, the intelligent door lock may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer and a temperature sensor, which are not described herein again.
Those skilled in the art will appreciate that the intelligent door lock structure shown in fig. 1 does not constitute a limitation of the intelligent door lock apparatus, and may include more or less components than those shown, or combine some components, or arrange different components.
As shown in fig. 1, a memory 1005, which is a kind of computer-readable storage medium, may include therein an operating system, a network communication module, a user interface module, and a program for reducing power consumption of the smart door lock.
In the intelligent door lock shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the program for reducing the power consumption of the smart door lock in the memory 1005, and perform the following operations:
when the intelligent door lock system is detected to enter an idle state, acquiring the current idle time;
when the idle time meets the dormancy condition, acquiring data of each functional interface;
and if the user task is determined to be in the idle state based on the data, controlling the intelligent door lock system to enter a dormant state.
Referring to fig. 2, fig. 2 is a schematic flowchart of a first embodiment of the method for reducing power consumption of an intelligent door lock according to the present application.
While a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than that shown or described herein.
The method for reducing the power consumption of the intelligent door lock comprises the following steps:
step S10, when detecting that the intelligent door lock system enters an idle state, acquiring the current idle time length;
the application environment of the method provided by this embodiment is to be applied to an intelligent door lock, the hardware of the intelligent door lock adopts LPC55S6x series chip as a main control, and the software adopts an RTOS system, wherein, a Real-time operating system (RTOS), also called as an instant operating system, is characterized by Real-time performance, if a task needs to be executed, the Real-time operating system can execute the task in a shorter time without a longer delay compared with a general operating system.
After the intelligent door lock is powered on and initialized, executing a current user task, and when a user does not interact with the intelligent door lock for a long time, entering an idle state (namely a standby state) by the RTOS system; at this time, the RTOS system executes an idle task, in which the time Ti, i.e., the idle duration, for which the system is expected to be idle is read by the RTOS system interface.
Step S20, when the idle time length meets the dormancy condition, acquiring the data of each functional interface;
in order to avoid frequent dormancy and awakening of the RTOS system in a short time, a user presets a shortest dormancy time, namely a first preset dormancy duration, which is generally set to be only several seconds, such as 5 seconds; meanwhile, the setting can be set according to the actual requirements of the user, and is not limited herein. Comparing the first preset dormancy duration with the idle expected maintenance time Ti, and if the first preset dormancy duration is greater than the idle expected maintenance time Ti, keeping the RTOS system in an activated state continuously; if the first preset dormancy duration is less than the time Ti of the expected idle maintenance, the condition of the first preset dormancy duration is met, whether each user task is in an idle state is further judged, wherein the user tasks comprise daily tasks, burst tasks, monitoring tasks, analysis and the like, and different user tasks can be generated based on different user requirements. When the first preset dormancy duration is less than the idle expected maintenance time Ti, the intelligent door lock initiates a collection request of data of each functional interface to the task scheduling module; after receiving the acquisition request, the task scheduling module stores the corresponding request data into a database and creates a task acquisition table corresponding to the task; and meanwhile, a task starting command comprising task starting parameters required by the task acquisition module is generated according to the task related data and is sent to the task acquisition module, and the task acquisition module performs corresponding acquisition work of each function data according to the starting parameters so as to acquire the data of each function interface. Wherein the request data comprises: task name, data type, task concurrency, extraction mode, extraction frequency and the like.
And step S30, if the user task is determined to be in an idle state based on the data, controlling the intelligent door lock system to enter a sleep state.
When the intelligent door lock acquires the data of each functional interface fed back by the task acquisition module, the data is analyzed to determine whether each current user task is in an idle state. Specifically, a task execution table corresponding to the data is obtained, whether user tasks waiting to be executed exist in the task execution table is judged, if not, whether the executing users finish executing is judged, and if all the user tasks are finished, all the user tasks are in an idle state. At this moment, after the intelligent door lock is configured with relevant low power consumption, the control system enters a low power consumption dormant state. When the system enters a dormant state, all the external modules, the CPU, the timer, the serial port and the like stop working, and only external interruption continues working. Meanwhile, the instruction for making the system enter the dormant state becomes the last instruction executed by the system before the dormancy, and after the system enters the dormant state, the data in the data memory and the special function register which are not related to the program in the MCU keep the original values, and the system can be triggered by external interrupt low level or triggered by falling edge to interrupt or be awakened in a hardware reset mode. It should be noted that, when the single system is woken up by using the interrupt, the program continues to run from the original stop, and when the system is woken up by using the hardware reset, the program will be executed from the beginning.
Further, referring to fig. 4, the step of controlling the intelligent door lock system to enter the sleep state includes:
step S31, configuring each external module with low power consumption; and
and step S32, setting the awakening time length and controlling the main control chip to enter a dormant state.
The low power consumption is a very important index of the MCU, for example, some wearable devices have limited power consumption, and if the power consumed by the whole circuit is very large, the power is often insufficient, which affects the user experience. Therefore, when the RTOS system goes to sleep, low power consumption configuration needs to be performed on each external module and the master MCU. For example: and configuring an external module to enter a low power consumption mode, closing off the upper peripheral and the clock irrelevant to low power consumption, and configuring a proper pin level to avoid electric leakage. Meanwhile, the level state of the I/O port needs to be configured, a pull-up resistor and a pull-down resistor are arranged inside or outside the general I/O port, and if the level state of each I/O port is not set when the MCU enters the sleep state, a part of electric power is consumed. For example: if a certain I/O port has a pull-up resistor of 10K Ω, the pin is pulled to 4V, and when the MCU enters a sleep state, the I/O port is set to output a low level, and according to ohm's law, the pin consumes a current of 0.4mA to 4V/10K. Therefore, before the MCU enters the sleep state, the states of the I/O ports are detected one by one, and if the I/O ports are provided with pull-up resistors, high-level output or high-resistance input is set; if the I/O port is provided with a pull-down resistor, the I/O port is set to be a low-level output or a high-resistance input.
After the low power consumption mode is successfully set, the program needs to be periodically operated, then the low power consumption mode is entered, and after a certain time interval, the program is continuously operated. At this time, the RTC clock is needed to wake up the low power consumption mode, and a periodic wake-up function is set, for example, the RTC alarm clock automatically wakes up once every 50 s. Meanwhile, an RTC/GINT interrupt is also needed to be set, more than 2 pins are initialized by the GINT to be the same group of interrupts, and when any polarity valid signal does not exist in the same group, any one pin generates a polarity valid signal and then generates the interrupts. And after matching of each external module, the I/O port, RTC awakening, GINT interruption and the like is completed, the main control MCU enters a dormant state.
Further, referring to fig. 5, the step of setting the wake-up duration includes:
step S320, acquiring a second preset sleep time, and comparing the second preset sleep time with the idle time;
step S321, if the second preset sleeping duration is less than the idle duration, determining that the second preset sleeping duration is the wakeup duration; or
Step S322, if the second preset sleeping duration is greater than the idle duration, determining that the idle duration is the wakeup duration.
The intelligent door lock is preset with a maximum sleeping time, namely a second preset sleeping time, the maximum sleeping time can be set to be several minutes, hours or days, and before the MCU enters a sleeping state, the awakening time needs to be determined based on the maximum sleeping time. Specifically, the time Ti of the estimated idle maintenance is compared with the maximum dormancy duration, and if the time Ti of the estimated idle maintenance is less than the maximum dormancy duration, the time Ti of the estimated idle maintenance is taken as the awakening duration; and if the time Ti of the expected idle maintenance is larger than the maximum dormancy duration, taking the maximum dormancy duration as the awakening duration.
The method comprises the steps of acquiring the current idle time when detecting that an intelligent door lock system enters an idle state; when the idle time meets the dormancy condition, acquiring data of each functional interface; and if the user task is determined to be in the idle state based on the data, controlling the intelligent door lock system to enter the dormant state. Through when intelligent lock system and each user task all are in idle state, carry out the low-power consumption setting to each outside module to and set up awakening time and make master control MCU get into the dormancy state, solved because intelligent lock functional module is more, the consumption that leads to intelligent lock is higher, need frequently change the problem of battery, effectively reduced the consumption of intelligent electric lock, reduce the change number of times of battery and improved the life-span of intelligent lock.
Further, referring to fig. 3, a second embodiment of the method for reducing power consumption of the intelligent door lock is provided.
The second embodiment of the method for reducing the power consumption of the intelligent door lock is different from the first embodiment of the method for reducing the power consumption of the intelligent door lock in that after the step of controlling the intelligent door lock system to enter the sleep state, the method further comprises the following steps:
step S33, when the current dormancy duration reaches the awakening duration, automatically awakening the intelligent door lock system;
step S34, acquiring a current first idle time, and if the first idle time meets the sleep condition and the user task is in an idle state, controlling the intelligent door lock system to enter the sleep state again.
The intelligent door lock has two awakening conditions, one is to automatically awaken when the sleep time is reached, and the other is to receive an awakening signal to awaken. When the sleep duration of the intelligent door lock reaches the awakening time and the awakening signal is not received, the intelligent door lock is awakened by the internal RTC; and after waking up, the system resumes scheduling, and if no event needs to be processed (the user task is idle) at present, the system calls an idle task and can sleep again in the idle task. That is, in the case where it is detected that the RTOS system is idle and all user tasks are idle, it is determined that the sleep condition is satisfied, and the MCU enters the sleep state again. For example: and when the awakening time is 1 hour, the intelligent door lock does not receive the awakening signal within 1 hour, automatically awakening, detecting data of each functional interface after awakening, judging that the current sleep condition is met when determining that each current user task is in an idle state, controlling the RTOS system to enter the sleep state again, and waiting for the next periodic awakening.
Further, referring to fig. 6, after the step of controlling the intelligent door lock system to enter the sleep state, the method further includes:
step S35, when receiving the wake-up signal, waking up the main control chip; and
when the intelligence lock received wake-up signal, external event takes place or RTC awakens up the back promptly, and main control MCU will follow the power down mode and awaken up, and wherein, the sleep mode of intelligence lock generally includes: sleep mode, deep sleep mode, power down mode, and deep power down mode, and for the selection of each mode, two indicators are included: low sleep current and fast wake-up speed.
Further, referring to fig. 7, when receiving the wake-up signal, the step of waking up the main control chip includes:
step S350, generating a high-level signal when detecting that the target key is in a pressed state;
and step S351, awakening the main control chip according to the high-level signal.
In the intelligent door lock, the key module is in communication connection with the main control MCU through the SPI, a user is provided with a plurality of target keys in advance, and the target keys are used for awakening the system. Meanwhile, the target key is connected with the main control MCU, and after the target key is pressed, a high level signal can be generated to wake up the main control MCU, wherein the high level signal can be triggered by manual operation or autonomous intelligent triggering. Optionally, the target key may also be a virtual key, for example: when a user presses a target virtual key on the mobile phone, a high level signal is generated, and the mobile phone sends the high level signal to the intelligent door lock, so that the main control MCU is awakened.
Optionally, the main control MCU may also be awakened through voice information sent by a user, for example: the user presets a wake-up word 'small T and small T', and the wake-up word is stored in the intelligent door lock. When a user sends a small T and a small T to the intelligent door lock, the intelligent door lock automatically identifies the voice information, obtains text contents in the voice information, and wakes up the main control MCU if the text contents are consistent with the pre-stored wake-up words.
And step S36, performing awakening configuration on each external module, and correcting the beat of the intelligent door lock system.
After waking up the main control MCU, further waking up and configuring each external module, and correcting the system clock of the intelligent door lock, specifically, after waking up the main control MCU, setting the working mode of each external module as the running mode, and simultaneously, setting the power supply, the related pins, the clock, etc. of each external module, when setting the clock, setting the clock parameters, such as turning on the external high-speed clock crystal oscillator, setting the system clock, etc. Secondly, when the intelligent door lock is in a sleep state, a system clock (system beat) is stopped, so that the system beat is stopped in the sleep time, and after the intelligent door lock is awakened, the system beat is added with the system beat number corresponding to the sleep time. All operating systems need to provide a system clock beat for the system to process time-related events (timebases) such as delays, timeouts, etc. The system clock beat is a specific periodic interruption, the clock interval between the interruptions depends on different applications, a time base is set, generally about 1ms, and meanwhile, the clock beat interruption of the clock can delay the task by a plurality of clock beats (the CPU is released to other tasks and the task is executed after a plurality of time); wait timeout waiting is also provided when a task wait event occurs, the faster the clock beat frequency, the greater the system overhead. Therefore, after the intelligent door lock is awakened, the system beat needs to be corrected in time so as to avoid the problem that the system beat frequency is too high, which causes high system overhead.
Further, referring to fig. 8, after the step of performing wakeup configuration on each external module and correcting the beat of the intelligent door lock system, the method further includes:
step S360, obtaining a scheduling instruction, wherein the scheduling instruction is used for indicating the user task to be executed;
and step S361, starting the intelligent door lock system to process the user task according to the scheduling instruction.
And after receiving the awakening signal, the intelligent door lock automatically generates a scheduling instruction or receives the scheduling instruction issued by a dispatcher from the client, wherein the scheduling instruction is used for indicating the user task to be executed, and the intelligent door lock system is started to process the user task according to the scheduling instruction. Specifically, the intelligent door lock pre-classifies user tasks into three low levels, such as: the first level (emergency), the second level (important) and the third level (normal) adopt different scheduling methods for user tasks with different priorities further according to the load condition of the system. For example: for a user task of a first level, firstly searching an idle working thread from a system, and scheduling the user task to the idle working thread for execution; and if the idle working thread is not found, creating a new idle working thread, and scheduling the user task to the newly created working thread. For the user tasks of the second level, the expected waiting time of each user task in the waiting queue is obtained from the system, the expected waiting time is compared with the latest execution time of the current user task, a task queue with the expected waiting time being less than the latest execution time of the current user task is obtained, and the current user task is dispatched to the tail end of the task queue; and if the matched task queue is not found, searching an idle working thread in the system, and scheduling the current user task to an idle time thread. And for the user task of the first level, acquiring the content correspondingly executed by the user task, searching a non-idle working thread matched with the content in the system, and scheduling the user task to the non-idle working thread. The user tasks are divided into three different grades, and different scheduling schemes are adopted based on different grades, so that the user tasks can be executed in time, and the real-time requirements of users are met.
In this embodiment, after an external event occurs or an RTC wakes up, the main control MCU wakes up from the power down mode to wake up configuration and modify system beats for each external module, and meanwhile, by acquiring a scheduling instruction, the system is started in time to process the user task through the scheduling instruction, so that the system can process various transactions in time after being woken up, and normal operation of the system is ensured.
To better explain the scheme of the embodiment of the present application, the operation flow of the method for reducing the power consumption of the intelligent door lock in terms of software is as follows:
referring to fig. 9, after the smart door lock is powered on, the RTOS system enters initialization, and after the initialization is completed, the current user task is processed. When a user does not interact with the intelligent door lock for a long time (such as 2 hours), whether the RTOS system enters an idle state (namely a standby state) is detected, if yes, an idle task is executed, and if not, the step of detecting whether the RTOS system enters the idle state is returned. In the process of executing the idle task, acquiring the time Ti of the system for the estimated idle maintenance, namely the idle time, judging whether the idle time meets the sleep requirement, and if the time Ti of the estimated idle maintenance is greater than the shortest sleep time, judging that the idle time meets the sleep requirement; and if the time Ti of the expected idle maintenance is less than the shortest sleep time, returning to the step of detecting whether the RTOS system enters the idle state or not. When the idle time meets the sleep requirement, acquiring data of each functional interface of the system, judging whether user tasks in the system are idle through the data, and if so, performing low-power-consumption sleep configuration on an external module; and if any non-idle user task exists, returning to the step of detecting whether the RTOS system enters an idle state or not. When the low-power-consumption sleep configuration of the external module is carried out, the external module is required to be configured to enter a low-power-consumption mode, an upper peripheral and a clock which are irrelevant to low power consumption are closed, a proper pin level is configured, electric leakage and the like are avoided, further RTC wakeup and GINT wakeup are required to be configured, the idle expected maintenance time Ti is compared with the maximum sleep duration, and if the idle expected maintenance time Ti is smaller than the maximum sleep duration, the idle expected maintenance time Ti is taken as the wakeup duration; and if the time Ti of the expected idle maintenance is larger than the maximum dormancy duration, taking the maximum dormancy duration as the awakening duration. And after the configuration is finished, controlling the main control MCU to enter a power-down mode, and setting RTC/GINT timing interruption at the same time. When receiving the awakening signal, awakening the main control MCU, awakening and configuring each external module, correcting the beat of the intelligent door lock system, simultaneously acquiring a scheduling instruction, and starting the intelligent door lock system to process the user task according to the scheduling instruction. And after the system is awakened to work normally, continuously detecting whether the RTOS system enters an idle state (namely a standby state) in real time.
This embodiment all is in when idle state at intelligent lock system and each user task, carries out the low-power consumption setting to each external module to and set up awakening time and make master control MCU get into the dormancy state, solved because intelligent lock functional module is more, the consumption that leads to intelligent lock is higher, need frequently change the problem of battery, effectively reduced the consumption of intelligent electric lock, reduce the change number of times of battery and improved the life-span of intelligent lock.
In addition, this application still provides a system for reducing power consumption of intelligent door lock, and in an embodiment, the system includes a memory, a processor, and a program for reducing power consumption of intelligent door lock that is stored on the memory and can be run on the processor, and the program for reducing power consumption of intelligent door lock realizes the following steps when being executed by the processor:
when the intelligent door lock system is detected to enter an idle state, acquiring the current idle time;
when the idle time meets the dormancy condition, acquiring data of each functional interface;
and if the user task is determined to be in the idle state based on the data, controlling the intelligent door lock system to enter a dormant state.
In one embodiment, the system for reducing the power consumption of the intelligent door lock comprises a first obtaining module, a second obtaining module and a determining module;
the first acquisition module is used for acquiring the current idle time when the intelligent door lock system is detected to enter the idle state;
the second obtaining module is configured to obtain data of each functional interface when the idle duration meets a sleep condition;
and the determining module is used for controlling the intelligent door lock system to enter a dormant state if the user task is determined to be in an idle state based on the data.
Further, the determination module comprises a configuration unit;
the configuration unit is used for carrying out low-power consumption configuration on each external module; and
the configuration unit is further used for setting the awakening duration and controlling the main control chip to enter a dormant state.
Further, the second obtaining module comprises an obtaining unit;
the acquiring unit is used for acquiring a first preset dormancy duration;
the obtaining unit is further configured to obtain data of each functional interface if the first preset sleep duration is less than the idle duration.
Further, the configuration unit comprises an acquisition subunit and a determination subunit;
the acquiring subunit is configured to acquire a second preset sleep duration, and compare the second preset sleep duration with the idle duration;
the determining subunit is configured to determine, if the second preset sleep duration is smaller than the idle duration, that the second preset sleep duration is the wakeup duration; or
The determining subunit is further configured to determine, if the second preset sleep duration is greater than the idle duration, that the idle duration is the wakeup duration.
Further, the determining module further comprises a wake-up unit;
the awakening unit is used for automatically awakening the intelligent door lock system when the current dormancy duration reaches the awakening duration;
the awakening unit is further used for acquiring current first idle time, and if the first idle time meets the dormancy condition and the user task is in an idle state, the intelligent door lock system is controlled to enter the dormancy state again.
Furthermore, the wake-up unit is further configured to wake up the main control chip when receiving a wake-up signal; and
and the awakening unit is also used for awakening and configuring each external module and correcting the beat of the intelligent door lock system.
Further, the wake-up unit comprises a detection subunit and a wake-up subunit;
the detection subunit is used for generating a high-level signal when detecting that the target key is in a pressed state;
and the awakening subunit is used for awakening the main control chip according to the high-level signal.
Furthermore, the awakening unit also comprises an acquiring subunit and a scheduling subunit;
the acquiring subunit is configured to acquire a scheduling instruction, where the scheduling instruction is used to indicate the user task to be executed;
and the scheduling subunit is used for starting the intelligent door lock system to process the user task according to the scheduling instruction.
The implementation of the functions of each module of the system for reducing the power consumption of the intelligent door lock is similar to the process in the embodiment of the method, and the details are not repeated here.
In addition, the application also provides an intelligent door lock, which comprises a memory, a processor and a program which is stored in the memory and operated on the processor and used for reducing the power consumption of the intelligent door lock, wherein when the intelligent door lock detects that the intelligent door lock system enters an idle state, the intelligent door lock acquires the current idle time; when the idle time meets the dormancy condition, acquiring data of each functional interface; and if the user task is determined to be in the idle state based on the data, controlling the intelligent door lock system to enter the dormant state. Through when intelligent lock system and each user task all are in idle state, carry out the low-power consumption setting to each outside module to and set up awakening time and make master control MCU get into the dormancy state, solved because intelligent lock functional module is more, the consumption that leads to intelligent lock is higher, need frequently change the problem of battery, effectively reduced the consumption of intelligent electric lock, reduce the change number of times of battery and improved the life-span of intelligent lock.
In addition, the present application also provides a computer readable storage medium, where a program for reducing the power consumption of the intelligent door lock is stored on the computer readable storage medium, and when the program for reducing the power consumption of the intelligent door lock is executed by a processor, the steps of the method for reducing the power consumption of the intelligent door lock are implemented.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While alternative embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following appended claims be interpreted as including alternative embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A method for reducing power consumption of an intelligent door lock, the method comprising:
when the intelligent door lock system is detected to enter an idle state, acquiring the current idle time;
when the idle time meets the dormancy condition, acquiring data of each functional interface;
and if the user task is determined to be in the idle state based on the data, controlling the intelligent door lock system to enter a dormant state.
2. The method for reducing the power consumption of the intelligent door lock according to claim 1, wherein the step of controlling the intelligent door lock system to enter the sleep state comprises:
performing low-power consumption configuration on each external module; and
and setting the awakening time and controlling the main control chip to enter a dormant state.
3. The method for reducing power consumption of an intelligent door lock according to claim 1, wherein the step of acquiring data of each functional interface when the idle duration satisfies the sleep condition comprises:
acquiring a first preset dormancy duration;
and if the first preset dormancy duration is less than the idle duration, acquiring the data of each functional interface.
4. The method for reducing power consumption of an intelligent door lock according to claim 2, wherein the step of setting the wake-up duration comprises:
acquiring a second preset sleep time, and comparing the second preset sleep time with the idle time;
if the second preset sleeping time is smaller than the idle time, determining the second preset sleeping time as the awakening time; or
And if the second preset sleeping time length is greater than the idle time length, determining the idle time length as the awakening time length.
5. The method for reducing the power consumption of the intelligent door lock according to any one of claims 1 to 4, wherein after the step of controlling the intelligent door lock system to enter the sleep state, the method further comprises:
when the current dormancy duration reaches the awakening duration, automatically awakening the intelligent door lock system;
and acquiring a current first idle time, and if the first idle time meets the sleep condition and the user task is in an idle state, controlling the intelligent door lock system to enter the sleep state again.
6. The method for reducing the power consumption of the intelligent door lock according to any one of claims 1 to 4, wherein after the step of controlling the intelligent door lock system to enter the sleep state, the method further comprises:
when receiving a wake-up signal, waking up the main control chip; and
and performing awakening configuration on each external module, and correcting the beat of the intelligent door lock system.
7. The method for reducing power consumption of an intelligent door lock according to claim 6, wherein the step of waking up the main control chip when a wake-up signal is received comprises:
generating a high level signal when detecting that the target key is in a pressed state;
and awakening the main control chip according to the high-level signal.
8. The method for reducing power consumption of an intelligent door lock according to claim 6, wherein after the step of performing wakeup configuration on each external module and modifying the beat of the intelligent door lock system, the method further comprises:
acquiring a scheduling instruction, wherein the scheduling instruction is used for indicating the user task to be executed;
and starting the intelligent door lock system to process the user task according to the scheduling instruction.
9. An intelligent door lock, characterized in that the intelligent door lock comprises a memory, a processor and a program stored in the memory and running on the processor for reducing the power consumption of the intelligent door lock, and the processor implements the steps of the method according to any one of claims 1 to 8 when executing the program for reducing the power consumption of the intelligent door lock.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a program for reducing power consumption of an intelligent door lock, which when executed by a processor implements the steps of the method according to any one of claims 1 to 8.
CN202011299093.4A 2020-11-18 2020-11-18 Method for reducing power consumption of intelligent door lock, intelligent door lock and storage medium Active CN112530056B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011299093.4A CN112530056B (en) 2020-11-18 2020-11-18 Method for reducing power consumption of intelligent door lock, intelligent door lock and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011299093.4A CN112530056B (en) 2020-11-18 2020-11-18 Method for reducing power consumption of intelligent door lock, intelligent door lock and storage medium

Publications (2)

Publication Number Publication Date
CN112530056A true CN112530056A (en) 2021-03-19
CN112530056B CN112530056B (en) 2023-07-25

Family

ID=74981273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011299093.4A Active CN112530056B (en) 2020-11-18 2020-11-18 Method for reducing power consumption of intelligent door lock, intelligent door lock and storage medium

Country Status (1)

Country Link
CN (1) CN112530056B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114153305A (en) * 2021-11-19 2022-03-08 江苏林洋能源股份有限公司 Intelligent ammeter based on light-weight real-time operating system and low-power-consumption management method
CN114158027A (en) * 2021-12-14 2022-03-08 深圳Tcl新技术有限公司 Communication connection method, device, terminal and storage medium
CN114155636A (en) * 2021-12-14 2022-03-08 深圳Tcl新技术有限公司 Device control method, device, electronic device and storage medium
CN114286431A (en) * 2021-12-02 2022-04-05 海尔优家智能科技(北京)有限公司 Method and device for starting low power consumption mode, storage medium and electronic device
CN114495338A (en) * 2022-03-10 2022-05-13 珠海格力电器股份有限公司 Door lock control method and device, electronic equipment and storage medium
CN115019494A (en) * 2022-06-02 2022-09-06 武汉领普科技有限公司 Wireless switch, processing method of wireless switch and control system
CN115993996A (en) * 2023-03-22 2023-04-21 南京芯驰半导体科技有限公司 Method and system for realizing sleep mode based on RTOS
CN114155636B (en) * 2021-12-14 2024-06-04 深圳Tcl新技术有限公司 Equipment control method, device, electronic equipment and storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH084386A (en) * 1994-06-23 1996-01-09 Mazda Motor Corp Locking device
CN102222022A (en) * 2011-07-15 2011-10-19 范示德汽车技术(上海)有限公司 Real-time task scheduling method based on multicore processor
CN103176841A (en) * 2013-03-06 2013-06-26 深圳市文鼎创数据科技有限公司 Implementation method and device for Tick clock of real time operating system (RTOS)
CN105225316A (en) * 2015-09-23 2016-01-06 曾松峰 A kind of dormancy of electron key low-power consumption power supply plan and awakening method
CN105630132A (en) * 2015-12-23 2016-06-01 深圳市万普拉斯科技有限公司 Power consumption control method and system as well as terminal
CN106375396A (en) * 2016-08-30 2017-02-01 乐视控股(北京)有限公司 Method and device for dormancy and awakening of vehicle-mounted intelligent terminal
CN107733994A (en) * 2017-09-20 2018-02-23 美的智慧家居科技有限公司 Control method, intelligent door lock and the readable storage medium storing program for executing of intelligent door lock
CN107977606A (en) * 2017-11-13 2018-05-01 深圳贝特莱电子科技股份有限公司 The embedded fingerprint identification device and method of a kind of super-low standby power consumption
WO2019001331A1 (en) * 2017-06-27 2019-01-03 阿里巴巴集团控股有限公司 Clock tick interrupt configuration method and device
CN109356459A (en) * 2018-10-23 2019-02-19 郑州博雅讯科技有限公司 The low-power consumption regulation method, apparatus and intelligent electronic lock of intelligent electronic lock
CN109448178A (en) * 2018-10-15 2019-03-08 上海顺舟智能科技股份有限公司 A kind of low power-consumption intelligent door-locking system and its control method
CN109983513A (en) * 2019-02-20 2019-07-05 深圳市汇顶科技股份有限公司 Smart lock method for controlling power supply, intelligent lock system and storage medium
CN110424831A (en) * 2019-08-12 2019-11-08 北京百佑科技有限公司 Low power-consumption intelligent door lock
CN209855432U (en) * 2019-03-14 2019-12-27 深圳中集智能科技有限公司 Intelligent electronic lock
CN111047758A (en) * 2019-11-29 2020-04-21 深圳市云天智能终端有限公司 Awakening method and system of intelligent electronic equipment

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH084386A (en) * 1994-06-23 1996-01-09 Mazda Motor Corp Locking device
CN102222022A (en) * 2011-07-15 2011-10-19 范示德汽车技术(上海)有限公司 Real-time task scheduling method based on multicore processor
CN103176841A (en) * 2013-03-06 2013-06-26 深圳市文鼎创数据科技有限公司 Implementation method and device for Tick clock of real time operating system (RTOS)
CN105225316A (en) * 2015-09-23 2016-01-06 曾松峰 A kind of dormancy of electron key low-power consumption power supply plan and awakening method
CN105630132A (en) * 2015-12-23 2016-06-01 深圳市万普拉斯科技有限公司 Power consumption control method and system as well as terminal
CN106375396A (en) * 2016-08-30 2017-02-01 乐视控股(北京)有限公司 Method and device for dormancy and awakening of vehicle-mounted intelligent terminal
WO2019001331A1 (en) * 2017-06-27 2019-01-03 阿里巴巴集团控股有限公司 Clock tick interrupt configuration method and device
CN107733994A (en) * 2017-09-20 2018-02-23 美的智慧家居科技有限公司 Control method, intelligent door lock and the readable storage medium storing program for executing of intelligent door lock
CN107977606A (en) * 2017-11-13 2018-05-01 深圳贝特莱电子科技股份有限公司 The embedded fingerprint identification device and method of a kind of super-low standby power consumption
CN109448178A (en) * 2018-10-15 2019-03-08 上海顺舟智能科技股份有限公司 A kind of low power-consumption intelligent door-locking system and its control method
CN109356459A (en) * 2018-10-23 2019-02-19 郑州博雅讯科技有限公司 The low-power consumption regulation method, apparatus and intelligent electronic lock of intelligent electronic lock
CN109983513A (en) * 2019-02-20 2019-07-05 深圳市汇顶科技股份有限公司 Smart lock method for controlling power supply, intelligent lock system and storage medium
CN209855432U (en) * 2019-03-14 2019-12-27 深圳中集智能科技有限公司 Intelligent electronic lock
CN110424831A (en) * 2019-08-12 2019-11-08 北京百佑科技有限公司 Low power-consumption intelligent door lock
CN111047758A (en) * 2019-11-29 2020-04-21 深圳市云天智能终端有限公司 Awakening method and system of intelligent electronic equipment

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114153305A (en) * 2021-11-19 2022-03-08 江苏林洋能源股份有限公司 Intelligent ammeter based on light-weight real-time operating system and low-power-consumption management method
CN114286431A (en) * 2021-12-02 2022-04-05 海尔优家智能科技(北京)有限公司 Method and device for starting low power consumption mode, storage medium and electronic device
CN114286431B (en) * 2021-12-02 2024-03-22 海尔优家智能科技(北京)有限公司 Method and device for starting low-power mode, storage medium and electronic device
CN114158027A (en) * 2021-12-14 2022-03-08 深圳Tcl新技术有限公司 Communication connection method, device, terminal and storage medium
CN114155636A (en) * 2021-12-14 2022-03-08 深圳Tcl新技术有限公司 Device control method, device, electronic device and storage medium
CN114158027B (en) * 2021-12-14 2023-07-25 深圳Tcl新技术有限公司 Communication connection method, device, terminal and storage medium
CN114155636B (en) * 2021-12-14 2024-06-04 深圳Tcl新技术有限公司 Equipment control method, device, electronic equipment and storage medium
CN114495338A (en) * 2022-03-10 2022-05-13 珠海格力电器股份有限公司 Door lock control method and device, electronic equipment and storage medium
CN115019494A (en) * 2022-06-02 2022-09-06 武汉领普科技有限公司 Wireless switch, processing method of wireless switch and control system
CN115019494B (en) * 2022-06-02 2024-02-06 武汉领普科技有限公司 Wireless switch, processing method and control system of wireless switch
CN115993996A (en) * 2023-03-22 2023-04-21 南京芯驰半导体科技有限公司 Method and system for realizing sleep mode based on RTOS

Also Published As

Publication number Publication date
CN112530056B (en) 2023-07-25

Similar Documents

Publication Publication Date Title
CN112530056B (en) Method for reducing power consumption of intelligent door lock, intelligent door lock and storage medium
TWI494857B (en) Method for performing wake-up event management, and associated apparatus and associated computer program product
TWI656439B (en) Application program wake-up method and device
US9152199B2 (en) Power state dependent wake-up alarm
CN102483706B (en) Information processing device, control method of information processing device
US7430673B2 (en) Power management system for computing platform
EP3268842B1 (en) Methods and systems for coordination of operating states amongst multiple socs within a computing device
CN106959857B (en) Application control method and device of electronic equipment
CN105353864A (en) Static power consumption management method and system for electronic device
CN103345415A (en) Terminal energy-saving method and device for management timer
WO2018072411A1 (en) Screen control method, device and terminal
CN110568921B (en) Method for reducing chip power consumption
CN104636169A (en) System awakening method and system awakening device
CN111225434B (en) Application response method, system, storage medium and communication module
CN104111850A (en) Method and system for reducing power consumption of MCU (Micro-Control Unit)
WO2022052492A1 (en) Gas meter with program embedded in nb-iot communication module, and data processing method
CN110543259A (en) Fingerprint unlocking method of display device and display device
JP2003015783A (en) Information processor and its power management method
WO2018010438A1 (en) Responding method and apparatus for terminal
CN109062624A (en) It is a kind of to interrupt the processing method waken up for vehicle electronic control unit
CN111857841A (en) Awakening method of main control chip, storage medium and intelligent terminal
CN111352796B (en) Method and device for acquiring electric quantity by intelligent wearable equipment
JP2000506649A (en) Method and apparatus for managing power using a power controller
CN102572592B (en) Based on the set-top box standby control method of system Dynamic clock management
CN104965759A (en) Method for controlling terminal and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant