CN106774792A - Method for managing power supply and system - Google Patents
Method for managing power supply and system Download PDFInfo
- Publication number
- CN106774792A CN106774792A CN201611067483.2A CN201611067483A CN106774792A CN 106774792 A CN106774792 A CN 106774792A CN 201611067483 A CN201611067483 A CN 201611067483A CN 106774792 A CN106774792 A CN 106774792A
- Authority
- CN
- China
- Prior art keywords
- resource
- lock
- wake
- waken
- mobile terminal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3206—Monitoring of events, devices or parameters that trigger a change in power modality
- G06F1/3228—Monitoring task completion, e.g. by use of idle timers, stop commands or wait commands
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
- G06F1/329—Power saving characterised by the action undertaken by task scheduling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4418—Suspend and resume; Hibernate and awake
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
Abstract
A kind of method for managing power supply, is applied in mobile terminal, and methods described includes:It is one wake-up lock of the resource allocation when calling application resource is received to wake up lock;Judge whether the resource waken up corresponding to lock is system resource;When it is determined that whether the resource waken up corresponding to lock judges the resource on the white list for pre-setting when being nonsystematic resource;And when it is determined that the resource is not on the white list for pre-setting, the lock that wakes up is converted into the wake-up lock that time-out is specified, and wake up lock when at the appointed time reaching described in forcible aborting.The present invention also provides a kind of power-supply management system.The present invention can prevent nonsystematic resource or the resource not on the white list for pre-setting from calling wake-up to lock for a long time, reduce the loss of energy, reach the purpose for saving electricity.
Description
Technical field
The present invention relates to mobile communication technology field, and in particular to a kind of method for managing power supply and system.
Background technology
The usual power consumption of smart mobile phone is very fast, makes smart mobile phone into sleep state be as early as possible main when that need not use
One of electricity saving method.
But present smart mobile phone often installs many third party applications (APP), these third party APP in order to
Maintain the refreshing of its data or for other disagreeableness purposes, various timers, timing wake-up hand are often frequently set
Machine so that the power consumption degree of Android system doubles in geometric progression.Maximum arch-criminal in huge power consumption, is exactly third party App
Again and again wake-up lock (Wakelock) is called.
Once Wakelock has been arrived in application, according to the different types of Wakelock for applying, smart mobile phone can be all influenceed
Timely enter low power consumpting state.Influence includes that screen keeps bright screen state, or CPU to be always held at running status etc..From
And cause smart mobile phone entirety endurance to be deteriorated, have a strong impact on Consumer's Experience.
The content of the invention
In view of the foregoing, it is necessary to propose a kind of method for managing power supply and system, nonsystematic resource or not can be prevented
Resource on the white list for pre-setting is called hold Wakelock for a long time, so that mobile terminal can be timely entered sleeping
Dormancy state, reduces the loss of energy, reaches the purpose for saving electricity.
A kind of method for managing power supply, is applied in mobile terminal, and methods described includes:
It is one wake-up lock of the resource allocation when calling application resource is received to wake up lock;
Judge whether the resource waken up corresponding to lock is system resource;
When it is determined that the resource waken up corresponding to lock judges whether the resource is pre-setting when being nonsystematic resource
White list on;And
When it is determined that the resource is not on the white list for pre-setting, by it is described wake up lock be converted to time-out specify call out
Lock is waken up when waking up and lock, and at the appointed time reaching described in forcible aborting.
According to a preferred embodiment of the present invention, the resource includes that the third party in the mobile terminal should
With software, the related service that systems soft ware or the mobile terminal are provided.
According to a preferred embodiment of the present invention, methods described also includes:
When it is determined that the resource waken up corresponding to lock is system resource;Or
When it is determined that the resource waken up corresponding to lock for nonsystematic resource but the resource it is described pre-set it is white
When on list;
Keep the resource to hold over described wake-up to lock.
According to a preferred embodiment of the present invention, methods described also includes:
Overtime timer is set, the wake-up lock that the overtime timer is used to record the resource bid start working when
Between put and count it is described wake up lock operating time;And
When the overtime timer timing less than and the resource actively discharge it is described wake up lock when, remove it is described time-out determine
When device;Or
When overtime timer timing is expired, lock is waken up described in forcible aborting.
According to a preferred embodiment of the present invention, methods described also includes:
Display interface is provided, is used to facilitate user to check that resource transfer lock wakes up the frequency of lock, for calling wake-up frequency locking
Rate highest resource makes optimization, wherein, the optimization includes:
Wake-up frequency locking rate highest resource will be called to be placed into the automatic list for entering journey;Or pause calls wake-up to lock
Frequency highest resource;Or wake up automatic by institute after frequency locking rate highest resource enters backstage more than preset time period calling
State resource and be adjusted to resting state.
A kind of power-supply management system, runs in mobile terminal, and the system includes:
Distribute module, for being one wake-up of the resource allocation when calling application resource is received to wake up lock
Lock;
First judge module, for judging whether the resource waken up corresponding to lock is system resource;
Second judge module, for determining that the resource waken up corresponding to lock is nonsystematic when first judge module
Judge the resource whether on the white list for pre-setting during resource;And
Forcible aborting module, for determining the resource not in the white list for pre-setting when second judge module
When, the lock that wakes up is converted into the wake-up lock that time-out is specified, and wake up lock when at the appointed time reaching described in forcible aborting.
According to a preferred embodiment of the present invention, the resource includes that the third party in the mobile terminal should
With software, the related service that systems soft ware or the mobile terminal are provided.
According to a preferred embodiment of the present invention, the system also includes reservation module, is used for:
When it is system resource that first judge module determines the resource waken up corresponding to lock;Or
When first judge module determines that the resource waken up corresponding to lock is that nonsystematic resource but described second are sentenced
When disconnected module determines that the resource is on the white list for pre-setting;
Keep the resource to hold over described wake-up to lock.
According to a preferred embodiment of the present invention, the forcible aborting module, is additionally operable to:
Overtime timer is set, the wake-up lock that the overtime timer is used to record the resource bid start working when
Between put and count it is described wake up lock operating time;And
When the overtime timer timing less than and the resource actively discharge it is described wake up lock when, remove it is described time-out determine
When device;Or
When overtime timer timing is expired, lock is waken up described in forcible aborting.
According to a preferred embodiment of the present invention, the system also includes:
Display module, for providing display interface to facilitate user to check that resource transfer wakes up the frequency of lock, for calling
Wake up frequency locking rate highest resource and make optimization, wherein, the optimization includes:
Wake-up frequency locking rate highest resource will be called to be placed into the automatic list for entering journey;Or pause calls wake-up to lock
Frequency highest resource;Or wake up automatic by institute after frequency locking rate highest resource enters backstage more than preset time period calling
State resource and be adjusted to resting state.
Compared to prior art, using method for managing power supply of the present invention and system, the application of lock can be waken up to operation
Program or service judged, the wake-up lock operation duration that especially malicious third parties APP is set is judged, when detecting
When the reality of the wake-up lock operation of these program applications exceeds scheduled duration, Wakelock is automatically releasable, so that mobile terminal
Sleep state can be timely entered, the loss of energy is reduced, the purpose for saving electricity is reached.
Brief description of the drawings
It is the method flow diagram of method for managing power supply preferred embodiment of the present invention shown in Fig. 1.
It is the hardware architecture diagram of the mobile terminal for realizing method for managing power supply of the present invention shown in Fig. 2.
It is the functional block diagram of power-supply management system preferred embodiment of the present invention shown in Fig. 3.
Main element symbol description
Specific embodiment
In order that the object, technical solutions and advantages of the present invention are clearer, below in conjunction with the drawings and specific embodiments,
Technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only the present invention
A part of embodiment, rather than whole embodiments.Moreover, it will be appreciated that specific embodiments described herein, is only used to
The present invention is explained, is not intended to limit the present invention.
Based on the embodiment in the present invention, those of ordinary skill in the art institute on the premise of creative work is not made
The every other embodiment for obtaining, belongs to the scope of protection of the invention.
It is the method flow diagram of method for managing power supply preferred embodiment of the present invention with reference to shown in Fig. 1.The preferred embodiment
In method as performed by mobile terminal.In the present embodiment, the mobile terminal can be, for example, smart mobile phone, flat board electricity
Brain, notebook computer, Wearable and other any mobile terminals with PMU.
According to different demands, the execution sequence in flow chart shown in Fig. 1 can change, and some can be omitted.
S11, the mobile terminal receive resource to wake up lock when calling application for the resource allocation one is called out
Wake up and lock.
In certain embodiments, the system of the mobile terminal can be Android (Android) system, be arranged on
Application or service in android system can occupy one when cpu resource is applied for and wake up lock (Wakelock).
Wakelock as the one kind in electric power management mechanism in Android system, in order to ensure key code in application program
Correct execution, application program needed to power management framework application Wakelock, to prevent system from entering resting state.Until
After all of Wakelock is released, system can just enter resting state.That is, as long as there is the wake-up being active to lock,
Android system cannot propagate into dormancy.
Power management services (Power Manager Service, PMS) when having detected Wakelock and being occupied, meeting
The resources such as CPU, screen are kept to be active by other Service controll kernels of kernel interface and android system.
When there is no the Wakelock of any activity in system, system will be allowed to enter automatic stand-by flow.
In certain embodiments, the resource includes the third-party application software in android system, and system is soft
The related service that part or system are provided, the resource is by preset function, such as acquire () function, to described
PMS applications.
S12, the mobile terminal judges whether the resource waken up corresponding to lock is system resource.
In certain embodiments, the resource of the mobile terminal is divided into system resource and nonsystematic resource.Wherein, the system
System resource refers to control and coordinates the mobile terminal and external equipment, and the system for supporting applied software development and operation, is nothing
Need the set of the various programs of user intervention.The nonsystematic resource includes installing third-party application software in the system
(application software), is various programming languages that user can use, and use various program design languages
Say the set of the application program of establishment.
In certain embodiments, the UID (user identity) of the corresponding Linux of each process of Android system, described
Mobile terminal determines that the resource is system resource according to the UID.In some other embodiment, the mobile terminal is also
The publisher of the resource corresponding to lock can be waken up by inquiring about to judge whether the resource is system resource.For third party
APP, it is also possible to confirmed by wrapping name (package name).
In certain embodiments, when it is nonsystematic resource that the mobile terminal determines the resource, step S13 is performed;
When it is system resource that the mobile terminal determines the resource, step S15 is performed.
Whether S13, the mobile terminal judges the resource on the white list for pre-setting.
In certain embodiments, the mobile terminal pre-sets white list, and can be recorded on the white list need not
It is forced the title that release wakes up the resource of lock.
Record need not be forced the title that release wakes up the resource of lock on the white list, mainly consider that some are
The other application software of irrespective of size, such as downloads class application software, music application, it is desired nonetheless to hold Wakelock for a long time to ensure certainly
Body function, so add these resources waking up lock to can ensure in the white list to be not suitable for since to carry out forcible aborting
The Wakelock of resource bid will not be forced release.
In certain embodiments, the white list can be by the mobile terminal default setting, additionally, the white list may be used also
User option is provided, is voluntarily added, delete or is changed according to actual needs for user.
In certain embodiments, the mobile terminal can determine to wake up the money corresponding to lock by the method for fuzzy matching
Whether source is on the white list for pre-setting.
In certain embodiments, when the mobile terminal determines the resource not on the white list for pre-setting
When, perform step S14;When the mobile terminal determines that the resource is on the white list for pre-setting, step is performed
S15。
The lock that wakes up is converted to the wake-up lock that time-out is specified by S14, the mobile terminal, and when at the appointed time reaching
Lock is waken up described in forcible aborting.
In certain embodiments, the mobile terminal determines to apply for that the resource for waking up lock is nonsystematic resource and the money
When source is not in the white list, then the lock that wakes up is converted into the wake-up lock that time-out is specified.
Wake-up that the time-out is specified lock refer to for the wake-up lock specifies operating time, it is operationally long when reaching,
The wake-up lock is automatically released, so that resource no longer holds wake-up lock.
In certain embodiments, overtime timer is additionally provided with the mobile terminal, the overtime timer is used to remember
The operating time recorded the wake-up lock time point started working of the resource bid and count the wake-up lock, lock is waken up described
Operating time exceed default specified duration when forcible aborting described in wake up lock.
Specifically, the overtime timer timing less than when, the resource actively discharge it is described wake up lock, then remove
The overtime timer;And when overtime timer timing is expired, lock is waken up described in forcible aborting.
In certain embodiments, the mobile terminal actively discharges Wakelock by calling release () function, once
Wake-up lock in system is all discharged, that is, when the wake-up for being not on active state is locked, the mobile terminal can enter to be treated
Machine state, in low-power consumption.
In certain embodiments, after the mobile terminal forcible aborting Wakelock, the overtime timer is removed.
S15, the mobile terminal keeps the resource to hold over the wake-up lock.
In certain embodiments, it is system resource that the mobile terminal determines apply to wake up the resource locked, or described
Resource be nonsystematic resource but the resource in the white list when, the running status for continuing to keep waking up lock is constant.
Further, methods described can also include:Display interface is provided, is used to facilitate user can check resource transfer
The frequency of Wakelock.
After user finds the resource for calling Wakelock again and again, you can pointedly make optimization.For calling
The Wakelock frequency optimizations to be made of highest resource include:Wakelock frequency highest resources will be called to be placed into
In the automatic list for entering journey, mustn't the resident backstage of these resources;Or pause call Wakelock frequency highest resources from
And reach the purpose for saving electricity;Or after calling Wakelock frequency highests resource to enter backstage more than preset time period
Automatically the resource is adjusted to resting state.
In sum, method for managing power supply of the present invention, be when calling application resource is received to wake up lock
The resource allocation one wakes up lock, judges whether the resource waken up corresponding to lock is system resource, when it is determined that the resource is
During nonsystematic resource, whether the resource is determined whether on the white list for pre-setting, when the mobile terminal determines institute
When stating resource not on the white list, the lock that wakes up is converted into the wake-up lock that time-out is specified, and at the appointed time reach
When forcible aborting described in wake up lock;It is system resource that the mobile terminal determines apply to wake up the resource locked, or the money
Source be nonsystematic resource but the resource in the white list when, the running status for continuing to keep waking up lock is constant.Therefore, institute
The method for managing power supply stated can be realized for the apllied lock that wakes up of nonsystematic resource carrying out forcible aborting Wakelock, it is to avoid call out
Lock of waking up is active for a long time so that the system cannot be introduced into holding state, strengthen the power management to system, reach
The purpose for saving electricity is arrived.
The above, is only specific embodiment of the invention, but protection scope of the present invention is not limited thereto, for
For one of ordinary skill in the art, without departing from the concept of the premise of the invention, improvement, but these can also be made
Belong to protection scope of the present invention.
Above-mentioned Fig. 1 describes method for managing power supply of the invention in detail, above-mentioned to realizing respectively with reference to the 2nd~3 figure
The hardware configuration and functional module of the mobile terminal of method for managing power supply are introduced.
It should be appreciated that the embodiment is only purposes of discussion, do not limited by this structure in patent claim.
As shown in Fig. 2 being the hardware architecture diagram of the mobile terminal for realizing method for managing power supply of the present invention.
In present pre-ferred embodiments, the mobile terminal 1 includes memory 11, at least one processor 12, at least
One communication bus 13, receiver 14, transmitter 15 and power supply module 16.It should be appreciated that the mobile terminal 1 can also include
Other hardware or software part, and it is not restricted to the above-mentioned part enumerated.
In certain embodiments, the mobile terminal 1 include it is a kind of can be according to the instruction being previously set or store, automatically
Carry out the mobile terminal of numerical computations and/or information processing, its hardware include but is not limited to microprocessor, application specific integrated circuit,
Programmable gate array, digital processing unit, embedded device etc..The mobile terminal 1 may also include user equipment.The user sets
Standby including but not limited to any one can be carried out with user by modes such as keyboard, mouse, remote control, touch pad or voice-operated devices
The electronic product of man-machine interaction, for example, personal computer, panel computer, smart mobile phone, intellectual wearable device etc..
It should be noted that the mobile terminal 1 is only for example, other electronic products that are existing or being likely to occur from now on
The present invention is such as adaptable to, should be also included within protection scope of the present invention, and be incorporated herein by reference.
In certain embodiments, the memory 11 is used for store program codes and various data, such as described power supply pipe
Reason system 10, and high speed is realized in mobile terminal 1 running, the access of program or data is automatically completed.The storage
Device 11 can be the internal storage unit of the mobile terminal 1, such as the hard disk or internal memory of described mobile terminal 1.It is described to deposit
Reservoir 11 can also be the external memory unit of the mobile terminal 1, such as plug-in type hard disk, intelligence in described mobile terminal 1
Can media card (Smart Media Card, SMC), safe digital card (Secure Digital Card, SD), flash memory
The storage elements such as card (flash card).Further, the memory 11 can also both include the inside of the mobile terminal 1
Memory cell, it is also possible to including external memory unit.
In the present embodiment, the memory 11 is previously stored with white list, and be have recorded on the white list need not quilt
Forcible aborting wakes up the title of the resource of lock, the mainly application software of system level, and such as downloading class application software, music should
With, it is necessary to hold Wakelock to ensure the function of itself for a long time.
In certain embodiments, the processor 12 is one or more central processing unit (Central
Processing unit, CPU), microprocessor or other digital processing chips etc., be the arithmetic core (Core) of mobile terminal 1
With control core (Control Unit).The data that the processor 12 is used in interpreter directive and treatment software, example
Such as perform power-supply management system 10.
In certain embodiments, the communication bus 13 is arranged to realize the memory 11, the processor 12, institute
State the connection communication between receiver 14, the transmitter 15 and power supply module 16 etc..
In certain embodiments, the receiver 14 and the transmitter 15 can be wired sending ports, or
Wireless device, such as including antenna assembly, for entering row data communication with other equipment.
In certain embodiments, the power supply module 16 is used for required for all component is provided in the mobile terminal 1
Electric energy.The power supply module 16 can include power-supply management system, one or more power supplys, and other be the mobile end
The generation of end 1, management and the associated component of distribution electric power.
It should be appreciated that the embodiment is only purposes of discussion, do not limited by this structure in patent claim.
Refering to shown in Fig. 3, being functional block diagram in the power management preferred embodiment of power-supply management system of the present invention 10.
In certain embodiments, during the power-supply management system 10 runs on the mobile terminal 1.The power management system
System 10 can include multiple functional modules (referring to Fig. 3) being made up of program code segments.In the power-supply management system 10
The program code of each program segment can be stored in the memory 11, and as performed by the processor 12, to perform (in detail
See described in Fig. 1).
In the present embodiment, function of the power-supply management system 10 according to performed by it can be divided into multiple functions
Module.The functional module can include:Distribute module 101, the first judge module 102, the second judge module 103, pressure are released
Amplification module 104, reservation module 105 and display module 106.Module alleged by the present invention refers to that one kind can be held by processor 12
Series of computation machine program segment that is capable and can completing fixing function, its storage is in memory 11.In the present embodiment, close
To be described in detail in follow-up embodiment in the function of each module.
The distribute module 101, for being the resource allocation one when calling application resource is received to wake up lock
It is individual to wake up lock.
In certain embodiments, the system of the mobile terminal 1 can be Android (Android) system, be arranged on
Application or service in android system can occupy one when cpu resource is applied for and wake up lock (Wakelock).
Wakelock as the one kind in electric power management mechanism in Android system, in order to ensure key code in application program
Correct execution, application program needed to power management framework application Wakelock, to prevent system from entering resting state.Until
After all of Wakelock is released, system can just enter resting state.That is, as long as there is the wake-up being active to lock,
Android system cannot propagate into dormancy.
Power management services (Power Manager Service, PMS) when having detected Wakelock and being occupied, meeting
The resources such as CPU, screen are kept to be active by other Service controll kernels of kernel interface and android system.
When there is no the Wakelock of any activity in system, system will be allowed to enter automatic stand-by flow.
In certain embodiments, the resource includes the third-party application software in android system, and system is soft
The related service that part or system are provided, the resource is by preset function, such as acquire () function, to described
PMS applications.
First judge module 102, for judging whether the resource waken up corresponding to lock is system resource.
In certain embodiments, the resource of the mobile terminal 1 is divided into system resource and nonsystematic resource.Wherein, it is described
System resource refers to control and coordinates the mobile terminal 1 and external equipment, and the system for supporting applied software development and operation is
Without the set of the various programs of user intervention.The nonsystematic resource includes that the third-party application installed in the system is soft
Part (application software), is various programming languages that user can use, and use various programmings
The set of the application program of language establishment.
In certain embodiments, the UID (user identity) of the corresponding Linux of each process of Android system, described
First judge module 102 determines that the resource is system resource according to the UID.In some other embodiment, described
One judge module 102 can also judge whether the resource is system by inquiring about the publisher of the resource corresponding to wake-up lock
Resource.For third party APP, first judge module 102 can also be confirmed by wrapping name (package name).
In certain embodiments, when it is nonsystematic resource that first judge module 102 determines the resource, institute is performed
State the second judge module 103;When it is system resource that first judge module 102 determines the resource, the reservation is performed
Module 105.
Second judge module 103, for judging the resource whether in the white list for pre-setting.
In certain embodiments, the mobile terminal 1 pre-sets white list, and can be recorded on the white list need not
It is forced the title that release wakes up the resource of lock.
Record need not be forced the title that release wakes up the resource of lock on the white list, mainly consider that some are
The other application software of irrespective of size, such as downloads class application software, music application, it is desired nonetheless to hold Wakelock for a long time to ensure certainly
Body function, so add these resources waking up lock to can ensure in the white list to be not suitable for since to carry out forcible aborting
The Wakelock of resource bid will not be forced release.
In certain embodiments, the white list can be by the mobile terminal 1 default setting, additionally, the white list is also
User option can be provided, voluntarily added, delete or changed according to actual needs for user.
In certain embodiments, second judge module 103 can determine to wake up lock institute by the method for fuzzy matching
Whether corresponding resource is on the white list for pre-setting.
In certain embodiments, when second judge module 103 determine the resource not it is described pre-set it is white
When on list, the forcible aborting module 104 is performed;When second judge module 103 determines the resource described advance
When on the white list of setting, the reservation module 105 is performed.
The forcible aborting module 104, for the lock that wakes up to be converted into the wake-up lock that time-out is specified, and when specified
Between reach when forcible aborting described in wake up lock.
In certain embodiments, first judge module 102 determines to apply for that the resource for waking up lock is nonsystematic resource
And second judge module 103 is when determining the resource not in the white list, then the forcible aborting module 104 is by institute
State to wake up to lock and be converted to the wake-up lock that time-out is specified.
Wake-up that the time-out is specified lock refer to for the wake-up lock specifies operating time, it is operationally long when reaching,
The wake-up lock is automatically released, so that resource no longer holds wake-up lock.
In certain embodiments, forcible aborting module 104 is additionally provided with overtime timer, and the overtime timer is used to remember
The operating time recorded the wake-up lock time point started working of the resource bid and count the wake-up lock, lock is waken up described
Operating time exceed default specified duration when forcible aborting described in wake up lock.
Specifically, the overtime timer timing less than when, the resource actively discharge it is described wake up lock, then it is described
Forcible aborting module 104 removes the overtime timer;And when overtime timer timing is expired, the forcible aborting module
Lock is waken up described in 104 forcible abortings.
In certain embodiments, the forcible aborting module 104 is actively discharged by calling release () function
Wakelock, once the wake-up lock in system is all discharged, that is, and it is described mobile whole when the wake-up for being not on active state is locked
End 1 can enter holding state, in low-power consumption.
In certain embodiments, after the forcible aborting Wakelock of the forcible aborting module 104, the time-out timing is removed
Device.
The reservation module 105, locks for keeping the resource to hold over described wake-up.
In certain embodiments, the resource that first judge module 102 determines to apply for wake-up lock is system resource, or
The first judge module of person 102 determines the resource for nonsystematic resource but second judge module 103 determines that the resource exists
When in the white list, the running status that the reservation module 105 continues to keep waking up lock is constant.
Further, the power-supply management system 10 can also be used for including display module 106:Display interface is provided, is used
To facilitate user to check the frequency of resource transfer Wakelock.
After user finds the resource for calling Wakelock again and again, you can pointedly make optimization.For calling
The Wakelock frequency optimizations to be made of highest resource include:Wakelock frequency highest resources will be called to be placed into
In the automatic list for entering journey, mustn't the resident backstage of these resources;Or pause call Wakelock frequency highest resources from
And reach the purpose for saving electricity;Or after calling Wakelock frequency highests resource to enter backstage more than preset time period
Automatically the resource is adjusted to resting state.
In sum, power-supply management system of the present invention 10, the distribute module 101 is receiving resource to waking up
Lock when calling application for the resource allocation one wake up lock, first judge module 102 judges to wake up corresponding to lock
Whether resource is system resource, and when it is nonsystematic resource that first judge module 102 determines the resource, described second sentences
Whether disconnected module 103 determines whether the resource on the white list for pre-setting, when second judge module 103 determines
When the resource is not on the white list, the forcible aborting module 104 by it is described wake up lock be converted to time-out specify call out
Lock is waken up when waking up and lock, and at the appointed time reaching described in forcible aborting;First judge module 102 determines to apply waking up lock
Resource be system resource, or first judge module 102 determines the resource for nonsystematic resource but described second sentences
When disconnected module 103 determines that the resource is in the white list, the reservation module 105 continues the running status for keeping waking up lock
It is constant.Therefore, described power-supply management system can be realized for the apllied lock that wakes up of nonsystematic resource carrying out forcible aborting
Wakelock, it is to avoid wake up lock and be active for a long time so that the system cannot be introduced into holding state, strengthen to being
The power management of system, has reached the purpose for saving electricity.
The above-mentioned integrated unit realized in the form of software function module, can store and be deposited in an embodied on computer readable
In storage media.Above-mentioned software function module storage is in a storage medium, including some instructions are used to so that a computer
It is each that equipment (can be personal computer, mobile terminal, or network equipment etc.) or processor (processor) perform the present invention
The part of individual embodiment methods described.
In a further embodiment, with reference to Fig. 2, at least one processor 12 can perform the mobile terminal 1
Operating system and the types of applications program of installation (power-supply management system 10 as mentioned), program code etc., for example, above-mentioned
Modules, including it is described:Distribute module 101, the first judge module 102, the second judge module 103, forcible aborting module
104th, reservation module 105 and display module 106.
Have program stored therein code in the memory 11, and at least one processor 12 can call the memory 11
The program code of middle storage with perform correlation function.For example, the modules described in Fig. 3 are (for example, distribute module 101,
One judge module 102, the second judge module 103, forcible aborting module 104, reservation module 105 and display module 106 etc.) it is to deposit
Store up program code in the memory 11, and as performed by least one processor 12, thus realize it is described each
The function of module saves the purpose of electricity to reach.
In one embodiment of the invention, the memory 11 storage multiple instruction, the multiple instruction by it is described extremely
The performed optimum management to realize power supply of a few processor 12.Specifically, described at least one processor 12 pairs
The execution of multiple instruction includes:
It is one wake-up lock of the resource allocation when calling application resource is received to wake up lock;
Judge whether the resource waken up corresponding to lock is system resource;
When it is determined that the resource waken up corresponding to lock judges whether the resource is pre-setting when being nonsystematic resource
White list on;And
When it is determined that the resource is not on the white list for pre-setting, by it is described wake up lock be converted to time-out specify call out
Lock is waken up when waking up and lock, and at the appointed time reaching described in forcible aborting.
In a preferred embodiment, the resource includes the third-party application software in the mobile terminal,
The related service that systems soft ware or the mobile terminal are provided.
In a preferred embodiment, at least one processor 12 further performs to give an order:
When it is determined that the resource waken up corresponding to lock is system resource;Or
When it is determined that the resource waken up corresponding to lock for nonsystematic resource but the resource it is described pre-set it is white
When on list;
Keep the resource to hold over described wake-up to lock.
In a preferred embodiment, at least one processor 12 further performs to give an order:
Overtime timer is set, the wake-up lock that the overtime timer is used to record the resource bid start working when
Between put and count it is described wake up lock operating time;And
When the resource actively discharge it is described wake up lock and overtime timer timing less than when, remove the time-out fixed
When device;Or
When overtime timer timing is expired, lock is waken up described in forcible aborting.
In a preferred embodiment, at least one processor 12 further performs to give an order:
Display interface is provided, is used to facilitate user to check that resource transfer wakes up the frequency of lock, frequency locking rate is waken up for calling
Highest resource makes optimization, wherein, the optimization includes:
Wake-up frequency locking rate highest resource will be called to be placed into the automatic list for entering journey;Or pause calls wake-up to lock
Frequency highest resource;Or wake up automatic by institute after frequency locking rate highest resource enters backstage more than preset time period calling
State resource and be adjusted to resting state.
Specifically, at least one processor 12 refers to Fig. 1 correspondence implementations to the concrete methods of realizing of above-mentioned instruction
The description of correlation step, will not be described here in example.
In several embodiments provided by the present invention, it should be understood that disclosed system, apparatus and method can be with
Realize by another way.For example, device embodiment described above is only schematical, for example, the module
Divide, only a kind of division of logic function there can be other dividing mode when actually realizing.
The module that is illustrated as separating component can be or may not be it is physically separate, it is aobvious as module
The part for showing can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of module therein can be according to the actual needs selected to realize the mesh of this embodiment scheme
's.
In addition, during each functional module in each embodiment of the invention can be integrated in a processing unit, it is also possible to
It is that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.Above-mentioned integrated list
Unit can both be realized in the form of hardware, it would however also be possible to employ hardware adds the form of software function module to realize.
It is obvious to a person skilled in the art that the invention is not restricted to the details of above-mentioned one exemplary embodiment, Er Qie
In the case of without departing substantially from spirit or essential attributes of the invention, the present invention can be in other specific forms realized.Therefore, no matter
From the point of view of which point, embodiment all should be regarded as exemplary, and be nonrestrictive, the scope of the present invention is by appended power
Profit requires to be limited rather than described above, it is intended that all in the implication and scope of the equivalency of claim by falling
Change is included in the present invention.Any reference in claim should not be considered as the claim involved by limitation.This
Outward, it is clear that " including " word is not excluded for other units or, odd number is not excluded for plural number.The multiple units stated in system claims
Or device can also be realized by a unit or device by software or hardware.The first, the second grade word is used for representing name
Claim, and be not offered as any specific order.
Finally it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention and it is unrestricted, although reference
Preferred embodiment has been described in detail to the present invention, it will be understood by those within the art that, can be to of the invention
Technical scheme is modified or equivalent, without deviating from the spirit and scope of technical solution of the present invention.
Claims (10)
1. a kind of method for managing power supply, is applied in mobile terminal, it is characterised in that methods described includes:
It is one wake-up lock of the resource allocation when calling application resource is received to wake up lock;
Judge whether the resource waken up corresponding to lock is system resource;
When it is determined that the resource waken up corresponding to lock judges whether the resource is white what is pre-set when being nonsystematic resource
On list;And
When it is determined that the resource is not on the white list for pre-setting, the lock that wakes up is converted into the wake-up that time-out is specified
Lock, and lock is waken up when at the appointed time reaching described in forcible aborting.
2. method for managing power supply as claimed in claim 1, it is characterised in that the resource includes being arranged on the mobile terminal
In third-party application software, the related service that systems soft ware or the mobile terminal are provided.
3. method for managing power supply as claimed in claim 1, it is characterised in that methods described also includes:
When it is determined that the resource waken up corresponding to lock is system resource;Or
When it is determined that the resource waken up corresponding to lock is for nonsystematic resource but the resource is in the white list for pre-setting
When upper;
Keep the resource to hold over described wake-up to lock.
4. method for managing power supply as claimed in claim 1, it is characterised in that methods described also includes:
Overtime timer is set, and the overtime timer is used to record the time point that the wake-up lock of the resource bid is started working
And count the operating time for waking up lock;And
When the overtime timer timing less than and the resource actively discharge it is described wake up lock when, remove it is described time-out regularly
Device;Or
When overtime timer timing is expired, lock is waken up described in forcible aborting.
5. the method for managing power supply as described in any one in Claims 1-4, it is characterised in that methods described also includes:
Display interface is provided, is used to facilitate user to check that resource transfer wakes up the frequency of lock, frequency locking rate highest is waken up for calling
Resource make optimization, wherein, the optimization includes:
Wake-up frequency locking rate highest resource will be called to be placed into the automatic list for entering journey;Or wake-up frequency locking rate is called in pause
Highest resource;Or wake up automatic by the money after frequency locking rate highest resource enters backstage more than preset time period calling
Source is adjusted to resting state.
6. a kind of power-supply management system, in running on mobile terminal, it is characterised in that the system includes:
Distribute module, for being one wake-up lock of the resource allocation when calling application resource is received to wake up lock;
First judge module, for judging whether the resource waken up corresponding to lock is system resource;
Second judge module, for determining that the resource waken up corresponding to lock is nonsystematic resource when first judge module
When judge the resource whether on the white list for pre-setting;And
Forcible aborting module, for when second judge module determines the resource not on the white list for pre-setting,
The lock that wakes up is converted into the wake-up lock that time-out is specified, and wakes up lock when at the appointed time reaching described in forcible aborting.
7. power-supply management system as claimed in claim 6, it is characterised in that the resource includes being arranged on the mobile terminal
In third-party application software, the related service that systems soft ware or the mobile terminal are provided.
8. power-supply management system as claimed in claim 6, it is characterised in that the system also includes reservation module, is used for:
When it is system resource that first judge module determines the resource waken up corresponding to lock;Or
When first judge module determines that the resource waken up corresponding to lock is that nonsystematic resource but described second judge mould
When block determines that the resource is on the white list for pre-setting;
Keep the resource to hold over described wake-up to lock.
9. power-supply management system as claimed in claim 6, it is characterised in that the forcible aborting module, is additionally operable to:
Overtime timer is set, and the overtime timer is used to record the time point that the wake-up lock of the resource bid is started working
And count the operating time for waking up lock;And
When the resource actively discharge it is described wake up lock and the overtime timer timing less than when, remove it is described time-out timing
Device;Or
When overtime timer timing is expired, lock is waken up described in forcible aborting.
10. the power-supply management system as described in any one in claim 6 to 9, it is characterised in that the system also includes:
Display module, for providing display interface to facilitate user to check that resource transfer wakes up the frequency of lock, for calling wake-up
Frequency locking rate highest resource makes optimization, wherein, the optimization includes:
Wake-up frequency locking rate highest resource will be called to be placed into the automatic list for entering journey;Or wake-up frequency locking rate is called in pause
Highest resource;Or wake up automatic by the money after frequency locking rate highest resource enters backstage more than preset time period calling
Source is adjusted to resting state.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611067483.2A CN106774792A (en) | 2016-11-28 | 2016-11-28 | Method for managing power supply and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611067483.2A CN106774792A (en) | 2016-11-28 | 2016-11-28 | Method for managing power supply and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106774792A true CN106774792A (en) | 2017-05-31 |
Family
ID=58902359
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611067483.2A Pending CN106774792A (en) | 2016-11-28 | 2016-11-28 | Method for managing power supply and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106774792A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106775759A (en) * | 2017-01-03 | 2017-05-31 | 惠州Tcl移动通信有限公司 | Detection method and system that a kind of application based on mobile terminal is closed |
CN107291212A (en) * | 2017-06-16 | 2017-10-24 | 深圳天珑无线科技有限公司 | Power lock processing method and processing device |
CN107302789A (en) * | 2017-06-21 | 2017-10-27 | 上海集赫电子商务有限公司 | A kind of method and system for improving Android device battery durable ability |
CN107592665A (en) * | 2017-10-27 | 2018-01-16 | 维沃移动通信有限公司 | A kind of control method of application program, device and mobile terminal |
CN108008979A (en) * | 2017-11-28 | 2018-05-08 | 深圳天珑无线科技有限公司 | The management method and its terminal, storage medium that terminal wakes up |
CN108121570A (en) * | 2017-12-21 | 2018-06-05 | 深圳市沃特沃德股份有限公司 | The method and apparatus of onboard system dormancy |
CN108595309A (en) * | 2018-05-16 | 2018-09-28 | 云南大学 | High energy consumption software evaluation method based on wakelock |
CN113438553A (en) * | 2021-06-22 | 2021-09-24 | 海信视像科技股份有限公司 | Display equipment awakening method and display equipment |
CN115016849A (en) * | 2022-04-19 | 2022-09-06 | 展讯通信(上海)有限公司 | Electronic system control method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104156053A (en) * | 2014-07-29 | 2014-11-19 | 深圳市中兴移动通信有限公司 | Abnormal power consumption control method, abnormal power consumption control device and mobile terminal |
CN105183137A (en) * | 2015-09-09 | 2015-12-23 | 厦门美图移动科技有限公司 | Mobile terminal and wake lock control method and system thereof |
CN105807894A (en) * | 2016-03-22 | 2016-07-27 | 北京小米移动软件有限公司 | Processing method and device of lock holding of application |
CN105824392A (en) * | 2015-11-26 | 2016-08-03 | 维沃移动通信有限公司 | Application program management method and terminal |
CN106055074A (en) * | 2016-05-31 | 2016-10-26 | 广东欧珀移动通信有限公司 | Method and device for processing application program |
-
2016
- 2016-11-28 CN CN201611067483.2A patent/CN106774792A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104156053A (en) * | 2014-07-29 | 2014-11-19 | 深圳市中兴移动通信有限公司 | Abnormal power consumption control method, abnormal power consumption control device and mobile terminal |
CN105183137A (en) * | 2015-09-09 | 2015-12-23 | 厦门美图移动科技有限公司 | Mobile terminal and wake lock control method and system thereof |
CN105824392A (en) * | 2015-11-26 | 2016-08-03 | 维沃移动通信有限公司 | Application program management method and terminal |
CN105807894A (en) * | 2016-03-22 | 2016-07-27 | 北京小米移动软件有限公司 | Processing method and device of lock holding of application |
CN106055074A (en) * | 2016-05-31 | 2016-10-26 | 广东欧珀移动通信有限公司 | Method and device for processing application program |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106775759A (en) * | 2017-01-03 | 2017-05-31 | 惠州Tcl移动通信有限公司 | Detection method and system that a kind of application based on mobile terminal is closed |
CN107291212A (en) * | 2017-06-16 | 2017-10-24 | 深圳天珑无线科技有限公司 | Power lock processing method and processing device |
CN107302789A (en) * | 2017-06-21 | 2017-10-27 | 上海集赫电子商务有限公司 | A kind of method and system for improving Android device battery durable ability |
CN107302789B (en) * | 2017-06-21 | 2021-04-16 | 上海集赫电子商务有限公司 | Method and system for improving battery endurance of android device |
CN107592665A (en) * | 2017-10-27 | 2018-01-16 | 维沃移动通信有限公司 | A kind of control method of application program, device and mobile terminal |
CN108008979A (en) * | 2017-11-28 | 2018-05-08 | 深圳天珑无线科技有限公司 | The management method and its terminal, storage medium that terminal wakes up |
CN108121570A (en) * | 2017-12-21 | 2018-06-05 | 深圳市沃特沃德股份有限公司 | The method and apparatus of onboard system dormancy |
CN108121570B (en) * | 2017-12-21 | 2021-01-19 | 深圳市沃特沃德股份有限公司 | Method and device for sleeping vehicle-mounted system |
CN108595309A (en) * | 2018-05-16 | 2018-09-28 | 云南大学 | High energy consumption software evaluation method based on wakelock |
CN113438553A (en) * | 2021-06-22 | 2021-09-24 | 海信视像科技股份有限公司 | Display equipment awakening method and display equipment |
CN113438553B (en) * | 2021-06-22 | 2023-05-12 | 海信视像科技股份有限公司 | Display device awakening method and display device |
CN115016849A (en) * | 2022-04-19 | 2022-09-06 | 展讯通信(上海)有限公司 | Electronic system control method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106774792A (en) | Method for managing power supply and system | |
US11200101B2 (en) | Managing applications for power conservation | |
US11252665B2 (en) | Data transmission method, base station and terminal | |
EP3268842B1 (en) | Methods and systems for coordination of operating states amongst multiple socs within a computing device | |
CN104583900B (en) | Switching at runtime service load between the processor's heterogeneous cores | |
US20130191541A1 (en) | Background task resource control | |
CN102651785A (en) | Remote wakeup of application processor of mobile device | |
CN111625080B (en) | Server energy saving method and device, electronic equipment and storage medium | |
KR20080079276A (en) | Method and apparatus for providing for detecting processor state transitions | |
CN102385531B (en) | Apparatus for performing timer management and associated method | |
CN103345415A (en) | Terminal energy-saving method and device for management timer | |
CN106502687A (en) | A kind of method and terminal for entering resting state | |
CN104808767A (en) | Terminal control method | |
CN104756042A (en) | Apparatus and method for controlling operation mode in a wireless terminal | |
CN104536739A (en) | Method for arousing terminal system | |
KR102060431B1 (en) | Apparatus and method for managing power in multi-core system | |
WO2015172283A1 (en) | Method, device and mobile terminal for reducing power consumption | |
CN104808766A (en) | Terminal | |
CN105824660A (en) | Application program updating method and terminal | |
CN105320244A (en) | Input-output device management using dynamic clock frequency | |
CN112114651B (en) | Power saving method and device for processor cluster, chip, equipment and storage medium | |
CN106814840A (en) | Low power state for processor keeps pattern | |
CN109992360A (en) | Process handling method and device, electronic equipment, computer readable storage medium | |
CN101866212A (en) | Multi-mode power source managing device and managing method | |
CN113766611A (en) | Low-power-consumption control optimization method and device, mobile terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170531 |
|
RJ01 | Rejection of invention patent application after publication |