WO2016004558A1 - 一种心跳的调整方法、装置和终端 - Google Patents

一种心跳的调整方法、装置和终端 Download PDF

Info

Publication number
WO2016004558A1
WO2016004558A1 PCT/CN2014/080225 CN2014080225W WO2016004558A1 WO 2016004558 A1 WO2016004558 A1 WO 2016004558A1 CN 2014080225 W CN2014080225 W CN 2014080225W WO 2016004558 A1 WO2016004558 A1 WO 2016004558A1
Authority
WO
WIPO (PCT)
Prior art keywords
heartbeat
adjusted
application
unified
adjustment
Prior art date
Application number
PCT/CN2014/080225
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 华为技术有限公司
Priority to PCT/CN2014/080225 priority Critical patent/WO2016004558A1/zh
Priority to US15/317,918 priority patent/US10536900B2/en
Priority to EP14897104.7A priority patent/EP3142423B1/en
Priority to CN201480001745.8A priority patent/CN104412649B/zh
Publication of WO2016004558A1 publication Critical patent/WO2016004558A1/zh

Links

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/0212Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave
    • H04W52/0216Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave using a pre-established activity schedule, e.g. traffic indication frame
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • G06F1/3209Monitoring remote activity, e.g. over telephone lines or network connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/50Service provisioning or reconfiguring
    • 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/0251Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity
    • H04W52/0258Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity controlling an operation mode according to history or models of usage information, e.g. activity schedule or time of day
    • 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 communications technologies, and in particular, to a heartbeat adjustment method, apparatus, and terminal. Background technique
  • each application needs to maintain state refresh, or complete some transactions, each Each application needs to wake up the terminal periodically according to its own heartbeat cycle, but this will cause the terminal to be frequently woken up, increasing the power consumption of the terminal.
  • the terminal is used to wake up the terminal in a unified heartbeat cycle, and the terminal adjusts the heartbeat period of each application to a unified heartbeat cycle, so that the terminal can be woken up during the unified heartbeat cycle, effectively reducing the terminal.
  • the power consumption is used to wake up the terminal in a unified heartbeat cycle, and the terminal adjusts the heartbeat period of each application to a unified heartbeat cycle, so that the terminal can be woken up during the unified heartbeat cycle, effectively reducing the terminal.
  • the terminal collectively shifts the time point of the heartbeat of the application collectively, so that the adjusted heartbeat coincides with the unified heartbeat.
  • the service needs to be guaranteed to be online in real time.
  • the heartbeat interval of the service may be delayed, which may cause the heartbeat interval of the service to exceed the network retention time.
  • the application performs data interaction on the last unified heartbeat, but the next unified heartbeat and the last unified heartbeat interval exceed the network hold time period, the network will be broken by the operator or service, which leads to the need to guarantee real-time online communication. Business can not be effectively communicated, causing inconvenience to users. Summary of the invention
  • the embodiment of the invention provides a method, a device and a terminal for adjusting a heartbeat, which can flexibly adjust the heartbeat of the application program, improve the user experience and reduce energy consumption.
  • an aspect of the present invention provides a method for adjusting a heartbeat, including: acquiring a network hold time period of an application;
  • the method includes:
  • the adjusting the heartbeat to be adjusted according to the unified heartbeat to obtain the adjusted heartbeat includes:
  • the acquiring a service parameter of the application, and formulating a heartbeat adjustment policy of the application according to the service parameter includes:
  • the time interval between the to-be-adjusted heartbeat and the initial heartbeat is The network retention time period of the application.
  • the The heartbeat and the adjustment policy adjust the heartbeat to be adjusted, and obtaining the adjusted heartbeat includes:
  • the first heartbeat with the smallest time interval from the to-be-adjusted heartbeat is acquired in the unified heartbeat, and the time of the first heartbeat is a point earlier than or equal to the time point at which the heartbeat is to be adjusted;
  • the The unified heartbeat and the adjustment policy adjust the to-be-adjusted heartbeat to obtain an adjusted heartbeat, including:
  • the second heartbeat with the smallest time interval from the to-be-adjusted heartbeat is acquired in the unified heartbeat period, and the second heartbeat is The time point is later than or equal to the time point of the heartbeat to be adjusted;
  • a step of acquiring a network holding time period of the application is performed.
  • a second aspect of the present invention provides an apparatus comprising:
  • a first acquiring unit configured to acquire a network holding time period of the application
  • a second acquiring unit configured to acquire an initial heartbeat of the application, and acquire a to-be-adjusted heartbeat of the application according to the network holding time period and the initial heartbeat;
  • An adjusting unit configured to acquire a preset at least one unified heartbeat, and adjust the to-be-adjusted heartbeat according to the unified heartbeat to obtain an adjusted heartbeat, where the adjusted heartbeat is unified with the at least one unified heartbeat Heartbeat coincides.
  • the device includes:
  • a setting unit configured to acquire a service parameter of the application after the first acquisition unit acquires a network retention period of the application, and formulate, according to the service parameter, a heartbeat adjustment policy of the application, where
  • the adjustment policy is used to indicate an adjustment direction of the heartbeat to be adjusted, and the adjustment direction includes any one of a forward adjustment direction, a backward adjustment direction, and an unadjusted state;
  • the adjusting unit is specifically configured to: adjust the to-be-adjusted according to the unified heartbeat and the adjustment policy Adjust the heartbeat one by one to get the adjusted heartbeat.
  • the apparatus includes:
  • a third acquiring unit configured to acquire a preset unified heartbeat, and obtain a first unified heartbeat in the unified heartbeat before the determining unit formulates an adjustment policy of the heartbeat of the application according to the service parameter time interval;
  • a determining unit configured to determine whether the network holding time period is greater than the first time interval, where the determining unit is configured to: when the determining unit determines that the network holding time period is greater than the first time interval, Obtaining a service parameter of the application, and formulating an adjustment policy of the heartbeat of the application according to the service parameter.
  • the time interval between the heartbeat to be adjusted and the initial heartbeat is the application
  • the network of the program is kept for a period of time.
  • the adjusting unit includes:
  • a first acquiring sub-unit configured to: when the adjustment policy is used to indicate a forward adjustment direction of the to-be-adjusted heartbeat, obtain a first heartbeat with a minimum time interval from the to-be-adjusted heartbeat in the unified heartbeat, And the time point of the first heartbeat is earlier than or equal to the time point of the heartbeat to be adjusted;
  • a forward adjustment subunit configured to advance the time point of the heartbeat to be adjusted to a time point of the first heartbeat to obtain the adjusted heartbeat.
  • the adjusting unit includes:
  • a second acquiring sub-unit configured to: when the adjustment policy is used to indicate a backward adjustment direction of the to-be-adjusted heartbeat, acquire a second heartbeat with a minimum time interval from the to-be-adjusted heartbeat in the unified heartbeat period And the time point of the second heartbeat is later than or equal to the time point of the heartbeat to be adjusted; the backward adjustment subunit is configured to move the time point of the heartbeat to be adjusted back to the time of the second heartbeat At the point, the adjusted heartbeat is obtained.
  • the apparatus includes:
  • a detecting unit configured to detect whether the unified heartbeat system has been started before acquiring a network holding period of the application
  • the first obtaining unit is specifically configured to: when the detecting unit detects that the unified heartbeat system has been started, acquire a network holding time period of the application.
  • a third aspect of the present invention provides a computer storage medium
  • the computer storage medium stores a program, and the program execution includes some or all of the steps of the above-described heartbeat adjustment method.
  • a fourth aspect of the present invention provides a terminal, where the terminal includes: a memory and a processor, wherein the memory stores a set of program codes, and the processor is configured to call the program code stored in the memory, to perform the following operations:
  • the processor is further configured to: after acquiring a network retention period of the application, acquire a service parameter of the application, and formulate, according to the service parameter An adjustment policy of the heartbeat of the application, where the adjustment policy is used to indicate an adjustment direction of the heartbeat to be adjusted, and the adjustment direction includes any one of a forward adjustment direction, a backward adjustment direction, and an unadjusted state;
  • the processor adjusts the heartbeat to be adjusted according to the unified heartbeat, and obtaining the adjusted heartbeat includes:
  • the processor is further configured to: obtain a service parameter of the application, and formulate, according to the service parameter Before the adjustment policy of the heartbeat of the application is described, the preset unified heartbeat is acquired, and the first time interval of the adjacent unified heartbeat is obtained in the unified heartbeat;
  • the time interval between the heartbeat to be adjusted and the initial heartbeat is the application
  • the network of the program is kept for a period of time.
  • the processing Adjusting the heartbeat to be adjusted according to the unified heartbeat and the adjustment policy, and obtaining the adjusted heartbeat includes:
  • the first heartbeat with the smallest time interval from the to-be-adjusted heartbeat is acquired in the unified heartbeat, and the time of the first heartbeat is a point earlier than or equal to the time point at which the heartbeat is to be adjusted;
  • the processing Adjusting the heartbeat to be adjusted according to the unified heartbeat and the adjustment policy, and obtaining the adjusted heartbeat includes:
  • the second heartbeat with the smallest time interval from the to-be-adjusted heartbeat is acquired in the unified heartbeat period, and the second heartbeat is The time point is later than or equal to the time point of the heartbeat to be adjusted;
  • the processor is further configured to acquire an application Before the network of the program is kept for a period of time, it is detected whether the unified heartbeat system has been started; When it is detected that the unified heartbeat system has been started, a step of acquiring a network hold time period of the application is performed.
  • the embodiment of the present invention obtains the to-be-adjusted heartbeat of the application according to the network holding time period of the application and the initial heartbeat of the application, and obtains the preset unified heartbeat according to the network holding time period and the initial heartbeat, and adjusts according to the unified heartbeat.
  • the heartbeat is adjusted to obtain the adjusted heartbeat, which enables the terminal to flexibly adjust the heartbeat of the application according to the business needs of the application, adjust the position of the heartbeat of the running application to the position of the unified heartbeat, and improve the user's Experience and reduce energy consumption.
  • FIG. 1 is a schematic flowchart of a method for adjusting a heartbeat according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a method for adjusting a heartbeat according to an embodiment of the present invention
  • FIG. 4 is a timing diagram of a heartbeat backward time axis of an application according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of an apparatus according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a terminal according to an embodiment of the present invention. detailed description
  • the execution subject may be a terminal such as a mobile phone, a tablet computer, or a notebook.
  • 1 is a schematic flow chart of an embodiment of a method for adjusting a heartbeat according to the present invention. As shown in FIG. 1, a method for adjusting a heartbeat according to this embodiment may include the following steps:
  • the network retention time period may be the longest online time of the service of the application, that is, the application may be performed by the application after the last data interaction, and the application is in the network retention time period.
  • the network will be shaken by the operator or service.
  • the time interval of the heartbeat required by the service of the application is the network hold time period, 4 ⁇ is set to a, a > 0, after the data exchange of the last heartbeat, the time interval can be Conduct business data communication to ensure real-time online application.
  • the time interval of the heartbeat set by the application is greater than the network hold time period, it is assumed to be b, b > a.
  • the time interval between the next heartbeat and the last heartbeat is greater than the network hold time.
  • the timer is similar to the physiological heartbeat of a person or a creature, and can trigger the application once every time to perform data interaction, and can judge the "survival" of the terminal. Therefore, a person skilled in the art can refer to the timer for the data interaction of the wake-up application as a heartbeat.
  • the terminal may acquire the network holding time period of the application program by using a preset stepping algorithm or a bisection algorithm.
  • the terminal can preset the step value, for example, preset 0.5 min (minutes), and the specific preset value can be adjusted according to the accuracy required by the user.
  • the terminal can first set the heartbeat with a time interval of 2 min.
  • the terminal judges that the service data communication can be performed within 2 min, the terminal can set the heartbeat with a time interval of 2.5 min according to the preset step value, when the terminal judges to be 2.5.
  • the terminal may detect whether the terminal is in standby, and acquire a network holding time period of the application when the terminal is in standby; or the terminal may detect whether a startup instruction of the network holding time period for acquiring the application is received, and when receiving the startup instruction, Get the network hold time of the app.
  • the startup command may be a startup command generated by the user for the terminal operation.
  • the terminal may preset a unified heartbeat system.
  • the terminal When the terminal is in standby or receives a start command to acquire the network hold period of the application, the terminal will start the unified heartbeat system. Then, the terminal can detect whether the terminal is in standby or whether a startup command is received to determine whether the unified system has been started. When the terminal detects that the unified heartbeat system is activated, the terminal acquires the network hold time period of the application.
  • the unified heartbeat system may be an application, or a piece of program code, for indicating that the terminal enables a unified heartbeat to adjust the heartbeat of the application.
  • the unified heartbeat system can preset at least one unified heartbeat.
  • the unified heartbeat can be a periodic heartbeat, that is, the time interval of adjacent unified heartbeats is the same.
  • a heartbeat is adjacent to the front or back.
  • the unified heartbeat may be a timer for waking up the terminal, and each timer corresponds to a time point. When the terminal timing time lapses to the time point of the timer, the timer is triggered, and the system wakes up the terminal.
  • the unified heartbeat system can be used to adjust the heartbeat of the running application of the terminal to the position of the unified heartbeat according to the preset unified heartbeat, so that the application obeys the unified heartbeat to trigger wakeup, and reduce the power consumption of the terminal. . Further, when the unified heartbeat system adjusts the heartbeat of the application to be consistent with the unified heartbeat, and when the unified heartbeat is triggered, the system simultaneously wakes up the application at the time point of waking up the terminal.
  • the terminal can receive the start command generated by the user to start the unified heartbeat system; or when the terminal detects that the terminal is in the standby or black screen, the terminal starts the unified heartbeat system; the embodiment of the present invention does not limit the present invention.
  • the terminal when the terminal starts the unified heartbeat system, the terminal may notify the unified heartbeat system that the heartbeat of the application is not temporarily adjusted, and the terminal calculates the network holding time period of the application.
  • the unified heartbeat system can preset an interface that interacts with the application and the terminal. After the terminal starts the unified heartbeat system, the terminal can call the interface of the unified heartbeat system to reflect, broadcast, or send control commands to the unified heartbeat system to notify the unified heartbeat system. - - Temporarily not adjusting the heartbeat of the application. When the unified heartbeat system receives the control command, the unified heartbeat system responds to the control command, and does not adjust the heartbeat of the application. At this time, the terminal can enter the coordination period, and the terminal acquires the network holding time period of the application.
  • the initial heartbeat may be the first heartbeat of the application after the terminal is in standby or after receiving the startup command.
  • the initial heartbeat may also be the application of the terminal after starting the unified heartbeat system.
  • the terminal can preset the initial heartbeat of the application. Specifically, the terminal can preset a time point as the time point of the initial heartbeat of the application, thereby obtaining an initial heartbeat.
  • the terminal may also preset the current time point as the time point of the initial heartbeat of the application, thereby obtaining an initial heartbeat, or the terminal may use any one of the preset unified heartbeats as the initial heartbeat.
  • the terminal may obtain the to-be-adjusted heartbeat according to the network hold time period acquisition and the initial heartbeat, where the time interval between the heartbeat to be adjusted and the initial heartbeat may be a network hold time period. For example: When the initial heartbeat of the terminal preset application is 00:00min and the application's network hold time is 7min, the time point of the application's heartbeat to be adjusted is 00:07min.
  • S102 Obtain the preset at least one unified heartbeat, and adjust the to-be-adjusted heartbeat according to the unified heartbeat to obtain an adjusted heartbeat, wherein the adjusted heartbeat coincides with the unified heartbeat in the at least one unified heartbeat.
  • the terminal can acquire at least one unified heartbeat of the preset.
  • the unified heartbeat may be a periodic heartbeat, that is, the time intervals of adjacent unified heartbeats are the same.
  • the unified heartbeat may be a timer for waking up the terminal, and each timer corresponds to a time point. When the terminal timing time lapses to the time point of the timer, the timer is triggered, and the system wakes up the terminal.
  • the terminal, the unified heartbeat, the initial heartbeat described in the above embodiment, and the heartbeat described in the above embodiment share one time axis.
  • the unified heartbeat system may preset at least one unified heartbeat, and the terminal may acquire at least one unified heartbeat preset by the unified heartbeat system.
  • the terminal may obtain a continuous unified heartbeat, and adjust the to-be-adjusted heartbeat according to the unified heartbeat to obtain the adjusted heartbeat.
  • the terminal may perform a forward processing on the time point of adjusting the heartbeat to obtain the adjusted heartbeat.
  • the time point for adjusting the heartbeat is forwarded, and obtaining the adjusted heartbeat may include: the terminal has the smallest time interval between the unified heartbeat and the heartbeat to be adjusted on the time axis of the unified heartbeat, the initial heartbeat, and the heartbeat.
  • the first heartbeat, and the time point of the first heartbeat is earlier than or equal to the time point of the heartbeat to be adjusted.
  • the position of the heartbeat to be adjusted is moved forward on the time axis, and moved to the position of the first heartbeat to obtain the adjusted heartbeat, that is, before the time point of the heartbeat to be adjusted Move to the point in time of the first heartbeat so that the heartbeat to be adjusted coincides with the first heartbeat in the unified heartbeat.
  • the terminal may further perform a back-shift process on the time point of adjusting the heartbeat to obtain the adjusted heartbeat.
  • the time point for adjusting the heartbeat is post-processed, and obtaining the adjusted heartbeat may include: the terminal acquiring the minimum time interval between the heartbeat to be adjusted and the heartbeat to be adjusted in the unified heartbeat on the time axis of the unified heartbeat, the initial heartbeat, and the heartbeat sharing. Two heartbeats, and the time point of the second heartbeat is later than or equal to the time point of the heartbeat to be adjusted.
  • the position of the heartbeat to be adjusted is moved backward on the time axis, and then moved to the position of the second heartbeat to obtain the adjusted heartbeat, that is, after the time point of the heartbeat to be adjusted Move to the point in time of the second heartbeat so that the heartbeat to be adjusted coincides with the second heartbeat in the unified heartbeat.
  • the terminal may also adjust the heartbeat to be adjusted.
  • the present invention obtains a preset unified heartbeat according to the network holding time period of the application and the initial heartbeat of the application, and obtains the to-be-adjusted heartbeat of the application according to the network holding time period and the initial heartbeat, according to the preset
  • the unified heartbeat adjusts the heartbeat to obtain the adjusted heartbeat. This allows the terminal to adjust the heartbeat of the application and adjust the heartbeat position of the running application to the position of the unified heartbeat to make the application conform to the uniformity.
  • the heartbeat triggers wake-up, reducing the power consumption of the terminal.
  • FIG. 2 is a schematic flow chart of another embodiment of a method for adjusting a heartbeat according to the present invention. As shown in FIG. 2, a method for adjusting a heartbeat according to this embodiment may include the following steps:
  • S201 Obtain a service parameter of the application, and formulate a heartbeat adjustment policy of the application according to the service parameter.
  • the terminal before acquiring the service parameter of the application, and formulating the heartbeat adjustment policy of the application according to the service parameter, the terminal further acquires at least one unified heartbeat preset, wherein the unified heartbeat may be a cycle.
  • the heartbeat that is, the time interval of adjacent unified heartbeats is the same.
  • the terminal may acquire the first time interval of the adjacent unified heartbeat - - Separated.
  • the first time interval of the adjacent heartbeat may be a periodic time period of the unified heartbeat.
  • the terminal may determine whether the network holding time period is greater than the first time interval, and when the network holding time period is greater than the first time interval, perform the acquiring the service parameter of the application. And formulating, according to the service parameter, a step of adjusting a heartbeat of the application. Wherein, when the network hold period is less than or equal to the first time interval, the steps of the present invention are stopped.
  • the service parameter includes a service type in the application, a service name, and a real-time requirement level of the service
  • the terminal may determine, according to the service parameter, whether the service of the application may be broken or may be Can't communicate effectively.
  • the service type of the instant messaging software is instant communication. Because it is instant communication software, the instant generated information needs to be transmitted in time, otherwise the user experience is affected. Therefore, the real-time requirement level of the business can be high. That is, we can understand that the heartbeat interval of the instant messaging software cannot exceed the network holding time period, and the business cannot be shaken or cannot be effectively transmitted.
  • the application is a mailbox software
  • the business type of the mailbox software may be a mailbox. Because it is a mailbox software type, the generated information does not need to be timely transmitted, and can be sent when waiting for the next trigger, so we can understand that the mailbox The heartbeat interval of the software can exceed the network hold time period, and the service can be broken and delayed.
  • some applications may not allow the heartbeat interval to exceed the network hold time period for a certain period of time, but may allow the heartbeat interval to exceed the network hold time period for another period of time, specifically, according to service parameters. Determine if the application allows the heartbeat interval to exceed the network hold time period. Further, some applications may allow the heartbeat to not be adjusted, for example: When the application is a snap-on software, since the snap-on software obtains the product according to the response time after the product is put on the shelf, the generated The information can be made according to the heartbeat of the application, and no adjustment is needed. Therefore, it can be understood that the heartbeat of the software of the snap-on type can be adjusted.
  • the terminal may determine, according to the service parameter, whether the application allows the heartbeat interval to exceed the network retention time period to formulate an adjustment policy.
  • the terminal may determine whether each application allows the heartbeat interval to exceed the network retention time period corresponding to each application according to the service parameters of the multiple applications to formulate each application corresponding adjustment policy.
  • the terminal can also - - Based on business parameters, the application can determine the corresponding policy without making adjustments.
  • the adjustment policy is used to indicate an adjustment direction of the heartbeat to be adjusted, and the adjustment direction includes any one of a forward adjustment direction, a backward adjustment direction, and no adjustment.
  • the adjustment policy may be used to indicate the backward adjustment direction of the to-be-adjusted heartbeat of the application, and the adjustment policy is available when the application does not allow the heartbeat interval to exceed the network hold time period. Adjusts the direction of the forward movement of the heartbeat to be adjusted for the application.
  • the adjustment policy can be used to indicate the application's unadjusted heartbeat to be adjusted.
  • the terminal may re-define the adjustment policy, for example: if the terminal is under the GPRS (General Packet Radio Service) network, the network maintenance time period of the instant messaging application is After 10 minutes, after switching to the WIFI (Wireless Fidelity) network, the terminal finds that the application of instant communication is often disconnected, and the terminal can re-define the adjustment strategy for the application.
  • GPRS General Packet Radio Service
  • WIFI Wireless Fidelity
  • the terminal when the terminal starts the unified heartbeat system, the terminal acquires the service parameter of the application, and when the heartbeat adjustment policy of the application is formulated according to the service parameter, the unified heartbeat management system still does not adjust the heartbeat of the application. , where the terminal can still be in the coordination period. Specifically, the terminal can control the time when the application's adjustment policy is formulated and the adjustment time can be ignored during the entire adjustment of the heartbeat.
  • S202 Obtain an initial heartbeat of the application, and obtain an to-be-adjusted heartbeat of the application according to the network holding time period and the initial heartbeat.
  • S203 Obtain a preset at least one unified heartbeat, and adjust the to-be-adjusted heartbeat according to the unified heartbeat and the adjustment policy to obtain an adjusted heartbeat.
  • the terminal may obtain a continuous unified heartbeat, and adjust the to-be-adjusted heartbeat according to the unified heartbeat and the adjustment policy to obtain the adjusted heartbeat.
  • the terminal when the adjustment policy is used to indicate the forward adjustment direction of the to-be-adjusted heartbeat, the terminal performs a forward processing on the time point of adjusting the heartbeat to obtain the adjusted heartbeat.
  • the time point for adjusting the heartbeat is forwarded, and the obtained adjusted heartbeat may include: the terminal is in the unified heartbeat, the initial heartbeat, and the heartbeat sharing timeline, and the time interval between the unified heartbeat and the heartbeat to be adjusted is the smallest.
  • One heartbeat, and the time point of the first heartbeat is earlier than or equal to the time point of the heartbeat to be adjusted.
  • Figure 3 is a timing diagram of the to-be-adjusted heartbeat of an application in the terminal on the time axis and a timing diagram of the unified heartbeat on the time axis.
  • the dotted arrow represents the unified heartbeat that appears periodically
  • the solid arrow represents the heartbeat of the application to be adjusted.
  • the initial heartbeat of the application is 00:00 min
  • the period of the unified heartbeat is 5 min.
  • the application's network retention period is 8 minutes. What we can get is that the time point of the application's heartbeat to be adjusted is 00:08min.
  • the terminal can obtain the first heartbeat at 00:05 min according to the to-be-adjusted heartbeat, the time interval at which the heartbeat to be adjusted is the smallest and the time point of the heartbeat is earlier than the time point at which the heartbeat is to be adjusted. Then, the terminal can adjust the position of the heartbeat to be adjusted forward in the direction of the arrow shown in FIG. 3, and move forward to the position of the first heartbeat, and then change the time point of the heart to be adjusted to 00:08 min to 00:05 min.
  • the heartbeat to be adjusted after the change of the time point is the adjusted heartbeat, and the first heartbeat coincides with the heartbeat and the unified heartbeat cycle at 00:05 min, and the time interval from the initial heartbeat is 5 min, which is less than the network hold time period. Guarantee the effectiveness of the application's business.
  • the time point of the heartbeat to be adjusted is post-processed to obtain the adjusted heartbeat.
  • the time point for adjusting the heartbeat is post-processed, and obtaining the adjusted heartbeat may include: the terminal acquiring the minimum time interval between the heartbeat to be adjusted and the heartbeat to be adjusted in the unified heartbeat on the time axis of the unified heartbeat, the initial heartbeat, and the heartbeat sharing. Two heartbeats, and the time point of the second heartbeat is later than or equal to the time point of the heartbeat to be adjusted.
  • the position of the heartbeat to be adjusted is moved backward on the time axis, and then moved to the position of the second heartbeat to obtain the adjusted heartbeat, that is, after the time point of the heartbeat to be adjusted Move to the point in time of the second heartbeat so that the heartbeat to be adjusted coincides with the second heartbeat in the unified heartbeat.
  • the heartbeat backward timeline timing diagram of the application of FIG. 4 is a timing diagram of an application's heartbeat to be adjusted on the time axis and a timing diagram of the unified heartbeat on the time axis.
  • the dotted arrow represents the unified heartbeat that appears periodically
  • the solid arrow represents the heartbeat of the application to be adjusted.
  • the initial heartbeat of the application is 00:00 min
  • the period of the unified heartbeat is 5 min.
  • the application's network retention period is 9 minutes.
  • the time point of the application's heartbeat to be adjusted is 00:09min.
  • the terminal can obtain the second heartbeat on the unified heartbeat according to the to-be-adjusted heartbeat, the time interval at which the heartbeat to be adjusted is minimum, and the time point of the heartbeat is later than or equal to the time point of the heartbeat to be adjusted is the second heartbeat at 00:10min. Then, the terminal can move the position of the heartbeat to be adjusted backward in the direction of the arrow shown in FIG. 4, and then move to the second heartbeat position, and then change the time point of the heart to be adjusted to 00:09min to 00: lOmin, change time After the point, the heartbeat to be adjusted is the adjusted heartbeat, and the second heartbeat on 00: 10min in the heartbeat and the unified heartbeat has been adjusted.
  • the adjustment policy includes indicating that the heartbeat is to be adjusted, the adjustment of the heartbeat is not performed.
  • the terminal when the terminal obtains the adjusted heartbeat, the terminal saves the obtained adjusted heartbeat, and can use the adjusted heartbeat as a new initial heartbeat, so that the terminal maintains the time period according to the new initial heartbeat and the network.
  • the terminal obtains the next heartbeat to be adjusted, and perform adjustment according to the unified heartbeat to adjust the heartbeat to obtain the adjusted heartbeat.
  • the step can be repeatedly executed until the instruction to exit the user operation is stopped to stop the operation.
  • the terminal when the adjustment policy obtained by the terminal is used to indicate the forward adjustment direction of the heartbeat to be adjusted, referring to FIG. 3, the network retention period of the application is 8 min, and the terminal obtains the adjusted heartbeat at 00:05 min of the application. After that, the terminal saves the adjusted heartbeat, and can set the adjusted heartbeat at 00:05 min to a new initial heartbeat, so that the terminal obtains another to-be-adjusted heartbeat of the application to be 00:13 min. Therefore, the terminal can further adjust the forward adjustment direction of the heartbeat to be adjusted according to the adjustment policy. For the heartbeat to be adjusted on 00: 13 minutes, refer to the direction of the arrow as shown in FIG. 3, and the time of the heartbeat to be adjusted can be adjusted.
  • the terminal can use the adjusted heartbeat as the new initial heartbeat, obtain the next to-be-adjusted heartbeat of the application according to the network holding time, and then according to the unified
  • the heartbeat and adjustment strategy adjusts the adjusted heartbeat to obtain the adjusted heartbeat, and the terminal can repeat the process continuously until the instruction to exit generated by the user operation is stopped.
  • the network retention period of the application is 9 min.
  • the terminal After the terminal obtains the adjusted heartbeat at 00:10 min of the application, the terminal saves the adjusted heartbeat, and sets the adjusted heartbeat at 00:10 min to a new initial heartbeat, so that the terminal obtains the application under One to be adjusted heartbeat is 00: 19min. Therefore, the terminal can be further used to indicate the to-be-adjusted heartbeat according to the adjustment policy.
  • - - Move the direction and adjust the heartbeat to be adjusted at 00: 19min. See the direction of the arrow shown in Figure 4.
  • Adjust the time of the heartbeat to be adjusted 00: 19min to 00: 20min.
  • the terminal can use the adjusted heartbeat as the new initial heartbeat, obtain the next to-be-adjusted heartbeat of the application according to the network holding time, and then according to the unified
  • the heartbeat and adjustment strategy adjusts the adjusted heartbeat to obtain the adjusted heartbeat, and the terminal can repeat the process continuously until the instruction to exit generated by the user operation is stopped.
  • the terminal when the terminal is in the unified heartbeat system and obtains the adjustment policy of the application in the coordination period, the terminal may exit the coordination period, acquire the heartbeat of the application, invoke the interface of the unified heartbeat system, and apply the application.
  • the heartbeat of the adjustment policy and the application is sent to the unified heartbeat system, so that the unified heartbeat system delays or pushes the heartbeat of the application obtained by the terminal according to the adjustment policy, and the terminal enters the running period.
  • the terminal after the terminal acquires the adjusted heartbeat of the application, the terminal saves the adjusted heartbeat, so that the application triggers according to the adjusted heartbeat.
  • the terminal when the terminal exits the unified heartbeat system, or when the terminal is not in the standby scenario, the terminal does not need to adjust the application, and the application can be used normally.
  • step S200 and step S202 may refer to step S100 and step S101 in the foregoing embodiment, and details are not described herein.
  • the present invention obtains an application's heartbeat adjustment policy according to service parameters by acquiring a network retention time period of the application and an application service parameter, and then acquiring an initial heartbeat of the application, according to the network retention time period and The initial heartbeat acquires the heartbeat of the application to be adjusted, and finally obtains the preset unified heartbeat, adjusts the heartbeat according to the unified heartbeat and the adjustment policy, and obtains the adjusted heartbeat, which enables the terminal to flexibly adapt the heartbeat of the application according to the adjustment strategy. Adjust to improve user experience and reduce energy consumption.
  • a device may include:
  • the first obtaining unit 100 is configured to acquire a network holding time period of the application.
  • a second acquiring unit 200 configured to acquire an initial heartbeat of the application, according to the network guarantee - - acquiring the to-be-adjusted heartbeat of the application for the time period and the initial heartbeat.
  • the adjusting unit 300 is configured to acquire the preset at least one unified heartbeat, and adjust the to-be-adjusted heartbeat according to the unified heartbeat to obtain an adjusted heartbeat, where the adjusted heartbeat is in the at least one unified heartbeat Unified heartbeat coincides.
  • the device further includes:
  • a determining unit 400 configured to: after the first acquiring unit acquires a network holding time period of the application, acquire a service parameter of the application, and formulate an adjustment policy of the heartbeat of the application according to the service parameter, where The adjustment policy is used to indicate an adjustment direction of the heartbeat to be adjusted, and the adjustment direction includes any one of a forward adjustment direction, a backward adjustment direction, and an unadjusted state;
  • the adjusting unit 300 is specifically configured to adjust the heartbeat to be adjusted according to the unified heartbeat and the adjustment policy to obtain an adjusted heartbeat.
  • the device also includes:
  • the third obtaining unit 500 is configured to acquire a preset unified heartbeat and obtain a second unified heartbeat in the unified heartbeat before the determining unit formulates an adjustment policy of the heartbeat of the application according to the service parameter. a time interval
  • the determining unit 600 is configured to determine whether the network holding time period is greater than the first time interval
  • the determining unit 400 is specifically configured to: when the determining unit 600 determines that the network holding time period is greater than the first time interval, acquire a service parameter of the application, and formulate the application according to the service parameter.
  • the adjustment strategy of the heartbeat is specifically configured to: when the determining unit 600 determines that the network holding time period is greater than the first time interval, acquire a service parameter of the application, and formulate the application according to the service parameter.
  • the adjustment strategy of the heartbeat is specifically configured to: when the determining unit 600 determines that the network holding time period is greater than the first time interval, acquire a service parameter of the application, and formulate the application according to the service parameter.
  • the adjustment strategy of the heartbeat is specifically configured to: when the determining unit 600 determines that the network holding time period is greater than the first time interval, acquire a service parameter of the application, and formulate the application according to the service parameter.
  • the adjustment strategy of the heartbeat is specifically configured to: when the determining unit 600 determines that the network holding time period is greater than the first time interval, acquire
  • the time interval between the heartbeat to be adjusted and the initial heartbeat is a network holding time period of the application.
  • a device may include: a first acquiring unit 100, a second acquiring unit 200, an adjusting unit 300, a determining unit 400, a third obtaining unit 500, a determining unit 600, and Detection unit 700.
  • the adjusting unit 300 includes:
  • a first acquiring sub-unit 10 configured to acquire, in the unified heartbeat, a first heartbeat with a minimum time interval from the to-be-adjusted heartbeat when the adjustment policy is used to indicate a forward adjustment direction of the to-be-adjusted heartbeat And the time point of the first heartbeat is earlier than or equal to the time point of the heartbeat to be adjusted; - a forward adjustment subunit 20, configured to advance the time point of the heartbeat to be adjusted to a time point of the first heartbeat to obtain the adjusted heartbeat.
  • the device further includes:
  • the detecting unit 700 is configured to detect whether the unified heartbeat system has been started before acquiring the network holding period of the application;
  • the first obtaining unit 100 is specifically configured to acquire a network holding time period of the application when the detecting unit 700 detects that the unified heartbeat system has been started.
  • the embodiment of the present invention obtains the preset heartbeat of the application by acquiring the network holding time period of the application and the initial heartbeat of the application, and acquiring the to-be-adjusted heartbeat of the application according to the network holding time period and the initial heartbeat. And adjust the heartbeat according to the unified heartbeat to obtain the adjusted heartbeat, which enables the device to flexibly adjust the heartbeat of the application according to the business needs of the application, and adjust the position of the heartbeat of the running application to the unified heartbeat. In terms of location, improve user experience and reduce energy consumption.
  • a device may include: a first acquiring unit 100, a second acquiring unit 200, an adjusting unit 300, a determining unit 400, a third obtaining unit 500, a determining unit 600, and Detection unit 700.
  • the adjusting unit 300 includes:
  • a second obtaining sub-unit 30 configured to: when the adjustment policy is used to indicate a backward adjustment direction of the to-be-adjusted heartbeat, obtain a second minimum interval from the to-be-adjusted heartbeat in the unified heartbeat period The heartbeat, and the time point of the second heartbeat is later than or equal to the time point of the heartbeat to be adjusted.
  • the backward adjustment subunit 40 is configured to move the time point of the heartbeat to be adjusted to a time point of the second heartbeat to obtain the adjusted heartbeat.
  • the embodiment of the present invention obtains an application network time period and - - the initial heartbeat of the application, obtain the to-be-adjusted heartbeat of the application according to the network hold time period and the initial heartbeat, and then obtain the preset unified heartbeat, and adjust the heartbeat according to the unified heartbeat to obtain the adjusted heartbeat, which can make
  • the device can flexibly adjust the heartbeat of the application according to the business needs of the application, adjust the position of the heartbeat of the running application to the position of the unified heartbeat, improve the user experience, and reduce energy consumption.
  • FIG. 8 is a schematic structural diagram of a terminal according to an embodiment of the present invention. As shown in FIG. 8, the terminal in this embodiment may include:
  • the processor 201 (the number of the processors 201 in the terminal may be one or more, FIG. 8 is exemplified by a processor) and the memory 202.
  • the processor 201 and the memory 202 may be connected by a bus or other means, wherein the bus connection is taken as an example in FIG.
  • the processor 201 performs the following steps:
  • the processor 201 is further configured to: after acquiring a network hold period of the application, acquire a service parameter of the application, and formulate, according to the service parameter, a heartbeat adjustment policy of the application, where the adjustment The policy is used to indicate an adjustment direction of the to-be-adjusted heartbeat, where the adjustment direction includes any one of a forward adjustment direction, a backward adjustment direction, and an unadjusted state;
  • the processor 201 adjusts the to-be-adjusted heartbeat according to the unified heartbeat, and obtains the adjusted heartbeat, including: adjusting the to-be-adjusted heartbeat according to the unified heartbeat and the adjustment policy, to obtain an adjusted heartbeat.
  • the processor 201 is further configured to: before acquiring the service parameter of the application, and formulating a heartbeat adjustment policy of the application according to the service parameter, acquiring a preset unified heartbeat, in the unified heartbeat Obtaining a first time interval of the adjacent unified heartbeat;
  • the time interval between the heartbeat to be adjusted and the initial heartbeat is a network holding time period of the application.
  • the processor 201 adjusts the to-be-adjusted heartbeat according to the unified heartbeat and the adjustment policy, and obtaining the adjusted heartbeat includes:
  • the first heartbeat with the smallest time interval from the to-be-adjusted heartbeat is acquired in the unified heartbeat, and the time of the first heartbeat is a point earlier than or equal to the time point at which the heartbeat is to be adjusted;
  • the processor 201 adjusts the to-be-adjusted heartbeat according to the unified heartbeat and the adjustment policy, and obtaining the adjusted heartbeat includes:
  • the second heartbeat with the smallest time interval from the to-be-adjusted heartbeat is acquired in the unified heartbeat period, and the second heartbeat is The time point is later than or equal to the time point of the heartbeat to be adjusted;
  • the processor 201 is further configured to: before detecting a network hold period of the application, detecting whether the unified heartbeat system has been started;
  • a step of acquiring a network holding time period of the application is performed.
  • the embodiment of the present invention acquires the to-be-adjusted heartbeat of the application according to the network retention time period and the initial heartbeat by acquiring the network retention time period of the application and the initial heartbeat of the application. Then, the preset unified heartbeat is obtained, and the adjusted heartbeat is adjusted according to the unified heartbeat to obtain the adjusted heartbeat, which enables the device to flexibly adjust the heartbeat of the application according to the business needs of the application, and the running application is to be executed.
  • an embodiment of the present invention obtains an initial heartbeat of an application and an initial heartbeat of an application, and obtains an to-be-adjusted heartbeat of the application according to a network holding time period and an initial heartbeat, and further obtains Pre-set unified heartbeat, and adjust the heartbeat according to the unified heartbeat to obtain the adjusted heartbeat.
  • This allows the device to flexibly adjust the heartbeat of the application according to the business needs of the application, and the heartbeat of the running application.
  • the position is adjusted to the position of the unified heartbeat, which improves the user experience and reduces energy consumption.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Debugging And Monitoring (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明实施例公开了一种心跳的调整方法、装置及终端。所述方法包括:获取应用程序的网络保持时间段;获取所述应用程序的初始心跳,根据所述网络保持时间段和所述初始心跳获取所述应用程序的待调整心跳;获取预置的至少一个统一心跳,根据所述统一心跳对所述待调整心跳进行调整,获得已调整心跳,其中,所述已调整心跳与所述至少一个统一心跳中的统一心跳重合。本发明实施例可根据应用程序的业务需要对应用程序的心跳进行灵活调整,提高用户体验度,降低耗能。

Description

一 一 一种心跳的调整方法、 装置和终端
技》|^^域
本发明涉及通信技术领域, 尤其涉及一种心跳的调整方法、 装置和终端。 背景技术
目前,终端上可安装越来越多的应用程序, 由于每个应用程序的心跳周期 大多不一样, 在终端待机或黑屏等情景时, 若应用程序需保持状态的刷新, 或 完成一些事务,每个应用程序都需按照自己的心跳周期进行定时唤醒终端,但 这将导致终端经常被唤醒, 增加了终端的电能消耗。
为了解决以上的问题, 目前釆用统一心跳周期的方式来进行唤醒终端, 终 端将各个应用程序的心跳周期调整到统一心跳周期,这样可使终端在统一心跳 周期时才被唤醒, 有效降低了终端的电能消耗。
但是,在现有的釆用统一心跳的方式进行调整应用程序的心跳中, 终端是 将应用程序的心跳的时间点集体后移调整, 使得调整后的心跳与统一心跳重 合。 然而, 部分应用程序在通信或信息传达等业务时, 业务需保障实时在线, 但在釆用统一心跳后, 由于心跳的时间点向后移,可能导致业务的心跳间隔超 过网络保持时间段, 即当应用程序在上个统一心跳进行数据交互后,但在下个 统一心跳与上个统一心跳间隔值超过网络保持时间段,则网络会被运营商或业 务搖断,这导致需保障实时在线的通信业务不能够有效传达,给用户带来不便。 发明内容
本发明实施例提供了一种心跳的调整方法、装置和终端, 可对应用程序的 心跳进行灵活调整, 提高用户的体验度, 降低能耗。
为了解决上述技术问题, 本发明一方面提供一种心跳的调整方法, 包括: 获取应用程序的网络保持时间段;
获取所述应用程序的初始心跳,根据所述网络保持时间段和所述初始心跳 获取所述应用程序的待调整心跳;
获取预置的至少一个统一心跳,根据所述统一心跳对所述待调整心跳进行 调整, 获得已调整心跳, 其中, 所述已调整心跳与所述至少一个统一心跳中的 - - 统一' G跳重合。
结合第一方面,在第一种可能的实现方式中, 所述获取应用程序的网络保 持时间段之后包括:
获取所述应用程序的业务参数,根据所述业务参数制定所述应用程序的心 跳的调整策略, 其中, 所述调整策略用于指示所述待调整心跳的调整方向, 所 述调整方向包括前移调整方向、 后移调整方向和不调整中的任一种;
所述根据所述统一心跳对所述待调整心跳进行调整, 获得已调整心跳包 括:
根据所述统一心跳和所述调整策略对所述待调整心跳进行调整,获得已调 整心 ϋ 。
结合第一方面的第一种可能的实现方式,在第二种可能的实现方式中, 所 述获取所述应用程序的业务参数 ,根据所述业务参数制定所述应用程序的心跳 的调整策略之前包括:
获取预置的统一心跳,在所述统一心跳中获取相邻统一心跳的第一时间间 隔;
判断所述网络保持时间段是否大于所述第一时间间隔;
当所述网络保持时间段大于所述第一时间间隔时,执行所述获取所述应用 程序的业务参数, 根据所述业务参数制定所述应用程序的心跳的调整策略。
结合第一方面的第一种可能的实现方式或第一方面的第二种可能的实现 方式,在第三种可能的实现方式中, 所述待调整心跳与所述初始心跳的时间间 隔为所述应用程序的网络保持时间段。
结合第一方面第一种可能的实现方式或第一方面第二种可能的实现方式 或第一方面第三种可能的实现方式,在第四种可能的实现方式中, 所述根据所 述统一心跳和所述调整策略对所述待调整心跳进行调整, 获得已调整心跳包 括:
当所述调整策略用于指示所述待调整心跳的前移调整方向时,在所述统一 心跳中获取与所述待调整心跳的时间间隔最小的第一心跳,且所述第一心跳的 时间点早于或等于所述待调整心跳的时间点;
将所述待调整心跳的时间点前移至所述第一心跳的时间点上,获得所述已 - - 调整心 ϋ 。
结合第一方面的第一种可能的实现方式或第一方面的第二种可能的实现 方式或第一方面的第三种可能的实现方式,在第五种可能的实现方式中, 所述 根据所述统一心跳和所述调整策略对所述待调整心跳进行调整,获得已调整心 ϋ 包括:
当所述调整策略用于指示所述待调整心跳的后移调整方向时,在所述统一 心跳周期中获取与所述待调整心跳的时间间隔最小的第二心跳,且所述第二心 跳的时间点晚于或等于所述待调整心跳的时间点;
将所述待调整心跳的时间点后移至所述第二心跳的时间点上,获得所述已 调整心跳。
结合第一方面或第一方面的第一种可能的实现方式至第一方面的第五种 可能的实现方式,在第六种可能的实现方式中, 所述获取应用程序的网络保持 时间段之前包括:
检测统一心跳系统是否已启动;
当检测到所述统一心跳系统已启动时,执行获取所述应用程序的网络保持 时间段步骤。
本发明第二方面提供了一种装置, 包括:
第一获取单元, 用于获取应用程序的网络保持时间段;
第二获取单元, 用于获取所述应用程序的初始心跳,根据所述网络保持时 间段和所述初始心跳获取所述应用程序的待调整心跳;
调整单元, 用于获取预置的至少一个统一心跳,根据所述统一心跳对所述 待调整心跳进行调整, 获得已调整心跳, 其中, 所述已调整心跳与所述至少一 个统一心跳中的统一心跳重合。
结合第二方面, 在第一种可能的实现方式中, 所述装置包括:
制定单元, 用于在所述第一获取单元获取应用程序的网络保持时间段之 后, 获取所述应用程序的业务参数,根据所述业务参数制定所述应用程序的心 跳的调整策略, 其中, 所述调整策略用于指示所述待调整心跳的调整方向, 所 述调整方向包括前移调整方向、 后移调整方向和不调整中的任一种;
所述调整单元具体用于,根据所述统一心跳和所述调整策略对所述待调整 一 一 心跳进行调整, 获得已调整心跳。
结合第二方面第一种可能的实现方式,在第二种可能的实现方式中, 所述 装置包括:
第三获取单元,用于在所述制定单元根据所述业务参数制定所述应用程序 的心跳的调整策略之前, 获取预置的统一心跳,在所述统一心跳中获取相邻统 一心跳的第一时间间隔;
判断单元, 用于判断所述网络保持时间段是否大于所述第一时间间隔; 所述制定单元具体用于,当所述判断单元判断所述网络保持时间段大于所 述第一时间间隔时, 获取所述应用程序的业务参数,根据所述业务参数制定所 述应用程序的心跳的调整策略。
结合第二方面第一种可能实现的方式或第二方面第二种可能的实现方式, 在第三种可能的实现方式中,所述待调整心跳与所述初始心跳的时间间隔为所 述应用程序的网络保持时间段。
结合第二方面第一种可能的实现方式或第二方面第二种可能的实现方式 或第二方面第三种可能的实现方式,在第四种可能的实现方式中, 所述调整单 元包括:
第一获取子单元,用于当所述调整策略用于指示所述待调整心跳的前移调 整方向时,在所述统一心跳中获取与所述待调整心跳的时间间隔最小的第一心 跳, 且所述第一心跳的时间点早于或等于所述待调整心跳的时间点;
前移调整子单元,用于将所述待调整心跳的时间点前移至所述第一心跳的 时间点上, 获得所述已调整心跳。
结合第二方面第一种可能的实现方式或第二方面第二种可能的实现方式 或第二方面第三种可能的实现方式,在第五种可能的实现方式中, 所述调整单 元包括:
第二获取子单元,用于当所述调整策略用于指示所述待调整心跳的后移调 整方向时,在所述统一心跳周期中获取与所述待调整心跳的时间间隔最小的第 二心跳, 且所述第二心跳的时间点晚于或等于所述待调整心跳的时间点; 后移调整子单元,用于将所述待调整心跳的时间点后移至所述第二心跳的 时间点上, 获得所述已调整心跳。 结合第二方面或第二方面的第一种可能的实现方式至第二方面的第五种 可能的实现方式, 在第六种可能的实现方式中, 所述装置包括:
检测单元, 用于在获取应用程序的网络保持时间段之前,检测统一心跳系 统是否已启动;
所述第一获取单元具体用于,当所述检测单元检测到所述统一心跳系统已 启动时, 获取所述应用程序的网络保持时间段。
本发明第三方面提供一种计算机存储介质 ,
所述计算机存储介质存储有程序,所述程序执行时包括如上述一种心跳的 调整方法的部分或全部步骤。
本发明第四方面提供一种终端, 所述终端包括: 存储器和处理器, 其中, 存储器中存储一组程序代码,且处理器用于调用存储器中存储的程序代码, 用 于执行以下操作:
获取应用程序的网络保持时间段;
获取所述应用程序的初始心跳,根据所述网络保持时间段和所述初始心跳 获取所述应用程序的待调整心跳;
获取预置的至少一个统一心跳,根据所述统一心跳对所述待调整心跳进行 调整, 获得已调整心跳, 其中, 所述已调整心跳与所述至少一个统一心跳中的 统一' G跳重合。
结合第四方面, 在第一种可能的实现方式中, 所述处理器还用于, 在获取 应用程序的网络保持时间段之后, 获取所述应用程序的业务参数,根据所述业 务参数制定所述应用程序的心跳的调整策略, 其中, 所述调整策略用于指示所 述待调整心跳的调整方向, 所述调整方向包括前移调整方向、后移调整方向和 不调整中的任一种;
所述处理器根据所述统一心跳对所述待调整心跳进行调整,获得已调整心 跳包括:
根据所述统一心跳和所述调整策略对所述待调整心跳进行调整,获得已调 整心跳。
结合第四方面的第一种可能的实现方式,在第二种可能的实现方式中, 所 述处理器还用于,在获取所述应用程序的业务参数,根据所述业务参数制定所 一 一 述应用程序的心跳的调整策略之前, 获取预置的统一心跳,在所述统一心跳中 获取相邻统一心跳的第一时间间隔;
判断所述网络保持时间段是否大于所述第一时间间隔;
当所述网络保持时间段大于所述第一时间间隔时,执行所述获取所述应用 程序的业务参数, 根据所述业务参数制定所述应用程序的心跳的调整策略。
结合第四方面第一种可能实现的方式或第四方面第二种可能的实现方式, 在第三种可能的实现方式中,所述待调整心跳与所述初始心跳的时间间隔为所 述应用程序的网络保持时间段。
结合第四方面的第一种可能的实现方式或第四方面的第二种可能的实现 方式或第四方面的第三种可能的实现方式,在第四种可能的实现方式中, 所述 处理器根据所述统一心跳和所述调整策略对所述待调整心跳进行调整,获得已 调整心跳包括:
当所述调整策略用于指示所述待调整心跳的前移调整方向时,在所述统一 心跳中获取与所述待调整心跳的时间间隔最小的第一心跳,且所述第一心跳的 时间点早于或等于所述待调整心跳的时间点;
将所述待调整心跳的时间点前移至所述第一心跳的时间点上,获得所述已 调整心 ϋ 。
结合第四方面的第一种可能的实现方式或第四方面的第二种可能的实现 方式或第四方面的第三种可能的实现方式,在第五种可能的实现方式中, 所述 处理器根据所述统一心跳和所述调整策略对所述待调整心跳进行调整,获得已 调整心跳包括:
当所述调整策略用于指示所述待调整心跳的后移调整方向时,在所述统一 心跳周期中获取与所述待调整心跳的时间间隔最小的第二心跳,且所述第二心 跳的时间点晚于或等于所述待调整心跳的时间点;
将所述待调整心跳的时间点后移至所述第二心跳的时间点上,获得所述已 调整心 ϋ 。
结合第四方面或第四方面的第一种可能的实现方式至第四方面的第五种 可能的实现方式, 在第六种可能的实现方式中, 所述处理器还用于, 在获取应 用程序的网络保持时间段之前, 检测统一心跳系统是否已启动; 当检测到所述统一心跳系统已启动时,执行获取所述应用程序的网络保持 时间段步骤。
本发明实施例通过获取应用程序的网络保持时间段和应用程序的初始心 跳,根据网络保持时间段和初始心跳获取应用程序的待调整心跳, 进而获取预 置的统一心跳, 并根据统一心跳对待调整心跳进行调整, 获得已调整心跳, 这 可使得终端可根据应用程序的业务需要对应用程序的心跳进行灵活调整 ,将正 在运行的应用程序的心跳的位置调整到统一心跳的位置上, 提高用户的体验 度, 并降低耗能。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例中所需要使用的附图作简单地介绍,显而易见地, 下面描述中的附图仅仅是 本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的 前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例提供的一种心跳的调整方法的流程示意图; 图 2为本发明实施例提供的一种心跳的调整方法的流程示意图; 图 3为本发明实施例提供的应用程序的心跳前移时间轴时序图; 图 4为本发明实施例提供的应用程序的心跳后移时间轴时序图; 图 5为本发明实施例提供的一种装置的结构示意图;
图 6为本发明实施例提供的一种装置的结构示意图;
图 7为本发明实施例提供的一种装置的结构示意图;
图 8为本发明实施例提供的一种终端的结构示意图。 具体实施方式
下面将结合本发明实施例中的附图 ,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
在本发明实施例中, 执行主体可以是手机、 平板电脑和笔记本等终端。 一 一 请参照图 1 , 为本发明一种心跳的调整方法的一种实施例流程示意图。 如 图 1所示, 本实施例所述的一种心跳的调整方法可包括步骤:
S100, 获取应用程序的网络保持时间段。
在本发明实施例中,网络保持时间段可以是应用程序的业务的最长在线时 间, 即可以是, 应用程序在上个数据交互后, 应用程序在网络保持时间段内, 应用程序都可以进行业务数据通讯,当离上个数据交互的时间的时间间隔超过 网络保持时间段时, 则网络会被运营商或业务搖断。 例如: 在终端待机时, 当 应用程序的业务要求的心跳的时间间隔为网络保持时间段, 4叚设为 a, a > 0, 在上个心跳进行数据交互后,在此时间间隔内都可以进行业务数据通讯,保证 应用程序的实时在线。但当应用程序设置的心跳的时间间隔大于网络保持时间 段时, 假设为 b, b > a, 在上个心跳进行业务数据交互后, 由于下个心跳与上 个心跳的时间间隔大于网络保持时间段, 当在下个心跳时应用程序被唤醒时, 应用程序的业务可能已丟失, 或网络可能已被运营商或业务掐断。 其中, 心跳 可以是对应用程序进行唤醒的定时器,每个定时器对应一个时间点, 当终端计 时时间流逝到定时器对应的时间点时, 定时器将触发, 终端可以对应用程序进 行唤醒, 以完成应用程序的一些业务交互。 即我们可以理解的是, 定时器类似 人或生物的生理性心跳, 可以每隔一段时间进行触发唤醒应用程序一次, 来进 行数据交互, 并可判断终端的 "存活"。 故本领域的技术人员可以将所述唤醒 应用程序进行数据交互的定时器称之为心跳。
在本发明实施例中,终端可通过预置的步进算法或者二等分等算法来获取 应用程序的网络保持时间段。例如: 当终端釆用步进算法进行计算应用程序的 网络保持时间段时, 终端可预设步进值, 例如预设 0.5min (分钟), 具体预设 值可根据用户所需的精度进行调整, 终端可先设定时间间隔为 2min的心跳, 当终端判断在 2min内都可以进行业务数据通讯, 终端可根据预设的步进值设 定时间间隔为 2.5min的心跳, 当终端判断在 2.5min内仍可以进行业务数据通 讯, 终端可再进行调整心跳的时间间隔, 直至终端判断在某个时间段(例如 lOmin ) 内业务数据通信无法保存连续性, 则终端可获取这个时间段, 并将这 个时间段减去步进值, 获得该应用程序的网络保持时间段, 例如: 1 Omin-0.5min=9.5min , 则 9.5min为应用程序的网络保持时间段。 - - 进一步的,在本发明实施例中, 在获取应用程序的网络保持时间段之前, 终端可先检测是否进行获取并调整应用程序的心跳。例如: 终端可检测终端是 否待机, 并当终端待机时获取应用程序的网络保持时间段; 或者终端可检测是 否接收到获取应用程序的网络保持时间段的启动指令, 并当接收到启动指令 时, 获取应用程序的网络保持时间段。 其中, 启动指令可以是用户对终端操作 生成的启动指令。
优选的, 在本发明实施例中, 终端可以预置统一心跳系统。 当终端待机时 或接收到获取应用程序的网络保持时间段的启动指令时,终端将启动统一心跳 系统。则终端可检测终端是否待机或是否接收到启动指令来判断统一系统是否 已启动。 当终端检测到启动统一心跳系统时, 终端获取应用程序的网络保持时 间段。 其中, 所述统一心跳系统可以是一个应用, 或者一段程序代码, 用于指 示所述终端启用统一心跳以对应用程序的心跳进行调整。统一心跳系统可预置 至少一个统一心跳, 优选的, 统一心跳可以是周期心跳, 即相邻的统一心跳的 时间间隔相同,在连续的统一心跳中, 一个心跳与前面或后面相互邻近的心跳 称为相邻的心跳。 具体的, 统一心跳可以是对终端进行唤醒的定时器, 每个定 时器对应一个时间点,当终端计时时间流逝到定时器的时间点时,定时器触发, 系统对终端进行唤醒。我们可以理解的是, 统一心跳系统可用于根据预置的统 一心跳将终端正在运行的应用程序的心跳调整到统一心跳的位置上,以使应用 程序服从统一心跳进行触发唤醒, 降低终端的能耗。 进一步的, 当统一心跳系 统将应用程序的心跳调整到与统一心跳一致后, 并当统一心跳触发时, 系统在 唤醒终端的时间点上同时唤醒应用程序。其中, 终端可接收用户对终端操作生 成的启动指令启动统一心跳系统;或者是当终端检测到终端处于待机或黑屏场 景时, 终端启动统一心跳系统; 对此本发明实施例不做限定。
在本发明实施例的具体应用中, 当终端启动统一心跳系统时, 终端可告知 统一心跳系统暂时不调整应用程序的心跳 ,终端计算获取应用程序的网络保持 时间段。
进一步的,在具体应用中, 统一心跳系统可预置与应用程序和终端交互的 接口。 当终端启动统一心跳系统后, 终端可调用统一心跳系统的接口向统一心 跳系统反射、广播或通过其他交互信号手段发送控制指令,告知统一心跳系统 - - 暂时不对应用程序的心跳进行调整。 当统一心跳系统接收到控制指令时, 统一 心跳系统响应该控制指令, 不对应用程序的心跳进行调整, 此时终端可进入协 调期, 终端获取应用程序的网络保持时间段。
5101 ,获取所述应用程序的初始心跳,根据所述网络保持时间段和所述初 始心跳获取应用程序的待调整心跳。
在本发明实施例中,初始心跳可以是在终端待机后, 或者接收到启动指令 后的应用程序的第一个心跳,优选的,初始心跳还可以是终端在启动统一心跳 系统后的应用程序的第一个心跳。 其中, 终端可预设应用程序的初始心跳。 具 体的, 终端可预设一个时间点作为应用程序的初始心跳的时间点, 进而获得初 始心跳。优选的,终端还可预设当前时间点作为应用程序的初始心跳的时间点, 从而获得初始心跳,或者终端可将预置的统一心跳中的任意一个统一心跳作为 初始心跳。
进一步的, 终端可根据网络保持时间段获取和初始心跳获得待调整心跳, 其中, 待调整心跳与初始心跳的时间间隔可以为网络保持时间段。 例如: 当终 端预设的应用程序的初始心跳的时间点为 00:00min ,应用程序的网络保持时间 段为 7min, 则应用程序的待调整心跳的时间点为 00:07min。
5102,获取预置的至少一个统一心跳,根据所述统一心跳对所述待调整心 跳进行调整, 获得已调整心跳, 其中, 所述已调整心跳与所述至少一个统一心 跳中的统一心跳重合。
终端可获取预置的至少一个统一心跳。优选的,统一心跳可以是周期心跳, 即相邻的统一心跳的时间间隔相同。具体的, 统一心跳可以是对终端进行唤醒 的定时器,每个定时器对应一个时间点, 当终端计时时间流逝到定时器的时间 点时, 定时器触发, 系统对终端进行唤醒。 其中, 终端、 统一心跳、 以上实施 例所述的初始心跳和以上实施例所述的心跳共用一个时间轴。
在具体应用中, 当终端预置统一心跳系统时, 统一心跳系统可预置至少一 个统一心跳, 终端可获取统一心跳系统预置的至少一个统一心跳。
在本发明实施例中, 终端可获取连续的统一心跳, 并根据统一心跳对所述 待调整心跳进行调整, 获得已调整心跳。
可选地, 终端可对待调整心跳的时间点进行前移处理, 获得已调整心跳。 - - 其中, 对待调整心跳的时间点进行前移处理, 获得已调整心跳可包括: 终端在 统一心跳、初始心跳和心跳共用的时间轴上,在统一心跳中获取与待调整心跳 的时间间隔最小的第一心跳,且第一心跳的时间点早于或等于待调整心跳的时 间点。 当获取到第一心跳后, 可在时间轴上, 将待调整心跳的位置向前移动, 前移至第一心跳的位置上, 获得已调整心跳, 即是, 将待调整心跳的时间点前 移至第一心跳的时间点上, 以使待调整心跳与统一心跳中的第一心跳重合。
可选地,终端还可对待调整心跳的时间点进行后移处理,获得已调整心跳。 其中, 对待调整心跳的时间点进行后移处理, 获得已调整心跳可包括: 终端在 统一心跳、初始心跳和心跳共用的时间轴上,在统一心跳中获取与待调整心跳 的时间间隔最小的第二心跳,且第二心跳的时间点晚于或等于待调整心跳的时 间点。 当获取到第二心跳后, 可在时间轴上, 将待调整心跳的位置向后移动, 后移至第二心跳的位置上, 获得已调整心跳, 即是, 将待调整心跳的时间点后 移至第二心跳的时间点, 以使待调整心跳与统一心跳中的第二心跳重合。
可选地, 终端还可对待调整心跳不进行调整。
在本发明实施例中,本发明通过获取应用程序的网络保持时间段和应用程 序的初始心跳, 根据网络保持时间段和初始心跳获取应用程序的待调整心跳, 进而获取预置的统一心跳,根据统一心跳对待调整心跳进行调整, 获得已调整 心跳, 这可以使得终端可对应用程序的心跳进行调整,将正在运行的应用程序 的心跳的位置调整到统一心跳的位置上,以使应用程序服从统一心跳进行触发 唤醒, 降低终端的能耗。
请参照图 2, 为本发明一种心跳的调整方法的另一种实施例流程示意图。 如图 2所示, 本实施例所述的一种心跳的调整方法可包括步骤:
5200, 获取应用程序的网络保持时间段。
5201 ,获取所述应用程序的业务参数,根据所述业务参数制定所述应用程 序的心跳的调整策略。
在本发明实施例中,在获取应用程序的业务参数,根据所述业务参数制定 所述应用程序的心跳的调整策略之前, 终端还获取预置的至少一个统一心跳, 其中, 统一心跳可以是周期心跳, 即相邻的统一心跳的时间间隔相同。 进一步 的, 当终端获取到连续的统一心跳后, 终端可获取相邻统一心跳的第一时间间 - - 隔。 进一步, 由于统一心跳是周期性心跳, 则相邻心跳的第一时间间隔可为统 一心跳的周期时间段。
进一步的, 当终端获取到相邻心跳的第一时间间隔, 终端可判断网络保持 时间段是否大于第一时间间隔, 并当网络保持时间段大于第一时间间隔时,执 行获取应用程序的业务参数,根据所述业务参数制定所述应用程序的心跳的调 整策略步骤。 其中, 当网络保持时间段小于或等于第一时间间隔时, 停止执行 本发明步骤。
进一步的, 在本发明实施例中, 业务参数包括应用程序中的业务类型, 业 务名称和业务的实时性要求等级等参数,终端可根据业务参数来判断应用程序 的业务是否可以被搖断或可以不能有效传达。
在具体应用中, 例如: 当应用程序是即时通信软件时, 则即时通信软件的 业务类型是即时通信, 由于是即时通信类的软件, 即时生成的信息需要及时的 传达, 否则影响用户体验度, 故业务的实时性要求等级可为高。 即我们可以理 解的是, 即时通信软件的心跳间隔不能超过网络保持时间段, 业务不可以被搖 断或不能有效传达。 当应用程序是邮箱软件时, 则邮箱软件的业务类型可以是 邮箱, 由于是邮箱软件类型, 即时生成的信息不需及时的传达, 可等待下一次 触发时发送,故我们可以理解的是, 邮箱软件的心跳间隔是可以超过网络保持 时间段, 业务可以被搖断, 延迟传输。 进一步的, 还有部分应用程序在某段时 间是不可以允许心跳间隔超过网络保持时间段,但在另一段时间内又是可以允 许心跳间隔超过网络保持时间段, 具体的, 可根据业务参数进行判断应用程序 是否允许心跳间隔超过网络保持时间段。进一步的,还有部分应用程序可允许 心跳不进行调整, 例如: 当应用程序是抢拍类软件时, 由于抢拍类软件是根据 商品上架后的响应时间的快慢来获得商品的,故生成的信息可根据应用程序的 心跳进行, 不需进行调整, 故可以理解的是, 抢拍类的软件的心跳可不进行调 整。
进一步的,终端可根据业务参数判断应用程序是否允许心跳间隔超过网络 保持时间段来制定调整策略。 其中, 当终端内置有多个应用程序时, 终端可根 据多个应用程序的业务参数判断各个应用程序是否允许心跳间隔超过各个应 用对应的网络保持时间段来制定各个应用程序对应调整策略。其中, 终端还可 - - 根据业务参数判断应用程序可以不进行调整时来制定对应策略。
在本发明实施例中,调整策略用于指示待调整心跳的调整方向, 所述调整 方向包括前移调整方向、 后移调整方向和不调整中的任一种。
具体的, 当应用程序允许心跳间隔超过网络保持时间段时,调整策略可用 于指示应用程序的待调整心跳的后移调整方向,当应用程序不允许心跳间隔超 过网络保持时间段时,调整策略可用于指示应用程序的待调整心跳的前移调整 方向。 当应用程序允许心跳不进行调整时,调整策略可用于指示应用程序的待 调整心跳的不调整。
进一步优选的, 在当业务需要时, 终端可进行重新制定调整策略, 例如: 如终端在 GPRS ( General Packet Radio Service, 通用分组无线服务技术) 网络 下, 即时通信的应用程序的网络保持时间段为 10分钟,切换到 WIFI ( Wireless Fidelity, 无线保真)网络后, 终端发现即时通信的应用经常断线, 则终端可对 该应用程序进行重新制定调整策略。
在具体应用中,在终端启动统一心跳系统下, 终端获取应用程序的业务参 数,根据所述业务参数制定所述应用程序的心跳的调整策略时, 统一心跳管理 系统仍然不对应用程序的心跳进行调整, 其中, 此时终端仍可处于协调期中。 具体的,终端在制定应用程序的调整策略的时间可控并在整个调整心跳的过程 中调整时间可以被忽略。
5202,获取应用程序的初始心跳,根据所述网络保持时间段和所述初始心 跳获取应用程序的待调整心跳。
5203 ,获取预置的至少一个统一心跳,根据所述统一心跳和所述调整策略 对所述待调整心跳进行调整, 获得已调整心跳。
在本发明实施例中, 终端可获取连续的统一心跳, 并根据统一心跳和调整 策略对所述待调整心跳进行调整, 获得已调整心跳。
可选的, 当调整策略用于指示所述待调整心跳的前移调整方向时, 终端对 待调整心跳的时间点进行前移处理, 获得已调整心跳。 其中, 对待调整心跳的 时间点进行前移处理, 获得已调整心跳可包括: 终端在统一心跳、 初始心跳和 心跳共用的时间轴上,在统一心跳中获取与待调整心跳的时间间隔最小的第一 心跳,且第一心跳的时间点早于或等于待调整心跳的时间点。 当获取到第一心 - - 跳后, 可在时间轴上, 将待调整心跳的位置向前移动, 前移至第一心跳的位置 上, 获得已调整心跳, 即是, 将待调整心跳的时间点前移至第一心跳的时间点 上, 以使待调整心跳与统一心跳中的第一心跳重合。
具体的,请参见图 3的应用程序的心跳前移时间轴时序图。 图 3为终端中 的一个应用程序的待调整心跳在时间轴上的时序图和统一心跳在时间轴上的 时序图。 如图 3所示, 虚线箭头代表周期性出现的统一心跳, 实线箭头代表应 用程序的待调整心跳, 如图 3所示, 应用程序的初始心跳为 00:00min, 统一心 跳的周期为 5min,应用程序的网络保持时间段为 8min。则我们可以获得的是, 应用程序的待调整心跳的时间点为 00:08min。故终端可以根据待调整心跳在统 一心跳上获得与待调整心跳的时间间隔最小且心跳的时间点早于待调整心跳 的时间点的统一心跳是 00:05min上的第一心跳。 则终端可将待调整心跳的位 置如图 3所示的箭头方向向前调整, 前移至第一心跳的位置上, 即可将待调整 心兆的时间点 00:08min更改为 00: 05min, 更改时间点后的待调整心兆为已 调整心跳, 且已调整心跳与统一心跳周期的 00:05min上的第一心跳重合, 并 与初始心跳的时间间隔为 5min, 小于网络保持时间段, 有效保证的应用程序 的业务的有效性。
可选的, 当调整策略用于指示待调整心跳的后移调整方向时,对待调整心 跳的时间点进行后移处理, 获得已调整心跳。 其中, 对待调整心跳的时间点进 行后移处理, 获得已调整心跳可包括: 终端在统一心跳、 初始心跳和心跳共用 的时间轴上,在统一心跳中获取与待调整心跳的时间间隔最小的第二心跳,且 第二心跳的时间点晚于或等于待调整心跳的时间点。 当获取到第二心跳后, 可 在时间轴上, 将待调整心跳的位置向后移动, 后移至第二心跳的位置上, 获得 已调整心跳, 即是, 将待调整心跳的时间点后移至第二心跳的时间点, 以使待 调整心跳与统一心跳中的第二心跳重合。
具体的,请参见图 4的应用程序的心跳后移时间轴时序图。 图 4为终端中 的一个应用程序的待调整心跳在时间轴上的时序图和统一心跳在时间轴上的 时序图。 如图 4所示, 虚线箭头代表周期性出现的统一心跳, 实线箭头代表应 用程序的待调整心跳, 如图 4所示, 应用程序的初始心跳为 00:00min, 统一心 跳的周期为 5min,应用程序的网络保持时间段为 9min。则我们可以获得的是, - - 应用程序的待调整心跳的时间点为 00:09min。故终端可以根据待调整心跳在统 一心跳上获得与待调整心跳的时间间隔最小且心跳的时间点晚于或等于待调 整心跳的时间点的统一心跳是 00: 10min上的第二心跳。 则终端可将待调整心 跳位置如图 4所示的箭头方向向后移动,后移至第二心跳位置上, 即可将待调 整心兆的时间点 00:09min更改为 00: lOmin, 更改时间点后的待调整心兆为 已调整心跳, 则已调整心跳与统一心跳中的 00: 10min上的第二心跳重合。
进一步优选的, 当调整策略包括用于指示待调整心跳的不调整时, 不对待 调整心跳进行调整。
在本发明实施例中, 当终端获得已调整心跳时, 终端保存获得的已调整心 跳, 并可将该已调整心跳作为新的初始心跳, 以使终端根据该新的初始心跳和 网络保持时间段获取下一个待调整心跳,并执行根据统一心跳对待调整心跳进 行调整, 获得已调整心跳。 其中, 该步骤可重复执行, 直至接收到用户操作生 成的退出的指令停止操作。
具体的, 当终端获得的调整策略用于指示待调整心跳的前移调整方向时, 参见图 3 , 应用程序的网络保持时间段是 8min , 当终端获得应用程序的 00:05min上的已调整心跳后, 终端保存所述已调整心跳, 并可将该 00:05min 上的已调整心跳设为新的初始心跳,从而终端获得应用程序的另一个待调整心 跳为 00: 13min。 故, 终端可再根据调整策略用于指示待调整心跳的前移调整 方向, 对 00: 13min上的待调整心跳可参见如图 3所示的箭头方向进行调整, 即可将待调整心跳的时间 00: 13min更改为 00: 10min。 由上我们可以理解的 是, 当终端获得应用程序的已调整心跳后, 终端可将该已调整心跳作为新的初 始心跳,根据网络保持时间获得应用程序的下一个待调整心跳, 进而再根据统 一心跳和调整策略对待调整心跳进行调整, 获得已调整心跳, 终端可不断重复 此过程, 直至接收到用户操作生成的退出的指令停止操作。
具体的, 当终端获得的调整策略用于指示待调整心跳的后移调整方向时, 参见图 4 , 应用程序的网络保持时间段是 9min。 当终端获得应用程序的 00: 10min上的已调整心跳后, 终端保存所述已调整心跳, 并可将该 00: 10min 上的已调整心跳设为新的初始心跳,从而终端获得应用程序的下一个的待调整 心跳为 00: 19min。 故, 终端可再根据调整策略用于指示所述待调整心跳的后 - - 移调整方向,将 00: 19min上的待调整心跳可参见如图 4所示的箭头方向进行 调整, 将待调整心跳的时间 :00: 19min更改为 00: 20min。 由上我们可以理解 的是, 当终端获得应用程序的已调整心跳后, 终端可将该已调整心跳作为新的 初始心跳,根据网络保持时间获得应用程序的下一个待调整心跳, 进而再根据 统一心跳和调整策略对待调整心跳进行调整, 获得已调整心跳, 终端可不断重 复此过程, 直至接收到用户操作生成的退出的指令停止操作。
在具体的应用中, 当终端在统一心跳系统下, 并在协调期获得应用程序的 调整策略后, 终端可退出协调期, 并获取应用程序的心跳, 调用统一心跳系统 的接口,将应用程序的调整策略和应用程序的心跳发送给统一心跳系统, 以使 统一心跳系统根据调整策略对终端获得的应用程序的心跳进行延迟或推前调 整, 此时终端进入运行期。
进一步的, 在本发明实施例中, 当终端获取到应用程序的已调整心跳后, 终端保存已调整心跳, 以使应用程序根据所述已调整心跳进行触发。
在本发明实施例中, 当终端退出统一心跳系统时, 或者终端不处于待机的 场景时, 终端无需对应用程序进行相关调整, 应用程序即可正常使用。
在本发明实施例中,步骤 S200和步骤 S202可以参照以上实施例中的步骤 S100和步骤 S101 , 在此不再进行赘述。
在本发明实施例中 ,本发明通过获取应用程序的网络保持时间段和应用程 序业务参数,根据业务参数制定应用程序的心跳的调整策略, 进而获取应用程 序的初始心跳, 根据网络保持时间段和初始心跳获取应用程序的待调整心跳, 最后获取预置的统一心跳, 根据统一心跳和调整策略对待调整心跳进行调整, 获得已调整心跳,这可以使得终端可根据调整策略对应用程序的心跳进行灵活 调整, 提高用户的体验度, 并降低耗能。
为便于更好的实施本发明实施例的上述方案,下面还提供用于配合实施上 述方案的相关装置。
请参照图 5 , 为本发明实施例提供的一种装置。 其中, 如图 5所示, 本实 施例所述的一种装置可包括:
第一获取单元 100, 用于获取应用程序的网络保持时间段。
第二获取单元 200, 用于获取所述应用程序的初始心跳, 根据所述网络保 - - 持时间段和所述初始心跳获取所述应用程序的待调整心跳。
调整单元 300, 用于获取预置的至少一个统一心跳, 根据所述统一心跳对 所述待调整心跳进行调整, 获得已调整心跳, 其中, 所述已调整心跳与所述至 少一个统一心跳中的统一心跳重合。
其中, 所述装置还包括:
制定单元 400 , 用于在所述第一获取单元获取应用程序的网络保持时间段 之后, 获取所述应用程序的业务参数,根据所述业务参数制定所述应用程序的 心跳的调整策略, 其中, 所述调整策略用于指示所述待调整心跳的调整方向, 所述调整方向包括前移调整方向、 后移调整方向和不调整中的任一种;
所述调整单元 300具体用于,根据所述统一心跳和所述调整策略对所述待 调整心跳进行调整, 获得已调整心跳。
所述装置还包括:
第三获取单元 500, 用于在所述制定单元根据所述业务参数制定所述应用 程序的心跳的调整策略之前, 获取预置的统一心跳,在所述统一心跳中获取相 邻统一心跳的第一时间间隔;
判断单元 600 , 用于判断所述网络保持时间段是否大于所述第一时间间 隔;
所述制定单元 400具体用于,当所述判断单元 600判断所述网络保持时间 段大于所述第一时间间隔时, 获取所述应用程序的业务参数,根据所述业务参 数制定所述应用程序的心跳的调整策略。
其中,所述待调整心跳与所述初始心跳的时间间隔为所述应用程序的网络 保持时间段。
请参照图 6, 为本发明实施例提供的一种装置。 其中, 如图 6所示, 本实 施例所述的一种装置可包括: 第一获取单元 100、 第二获取单元 200、 调整单 元 300、 制定单元 400、 第三获取单元 500、 判断单元 600和检测单元 700。
其中, 所述调整单元 300包括:
第一获取子单元 10, 用于当所述调整策略用于指示所述待调整心跳的前 移调整方向时,在所述统一心跳中获取与所述待调整心跳的时间间隔最小的第 一心跳, 且所述第一心跳的时间点早于或等于所述待调整心跳的时间点; - - 前移调整子单元 20, 用于将所述待调整心跳的时间点前移至所述第一心 跳的时间点上, 获得所述已调整心跳。
其中, 所述装置还包括:
检测单元 700 , 用于在获取应用程序的网络保持时间段之前, 检测统一心 跳系统是否已启动;
所述第一获取单元 100具体用于,当所述检测单元 700检测到所述统一心 跳系统已启动时, 获取所述应用程序的网络保持时间段。
可以理解的是,本实施例的装置的各功能模块的功能可根据上述方法实施 例中的方法具体实现, 其具体实现过程可以参照上述方法实施例的相关描述, 此处不再进行赘述。
在本发明实施例中 ,本发明实施例通过获取应用程序的网络保持时间段和 应用程序的初始心跳,根据网络保持时间段和初始心跳获取应用程序的待调整 心跳, 进而获取预置的统一心跳, 并根据统一心跳对待调整心跳进行调整, 获 得已调整心跳,这可使得装置可根据应用程序的业务需要对应用程序的心跳进 行灵活调整, 将正在运行的应用程序的心跳的位置调整到统一心跳的位置上, 提高用户的体验度, 并降低耗能。
请参照图 7 , 为本发明实施例提供的一种装置。 其中, 如图 7所示, 本实 施例所述的一种装置可包括: 第一获取单元 100、 第二获取单元 200、 调整单 元 300、 制定单元 400、 第三获取单元 500、 判断单元 600和检测单元 700。
其中, 所述调整单元 300包括:
第二获取子单元 30, 用于当所述调整策略用于指示所述待调整心跳的后 移调整方向时,在所述统一心跳周期中获取与所述待调整心跳的时间间隔最小 的第二心跳, 且所述第二心跳的时间点晚于或等于所述待调整心跳的时间点。
后移调整子单元 40, 用于将所述待调整心跳的时间点后移至所述第二心 跳的时间点上, 获得所述已调整心跳。
可以理解的是,本实施例的装置的各功能模块的功能可根据上述方法实施 例中的方法具体实现, 其具体实现过程可以参照上述方法实施例的相关描述, 此处不再进行赘述。
在本发明实施例中 ,本发明实施例通过获取应用程序的网络保持时间段和 - - 应用程序的初始心跳,根据网络保持时间段和初始心跳获取应用程序的待调整 心跳, 进而获取预置的统一心跳, 并根据统一心跳对待调整心跳进行调整, 获 得已调整心跳,这可使得装置可根据应用程序的业务需要对应用程序的心跳进 行灵活调整, 将正在运行的应用程序的心跳的位置调整到统一心跳的位置上, 提高用户的体验度, 并降低耗能。
请参见图 8,为本发明实施例提供的一种终端的结构示意图。如图 8所示, 本实施例所述的终端可包括:
处理器 201 (终端中的处理器 201的数量可以一个或多个, 图 8以一个处 理器为例)和存储器 202。 在本发明的实施例中, 处理器 201和存储器 202可 通过总线或其它方式连接, 其中, 图 8中以通过总线连接为例。
其中, 处理器 201执行如下步骤:
获取应用程序的网络保持时间段;
获取所述应用程序的初始心跳,根据所述网络保持时间段和所述初始心跳 获取所述应用程序的待调整心跳;
获取预置的至少一个统一心跳 ,根据所述统一心跳对所述待调整心跳进行 调整, 获得已调整心跳, 其中, 所述已调整心跳与所述至少一个统一心跳中的 统一' G跳重合。
其中, 处理器 201还用于, 在获取应用程序的网络保持时间段之后, 获取 所述应用程序的业务参数,根据所述业务参数制定所述应用程序的心跳的调整 策略, 其中, 所述调整策略用于指示所述待调整心跳的调整方向, 所述调整方 向包括前移调整方向、 后移调整方向和不调整中的任一种;
所述处理器 201根据所述统一心跳对所述待调整心跳进行调整,获得已调 整心跳包括: 根据所述统一心跳和所述调整策略对所述待调整心跳进行调整, 获得已调整心跳。
其中, 所述处理器 201还用于, 在获取所述应用程序的业务参数, 根据所 述业务参数制定所述应用程序的心跳的调整策略之前, 获取预置的统一心跳, 在所述统一心跳中获取相邻统一心跳的第一时间间隔;
判断所述网络保持时间段是否大于所述第一时间间隔;
当所述网络保持时间段大于所述第一时间间隔时,执行所述获取所述应用 - - 程序的业务参数, 根据所述业务参数制定所述应用程序的心跳的调整策略。
其中,所述待调整心跳与所述初始心跳的时间间隔为所述应用程序的网络 保持时间段。
其中 ,所述处理器 201根据所述统一心跳和所述调整策略对所述待调整心 跳进行调整, 获得已调整心跳包括:
当所述调整策略用于指示所述待调整心跳的前移调整方向时,在所述统一 心跳中获取与所述待调整心跳的时间间隔最小的第一心跳,且所述第一心跳的 时间点早于或等于所述待调整心跳的时间点;
将所述待调整心跳的时间点前移至所述第一心跳的时间点上,获得所述已 调整心跳。
其中 ,所述处理器 201根据所述统一心跳和所述调整策略对所述待调整心 跳进行调整, 获得已调整心跳包括:
当所述调整策略用于指示所述待调整心跳的后移调整方向时,在所述统一 心跳周期中获取与所述待调整心跳的时间间隔最小的第二心跳,且所述第二心 跳的时间点晚于或等于所述待调整心跳的时间点;
将所述待调整心跳的时间点后移至所述第二心跳的时间点上,获得所述已 调整心 ϋ 。
其中, 所述处理器 201还用于, 在获取应用程序的网络保持时间段之前, 检测统一心跳系统是否已启动;
当检测到所述统一心跳系统已启动时,执行获取所述应用程序的网络保持 时间段步骤。
可以理解的是,本实施例的终端的各功能模块的功能可根据上述方法实施 例中的方法具体实现, 其具体实现过程可以参照上述方法实施例的相关描述, 此处不再进行赘述。
由上可见,在本发明的一些可行的实施方式中, 本发明实施例通过获取应 用程序的网络保持时间段和应用程序的初始心跳,根据网络保持时间段和初始 心跳获取应用程序的待调整心跳, 进而获取预置的统一心跳, 并根据统一心跳 对待调整心跳进行调整, 获得已调整心跳, 这可使得装置可根据应用程序的业 务需要对应用程序的心跳进行灵活调整,将正在运行的应用程序的心跳的位置 - - 调整到统一心跳的位置上, 提高用户的体验度, 并降低耗能。
需要说明的是, 对于前述的各方法实施例, 为了简单描述, 故将其都表述 为一系列的动作组合,但是本领域技术人员应该知悉, 本发明并不受所描述的 动作顺序的限制,因为依据本发明,某些步骤可以釆用其他顺序或者同时进行。 其次, 本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施 例, 所涉及的动作和模块并不一定是本发明所必须的。
在上述实施例中,对各个实施例的描述都各有侧重, 某个实施例中没有详 述的部分, 可以参见其他实施例的相关描述。
综上,在本发明的一些实施例中, 本发明实施例通过获取应用程序的网络 保持时间段和应用程序的初始心跳,根据网络保持时间段和初始心跳获取应用 程序的待调整心跳, 进而获取预置的统一心跳, 并根据统一心跳对待调整心跳 进行调整, 获得已调整心跳, 这可使得装置可根据应用程序的业务需要对应用 程序的心跳进行灵活调整,将正在运行的应用程序的心跳的位置调整到统一心 跳的位置上, 提高用户的体验度, 并降低耗能。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程, 是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算 机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。 其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory, ROM )或随机存储记忆体(Random Access Memory, RAM )等。
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之 权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。

