CN112905250A - Awakening method and system of embedded equipment - Google Patents
Awakening method and system of embedded equipment Download PDFInfo
- Publication number
- CN112905250A CN112905250A CN202110179326.5A CN202110179326A CN112905250A CN 112905250 A CN112905250 A CN 112905250A CN 202110179326 A CN202110179326 A CN 202110179326A CN 112905250 A CN112905250 A CN 112905250A
- Authority
- CN
- China
- Prior art keywords
- time
- wake
- equipment
- sleep
- time information
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000007958 sleep Effects 0.000 claims abstract description 88
- 230000002618 waking effect Effects 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 claims description 6
- 230000001360 synchronised effect Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 4
- 230000004622 sleep time Effects 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000006855 networking Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4418—Suspend and resume; Hibernate and awake
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Electric Clocks (AREA)
Abstract
The invention discloses a method and a system for awakening embedded equipment, wherein the method comprises the following steps: s101, a micro-processing controller of the equipment receives a wake-up instruction sent by a deep sleep timer so as to control the equipment to enter an operating state; s102, the equipment completes task execution operation; s103, the equipment acquires network time; s104, the equipment synchronizes the acquired network time to an RTC; s105 reading RTC current time information TREC(ii) a S106 according to the RTC current time information TRECCalculating the time information T of the next awakening equipmentWAK(ii) a S107, storing the time information of the next awakening equipment in a deep-sleep timer, wherein the deep-sleep timer is set to send an awakening instruction to the microprocessing controller when the timer counts the time of the next awakening equipment; s108 the device goes to deep sleep. The invention can still wake up the equipment according to the preset time under the condition that the network time cannot be synchronized to the equipment.
Description
Technical Field
The invention belongs to the field of development of an internet of things of embedded equipment, and particularly relates to a wake-up method and a wake-up system of the embedded equipment.
Background
With the development of the internet of things industry, various MCU carry wifi, gps and other modules of the internet of things equipment more and more, especially NBIOT-based narrowband internet of things equipment, and the requirement for equipment power consumption is higher. Such devices are often in a sleep state for a long time in order to reduce power consumption, and enter an active state by waking up periodically or at a desired time. In some application scenarios, the device not only needs to wake up at the exact interval, but also needs to ensure that the device will wake up at a certain time when expected. However, some mobile internet of things devices cannot always use the network synchronization time to ensure that the devices are awakened at the preset time under the condition that a networking blind area sometimes occurs. If the wake-up method and the wake-up system for the embedded device are designed, the device can still be woken up within the preset time under the condition that the network time cannot be synchronized to the device, so that the problems are solved, and the use of the device of the internet of things is more efficient and convenient.
Disclosure of Invention
The invention aims to provide a method and a system for waking up an embedded device.
The awakening method of the embedded equipment provided by the invention comprises the following steps:
s101, a micro-processing controller of the equipment receives a wake-up instruction sent by a deep sleep timer so as to control the equipment to enter an operating state;
s102, the equipment completes task execution operation;
s103, the equipment acquires network time;
s104, the equipment synchronizes the acquired network time to an RTC;
s105 reading RTC current time information TREC;
S106 according to the RTC current time information TRECCalculating the time information T of the next awakening equipmentWAK;
S107, storing the time information of the next awakening equipment in a deep-sleep timer, wherein the deep-sleep timer is set to send an awakening instruction to the microprocessing controller when the timer counts the time of the next awakening equipment;
s108 the device goes to deep sleep.
The step of S106 calculating time information of the next time of waking up the device according to the current time information of the RTC includes:
s1061, setting a sleep cycle delta T;
s1062 by TWAK=TREC+ delta T algorithm calculation to obtain time information T of next awakening deviceWAK。
The invention also provides another awakening method of the embedded equipment, which comprises the following steps:
s201, the embedded device records the time of first starting or awakening, and the time represents the operation of the embedded device systemLine initial time TO;
S202, the embedded equipment processes a core task in a running state;
s203 the embedded device reads the awakening interval parameter information TheartbeatAnd the time information T that the embedded device must wake upWAKE;
S204 executes obtaining the current network time TNOWAnd judging the current network time TNOWWhether the acquisition is successful, e.g. current network time TNOWIf the acquisition is successful, executing a first sleep awakening step; such as the current network time TNOWAnd if the acquisition fails, executing a second sleep awakening step.
The first sleep wake-up step includes:
s20511 acquires the current network time TNOWConverting to UTC timestamp;
s20512 judges the current network time TNOWWhether the time information T that the embedded device must wake up has been exceededWAKEIf yes, executing the network time compensation operation, and then executing step S20513; if not, directly executing step S2053; said network time compensation operation being according to an algorithm TWAKE=TNOW+(TNOW-TWAKE) % (24 x 3600) compute operation execution;
s20513 sets Δ T to (T) according to the algorithmWAKE-TNOW)%TheartbeatPerforming operation processing;
s20514 determines the time information T that the embedded device must wake upWAKEWith the current network time TNOWTime difference and wakeup interval parameter information TheartbeatComparing, and obtaining the time information T when the embedded device has to be awakenedWAKEWith the current network time TNOWIs greater than the wake-up interval parameter information TheartbeatThen, step S20515 is executed;
s20515 according to the Algorithm Tslp=ΔT+TheartbeatCalculating the time information T of still needing sleeping at the current timeslp;
S20516 time information T for still needing sleepslpSetting the sleep timer so that it is at the setAnd (5) waking up the time and entering a working state.
The second sleep wake-up step includes:
s20521 records the local timestamp T of the current one-time startup or embedded device awakeningBOOT;
S20522 records the local timestamp T before writing to the deep sleep timerRUN;
S20523 following Algorithm Tslp=Theartbeat-(TRUN-TBOOT)%TheartbeatCalculating the time information T of still needing sleeping at the current timeslp;
S20524 time information T for further sleepslpAnd setting a sound sleep timer so as to wake up at the set time and enter a working state.
The invention also provides a wake-up system of the embedded device, which comprises the following steps:
a module for controlling the equipment to enter the running state when the micro-processing controller of the equipment receives the wake-up instruction sent by the deep sleep timer;
the device comprises a module for completing task execution operation of the device;
means for a device to obtain network time;
means for the device to synchronize the acquired network time into the RTC;
for reading RTC current time information TRECThe module of (1);
for obtaining current time information T according to RTCRECCalculating the time information T of the next awakening equipmentWAKThe module of (1);
the module is used for storing the time information of the next awakening equipment in the deep sleep timer, and setting the deep sleep timer to send an awakening instruction to the microprocessing controller when the timer counts the time of the next awakening equipment;
a module for a device to enter deep sleep.
The device is used for obtaining current time information T according to RTCRECCalculating the time information T of the next awakening equipmentWAKThe module of (a), comprising:
a submodule for setting a sleep period Δ T;
for passing through TWAK=TREC+ delta T algorithm calculation to obtain time information T of next awakening deviceWAKThe submodule of (1).
The invention also provides another wake-up system of the embedded device, which comprises the following steps:
recording the time of first startup or awakening for the embedded equipment, wherein the time represents the running initial time T of the embedded equipment systemOThe module of (1);
the module is used for processing core tasks of the embedded equipment in a running state;
read wake-up interval parameter information T for embedded deviceheartbeatAnd the time information T that the embedded device must wake upWAKEThe module of (1);
for performing the acquisition of the current network time TNOWAnd judging the current network time TNOWObtaining whether the module is successful;
a first sleep wake-up module;
and the second sleep awakening module.
The first sleep wake-up module comprises:
for obtaining the current network time TNOWA sub-module for converting to a UTC timestamp;
for judging the current network time TNOWWhether the time information T that the embedded device must wake up has been exceededWAKEThe sub-modules of (1);
for following the algorithm Δ T ═ (T)WAKE-TNOW)%TheartbeatA submodule for performing operation processing and network time compensation operation;
time information T for when an embedded device has to wake upWAKEWith the current network time TNOWTime difference and wakeup interval parameter information TheartbeatA submodule for performing comparison;
for following algorithm Tslp=ΔT+TheartbeatCalculating the time information T of still needing sleeping at the current timeslpSub-module of;
Time information T for going to sleepslpAnd setting a deep sleep timer so as to wake up at the set time and enter the submodule in the working state.
The second sleep wake-up module comprises:
local timestamp T for recording current one-time starting or awakening embedded deviceBOOTThe sub-modules of (1);
for recording the local time stamp T before writing into the deep-sleep timerRUNThe sub-modules of (1);
for following algorithm Tslp=Theartbeat-(TRUN-TBOOT)%TheartbeatCalculating the time information T of still needing sleeping at the current timeslpThe sub-modules of (1);
time information T for going to sleepslpAnd setting a deep sleep timer so as to wake up at the set time and enter the submodule in the working state.
The awakening method and the awakening system of the embedded equipment can still awaken the equipment according to the preset time under the condition that the network time cannot be synchronized to the equipment, thereby ensuring the normal operation of the equipment and improving the high efficiency and the convenience of the use of the networking equipment.
Drawings
Fig. 1 is a schematic flowchart of a wake-up method of an embedded device according to a first embodiment of the present invention;
fig. 2 is a step of calculating time information of a next time wake-up device according to current time information of an RTC in the wake-up method of an embedded device according to the first embodiment of the present invention;
fig. 3 is a flowchart illustrating a wake-up method of an embedded device according to a third embodiment of the present invention;
fig. 4 is a schematic diagram of a first sleep wake-up step in the wake-up method for an embedded device according to the third embodiment of the present invention;
fig. 5 is a schematic diagram of a second sleep wake-up step in the wake-up method for an embedded device according to the third embodiment of the present invention;
fig. 6 is a schematic overall flowchart of a wake-up method for an embedded device according to a third embodiment of the present invention;
fig. 7 is a schematic diagram illustrating network time compensation operation in a wake-up method of an embedded device according to a third embodiment of the present invention;
fig. 8 is a schematic diagram illustrating the operation of a second sleep wake-up step in the wake-up method of the embedded device according to the third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
The invention provides a wake-up method of embedded equipment, which comprises the following steps:
s101, a micro-processing controller of the equipment receives a wake-up instruction sent by a deep sleep timer so as to control the equipment to enter an operating state;
s102, the equipment completes task execution operation;
s103, the equipment acquires network time;
s104, the equipment synchronizes the acquired network time to an RTC;
s105 reading RTC current time information TREC;
S106 according to the RTC current time information TRECCalculating the time information T of the next awakening equipmentWAK;
S107, storing the time information of the next awakening equipment in a deep-sleep timer, wherein the deep-sleep timer is set to send an awakening instruction to the microprocessing controller when the timer counts the time of the next awakening equipment;
s108 the device goes to deep sleep.
The step of S106 calculating time information of the next time of waking up the device according to the current time information of the RTC includes:
s1061, setting a sleep cycle delta T;
s1062 by TWAK=TREC+ delta T algorithm calculation to obtain time information T of next awakening deviceWAK。
The technical personnel in the field can understand that through the awakening method of the embedded device, the embedded device can be awakened to enter the working state according to the set time after entering the sleep time, and because the deep sleep timer keeps working in the sleep process, even if the network time cannot be synchronized to the RTC in the off-line or sleep process, the embedded device can be ensured to enter the sleep state for a consistent time period no matter how long the embedded device works in the working state, thereby being beneficial to the arrangement and the set work of a user and the execution of a running task.
Example two
The wakeup method for the embedded device provided by the embodiment comprises the following steps:
s201, the embedded device records the time of first starting or awakening, wherein the time represents the initial running time T of the embedded device systemO;
S202, the embedded equipment processes a core task in a running state;
s203 the embedded device reads the awakening interval parameter information TheartbeatAnd the time information T that the embedded device must wake upWAKE(ii) a As will be understood by those skilled in the art, the wake-up interval parameter information T is readheartbeatAnd the time information T that the embedded device must wake upWAKEThe method can be obtained by a server or a user in the local setting of the embedded device.
S204 executes obtaining the current network time TNOWAnd judging the current network time TNOWWhether the acquisition is successful, e.g. current network time TNOWIf the acquisition is successful, executing a first sleep awakening step; such as the current network time TNOWAnd if the acquisition fails, executing a second sleep awakening step. Those skilled in the art canIt is understood that the wakeup method of the embedded device provided in this embodiment may not only successfully acquire the current network time TNOWCompleting sleep wake-up in case of (1); at the same time, even when the network time T cannot be acquiredNOWUnder the condition, the sleep awakening can be completed, so that the awakening function of the embedded equipment can be realized according to the set time point and interval, the normal operation of the embedded equipment is ensured, the arrangement and the setting work of a user are facilitated, and the operation task is executed.
The first sleep wake-up step includes:
s20511 acquires the current network time TNOWConverting to UTC timestamp;
s20512 judges the current network time TNOWWhether the time information T that the embedded device must wake up has been exceededWAKEIf yes, executing the network time compensation operation, and then executing step S20513; if not, directly executing step S2053; said network time compensation operation being according to an algorithm TWAKE=TNOW+(TNOW-TWAKE) % (24 x 3600) compute operation execution;
s20513 sets Δ T to (T) according to the algorithmWAKE-TNOW)%TheartbeatPerforming operation processing;
s20514 determines the time information T that the embedded device must wake upWAKEWith the current network time TNOWTime difference and wakeup interval parameter information TheartbeatComparing, and obtaining the time information T when the embedded device has to be awakenedWAKEWith the current network time TNOWIs greater than the wake-up interval parameter information TheartbeatThen, step S20515 is executed;
s20515 according to the Algorithm Tslp=ΔT+TheartbeatCalculating the time information T of still needing sleeping at the current timeslp;
S20516 time information T for still needing sleepslpAnd setting a sound sleep timer so as to wake up at the set time and enter a working state.
The second sleep wake-up step includes:
s20521 recording the CurrentLocal time stamp T for one-time starting or awakening embedded deviceBOOT;
S20522 records the local timestamp T before writing to the deep sleep timerRUN;
S20523 following Algorithm Tslp=Theartbeat-(TRUN-TBOOT)%TheartbeatCalculating the time information T of still needing sleeping at the current timeslp;
S20524 time information T for further sleepslpAnd setting a sound sleep timer so as to wake up at the set time and enter a working state.
As can be understood by those skilled in the art, since the time point of each fixed wakeup and the time point of the scheduled wakeup coincide when the embedded device succeeds in acquiring the network time, the timer of the micro-processing controller is used according to the wakeup interval parameter information T under the condition of no network time synchronizationheartbeatThe timed awakening device can still ensure that the system can be awakened at the expected time, so when the network acquisition fails and the second sleep awakening step is executed, only the local timestamp T of the current startup or awakening of the embedded device is recordedBOOTAnd writing the local timestamp TRUN before the deep sleep timer to obtain the time written into the deep sleep timer.
EXAMPLE III
The invention provides a wake-up system of embedded equipment, which comprises the following steps:
a module for controlling the equipment to enter the running state when the micro-processing controller of the equipment receives the wake-up instruction sent by the deep sleep timer;
the device comprises a module for completing task execution operation of the device;
means for a device to obtain network time;
means for the device to synchronize the acquired network time into the RTC;
for reading RTC current time information TRECThe module of (1);
for obtaining current time information T according to RTCRECCalculating the time information T of the next awakening equipmentWAKThe module of (1);
the module is used for storing the time information of the next awakening equipment in the deep sleep timer, and setting the deep sleep timer to send an awakening instruction to the microprocessing controller when the timer counts the time of the next awakening equipment;
a module for a device to enter deep sleep.
For obtaining current time information T according to RTCRECCalculating the time information T of the next awakening equipmentWAKThe module of (a), comprising:
a submodule for setting a sleep period Δ T;
for passing through TWAK=TREC+ delta T algorithm calculation to obtain time information T of next awakening deviceWAKThe submodule of (1).
The technical personnel in the field can understand that through the awakening system of the embedded device, the embedded device can be awakened to enter the working state according to the set time after entering the sleep time, and because the deep sleep timer keeps working in the sleep process, even if the network time cannot be synchronized to the RTC in the off-line or sleep process, the embedded device can be ensured to enter the sleep state for a consistent time period no matter how long the embedded device works in the working state, thereby being beneficial to the arrangement and the set work of a user and executing a running task.
Example four
The wake-up system of the embedded device provided by this embodiment includes the following steps:
recording the time of first startup or awakening for the embedded equipment, wherein the time represents the running initial time T of the embedded equipment systemOThe module of (1);
the module is used for processing core tasks of the embedded equipment in a running state;
read wake-up interval parameter information T for embedded deviceheartbeatAnd the time information T that the embedded device must wake upWAKEThe module of (1); as will be understood by those skilled in the art, the wake-up interval parameter information T is readheartbeatAnd the time information T that the embedded device must wake upWAKEThe method can be obtained by a server or a user in the local setting of the embedded device.
For performing the acquisition of the current network time TNOWAnd judging the current network time TNOWObtaining whether the module is successful;
a first sleep wake-up module;
and the second sleep awakening module. Those skilled in the art can understand that the wake-up system of the embedded device provided in this embodiment can not only successfully acquire the current network time TNOWCompleting sleep wake-up in case of (1); at the same time, even when the network time T cannot be acquiredNOWUnder the condition, the sleep awakening can be completed, so that the awakening function of the embedded equipment can be realized according to the set time point and interval, the normal operation of the embedded equipment is ensured, the arrangement and the setting work of a user are facilitated, and the operation task is executed.
The first sleep wake-up module comprises:
for obtaining the current network time TNOWA sub-module for converting to a UTC timestamp;
for judging the current network time TNOWWhether the time information T that the embedded device must wake up has been exceededWAKEThe sub-modules of (1);
for following the algorithm Δ T ═ (T)WAKE-TNOW)%TheartbeatA submodule for performing operation processing and network time compensation operation;
time information T for when an embedded device has to wake upWAKEWith the current network time TNOWTime difference and wakeup interval parameter information TheartbeatA submodule for performing comparison;
for following algorithm Tslp=ΔT+TheartbeatCalculating the time information T of still needing sleeping at the current timeslpSub-module of;
Time information T for going to sleepslpAnd setting a deep sleep timer so as to wake up at the set time and enter the submodule in the working state.
The second sleep wake-up module comprises:
local timestamp T for recording current one-time starting or awakening embedded deviceBOOTThe sub-modules of (1);
for recording the local time stamp T before writing into the deep-sleep timerRUNThe sub-modules of (1);
for following algorithm Tslp=Theartbeat-(TRUN-TBOOT)%TheartbeatCalculating the time information T of still needing sleeping at the current timeslpThe sub-modules of (1);
time information T for going to sleepslpAnd setting a deep sleep timer so as to wake up at the set time and enter the submodule in the working state.
As can be understood by those skilled in the art, since the time point of each fixed wakeup and the time point of the scheduled wakeup coincide when the embedded device succeeds in acquiring the network time, the timer of the micro-processing controller is used according to the wakeup interval parameter information T under the condition of no network time synchronizationheartbeatThe timed awakening device can still ensure that the system can be awakened at the expected time, so when the network acquisition fails and the second sleep awakening step is executed, only the local timestamp T of the current startup or awakening of the embedded device is recordedBOOTAnd writing the local timestamp TRUN before the deep sleep timer to obtain the time written into the deep sleep timer.
The following are example practical scenarios:
current time Tnow: 8/19/17/30 min/30 sec in 2020, and a UTC timestamp of 1597829430
Device interval wakeup time: t isheartbeat600 (second)
Timed wake-up time TNOW: 20/8/20/02/30 s in 2020, and a UTC timestamp of 1597924950
Assuming that the network clock is successfully synchronized, the required sleep time after the compensation is calculated as
Tslp600+ (1597924950) 1597829430)% 600 (second) 720 (second) 12 (min)
Then the wake-up time points of the device are as follows:
if the device starts to enter the network blind area at 20 days 19, 50 minutes to 20 days 20, the device does not wake up when entering the network blind area, so the device wakes up on time at 19 days 52 and 30 seconds, the device is in a non-network state, and the starting time T is recorded when the device wakes upBOOTIf the current time is recorded for 140s before the device sleeps for 0s, the device can calculate that the system is awake for 140s after waking up, and the sleep time is Tslp600-. The system can still wake up at the 20 hours of the appointment, 02 minutes and 30 seconds.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A wake-up method for an embedded device, comprising the steps of:
s101, a micro-processing controller of the equipment receives a wake-up instruction sent by a deep sleep timer so as to control the equipment to enter an operating state;
s102, the equipment completes task execution operation;
s103, the equipment acquires network time;
s104, the equipment synchronizes the acquired network time to an RTC;
s105 reading current time of RTCInformation TREC;
S106 according to the RTC current time information TRECCalculating the time information T of the next awakening equipmentWAK;
S107, storing the time information of the next awakening equipment in a deep-sleep timer, wherein the deep-sleep timer is set to send an awakening instruction to the microprocessing controller when the timer counts the time of the next awakening equipment;
s108 the device goes to deep sleep.
2. A wake-up method of an embedded device according to claim 1,
the step of S106 calculating time information of the next time of waking up the device according to the current time information of the RTC includes:
s1061, setting a sleep cycle delta T;
s1062 by TWAK=TREC+ delta T algorithm calculation to obtain time information T of next awakening deviceWAK。
3. A wake-up method for an embedded device, comprising the steps of:
s201, the embedded device records the time of first starting or awakening, wherein the time represents the initial running time T of the embedded device systemO;
S202, the embedded equipment processes a core task in a running state;
s203 the embedded device reads the awakening interval parameter information TheartbeatAnd the time information T that the embedded device must wake upWAKE;
S204 executes obtaining the current network time TNOWAnd judging the current network time TNOWWhether the acquisition is successful, e.g. current network time TNOWIf the acquisition is successful, executing a first sleep awakening step; such as the current network time TNOWAnd if the acquisition fails, executing a second sleep awakening step.
4. A wake-up method of an embedded device according to claim 3, wherein the first sleep wake-up step includes:
s20511 acquires the current network time TNOWConverting to UTC timestamp;
s20512 judges the current network time TNOWWhether the time information T that the embedded device must wake up has been exceededWAKEIf yes, executing the network time compensation operation, and then executing step S20513; if not, directly executing step S2053; said network time compensation operation being according to an algorithm TWAKE=TNOW+(TNOW-TWAKE) % (24 x 3600) compute operation execution;
s20513 sets Δ T to (T) according to the algorithmWAKE-TNOW)%TheartbeatPerforming operation processing;
s20514 determines the time information T that the embedded device must wake upWAKEWith the current network time TNOWTime difference and wakeup interval parameter information TheartbeatComparing, and obtaining the time information T when the embedded device has to be awakenedWAKEWith the current network time TNOWIs greater than the wake-up interval parameter information TheartbeatThen, step S20515 is executed;
s20515 according to the Algorithm Tslp=ΔT+TheartbeatCalculating the time information T of still needing sleeping at the current timeslp;
S20516 time information T for still needing sleepslpAnd setting a sound sleep timer so as to wake up at the set time and enter a working state.
5. The wake-up method of an embedded device according to claim 4, wherein the second sleep wake-up step includes:
s20521 records the local timestamp T of the current one-time startup or embedded device awakeningBOOT;
S20522 records the local timestamp T before writing to the deep sleep timerRUN;
S20523 following Algorithm Tslp=Theartbeat-(TRUN-TBOOT)%TheartbeatCalculate the current timeTime information T of still sleepingslp;
S20524 time information T for further sleepslpAnd setting a sound sleep timer so as to wake up at the set time and enter a working state.
6. A wake-up system of an embedded device, comprising the steps of:
a module for controlling the equipment to enter the running state when the micro-processing controller of the equipment receives the wake-up instruction sent by the deep sleep timer;
the device comprises a module for completing task execution operation of the device;
means for a device to obtain network time;
means for the device to synchronize the acquired network time into the RTC;
for reading RTC current time information TRECThe module of (1);
for obtaining current time information T according to RTCRECCalculating the time information T of the next awakening equipmentWAKThe module of (1);
the module is used for storing the time information of the next awakening equipment in the deep sleep timer, and setting the deep sleep timer to send an awakening instruction to the microprocessing controller when the timer counts the time of the next awakening equipment;
a module for a device to enter deep sleep.
7. A wake-up system of an embedded device according to claim 6, characterized in that said means for determining from RTC current time information TRECCalculating the time information T of the next awakening equipmentWAKThe module of (a), comprising:
a submodule for setting a sleep period Δ T;
for passing through TWAK=TREC+ delta T algorithm calculation to obtain time information T of next awakening deviceWAKThe submodule of (1).
8. A wake-up system of an embedded device, comprising the steps of:
recording the time of first startup or awakening for the embedded equipment, wherein the time represents the running initial time T of the embedded equipment systemOThe module of (1);
the module is used for processing core tasks of the embedded equipment in a running state;
read wake-up interval parameter information T for embedded deviceheartbeatAnd the time information T that the embedded device must wake upWAKEThe module of (1);
for performing the acquisition of the current network time TNOWAnd judging the current network time TNOWObtaining whether the module is successful;
a first sleep wake-up module;
and the second sleep awakening module.
9. The wake-up system of an embedded device of claim 8, wherein the first sleep wake-up module comprises:
for obtaining the current network time TNOWA sub-module for converting to a UTC timestamp;
for judging the current network time TNOWWhether the time information T that the embedded device must wake up has been exceededWAKEThe sub-modules of (1);
for following the algorithm Δ T ═ (T)WAKE-TNOW)%TheartbeatA submodule for performing operation processing and network time compensation operation;
time information T for when an embedded device has to wake upWAKEWith the current network time TNOWTime difference and wakeup interval parameter information TheartbeatA submodule for performing comparison;
for following algorithm Tslp=ΔT+TheartbeatCalculating the time information T of still needing sleeping at the current timeslpSub-module of;
Time information T for going to sleepslpAnd setting a deep sleep timer so as to wake up at the set time and enter the submodule in the working state.
10. The wake-up system of an embedded device according to claim 9, wherein the second sleep wake-up module comprises:
local timestamp T for recording current one-time starting or awakening embedded deviceBOOTThe sub-modules of (1);
for recording the local time stamp T before writing into the deep-sleep timerRUNThe sub-modules of (1);
for following algorithm Tslp=Theartbeat-(TRUN-TBOOT)%TheartbeatCalculating the time information T of still needing sleeping at the current timeslpThe sub-modules of (1);
time information T for going to sleepslpAnd setting a deep sleep timer so as to wake up at the set time and enter the submodule in the working state.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110179326.5A CN112905250A (en) | 2021-02-09 | 2021-02-09 | Awakening method and system of embedded equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110179326.5A CN112905250A (en) | 2021-02-09 | 2021-02-09 | Awakening method and system of embedded equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112905250A true CN112905250A (en) | 2021-06-04 |
Family
ID=76123162
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110179326.5A Pending CN112905250A (en) | 2021-02-09 | 2021-02-09 | Awakening method and system of embedded equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112905250A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080109669A1 (en) * | 2006-06-16 | 2008-05-08 | Samsung Electronics Co., Ltd. | Apparatus and method for controlling slotted mode of several systems using one sleep controller in a hybrid terminal of a mobile communication system |
CN101425917A (en) * | 2007-10-29 | 2009-05-06 | 吉林市曼博科技有限公司 | Sleep scheduling method for wireless sensor network |
CN104917581A (en) * | 2015-06-29 | 2015-09-16 | 小米科技有限责任公司 | System time correction method and device, terminal and router |
CN106304317A (en) * | 2015-06-24 | 2017-01-04 | 联芯科技有限公司 | The compensation method of sleep awakening timing offset and electronic equipment |
-
2021
- 2021-02-09 CN CN202110179326.5A patent/CN112905250A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080109669A1 (en) * | 2006-06-16 | 2008-05-08 | Samsung Electronics Co., Ltd. | Apparatus and method for controlling slotted mode of several systems using one sleep controller in a hybrid terminal of a mobile communication system |
CN101425917A (en) * | 2007-10-29 | 2009-05-06 | 吉林市曼博科技有限公司 | Sleep scheduling method for wireless sensor network |
CN106304317A (en) * | 2015-06-24 | 2017-01-04 | 联芯科技有限公司 | The compensation method of sleep awakening timing offset and electronic equipment |
CN104917581A (en) * | 2015-06-29 | 2015-09-16 | 小米科技有限责任公司 | System time correction method and device, terminal and router |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI656439B (en) | Application program wake-up method and device | |
CN112530056B (en) | Method for reducing power consumption of intelligent door lock, intelligent door lock and storage medium | |
CN102117114B (en) | Electricity-saving method for embedded equipment | |
US8954980B2 (en) | Conserving power through work load estimation for a portable computing device using scheduled resource set transitions | |
CN104615097B (en) | A kind of method and apparatus of remote control mobile terminal | |
WO2014114194A1 (en) | Method, device, and terminal for adjusting heartbeat cycle for application | |
TW201020786A (en) | Method for executing scheduled task | |
US11216023B2 (en) | Clock tick interrupt configuration method and apparatus | |
US8713348B2 (en) | Apparatus for performing timer management regarding a system timer scheduler service, and associated method | |
US8949638B2 (en) | Embedded controller with an internal timer | |
CN102289279A (en) | Equipment management method and device based on RTC (Real-Time Clock) clock interrupt | |
CN104536739A (en) | Method for arousing terminal system | |
WO2014180329A1 (en) | Intelligent terminal wakeup frequency adjustment method and device | |
CN112351475A (en) | Data acquisition method and device based on LORA low-power-consumption wireless communication technology | |
WO2017063468A1 (en) | Power consumption control method, device and computer storage medium | |
US8028187B2 (en) | Dual-mode communication apparatus and power management method thereof | |
CN112905250A (en) | Awakening method and system of embedded equipment | |
CN103150191A (en) | Terminal equipment | |
CN101414212A (en) | Method for performing booking work | |
CN104052861A (en) | Terminal and wake-up method thereof | |
CN106125890B (en) | A kind of the night dormancy method and its system of embedded device | |
CN111857841A (en) | Awakening method of main control chip, storage medium and intelligent terminal | |
CN115985066B (en) | Method, device, system and storage medium for automatically waking up user | |
CN117190457A (en) | Standby control method, system, device and medium based on multi-split system | |
CN116828586B (en) | Synchronization method and device for terminal in standby state |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210604 |