CN106201729B - Timer alignment schemes and device - Google Patents

Timer alignment schemes and device Download PDF

Info

Publication number
CN106201729B
CN106201729B CN201610499044.2A CN201610499044A CN106201729B CN 106201729 B CN106201729 B CN 106201729B CN 201610499044 A CN201610499044 A CN 201610499044A CN 106201729 B CN106201729 B CN 106201729B
Authority
CN
China
Prior art keywords
timer
application program
record
access
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610499044.2A
Other languages
Chinese (zh)
Other versions
CN106201729A (en
Inventor
王智勇
刘立伟
刘惠云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610499044.2A priority Critical patent/CN106201729B/en
Publication of CN106201729A publication Critical patent/CN106201729A/en
Application granted granted Critical
Publication of CN106201729B publication Critical patent/CN106201729B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • 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/3234Power saving characterised by the action undertaken
    • G06F1/329Power saving characterised by the action undertaken by task scheduling

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The disclosure discloses a kind of timer alignment schemes and device, belongs to field of computer technology.The timer alignment schemes include: to obtain the timer usage record of each application program;Has the access record of predeterminated target IP address when obtaining each application program access network;According to the timer usage record of each application program and access record, qualified at least one set of application program and timer are filtered out, timer corresponding with application program has periodicity in every group;Every group filtered out timer corresponding with application program is aligned with regular timer.It solves in the related technology because the alarm frequency of different application is different, it will lead to system, modem is continually waken up, when to cause standby the technical issues of the too fast consumption of electricity, the wake-up for reducing application program to system and modem, the effect of the too fast consumption of electricity when largely avoiding standby are reached.

Description

Timer alignment schemes and device
Technical field
This disclosure relates to field of computer technology, in particular to a kind of timer alignment schemes and device.
Background technique
In Android (English: Android) system, there is Push Service (English: push for many application programs Service), to be used to maintain the state synchronized between application program and server.
Synchronous for hold mode, push service is held with usually requiring timing (English: alarm) with server Hand, different application programs, the time shaken hands, frequency are not quite similar, and certain applications program is excessively frequent using alarm, meeting Cause system, modem (English: modem) continually to be waken up, thus when causing standby electricity too fast consumption.
Summary of the invention
The disclosure provides a kind of timer alignment schemes and device.The technical solution is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of timer alignment schemes are provided, which comprises obtain every The timer usage record of a application program, the timer usage record include at least mark, the timer name of application program Title comes into force the moment with timer;Has the agreement interconnected between predeterminated target network when obtaining each application program access network The access record of (English: Internet Protocol, IP) address, the access record include at least application program mark, Access moment and message length;According to the timer usage record of each application program and access record, filter out eligible At least one set of application program and timer, timer corresponding with application program has periodicity in every group;By what is filtered out Every group of timer corresponding with application program is aligned with regular timer.
By recording according to the timer usage record and access of application program, determine have corresponding to application program The timer determined is aligned by periodic timer with regular timer, logical due to having periodic timer Often mean the corresponding alarm of push server, so that each application program has periodic timer and standard Timer is aligned, application program each so only need regular timer come into force the moment and meanwhile wake up primary system and Modem solves in the related technology because the alarm frequency of different application is different, will lead to system, modem by frequency Wake up numerously, thus when causing standby the technical issues of the too fast consumption of electricity, reached reduction application program to system and The wake-up of modem, the effect of the too fast consumption of electricity when largely avoiding standby.
Optionally, described to obtain the access record for having predeterminated target IP address when each application program accesses network, packet It includes: each item access record generated when obtaining each application program access network;From each item of acquisition access record, filter out Target ip address belongs to the record of the access in the IP database prestored, and IP database, which is used to store, provides the server of Push Service IP address.
The access record belonged in the IP database prestored by filtering out target ip address, so that the access note filtered out Record is the record for the server that access provides Push Service, greatly reduces the subsequent fortune for recording according to access and determining alarm Calculation amount.
Optionally, the method also includes interval acquiring IP databases at predetermined time intervals;Utilize the IP number of acquisition Stored IP database is updated according to library.
Optionally, the timer usage record according to each application program and access record, filter out eligible At least one set of application program and timer, comprising: for each application program, by coming into force moment and access moment for timer Difference is less than the timer usage record of predetermined threshold and access record is used as a record group, obtains first kind record group;From In each first kind record group, the first kind record group that message length is less than predetermined length threshold value, the will filtered out are filtered out A kind of record group is denoted as the second class record group;From the second class record group filtered out, pointer when coming into force of timer is filtered out Standby periodic second class record group, is denoted as third class record group for the second class record group filtered out;The third class is remembered The mark of application program and timer title in record group are determined as qualified one group of application program and timer.
Filter out by the above process timer come into force the moment and access the moment time registration it is higher, have the period Property the lesser record of timer and message length, can be determined that using these records provide the application program of standby Push Service with And timer when progress Push Service.
Optionally, the every group of timer corresponding with application program that will be filtered out is aligned with regular timer, Include: every group of timer corresponding with application program for filtering out, obtain the timer it is next come into force the moment and The next of the regular timer is come into force the moment;It sets the standard timing constantly by next come into force of the timer The next of device is come into force the moment.
According to the second aspect of an embodiment of the present disclosure, a kind of timer alignment means are provided, described device includes: first to obtain Modulus block is configured as obtaining the timer usage record of each application program, and the timer usage record is included at least and answered With coming into force the moment for the mark of program, timer title and timer;Second obtains module, is configured as obtaining each using journey Sequence access network when have predeterminated target IP address access record, it is described access record include at least application program mark, Access moment and message length;Screening module is configured as each application program for obtaining module acquisition according to described first The access record for each application program that timer usage record and the second acquisition module obtain, filters out qualified At least one set of application program and timer, timer corresponding with application program has periodicity in every group;Alignment module is matched Every group of timer corresponding with application program for filtering out the screening module is set to be aligned with regular timer.
Optionally, described second module is obtained, comprising: the first acquisition submodule is configured as obtaining each application program Each item access record generated when accessing network;First screening submodule, is configured as obtaining from first acquisition submodule Each item access record in, filter out the access record that target ip address belongs in the IP database prestored, IP database is used for Storage provides the IP address of the server of Push Service.
Optionally, described device further include: third obtains module, is configured as interval acquiring IP data at predetermined time intervals Library;Update module is configured as obtaining the IP database of module acquisition using the third to stored IP data Library is updated.
Optionally, the screening module, comprising: first determines submodule, is configured as that each application program will be determined When device come into force the moment and access moment difference be less than predetermined threshold timer usage record and access record as one remember Record group obtains first kind record group;Second screening submodule, is configured as from each first kind record group, screens outgoing packet Length is less than the first kind record group of predetermined length threshold value, and the first kind record group filtered out is denoted as the second class record group;The Three screening submodules are configured as from the second class record group that the second screening submodule filters out, filter out timer Come into force constantly and have periodic second class record group, the second class record group filtered out is denoted as third class record group;The Two determine submodule, are configured as application program in the third class record group for filtering out third screening submodule Mark and timer title, are determined as qualified one group of application program and timer.
Optionally, the alignment module, comprising: the second acquisition submodule, be configured as filter out every group with answer With the corresponding timer of program, obtains the next of the timer and come into force the moment and the next of the regular timer is come into force Moment;It is aligned submodule, is configured as setting next come into force of the timer under the regular timer constantly One comes into force the moment.
According to the third aspect of an embodiment of the present disclosure, a kind of timer alignment means are provided, described device includes:
Processor;
For storing the memory of the processor-executable instruction;
Wherein, the processor is configured to:
The timer usage record of each application program is obtained, the timer usage record includes at least application program Mark, timer title and timer come into force the moment;
Has the access record of predeterminated target IP address when obtaining each application program access network, the access record is extremely Mark including application program, access moment and message length less;
According to the timer usage record of each application program and access record, filters out qualified at least one set and answer With program and timer, timer corresponding with application program has periodicity in every group;
Every group filtered out timer corresponding with application program is aligned with regular timer.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited It is open.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and consistent with the instructions for explaining the principles of this disclosure.
Fig. 1 be according to exemplary partial implement a kind of timer alignment schemes for exemplifying involved in implementation environment show It is intended to;
Fig. 2 is a kind of flow chart of timer alignment schemes shown according to an exemplary embodiment;
Fig. 3 A is a kind of flow chart of the timer alignment schemes shown according to another exemplary embodiment;
Fig. 3 B is a kind of flow chart of access record for obtaining application program shown according to an exemplary embodiment;
Fig. 3 C is the qualified at least one set of application program of one kind shown according to an exemplary embodiment and timer Flow chart;
Fig. 3 D is shown according to an exemplary embodiment a kind of corresponding with application program fixed in every group will filtered out When the flow chart that is aligned with regular timer of device;
Fig. 4 A is a kind of block diagram of timer alignment means shown according to an exemplary embodiment;
Fig. 4 B is a kind of block diagram of the timer alignment means shown according to another exemplary embodiment;
Fig. 5 is a kind of block diagram of timer alignment means shown according to another exemplary embodiment;
Fig. 6 is a kind of block diagram of timer alignment means shown according to another exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 be according to exemplary partial implement a kind of timer alignment schemes for exemplifying involved in implementation environment show It is intended to, as shown in Figure 1, the implementation environment may include an at least server 110 and at least one terminal 120.
Each terminal 120 is attached with server 110 by wireless network.
Multiple application programs can be installed, and these application programs are in order to maintain and server 110 in each terminal 120 Between heartbeat, need to maintain Push Service between server 110, in order to realize this push, each application program can There is the timer of itself, when timer comes into force, then shakes hands with server 110.
For system in terminal be Android system for, due to the opening of Android system, cause each application program equal May have the timer of itself, and each application program can also correspond to for different functions and have different timers, no Different with the timer between application program, the timing length of the timer of even each application program is also different.
Server 110 said here is for providing the server of Push Service, and in actual implementation, internet has Several this kind of servers, different application programs may use different servers 110 when realizing Push Service, such as Certain applications program may use one of server 110, and another part application program may use another server 110。
In general, realize that each application program of Push Service has certain rule using the same server 110 Property, for example target ip address is identical, alarm title is identical, frequency is mutually same.
Fig. 2 is a kind of flow chart of timer alignment schemes shown according to an exemplary embodiment, as shown in Fig. 2, should Timer alignment schemes are applied in the terminal 120 in implementation environment shown in FIG. 1 or server 110, include the following steps.
In step 201, the timer usage record of each application program is obtained, timer usage record is included at least and answered With coming into force the moment for the mark of program, timer title and timer.
In step 202, have the access record of predeterminated target IP address when obtaining each application program access network, visit Ask mark, access moment and message length that record includes at least application program.
In step 203, it is recorded, is filtered out eligible according to the timer usage record of each application program and access At least one set of application program and timer, timer corresponding with application program has periodicity in every group.
In step 204, every group filtered out timer corresponding with application program is aligned with regular timer.
In conclusion the timer alignment schemes provided in the embodiment of the present disclosure, pass through the timer according to application program Usage record and access record, determine have periodic timer corresponding to application program, the timer that will be determined It is aligned with regular timer, generally means that the corresponding alarm of push server due to having periodic timer, from And make each application program have periodic timer and be aligned with regular timer, application program each in this way is only It needs the moment while to wake up primary system and modem in coming into force for regular timer, solve in the related technology because of difference The alarm frequency of application program is different, will lead to system, modem is continually waken up, thus when causing standby electricity it is too fast The technical issues of consumption, has reached the wake-up for reducing application program to system and modem, electric when largely avoiding standby The effect of the too fast consumption of amount.
Fig. 3 A is a kind of flow chart of the timer alignment schemes shown according to another exemplary embodiment, such as Fig. 3 A institute Show, which is applied in the terminal 120 in implementation environment shown in FIG. 1 or server 110, including following step Suddenly.
In step 301, the timer usage record of each application program is obtained.
Timer usage record comes into force the moment including at least the mark of application program, timer title and timer.
In general, each application program in actual use, may need to create various timers because of various businesses, In timer by use, the available timer usage record to each application program.
For the same application program because business demand is different, the title of timer, timer moment of coming into force can also It can meeting difference.
Business said here includes the heartbeat business between application program maintenance and server, further includes application program sheet Body provides various function services.
Optionally, available in the present embodiment each to answer in the standby state in order to reduce the comparison and operation in later period With the timer usage record of program.Optionally, in Android system, can use timer management function (English: AlarmManagerService) the timer usage record of each application program is recorded.
In step 302, interval acquiring IP database at predetermined time intervals, using the IP database of acquisition to stored IP database be updated.
Here server is to provide the server of Push Service, and application program needs to maintain the heart between the server It jumps.
Here IP database contains the IP address for the server that application program needs to access when maintaining heartbeat, due to IP address may have to be modified for some reason, it is therefore desirable to obtain IP database in real time to update stored IP number According to library.
In step 303, has the access record of predeterminated target IP address when obtaining each application program access network.
Access record said here includes at least mark, access moment and the message length of application program.
In general, application program needs to send to server when accessing network access message, namely access record, therefore It can be analyzed according to access message, obtain mark, access moment and the message for the application program that access message has Length.
If access record is for maintaining the access of heartbeat to record, the target ip address of this kind of access record is to mention For the server address of Push Service, therefore the access record that target ip address belongs in IP database can be filtered out first.
In addition, if corresponding message length can generally compare when access record is for maintaining the access of heartbeat to record It is small, such as less than 200Byte, therefore for subsequent more accurate judgement, need to obtain the message length of access record.
When application program maintain heartbeat when, application program necessarily timer come into force the moment to server send access report Text, therefore also need to obtain the access moment of application program access record.
In a kind of optional mode, has the visit of predeterminated target IP address when obtaining each application program access network When asking record, it can be realized by each step in Fig. 3 B.
In step 303a, each item access generated when obtaining each application program access network is recorded.
For terminal, each application program is required to be sent out report by the gateway of terminal when accessing network Text, therefore can be recorded with the gateway of monitor terminal to intercept and capture the access that each application program is generated when accessing network.
In general, for application program when sending access message to network, application program would generally be carried by accessing in message Mark, in order to which server adds the mark of the application program when feeding back corresponding response message, such terminal is being received The response message for belonging to which application program can be recognized when response message.
In step 303b, from each item of acquisition access record, filters out target ip address and belong to the IP data prestored Access record in library.
Since what is stored in IP database is and to access the target ip address of record for providing the server of Push Service The address of the server as accessed, therefore the server of Push Service is provided for accessing in order to filter out, it can filter out Target ip address belongs to the record of the access in the IP database prestored.
Optionally, available in the present embodiment each to answer in the standby state in order to reduce the comparison and operation in later period It is recorded with the access of program.Optionally, in Android system, can use network access controller (English: NetworkController it) is recorded come access when recording each application program access network.
In step 304, it is recorded, is filtered out eligible according to the timer usage record of each application program and access At least one set of application program and timer.
It is available to have phase due to including the mark of application program in timer usage record and access record With the timer usage record and access record of the mark of application program.
In actual implementation, the timer usage record and access record that can will be provided with the mark of same application domain are drawn Divide into a set, application programs different in this way is corresponding with different set.
It here, can be by Fig. 3 C in order to determine qualified at least one set of application program and timer Each step is realized.
In step 304a, for each application program, the moment of coming into force of timer is less than in advance with access moment difference The timer usage record and access record for determining threshold value obtain first kind record group as a record group.
Since the timer of application program is to belong to the timer for maintaining heartbeat a bit, some are to belong to determining for other business When device maintain the timer of heartbeat after the moment of coming into force and in general, application program can be sent and server to outer net Handshake message (handshake message can be designated as an access record), therefore can have the come into force moment and access of one group of timer Moment difference is less than the timer usage record and access record of predetermined threshold.By this group of timer usage record and access record As a record group, then several available first kind record groups in this way.
In step 304b, from each first kind record group, the of message length less than predetermined length threshold value is filtered out The first kind record group filtered out is denoted as the second class record group by a kind of record group.
The message length of message when due to maintenance heartbeat generally can be smaller, can also be from first kind record group The record group that message length is less than predetermined length threshold value is screened, the record group filtered out is denoted as the second class record group.
In step 304c, from the second class record group filtered out, filters out coming into force for timer and have the period constantly Second class record group of property, is denoted as third class record group for the second class record group filtered out.
In step 304d, the mark and timer title of application program in third class record group are determined as meeting The one group of application program and timer of condition.
The alarm that 304a to 304b can filter out time registration height through the above steps, the period occurs, and message is long Spend lesser one group of application program and timer.
In step 305, every group filtered out timer corresponding with application program is aligned with regular timer.
Here regular timer is that have periodic timer, and the period corresponding to periodicity is to immobilize 's.For example regular timer is to come into force every five minutes once.
In general, in order to avoid frequently waking up system and modem, the period of regular timer will not be too short, but is The effective heartbeat message of maintenance, the period of regular timer will not be too long, the period of general standard timer can be set It is five minutes., can be according to the period of practical situation regular timer come depending on but in practical application, the present embodiment is to standard The period value of timer is without limiting.
Every group filtered out timer corresponding with application program is being aligned with regular timer, it can be according to figure Each step in 3D is realized.
In step 305a, for the every group of timer corresponding with application program filtered out, the next of timer is obtained It is a to come into force the moment and the next of regular timer is come into force the moment.
For current time (namely obtain moment), when can obtain out application program timer next and coming into force It carves and the next of regular timer is come into force the moment.
In step 305b, by timer it is next come into force be set as regular timer next constantly and come into force when It carves.
It it can set next come into force of timer to the next of regular timer constantly comes into force the moment, repeat step 305a and step 305b so that the timer it is all come into force the moment with the timing synchronization that comes into force of regular timer.
In conclusion the timer alignment schemes provided in the embodiment of the present disclosure, pass through the timer according to application program Usage record and access record, determine have periodic timer corresponding to application program, the timer that will be determined It is aligned with regular timer, generally means that the corresponding alarm of push server due to having periodic timer, from And make each application program have periodic timer and be aligned with regular timer, application program each in this way is only It needs the moment while to wake up primary system and modem in coming into force for regular timer, solve in the related technology because of difference The alarm frequency of application program is different, will lead to system, modem is continually waken up, thus when causing standby electricity it is too fast The technical issues of consumption, has reached the wake-up for reducing application program to system and modem, electric when largely avoiding standby The effect of the too fast consumption of amount.
In addition, recorded by filtering out the access that target ip address belongs in the IP database prestored, so that filter out The access of access record provides the server of Push Service, greatly reduces the subsequent fortune for recording according to access and determining alarm Calculation amount.
Filter out by the above process timer come into force the moment and access the moment time registration it is higher, have the period Property the lesser record of timer and message length, can be determined that using these records provide the application program of standby Push Service with And timer when progress Push Service.
It should be added that above-described embodiment can be realized in terminal 120, and in practical applications, above-mentioned implementation Except the step of the last one timer alignment also can be realized in server 110 in example, for example server 110 can simulate Each application program to be in terminal to obtain the timer usage record and access record of each application program, or from other ends End pulls each application program to obtain the timer usage record of each application program and access record, and determines for terminal Qualified at least one set of application program and timer out, and by the qualified at least one set of application program determined and Timer is sent to each terminal.
Following is embodiment of the present disclosure, can be used for executing embodiments of the present disclosure.It is real for disclosure device Undisclosed details in example is applied, embodiments of the present disclosure is please referred to.
Fig. 4 A is a kind of block diagram of timer alignment means shown according to an exemplary embodiment, as shown in Figure 4 A, should Timer alignment means are applied in the terminal 120 in implementation environment shown in Fig. 1 or server 110, the timer alignment means Including but not limited to: first, which obtains module 410, second, obtains module 420, screening module 430 and alignment module 440.
First obtains module 410, is configured as obtaining the timer usage record of each application program, the timer makes With record coming into force the moment including at least the mark of application program, timer title and timer.
Timer usage record comes into force the moment including at least the mark of application program, timer title and timer.
In general, each application program in actual use, may need to create various timers because of various businesses, In timer by use, the available timer usage record to each application program.
For the same application program because business demand is different, the title of timer, timer moment of coming into force can also It can meeting difference.
Business said here includes the heartbeat business between application program maintenance and server, further includes application program sheet Body provides various function services.
Optionally, available in the present embodiment each to answer in the standby state in order to reduce the comparison and operation in later period With the timer usage record of program.Optionally, in Android system, it can use timer management function to record each answer With the timer usage record of program.
Second obtains module 420, is configured as having predeterminated target IP address when obtaining each application program access network Access record, the access record includes at least the mark of application program, access moment and message length.
Screening module 430 is configured as the timer for obtaining each application program that module 410 obtains according to described first Usage record and it is described second obtain module 420 obtain each application program access record, filter out it is qualified extremely Lack one group of application program and timer, timer corresponding with application program has periodicity in every group.
It is available to have phase due to including the mark of application program in timer usage record and access record With the timer usage record and access record of the mark of application program.
In actual implementation, the timer usage record and access record that can will be provided with the mark of same application domain are drawn Divide into a set, application programs different in this way is corresponding with different set.
Alignment module 440 is configured as every group of timing corresponding with application program for filtering out the screening module 430 Device is aligned with regular timer.
Here regular timer is that have periodic timer, and the period corresponding to periodicity is to immobilize 's.For example regular timer is to come into force every five minutes once.
In general, in order to avoid frequently waking up system and modem, the period of regular timer will not be too short, but is The effective heartbeat message of maintenance, the period of regular timer will not be too long, the period of general standard timer can be set It is five minutes., can be according to the period of practical situation regular timer come depending on but in practical application, the present embodiment is to standard The period value of timer is without limiting.
In an optional implementation manner, the second acquisition module 420 may include: the first acquisition submodule 421 and the One screening submodule 422, refers to shown in Fig. 4 B.
First acquisition submodule 421 is configured as each item access note generated when obtaining each application program access network Record.
For terminal, each application program is required to be sent out report by the gateway of terminal when accessing network Text, therefore can be recorded with the gateway of monitor terminal to intercept and capture the access that each application program is generated when accessing network.
In general, for application program when sending access message to network, application program would generally be carried by accessing in message Mark, in order to which server adds the mark of the application program when feeding back corresponding response message, such terminal is being received The response message for belonging to which application program can be recognized when response message.
First screening submodule 422 is configured as each item access record obtained from first acquisition submodule 421 In, the access record that target ip address belongs in the IP database prestored is filtered out, IP database provides push clothes for storing The IP address of the server of business.
Since what is stored in IP database is and to access the target ip address of record for providing the server of Push Service The address of the server as accessed, therefore the server of Push Service is provided for accessing in order to filter out, it can filter out Target ip address belongs to the record of the access in the IP database prestored.
Optionally, available in the present embodiment each to answer in the standby state in order to reduce the comparison and operation in later period It is recorded with the access of program.Optionally, in Android system, it can use network access controller to record each application program Access access record when network.
In an optional implementation manner, still referring to shown in Fig. 4 B, which can also include: Three obtain module 450 and update module 460.
Third obtains module 450, is configured as interval acquiring IP database at predetermined time intervals.
Here server is to provide the server of Push Service, and application program needs to maintain the heart between the server It jumps.
Here IP database contains the IP address for the server that application program needs to access when maintaining heartbeat, due to IP address may have to be modified for some reason, it is therefore desirable to obtain IP database in real time to update stored IP number According to library.
Update module 460 is configured as obtaining the IP database of module acquisition using the third to stored IP database be updated.
Access record said here includes at least mark, access moment and the message length of application program.
In general, application program needs to send to server when accessing network access message, namely access record, therefore It can be analyzed according to access message, obtain mark, access moment and the message for the application program that access message has Length.
If access record is for maintaining the access of heartbeat to record, the target ip address of this kind of access record is to mention For the server address of Push Service, therefore the access record that target ip address belongs in IP database can be filtered out first.
In addition, if corresponding message length can generally compare when access record is for maintaining the access of heartbeat to record It is small, such as less than 200Byte, therefore for subsequent more accurate judgement, need to obtain the message length of access record.
When application program maintain heartbeat when, application program necessarily timer come into force the moment to server send access report Text, therefore also need to obtain the access moment of application program access record.
In an optional implementation manner, still referring to shown in Fig. 4 B, the screening module 430, comprising: first determines Submodule 431, second screens submodule 432, third screening submodule 433 and second determines submodule 434.
First determines submodule 431, is configured as each application program, when by the moment of coming into force of timer with access It carves timer usage record of the difference less than predetermined threshold and access record is used as a record group, obtain first kind record group.
Since the timer of application program is to belong to the timer for maintaining heartbeat a bit, some are to belong to determining for other business When device maintain the timer of heartbeat after the moment of coming into force and in general, application program can be sent and server to outer net Handshake message (handshake message can be designated as an access record), therefore can have the come into force moment and access of one group of timer Moment difference is less than the timer usage record and access record of predetermined threshold.By this group of timer usage record and access record As a record group, then several available first kind record groups in this way.
Second screening submodule 432, is configured as from each first kind record group, filters out message length less than predetermined The first kind record group filtered out is denoted as the second class record group by the first kind record group of length threshold.
The message length of message when due to maintenance heartbeat generally can be smaller, can also be from first kind record group The record group that message length is less than predetermined length threshold value is screened, the record group filtered out is denoted as the second class record group.
Third screens submodule 433, is configured as from the second class record group that the second screening submodule filters out, It filters out coming into force constantly for timer and has periodic second class record group, the second class record group filtered out is denoted as third Class record group.
Second determines submodule 434, is configured as the third class note for filtering out third screening submodule 433 The mark of application program and timer title in record group are determined as qualified one group of application program and timer.
In an optional implementation manner, still referring to shown in Fig. 4 B, alignment module 440 may include: the second acquisition Submodule 441 and alignment submodule 442.
Second acquisition submodule 441 is configured as every group of timer corresponding with application program for filtering out, and obtains The next of the timer comes into force the moment and the next of the regular timer is come into force the moment.
For current time (namely obtain moment), when can obtain out application program timer next and coming into force It carves and the next of regular timer is come into force the moment.
It is aligned submodule 442, is configured as setting the standard timing constantly for next come into force of the timer The next of device is come into force the moment.
In conclusion timer alignment means provided in an embodiment of the present invention, by being made according to the timer of application program With record and access record, determine have periodic timer corresponding to application program, by the timer determined with Regular timer is aligned, and generally means that the corresponding alarm of push server due to having periodic timer, thus So that each application program has periodic timer and is aligned with regular timer, application program each so is only needed The moment while primary system and modem are waken up in coming into force for regular timer, solved in the related technology because difference is answered It is different with the alarm frequency of program, it will lead to system, modem is continually waken up, so that the too fast of electricity disappears when causing standby The technical issues of consumption, has reached the wake-up for reducing application program to system and modem, electricity when largely avoiding standby Too fast consumption effect.
In addition, recorded by filtering out the access that target ip address belongs in the IP database prestored, so that filter out It is the record for accessing the server for providing Push Service that access, which records, is greatly reduced subsequent according to access record determination The operand of alarm.
Filter out by the above process timer come into force the moment and access the moment time registration it is higher, have the period Property the lesser record of timer and message length, can be determined that using these records provide the application program of standby Push Service with And timer when progress Push Service.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
An exemplary embodiment of the present disclosure provides a kind of timer alignment means, can be realized the timing of disclosure offer Device alignment schemes, the timer alignment means include: processor, for the memory of storage processor executable instruction;
Wherein, processor is configured as:
The timer usage record of each application program is obtained, the timer usage record includes at least application program Mark, timer title and timer come into force the moment;
Has the access record of predeterminated target IP address when obtaining each application program access network, the access record is extremely Mark including application program, access moment and message length less;
According to the timer usage record of each application program and access record, filters out qualified at least one set and answer With program and timer, timer corresponding with application program has periodicity in every group;
Every group filtered out timer corresponding with application program is aligned with regular timer.
Fig. 5 is a kind of block diagram of timer alignment means shown according to another exemplary embodiment.For example, device 500 It can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, Medical Devices, Body-building equipment, personal digital assistant etc..
Referring to Fig. 5, device 500 may include following one or more components: processing component 502, memory 504, power supply Component 506, multimedia component 508, audio component 510, input/output (I/O) interface 512, sensor module 514, Yi Jitong Believe component 516.
The integrated operation of the usual control device 500 of processing component 502, such as with display, telephone call, data communication, phase Machine operation and record operate associated operation.Processing component 502 may include that one or more processors 518 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 502 may include one or more modules, just Interaction between processing component 502 and other assemblies.For example, processing component 502 may include multi-media module, it is more to facilitate Interaction between media component 508 and processing component 502.
Memory 504 is configured as storing various types of data to support the operation in device 500.These data are shown Example includes the instruction of any application or method for operating on device 500, contact data, and telephone book data disappears Breath, picture, video etc..Memory 504 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 506 provides electric power for the various assemblies of device 500.Power supply module 506 may include power management system System, one or more power supplys and other with for device 500 generate, manage, and distribute the associated component of electric power.
Multimedia component 508 includes the screen of one output interface of offer between device 500 and user.In some realities It applies in example, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen can To be implemented as touch screen, to receive input signal from the user.Touch panel include one or more touch sensors with Sense the gesture on touch, slide, and touch panel.Touch sensor can not only sense the boundary of a touch or slide action, and And also detect duration and pressure relevant to touch or slide.In some embodiments, multimedia component 508 includes One front camera and/or rear camera.It is such as in a shooting mode or a video mode, preceding when device 500 is in operation mode It sets camera and/or rear camera can receive external multi-medium data.Each front camera and rear camera can Be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 510 is configured as output and/or input audio signal.For example, audio component 510 includes a Mike Wind (MIC), when device 500 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched It is set to reception external audio signal.The received audio signal can be further stored in memory 504 or via communication set Part 516 is sent.In some embodiments, audio component 510 further includes a loudspeaker, is used for output audio signal.
I/O interface 512 provides interface between processing component 502 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock Determine button.
Sensor module 514 includes one or more sensors, and the state for providing various aspects for device 500 is commented Estimate.For example, sensor module 514 can detecte the state that opens/closes of device 500, the relative positioning of component, such as component For the display and keypad of device 500, sensor module 514 can be with the position of 500 1 components of detection device 500 or device Set change, the existence or non-existence that user contacts with device 500, the temperature in 500 orientation of device or acceleration/deceleration and device 500 Variation.Sensor module 514 may include proximity sensor, be configured to detect without any physical contact near The presence of object.Sensor module 514 can also include optical sensor, such as CMOS or ccd image sensor, for answering in imaging With middle use.In some embodiments, which can also include acceleration transducer, gyro sensor, magnetic Sensor, pressure sensor or temperature sensor.
Communication component 516 is configured to facilitate the communication of wired or wireless way between device 500 and other equipment.Device 500 can access the wireless network based on communication standard, such as Wi-Fi, 2G or 3G or their combination.In an exemplary reality It applies in example, communication component 516 receives broadcast singal or the related letter of broadcast from external broadcasting management system via broadcast channel Breath.In one exemplary embodiment, communication component 516 further includes near-field communication (NFC) module, to promote short range communication.Example Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 500 can be believed by one or more application specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing above-mentioned timer alignment schemes.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 504 of instruction, above-metioned instruction can be executed by the processor 518 of device 500 to complete above-mentioned timer and be aligned Method.For example, non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, magnetic Band, floppy disk and optical data storage devices etc..
Fig. 6 is a kind of block diagram of timer alignment means shown according to another exemplary embodiment.For example, device 600 It may be provided as a network side equipment, such as server.Referring to Fig. 6, device 600 includes processing component 602, is further wrapped One or more processors, and the memory resource as representated by memory 604 are included, it can be by processing component 602 for storing Execution instruction, such as application program.The application program stored in memory 604 may include one or more every One corresponds to the module of one group of instruction.In addition, processing component 602 is configured as executing instruction, to execute above-mentioned timer pair Neat method.
Device 600 can also include the power management that a power supply module 606 is configured as executive device 600, and one has Line or radio network interface 608 are configured as device 600 being connected to network and input and output (I/O) interface 610.Dress Setting 600 can operate based on the operating system for being stored in memory 604, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (11)

1. a kind of timer alignment schemes, which is characterized in that the described method includes:
The timer usage record of each application program is obtained, the timer usage record includes at least the mark of application program Know, timer title and timer come into force the moment;
Has the access record of predeterminated target IP address when obtaining each application program access network, the access record at least wraps Include mark, access moment and the message length of application program;
According to the timer usage record of each application program and access record, filter out qualified at least one set of using journey Sequence and timer, timer corresponding with application program has periodicity in every group;
Every group filtered out timer corresponding with application program is aligned with regular timer.
2. the method according to claim 1, wherein it is described have when obtaining each application program access network it is pre- The access for the IP address that sets the goal records, comprising:
Each item access record generated when obtaining each application program access network;
From each item of acquisition access record, the access record that target ip address belongs in the IP database prestored, IP are filtered out Database is used to store the IP address for the server for providing Push Service.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
Interval acquiring IP database at predetermined time intervals;
Stored IP database is updated using the IP database of acquisition.
4. the method according to claim 1, wherein the timer usage record according to each application program It is recorded with access, filters out qualified at least one set of application program and timer, comprising:
For each application program, the moment of coming into force of timer is used with timer of the moment difference less than predetermined threshold is accessed Record and access record are used as a record group, obtain first kind record group;
From each first kind record group, the first kind record group that message length is less than predetermined length threshold value is filtered out, will be screened First kind record group out is denoted as the second class record group;
From the second class record group filtered out, filters out coming into force constantly for timer and has periodic second class record group, The the second class record group filtered out is denoted as third class record group;
By the mark and timer title of application program in the third class record group, it is determined as described qualified one group Application program and timer.
5. according to claim 1 to the method any in 4, which is characterized in that every group will filtered out with apply journey The corresponding timer of sequence is aligned with regular timer, comprising:
For the every group of timer corresponding with application program filtered out, next moment and institute of coming into force of the timer is obtained The next of regular timer is stated to come into force the moment;
It it sets next come into force of the timer to the next of the regular timer constantly comes into force the moment.
6. a kind of timer alignment means, which is characterized in that described device includes:
First obtains module, is configured as obtaining the timer usage record of each application program, the timer usage record Including at least coming into force the moment for the mark of application program, timer title and timer;
Second obtains module, is configured as the access note for having predeterminated target IP address when obtaining each application program access network Record, the access record include at least mark, access moment and the message length of application program;
Screening module, be configured as according to it is described first obtain module obtain each application program timer usage record and Described second obtains the access record for each application program that module obtains, and filters out qualified at least one set of application program And timer, timer corresponding with application program has periodicity in every group;
Alignment module is configured as every group that filters out screening module timer corresponding with application program and determines with standard When device be aligned.
7. device according to claim 6, which is characterized in that described second obtains module, comprising:
First acquisition submodule is configured as each item access record generated when obtaining each application program access network;
First screening submodule is configured as from each item access record that first acquisition submodule obtains, filters out mesh Mark IP address belongs to the record of the access in the IP database prestored, and IP database is used to store the server for providing Push Service IP address.
8. device according to claim 7, which is characterized in that described device further include:
Third obtains module, is configured as interval acquiring IP database at predetermined time intervals;
Update module is configured as obtaining the IP database of module acquisition using the third to stored IP data Library is updated.
9. device according to claim 6, which is characterized in that the screening module, comprising:
First determines submodule, is configured as each application program, by come into force moment and the access moment difference of timer Timer usage record and access record less than predetermined threshold are used as a record group, obtain first kind record group;
Second screening submodule, is configured as from each first kind record group, filters out message length less than predetermined length threshold The first kind record group filtered out is denoted as the second class record group by the first kind record group of value;
Third screens submodule, is configured as from the second class record group that the second screening submodule filters out, filters out Coming into force constantly for timer has periodic second class record group, and the second class record group filtered out is denoted as third class record Group;
Second determines submodule, is configured as screening the third in the third class record group that submodule filters out and apply The mark and timer title of program are determined as qualified one group of application program and timer.
10. according to the device any in claim 6 to 9, which is characterized in that the alignment module, comprising:
Second acquisition submodule is configured as every group of timer corresponding with application program for filtering out, and it is described fixed to obtain When the next of device come into force the moment and the next of the regular timer is come into force the moment;
It is aligned submodule, is configured as setting the next of the regular timer constantly for next come into force of the timer It is a to come into force the moment.
11. a kind of timer alignment means, which is characterized in that described device includes:
Processor;
For storing the memory of the processor-executable instruction;
Wherein, the processor is configured to:
The timer usage record of each application program is obtained, the timer usage record includes at least the mark of application program Know, timer title and timer come into force the moment;
Has the access record of predeterminated target IP address when obtaining each application program access network, the access record at least wraps Include mark, access moment and the message length of application program;
According to the timer usage record of each application program and access record, filter out qualified at least one set of using journey Sequence and timer, timer corresponding with application program has periodicity in every group;
Every group filtered out timer corresponding with application program is aligned with regular timer.
CN201610499044.2A 2016-06-29 2016-06-29 Timer alignment schemes and device Active CN106201729B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610499044.2A CN106201729B (en) 2016-06-29 2016-06-29 Timer alignment schemes and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610499044.2A CN106201729B (en) 2016-06-29 2016-06-29 Timer alignment schemes and device

Publications (2)

Publication Number Publication Date
CN106201729A CN106201729A (en) 2016-12-07
CN106201729B true CN106201729B (en) 2019-09-17

Family

ID=57463554

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610499044.2A Active CN106201729B (en) 2016-06-29 2016-06-29 Timer alignment schemes and device

Country Status (1)

Country Link
CN (1) CN106201729B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109150670B (en) * 2018-11-05 2020-11-27 中通天鸿(北京)通信科技股份有限公司 Heartbeat method and system for maintaining connection

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117114A (en) * 2009-12-30 2011-07-06 重庆重邮信科通信技术有限公司 Electricity-saving method for embedded equipment
WO2012009407A3 (en) * 2010-07-14 2012-03-08 Zte Usa Inc. Voip call setup integration with power saving mode support
CN103118188A (en) * 2013-01-25 2013-05-22 华为终端有限公司 Application heartbeat cycle adjusting method and device, and terminal
CN103294512A (en) * 2013-06-05 2013-09-11 广东欧珀移动通信有限公司 Delay start method and system for timer
CN103345415A (en) * 2013-07-30 2013-10-09 广东欧珀移动通信有限公司 Terminal energy-saving method and device for management timer
CN103533184A (en) * 2013-10-30 2014-01-22 郭佳磊 Method for reducing standby power consumption of mobile phone
CN104412649A (en) * 2014-06-18 2015-03-11 华为技术有限公司 Heartbeat adjusting method, device and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100042866A1 (en) * 2008-08-15 2010-02-18 Mediatek Inc. Method and Apparatus for Adjusting a System Timer of a Mobile Station

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117114A (en) * 2009-12-30 2011-07-06 重庆重邮信科通信技术有限公司 Electricity-saving method for embedded equipment
WO2012009407A3 (en) * 2010-07-14 2012-03-08 Zte Usa Inc. Voip call setup integration with power saving mode support
CN103118188A (en) * 2013-01-25 2013-05-22 华为终端有限公司 Application heartbeat cycle adjusting method and device, and terminal
CN103294512A (en) * 2013-06-05 2013-09-11 广东欧珀移动通信有限公司 Delay start method and system for timer
CN103345415A (en) * 2013-07-30 2013-10-09 广东欧珀移动通信有限公司 Terminal energy-saving method and device for management timer
CN103533184A (en) * 2013-10-30 2014-01-22 郭佳磊 Method for reducing standby power consumption of mobile phone
CN104412649A (en) * 2014-06-18 2015-03-11 华为技术有限公司 Heartbeat adjusting method, device and terminal

Also Published As

Publication number Publication date
CN106201729A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
CN108831448A (en) The method, apparatus and storage medium of voice control smart machine
CN104079473B (en) information issuing method and device
CN107436777B (en) Mobile terminal, application crash processing method and processing device
CN105975156B (en) Application interface display methods and device
CN107769881B (en) Information synchronization method, apparatus and system, storage medium
CN105553963B (en) The control method and device of positioning service
CN105512545B (en) Access rights management method and device
CN107222391A (en) Group's based reminding method, device and equipment
CN105208176B (en) Contact person record processing method and processing device
CN110493629A (en) Cover pendant display methods, device, electronic equipment and storage medium is broadcast live
CN104991855B (en) Interface interim card processing method and processing device
CN109714415A (en) Data processing method and device
CN110349578A (en) Equipment wakes up processing method and processing device
CN107396027A (en) Knock at the door information processing method and device
CN109039877A (en) A kind of method, apparatus, electronic equipment and storage medium showing unread message quantity
CN103905442A (en) Wakeup method and device in data synchronization
CN109814942A (en) A kind of parameter processing method and device
CN106231072B (en) Control method, device and the terminal device of prompting message
CN106502664B (en) User is reminded to open the method and device of application
CN105323318B (en) Amending method, device and the equipment of parameter
CN108111663A (en) Play multimedia method and device
WO2017016145A1 (en) State notification method and apparatus
CN106201729B (en) Timer alignment schemes and device
CN106533798B (en) Detection method and device
CN105607979A (en) Network interconnection control method and device

Legal Events

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