CN107391198A - Method for scheduling task and device, computer-readable recording medium, mobile terminal - Google Patents
Method for scheduling task and device, computer-readable recording medium, mobile terminal Download PDFInfo
- Publication number
- CN107391198A CN107391198A CN201710613803.8A CN201710613803A CN107391198A CN 107391198 A CN107391198 A CN 107391198A CN 201710613803 A CN201710613803 A CN 201710613803A CN 107391198 A CN107391198 A CN 107391198A
- Authority
- CN
- China
- Prior art keywords
- foreground application
- foreground
- task
- module
- application
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44594—Unloading
-
- 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Telephone Function (AREA)
- Stored Programmes (AREA)
Abstract
A kind of method for scheduling task and device, computer-readable recording medium, mobile terminal.Method for scheduling task, including:Process corresponding to background application consuming task is registered;Obtain foreground application and monitor the foreground application data that module is monitored, the foreground application data include the stability information of the foreground application;When the foreground application is in stable state and belongs to the protection category of white list, then the process corresponding to the consuming task is closed.Above-mentioned method for scheduling task is when the foreground application is in stable state and belongs to the protection category of white list; then close the process corresponding to the consuming task; consuming task and the situation of foreground application preempting resources can be just avoided to occur; it can ensure there are enough resources to utilize during foreground application operation; smoothness operation, there is provided user experience.
Description
Technical field
The present invention relates to technical field of data processing, more particularly to method for scheduling task and device, computer-readable deposit
Storage media, mobile terminal.
Background technology
With mobile terminal, such as the popularization of smart mobile phone and tablet personal computer and the enhancing of function, user is for smart mobile phone
Performance requirement more and more higher, wherein, systematic function can be analyzed in the operating system of mobile terminal.
The operating system of intelligent mobile terminal in use, has many task process in running background, and wherein
Some background applications easily cause foreground application to obtain when performing work time-consuming, that CPU usage is high because seizing cpu resource
Resource it is few, cause foreground application perform interim card occurs not in time, influence Consumer's Experience.
The content of the invention
The embodiment of the present invention provides a kind of method for scheduling task and device, computer-readable recording medium, mobile terminal, can
To improve the Experience Degree of the fluency of foreground application and user.
A kind of method for scheduling task, including:
Process corresponding to background application consuming task is registered;
Obtain foreground application and monitor the foreground application data that module is monitored, the foreground application data should including the foreground
Stability information;
When the foreground application is in stable state and belongs to the protection category of white list, then the consuming task is closed
Corresponding process.
Above-mentioned method for scheduling task, by the registration for receiving the process corresponding to background application consuming task;Obtain foreground
The foreground application data monitored using module is monitored, the foreground application data include the stability information of the foreground application;
When the foreground application is in stable state and belongs to the protection category of white list, then close corresponding to the consuming task
Process, it becomes possible to avoid consuming task and the situation of foreground application preempting resources from occurring, can ensure have during foreground application operation
Enough resources can utilize, smoothness operation, there is provided user experience.
A kind of task scheduling apparatus, including:
Registering modules, for being registered to the process corresponding to background application consuming task;
Acquisition module, the foreground application data monitored module for obtaining foreground application and monitored, the foreground application data
Stability information including the foreground application;And
Scheduler module, for when the foreground application is in stable state and belongs to the protection category of white list, then closing
Close the process corresponding to the consuming task.
One or more includes the non-volatile computer readable storage medium storing program for executing of computer executable instructions, when the calculating
When machine executable instruction is executed by one or more processors so that the computing device following steps:
Process corresponding to background application consuming task is registered;
Obtain foreground application and monitor the foreground application data that module is monitored, the foreground application data should including the foreground
Stability information;
When the foreground application is in stable state and belongs to the protection category of white list, then the consuming task is closed
Corresponding process.
A kind of mobile terminal, including memory and processor, computer-readable instruction is stored in the memory, it is described
When instruction is by the computing device so that the computing device following steps:
Process corresponding to background application consuming task is registered;
Obtain foreground application and monitor the foreground application data that module is monitored, the foreground application data should including the foreground
Stability information;
When the foreground application is in stable state and belongs to the protection category of white list, then the consuming task is closed
Corresponding process.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the internal structure schematic diagram figure of mobile terminal in one embodiment;
Fig. 2 is the flow chart of method for scheduling task in one embodiment;
Fig. 3 is that the flow chart that foreground application monitors the foreground application data that module is monitored is obtained in one embodiment;
Fig. 4 is the flow chart of method for scheduling task in another embodiment;
Fig. 5 is the internal structure schematic diagram of task scheduling apparatus in one embodiment;
Fig. 6 is that the computer program stored on one embodiment Computer readable storage medium storing program for executing is real when being executed by processor
The flow chart of existing step;
Fig. 7 is the block diagram of the part-structure of the mobile phone related to computer equipment provided in an embodiment of the present invention;
Fig. 8 is flow chart the step of realization when terminal handler performs computer program in one embodiment.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
Fig. 1 is the internal structure schematic diagram of mobile terminal in one embodiment.As shown in figure 1, the movement is including passing through
It is processor, non-volatile memory medium, built-in storage and the network interface of bus of uniting connection, voice collection device, loudspeaker, aobvious
Display screen and input unit.Wherein, the non-volatile memory medium of mobile terminal is stored with operating system and computer-readable instruction.
To realize a kind of method for scheduling task when the computer-readable instruction is executed by processor.The processor, which is used to provide, to be calculated and controls
Ability processed, support the operation entirely moved.Built-in storage in mobile terminal is that the computer in non-volatile memory medium can
The operation of reading instruction provides environment.Network interface is used to carry out network service with server.The display screen of mobile terminal can be
LCDs or electric ink display screen etc., input unit can be the touch layers or shifting covered on display screen
Move button, trace ball or Trackpad or the external keyboard set in terminal enclosure, Trackpad or mouse etc..The shifting
Dynamic terminal can be mobile phone, tablet personal computer or personal digital assistant or Wearable etc..Those skilled in the art can manage
Solve, the block diagram of the structure, the only part-structure related to application scheme that are shown in Fig. 1, do not form to the application side
The restriction for the mobile terminal that case is applied thereon, specific mobile terminal can include than more or less portions shown in figure
Part, either combine some parts or arranged with different parts.
The embodiment of the present invention provides a kind of method for scheduling task, and this method can apply to the operating system of mobile terminal
In, such as mobile phone, tablet personal computer etc.;The equipment of network side, such as the webserver can also be applied to.Aforesaid operations system is fitted
For the system of particular version, that is, possesses JobScheduler system.Jobscheduler can support a variety of condition settings
The Task Scheduling Mechanism of (network, time, complete machine i dle states, database are monitored).Using by required condition setting task, it is
System dispatches the tasks carrying when can meet certain condition under some following time.In embodiments of the present invention, it was initially believed that tool
Standby JobScheduler system be Android5.0 system above (such as:Android 5.1、Android 6.0、
Android 7.1 etc.).If other systems (IOS etc.) also possess JobScheduler, the equally applicable embodiment of the present invention provides
Method for scheduling task.
Fig. 2 is the flow chart of method for scheduling task in one embodiment, and this method comprises the following steps:
Step S202:Process corresponding to background application consuming task is registered.
Specifically, interface can be added in JobInfo.java, JobService.java
SetRequiresProtectFore () interface.When needing to perform the consuming task of background application, pass through
JobScheudler.schedule () interface, realize consumption of the JOB managers (JobSchedulerService) to background application
When process corresponding to task registration.Consuming task can be understood as background application and take, the task in cost source.For example, backstage
Using for photograph album, its photograph album resource, JOB managers are taken in background scanning photo than relatively time-consuming, consumption CPU
(JobSchedulerService) can be to the registration of the process corresponding to scanned photograph, you can pass through
JobScheudler.schedule () interface is by the process registers corresponding to scanned photograph to JOB managers
(JobSchedulerService) in.
Step S204:Obtain foreground application and monitor the foreground application data that module is monitored, the foreground application data include
The stability information of the foreground application.
JOB managers (JobSchedulerService) obtain foreground application and monitor the foreground application data that module is monitored.
Specifically, the StateController interfaces () of JobSchedule modules are inherited, it becomes possible to realize that foreground application monitors mould
Block, foreground application monitor module and are also referred to as AppChangeController.Foreground application monitors module
(AppChangeController) foreground application data can be monitored, wherein, foreground application data include the stabilization of foreground application
Property information.
Optionally, step S202, step S204 execution sequence does not limit under, can first carry out step S202, then
Perform step S204;It is of course also possible to first carry out step S204, then perform step S202.
Step S206:When the foreground application is in stable state and belongs to the protection category of white list, then institute is closed
State the process corresponding to consuming task.
Stable state, and foreground application category are according to the stability information of the foreground application of acquisition, and in foreground application
When the protection category of white list, it is right that JOB managers (JobSchedulerService) then close background application consuming task institute
The process answered.Wherein, be provided with multiple applications in white list, application can be third party application (such as:Social activity, music,
The application programs such as video, trip, financing, game, office), or the application of system intialization and implementing procedure (such as:Refer to
Compass, calendar, weather, browser etc.).User can first set the application in white list according to the demand of oneself.
Optionally, white list can be pushed by Cloud Server to mobile terminal.
Above-mentioned method for scheduling task, by the registration for receiving the process corresponding to background application consuming task;Obtain foreground
The foreground application data monitored using module is monitored, the foreground application data include the stability information of the foreground application;
When the foreground application is in stable state and belongs to the protection category of white list, then close corresponding to the consuming task
Process, it becomes possible to avoid consuming task and the situation of foreground application preempting resources from occurring, can ensure have during foreground application operation
Enough resources can utilize, and smooth can run, there is provided user experience.
In one embodiment, obtain foreground application and monitor the foreground application data that module is monitored, including:
Step S302:Receive the acquisition instructions for obtaining the foreground application data.
During execution task is needed, set by jobInfo setRequiresProtectFore () interface
The condition of " need obtain foreground application data ", that is, obtain foreground application monitor foreground application data that module monitors it
Before, it is also necessary to receive the acquisition instructions of " needing to obtain foreground application data ".
Step S304:Monitored according to the acquisition instructions from the foreground application in module and obtain the steady of the foreground application
Qualitative information.
Wherein, foreground application monitors the running status that module is used to monitor the foreground application in real time, and according to the fortune
Row state determines the stability information of the foreground application.Wherein, the stability information of foreground application includes stable state and not
Stable state.
Further, foreground application monitors the stability that module determines the foreground application according to the running status, bag
Include and judge the foreground application is in the step of whether duration of running status exceedes preset duration.That is, foreground application
Monitoring module can monitor whether foreground application is in running status in real time.When foreground application is in the duration of running status
During more than preset duration, then can assert that the foreground application is in stable state, when foreground application be in running status it is lasting when
When length is not above preset duration, then it can assert that the foreground application plays pendulum.Wherein, in order to provide the experience of user
Degree, preset duration can be could be arranged to 5~10 seconds, certainly, the preset duration can also be adjusted to be adapted to mobile terminal category
Property or user open foreground application time numerical value, do not do further restriction herein.
JOB managers (JobSchedulerService) are according to the collection of " need obtain foreground application data " of setting
Instruction can monitors the stability information that the foreground application is obtained in module from foreground application.
Specifically, JOB managers obtain the stability information of the foreground application in module is monitored from foreground application
During, when foreground application monitoring module, which listens to foreground application, is in stable state, actively to JOB managers
(JobSchedulerService) data message that foreground application is in stable state is sent, before thus can directly obtaining
Platform applies the information in stable state, can simplify JOB managers and monitor module acquisition foreground application to foreground application in real time
The interaction of data, the efficiency of data interaction can be improved.
In an example, method for scheduling task, including:
Step S402:Process corresponding to background application consuming task is registered.
Step S404:Process corresponding to the consuming task of the background application of registration is included in schedule of tasks.
Process corresponding to the consuming task of the background application of registration is included in schedule of tasks, adjusted by setting up task
Spend table, can more system management consuming task corresponding to process.
Step S406:Obtain foreground application and monitor the foreground application data that module is monitored, the foreground application data include
The stability information of the foreground application.
Step S402, S406 corresponds respectively to the step S202 of abovementioned steps, step S204, here, repeating no more.
Step S408:When the foreground application is in stable state and belongs to the protection category of white list, then closes and appoint
The process being engaged in dispatch list.
Stable state, and foreground application category are according to the stability information of the foreground application of acquisition, and in foreground application
When the protection category of white list, it is right that JOB managers (JobSchedulerService) then close background application consuming task institute
The process answered.Wherein, be provided with multiple applications in white list, application can be third party application (such as:Social activity, music,
The application programs such as video, trip, financing, game, office), or the application of system intialization and implementing procedure (such as:Refer to
Compass, calendar, weather, browser etc.).User can first set the application in white list according to the demand of oneself.
When the foreground application is in stable state and belongs to the protection category of white list, then close in schedule of tasks
The process.By closing the process in schedule of tasks, it becomes possible to avoid consuming task from seizing money with foreground application
The situation in source occurs, and can ensure have enough resources to utilize during foreground application operation, it is ensured that the stream of foreground application
Smooth operation, there is provided user experience.
In one embodiment, step S408 is when the foreground application is in stable state and belongs to the protection model of white list
During farmland, then after closing the process in schedule of tasks, in addition to:
Step S410:After the foreground application exits, the process of closing, the process turned off are registered again
It is included in the schedule of tasks.
After belonging to the foreground application in white list protection category and exiting foreground, i.e., when foreground application is not at running status
When, process corresponding to the consuming task closed when the foreground application can be in into running status is registered again, is its closing
The process is included in the schedule of tasks to wait scheduling to perform.Wherein, confirming when foreground application is not at running shape
During state, also module can be monitored by foreground application to monitor.Monitoring module continuous 10 seconds when foreground application all should to listen to this
With the running status in foreground, you can think that the foreground application has dropped out foreground, be not at running status.
In one embodiment, method for scheduling task also includes when the foreground application is in stable state and is not belonging to white
During the protection category of list, then the process according to corresponding to the priority of the foreground application reduces the consuming task accordingly
The step of quantity.
During an application program of the foreground of mobile terminal in one non-white list protection category of stable operation, according to working as
The priority of the foreground application of preceding operation reduces the quantity of the process corresponding to background application consuming task accordingly, so also may be used
The available resources for the foreground application currently run with accordingly increasing, there is provided the flow degree of foreground application, improve the body being used for
Degree of testing.Wherein it is possible to the height for the frequency being used by a user according to foreground application in preset time period, where when foreground application
The information such as the size of internal memory set priority, and its priority is higher, the number of processes of corresponding reduction is also more, and then ensures
The flow degree of foreground application, improves the Experience Degree being used for.
Optionally, the priority of the process in schedule of tasks corresponding to consuming task can also be set, wherein, process
Priority is higher, more early to be closed.
In one embodiment, whether method for scheduling task, in addition to the detection mobile terminal are in bright screen state
Step.
By detecting whether mobile terminal is in bright screen state, it is possible to which judging the foreground application of current mobile terminal is
It is no in running order.If bright screen, showing, the foreground application of mobile terminal is in running order, can occur that foreground should
With occurring the situation of interim card in running, now can continues executing with the foreground that acquisition foreground application monitoring module is monitored and answered
With data, the step of foreground application data include the stability information of the foreground application.Accordingly, when the foreground should
With in stable state and when belonging to the protection category of white list, then the process corresponding to the consuming task is closed, before realization
The smooth operation of platform application, there is provided user experience.
The embodiment of the present invention also provides a kind of task scheduling apparatus.Fig. 5 is the interior of task scheduling apparatus in one embodiment
Portion's structural representation.In one embodiment, task scheduling apparatus includes:
Registering modules 510, for being registered to the process corresponding to background application consuming task;
Acquisition module 520, the foreground application data monitored module 540 for obtaining foreground application and monitored, the foreground should
Include the stability information of the foreground application with data;And
Scheduler module 530, for when the foreground application is in stable state and belongs to the protection category of white list, then
Close the process corresponding to the consuming task.
In one embodiment, the foreground application monitors the operation that module 540 is used to monitor the foreground application in real time
State, and determine according to the running status stability information of the foreground application.
Specifically, the stability information of the foreground application includes stable state and unstable state.
In one embodiment, acquisition module 520 is used to receive the acquisition instructions for obtaining the foreground application data, and root
The stability information that the foreground application is obtained in module is monitored from the foreground application according to the acquisition instructions.
In one embodiment, foreground application monitors module 540 and can interpolate that the foreground application is in running status
Whether duration exceedes preset duration;If so, then the foreground application is in stable state, if it is not, the then foreground application
Play pendulum.
In one embodiment, scheduler module 530 is additionally operable to after the foreground application exits, register the institute of closing again
Process is stated, the process turned off is included in the schedule of tasks.
In one embodiment, scheduler module 530 is additionally operable to when the foreground application is in stable state and is not belonging to white
During the protection category of list, then the process according to corresponding to the priority of the foreground application reduces the consuming task accordingly
Quantity.
In one embodiment, task scheduling apparatus also includes detection module, and detection module is used to detect the movement eventually
Whether end is in bright screen state.
Above-mentioned task scheduling apparatus, receive the registration of the process corresponding to background application consuming task;Obtain foreground application
The foreground application data that module is monitored are monitored, the foreground application data include the stability information of the foreground application;Scheduling
Module 530 can close described time-consuming when the foreground application is in stable state and belongs to the protection category of white list
The corresponding process of business, avoids consuming task and the situation of foreground application preempting resources occurs, and can ensure that foreground application is transported
There are enough resources to utilize during row, smooth can run, there is provided user experience.
The division of modules is only used for for example, in other embodiments, can fill scheduling in above-mentioned dispatching device
Put and be divided into different modules as required, to complete all or part of function of above-mentioned dispatching device.
The embodiment of the present invention additionally provides a kind of computer-readable recording medium.Fig. 6 is that one embodiment Computer can
The flow chart for the step of computer program for reading to store in storage medium is realized when being executed by processor.A kind of as shown in fig. 6, meter
Calculation machine readable storage medium storing program for executing, is stored thereon with computer program, and the program realizes following steps when being executed by processor:
Step S602:Process corresponding to background application consuming task is registered;
Step S604:Obtain foreground application and monitor the foreground application data that module is monitored, the foreground application data include
The stability information of the foreground application;
Step S606:When the foreground application is in stable state and belongs to the protection category of white list, then institute is closed
State the process corresponding to consuming task.
In one of the embodiments, the foreground application monitors the operation that module is used to monitor the foreground application in real time
State, and determine according to the running status stability information of the foreground application;
Obtain foreground application and monitor the foreground application data that module is monitored, including:
Receive the acquisition instructions for obtaining the foreground application data;
The stability information that the foreground application is obtained in module is monitored from the foreground application according to the acquisition instructions.
In one of the embodiments, the stability information of the foreground application includes stable state and unstable state;
The stability of the foreground application is determined according to the running status, including:
Judge that the foreground application is in the duration of running status and whether exceedes preset duration;
If so, then the foreground application is in stable state, if it is not, then the foreground application plays pendulum.
In one of the embodiments, in addition to:
Process corresponding to the background application consuming task is included in schedule of tasks;
When the foreground application is in stable state and belongs to the protection category of white list, then close in schedule of tasks
The process.
In one of the embodiments, in addition to:
After the foreground application exits, the process of closing is registered again, and the process turned off is included in described
In schedule of tasks.
In one of the embodiments, in addition to:
, then should according to the foreground when the foreground application is in stable state and is not belonging to the protection category of white list
Priority reduces the quantity of process corresponding to the consuming task accordingly.
In one of the embodiments, in addition to:
Detect whether the mobile terminal is in bright screen state;
If so, then obtaining foreground application monitors the foreground application data that module is monitored.
Above computer readable storage medium storing program for executing Computer program (instruction) when executed, is consumed by receiving background application
When task corresponding to process registration;Obtain foreground application and monitor the foreground application data that module is monitored, the foreground application
Data include the stability information of the foreground application;When the foreground application is in stable state and belongs to the protection of white list
During category, then the process corresponding to the consuming task is closed, it becomes possible to avoid consuming task and foreground application preempting resources
Situation occurs, and can ensure have enough resources to utilize during foreground application operation, smooth can run, there is provided Consumer's Experience
Degree.
The embodiment of the present invention additionally provides a kind of computer equipment.As shown in fig. 7, for convenience of description, illustrate only with
The related part of the embodiment of the present invention, particular technique details do not disclose, refer to present invention method part.The calculating
Machine equipment can be include mobile phone, tablet personal computer, PDA (Personal Digital Assistant, personal digital assistant),
Any mobile terminal devices such as POS (Point of Sales, selling mobile terminal), vehicle-mounted computer, Wearable, to calculate
Machine equipment is exemplified by mobile phone:
Fig. 7 is the block diagram of the part-structure of the mobile phone related to computer equipment provided in an embodiment of the present invention.Reference chart
7, mobile phone includes:Radio frequency (Radio Frequency, RF) circuit 710, memory 720, input block 730, display unit 740,
Sensor 750, voicefrequency circuit 760, Wireless Fidelity (wireless fidelity, WiFi) module 770, processor 780 and
The grade part of power supply 790.It will be understood by those skilled in the art that the handset structure shown in Fig. 7 does not form the restriction to mobile phone, can
With including than illustrating more or less parts, either combining some parts or different parts arrangement.
Wherein, RF circuits 710 can be used for receive and send messages or communication process in, the reception and transmission of signal can be by base stations
After downlink information receives, handled to processor 780;Up data can also be sent to base station.Generally, RF circuits include but
Be not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier (Low Noise Amplifier,
LNA), duplexer etc..In addition, RF circuits 710 can also be communicated by radio communication with network and other equipment.Above-mentioned channel radio
Letter can use any communication standard or agreement, including but not limited to global system for mobile communications (Global System of
Mobile communication, GSM), general packet radio service (General Packet Radio Service,
GPRS), CDMA (Code Division Multiple Access, CDMA), WCDMA (Wideband Code
Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE)), Email,
Short Message Service (Short Messaging Service, SMS) etc..
Memory 720 can be used for storage software program and module, and processor 780 is stored in memory 720 by operation
Software program and module, so as to perform the various function application of mobile phone and data processing.Memory 720 can mainly include
Program storage area and data storage area, wherein, program storage area can storage program area, the application journey needed at least one function
Sequence (such as the application program of sound-playing function, application program of image player function etc.) etc.;Data storage area can store root
Created data (such as voice data, address list etc.) etc. are used according to mobile phone.In addition, memory 720 can be included at a high speed
Random access memory, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or
Other volatile solid-state parts.
Input block 730 can be used for the numeral or character information for receiving input, and produces and set with the user of mobile phone 700
And the key signals input that function control is relevant.Specifically, input block 730 may include contact panel 731 and other inputs
Equipment 732.Contact panel 731, alternatively referred to as touch-screen, collect touch operation (such as user of the user on or near it
Use the operation of any suitable object such as finger, stylus or annex on contact panel 731 or near contact panel 731),
And corresponding attachment means are driven according to formula set in advance.In one embodiment, contact panel 731 may include to touch inspection
Survey two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation
The signal brought, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and will
It is converted into contact coordinate, then gives processor 780, and the order sent of reception processing device 780 and can be performed.In addition,
The polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave can be used to realize contact panel 731.Except touch surface
Plate 731, input block 730 can also include other input equipments 732.Specifically, other input equipments 732 can be included but not
The one or more being limited in physical keyboard, function key (such as volume control button, switch key etc.) etc..
Display unit 740 can be used for display by user input information or be supplied to user information and mobile phone it is various
Menu.Display unit 740 may include display panel 741.In one embodiment, liquid crystal display (Liquid can be used
Crystal Display, LCD), the form such as Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED)
To configure display panel 741.In one embodiment, contact panel 631 can cover display panel 741, when contact panel 731 is examined
After measuring the touch operation on or near it, processor 780 is sent to determine the type of touch event, is followed by subsequent processing device
780 provide corresponding visual output according to the type of touch event on display panel 741.Although in the figure 7, contact panel
731 and display panel 641 are the parts independent as two to realize the input of mobile phone and input function, but in some implementations
In example, contact panel 731 and display panel 741 can be integrated and realize input and the output function of mobile phone.
Mobile phone 700 may also include at least one sensor 750, such as optical sensor, motion sensor and other sensings
Device.Specifically, optical sensor may include ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to environment
The light and shade of light adjusts the brightness of display panel 741, and proximity transducer can close display panel when mobile phone is moved in one's ear
741 and/or backlight.Motion sensor may include acceleration transducer, can detect by acceleration transducer and adds in all directions
The size of speed, size and the direction of gravity are can detect that when static, application (such as the horizontal/vertical screen available for identification mobile phone posture
Switching), Vibration identification correlation function (such as pedometer, tap) etc.;In addition, mobile phone can also configure gyroscope, barometer, humidity
Other sensors such as meter, thermometer, infrared ray sensor etc..
Voicefrequency circuit 760, loudspeaker 761 and microphone 762 can provide the COBBAIF between user and mobile phone.Audio-frequency electric
Electric signal after the voice data received conversion can be transferred to loudspeaker 761, sound is converted to by loudspeaker 761 by road 760
Signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 762, is turned after being received by voicefrequency circuit 760
Voice data is changed to, then after voice data output processor 780 is handled, another mobile phone can be sent to through RF circuits 710, or
Person exports voice data to memory 720 so as to subsequent treatment.
WiFi belongs to short range wireless transmission technology, and mobile phone can help user's transceiver electronicses postal by WiFi module 770
Part, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.Although Fig. 7 is shown
WiFi module 770, but it is understood that, it is simultaneously not belonging to must be configured into for mobile phone 700, can omit as needed.
Processor 780 is the control centre of mobile phone, using various interfaces and the various pieces of connection whole mobile phone, is led to
Cross operation or perform the software program and/or module being stored in memory 720, and call and be stored in memory 720
Data, the various functions and processing data of mobile phone are performed, so as to carry out integral monitoring to mobile phone.In one embodiment, handle
Device 780 may include one or more processing units.In one embodiment, processor 780 can integrate application processor and modulation
Demodulation processor, wherein, application processor mainly handles operating system, user interface and application program etc.;Modulation /demodulation is handled
Device mainly handles radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor 780.
Mobile phone 700 also includes the power supply 790 (such as battery) to all parts power supply, it is preferred that power supply can pass through electricity
Management system and processor 780 are logically contiguous, so as to realize management charging, electric discharge and power consumption by power-supply management system
The functions such as management.
In one embodiment, mobile phone 700 can also include camera, bluetooth module etc..
Mobile terminal provided in an embodiment of the present invention, including memory, processor and storage on a memory and can located
The computer program run on reason device, it is characterised in that realize following steps during the computing device described program:
Step S802:Process corresponding to background application consuming task is registered;
Step S804:Obtain foreground application and monitor the foreground application data that module is monitored, the foreground application data include
The stability information of the foreground application;
Step S806:When the foreground application is in stable state and belongs to the protection category of white list, then institute is closed
State the process corresponding to consuming task.
In one of the embodiments, the foreground application monitors the operation that module is used to monitor the foreground application in real time
State, and determine according to the running status stability information of the foreground application;
Obtain foreground application and monitor the foreground application data that module is monitored, including:
Receive the acquisition instructions for obtaining the foreground application data;
The stability information that the foreground application is obtained in module is monitored from the foreground application according to the acquisition instructions.
In one of the embodiments, the stability information of the foreground application includes stable state and unstable state;
The stability of the foreground application is determined according to the running status, including:
Judge that the foreground application is in the duration of running status and whether exceedes preset duration;
If so, then the foreground application is in stable state, if it is not, then the foreground application plays pendulum.
In one of the embodiments, in addition to:
Process corresponding to the background application consuming task is included in schedule of tasks;
When the foreground application is in stable state and belongs to the protection category of white list, then close in schedule of tasks
The process.
In one of the embodiments, in addition to:After the foreground application exits, again registration close it is described enter
Journey, the process turned off are included in the schedule of tasks.
In one of the embodiments, in addition to:When the foreground application is in stable state and is not belonging to white list
During protection category, then according to corresponding to the priority of the foreground application reduces the consuming task accordingly process quantity.
In one of the embodiments, in addition to:Detect whether the mobile terminal is in bright screen state;If so, then obtain
Foreground application is taken to monitor the foreground application data that module is monitored.
Above-mentioned storage on a memory and the computer program that can run on a processor when executed, after reception
The registration of process corresponding to platform application consuming task;Obtain foreground application and monitor the foreground application data that module is monitored, it is described
Foreground application data include the stability information of the foreground application;When the foreground application is in stable state and belongs to white name
During the protection category of list, then the process corresponding to the consuming task is closed, it becomes possible to avoid consuming task from being robbed with foreground application
The situation for accounting for resource occurs, and can ensure have enough resources to utilize during foreground application operation, smooth can run, there is provided
User experience.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with
The hardware of correlation is instructed to complete by computer program, described program can be stored in a non-volatile computer and can be read
In storage medium, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage is situated between
Matter can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) etc..
Embodiment described above only expresses the several embodiments of the present invention, and its description is more specific and detailed, but simultaneously
Therefore the limitation to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that for one of ordinary skill in the art
For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the guarantor of the present invention
Protect scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.
Claims (10)
- A kind of 1. method for scheduling task, it is characterised in that including:Process corresponding to background application consuming task is registered;Obtain foreground application and monitor the foreground application data that module is monitored, the foreground application data include the foreground application Stability information;When the foreground application is in stable state and belongs to the protection category of white list, then it is right to close the consuming task institute The process answered.
- 2. method for scheduling task according to claim 1, it is characterised in that the foreground application is monitored module and is used in real time The running status of the foreground application is monitored, and the stability information of the foreground application is determined according to the running status;Obtain foreground application and monitor the foreground application data that module is monitored, including:Receive the acquisition instructions for obtaining the foreground application data;The stability information that the foreground application is obtained in module is monitored from the foreground application according to the acquisition instructions.
- 3. method for scheduling task according to claim 2, it is characterised in that the stability information of the foreground application includes Stable state and unstable state;The stability of the foreground application is determined according to the running status, including:Judge that the foreground application is in the duration of running status and whether exceedes preset duration;If so, then the foreground application is in stable state, if it is not, then the foreground application plays pendulum.
- 4. method for scheduling task according to claim 1, it is characterised in that also include:Process corresponding to the background application consuming task is included in schedule of tasks;When the foreground application is in stable state and belongs to the protection category of white list, then close schedule of tasks in institute State process.
- 5. method for scheduling task according to claim 4, it is characterised in that also include:After the foreground application exits, the process of closing is registered again, and the process turned off is included in the task In dispatch list.
- 6. method for scheduling task according to claim 1, it is characterised in that also include:When the foreground application is in stable state and is not belonging to the protection category of white list, then according to the foreground application Priority reduces the quantity of process corresponding to the consuming task accordingly.
- 7. method for scheduling task according to claim 1, it is characterised in that also include:Detect whether the mobile terminal is in bright screen state;If so, then obtaining foreground application monitors the foreground application data that module is monitored.
- A kind of 8. task scheduling apparatus, it is characterised in that including:Registering modules, for being registered to the process corresponding to background application consuming task;Acquisition module, the foreground application data monitored module for obtaining foreground application and monitored, the foreground application data include The stability information of the foreground application;AndScheduler module, for when the foreground application is in stable state and belongs to the protection category of white list, then closing institute State the process corresponding to consuming task.
- 9. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is held by processor Following steps are realized during row:Process corresponding to background application consuming task is registered;Obtain foreground application and monitor the foreground application data that module is monitored, the foreground application data include the foreground application Stability information;When the foreground application is in stable state and belongs to the protection category of white list, then it is right to close the consuming task institute The process answered.
- 10. a kind of mobile terminal, including memory and processor, computer-readable instruction is stored in the memory, it is described When instruction is by the computing device so that the computing device following steps:Process corresponding to background application consuming task is registered;Obtain foreground application and monitor the foreground application data that module is monitored, the foreground application data include the foreground application Stability information;When the foreground application is in stable state and belongs to the protection category of white list, then it is right to close the consuming task institute The process answered.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710613803.8A CN107391198B (en) | 2017-07-25 | 2017-07-25 | Method for scheduling task and device, computer readable storage medium, mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710613803.8A CN107391198B (en) | 2017-07-25 | 2017-07-25 | Method for scheduling task and device, computer readable storage medium, mobile terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107391198A true CN107391198A (en) | 2017-11-24 |
CN107391198B CN107391198B (en) | 2019-07-16 |
Family
ID=60336100
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710613803.8A Active CN107391198B (en) | 2017-07-25 | 2017-07-25 | Method for scheduling task and device, computer readable storage medium, mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107391198B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108040330A (en) * | 2017-11-30 | 2018-05-15 | 努比亚技术有限公司 | WiFi directional transmission methods, mobile terminal and readable storage medium storing program for executing |
CN108762834A (en) * | 2018-05-17 | 2018-11-06 | 努比亚技术有限公司 | A kind of application acceleration method, terminal and computer readable storage medium |
CN109299600A (en) * | 2018-08-02 | 2019-02-01 | 珠海格力电器股份有限公司 | A kind of application locking unlocking method, device, terminal and readable storage medium storing program for executing |
CN111797110A (en) * | 2020-06-23 | 2020-10-20 | 北京金堤科技有限公司 | Method and device for generating scheduling model, computer equipment and storage medium |
CN111859367A (en) * | 2020-07-28 | 2020-10-30 | 中移(杭州)信息技术有限公司 | Screen locking password setting method, terminal and computer readable storage medium |
CN111898117A (en) * | 2020-04-26 | 2020-11-06 | 广州视源电子科技股份有限公司 | Mutually exclusive application processing method, device, terminal and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105979095A (en) * | 2016-06-27 | 2016-09-28 | 努比亚技术有限公司 | Mobile terminal and application power consumption control method |
CN105975301A (en) * | 2016-04-29 | 2016-09-28 | 北京小米移动软件有限公司 | Memory cleaning method and device, and electronic equipment |
CN106547640A (en) * | 2016-11-23 | 2017-03-29 | 深圳市金立通信设备有限公司 | A kind of method and terminal of backstage cleaning |
CN106959892A (en) * | 2017-03-30 | 2017-07-18 | 联想(北京)有限公司 | Process handling method, device and electronic equipment |
-
2017
- 2017-07-25 CN CN201710613803.8A patent/CN107391198B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105975301A (en) * | 2016-04-29 | 2016-09-28 | 北京小米移动软件有限公司 | Memory cleaning method and device, and electronic equipment |
CN105979095A (en) * | 2016-06-27 | 2016-09-28 | 努比亚技术有限公司 | Mobile terminal and application power consumption control method |
CN106547640A (en) * | 2016-11-23 | 2017-03-29 | 深圳市金立通信设备有限公司 | A kind of method and terminal of backstage cleaning |
CN106959892A (en) * | 2017-03-30 | 2017-07-18 | 联想(北京)有限公司 | Process handling method, device and electronic equipment |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108040330A (en) * | 2017-11-30 | 2018-05-15 | 努比亚技术有限公司 | WiFi directional transmission methods, mobile terminal and readable storage medium storing program for executing |
CN108040330B (en) * | 2017-11-30 | 2021-04-27 | 努比亚技术有限公司 | WiFi directional transmission method, mobile terminal and readable storage medium |
CN108762834A (en) * | 2018-05-17 | 2018-11-06 | 努比亚技术有限公司 | A kind of application acceleration method, terminal and computer readable storage medium |
CN109299600A (en) * | 2018-08-02 | 2019-02-01 | 珠海格力电器股份有限公司 | A kind of application locking unlocking method, device, terminal and readable storage medium storing program for executing |
CN111898117A (en) * | 2020-04-26 | 2020-11-06 | 广州视源电子科技股份有限公司 | Mutually exclusive application processing method, device, terminal and storage medium |
CN111797110A (en) * | 2020-06-23 | 2020-10-20 | 北京金堤科技有限公司 | Method and device for generating scheduling model, computer equipment and storage medium |
CN111797110B (en) * | 2020-06-23 | 2024-01-26 | 北京金堤科技有限公司 | Method, device, computer equipment and storage medium for generating scheduling model |
CN111859367A (en) * | 2020-07-28 | 2020-10-30 | 中移(杭州)信息技术有限公司 | Screen locking password setting method, terminal and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107391198B (en) | 2019-07-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107391198B (en) | Method for scheduling task and device, computer readable storage medium, mobile terminal | |
CN104850434B (en) | Multimedia resource method for down loading and device | |
CN107391259A (en) | Method for processing resource and device, computer-readable recording medium, mobile terminal | |
CN106453053B (en) | Group message display methods and device | |
CN105363201B (en) | The display methods and device of prompt message | |
CN104519485B (en) | Communication means, device and system between a kind of terminal | |
CN107277752B (en) | Bluetooth connecting method, device, computer equipment and computer readable storage medium | |
CN106708554B (en) | Program operating method and device | |
CN107404572A (en) | A kind of charge prompting method and terminal | |
CN104519262B (en) | Obtain the method, apparatus and terminal of video data | |
TW201508312A (en) | Method, device and system for forecasting weather | |
CN105389259B (en) | A kind of method, apparatus and system for carrying out Application testing | |
CN107368400A (en) | CPU monitoring methods, device, computer-readable recording medium and mobile terminal | |
CN104699501B (en) | A kind of method and device for running application program | |
CN107562539A (en) | Applied program processing method and device, computer equipment, storage medium | |
CN106775828A (en) | Application program installation method and device, computer equipment | |
CN106294168A (en) | A kind of method and system carrying out Application testing | |
CN108924885A (en) | Information acquisition method and device | |
CN107766139A (en) | Application management method and device | |
CN107103074A (en) | The processing method and mobile terminal of a kind of sharing information | |
CN104901992B (en) | A kind of method and apparatus of resource transfers | |
CN106793010A (en) | A kind of method for network access and equipment | |
CN106527666A (en) | Control method of central processing unit and terminal equipment | |
CN105721282B (en) | Message display method and device | |
CN107330867A (en) | Image combining method, device, computer-readable recording medium and computer equipment |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant after: OPPO Guangdong Mobile Communications Co., Ltd. Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant before: Guangdong OPPO Mobile Communications Co., Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |