CN107741880A - Processor control method and related product - Google Patents
Processor control method and related product Download PDFInfo
- Publication number
- CN107741880A CN107741880A CN201711032475.9A CN201711032475A CN107741880A CN 107741880 A CN107741880 A CN 107741880A CN 201711032475 A CN201711032475 A CN 201711032475A CN 107741880 A CN107741880 A CN 107741880A
- Authority
- CN
- China
- Prior art keywords
- application
- processor resource
- processor
- resource
- priority
- 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/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
- G06F9/505—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 considering the load
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the present application discloses a kind of processor control method and Related product, and wherein method includes:Obtain the first idle processor resource of the first processor resource and processor needed for present frame;When the first idle processor resource is less than the first processor resource, the second processor resource shared by backstage is obtained;Release operation is carried out to the second processor resource, obtains the second idle processor resource;Resource distribution is carried out to the present frame according to the second idle processor resource.Using the application, the utilization rate of processor and the fluency of picture can be improved.
Description
Technical field
The application is related to technical field of mobile terminals, has related generally to a kind of processor control method and Related product.
Background technology
With the continuous development of mobile terminal technology, the use of the mobile terminal such as mobile phone, computer, flat board is more and more general
And scene of game is a kind of important user's scene in mobile terminal.If user is sufficient using cannot get when playing
Processor resource, then user will experience the bad experience such as interim card.Therefore, how under existence conditions ensure game it is suitable
Profit carries out being those skilled in the art's urgent problem to be solved.
The content of the invention
The embodiment of the present application provides a kind of processor control method and Related product, can improve the utilization rate of processor
With the fluency of picture.
In a first aspect, the embodiment of the present application provides a kind of processor control method, including:
Obtain the first idle processor resource of the first processor resource and processor needed for present frame;
When the first idle processor resource is less than the first processor resource, second shared by backstage is obtained
Processor resource;
Release operation is carried out to the second processor resource, obtains the second idle processor resource;
Resource distribution is carried out to the present frame according to the second idle processor resource.
Second aspect, the embodiment of the present application provide a kind of processor control device, including:
Acquiring unit, for obtaining the first idle processor money of first processor resource and processor needed for present frame
Source;When the first idle processor resource is less than the first processor resource, the second processing shared by backstage is obtained
Device resource;
Releasing unit, for carrying out release operation to the second processor resource, obtain the second idle processor resource;
Dispensing unit, for carrying out resource distribution to the present frame according to the second idle processor resource.
The third aspect, the embodiment of the present application provides a kind of mobile terminal, including processor, for obtaining needed for present frame
First idle processor resource of first processor resource and processor;It is less than described the in the first idle processor resource
During one processor resource, the second processor resource shared by backstage is obtained;Release behaviour is carried out to the second processor resource
Make, obtain the second idle processor resource;Resource distribution is carried out to the present frame according to the second idle processor resource.
Fourth aspect, the embodiment of the present application provide another processor control method, applied to the shifting including processor
Dynamic terminal, wherein:
The processor obtains the first idle processor resource of the first processor resource and processor needed for present frame;
The processor obtains backstage institute when the first idle processor resource is less than the first processor resource
The second processor resource of occupancy;
The processor carries out release operation to the second processor resource, obtains the second idle processor resource;
The processor carries out resource distribution according to the second idle processor resource to the present frame.
5th aspect, the embodiment of the present application provide another mobile terminal, including processor, memory, communication interface with
And one or more programs, wherein, said one or multiple programs are stored in above-mentioned memory, and are configured by above-mentioned
Computing device, described program include being used for the instruction for performing following steps:
Obtain the first idle processor resource of the first processor resource and processor needed for present frame;
When the first idle processor resource is less than the first processor resource, second shared by backstage is obtained
Processor resource;
Release operation is carried out to the second processor resource, obtains the second idle processor resource;
Resource distribution is carried out to the present frame according to the second idle processor resource.
6th aspect, the embodiment of the present application provide a kind of computer-readable recording medium, wherein, it is described computer-readable
Storage medium stores computer program, wherein, the computer program causes computer to perform such as the embodiment of the present application first party
Part or all of step described in face.
7th aspect, the embodiment of the present application provide a kind of computer program product, wherein, the computer program product
Non-transient computer-readable recording medium including storing computer program, the computer program are operable to make calculating
Machine is performed such as the part or all of step described in the embodiment of the present application first aspect.The computer program product can be one
Individual software installation bag.
Implement the embodiment of the present application, will have the advantages that:
After employing above-mentioned processor control method and Related product, in the first idle processor resource of processor
During less than first processor resource needed for present frame, the second processor resource shared by backstage is obtained, to second processor
Resource carries out release operation and obtains the second idle processor resource, and present frame is provided according to the second idle processor resource
Source configures.That is, dynamically the processor resource of game application, and sky within a processor are distributed in adjustment in units of frame
Not busy inadequate resource is to distribute in game application when the current frame, the processor resource of release part backstage occupancy, so as to meet
Processor resource needed for present frame, can effectively reduce the occupancy resource of processor, improve game picture fluency and
The utilization rate of processor.
Brief description of the drawings
, below will be to embodiment or existing in order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art
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 application, 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.
Wherein:
Fig. 1 is a kind of schematic flow sheet for processor control method that the embodiment of the present application provides;
Fig. 2 is a kind of structural representation for processor control device that the embodiment of the present application provides;
Fig. 2A is a kind of structural representation for releasing unit that the embodiment of the present application provides;
Fig. 2 B are a kind of structural representation for determining module that the embodiment of the present application provides;
Fig. 3 is a kind of structural representation for mobile terminal that the embodiment of the present application provides;
Fig. 4 is the schematic flow sheet for another processor control method that the embodiment of the present application provides;
Fig. 5 is the structural representation for another mobile terminal that the embodiment of the present application provides.
Embodiment
In order that those skilled in the art more fully understand application scheme, below in conjunction with the embodiment of the present application
Accompanying drawing, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described embodiment is only
Some embodiments of the present application, rather than whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art
The every other embodiment obtained under the premise of creative work is not made, belong to the scope of the application protection.
Term " first ", " second " in the description and claims of this application and above-mentioned accompanying drawing etc. are to be used to distinguish
Different objects, rather than for describing particular order.In addition, term " comprising " and " having " and their any deformations, it is intended that
It is to cover non-exclusive include.Such as process, method, system, product or the equipment for containing series of steps or unit do not have
The step of being defined in the step of having listed or unit, but alternatively also including not listing or unit, or alternatively also wrap
Include for other intrinsic steps of these processes, method, product or equipment or unit.
Referenced herein " embodiment " is it is meant that the special characteristic, structure or the characteristic that describe can wrap in conjunction with the embodiments
It is contained at least one embodiment of the application.Each position in the description occur the phrase might not each mean it is identical
Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and
Implicitly understand, embodiment described herein can be combined with other embodiments.
Mobile terminal involved by the embodiment of the present application can include the various handheld devices with radio communication function,
Mobile unit, wearable device, computing device or other processing equipments for being connected to radio modem, and various forms
User equipment (User Equipment, UE), mobile station (Mobile Station, MS), terminal device (terminal
Device) etc..For convenience of description, apparatus mentioned above is referred to as mobile terminal.The embodiment of the present application is carried out below detailed
It is thin to introduce.
Processor involved by the embodiment of the present application may include central processing unit (central processing unit,
CPU) or graphics processor (graphics processing unit, GPU), processor resource correspondingly is cpu resource
And GPU resource.
The embodiment of the present application provides a kind of processor control method and Related product, can improve the utilization rate of processor
With the fluency of picture.The embodiment of the present application is introduced below in conjunction with the accompanying drawings.
A kind of schematic flow sheet of processor control method, such as Fig. 1 are provided referring to Fig. 1, Fig. 1 is the embodiment of the present application
Shown, above-mentioned processor control method includes:
101:Obtain the first idle processor resource of the first processor resource and processor needed for present frame.
The realization principle of game picture is refreshed as film within the unit interval using fixed frame per second on mobile terminal
Picture, often refresh a subframe one subframe of progress and render, then the processor resource needed for every frame is different, first processor resource
For processor resource corresponding to present frame.First idle processor resource is that processor is not accounted in current time by any application
Resource.
Optionally, the first processor resource obtained needed for present frame, including:Judge whether the present frame receives
To picture render request;If so, obtain the first processor resource corresponding to the picture render request.
The major function of game can be divided into logical process and picture renders, and wherein logical process refers to renders without straight with picture
The processing of relation is connect, for example, the reception and transmission, the capture and processing of mouse event etc. of internet message bag, logical process are
Data operation in internal memory, a small amount of processor resource is taken, and picture renders and takes substantial amounts of processor resource.
The frame per second that logical process and picture render is separated, when present frame receives picture render request, obtains picture
First processor resource corresponding to render request;Otherwise using the processor resource configured originally, processing can be effectively reduced
The utilization rate of device, save the power consumption of processor and mobile terminal.
102:When the first idle processor resource is less than first processor resource, the second processing shared by backstage is obtained
Device resource.
In the embodiment of the present application, when the first idle processor resource is less than first processor resource, backstage institute is obtained
The second processor resource of occupancy.If when the first idle processor resource is more than or equal to first processor resource, direct root
Resource distribution is carried out to present frame according to the first idle processor resource.
It is not construed as limiting for carrying out resource distribution to present frame according to the first idle processor resource, can be idle from first
Arbitrary first processor resource allocation is selected in processor resource to present frame;First idle processor resource can also be entered
Row classification, selects arbitrary first processor resource allocation to present frame, in game from the idle processor resource of game
When idle processor resource is less than first processor resource, at the free time of the idle processor resource relatively low from priority and game
Manage and first processor resource allocation is selected in device resource to present frame.
103:Release operation is carried out to second processor resource and obtains the second idle processor resource.
In the embodiment of the present application, the specific method discharged for the resource of second processor resource is also not construed as limiting, can
To be discharged according to the priority of background application, i.e., the relatively low application of first Release priority level is until the second idle processor resource
More than first processor resource;The processor resource of each application in background application can also be discharged, i.e., each application release is same
The processor resource of one size or the release that resource is carried out according to the size of priority;Resource release can also be carried out at times,
I.e. background application is run in set period, and other times are closed, that is, are not take up processor resource etc..
It is described that release operation is carried out to the second processor resource when platform operation includes K application in the rear, obtain
Second idle processor resource, including:Obtain processor resource shared in the K application and be more than answering for first threshold
With obtaining N number of application;The priority of each application in N number of application is obtained, obtains N number of priority;According to described N number of excellent
First level determines processor resource to be released corresponding to N number of application;Discharge in N number of application and wait to release corresponding to each application
Processor resource is put, obtains the second idle processor resource.
Wherein, K is the integer more than 1;N is the positive integer less than or equal to K;First threshold can pre-set for user
Smallest processor resource occupation, or apply required smallest processor resource when in backstage, can also be pre-
First test the running situation for specifying the temperature of hardware module to other modules in specified hardware module, processor or mobile terminal
The lowest temperature angle value having an impact.
Answered that is, the processor resource for selecting to take from K application of running background is more than the N number of of first threshold
With being discharged to the processor resource of above-mentioned N number of application.And the processor of the application in K application in addition to N number of application
Resource is less than or equal to first threshold, if all release will not produce too much influence to the second idle processor resource by it,
The validity of resource release is improved, and ensures the normal operation of the application in K application in addition to N number of application.
As an example it is assumed that K of running background application is instant chat application, shopping at network application, read application and
Financing application.Wherein, (processor is in set period used in process for the shared processor resource of instant chat application
Average percent) it is 1.58, reads the shared processor of application for the shared processor resource of 3.04, shopping at network application
The processor resource that resource is 1.25, financing application is shared is 0.42.If first threshold is 0.5, N number of application is instant chat
Using, shopping at network application and application is read, that is, obtains instant chat application, shopping at network application, the priority for reading application,
And the release of processor resource is carried out according to the priority of above-mentioned application.
Optionally, when the priority includes multiple dimensions, each application is preferential in acquisition N number of application
Level, obtaining multiple priority includes:Obtain in the multiple dimension per dimension evaluation of estimate corresponding with intended application, obtain more
Individual evaluation of estimate;It is corresponding to obtain the intended application for evaluation of estimate and preset weights according to corresponding in the multiple dimension per dimension
Priority.
Wherein, intended application is any application in K application, i.e., the acquisition side of the priority of each application in K application
Method is consistent with the acquisition methods of the priority of intended application;Multiple dimensions of priority may include the frequency of the use application of user
Rate, the importance of instant messages, interruption-free pattern, the memory source taken, Internet resources, processor resource etc.;Multiple dimensions
In per dimension a corresponding preset weights, preset weights can according to game application or this carried out using the relevance of itself
It is determined that.By the way that the evaluation of estimate in multiple dimensions per dimension and preset weights are weighted, it is corresponding that the application can be obtained
Priority, the accuracy of priority is improved, so as to improve the accuracy for the release that processor resource is carried out according to priority.
As an example it is assumed that N number of application is instant chat application, shopping at network application and reads application;Priority includes
Frequency, the importance of instant messages, the processor resource above three dimension taken of the use application of user, and user makes
The preset weights corresponding to the frequency of application, the importance of instant messages, the processor resource above three dimension of occupancy are distinguished
For:0.2、0.3、0.5.When evaluation of estimate corresponding to the every dimension of above three dimension in instant chat application is:60th, 50,80, net
Above three dimension evaluation of estimate corresponding to per dimension is in network shopping application:60th, 60,80, read above three in application and tie up
Spending evaluation of estimate corresponding to per dimension is:50th, 50,70, then corresponding to instant chat application, shopping at network application and reading application
Numerical value is respectively corresponding to priority:67、70、60.
Optionally, the processor resource to be released according to corresponding to N number of priority determines N number of application, bag
Include:The application that priority in N number of application is less than or equal to Second Threshold is obtained, obtains multiple applications;Determine the multiple
The processor resource to be released of each application is the processor resource that the application takes in;Obtain in N number of application
Priority is more than L application of the Second Threshold;Obtain the first idle processor resource and first processor money
The difference in source, obtain the 3rd processor resource;According to determining the priority of the 3rd processor resource and the L application
Processor resource to be released corresponding to L application.
Wherein, Second Threshold can be using corresponding priority in the interruption-free pattern that user is set, or move
The utilization rate of the application included in dynamic terminal is less than priority corresponding to a certain threshold value (such as 30%);L is less than or equal to N's
Positive integer, the priority of each application is more than Second Threshold in L application;3rd processor resource provides for the first idle processor
Source and the difference of first processor resource.
It is less than the application of Second Threshold for priority in N number of application, resource is carried out by the way of direct closing application
The limitation of occupancy, i.e., the processor resource to be released of above-mentioned application are the processor resource that the application takes.It is and remaining excellent
First level is determined more than or equal to processor resource to be released corresponding to L application of Second Threshold according to priority.Pass through
Priority uses different limitation modes to application, can improve the practicality of mobile terminal, avoid due to close background application or
Some functions in cause to miss message.
Wherein, for the priority applied according to the 3rd processor resource and L determine L apply corresponding to place to be released
The method of reason device resource is also not construed as limiting, and when described L application includes multiple functions, obtains each work(in the multiple function
The priority of energy, obtains multiple priority;Determine multiple to wait to close according to the multiple priority and the 3rd processor resource
The function of closing;Close the multiple function to be closed.
That is, the priority by considering the function of being included in L application, determines to wait to close according to priority
Function, without directly whole application is closed, the same function being also not turned off in all applications, i.e., for real
The service condition of function in the application of border is closed, and the utilization rate of processor is reduced, so as to reduce the production of specified hardware module
Heat, improve the performance of processor under scene of game.
Wherein, function to be closed can be handled by the processor resource taken needed for priority, the function and the 3rd
Device resource is determined, can also be by closing function corresponding to minimum priority successively, then obtains the second idle processor money
The size in source, until the no longer closing function when the second idle processor resource is more than first processor resource.
As an example it is assumed that N number of application is instant chat application, shopping at network application and reads priority corresponding to application
Corresponding numerical value is respectively:67th, 70,60, Second Threshold 60, the then processor resource to be released for reading application is applied to read
The processor resource of occupancy.If instant chat collects (transmission) function, push function, relevant mailbox work(using including chat message
Energy;Shopping at network, which is applied, includes function of search, push function, payment function.Instant chat is obtained to apply and shopping at network application
The priority of middle function, it is followed successively by according to order from small to large:The payment function of shopping at network application, shopping at network are applied
Function of search, the push function of instant chat application, the push function of shopping at network application, the relevant mailbox of instant chat application
Function, the chat message of instant chat application collect (transmission) function, then first close the payment function of shopping at network application, now
Second idle processor resource is more than first processor resource, that is, stops the processing to instant chat application and shopping at network application
The release of device resource.
Optionally, at the end of game application, the function of above-mentioned closing is opened, avoids user from can not using above-mentioned function,
Improve practicality and the flexibility of mobile terminal.
104:Resource distribution is carried out to present frame according to the second idle processor resource.
It is appreciated that processor the first idle processor resource be less than present frame needed for first processor resource
When, the second processor resource shared by backstage is obtained, release operation is carried out to second processor resource and is obtained at the second free time
Device resource is managed, and resource distribution is carried out to present frame according to the second idle processor resource.That is, the dynamic in units of frame
The processor resource of game application is distributed in adjustment, and idling-resource within a processor is not enough to distribute in game application
When the current frame, the processor resource that release part backstage takes, can be effective so as to meet the processor resource needed for present frame
The occupancy resource of processor is reduced, improves the fluency of game picture and the utilization rate of processor.
It is consistent with the embodiment shown in Fig. 1, Fig. 2 is refer to, Fig. 2 is a kind of processor control that the embodiment of the present application provides
Device, including:
Acquiring unit 201, for obtaining the first idle processing of first processor resource and processor needed for present frame
Device resource;When the first idle processor resource is less than the first processor resource, second shared by backstage is obtained
Processor resource.
Releasing unit 202, for carrying out release operation to the second processor resource, obtain the second idle processor money
Source.
Dispensing unit 203, for carrying out resource distribution to the present frame according to the second idle processor resource.
In a possible example, the running background includes K application, and the K is integer more than 1, such as Fig. 2A
Shown, the releasing unit 202 includes:
First acquisition module 2021, the processor resource for obtaining shared in the K application are more than first threshold
Application, obtain N number of application, the N is the positive integer less than or equal to the K;
Second acquisition module 2022, for obtaining the priority of each application in N number of application, obtain N number of priority;
Determining module 2023, for processor money to be released corresponding to determining N number of application according to N number of priority
Source;
Release module 2024, for discharging processor resource to be released corresponding to each application in N number of application, obtain
The second idle processor resource.
In a possible example, the priority includes multiple dimensions, and second acquisition module 2022 is specifically used
In obtaining in the multiple dimension per dimension evaluation of estimate corresponding with intended application, multiple evaluations of estimate are obtained, the target should
With for described K application in any application;Evaluation of estimate and preset weights obtain according to corresponding in the multiple dimension per dimension
Take priority corresponding to the intended application.
In a possible example, as shown in Figure 2 B, the determining module 2023 includes:
First obtains subelement 20231, is less than or equal to answering for Second Threshold for obtaining priority in N number of application
With obtaining multiple applications;Obtain the L application that priority in N number of application is more than the Second Threshold, the L for less than
Or the positive integer equal to the N;
Second obtains subelement 20232, for obtaining the first idle processor resource and first processor money
The difference in source, obtain the 3rd processor resource;
Determination subelement 20233, for determining the processor resource to be released of each application in the multiple application as institute
State using the processor resource taken;The L are determined according to the priority of the 3rd processor resource and the L application
Using corresponding processor resource to be released.
In a possible example, described device 200 also includes:
Judging unit 204, for judging whether the present frame receives picture render request;Sentence in the judging unit
When breaking to be, the acquiring unit 201 obtains the first processor resource corresponding to the picture render request.
As can be seen that in the embodiment of the present application, it is less than in the first idle processor resource of processor needed for present frame
During first processor resource, the second processor resource shared by backstage is obtained, release operation is carried out to second processor resource
The second idle processor resource is obtained, and resource distribution is carried out to present frame according to the second idle processor resource.That is,
Dynamically the processor resource of game application is distributed in adjustment in units of frame, and idling-resource within a processor is not enough to distribute
To the processor resource that part backstage occupancy when the current frame, is discharged in game application, so as to meet the processing needed for present frame
Device resource, the occupancy resource of processor can be effectively reduced, improves the fluency of game picture and the utilization rate of processor.
Fig. 3 is refer to, Fig. 3 is a kind of structural representation for mobile terminal 300 that the embodiment of the present application provides.Above-mentioned movement
Terminal 300 includes:Processor 310 and memory 320, the processor 310 connect memory 320 by bus 330.Based on figure
Mobile terminal 300 described by 3, it can perform operations described below:
In the embodiment of the present application, processor 310 is used to obtain first processor resource and the processor needed for present frame
The first idle processor resource;When the first idle processor resource is less than the first processor resource, after acquisition
Second processor resource shared by platform;Release operation is carried out to the second processor resource, obtains the second idle processor
Resource;Resource distribution is carried out to the present frame according to the second idle processor resource.
In a possible example, the running background includes K application, and the K is the integer more than 1;It is described to deposit
Reservoir 320 is used to store first threshold.At the aspect of processor 310, the processor 310 is specifically used for
In a possible example, the running background includes K application, and the K is the integer more than 1;It is described to deposit
Reservoir 320 is used to store first threshold.Release operation is carried out to the second processor resource in the processor 310, obtained
In terms of second idle processor resource, the processor 310 is specifically used for obtaining processor money shared in the K application
Source is more than the application of the first threshold, obtains N number of application, and the N is the positive integer less than or equal to the K;Obtain the N
The priority of each application in individual application, obtains N number of priority;According to corresponding to N number of priority determines N number of application
Processor resource to be released;Processor resource to be released corresponding to each application in N number of application is discharged, obtains described second
Idle processor resource.
In a possible example, the priority includes multiple dimensions;The memory 320 is described more for storing
Preset weights corresponding to every dimension in individual dimension.Each application is preferential in the processor 310 obtains N number of application
Level, in terms of obtaining multiple priority, the processor 310 is specifically used for obtaining in the multiple dimension should with target per dimension
With corresponding evaluation of estimate, multiple evaluations of estimate are obtained, the intended application is any application in described K application;According to described more
Evaluation of estimate and preset weights obtain priority corresponding to the intended application corresponding to every dimension in individual dimension.
In a possible example, the memory 320 is used to store Second Threshold.In the basis of processor 310
In terms of N number of priority determines processor resource to be released corresponding to N number of application, the processor 310 is specifically used for
The application that priority in N number of application is less than or equal to the Second Threshold is obtained, obtains multiple applications;Determine the multiple
The processor resource to be released of each application is the processor resource that the application takes in;Obtain in N number of application
Priority is more than L application of the Second Threshold, and the L is the positive integer less than or equal to the N;It is empty to obtain described first
The difference of not busy processor resource and the first processor resource, obtains the 3rd processor resource;Provided according to the 3rd processor
The priority of source and the L application determines processor resource to be released corresponding to the L application.
In a possible example, in terms of the first processor resource needed for the processor 310 obtains present frame,
The processor 310 is specifically used for judging whether the present frame receives picture render request;If so, obtain the picture wash with watercolours
The first processor resource corresponding to dye request.
In mobile terminal as shown in Figure 3, it is less than in the first idle processor resource of processor 310 needed for present frame
First processor resource when, processor 310 obtain backstage shared by second processor resource, second processor resource is entered
Row release operation obtains the second idle processor resource, and carries out resource to present frame according to the second idle processor resource and match somebody with somebody
Put.That is, dynamically the processor resource of game application, and idle money within a processor are distributed in adjustment in units of frame
Source is not enough to distribute in game application when the current frame, the processor resource that release part backstage takes, current so as to meet
Processor resource needed for frame, the occupancy resource of processor can be effectively reduced, improve fluency and the processing of game picture
The utilization rate of device.
It is consistent with Fig. 3 embodiment, Fig. 4 is refer to, Fig. 4 is another processor controlling party that the embodiment of the present application provides
Method, applied to mobile terminal as described in Figure 3.Wherein:
401:Processor obtains the first idle processor resource of the first processor resource and processor needed for present frame.
402:Processor obtains the shared by backstage when the first idle processor resource is less than first processor resource
Two processor resources.
403:Processor carries out release operation to second processor resource, obtains the second idle processor resource.
404:Processor carries out resource distribution according to the second idle processor resource to present frame.
In a possible example, the running background includes K application, and the K is the integer more than 1;It is described to deposit
Reservoir stores first threshold;The processor carries out release operation to second processor resource, obtains the second idle processor money
Source, including:The processor obtains the application that processor resource shared in the K application is more than the first threshold,
N number of application is obtained, the N is the positive integer less than or equal to the K;The processor obtains each in N number of application answer
Priority, obtain N number of priority;The processor is waited to release according to corresponding to N number of priority determines N number of application
Put processor resource;The processor discharges processor resource to be released corresponding to each application in N number of application, obtains institute
State the second idle processor resource.
In a possible example, the priority includes multiple dimensions, the multiple dimension of memory storage
In per preset weights corresponding to dimension;The processor obtains the priority of each application in N number of application, obtains multiple
Priority, including:The processor is obtained in the multiple dimension per dimension evaluation of estimate corresponding with intended application, is obtained more
Individual evaluation of estimate, the intended application are any application in described K application;The processor is according to each in the multiple dimension
Evaluation of estimate corresponding to dimension and preset weights obtain priority corresponding to the intended application.
In a possible example, the memory storage Second Threshold, the processor is according to N number of priority
Processor resource to be released corresponding to N number of application is determined, including:The processor obtains priority in N number of application
Less than or equal to the application of the Second Threshold, multiple applications are obtained;The processor determines each in the multiple application answer
Processor resource to be released is the processor resource that the application takes;The processor obtains excellent in N number of application
First level is more than L application of the Second Threshold, and the L is the positive integer less than or equal to the N;The processor obtains institute
The difference of the first idle processor resource and the first processor resource is stated, obtains the 3rd processor resource;The processor root
Processor money to be released corresponding to the L application is determined according to the priority of the 3rd processor resource and the L application
Source.
In a possible example, before the first processor resource that the processor obtains needed for present frame, institute
Stating method also includes:The processor judges whether the present frame receives picture render request;If so, obtain the picture
The first processor resource corresponding to render request.
In processor control method as shown in Figure 4, it is less than present frame institute in the first idle processor resource of processor
During the first processor resource needed, processor obtains the second processor resource shared by backstage, and second processor resource is entered
Row release operation obtains the second idle processor resource, and carries out resource to present frame according to the second idle processor resource and match somebody with somebody
Put.That is, dynamically the processor resource of game application, and idle money within a processor are distributed in adjustment in units of frame
Source is not enough to distribute in game application when the current frame, the processor resource that release part backstage takes, current so as to meet
Processor resource needed for frame, the occupancy resource of processor can be effectively reduced, improve fluency and the processing of game picture
The utilization rate of device.
It is consistent with Fig. 1, Fig. 2, Fig. 3 and Fig. 4 embodiment, Fig. 5 is refer to, Fig. 5 is the another of the embodiment of the present application offer
The structural representation of kind mobile terminal.As shown in figure 5, the mobile terminal 500 includes processor 510, memory 520, communicating connects
Mouthfuls 530 and one or more programs 540, wherein, one or more programs 540 are stored in memory 520, and by with
Put and performed by processor 510, program 540 includes being used for the instruction for performing following steps:
Obtain the first idle processor resource of the first processor resource and processor needed for present frame;
When the first idle processor resource is less than the first processor resource, second shared by backstage is obtained
Processor resource;
Release operation is carried out to the second processor resource, obtains the second idle processor resource;
Resource distribution is carried out to the present frame according to the second idle processor resource.
In a possible example, the running background includes K application, and the K is the integer more than 1;Described
Release operation is carried out to the second processor resource, in terms of obtaining the second idle processor resource, said procedure 540 is specifically used
In the instruction for performing following steps:
The application that processor resource shared in the K application is more than first threshold is obtained, obtains N number of application, institute
It is the positive integer less than or equal to the K to state N;
The priority of each application in N number of application is obtained, obtains N number of priority;
The processor resource to be released according to corresponding to N number of priority determines N number of application;
Processor resource to be released corresponding to each application in N number of application is discharged, obtains the described second idle processing
Device resource.
In a possible example, the priority includes multiple dimensions, each in acquisition N number of application
The priority of application, in terms of obtaining multiple priority, said procedure 540 is specifically used for the instruction for performing following steps:
Obtain in the multiple dimension per dimension evaluation of estimate corresponding with intended application, obtain multiple evaluations of estimate, it is described
Intended application is any application in described K application;
It is corresponding to obtain the intended application for evaluation of estimate and preset weights according to corresponding in the multiple dimension per dimension
Priority.
In a possible example, it is described according to corresponding to N number of priority determines N number of application it is to be released
In terms of processor resource, said procedure 540 is specifically used for the instruction for performing following steps:
The application that priority in N number of application is less than or equal to Second Threshold is obtained, obtains multiple applications;
Determine the processor money that the processor resource to be released of each application in the multiple application takes for the application
Source;
The L application that priority in N number of application is more than the Second Threshold is obtained, the L is less than or equal to institute
State N positive integer;
The difference of the first idle processor resource and the first processor resource is obtained, obtains the 3rd processor money
Source;
Wait to release according to corresponding to the priority of the 3rd processor resource and the L application determines the L application
Put processor resource.
In a possible example, before the first processor resource needed for the acquisition present frame, said procedure
540 are additionally operable to perform the instruction of following steps:
Judge whether the present frame receives picture render request;
If so, obtain the first processor resource corresponding to the picture render request.
As can be seen that in the embodiment of the present application, it is less than in the first idle processor resource of processor needed for present frame
During first processor resource, the second processor resource shared by backstage is obtained, release operation is carried out to second processor resource
The second idle processor resource is obtained, and resource distribution is carried out to present frame according to the second idle processor resource.That is,
Dynamically the processor resource of game application is distributed in adjustment in units of frame, and idling-resource within a processor is not enough to distribute
To the processor resource that part backstage occupancy when the current frame, is discharged in game application, so as to meet the processing needed for present frame
Device resource, the occupancy resource of processor can be effectively reduced, improves the fluency of game picture and the utilization rate of processor.
The embodiment of the present application also provides a kind of computer-readable storage medium, wherein, the computer-readable storage medium is stored for depositing
Computer program is stored up, the computer program causes computer to perform the part or complete of the either method as described in embodiment of the method
Portion's step, computer include mobile terminal.
The embodiment of the present application also provides a kind of computer program product, and computer program product includes storing computer journey
The non-transient computer-readable recording medium of sequence, computer program are operable to make computer perform as in embodiment of the method remembered
The part or all of step of the either method of load.The computer program product can be a software installation bag, and computer includes
Mobile terminal.
It should be noted that for foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as a series of
Combination of actions, but those skilled in the art should know, the application is not limited by described sequence of movement because
According to the application, some steps can use other orders or carry out simultaneously.Secondly, those skilled in the art should also know
Know, embodiment described in this description belongs to preferred embodiment, involved action and module not necessarily the application
It is necessary.
In embodiment, the description to each embodiment all emphasizes particularly on different fields, and does not have the part being described in detail in some embodiment, can
With referring to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed device, can be by another way
Realize.For example, device embodiment described above is only schematical, for example, the division of unit, only a kind of logic
Function divides, and can have other dividing mode when actually realizing, such as multiple units or component can be combined or can collected
Into to another system, or some features can be ignored, or not perform.Another, shown or discussed mutual coupling
Close or direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING or communication connection of device or unit, can be with
It is electrical or other forms.
The unit illustrated as separating component can be or may not be physically separate, be shown as unit
Part can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple networks
On unit.Some or all of unit therein can be selected to realize the purpose of this embodiment scheme according to the actual needs.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units it is integrated in a unit.Integrated unit was both
It can be realized, can also be realized in the form of SFU software functional unit in the form of hardware.
If integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or in use, can
To be stored in a computer-readable access to memory.Based on such understanding, the technical scheme of the application is substantially in other words
The part to be contributed to prior art or all or part of the technical scheme can be embodied in the form of software product
Come, the computer software product is stored in a memory, including some instructions are causing a computer equipment (can be
Personal computer, server or network equipment etc.) perform each embodiment method of the application all or part of step.It is and preceding
The memory stated includes:USB flash disk, read-only storage (Read-Only memory, ROM), random access memory (random
Access memory, RAM), mobile hard disk, magnetic disc or CD etc. are various can be with the medium of store program codes.
The embodiment of the present application is described in detail above, specific case used herein to the principle of the application and
Embodiment is set forth, and the explanation of above example is only intended to help and understands the present processes and its core concept;
Meanwhile for those of ordinary skill in the art, according to the thought of the application, can in specific embodiments and applications
There is change part, to sum up, this specification content should not be construed as the limitation to the application.
Claims (12)
- A kind of 1. processor control method, it is characterised in that including:Obtain the first idle processor resource of the first processor resource and processor needed for present frame;When the first idle processor resource is less than the first processor resource, the second processing shared by backstage is obtained Device resource;Release operation is carried out to the second processor resource, obtains the second idle processor resource;Resource distribution is carried out to the present frame according to the second idle processor resource.
- 2. according to the method for claim 1, it is characterised in that the running background includes K application, and the K is more than 1 Integer;It is described that release operation is carried out to the second processor resource, the second idle processor resource is obtained, including:The application that processor resource shared in the K application is more than first threshold is obtained, obtains N number of application, the N is Less than or equal to the positive integer of the K;The priority of each application in N number of application is obtained, obtains N number of priority;The processor resource to be released according to corresponding to N number of priority determines N number of application;Processor resource to be released corresponding to each application in N number of application is discharged, obtains the second idle processor money Source.
- 3. according to the method for claim 2, it is characterised in that the priority includes multiple dimensions, described to obtain the N The priority of each application in individual application, multiple priority are obtained, including:Obtain in the multiple dimension per dimension evaluation of estimate corresponding with intended application, obtain multiple evaluations of estimate, the target Using any application in being applied for described K;Evaluation of estimate and preset weights obtain excellent corresponding to the intended application according to corresponding in the multiple dimension per dimension First level.
- 4. according to the method in claim 2 or 3, it is characterised in that it is described determined according to N number of priority it is described N number of Using corresponding processor resource to be released, including:The application that priority in N number of application is less than or equal to Second Threshold is obtained, obtains multiple applications;The processor resource to be released for determining each application in the multiple application is the processor resource that the application takes;The L application that priority in N number of application is more than the Second Threshold is obtained, the L is less than or equal to the N's Positive integer;The difference of the first idle processor resource and the first processor resource is obtained, obtains the 3rd processor resource;The place to be released according to corresponding to the priority of the 3rd processor resource and the L application determines the L application Manage device resource.
- 5. according to the method described in claim any one of 1-4, it is characterised in that first processing obtained needed for present frame Device resource, including:Judge whether the present frame receives picture render request;If so, obtain the first processor resource corresponding to the picture render request.
- A kind of 6. processor control device, it is characterised in that including:Acquiring unit, for obtaining the first idle processor resource of first processor resource and processor needed for present frame; When the first idle processor resource is less than the first processor resource, the second processor money shared by backstage is obtained Source;Releasing unit, for carrying out release operation to the second processor resource, obtain the second idle processor resource;Dispensing unit, for carrying out resource distribution to the present frame according to the second idle processor resource.
- 7. device according to claim 6, it is characterised in that the running background includes K application, and the K is more than 1 Integer, the releasing unit includes:First acquisition module, the application of first threshold is more than for obtaining processor resource shared in the K application, is obtained To N number of application, the N is the positive integer less than or equal to the K;Second acquisition module, for obtaining the priority of each application in N number of application, obtain N number of priority;Determining module, for processor resource to be released corresponding to determining N number of application according to N number of priority;Release module, for discharging processor resource to be released corresponding to each application in N number of application, obtain described second Idle processor resource.
- 8. device according to claim 7, it is characterised in that the priority includes multiple dimensions, and described second obtains Module is specifically used for obtaining in the multiple dimension per dimension evaluation of estimate corresponding with intended application, obtains multiple evaluations of estimate, The intended application is any application in described K application;According in the multiple dimension per evaluation of estimate corresponding to dimension and Preset weights obtain priority corresponding to the intended application.
- 9. the device according to claim 7 or 8, it is characterised in that the determining module includes:First obtains subelement, and the application of Second Threshold is less than or equal to for obtaining priority in N number of application, is obtained more Individual application;The L application that priority in N number of application is more than the Second Threshold is obtained, the L is less than or equal to described N positive integer;Second obtains subelement, for obtaining the difference of the first idle processor resource and the first processor resource, obtains To the 3rd processor resource;Determination subelement, taken for determining the processor resource to be released of each application in the multiple application for the application Processor resource;According to corresponding to the priority of the 3rd processor resource and the L application determines the L application Processor resource to be released.
- 10. according to the device described in claim any one of 6-9, it is characterised in that described device also includes:Judging unit, for judging whether the present frame receives picture render request;It is judged as YES in the judging unit When, the acquiring unit obtains the first processor resource corresponding to the picture render request.
- A kind of 11. mobile terminal, it is characterised in that including processor, memory, communication interface and one or more programs, Wherein, one or more of programs are stored in the memory, and are configured by the computing device, the journey Sequence includes being used for the instruction that perform claim requires the step in any one of 1-5 method.
- A kind of 12. computer-readable recording medium, it is characterised in that it is used to store computer program, wherein, the computer Program causes computer to perform the method as described in claim any one of 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711032475.9A CN107741880B (en) | 2017-10-26 | 2017-10-26 | Processor control method and related product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711032475.9A CN107741880B (en) | 2017-10-26 | 2017-10-26 | Processor control method and related product |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107741880A true CN107741880A (en) | 2018-02-27 |
CN107741880B CN107741880B (en) | 2021-04-23 |
Family
ID=61233080
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711032475.9A Active CN107741880B (en) | 2017-10-26 | 2017-10-26 | Processor control method and related product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107741880B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070250629A1 (en) * | 2006-04-24 | 2007-10-25 | Blanding William H | Method and a system that enables the calculation of resource requirements for a composite application |
CN103645955A (en) * | 2013-12-16 | 2014-03-19 | 百度在线网络技术(北京)有限公司 | Running management method and device for application program |
CN106407010A (en) * | 2016-09-06 | 2017-02-15 | 北京珠穆朗玛移动通信有限公司 | Internal memory management method and mobile terminal |
CN106559579A (en) * | 2016-11-30 | 2017-04-05 | 努比亚技术有限公司 | Mobile terminal and CPU/GPU scheduling parameter update methods |
US20170199798A1 (en) * | 2016-01-13 | 2017-07-13 | International Business Machines Corporation | Managing a set of wear-leveling data using a set of thread events |
-
2017
- 2017-10-26 CN CN201711032475.9A patent/CN107741880B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070250629A1 (en) * | 2006-04-24 | 2007-10-25 | Blanding William H | Method and a system that enables the calculation of resource requirements for a composite application |
CN103645955A (en) * | 2013-12-16 | 2014-03-19 | 百度在线网络技术(北京)有限公司 | Running management method and device for application program |
US20170199798A1 (en) * | 2016-01-13 | 2017-07-13 | International Business Machines Corporation | Managing a set of wear-leveling data using a set of thread events |
CN106407010A (en) * | 2016-09-06 | 2017-02-15 | 北京珠穆朗玛移动通信有限公司 | Internal memory management method and mobile terminal |
CN106559579A (en) * | 2016-11-30 | 2017-04-05 | 努比亚技术有限公司 | Mobile terminal and CPU/GPU scheduling parameter update methods |
Also Published As
Publication number | Publication date |
---|---|
CN107741880B (en) | 2021-04-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107220076B (en) | A kind of method for recovering internal storage and device | |
CN106506670B (en) | A kind of cloud platform virtual resource high speed dispatching method and system | |
CN108628674A (en) | Method for scheduling task, cloud platform based on cloud platform and computer storage media | |
CN113377540A (en) | Cluster resource scheduling method and device, electronic equipment and storage medium | |
CN103235686A (en) | Application management method and device | |
CN108173698A (en) | Network service management method, apparatus, server and storage medium | |
CN109766200A (en) | A kind of message queue processing method, device, equipment and storage medium | |
CN107861813A (en) | Processor control method and related product | |
CN104320854B (en) | Resource regulating method and device | |
CN107786738B (en) | Network control method and equipment | |
CN106792815A (en) | Data load method and device | |
CN109614223A (en) | Hardware resource dispatching method, device and hardware resource controlling equipment | |
CN107484190A (en) | Method for connecting network, mobile terminal and computer-readable recording medium | |
CN108810971A (en) | Internet of things data transmission method, internet-of-things terminal and computer readable storage medium | |
CN107347039A (en) | A kind of management method and device in shared buffer memory space | |
CN108573405A (en) | Benefit data provides and methods of exhibiting is grouped creation method and device electronics and storage device | |
CN106060899A (en) | Flow control method and device | |
CN108647092A (en) | Cloud storage method, cloud platform and computer readable storage medium | |
CN110245021A (en) | EMS memory management process, system, electronic equipment and the storage medium of mobile terminal | |
CN105138107B (en) | Downloading method of mobile terminal, device and mobile terminal | |
CN104281587B (en) | A kind of method and device for establishing connection | |
CN107797832A (en) | Using method for cleaning, device, storage medium and electronic equipment | |
CN107741880A (en) | Processor control method and related product | |
CN107102799A (en) | A kind of method and its intelligent terminal for adjusting the screen time of going out | |
CN109067864A (en) | Notification message method for pushing, device and electronic 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 |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |