WO2017071545A1 - 对齐唤醒的方法、终端和计算机存储介质 - Google Patents

对齐唤醒的方法、终端和计算机存储介质 Download PDF

Info

Publication number
WO2017071545A1
WO2017071545A1 PCT/CN2016/103118 CN2016103118W WO2017071545A1 WO 2017071545 A1 WO2017071545 A1 WO 2017071545A1 CN 2016103118 W CN2016103118 W CN 2016103118W WO 2017071545 A1 WO2017071545 A1 WO 2017071545A1
Authority
WO
WIPO (PCT)
Prior art keywords
timer
container
application
trigger time
wake
Prior art date
Application number
PCT/CN2016/103118
Other languages
English (en)
French (fr)
Inventor
雍小文
Original Assignee
深圳市中兴微电子技术有限公司
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 深圳市中兴微电子技术有限公司 filed Critical 深圳市中兴微电子技术有限公司
Publication of WO2017071545A1 publication Critical patent/WO2017071545A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0287Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level changing the clock frequency of a controller in the equipment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present invention relates to the field of power consumption control of mobile terminals, and in particular, to a method, terminal, and computer storage medium for aligning wakeup.
  • the server When the server sends data to the application, it needs to know the IP address of the application. Since the IP assigned by the network operator to the mobile terminal is the IP of the intranet of the operator, the mobile terminal needs to operate through data communication with the server.
  • the gateway of the Provider performs Network Address Translation (NAT). When the gateway of most network operators does not have data communication for a period of time on the link, the corresponding link in the NAT list is eliminated, causing the link to be interrupted. Therefore, the application of the mobile terminal needs to periodically send a heartbeat packet to the server, refresh the NAT list, and ensure that the connection is online, that is, maintain a heartbeat mechanism.
  • NAT Network Address Translation
  • heartbeat packets of different applications can be sent separately, and there is no unified heartbeat pushing mechanism, so different timing periods may cause the mobile terminal to be frequently woken up to send the heartbeat packet, so that Mobile terminals consume a lot of power.
  • embodiments of the present invention are expected to provide a method, terminal, and calculation for aligning wakeup
  • the storage medium of the machine is used to implement a unified triggering time, so that a plurality of timers with different timing intervals and triggering times are awakened together, thereby effectively reducing the number of wake-ups of the terminal and reducing power consumption.
  • the embodiment of the invention provides a method for aligning wakeup, the method comprising:
  • the embodiment of the invention further provides a terminal for waking up, the terminal comprising:
  • An application determining module configured to determine at least one application with a timer that needs to be aligned to wake up
  • Creating a module configured to create at least one timer container and data structure information of the at least one timer container
  • a trigger time determining module configured to determine a trigger time of the at least one timer container
  • a modification module configured to modify a trigger time of the timer of the at least one application that needs to be aligned to wake up to a trigger time of the corresponding timer container.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to perform the foregoing method for aligning wakeup.
  • the method for aligning wakeup provided by the embodiment of the present invention, and the terminal and the computer storage medium, the terminal aligning and waking up the terminal first determines the application with the timer that needs to be aligned and awake by applying the protection white list; and then creating at least one timer container and the Data structure information of at least one timer container; secondly, storing a timer of at least one application that needs to be aligned to wake up into a corresponding timer container; and then using a timer of a maximum application timer in the timer container as a timer
  • the trigger time of the container is modified; the trigger time of the timer of at least one application is modified to the trigger time of the corresponding timer container; the trigger time is unified by aligning the trigger times of all the timers in the timer container, By waking up a plurality of timers with different timing intervals and triggering times, the number of wake-ups of the terminal is effectively reduced, and the power consumption is reduced.
  • the user can perform alignment wake-up management
  • FIG. 1 is a schematic flowchart of a method for aligning wakeup according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a method for aligning wakeup according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a terminal for aligning wakeup according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of Embodiment 1 of a method for aligning wake-up according to the present invention. As shown in FIG. 1, the method may include the following steps:
  • Step 101 Determine at least one application with a timer that needs to be aligned to wake up;
  • the aligning wake-up is a plurality of timers simultaneously waking up the terminal, for example, the plurality of timers send the wake-up instruction to the terminal at the same time, so that the first state in the first power consumption enters the second power consumption.
  • Second state The first power consumption here is lower than the second power consumption, and the first state may include a sleep state or a non-operation state.
  • the second state can include an operational state.
  • the terminal that wakes up is searched for all the applications in the terminal to obtain at least one application with a timer; then, according to the application protection white list set by the user, it is determined whether the at least one application with the timer needs to be aligned to wake up. If the at least one application with a timer is in the application protection white list, determining that the corresponding at least one application with a timer does not need to align wakeup; if the at least one application with a timer is not in the In the application protection whitelist, it is determined that the corresponding at least one application with a timer needs to be aligned to wake up.
  • the wake-up terminal of the embodiment of the present invention may include, for example, a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a personal digital assistant (PDA), a tablet computer (PAD), a portable multimedia player (PMP), a navigation device, etc.
  • PDA personal digital assistant
  • PAD tablet computer
  • PMP portable multimedia player
  • Mobile terminals etc.
  • the operating system can be UNIX, Linux, Windows, Mac OS X, Android, Windows Phone, and the like.
  • Application software is a third-party application of intelligent terminal. Users can work, entertain, and obtain information through various application software.
  • the format includes ipa, pxl, deb, apk, etc. format.
  • the application protection whitelist searches for the application with the timer as A, B, C, D, and E according to the interface information provided by the AlarmManager, and the terminals that wake up are A, B, C, D, and E.
  • the user wants to align the three applications A, C, and E, and does not align the two applications B and D, then it can be set on the application protection white list, and A,
  • the three applications C and E are determined to require alignment wake-up and generate a profile that wakes up.
  • the awake terminal in the embodiment of the present invention searches for which applications in the application use timers, and records the applications that use the timers through the application protection whitelist list manner; the users can select which applications in the application whitelist according to the application protection
  • the application needs to be added to the awake wakeup management, and which applications do not need to be added to the awake wakeup management, so that the user can perform the alignment wakeup management for the accurately timed application according to the needs of the user, and perform the alignment wakeup management for the application with low real-time requirements, which is convenient for the user. Use, solve the problem that may lead to inaccurate trigger time.
  • Step 102 Create data structure information of at least one timer container and the at least one timer container.
  • the awake terminal After the awake terminal obtains the application that needs to be added to the awake wakeup management, at least one timer container and the data structure information of the timer container are created by the user-written command; the timer container is used to store one or more The application timer, the data structure information of the timer container includes at least one of a trigger time of the timer container, a timing interval, a maximum number of timers, and the like, wherein the trigger time may be according to a user command. , set before the wake-up of the alignment, or dynamically according to the trigger time of a timer in the timer container.
  • the trigger time is 8:50 or default, which is determined by the trigger time of a certain timer.
  • the timing interval is 10 minutes, the number of timers can be accommodated, and so on.
  • the figures are only exemplified, and the specific ones can be set according to actual needs, and are not limited herein.
  • the user can add the timer container and the data structure information of the timer container in the timer frame AlarmManagerService by using an instruction.
  • Step 103 Store the timer of the at least one application that needs to be aligned to wake up according to a preset condition, and store the timer into the corresponding timer container.
  • Determining whether the timing interval of the timer is less than or equal to the timing interval of the timer container If the timing interval of the timer is less than or equal to the timing interval of the timer container, the corresponding timer is stored in the same timing. If the timing interval of the timer is greater than the timing interval of the timer container, the corresponding timer is stored in a new timer container.
  • the terminal that aligns and wakes up stores the three applications A, C, and E that need to be awake, and stores them in the corresponding timer container.
  • the timing interval for obtaining A is 5 minutes
  • the timing interval for C is 10 minutes.
  • the timing interval of E is 15 minutes.
  • the timing intervals of A, C, and E are compared with the timing interval of the timer container, and the timing interval between A and C can be obtained for 5 minutes. 10 minutes is less than or equal to the timer interval of the timer container for 10 minutes. If the timing interval of E is greater than 10 minutes of the container interval, then A and C are stored in the same timer container.
  • the timer interval of the timer container is For 10 minutes, E is stored in a new timer container with a timing interval of 15 minutes.
  • the user can modify the setting interface by calling the setting interface in the AlarmManagerService, and read the configuration file of the aligned wake-up at the beginning, and the three applications A, C, and E in the configuration file of the wake-up alignment will be used. Perform the above processing operations.
  • Step 104 Determine a trigger time of the at least one timer container.
  • the terminal that aligns the wakeup uses the maximum trigger time of the timer in the timer container as the trigger time of the timer container.
  • the maximum trigger time here can be the latest trigger time.
  • the triggering time may be a wake-up time of all timers in the timer container to wake up the terminal.
  • the trigger time of the timer of C is 9:15
  • the trigger time of the timer of A is 9:10. Since the trigger time of the timer of C is larger than the trigger time of the timer of A (that is, later), Therefore, the terminal that aligns the wake-up will change the trigger time of the timer container stored in A and C to the timer of C.
  • the trigger time of the timer is 9:15; the trigger time of the E timer is 9:20, so the terminal that aligns the wakeup changes the trigger time of the timer container stored in E to the trigger time of the timer of E, that is, 9: 20.
  • Step 105 Modify a trigger time of the timer of the at least one application that needs to be aligned to wake up to a trigger time of the corresponding timer container.
  • the terminal that aligns the wake-up changes the trigger time of all the timers in a timer container to the trigger time of the timer container, that is, the trigger time of all the timers in the timer container is aligned, and the trigger time is unified. To wake up a plurality of timers with different timing intervals and trigger times, effectively reducing the number of wake-ups of the terminal and reducing power consumption.
  • a timer includes two timers, and the wake-up times of the two wake-up terminals of the two timers are different.
  • the timers respectively perform a time-awake operation, and obviously the terminal is woken up twice, and the implementation is utilized.
  • the timer is set to unify the wake-up time of the two timers.
  • the two timers will wake up the terminal at the same time, so that the terminal is only woken up once, so that the terminal performs the state switching operation. As time is reduced, the state in which the power consumption is low is prolonged, so that the power consumption of the terminal can be reduced.
  • next trigger time the current trigger time + timing interval; the timer container before clearing, according to each timing
  • the next trigger time of the device is processed again according to the process of step 103.
  • the terminal that aligns the wake-up changes the trigger time of the timer of A to 9:15 in the timer container, and the trigger time of the timer of C to 9:15, and the timer of A and C is only 9:
  • Step 103 Process processing.
  • the timing policy of the timer in the framework can be modified, and a certain range of timers can be uniformly triggered, thereby effectively reducing the number of times the terminal is woken up and reducing power consumption.
  • the terminal that aligns the wakeup first determines the application with the timer that needs to be aligned and wakeup by applying the protection whitelist; and then creates the data structure of the at least one timer container and the at least one timer container.
  • the timer of at least one application that needs to be aligned to wake up is stored in the corresponding timer container; then, according to the trigger time of the timer of the largest application in the timer container, the trigger time of the timer container;
  • the trigger time of an application timer is modified to the trigger time of the corresponding timer container; by aligning the trigger times of all timers in the timer container, the trigger time is unified, and multiple different timing intervals are The timers that trigger the time wake up together, which effectively reduces the number of wakeups of the terminal and reduces the power consumption.
  • the application according to the application protection whitelist can select which applications need to be added to the aligned wakeup management, and which applications do not need to be aligned. Wake up management so that users can The body needs for precise timing applications are not aligned wake management, real-time applications less demanding aligned wake-up management, convenient for users to use to solve the problem there is the potential to trigger the time allowed.
  • Embodiment 2 is a flowchart of Embodiment 2 of a method for aligning wake-up according to the present invention. As shown in FIG. 2, the method may include the following steps:
  • Step 201 Determine at least one application with a timer that needs to be aligned to wake up.
  • the terminal that wakes up is searched for all the applications in the terminal to obtain at least one application with a timer; then, according to the application protection white list set by the user, it is determined whether the at least one application with the timer needs to be aligned to wake up. If the at least one application with a timer is in the application protection white list, determining that the corresponding at least one application with a timer does not need to align wakeup; if the at least one application with a timer is not in the Narrative In the protection white list, it is determined that the corresponding at least one application with a timer needs to be aligned to wake up.
  • the wake-up terminal of the embodiment of the present invention may include, for example, a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a personal digital assistant (PDA), a tablet computer (PAD), a portable multimedia player (PMP), a navigation device, etc.
  • PDA personal digital assistant
  • PAD tablet computer
  • PMP portable multimedia player
  • Mobile terminals etc.
  • the operating system can be UNIX, Linux, Windows, Mac OS X, Android, Windows Phone, and the like.
  • Application software is a third-party application of intelligent terminal. Users can work, entertain, and obtain information through various application software.
  • the format includes ipa, pxl, deb, apk, etc. format.
  • the application protection whitelist searches for the application with the timer as F, G, H, I, and J according to the interface information provided by the AlarmManager, and the terminals that wake up are F, G, H, I, and J.
  • the user wants to align the three applications F, H, and J, and does not align the G and I applications. Then, you can set it on the application protection whitelist.
  • the three applications H and J are determined to require alignment wake-up and generate a profile that wakes up.
  • the awake terminal in the embodiment of the present invention searches for which applications in the application use timers, and records the applications that use the timers through the application protection whitelist list manner; the users can select which applications in the application whitelist according to the application protection
  • the application needs to be added to the awake wakeup management, and which applications do not need to be added to the awake wakeup management, so that the user can perform the alignment wakeup management for the accurately timed application according to the needs of the user, and perform the alignment wakeup management for the application with low real-time requirements, which is convenient for the user. Use, solve the problem that may lead to inaccurate trigger time.
  • Step 202 Create data structure information of at least one timer container and the at least one timer container.
  • the written command creates at least one timer container and data structure information of the timer container; the timer container is configured to store one or more timers of respective applications, and the data structure information of the timer container includes the timing The trigger time of the container, the timing interval, the maximum number of timers that can be accommodated, etc., wherein the trigger time can be set in advance according to the user's command before the alignment wake-up, or according to the timer container
  • the trigger time of a timer is dynamically adjusted.
  • the trigger time is 8:50 or default, which is determined by the trigger time of a certain timer.
  • the timing interval is 10 minutes, the number of timers can be accommodated, and so on.
  • the figures are only exemplified, and the specific ones can be set according to actual needs, and are not limited herein.
  • the user can add the timer container and the data structure information of the timer container in the timer frame AlarmManagerService by using an instruction.
  • Step 203 The timer of the at least one application that needs to be aligned to wake up is stored in the corresponding timer container according to a preset trigger time difference.
  • the timer of the application is added to the current timer container
  • determining a target timer in the timers of the multiple applications determining a difference between a trigger time of the target timer and a trigger time of the other timers, respectively If the difference is less than or equal to the preset trigger time difference, the target timer and the corresponding timer are stored in the same timer container; if the difference is greater than the preset trigger time difference, The target timer is stored in a new timer container.
  • the terminal that wakes up and aligns will need to align the three applications F, H, and J that are awake.
  • the trigger time for obtaining F is 9:00
  • the trigger time for H is 9:10
  • the trigger time for H is 9:20
  • the preset trigger time difference is 10 minutes.
  • the timers of F, H, and J it is determined that the timer of F is the target timer, and the triggering time of the timer of F is 9:00 and the triggering time of the timers of H and J are 9:10, 9:20 respectively.
  • the difference is obtained by the difference between the trigger time of the H timer and the trigger time of the H timer is 10 minutes; the difference between the F and H is less than or equal to the preset trigger time difference of 10 Minutes, so the timers of F and H are stored in the same timer container; since the difference between F and J is greater than the preset trigger time difference of 10 minutes, the timer of J is stored in the new timer container.
  • the user can modify the setting interface by calling the setting interface in the AlarmManagerService, and read the configuration file of the aligned wake-up at the beginning, and the three applications A, C, and E in the configuration file of the wake-up alignment will be used. Perform the above processing operations.
  • Step 204 Determine a trigger time of the at least one timer container.
  • the terminal that aligns the wakeup uses the maximum trigger time of the timer in the timer container as the trigger time of the timer container.
  • the trigger time of the H timer is 9:10, and the trigger time of the F timer is 9:00. Since the trigger time of the H timer is larger than the trigger time of the F timer, the wake-up terminal is aligned.
  • the trigger time of the timer container stored in F and H is changed to the trigger time of the timer of H, that is, 9:10; the trigger time of the timer of J is 9:20, so the terminal that aligns the wakeup will be stored in J.
  • the trigger time of the timer container is changed to the trigger time of the timer of E, that is, 9:20.
  • Step 205 Modify a trigger time of the timer of the at least one application that needs to be aligned to wake up to a trigger time of the corresponding timer container.
  • the terminal that aligns the wake-up changes the trigger time of all the timers in a timer container to the trigger time of the timer container, that is, the trigger time of all the timers in the timer container is aligned, and the trigger time is unified. To wake up a plurality of timers with different timing intervals and trigger times, effectively reducing the number of wake-ups of the terminal and reducing power consumption.
  • next trigger time the current trigger time + timing interval; the timer container before clearing, according to each timing
  • the next trigger time of the device is processed again according to the process of step 103.
  • the terminal that wakes up is modified to change the trigger time of the timer of F to 9:10 in the timer container, and the trigger time of the timer of H to 9:10, and the timing interval of F is 0:05, H.
  • the timing interval is 0:10.
  • the timers of H and F are only uniformly awake at 9:10. After waking up, the next trigger time of the F timer is calculated, that is, the next trigger time of the F timer.
  • the timer container is processed according to the process of step 203 according to the next trigger time of the timers of F and H.
  • the timing policy of the timer in the framework can be modified, and a certain range of timers can be uniformly triggered, thereby effectively reducing the number of times the terminal is woken up and reducing power consumption.
  • the terminal that aligns the wakeup first determines the application with the timer that needs to be aligned and wakeup by applying the protection whitelist; and then creates the data structure of the at least one timer container and the at least one timer container.
  • the timer of at least one application that needs to be aligned to wake up is stored in the corresponding timer container; then, according to the trigger time of the timer of the largest application in the timer container, the trigger time of the timer container;
  • the trigger time of an application timer is modified to the trigger time of the corresponding timer container; by aligning the trigger times of all timers in the timer container, the trigger time is unified, and multiple different timing intervals are The timers that trigger the time wake up together, which effectively reduces the number of wakeups of the terminal and reduces the power consumption.
  • the application according to the application protection whitelist can select which applications need to be added to the aligned wakeup management, and which applications do not need to be aligned. Wake up management so that users can Body demand for precise timing of application is not aligned Wake-up management, which performs alignment wake-up management for applications with low real-time requirements, which is convenient for users to use and solves the problem that the trigger time may not be accurate.
  • FIG. 3 is a schematic structural diagram of an embodiment of the terminal for aligning wake-up according to the present invention.
  • the terminal awake terminal 03 may include an application determining module 61, a creating module 62, a depositing module 63, and a triggering time determining module 64.
  • Modifying module 65 wherein
  • the application determining module 61 is configured to determine at least one application with a timer that needs to be aligned to wake up;
  • the creating module 62 is configured to create data structure information of at least one timer container and the at least one timer container;
  • the depositing module 63 is configured to store the timer of the at least one application that needs to be aligned to wake up into the corresponding timer container;
  • the trigger time determining module 64 is configured to determine a trigger time of the at least one timer container
  • the modification module 65 is configured to modify a trigger time of the timer of the at least one application that needs to be aligned to wake up to a trigger time of the corresponding timer container.
  • the data structure information of the timer container includes at least one of: a trigger time, a timing interval, and a maximum number of timers that can be accommodated.
  • the application determining module 61 is configured to search all applications to obtain at least one application with a timer
  • the depositing module 63 is configured to: at least one of the need to align the wakeup The used timer is stored in the corresponding timer container according to a preset condition;
  • timing interval of the timer is greater than the timing interval of the timer container, the corresponding timer is stored in a new timer container;
  • a timer configured to store the at least one application that needs to be aligned to wake up according to a preset trigger time difference value into the corresponding timer container;
  • the corresponding timer container including:
  • the timer of the application is added to the current timer container
  • determining a target timer in the timers of the multiple applications determining a difference between a trigger time of the target timer and a trigger time of the other timers, respectively If the difference is less than or equal to the preset trigger time difference, the target timer and the corresponding timer are stored in the same timer container;
  • the target timer is stored in a new timer container.
  • the trigger time determining module 64 is configured to use a maximum trigger time of the timer in the timer container as a trigger time of the timer container.
  • the terminal in this embodiment may be used to implement the technical solution of the foregoing method embodiment, and the implementation principle and the technical effect are similar, and details are not described herein again.
  • the application determining module 61, the creating module 62, the depositing module 63, the triggering time determining module 64, and the modifying module 65 may be implemented by a central processing unit (CPU), a microprocessor (MPU), and a number located on the terminal.
  • CPU central processing unit
  • MPU microprocessor
  • Device implementations such as signal processors (DSPs) or field programmable gate arrays (FPGAs).
  • An embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used in one or more of the foregoing methods for aligning wakeup, for example, can be used to execute FIG. 1 Or the method shown in Figure 2.
  • the computer storage medium can include random storage medium (RAM), read only storage medium (ROM), or flash memory, optionally a non-transitory storage medium.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. Instructions are provided for implementation The steps of a function specified in a block or blocks of a flow or a flow and/or a block diagram of a flow chart.
  • the trigger time of one of the timers is set to the trigger time of the timer container, where the trigger time can be understood as timing.
  • the time for waking up the terminal is equivalent to causing multiple timers to wake up the terminal at the same time.
  • waking up the terminal separately with respect to multiple timers can reduce the number of times the terminal is woken up, so that the terminal is in low power consumption.
  • the longer state time saves power consumption, and on the other hand, reduces the power consumption consumed by the wake-up process of the terminal being awakened, thereby reducing the power consumption of the terminal, prolonging the standby time of the terminal, and being industrially reproducible.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

本发明实施例公开了一种对齐唤醒的方法,包括:确定需要对齐唤醒的至少一个具有定时器的应用;创建至少一个定时器容器及所述至少一个定时器容器的数据结构信息;将所述需要对齐唤醒的至少一个应用的定时器存入对应的所述定时器容器;确定所述至少一个定时器容器的触发时间;将所述需要对齐唤醒的至少一个应用的定时器的触发时间修改为对应的所述定时器容器的触发时间。本发明实施例同时还公开了一种对齐唤醒的终端和计算机存储介质。

Description

对齐唤醒的方法、终端和计算机存储介质 技术领域
本发明涉及移动终端功耗控制领域,尤其涉及一种对齐唤醒的方法、终端和计算机存储介质。
背景技术
随着移动终端的快速发展,用户对移动终端的使用越来越频繁,需要安装越来越多的应用来满足用户在不同方面的使用需求,例如,即时通讯应用、购物应用、社交应用等,这些应用都需要与各自对应的服务器进行数据通讯,保持数据同步。
服务器在发送数据给应用时,需要知道该应用的IP地址,由于网络运营商分配给移动终端的IP是运营商内网的IP,所以在移动终端要与服务器进行数据通讯时,都需要通过运营商的网关进行网络地址转换(Network Address Translation,NAT),大部分网络运营商的网关在链路上一段时间内没有数据通讯时,会淘汰NAT列表中的对应链路,造成该链路中断,所以移动终端的应用需要定期向服务器发送心跳包,刷新NAT列表,保证连接在线,即维持一个心跳机制。
由于现有技术中不同的应用自身会形成一套心跳机制,不同应用的心跳包可单独发送,没有统一的心跳推送机制,所以不同的定时周期会导致移动终端频繁被唤醒来发送心跳包,这样移动终端就会消耗大量电量。
发明内容
有鉴于此,本发明实施例期望提供一种对齐唤醒的方法、终端和计算 机存储介质,以实现统一触发时间,使多个不同的定时间隔和触发时间的定时器一起唤醒,有效的减少终端的唤醒次数,降低功耗。
本发明的技术方案是这样实现的:
本发明实施例提供一种对齐唤醒的方法,所述方法包括:
确定需要对齐唤醒的至少一个具有定时器的应用;
创建至少一个定时器容器及所述至少一个定时器容器的数据结构信息;
将所述需要对齐唤醒的至少一个应用的定时器存入对应的所述定时器容器;
确定所述至少一个定时器容器的触发时间;
将所述需要对齐唤醒的至少一个应用的定时器的触发时间修改为对应的
本发明实施例还提供一种对齐唤醒的终端,所述终端包括:
应用确定模块,配置为确定需要对齐唤醒的至少一个具有定时器的应用;
创建模块,配置为创建至少一个定时器容器及所述至少一个定时器容器的数据结构信息;
存入模块,配置为将所述需要对齐唤醒的至少一个应用的定时器存入对应的所述定时器容器;
触发时间确定模块,配置为确定所述至少一个定时器容器的触发时间;
修改模块,配置为将所述需要对齐唤醒的至少一个应用的定时器的触发时间修改为对应的所述定时器容器的触发时间。
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述对齐唤醒的方法。
本发明实施例提供的对齐唤醒的方法、及终端和计算机存储介质,对齐唤醒的终端首先通过应用保护白名单来确定出需要对齐唤醒的具有定时器的应用;接着创建至少一个定时器容器及该至少一个定时器容器的数据结构信息;其次将需要对齐唤醒的至少一个应用的定时器存入对应的定时器容器中;然后根据在定时器容器中最大的应用的定时器的触发时间作为定时器容器的触发时间;最后将至少一个应用的定时器的触发时间修改为对应的定时器容器的触发时间;通过将定时器容器中的所有定时器的触发时间进行了对齐操作,统一了触发时间,使多个不同的定时间隔和触发时间的定时器一起唤醒,有效的减少了终端的唤醒次数,降低了功耗,在具体实现时,用户可以根据自身需求对精确定时的应用不进行对齐唤醒管理,对实时性要求不高的应用进行对齐唤醒管理,方便了用户的使用,解决了有可能带来触发时间不准的问题。
附图说明
图1为本发明实施例提供的对齐唤醒的方法流程示意图;
图2为本发明实施例提供的对齐唤醒的方法流程示意图;
图3为本发明实施例提供的对齐唤醒的终端的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,应当理解,以下所说明的优选实施例仅用于说明和解释本发明,并不用于限定本发明。
图1为本发明对齐唤醒的方法实施例一的流程图,如图1所示,本方法可以包括如下步骤:
步骤101、确定需要对齐唤醒的至少一个具有定时器的应用;
在本实施例中所述对齐唤醒为多个定时器同时唤醒终端,例如,多个定时器在同一时间向终端发送唤醒指令,使处于第一功耗的第一状态进入到第二功耗的第二状态。,这里的第一功耗低于所述第二功耗,所述第一状态可包括休眠状态或非工作状态。所述第二状态可包括工作状态。
具体的,首先,对齐唤醒的终端搜索所有在终端中的应用,得到至少一个具有定时器的应用;然后,根据用户设置的应用保护白名单确定所述至少一个具有定时器的应用是否需要对齐唤醒,若所述至少一个具有定时器的应用在所述应用保护白名单中,则确定对应的所述至少一个具有定时器的应用不需要对齐唤醒;若所述至少一个具有定时器的应用不在所述应用保护白名单中,则确定对应的所述至少一个具有定时器的应用需要对齐唤醒。
本发明实施例的对齐唤醒的终端可以包括诸如移动电话、智能电话、笔记本电脑、数字广播接收器、个人数字助理(PDA)、平板电脑(PAD)、便携式多媒体播放器(PMP)、导航装置等等的移动终端。
终端如果具有操作系统,该操作系统可以为UNIX、Linux、Windows、Mac OS X、安卓(Android)、Windows Phone等等。
应用软件(Application,APP)是智能终端的第三方应用程序,用户可以通过各种各样的应用软件进行办公、娱乐、获取信息等等,其格式包括了如ipa、pxl、deb、apk等等格式。
例如,在Android操作系统下,应用保护白名单根据AlarmManager提供的接口信息搜索到具有定时器的应用为A、B、C、D、E,对齐唤醒的终端将A、B、C、D、E添加到应用保护白名单中,用户想要对A、C、E这三个应用进行对齐唤醒,对B、D这俩应用不进行对齐唤醒,那么可以在应用保护白名单上设置,将A、C、E这三个应用确定成需要对齐唤醒,生成一个对齐唤醒的配置文件。
本发明实施例中的对齐唤醒的终端搜索自身中哪些应用使用了定时器,并将这些使用定时器的应用通过应用保护白名单列表方式记录;用户根据应用保护白名单列表中的应用可以选择哪些应用需要加入对齐唤醒管理,哪些应用不需要加入对齐唤醒管理,这样用户可以根据自身需求对精确定时的应用不进行对齐唤醒管理,对实时性要求不高的应用进行对齐唤醒管理,方便了用户的使用,解决了有可能带来触发时间不准的问题。
步骤102、创建至少一个定时器容器及所述至少一个定时器容器的数据结构信息。
对齐唤醒的终端得到需要加入对齐唤醒管理的应用后,会通过用户编写好的命令创建至少一个定时器容器以及该定时器容器的数据结构信息;该定时器容器用于存入一个或多个各个应用的定时器,该定时器容器的数据结构信息包括了该定时器容器的触发时间,定时间隔,最大可容纳定时器的个数等它们其中的至少一个,其中,触发时间可以根据用户的命令,在对齐唤醒之前提前设置好,也可以根据定时器容器中的某个定时器的触发时间来动态调整。
例如,触发时间为8:50或者为缺省,由某个定时器的触发时间来决定,定时间隔为10分钟,可容纳定时器的个数为3个等等;这里需要说明的是,上述的数字仅以举例说明,具体的可以根据实际需求进行设置,在此不加以限定。
在Android操作系统下,用户可以通过指令在定时器框架AlarmManagerService中增加该定时器容器以及该定时器容器的数据结构信息。
步骤103、将所述需要对齐唤醒的至少一个应用的定时器根据预设条件存入对应的所述定时器容器。
对齐唤醒的终端将所述需要对齐唤醒的至少一个应用的定时器根据预 设条件存入对应的所述定时器容器;其中,所述按照预设条件存入对应的所述定时器容器的具体步骤包括:
判断所述定时器的定时间隔是否小于等于所述定时器容器的定时间隔,若所述定时器的定时间隔小于等于所述定时器容器的定时间隔,则将对应的定时器存入同一个定时器容器;若所述定时器的定时间隔大于所述定时器容器的定时间隔,则将对应的定时器存入新的定时器容器。
例如,对齐唤醒的终端将需要对齐唤醒的A、C、E这三个应用存入对应的定时器容器中,具体的,在获得A的定时间隔为5分钟,C的定时间隔为10分钟,E的定时间隔为15分钟,定时器容器的定时间隔为10分钟后,将A、C、E各自的定时间隔与定时器容器的定时间隔进行对比判断,可以得到A、C的定时间隔5分钟、10分钟小于等于定时器容器的定时间隔10分钟,E的定时间隔15分钟大于容器的定时间隔10分钟,则将A、C存入同一个定时器容器中,该定时器容器的定时间隔为10分钟,将E存入新的定时器容器中,该定时器容器的定时间隔为15分钟。
在Android操作系统下,用户可以通过指令调用AlarmManagerService中的设置接口,修改该设置接口,在开始时读取对齐唤醒的配置文件,将对齐唤醒的配置文件中的A、C、E这三个应用进行上述处理操作。
步骤104、确定所述至少一个定时器容器的触发时间。
对齐唤醒的终端将在所述定时器容器中的所述定时器的最大触发时间作为所述定时器容器的触发时间。这里的最大触发时间可为最迟触发时间。在本实施例中所述触发时间可为所述定时器容器内所有定时器唤醒终端的唤醒时间。
例如,C的定时器的触发时间为9:15,A的定时器的触发时间为9:10,由于C的定时器的触发时间比A的定时器的触发时间要大(即要迟),所以对齐唤醒的终端将存入A、C的定时器容器的触发时间修改为C的定时器 的触发时间,即9:15;E的定时器的触发时间为9:20,所以对齐唤醒的终端将存入E的定时器容器的触发时间修改为E的定时器的触发时间,即9:20。
步骤105、将所述需要对齐唤醒的至少一个应用的定时器的触发时间修改为对应的所述定时器容器的触发时间。
对齐唤醒的终端将在一个定时器容器中的所有定时器的触发时间修改为该定时器容器的触发时间,即将该定时器容器中的所有定时器的触发时间进行了对齐操作,统一了触发时间,使多个不同的定时间隔和触发时间的定时器一起唤醒,有效的减少了终端的唤醒次数,降低了功耗。
例如,一个定时器包括两个定时器,这两个定时器的原本唤醒终端的唤醒时间是不同的,这样的话,定时器各自执行定时唤醒操作,显然终端会被唤醒两次,而利用本实施例中则会通过定时器设置,统一这两个定时器的唤醒时间,这样的话,这两个定时器会同时唤醒终端,这样就终端就仅被唤醒了一次,这样终端执行状态切换的操作次数就减少,处于低功耗的状态时间就延长了,故能够减少终端的功耗。
另外,在一起唤醒后,计算该定时器容器中的每个定时器的下一次触发时间,即下一次触发时间=本次的触发时间+定时间隔;清空之前的定时器容器,根据每个定时器的下一次触发时间重新根据步骤103的过程进行处理。
例如,对齐唤醒的终端在定时器容器中将A的定时器的触发时间修改为9:15,将C的定时器的触发时间也修改为9:15,A、C的定时器只在9:15时刻进行统一的唤醒,在唤醒后,计算A的定时器的下一次触发时间,即A的定时器的下一次触发时间=9:15+0:05=9:20;计算C的定时器的下一次触发时间,即C的定时器的下一次触发时间=9:15+0:10=9:25;清空之前的定时器容器,根据A、C的定时器的下一次触发时间重新根据步骤103的过 程进行处理。
在Android操作系统下,可以将框架中定时器的定时策略进行修改,把一定范围的定时器统一进行触发,从而有效的减少终端被唤醒的次数,降低功耗。
本发明实施例的对齐唤醒的方法,对齐唤醒的终端首先通过应用保护白名单来确定出需要对齐唤醒的具有定时器的应用;接着创建至少一个定时器容器及该至少一个定时器容器的数据结构信息;其次将需要对齐唤醒的至少一个应用的定时器存入对应的定时器容器中;然后根据在定时器容器中最大的应用的定时器的触发时间作为定时器容器的触发时间;最后将至少一个应用的定时器的触发时间修改为对应的定时器容器的触发时间;通过将定时器容器中的所有定时器的触发时间进行了对齐操作,统一了触发时间,使多个不同的定时间隔和触发时间的定时器一起唤醒,有效的减少了终端的唤醒次数,降低了功耗;另外,用户根据应用保护白名单列表中的应用可以选择哪些应用需要加入对齐唤醒管理,哪些应用不需要加入对齐唤醒管理,这样用户可以根据自身需求对精确定时的应用不进行对齐唤醒管理,对实时性要求不高的应用进行对齐唤醒管理,方便了用户的使用,解决了有可能带来触发时间不准的问题。
图2为本发明对齐唤醒的方法实施例二的流程图,如图2所示,本方法可以包括如下步骤:
步骤201、确定需要对齐唤醒的至少一个具有定时器的应用。
具体的,首先,对齐唤醒的终端搜索所有在终端中的应用,得到至少一个具有定时器的应用;然后,根据用户设置的应用保护白名单确定所述至少一个具有定时器的应用是否需要对齐唤醒,若所述至少一个具有定时器的应用在所述应用保护白名单中,则确定对应的所述至少一个具有定时器的应用不需要对齐唤醒;若所述至少一个具有定时器的应用不在所述应 用保护白名单中,则确定对应的所述至少一个具有定时器的应用需要对齐唤醒。
本发明实施例的对齐唤醒的终端可以包括诸如移动电话、智能电话、笔记本电脑、数字广播接收器、个人数字助理(PDA)、平板电脑(PAD)、便携式多媒体播放器(PMP)、导航装置等等的移动终端。
终端如果具有操作系统,该操作系统可以为UNIX、Linux、Windows、Mac OS X、安卓(Android)、Windows Phone等等。
应用软件(Application,APP)是智能终端的第三方应用程序,用户可以通过各种各样的应用软件进行办公、娱乐、获取信息等等,其格式包括了如ipa、pxl、deb、apk等等格式。
例如,在Android操作系统下,应用保护白名单根据AlarmManager提供的接口信息搜索到具有定时器的应用为F、G、H、I、J,对齐唤醒的终端将F、G、H、I、J添加到应用保护白名单中,用户想要对F、H、J这三个应用进行对齐唤醒,对G、I这俩应用不进行对齐唤醒,那么可以在应用保护白名单上设置,将F、H、J这三个应用确定成需要对齐唤醒,生成一个对齐唤醒的配置文件。
本发明实施例中的对齐唤醒的终端搜索自身中哪些应用使用了定时器,并将这些使用定时器的应用通过应用保护白名单列表方式记录;用户根据应用保护白名单列表中的应用可以选择哪些应用需要加入对齐唤醒管理,哪些应用不需要加入对齐唤醒管理,这样用户可以根据自身需求对精确定时的应用不进行对齐唤醒管理,对实时性要求不高的应用进行对齐唤醒管理,方便了用户的使用,解决了有可能带来触发时间不准的问题。
步骤202、创建至少一个定时器容器及所述至少一个定时器容器的数据结构信息。
对齐唤醒的终端得到需要加入对齐唤醒管理的应用后,会通过用户编 写好的命令创建至少一个定时器容器以及该定时器容器的数据结构信息;该定时器容器用于存入一个或多个各个应用的定时器,该定时器容器的数据结构信息包括了该定时器容器的触发时间,定时间隔,最大可容纳定时器的个数等它们其中的至少一个,其中,触发时间可以根据用户的命令,在对齐唤醒之前提前设置好,也可以根据定时器容器中的某个定时器的触发时间来动态调整。
例如,触发时间为8:50或者为缺省,由某个定时器的触发时间来决定,定时间隔为10分钟,可容纳定时器的个数为3个等等;这里需要说明的是,上述的数字仅以举例说明,具体的可以根据实际需求进行设置,在此不加以限定。
在Android操作系统下,用户可以通过指令在定时器框架AlarmManagerService中增加该定时器容器以及该定时器容器的数据结构信息。
步骤203、将所述需要对齐唤醒的至少一个应用的定时器根据预设触发时间差值存入对应的所述定时器容器。
对齐唤醒的终端将所述需要对齐唤醒的至少一个应用的定时器根据预设触发时间差值存入对应的所述定时器容器;其中,所述根据预设触发时间差值存入对应的所述定时器容器的具体步骤包括:
当所述应用为一个时,则将所述应用的定时器加入当前定时器容器;
当所述应用为多个时,在所述多个应用的定时器中确定一个目标定时器,判断所述目标定时器的触发时间分别与其他所述定时器的触发时间的差值,若所述差值小于等于所述预设触发时间差值,则将所述目标定时器和对应的定时器存入同一个定时器容器;若所述差值大于所述预设触发时间差值,则将所述目标定时器存入新的定时器容器。
例如,对齐唤醒的终端将需要对齐唤醒的F、H、J这三个应用存入对 应的定时器容器中,具体的,在获得F的触发时间为9:00,H的触发时间为9:10,H的触发时间为9:20,预设触发时间差值为10分钟后,在F、H、J的定时器中确定F的定时器为目标定时器,判断F的定时器的触发时间9:00分别与H、J的定时器的触发时间9:10、9:20的差值,得到与H的定时器的触发时间的差值为10分钟,与J的定时器的触发时间的差值为20分钟;因为F与H的差值小于等于预设触发时间差值10分钟,所以将F和H的定时器存入同一个定时器容器;因为F与J的差值大于预设触发时间差值10分钟,所以将J的定时器存入新的定时器容器。
在Android操作系统下,用户可以通过指令调用AlarmManagerService中的设置接口,修改该设置接口,在开始时读取对齐唤醒的配置文件,将对齐唤醒的配置文件中的A、C、E这三个应用进行上述处理操作。
步骤204、确定所述至少一个定时器容器的触发时间。
对齐唤醒的终端将在所述定时器容器中的所述定时器的最大触发时间作为所述定时器容器的触发时间。
例如,H的定时器的触发时间为9:10,F的定时器的触发时间为9:00,由于H的定时器的触发时间比F的定时器的触发时间要大,所以对齐唤醒的终端将存入F、H的定时器容器的触发时间修改为H的定时器的触发时间,即9:10;J的定时器的触发时间为9:20,所以对齐唤醒的终端将存入J的定时器容器的触发时间修改为E的定时器的触发时间,即9:20。
步骤205、将所述需要对齐唤醒的至少一个应用的定时器的触发时间修改为对应的所述定时器容器的触发时间。
对齐唤醒的终端将在一个定时器容器中的所有定时器的触发时间修改为该定时器容器的触发时间,即将该定时器容器中的所有定时器的触发时间进行了对齐操作,统一了触发时间,使多个不同的定时间隔和触发时间的定时器一起唤醒,有效的减少了终端的唤醒次数,降低了功耗。
另外,在一起唤醒后,计算该定时器容器中的每个定时器的下一次触发时间,即下一次触发时间=本次的触发时间+定时间隔;清空之前的定时器容器,根据每个定时器的下一次触发时间重新根据步骤103的过程进行处理。
例如,对齐唤醒的终端在定时器容器中将F的定时器的触发时间修改为9:10,将H的定时器的触发时间也修改为9:10,F的定时间隔为0:05,H的定时间隔为0:10,H、F的定时器只在9:10时刻进行统一的唤醒,在唤醒后,计算F的定时器的下一次触发时间,即F的定时器的下一次触发时间=9:10+0:05=9:15;计算H的定时器的下一次触发时间,即H的定时器的下一次触发时间=9:10+0:10=9:20;清空之前的定时器容器,根据F、H的定时器的下一次触发时间重新根据步骤203的过程进行处理。
在Android操作系统下,可以将框架中定时器的定时策略进行修改,把一定范围的定时器统一进行触发,从而有效的减少终端被唤醒的次数,降低功耗。
本发明实施例的对齐唤醒的方法,对齐唤醒的终端首先通过应用保护白名单来确定出需要对齐唤醒的具有定时器的应用;接着创建至少一个定时器容器及该至少一个定时器容器的数据结构信息;其次将需要对齐唤醒的至少一个应用的定时器存入对应的定时器容器中;然后根据在定时器容器中最大的应用的定时器的触发时间作为定时器容器的触发时间;最后将至少一个应用的定时器的触发时间修改为对应的定时器容器的触发时间;通过将定时器容器中的所有定时器的触发时间进行了对齐操作,统一了触发时间,使多个不同的定时间隔和触发时间的定时器一起唤醒,有效的减少了终端的唤醒次数,降低了功耗;另外,用户根据应用保护白名单列表中的应用可以选择哪些应用需要加入对齐唤醒管理,哪些应用不需要加入对齐唤醒管理,这样用户可以根据自身需求对精确定时的应用不进行对齐 唤醒管理,对实时性要求不高的应用进行对齐唤醒管理,方便了用户的使用,解决了有可能带来触发时间不准的问题。
图3为本发明对齐唤醒的终端实施例的结构示意图,如图3所示,所述对齐唤醒的终端03可以包括:应用确定模块61、创建模块62、存入模块63、触发时间确定模块64、修改模块65;其中,
所述应用确定模块61,配置为确定需要对齐唤醒的至少一个具有定时器的应用;
所述创建模块62,配置为创建至少一个定时器容器及所述至少一个定时器容器的数据结构信息;
所述存入模块63,配置为将所述需要对齐唤醒的至少一个应用的定时器存入对应的所述定时器容器;
所述触发时间确定模块64,配置为确定所述至少一个定时器容器的触发时间;
所述修改模块65,配置为将所述需要对齐唤醒的至少一个应用的定时器的触发时间修改为对应的所述定时器容器的触发时间。
可选地,所述定时器容器的数据结构信息至少包括一个:触发时间,定时间隔,最大可容纳定时器的个数。
可选地,所述应用确定模块61,配置为搜索所有应用,得到至少一个具有定时器的应用;
根据用户设置的应用保护白名单确定所述至少一个具有定时器的应用是否需要对齐唤醒,若所述至少一个具有定时器的应用在所述应用保护白名单中,则确定对应的所述至少一个具有定时器的应用不需要对齐唤醒;
若所述至少一个具有定时器的应用不在所述应用保护白名单中,则确定对应的所述至少一个具有定时器的应用需要对齐唤醒。
可选地,所述存入模块63,配置为将所述需要对齐唤醒的至少一个应 用的定时器按照预设条件存入对应的所述定时器容器;
所述按照预设条件存入对应的所述定时器容器,包括:
判断所述定时器的定时间隔是否小于等于所述定时器容器的定时间隔,若所述定时器的定时间隔小于等于所述定时器容器的定时间隔,则将对应的定时器存入同一个定时器容器;
若所述定时器的定时间隔大于所述定时器容器的定时间隔,则将对应的至定时器存入新的定时器容器;
或,还配置为将所述需要对齐唤醒的至少一个应用的定时器根据预设触发时间差值存入对应的所述定时器容器;
所述根据预设触发时间差值存入对应的所述定时器容器,包括:
当所述应用为一个时,则将所述应用的定时器加入当前定时器容器;
当所述应用为多个时,在所述多个应用的定时器中确定一个目标定时器,判断所述目标定时器的触发时间分别与其他所述定时器的触发时间的差值,若所述差值小于等于所述预设触发时间差值,则将所述目标定时器和对应的定时器存入同一个定时器容器;
若所述差值大于所述预设触发时间差值,则将所述目标定时器存入新的定时器容器。
可选地,所述触发时间确定模块64,配置为将在所述定时器容器中的所述定时器的最大触发时间作为所述定时器容器的触发时间。
本实施例的终端,可以用于执行上述所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
在实际应用中,所述应用确定模块61、创建模块62、存入模块63、触发时间确定模块64、修改模块65可由位于终端上的中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等器件实现。
本发明实施例提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于前述对齐唤醒的方法中的一个或多个,例如可用于执行图1或图2所示的方法。所述计算机存储介质可包括随机存储介质(RAM)、只读存储介质(ROM,)或闪存(Flash),可选为非瞬间存储介质。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现 在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围,凡按照本发明原理所作的修改,都应当理解为落入本发明的保护范围。
工业实用性
本发明实施例中,通过定时器容器的创建,将多个定时器至于该容器内,且将其中一个定时器的触发时间设置为该定时器容器的触发时间,这里的触发时间可理解为定时器唤醒终端的时间,这样就相当于使得多个定时器将在同一时间唤醒终端,显然相对于多个定时器分别唤醒终端,可以减少终端被唤醒的次数,这样一方面终端处于低功耗的状态时间更长,节省了功耗,另一方面减少终端被唤醒的唤醒过程所消耗的功耗,从而降低了终端的功耗,延长了终端的待机时长,在工业上可复制性强。

Claims (11)

  1. 一种对齐唤醒的方法,所述方法包括:
    确定需要对齐唤醒的至少一个具有定时器的应用;
    创建至少一个定时器容器及所述至少一个定时器容器的数据结构信息;
    将所述需要对齐唤醒的至少一个应用的定时器存入对应的所述定时器容器;
    确定所述至少一个定时器容器的触发时间;
    将所述需要对齐唤醒的至少一个应用的定时器的触发时间修改为对应的所述定时器容器的触发时间。
  2. 根据权利要求1所述的方法,其中,所述定时器容器的数据结构信息至少包括一个:触发时间,定时间隔,最大可容纳定时器的个数。
  3. 根据权利要求1或2所述的方法,其中,所述确定需要对齐唤醒的至少一个具有定时器的应用,包括:
    搜索所有应用,得到至少一个具有定时器的应用;
    根据用户设置的应用保护白名单确定所述至少一个具有定时器的应用是否需要对齐唤醒,若所述至少一个具有定时器的应用在所述应用保护白名单中,则确定对应的所述至少一个具有定时器的应用不需要对齐唤醒;
    若所述至少一个具有定时器的应用不在所述应用保护白名单中,则确定对应的所述至少一个具有定时器的应用需要对齐唤醒。
  4. 根据权利要求1或2所述的方法,其中,所述将所述需要对齐唤醒的至少一个应用的定时器存入对应的所述定时器容器,包括:
    将所述需要对齐唤醒的至少一个应用的定时器按照预设条件存入对应的所述定时器容器;
    所述按照预设条件存入对应的所述定时器容器,包括:
    判断所述定时器的定时间隔是否小于等于所述定时器容器的定时间隔,若所述定时器的定时间隔小于等于所述定时器容器的定时间隔,则将对应的定时器存入同一个定时器容器;
    若所述定时器的定时间隔大于所述定时器容器的定时间隔,则将对应的至定时器存入新的定时器容器;
    或,所述将所述需要对齐唤醒的至少一个应用的定时器存入对应的所述定时器容器,包括:
    将所述需要对齐唤醒的至少一个应用的定时器根据预设触发时间差值存入对应的所述定时器容器;
    所述根据预设触发时间差值存入对应的所述定时器容器,包括:
    当所述应用为一个时,则将所述应用的定时器加入当前定时器容器;
    当所述应用为多个时,在所述多个应用的定时器中确定一个目标定时器,判断所述目标定时器的触发时间分别与其他所述定时器的触发时间的差值,若所述差值小于等于所述预设触发时间差值,则将所述目标定时器和对应的定时器存入同一个定时器容器;
    若所述差值大于所述预设触发时间差值,则将所述目标定时器存入新的定时器容器。
  5. 根据权利要求1或2所述的方法,其中,所述确定所述至少一个定时器容器的触发时间,包括:
    将在所述定时器容器中的所述定时器的最迟触发时间作为所述定时器容器的触发时间。
  6. 一种对齐唤醒的终端,所述终端包括:
    应用确定模块,用于确定需要对齐唤醒的至少一个具有定时器的应用;
    创建模块,配置为创建至少一个定时器容器及所述至少一个定时器容 器的数据结构信息;
    存入模块,配置为将所述需要对齐唤醒的至少一个应用的定时器存入对应的所述定时器容器;
    触发时间确定模块,用于确定所述至少一个定时器容器的触发时间;
    修改模块,配置为将所述需要对齐唤醒的至少一个应用的定时器的触发时间修改为对应的所述定时器容器的触发时间。
  7. 根据权利要求6所述的终端,其中,所述定时器容器的数据结构信息至少包括一个:触发时间,定时间隔,最大可容纳定时器的个数。
  8. 根据权利要求6或7所述的终端,其中,所述应用确定模块,配置为搜索所有应用,得到至少一个具有定时器的应用;
    根据用户设置的应用保护白名单确定所述至少一个具有定时器的应用是否需要对齐唤醒,若所述至少一个具有定时器的应用在所述应用保护白名单中,则确定对应的所述至少一个具有定时器的应用不需要对齐唤醒;
    若所述至少一个具有定时器的应用不在所述应用保护白名单中,则确定对应的所述至少一个具有定时器的应用需要对齐唤醒。
  9. 根据权利要求6或7所述的终端,其中,所述存入模块,配置为将所述需要对齐唤醒的至少一个应用的定时器按照预设条件存入对应的所述定时器容器;
    所述按照预设条件存入对应的所述定时器容器,包括:
    判断所述定时器的定时间隔是否小于等于所述定时器容器的定时间隔,若所述定时器的定时间隔小于等于所述定时器容器的定时间隔,则将对应的定时器存入同一个定时器容器;
    若所述定时器的定时间隔大于所述定时器容器的定时间隔,则将对应的至定时器存入新的定时器容器;
    或,还配置为将所述需要对齐唤醒的至少一个应用的定时器根据预设 触发时间差值存入对应的所述定时器容器;
    所述根据预设触发时间差值存入对应的所述定时器容器,包括:
    当所述应用为一个时,则将所述应用的定时器加入当前定时器容器;
    当所述应用为多个时,在所述多个应用的定时器中确定一个目标定时器,判断所述目标定时器的触发时间分别与其他所述定时器的触发时间的差值,若所述差值小于等于所述预设触发时间差值,则将所述目标定时器和对应的定时器存入同一个定时器容器;
    若所述差值大于所述预设触发时间差值,则将所述目标定时器存入新的定时器容器。
  10. 根据权利要求6或7所述的终端,其中,所述触发时间确定模块,配置为将在所述定时器容器中的所述定时器的最迟触发时间作为所述定时器容器的触发时间。
  11. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至5所述对齐唤醒的方法中的一个或多个。
PCT/CN2016/103118 2015-10-27 2016-10-24 对齐唤醒的方法、终端和计算机存储介质 WO2017071545A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510707957.4A CN106612538A (zh) 2015-10-27 2015-10-27 对齐唤醒的方法及终端
CN201510707957.4 2015-10-27

Publications (1)

Publication Number Publication Date
WO2017071545A1 true WO2017071545A1 (zh) 2017-05-04

Family

ID=58614710

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/103118 WO2017071545A1 (zh) 2015-10-27 2016-10-24 对齐唤醒的方法、终端和计算机存储介质

Country Status (2)

Country Link
CN (1) CN106612538A (zh)
WO (1) WO2017071545A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110891328B (zh) * 2018-09-07 2022-04-12 华为技术有限公司 用于对齐唤醒的方法与移动设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110170464A1 (en) * 2010-01-08 2011-07-14 Samsung Electronics Co., Ltd. Methods to reduce power for asynchronous internet message protocols
US20140180457A1 (en) * 2012-12-26 2014-06-26 Anshuman Thakur Electronic device to align audio flow
CN104239132A (zh) * 2014-09-16 2014-12-24 深圳市中兴移动通信有限公司 一种唤醒对齐的方法、装置及终端
CN104298515A (zh) * 2013-07-19 2015-01-21 贝壳网际(北京)安全技术有限公司 移动终端中应用程序的唤醒控制方法、装置和移动终端
CN104536739A (zh) * 2014-12-17 2015-04-22 深圳市金立通信设备有限公司 一种唤醒终端系统的方法
CN104571461A (zh) * 2014-12-17 2015-04-29 深圳市金立通信设备有限公司 一种终端

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110170464A1 (en) * 2010-01-08 2011-07-14 Samsung Electronics Co., Ltd. Methods to reduce power for asynchronous internet message protocols
US20140180457A1 (en) * 2012-12-26 2014-06-26 Anshuman Thakur Electronic device to align audio flow
CN104298515A (zh) * 2013-07-19 2015-01-21 贝壳网际(北京)安全技术有限公司 移动终端中应用程序的唤醒控制方法、装置和移动终端
CN104239132A (zh) * 2014-09-16 2014-12-24 深圳市中兴移动通信有限公司 一种唤醒对齐的方法、装置及终端
CN104536739A (zh) * 2014-12-17 2015-04-22 深圳市金立通信设备有限公司 一种唤醒终端系统的方法
CN104571461A (zh) * 2014-12-17 2015-04-29 深圳市金立通信设备有限公司 一种终端

Also Published As

Publication number Publication date
CN106612538A (zh) 2017-05-03

Similar Documents

Publication Publication Date Title
US11252665B2 (en) Data transmission method, base station and terminal
US9939869B2 (en) Methods and systems for coordination of operating states amongst multiple SOCs within a computing device
CN103218033B (zh) 一种唤醒硬件设备的方法及装置
Geng et al. Energy-efficient computation offloading in cellular networks
TWI622933B (zh) Client update method and device
US11243784B2 (en) Method for managing trigger, and terminal device
CN112703714B (zh) 应用程序处理方法和装置、计算机设备、计算机可读存储介质
KR20150082521A (ko) 애플리케이션 하트비트 주기 조정 방법, 장치, 및 단말
US20130227576A1 (en) Method and apparatus for controlling task execution
WO2020042601A1 (zh) 一种可穿戴设备及可穿戴设备的信息处理方法及装置
WO2017101362A1 (zh) 一种智能终端的功耗管控方法及系统
CN106775965A (zh) 一种定时任务的处理方法及装置
WO2016004558A1 (zh) 一种心跳的调整方法、装置和终端
CN109511133A (zh) 一种唤醒处理的方法及装置
JP2016536892A (ja) ハートビートメッセージを送信するための方法、及び携帯端末
WO2015172283A1 (zh) 一种降低功耗的方法、装置及移动终端
KR102060431B1 (ko) 멀티 코어 시스템의 전력 관리 장치 및 방법
US8984078B2 (en) Systems and methods for device-to-cloud message delivery
WO2015154391A1 (zh) 无线网络接入的功耗处理方法及装置
CN104317611B (zh) 一种应用唤醒设置设备、方法以及移动终端
WO2020113929A1 (zh) 页面跳转控制方法和装置
WO2017071545A1 (zh) 对齐唤醒的方法、终端和计算机存储介质
CN110928586B (zh) App后台保活方法及装置
WO2016110056A1 (zh) 一种终端及终端省电的方法
CN111246549B (zh) 一种节点休眠、唤醒时间提供的方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16858980

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16858980

Country of ref document: EP

Kind code of ref document: A1