Claims

权 利 要 求
1、 一种心跳的调整方法, 其特征在于, 所述方法包括:
获取应用程序的网络保持时间段;
获取所述应用程序的初始心跳,根据所述网络保持时间段和所述初始心跳 获取所述应用程序的待调整心跳;
获取预置的至少一个统一心跳,根据所述统一心跳对所述待调整心跳进行 调整, 获得已调整心跳, 其中, 所述已调整心跳与所述至少一个统一心跳中的 统一' G跳重合。
2、 如权利要求 1所述的方法, 其特征在于, 所述获取应用程序的网络保 持时间段之后包括:
获取所述应用程序的业务参数,根据所述业务参数制定所述应用程序的心 跳的调整策略, 其中, 所述调整策略用于指示所述待调整心跳的调整方向, 所 述调整方向包括前移调整方向、 后移调整方向和不调整中的任一种;
所述根据所述统一心跳对所述待调整心跳进行调整, 获得已调整心跳包 括:
根据所述统一心跳和所述调整策略对所述待调整心跳进行调整,获得已调 整心跳。
3、 如权利要求 2所述的方法, 其特征在于, 所述获取所述应用程序的业 务参数, 根据所述业务参数制定所述应用程序的心跳的调整策略之前包括: 获取预置的统一心跳,在所述统一心跳中获取相邻统一心跳的第一时间间 隔;
判断所述网络保持时间段是否大于所述第一时间间隔;
当所述网络保持时间段大于所述第一时间间隔时,执行所述获取所述应用 程序的业务参数, 根据所述业务参数制定所述应用程序的心跳的调整策略。
4、 如权利要求 2或 3所述的方法, 其特征在于, 所述待调整心跳与所述 初始心跳的时间间隔为所述应用程序的网络保持时间段。
5、 如权利要求 2-4任一项所述的方法, 其特征在于, 所述根据所述统一 心跳和所述调整策略对所述待调整心跳进行调整, 获得已调整心跳包括: 当所述调整策略用于指示所述待调整心跳的前移调整方向时,在所述统一 心跳中获取与所述待调整心跳的时间间隔最小的第一心跳,且所述第一心跳的 时间点早于或等于所述待调整心跳的时间点;
将所述待调整心跳的时间点前移至所述第一心跳的时间点上,获得所述已 调整心 ϋ 。
6、 如权利要求 2-4任一项所述的方法, 其特征在于, 所述根据所述统一 心跳和所述调整策略对所述待调整心跳进行调整, 获得已调整心跳包括: 当所述调整策略用于指示所述待调整心跳的后移调整方向时,在所述统一 心跳周期中获取与所述待调整心跳的时间间隔最小的第二心跳 ,且所述第二心 跳的时间点晚于或等于所述待调整心跳的时间点;
将所述待调整心跳的时间点后移至所述第二心跳的时间点上,获得所述已 调整心 ϋ 。
7、 如权利要求 1-6任一项所述的方法, 其特征在于, 所述获取应用程序 的网络保持时间段之前包括:
检测统一心跳系统是否已启动;
当检测到所述统一心跳系统已启动时,执行获取所述应用程序的网络保持 时间段步骤。
8、 一种装置, 其特征在于, 所述装置包括:
第一获取单元, 用于获取应用程序的网络保持时间段;
第二获取单元, 用于获取所述应用程序的初始心跳,根据所述网络保持时 间段和所述初始心跳获取所述应用程序的待调整心跳;
调整单元, 用于获取预置的至少一个统一心跳,根据所述统一心跳对所述 待调整心跳进行调整, 获得已调整心跳, 其中, 所述已调整心跳与所述至少一 个统一心跳中的统一心跳重合。
9、 如权利要求 8所述的装置, 其特征在于, 所述装置还包括:
制定单元, 用于在所述第一获取单元获取应用程序的网络保持时间段之 后, 获取所述应用程序的业务参数,根据所述业务参数制定所述应用程序的心 跳的调整策略, 其中, 所述调整策略用于指示所述待调整心跳的调整方向, 所 述调整方向包括前移调整方向、 后移调整方向和不调整中的任一种;
所述调整单元具体用于,根据所述统一心跳和所述调整策略对所述待调整 心跳进行调整, 获得已调整心跳。
10、 如权利要求 9所述的装置, 其特征在于, 所述装置还包括: 第三获取单元,用于在所述制定单元根据所述业务参数制定所述应用程序 的心跳的调整策略之前, 获取预置的统一心跳,在所述统一心跳中获取相邻统 一心跳的第一时间间隔;
判断单元, 用于判断所述网络保持时间段是否大于所述第一时间间隔; 所述制定单元具体用于,当所述判断单元判断所述网络保持时间段大于所 述第一时间间隔时, 获取所述应用程序的业务参数,根据所述业务参数制定所 述应用程序的心跳的调整策略。
11、 如权利要求 9或 10所述的装置, 其特征在于, 所述待调整心跳与所 述初始心跳的时间间隔为所述应用程序的网络保持时间段。
12、 如权利要求 9-11任一项所述的装置, 其特征在于, 所述调整单元包 括:
第一获取子单元,用于当所述调整策略用于指示所述待调整心跳的前移调 整方向时,在所述统一心跳中获取与所述待调整心跳的时间间隔最小的第一心 跳, 且所述第一心跳的时间点早于或等于所述待调整心跳的时间点;
前移调整子单元,用于将所述待调整心跳的时间点前移至所述第一心跳的 时间点上, 获得所述已调整心跳。
13、 如权利要求 9-11任一项所述的方法, 其特征在于, 所述调整单元包 括:
第二获取子单元,用于当所述调整策略用于指示所述待调整心跳的后移调 整方向时,在所述统一心跳周期中获取与所述待调整心跳的时间间隔最小的第 二心跳, 且所述第二心跳的时间点晚于或等于所述待调整心跳的时间点;
后移调整子单元,用于将所述待调整心跳的时间点后移至所述第二心跳的 时间点上, 获得所述已调整心跳。
14、 如权利要求 8-14任一项所述的装置, 其特征在于, 所述装置还包括: 检测单元, 用于在获取应用程序的网络保持时间段之前,检测统一心跳系 统是否已启动;
所述第一获取单元具体用于,当所述检测单元检测到所述统一心跳系统已 启动时, 获取所述应用程序的网络保持时间段。
15、 一种计算机存储介质, 其特征在于, 所述计算机存储介质可存储有程 序, 该程序执行时包括如权利要求 1至 8任一项所述的步骤。
16、 一种终端, 其特征在于, 所述终端包括: 存储器和处理器, 其中, 存 储器中存储一组程序代码,且处理器用于调用存储器中存储的程序代码,用于 执行以下操作:
获取应用程序的网络保持时间段;
获取所述应用程序的初始心跳,根据所述网络保持时间段和所述初始心跳 获取所述应用程序的待调整心跳;
获取预置的至少一个统一心跳,根据所述统一心跳对所述待调整心跳进行 调整, 获得已调整心跳, 其中, 所述已调整心跳与所述至少一个统一心跳中的 统一' G跳重合。
17、 如权利要求 16所述的终端, 其特征在于, 所述处理器还用于, 在获 取应用程序的网络保持时间段之后, 获取所述应用程序的业务参数,根据所述 业务参数制定所述应用程序的心跳的调整策略, 其中, 所述调整策略用于指示 所述待调整心跳的调整方向, 所述调整方向包括前移调整方向、后移调整方向 和不调整中的任一种;
所述处理器根据所述统一心跳对所述待调整心跳进行调整,获得已调整心 跳包括: 根据所述统一心跳和所述调整策略对所述待调整心跳进行调整,获得 已调整心跳。
18、 如权利要求 17所述的终端, 其特征在于, 所述处理器还用于, 在获 取所述应用程序的业务参数,根据所述业务参数制定所述应用程序的心跳的调 整策略之前, 获取预置的统一心跳,在所述统一心跳中获取相邻统一心跳的第 一时间间隔;
判断所述网络保持时间段是否大于所述第一时间间隔;
当所述网络保持时间段大于所述第一时间间隔时,执行所述获取所述应用 程序的业务参数, 根据所述业务参数制定所述应用程序的心跳的调整策略。
19、 如权利要求 17或 18所述的终端, 其特征在于, 所述待调整心跳与所 述初始心跳的时间间隔为所述应用程序的网络保持时间段。
20、 如权利要求 17-21任一项所述的终端, 其特征在于, 所述处理器根据 所述统一心跳和所述调整策略对所述待调整心跳进行调整,获得已调整心跳包 括:
当所述调整策略用于指示所述待调整心跳的前移调整方向时,在所述统一 心跳中获取与所述待调整心跳的时间间隔最小的第一心跳,且所述第一心跳的 时间点早于或等于所述待调整心跳的时间点;
将所述待调整心跳的时间点前移至所述第一心跳的时间点上,获得所述已 调整心 ϋ 。
21、 如权利要求 17-19任一项所述的终端, 其特征在于, 所述处理器根据 所述统一心跳和所述调整策略对所述待调整心跳进行调整,获得已调整心跳包 括:
当所述调整策略用于指示所述待调整心跳的后移调整方向时,在所述统一 心跳周期中获取与所述待调整心跳的时间间隔最小的第二心跳,且所述第二心 跳的时间点晚于或等于所述待调整心跳的时间点;
将所述待调整心跳的时间点后移至所述第二心跳的时间点上,获得所述已 调整心 ϋ 。
22、 如权利要求 16-21任一项所述的终端, 其特征在于, 所述处理器还用 于, 在获取应用程序的网络保持时间段之前, 检测统一心跳系统是否已启动; 当检测到所述统一心跳系统已启动时,执行获取所述应用程序的网络保持时间 段步骤。
PCT/CN2014/080225 2014-06-18 2014-06-18 一种心跳的调整方法、装置和终端 WO2016004558A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/CN2014/080225 WO2016004558A1 (zh) 2014-06-18 2014-06-18 一种心跳的调整方法、装置和终端
US15/317,918 US10536900B2 (en) 2014-06-18 2014-06-18 Heartbeat adjustment method, apparatus, and terminal
EP14897104.7A EP3142423B1 (en) 2014-06-18 2014-06-18 Heartbeat adjustment method, device and terminal
CN201480001745.8A CN104412649B (zh) 2014-06-18 2014-06-18 一种心跳的调整方法、装置和终端

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/080225 WO2016004558A1 (zh) 2014-06-18 2014-06-18 一种心跳的调整方法、装置和终端

Publications (1)

Publication Number Publication Date
WO2016004558A1 true WO2016004558A1 (zh) 2016-01-14

Family

ID=52648751

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/080225 WO2016004558A1 (zh) 2014-06-18 2014-06-18 一种心跳的调整方法、装置和终端

Country Status (4)

Country Link
US (1) US10536900B2 (zh)
EP (1) EP3142423B1 (zh)
CN (1) CN104412649B (zh)
WO (1) WO2016004558A1 (zh)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9978018B2 (en) * 2015-04-22 2018-05-22 Aeris Communications, Inc. Method and system for optimizing execution of user commands in relation to power management
CN106411627A (zh) * 2015-07-31 2017-02-15 博雅网络游戏开发(深圳)有限公司 网络连接检测方法和装置
CN106922039B (zh) * 2015-12-25 2020-06-05 阿里巴巴集团控股有限公司 一种心跳报文的发送方法和装置
CN105959997B (zh) * 2016-04-19 2019-06-18 北京小米移动软件有限公司 心跳报文的发送方法、装置及终端
CN106201729B (zh) * 2016-06-29 2019-09-17 北京小米移动软件有限公司 定时器对齐方法及装置
CN106851799B (zh) * 2017-01-19 2020-10-09 珠海市魅族科技有限公司 一种长连接中心跳包的发送方法及装置
EP3596981B1 (en) * 2017-03-15 2021-09-29 Carrier Corporation A wireless event notification system
CN108875353B (zh) * 2017-05-15 2020-07-14 中国移动通信有限公司研究院 一种终端的预置应用的管理方法及装置
CN110891328B (zh) * 2018-09-07 2022-04-12 华为技术有限公司 用于对齐唤醒的方法与移动设备
CN110557301B (zh) * 2019-08-23 2023-07-28 福建科立讯通信有限公司 一种降低功耗的服务器端心跳探测机制的实现方法
CN110753086A (zh) * 2019-09-12 2020-02-04 华为技术有限公司 应用的心跳唤醒方法及终端设备
CN111083665B (zh) * 2019-12-05 2023-09-19 上海旗旌科技有限公司 一种双主控交互通信的方法及设备
CN111031598A (zh) * 2020-01-08 2020-04-17 Oppo广东移动通信有限公司 网络通信控制方法、装置、通信设备以及存储介质
CN111866107B (zh) * 2020-07-10 2023-01-03 杭州叙简科技股份有限公司 一种移动执法仪按照均衡保活方法
CN114205270B (zh) * 2020-09-17 2023-09-22 北京三快在线科技有限公司 设备状态确定方法、装置、存储介质及电子设备
CN114554519A (zh) * 2020-11-26 2022-05-27 中国电信股份有限公司 报文处理方法和系统、终端及计算机可读存储介质
CN115137447A (zh) * 2022-09-02 2022-10-04 深圳北芯医疗科技有限公司 治疗仪的部件保护方法、设备和治疗仪

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631377A (zh) * 2009-07-30 2010-01-20 中兴通讯股份有限公司 终端休眠方法及终端
CN102117114A (zh) * 2009-12-30 2011-07-06 重庆重邮信科通信技术有限公司 一种嵌入式设备省电方法
CN103118188A (zh) * 2013-01-25 2013-05-22 华为终端有限公司 应用心跳周期调整方法及装置、终端

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7539755B2 (en) * 2006-04-24 2009-05-26 Inventec Corporation Real-time heartbeat frequency regulation system and method utilizing user-requested frequency
US8583781B2 (en) * 2009-01-28 2013-11-12 Headwater Partners I Llc Simplified service network architecture
PL3367252T3 (pl) * 2010-07-26 2020-05-18 Seven Networks, Llc Zarządzanie ruchem z uwzględnieniem kontekstu w celu zaoszczędzenia zasobów w sieci bezprzewodowej
JP2013097548A (ja) * 2011-10-31 2013-05-20 Pfu Ltd 情報処理システム、情報処理装置、クライアント端末、情報処理方法、及びプログラム
KR20130086700A (ko) * 2012-01-26 2013-08-05 삼성전자주식회사 휴대 단말기의 패킷 전송 방법 및 장치
US9781676B2 (en) 2012-10-24 2017-10-03 Blackberry Limited System and method for reducing power consumption based on data activity sensitive timers

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631377A (zh) * 2009-07-30 2010-01-20 中兴通讯股份有限公司 终端休眠方法及终端
CN102117114A (zh) * 2009-12-30 2011-07-06 重庆重邮信科通信技术有限公司 一种嵌入式设备省电方法
CN103118188A (zh) * 2013-01-25 2013-05-22 华为终端有限公司 应用心跳周期调整方法及装置、终端

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3142423A4 *

Also Published As

Publication number Publication date
EP3142423A4 (en) 2017-06-21
EP3142423A1 (en) 2017-03-15
EP3142423B1 (en) 2019-03-13
US10536900B2 (en) 2020-01-14
US20170118709A1 (en) 2017-04-27
CN104412649A (zh) 2015-03-11
CN104412649B (zh) 2018-07-13

Similar Documents

Publication Publication Date Title
WO2016004558A1 (zh) 一种心跳的调整方法、装置和终端
KR101799418B1 (ko) 애플리케이션 하트비트 주기 조정 방법, 장치, 및 단말
US9880606B2 (en) Method and apparatus for wake-up control of intelligent terminal
US20150215863A1 (en) Network card device, routing device, system and method for realizing dynamic sleep and wakeup
US20160044598A1 (en) Wake-Up Control Method and Apparatus, and Terminal Device
WO2016058335A1 (zh) 信号传输的控制方法及装置、电子设备
TW201031242A (en) Synchronizing wakeup operations in electronic devices
CN109511133A (zh) 一种唤醒处理的方法及装置
US9954787B2 (en) Intelligent terminal power-saving management method and apparatus
WO2013185679A1 (zh) 一种控制手机供电和充电的方法及装置
WO2015077961A1 (zh) 一种发送心跳消息的方法及移动终端
CN104866063B (zh) 一种信息处理的方法及电子设备
US10477501B2 (en) Wireless communication device, wireless communication method, and storage medium
JP2014504059A (ja) データ対話の方法およびデバイス
WO2015154391A1 (zh) 无线网络接入的功耗处理方法及装置
TW201415922A (zh) 網路搜尋方法及使用此方法的行動電子裝置
CN112153214A (zh) 一种终端状态的控制方法及终端
CN113225727A (zh) 处理方法、装置及电子设备
CN110928586B (zh) App后台保活方法及装置
US20120044011A1 (en) Initiating forced shutdown of a device
WO2013027163A1 (en) Lighting system comprising a master unit and slave units wherein the master unit may move to a sleep mode with a slave unit taking over as master
WO2013139263A1 (zh) 一种信息传输方法、系统及睡眠功能设备
WO2015122903A1 (en) Communicating commands to an embedded controller of a system
JP2018046327A (ja) 通信装置及び通信方法
JP2012104941A (ja) 無線通信装置及びプログラム、並びに、通信システム

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: 14897104

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2014897104

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014897104

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 15317918

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE