CN107547744A - Resource allocation method and Related product - Google Patents
Resource allocation method and Related product Download PDFInfo
- Publication number
- CN107547744A CN107547744A CN201710771156.3A CN201710771156A CN107547744A CN 107547744 A CN107547744 A CN 107547744A CN 201710771156 A CN201710771156 A CN 201710771156A CN 107547744 A CN107547744 A CN 107547744A
- Authority
- CN
- China
- Prior art keywords
- performance boost
- application
- service routine
- destination application
- boost strategy
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
The embodiment of the present application discloses a kind of resource allocation method and Related product.Method includes:The operating system of mobile terminal calls the service routine to receive the performance boost strategy bag from remote server;The service routine is called to receive the contextual data bag from the destination application being currently running, the contextual data bag includes the scene relating information of the destination application;The service routine is called to determine the performance boost strategy of the destination application according to the contextual data bag inquiry performance boost strategy bag;The operating system according to the system resource of destination application described in the performance boost Developing Tactics distribution.The embodiment of the present application is advantageous to improve real-time and accuracy that mobile terminal control targe application program carries out performance optimization.
Description
Technical field
The application is related to technical field of mobile terminals, and in particular to resource allocation method and Related product.
Background technology
With the fast development of smart mobile phone correlation technique, increasing application is installed in user mobile phone, is such as read
Read class application, pay class application, game class application, the application of music class etc., the clothing, food, lodging and transportion -- basic necessities of life of people are inseparable with mobile phone.
At present, as people are to the performance requirement more and more higher of each application, such as the speed of service of application, the picture of application
Face definition etc., cause each application to meet requirement of the needs of people to mobile phone also with regard to more and more higher.
The content of the invention
The embodiment of the present application provides resource allocation method and Related product, can improve mobile terminal control targe application
Program carries out the real-time and accuracy of performance optimization.
In a first aspect, the embodiment of the present application provides a kind of resource allocation method, applied to mobile terminal, the mobile terminal
Upper operation has operating system and one or more application programs, and the operating system includes preset service routine, methods described
Including:
The service routine receives the performance boost strategy bag from remote server, and the performance boost strategy bag includes
The Run-time scenario of destination application performance boost strategy corresponding with the Run-time scenario and optimization duration, the performance boost
Strategy includes the adjustment grade being adjusted to required for system resource to be adjusted and the system resource to be adjusted;
The service routine receives the contextual data bag from the destination application being currently running, the contextual data bag
Scene relating information including the destination application;
The service routine inquires about the performance boost strategy bag according to the contextual data bag and determines the intended application
The performance boost strategy of program;
The operating system adjusts the destination application according to the performance boost strategy and the optimization duration
The distribution of system resource.
Second aspect, the embodiment of the present application provide a kind of device for allocating resources, applied to mobile terminal, the mobile terminal
Upper operation has operating system and one or more application programs, and the operating system includes preset service routine, the resource
Configuration device includes processing unit and communication unit,
The processing unit, for controlling the service routine to be received by the communication unit from remote server
Performance boost strategy bag, the Run-time scenario that the performance boost strategy bag includes destination application are corresponding with the Run-time scenario
Performance boost strategy and optimization duration, the performance boost strategy includes system resource to be adjusted and described to be adjusted is
The adjustment grade being adjusted to required for system resource;And come from for controlling the service routine to be received by the communication unit
The contextual data bag for the destination application being currently running, the scene that the contextual data bag includes the destination application are closed
Join information;And determine institute for controlling the service routine to inquire about the performance boost strategy bag according to the contextual data bag
State the performance boost strategy of destination application;And for controlling the operating system according to the performance boost strategy and institute
State the distribution that optimization duration adjusts the system resource of the destination application.
The third aspect, the embodiment of the present application provide a kind of mobile terminal, including processor, memory, communication interface and
One or more programs, wherein, said one or multiple programs are stored in above-mentioned memory, and are configured by above-mentioned
Manage device to perform, said procedure includes being used for the instruction for performing the step in the embodiment of the present application first aspect either method.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable recording medium, wherein, above computer is readable
Storage medium stores the computer program for electronic data interchange, wherein, above computer program causes computer to perform such as
Part or all of step described in the embodiment of the present application first aspect either method, above computer include mobile terminal.
5th aspect, the embodiment of the present application provide a kind of computer program product, wherein, above computer program product
Non-transient computer-readable recording medium including storing computer program, above 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 either method.The computer program product
Can be a software installation bag, above computer includes mobile terminal.
As can be seen that in the embodiment of the present application, the operating system of mobile terminal calls service routine to receive from remote first
The performance boost strategy bag of journey server, secondly, the service routine is called to receive from the destination application being currently running
Contextual data bag, the contextual data bag includes the scene relating information of the destination application, again, calls the clothes
Business routine determines the performance boost of the destination application according to the contextual data bag inquiry performance boost strategy bag
Strategy, finally, the system that operating system adjusts the destination application according to the performance boost strategy and optimization duration provide
The distribution in source.Be advantageous to improve real-time and accuracy that mobile terminal control targe application program carries out performance optimization.
Brief description of the drawings
The accompanying drawing involved by the embodiment of the present application will be briefly described below.
Figure 1A is a kind of system architecture schematic diagram of program running space;
Figure 1B is a kind of system architecture schematic diagram of Android system;
Fig. 2 is a kind of schematic flow sheet for resource allocation method that the embodiment of the present application provides;
Fig. 3 is a kind of schematic flow sheet of resource allocation method disclosed in the embodiment of the present application;
Fig. 4 is a kind of schematic flow sheet of resource allocation method disclosed in the embodiment of the present application;
Fig. 5 is a kind of structural representation of mobile terminal disclosed in the embodiment of the present application;
Fig. 6 is a kind of functional unit composition block diagram of mobile terminal disclosed in the embodiment of the present application;
Fig. 7 is a kind of structural representation of smart mobile phone disclosed in the embodiment of the present application.
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.Behaviour involved by the embodiment of the present invention
It is that hardware resource is managed collectively as system, and provides a user the software systems of business interface.
As shown in Figure 1A, the mobile terminal such as smart mobile phone is typically provided with program running space at present, and program operation is empty
Between include user's space and operating system space, wherein, user's space operation have one or more application programs, this or more
Individual application program is the third party application of mobile terminal installation, and operating system space motion has the operation system of mobile terminal
System.The mobile terminal can specifically run Android android system, Mobile operating system iOS that Apple Inc. develops etc., herein
Unique restriction is not done.As shown in Figure 1B, so that above-mentioned running of mobile terminal has android system as an example, corresponding user's space bag
The application layer (Applications) in the android system is included, operating system space can include in the android system
Application framework layer (Application Framework), system operation storehouse layer (including system operation storehouse layer Libraries
Android Runtime when being run with Android), Linux inner core (Linux Kernel).Wherein, include in application layer each
Class and the application program of user's direct interaction, or the service routine for running on backstage write by Java language.For example, intelligent hand
The program for the common basic function realized on machine, such as short message service (Short Messaging Service, SMS) short message,
The programs such as dialing, Photo Browser, calendar, game, map, WWW (World Wide Web, Web) browser, with
And the other applications of developer's exploitation.Application framework layer provides the system needed for exploitation Android application programs
It row class libraries, can be used in reusing component, personalized extension can also be realized by inheriting.System operation storehouse layer is application program
The support of framework, service is provided for each component in android system.System operation storehouse layer is by system class libraries and Android
Formed during operation.Android includes core library and Dalvik virtual machine two parts when running.Linux inner core is used to realize firmly
The Core Features such as part device drives, process and memory management, network protocol stack, power management, radio communication.
The process that above-mentioned third party application is created operates in user's space at the beginning, when it will perform network
When sending the action such as data, reading disk resource, it is necessary to connect by the standard for calling write, send etc. to be provided by operating system
Mouthful function is completed, i.e., is operated by the code of CPU call operation system spaces to complete the request of user.It can be seen that third party should
The function of call operation system offer is wanted with program, the standard interface function that it can only be called to provide.Meanwhile operating system is not
Know third party application specifically perform which function, destination application can not command operation system perform it is special
Operation, both is separate, and this causes operating system to cannot be distinguished by the internal operation scene of destination application, can only
Go to be adapted to using standard set parameter, it is excellent that targetedly performance can not be carried out for the internal operation scene of destination application
Change, be additionally, since that third party application renewal upgrade cycle is very short, and significantly larger than operation system of smart phone version is more
New speed, when the strategy that third party application is directed in operation system of smart phone has been difficult to meet third party application
More redaction when, smart mobile phone manufacturer be difficult respond in time carry out smart mobile phone operating system optimization.
For the above situation, the embodiment of the present application proposes a kind of resource distribution of destination application for mobile terminal
Method, in this method, the operating system calls the service routine to receive the performance boost strategy bag from remote server,
And the service routine is called to receive the contextual data bag from the destination application being currently running, the contextual data bag
Include the scene relating information of the destination application;The service routine is inquired about the performance according to the contextual data bag and carried
Rise the performance boost strategy that strategy bag determines the destination application;The operating system according to the performance boost strategy and
Optimize the distribution that duration adjusts the system resource of the destination application.Realization is existed by operating system for destination application
The performance of internal operation scene in running optimizes, and is advantageous to improve the progress of mobile terminal control targe application program
The real-time and accuracy of performance optimization.
The embodiment of the present application is introduced below in conjunction with the accompanying drawings.
A kind of schematic flow sheet of resource allocation method is provided referring to Fig. 2, Fig. 2 is the embodiment of the present application, is applied to
Mobile terminal, on the mobile terminal operation have operating system and one or more application programs, the operating system includes
Preset service routine, as illustrated, this resource allocation method includes:
S201, the service routine receive the performance boost strategy bag from remote server, the performance boost strategy
Include the Run-time scenario performance boost strategy corresponding with the Run-time scenario and optimization duration of destination application, the property
Energy Promotion Strategy includes the adjustment grade being adjusted to required for system resource to be adjusted and the system resource to be adjusted.
Wherein, the remote server for the mobile terminal manufacturer multiple servers in server, the performance
Promotion Strategy bag includes the performance boost strategy of multiple Run-time scenarios for multiple application programs, the performance boost strategy bag
Performance boost strategy bag after the corresponding renewal made for the mobile terminal manufacturer according to the version updating of multiple application programs.
Wherein, the performance boost strategy bag is stored in the non-volatile memories of the mobile terminal by the service routine
On medium, after restarting the mobile terminal, the performance boost strategy bag will not be lost.
Wherein, the adjustment grade being adjusted to required for the system resource to be adjusted comprises at least following system resource
Adjust grade:CPU, GPU, the internal memory of the mobile terminal.
Wherein, the functional interface or the collection of programs of service that the service routine externally provides for operating system.
S202, the service routine receive the contextual data bag from the destination application being currently running.
Wherein, the contextual data bag includes the scene relating information of the destination application.
Wherein, destination application refer to installed in mobile terminal user's space third party application, the 3rd
Such as can be the application of instant messaging class, game class application, the third party application can be pacified square application program by user
Dress, can also be pre-installed before mobile terminal dispatches from the factory by developer, does not do unique restriction herein.
Wherein, the scene relating letter of internal operation scene when contextual data bag is currently running including destination application
Breath, the internal operation scene can be divided according to different preparatory conditions, can be such as divided into according to the demand to cpu resource
Start scene, into session context, exit session context etc., can be divided into according to the demand to GPU resource and check picture field
Scape, video scene etc. is checked, be interactive scene and Fei Jiao such as according to whether there is user mutual to divide internal operation scene
Mutual formula scene, or, single user scene and multi-user scene are divided into according to the complexity of task, or according to different behaviors
It is divided into and starts scene, resource updates scene, account login scene, store scene, main interface scene etc., in addition, the default bar
Part can also associate different application types, i.e. the application of different application type can mark off identical or not according to preparatory condition
Same internal operation scene, does not do unique restriction herein.
Wherein, the scene relating information can include current internal operation scene with destination application it is following extremely
A kind of few information:Scene identity, key message parameter, wherein, scene identity can be by the current internal operation field that collects
The key message parameter of scape determines, key message parameter can include starting information, resource updates information, account logon information,
Interface type information etc., unique restriction is not done herein.In addition, the form of contextual data bag for example can be java script object mark
Note (JavaScript Object Notation, JSON), agreement buffering area (ProtocolBuffer, Protobuf), make by oneself
The data transmission formats such as adopted form, unique restriction is not done herein.
In a possible example, the service routine receives the scene number from the destination application being currently running
Before bag, methods described also includes:
The service routine receives the connection request from the destination application, and the connection request includes the mesh
Mark the application identities of application program;
The service routine identifies by inquiry of the application identities, authority of the inquiry for the multiple application program
Table;
When the authority list includes the application identities of the destination application, the service routine should for the target
Data transmission interface is distributed with program, the data transmission interface is used between the destination application and the service routine
Data are transmitted, the data comprise at least the contextual data bag.
Wherein, the authority list can be default authority list in service routine, or default in operating system
Authority list, do not limit herein, the authority list is prestored in an operating system by manufacturer, can be by updating operating system
Renewal, the authority list include allowing to realize the application identities of multiple application programs of interprocess communication with operating system.
Wherein, the service routine is assigned with after data transmission interface to the destination application, the operation system
System can be that Socket port communications transmit, pipeline pipe communicates, shared with the communication mode between the destination application
The modes such as SharedMemory, shared file are stored, do not do unique restriction herein.
Wherein, it is destination application and service example when the data transmission interface is currently running for destination application
Effective data transmission link is provided between journey, after destination application does not rerun, the data transmission link can be eliminated, should
Data transmission interface can be disabled.
It can be seen that in this example, the service routine in operating system please in connection of the reception from the destination application
When asking, the authority of the destination application is first determined, is then passed to the destination application distribution data for meeting jurisdictions mandate
Defeated interface, rather than blindness give any application data coffret, are advantageous to avoid the disorder of data transfer, and
Ensure the security of data transfer.
S203, the service routine inquire about the performance boost strategy bag according to the contextual data bag and determine the target
The performance boost strategy of application program.
Wherein, performance boost strategy refers to the fortune of the Run-time scenario for improving the above-mentioned destination application being currently running
The resource allocation strategy of row performance, as cpu resource adjustable strategies, GPU resource adjustable strategies, memory bandwidth resource adjusting strategies,
Disk resource adjustable strategies, Internet resources adjustable strategies etc., do not do unique restriction herein.
Wherein, performance boost strategy can be for the adjustable strategies of system resource or for multiple moneys
The adjustable strategies in source, are not limited herein.
Wherein, the service routine is according to inquiring about the property on the contextual data bag to the non-volatile memory medium
Energy Promotion Strategy bag determines the performance boost strategy of the destination application.
Wherein, the performance boost strategy can include system resource to be adjusted, the adjustment of system resource to be adjusted
Amount, or the adjustment duration of system resource to be adjusted can also be included.
S204, the operating system adjust the intended application journey according to the performance boost strategy and the optimization duration
The distribution of the system resource of sequence.
In a possible example, the system resource includes at least one in the following resource of the mobile terminal
Kind:Cpu resource, GPU resource, memory bandwidth resource, disk resource, Internet resources.Wherein, Internet resources include mobile terminal
The Internet resources of data network, the Internet resources of Wireless Fidelity Wi-Fi network, the control parameter resource etc. of bluetooth module.
Wherein, at least one in the system resource is cpu resource, GPU resource, memory bandwidth resource, disk resource
During kind, operating system can be communicated by direct-connected communication mode with the inner nuclear layer in operating system space, adjust the system resource
Configuration, direct-connected communication mode refer to by abstract application programming interface (Application Programming
Interface, API) direct communication.
Wherein, when the system resource is Internet resources, operating system can be by indirect communication mode and operation
The inner nuclear layer communication in system space, adjusts the configuration of the system resource, indirect communication mode refers to by calling agency service come between
Letter is connected, as the Wi-Fi subsystems in Internet resources or data network subsystem do not operate in same system with operating system
In system, it is necessary to by way of some agencies, these system resources of dereference, Wi-Fi agency is provided in operating system
Service, by calling the interface of the agency service come indirect and Wi-Fi subsystem communications.
As can be seen that in the embodiment of the present application, the operating system of mobile terminal calls service routine to receive from remote first
The performance boost strategy bag of journey server, secondly, service routine is called to receive from the field for the destination application being currently running
Scape packet, the contextual data bag include the scene relating information of the destination application, again, call service routine root
The performance boost strategy of the destination application is determined according to the contextual data bag inquiry performance boost strategy bag, most
Afterwards, operating system adjusts the system resource of the destination application according to the performance boost strategy and the optimization duration
Distribution.Because contextual data bag is sent by the destination application that is currently running, the contextual data bag includes at least one scene
Related information, can precisely determine the performance boost strategy when destination application is currently running, and by operating system according to
The performance boost strategy adjusts the configuration of the resource of destination application in real time, realizes by operating system to destination application
Real-time performance optimization is carried out in the process of running, is advantageous to improve the progress performance optimization of mobile terminal control targe application program
Real-time, in addition, service routine receive the performance boost strategy bag from remote server, avoid due to system update speed
The problem of degree can not be difficult to meet destination application immediately following optimisation strategy caused by the speed of application program update, receive factory
The optimisation strategy bag of the latest edition of business's remote server, be advantageous to lift mobile terminal control targe application program progress performance
The accuracy of optimization.
In a possible example, the contextual data bag identifies including application type, the scene relating packet
Scene identity is included, the service routine inquires about the performance boost strategy bag according to the contextual data bag and determines that the target should
With the performance boost strategy of program, including:
The service routine with the application type be identified as inquiry mark, determine in the performance boost strategy bag with institute
State multiple performance boost strategies corresponding to application type mark;
The service routine obtains the scene relating information in the contextual data bag;
The service routine according to the scene relating information determine in the multiple performance boost strategy with the scene
The performance boost strategy of the destination application corresponding to mark.
Wherein, the scene relating information includes multiple fortune that scene identity illustrates to be preset with division in the application program
Row scene.
Wherein, the performance boost strategy bag can include application type mark, scene identity and performance boost strategy it
Between mapping relations.
Optionally, the service routine according to the scene relating information determine in the multiple performance boost strategy with institute
The performance boost strategy of the destination application corresponding to scene identity is stated, including:The service routine can be with scene mark
Know and identified for inquiry, inquire about multiple performance boost strategies, determine performance boost strategy corresponding to the scene identity.
It can be seen that in this example, because contextual data bag includes scene identity, due to application type mark, scene identity
Corresponded with performance boost strategy, therefore can be identified according to application type and quickly determine performance boost plan with scene identity
Slightly, the current scene for the destination application that the scene identity association and in contextual data bag is currently running, that is to say, that it is determined that
The current operating conditions for the destination application that the performance boost strategy association gone out is currently running, therefore according to the performance boost plan
The current operating conditions of accurate optimization aim application program are capable of in the configuration of slightly adjustresources, are advantageous to improve mobile terminal and are controlled
The degree of accuracy for the destination application being currently running and adjustresources configure ageing.
In a possible example, the contextual data bag identifies including application type, the scene relating packet
Key message parameter is included, the key message parameter comprises at least one or more in following information:Start information, resource more
Fresh information, account logon information, interface type information;The service routine is inquired about the performance according to the contextual data bag and carried
The performance boost strategy that strategy bag determines the destination application is risen, including:
The service routine with the application type be identified as inquiry mark, determine in the performance boost strategy bag with institute
State multiple performance boost strategies corresponding to application type mark;
The service routine obtains the scene relating information in the contextual data bag;
The key message parameter of the service routine in the scene relating information determines the intended application
The Run-time scenario of program;
The service routine according to the Run-time scenario determine in the multiple performance boost strategy with the Run-time scenario
The performance boost strategy of the corresponding destination application.
Wherein, multiple Run-time scenarios of division are prestored in the operating system.
It can be seen that in this example, because contextual data bag includes key message parameter, service routine can be believed according to key
Breath parameter accurately determines current Run-time scenario, due to performance boost policy store in an operating system, true by service routine
It is fixed more can accurately matching performance Promotion Strategy, in addition, the intended application that the performance boost strategy association determined is currently running
The current operating conditions of program, therefore being capable of accurate optimization aim application journey according to the configuration of the performance boost Developing Tactics resource
The current operating conditions of sequence, be advantageous to improve the degree of accuracy and adjustment of the destination application that mobile terminal control is currently running
Resource distribution it is ageing.
In a possible example, the performance boost strategy includes system resource to be adjusted and described to be adjusted
The adjustment grade of system resource, the operating system adjust the target according to the performance boost strategy and the optimization duration
The distribution of the system resource of application program, including:
The adjustment grade that the operating system is adjusted to according to required for the system resource to be adjusted is treated described in determining
The adjustment amount of the system resource of adjustment;
The operating system adjusts the system resource to be adjusted of the destination application according to the adjustment amount
Distribution.
Wherein, different system resource can be divided into multiple grades by operating system, such as all system resource is equal
Be divided into 8 grades, the mode of grade classification can with it is identical can be different, can be according to the total amount of system resource divide equally etc.
Level or the non-grade divided equally, for example, CPU total resources is 100, then it can be divided into non-, grade 1 is 50, etc.
Level 2 is 70, and grade 3 is 80, class 4 88, class 5 94, class 6 98, and grade 7 is 99, and grade 8 is 100.
Wherein, the adjustment grade that the operating system is adjusted to according to required for the system resource to be adjusted determines institute
The adjustment amount for stating system resource to be adjusted can be operating system system resource according to corresponding to the adjustment grade
Measure with the difference for the amount that current system resource is intended application distribution to be defined as adjustment amount.
It can be seen that in this example, the adjustment grade of to be adjusted system resource of the operating system in performance boost determines
It is adapted to the adjustment amount of current system, and then distribution of the classification performance Promotion Strategy adjustment system to resource, is advantageous to lifting operation
The accuracy of system call interception system resource allocation.
In a possible example, methods described also includes:
The operating system ought detect is more than or equal to the optimization according to the adjustment duration of the performance boost strategy
During duration, cancel the distribution according to the system resource of destination application described in the performance boost Developing Tactics.
Wherein, during the optimization a length of system resource to be adjusted adjustment duration.
Wherein, the optimization duration relating operation scene, when different Run-time scenarios presets different system resource adjustment
It is long.
Wherein, described cancel adjusts the destination application according to the performance boost strategy and the optimization duration
System resource is assigned as authority of the cancellation to the data transmission interface, recovers according to before the performance boost Developing Tactics
The destination application system resource distribution.
It can be seen that in this example, the operating system is main when detecting that adjustment duration is more than or equal to the optimization duration
The dynamic distribution for cancelling the system resource that the destination application is adjusted according to the performance boost strategy and the optimization duration,
Rather than allow destination application to take more system resource always, advantageously reduce the power consumption and electricity of mobile terminal
Consumption.
In a possible example, methods described also includes:
The service routine receives the instruction message from the destination application, and the instruction message is used to indicate institute
State distribution of the operating system cancellation according to the system resource of destination application described in the performance boost Developing Tactics;
The operating system is cancelled according to the instruction message to be adjusted according to the performance boost strategy and the optimization duration
The distribution of the system resource of the whole destination application.
Wherein, it is described to indicate that message at the end of the Run-time scenario is detected, that is, detects for the destination application
When exiting current Run-time scenario to user's operation, the instruction message of the service routine is sent to, the instruction message is used for institute
State operating system and cancel the system money that the destination application is adjusted according to the performance boost strategy and the optimization duration
The distribution in source.
It can be seen that in this example, the instruction message that operating system is sent according to destination application is cancelled according to the performance
Promotion Strategy adjusts the distribution of the system resource of the destination application, is advantageous to the accuracy that the time is cancelled in lifting, without
It is to allow destination application to take more system resource always, the power consumption and electricity for advantageously reducing mobile terminal disappear
Consumption.
It is consistent with the embodiment shown in above-mentioned Fig. 2, referring to Fig. 3, Fig. 3 is a kind of resource that the embodiment of the present application provides
The schematic flow sheet of collocation method, being run applied to mobile terminal, on the mobile terminal has operating system and one or more
Application program, the operating system include preset service routine, and the contextual data bag identifies including application type, the scene
Related information includes scene identity.As illustrated, this resource allocation method includes:
S301, the service routine receive the performance boost strategy bag from remote server, the performance boost strategy
Include the Run-time scenario performance boost strategy corresponding with the Run-time scenario and optimization duration of destination application, the property
Energy Promotion Strategy includes the adjustment grade being adjusted to required for system resource to be adjusted and the system resource to be adjusted.
S302, the service routine receive the contextual data bag from the destination application being currently running, the scene
Packet identifies including application type.
S303, the service routine are identified as inquiry mark with the application type, determine the performance boost strategy bag
In multiple performance boost strategies corresponding with application type mark.
S304, the service routine obtain the scene relating information in the contextual data bag, the scene relating information
Including scene identity.
S305, the service routine according to the scene relating information determine in the multiple performance boost strategy with it is described
The performance boost strategy of the destination application corresponding to scene identity.
S306, the operating system is according to the system resource of destination application described in the performance boost Developing Tactics
Distribution.
S307, the operating system, which is worked as, detects the adjustment duration according to the performance boost strategy more than or equal to optimization
During duration, cancel the distribution according to the system resource of destination application described in the performance boost Developing Tactics.
As can be seen that in the embodiment of the present application, the operating system of mobile terminal calls service routine to receive from remote first
The performance boost strategy bag of journey server, secondly, service routine is called to receive from the field for the destination application being currently running
Scape packet, the contextual data bag include the scene relating information of the destination application, again, call service routine root
The performance boost strategy of the destination application is determined according to the contextual data bag inquiry performance boost strategy bag, most
Afterwards, operating system according to the system resource of destination application described in the performance boost Developing Tactics distribution.Due to scene
Packet is sent by the destination application being currently running, and the contextual data bag includes at least one scene relating information, can
The performance boost strategy when destination application is currently running precisely is determined, and by operating system according to the performance boost strategy
The configuration of the resource of adjustment destination application in real time, realizes and destination application is entered in the process of running by operating system
The real-time performance optimization of row, is advantageous to improve the real-time that mobile terminal control targe application program carries out performance optimization, in addition,
Service routine receives the performance boost strategy bag from remote server, avoids because system update speed can not closely follow application
The problem of optimisation strategy is difficult to meet destination application caused by the speed of program renewal, receive manufacturer's remote server
The optimisation strategy bag of latest edition, be advantageous to lift the accuracy that mobile terminal control targe application program carries out performance optimization.
Further, since contextual data bag includes key message parameter, service routine can be accurate according to key message parameter
Current Run-time scenario is really determined, due to performance boost policy store in an operating system, being determined by service routine more can be accurate
True matching performance Promotion Strategy, in addition, the destination application that the performance boost strategy association determined is currently running is worked as
Preceding running status, therefore it is capable of the current of accurate optimization aim application program according to the configuration of the performance boost Developing Tactics resource
Running status, be advantageous to improve the degree of accuracy and adjustresources configuration of the destination application that mobile terminal control is currently running
It is ageing.
In addition, the operating system is actively cancelled and pressed when detecting that adjustment duration is more than or equal to the optimization duration
According to the distribution of the system resource of destination application described in the performance boost Developing Tactics, rather than allow destination application one
More system resource is directly taken, advantageously reduces the power consumption and electric quantity consumption of mobile terminal.
It is consistent with the embodiment shown in above-mentioned Fig. 2, referring to Fig. 4, Fig. 4 is a kind of resource that the embodiment of the present application provides
The schematic flow sheet of collocation method, being run applied to mobile terminal, on the mobile terminal has operating system and one or more
Application program, the operating system include preset service routine.As illustrated, this resource allocation method includes:
S401, the service routine receive the connection request from destination application, and the connection request includes described
The application identities of destination application.
S402, the service routine identify by inquiry of the application identities, and inquiry is for the multiple application program
Authority list.
S403, when the authority list includes the application identities of the destination application, the service routine is described
Destination application distributes data transmission interface.
S404, the service routine receive the performance boost strategy bag from remote server, the performance boost strategy
Include the Run-time scenario performance boost strategy corresponding with the Run-time scenario and optimization duration of destination application, the property
Energy Promotion Strategy includes the adjustment grade being adjusted to required for system resource to be adjusted and the system resource to be adjusted.
S405, the service routine are received from the destination application being currently running by the data transmission interface
Contextual data bag, the contextual data bag identify including application type.
S406, the service routine are identified as inquiry mark with the application type, determine the performance boost strategy bag
In multiple performance boost strategies corresponding with application type mark.
S407, the service routine obtain the scene relating information in the contextual data bag, the scene relating
Information includes key message parameter, and the key message parameter comprises at least one or more in following information:Startup information,
Resource updates information, account logon information, interface type information.
S408, the key message parameter of the service routine in the scene relating information determine the target
The Run-time scenario of application program.
S409, the service routine according to the Run-time scenario determine in the multiple performance boost strategy with the operation
The performance boost strategy of the destination application corresponding to scene.
S410, the operating system is according to the system resource of destination application described in the performance boost Developing Tactics
Distribution.
S411, the service routine receive the instruction from the destination application by the data transmission interface and disappeared
Breath, the instruction message are used to indicate that the operating system is cancelled according to intended application journey described in the performance boost Developing Tactics
The distribution of the system resource of sequence.
S412, operating system target according to the instruction message cancellation according to the performance boost Developing Tactics
The distribution of the system resource of application program.
As can be seen that in the embodiment of the present application, the operating system of mobile terminal calls service routine to receive from remote first
The performance boost strategy bag of journey server, secondly, service routine is called to receive from the field for the destination application being currently running
Scape packet, the contextual data bag include the scene relating information of the destination application, again, call service routine root
The performance boost strategy of the destination application is determined according to the contextual data bag inquiry performance boost strategy bag, most
Afterwards, operating system according to the system resource of destination application described in the performance boost Developing Tactics distribution.Due to scene
Packet is sent by the destination application being currently running, and the contextual data bag includes at least one scene relating information, can
The performance boost strategy when destination application is currently running precisely is determined, and by operating system according to the performance boost strategy
The configuration of the resource of adjustment destination application in real time, realizes and destination application is entered in the process of running by operating system
The real-time performance optimization of row, is advantageous to improve the real-time that mobile terminal control targe application program carries out performance optimization, in addition,
Service routine receives the performance boost strategy bag from remote server, avoids because system update speed can not closely follow application
The problem of optimisation strategy is difficult to meet destination application caused by the speed of program renewal, receive manufacturer's remote server
The optimisation strategy bag of latest edition, be advantageous to lift the accuracy that mobile terminal control targe application program carries out performance optimization.
In addition, the service routine in operating system is when receiving the connection request from the destination application, it is first true
The authority of the fixed destination application, then to the destination application distribution data transmission interface for meeting jurisdictions mandate, and
It is not that blindness gives any application data coffret, is advantageous to avoid the disorder of data transfer, and ensure data
The security of transmission.
Further, since contextual data bag includes key message parameter, service routine can be accurate according to key message parameter
Current Run-time scenario is really determined, due to performance boost policy store in an operating system, being determined by service routine more can be accurate
True matching performance Promotion Strategy, in addition, the destination application that the performance boost strategy association determined is currently running is worked as
Preceding running status, therefore it is capable of the current of accurate optimization aim application program according to the configuration of the performance boost Developing Tactics resource
Running status, be advantageous to improve the degree of accuracy and adjustresources configuration of the destination application that mobile terminal control is currently running
It is ageing.
Adjusted in addition, the instruction message that operating system is sent according to destination application is cancelled according to the performance boost strategy
The distribution of the system resource of the whole destination application, be advantageous to lifting and cancel the accuracy of time, rather than allow target should
Take more system resource always with program, advantageously reduce the power consumption and electric quantity consumption of mobile terminal.
It is consistent with the embodiment shown in above-mentioned Fig. 2, Fig. 3, Fig. 4, provided referring to Fig. 5, Fig. 5 is the embodiment of the present application
A kind of structural representation of mobile terminal, the running of mobile terminal have one or more application programs and operating system, the behaviour
Making system includes preset service routine, as illustrated, the mobile terminal includes processor, memory, communication interface and one
Or multiple programs, wherein, said one or multiple programs are different from said one or multiple application programs, and said one or more
Individual program is stored in above-mentioned memory, and is configured by above-mentioned computing device, said procedure include being used for performing with
The instruction of lower step;
The service routine is controlled to receive the performance boost strategy bag from remote server, the performance boost strategy bag
Run-time scenario performance boost strategy corresponding with the Run-time scenario and optimization duration including destination application, the performance
Promotion Strategy includes the adjustment grade being adjusted to required for system resource to be adjusted and the system resource to be adjusted;
The service routine is controlled to receive the contextual data bag from the destination application being currently running, the scene number
According to the scene relating information for including the destination application;
Control the service routine to inquire about the performance boost strategy bag according to the contextual data bag and determine the target
The performance boost strategy of application program;
The operating system is controlled according to the system resource of destination application described in the performance boost Developing Tactics
Distribution.
As can be seen that in the embodiment of the present application, the operating system of mobile terminal calls service routine to receive from remote first
The performance boost strategy bag of journey server, secondly, service routine is called to receive from the field for the destination application being currently running
Scape packet, the contextual data bag include the scene relating information of the destination application, again, call service routine root
The performance boost strategy of the destination application is determined according to the contextual data bag inquiry performance boost strategy bag, most
Afterwards, operating system according to the system resource of destination application described in the performance boost Developing Tactics distribution.Due to scene
Packet is sent by the destination application being currently running, and the contextual data bag includes at least one scene relating information, can
The performance boost strategy when destination application is currently running precisely is determined, and by operating system according to the performance boost strategy
The configuration of the resource of adjustment destination application in real time, realizes and destination application is entered in the process of running by operating system
The real-time performance optimization of row, is advantageous to improve the real-time that mobile terminal control targe application program carries out performance optimization, in addition,
Service routine receives the performance boost strategy bag from remote server, avoids because system update speed can not closely follow application
The problem of optimisation strategy is difficult to meet destination application caused by the speed of program renewal, receive manufacturer's remote server
The optimisation strategy bag of latest edition, be advantageous to lift the accuracy that mobile terminal control targe application program carries out performance optimization.
In a possible example, the contextual data bag identifies including application type, the scene relating packet
Scene identity is included, inquiring about the performance boost strategy bag according to the contextual data bag in the control service routine determines
In terms of the performance boost strategy of the destination application, the instruction in described program is specifically used for performing following operate:Control
The service routine is identified as inquiry mark with the application type, determines to apply class with described in the performance boost strategy bag
Multiple performance boost strategies corresponding to type mark;And the control service routine obtains the field in the contextual data bag
Scape related information;And the control service routine is determined in the multiple performance boost strategy according to the scene relating information
The performance boost strategy of the destination application corresponding with the scene identity.
In a possible example, the contextual data bag identifies including application type, the scene relating packet
Key message parameter is included, the key message parameter comprises at least one or more in following information:Start information, resource more
Fresh information, account logon information, interface type information;Inquired about in the control service routine according to the contextual data bag
In terms of the performance boost strategy bag determines the performance boost strategy of the destination application, the instruction in described program is specific
For performing following operation:Control the service routine to be identified as inquiry mark with the application type, determine that the performance carries
Rise multiple performance boost strategies corresponding with application type mark in strategy bag;And the control service routine obtains institute
State the scene relating information in contextual data bag;And the control service routine is according in the scene relating information
The key message parameter determines the Run-time scenario of the destination application;And the control service routine is according to the fortune
Row scene determines that the performance of the destination application corresponding with the Run-time scenario in the multiple performance boost strategy carries
Rise strategy.
In a possible example, the performance boost strategy includes system resource to be adjusted and described to be adjusted
The adjustment grade of system resource, in the control operating system according to intended application described in the performance boost Developing Tactics
In terms of the distribution of the system resource of program, the instruction in described program is specifically used for performing following operate:Control the operation system
The adjustment grade being adjusted to according to required for the system resource to be adjusted of uniting determines the tune of the system resource to be adjusted
Whole amount;And for controlling the operating system to adjust the described to be adjusted of the destination application according to the adjustment amount
The distribution of system resource.
In a possible example, the performance boost strategy includes optimization duration, and said procedure also includes being used to hold
The instruction of row following steps:The control operating system is according to destination application described in the performance boost Developing Tactics
System resource distribution after, control the operating system to be grown up when detecting the adjustment according to the performance boost strategy
When the optimization duration, cancel the system resource according to destination application described in the performance boost Developing Tactics
Distribution.
In a possible example, said procedure also includes being used for the instruction for performing following steps:Described in the control
After operating system is according to the distribution of the system resource of destination application described in the performance boost Developing Tactics, described in control
Service routine receives the instruction message from the destination application, and the instruction message is used to indicate that the operating system takes
The distribution to disappear according to the system resource of destination application described in the performance boost Developing Tactics;And the control operation system
Point of system system resource of destination application according to the instruction message cancellation according to the performance boost Developing Tactics
Match somebody with somebody.
In a possible example, said procedure also includes being used for the instruction for performing following steps:Described in the control
Before service routine receives the contextual data bag from the destination application being currently running, control the service routine to receive and come
From the connection request of the destination application, the connection request includes the application identities of the destination application;And
The service routine is controlled to be identified by inquiry of the application identities, authority list of the inquiry for the multiple application program;With
And control, when the authority list includes the application identities of the destination application, the service routine is the intended application
Program distributes data transmission interface, and the data transmission interface is used to pass between the destination application and the service routine
Transmission of data, the data comprise at least the contextual data bag.
In a possible example, the adjustment grade being adjusted to required for the system resource to be adjusted comprises at least
The adjustment grade of following system resource:CPU, GPU, the internal memory of the mobile terminal.
It is above-mentioned that mainly the scheme of the embodiment of the present application is described from the angle of method side implementation procedure.It is appreciated that
, for mobile terminal in order to realize above-mentioned function, it comprises perform the corresponding hardware configuration of each function and/or software mould
Block.Those skilled in the art should be readily appreciated that, with reference to the unit of each example of the embodiments described herein description
And algorithm steps, the application can be realized with the combining form of hardware or hardware and computer software.Some function actually with
The mode of hardware or computer software driving hardware performs, application-specific and design constraint bar depending on technical scheme
Part.Professional and technical personnel can specifically realize described function to each using distinct methods, but this reality
Now it is not considered that exceeding scope of the present application.
The embodiment of the present application can carry out the division of functional unit according to above method example to mobile terminal, for example, can
Each functional unit is divided with corresponding each function, two or more functions can also be integrated in a processing unit
In.Above-mentioned integrated unit can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.Need
It is noted that the division in the embodiment of the present application to unit is schematical, only a kind of division of logic function is actual real
There can be other dividing mode now.
In the case of using integrated unit, Fig. 6 shows device for allocating resources involved in above-described embodiment
A kind of possible functional unit composition block diagram.Device for allocating resources 600 is applied to mobile terminal, and being run on the mobile terminal has
Operating system and one or more application programs, the operating system include preset service routine, the device for allocating resources
600 include:Processing unit 602 and communication unit 603.The action that processing unit 602 is used for device for allocating resources is controlled
Management, for example, processing unit 602 is used to support device for allocating resources to perform the step in step S201-S204, Fig. 3 in Fig. 2
Step S401-S412 in S301-S307, Fig. 4 and/or other processes for techniques described herein.Resource distribution fills
Memory cell 601 can also be included by putting, for store program codes and data.
The processing unit 602, for controlling the service routine to be received by the communication unit 603 from long-range clothes
The performance boost strategy bag of business device;And for controlling the service routine to be received by the communication unit 603 from
The contextual data bag of the destination application of operation, the scene relating that the contextual data bag includes the destination application are believed
Breath;And determine the mesh for controlling the service routine to inquire about the performance boost strategy bag according to the contextual data bag
Mark the performance boost strategy of application program;And for controlling the operating system according to described in the performance boost Developing Tactics
The distribution of the system resource of destination application.
In a possible example, the contextual data bag identifies including application type, the scene relating packet
Scene identity is included, inquiring about the performance boost strategy bag according to the contextual data bag in the control service routine determines
In terms of the performance boost strategy of the destination application, the processing unit 602 is specifically used for:Control the service routine with
The application type is identified as inquiry mark, determines corresponding more with application type mark in the performance boost strategy bag
Individual performance Promotion Strategy;And for controlling the service routine to obtain the scene relating letter in the contextual data bag
Breath;And for control the service routine according to the scene relating information determine in the multiple performance boost strategy with institute
State the performance boost strategy of the destination application corresponding to scene identity.
In a possible example, the contextual data bag identifies including application type, the scene relating packet
Key message parameter is included, the key message parameter comprises at least one or more in following information:Start information, resource more
Fresh information, account logon information, interface type information;Inquired about in the control service routine according to the contextual data bag
In terms of the performance boost strategy bag determines the performance boost strategy of the destination application, the processing unit 602 is specific
For:Control the service routine with the application type be identified as inquiry mark, determine in the performance boost strategy bag with
Multiple performance boost strategies corresponding to the application type mark;And for controlling the service routine to obtain the scene number
According to the scene relating information in bag;And for controlling the service routine according in the scene relating information
Key message parameter determines the Run-time scenario of the destination application;And for controlling the service routine according to the fortune
Row scene determines that the performance of the destination application corresponding with the Run-time scenario in the multiple performance boost strategy carries
Rise strategy.
In a possible example, the performance boost strategy includes system resource to be adjusted and described to be adjusted
The adjustment grade of system resource, in the control operating system according to intended application described in the performance boost Developing Tactics
In terms of the distribution of the system resource of program, the processing unit 602 is specifically used for:The operating system is controlled to wait to adjust according to
The adjustment grade being adjusted to required for whole system resource determines the adjustment amount of the system resource to be adjusted;And for controlling
Make the distribution that the operating system adjusts the system resource to be adjusted of the destination application according to the adjustment amount.
In a possible example, the performance boost strategy includes optimization duration, and the processing unit 602 controls institute
After operating system is stated according to the distribution of the system resource of destination application described in the performance boost Developing Tactics, also use
In:The operating system is controlled when detecting that the adjustment duration according to the performance boost strategy is more than or equal to the optimization
When long, cancel the distribution according to the system resource of destination application described in the performance boost Developing Tactics.
In a possible example, the processing unit 602 controls the operating system according to the performance boost plan
After the distribution for slightly adjusting the system resource of the destination application, it is additionally operable to:The service routine is controlled to pass through described logical
Letter unit 603 receives the instruction message from the destination application, and the instruction message is used to indicate the operating system
Cancel the distribution according to the system resource of destination application described in the performance boost Developing Tactics;It is and described for controlling
The system money of operating system destination application according to the instruction message cancellation according to the performance boost Developing Tactics
The distribution in source.
In a possible example, the processing unit 602 controls the service routine to pass through the communication unit 603
Before receiving the contextual data bag from the destination application being currently running, it is additionally operable to:The service routine is controlled to pass through institute
State communication unit 603 and receive the connection request from the destination application, the connection request includes the intended application
The application identities of program;And for controlling the service routine to be identified by inquiry of the application identities, inquiry is for described
The authority list of multiple application programs;And for controlling when the authority list includes the application identities of the destination application
When, the service routine is that the destination application distributes data transmission interface, and the data transmission interface is used for the mesh
Data are transmitted between mark application program and the service routine, the data comprise at least the contextual data bag.
In a possible example, the adjustment grade being adjusted to required for the system resource to be adjusted comprises at least
The adjustment grade of following system resource:CPU, GPU, the internal memory of the mobile terminal.
Wherein, processing unit 602 can be processor or controller, and communication unit 603 can be processor and program fortune
Internal communications interface between row space, such as processor and the communication interface in operating system space, or processor and user's sky
Between communication interface etc., memory cell 601 can be memory.
A kind of structural representation of smart mobile phone 700, above-mentioned intelligence are provided referring to Fig. 7, Fig. 7 is the embodiment of the present application
Mobile phone 700 includes:Housing 710, touching display screen 720, mainboard 730, battery 740 and subplate 750, before being provided with mainboard 730
Camera 731, processor 732, memory 733, power management chip 734 etc. are put, oscillator 751, integral sound are provided with subplate
Chamber 752, VOOC, which dodge, fills interface 753 and fingerprint recognition module 754.
Wherein, the smart mobile phone includes destination application and operating system, and destination application runs on user's space,
Operating system includes preset service routine in operating system space, the operating system.Service routine is received from long-range
The performance boost strategy bag of server;Service routine receives the contextual data bag from the destination application being currently running, institute
Stating contextual data bag includes the scene relating information of the destination application;Service routine is inquired about according to the contextual data bag
The performance boost strategy bag determines the performance boost strategy of the destination application;Operating system is according to the performance boost
The distribution of the system resource of destination application described in Developing Tactics.
Above-mentioned processor 732 is the control centre of smart mobile phone, utilizes various interfaces and the whole smart mobile phone of connection
Various pieces, by running or performing the software program and/or module that are stored in memory 733, and call and be stored in
Data in memory 733, the various functions and processing data of smart mobile phone are performed, so as to carry out overall prison to smart mobile phone
Control.Optionally, processor 732 may include one or more processing units;Preferably, processor 732 can integrate application processor
And modem processor, wherein, application processor mainly handles operating system, user interface and application program etc., modulatedemodulate
Processor is adjusted mainly to handle radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor
In 732.The processor 732 for example can be central processing unit (Central Processing Unit, CPU), general procedure
Device, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application-
Specific Integrated Circuit, ASIC), field programmable gate array (Field Programmable Gate
Array, FPGA) either other PLDs, transistor logic, hardware component or its any combination.It can
To realize or perform the various exemplary logic blocks with reference to described by present disclosure, module and circuit.Above-mentioned place
It can also be the combination for realizing computing function to manage device, such as is combined comprising one or more microprocessors, DSP and microprocessor
Combination etc..
Above-mentioned memory 733 can be used for storage software program and module, and processor 732 is stored in memory by operation
733 software program and module, so as to perform the various function application of smart mobile phone and data processing.Memory 733 can
Mainly include storing program area and storage data field, wherein, storing program area can storage program area, needed at least one function
Application program etc.;Storage data field can store uses created data etc. according to smart mobile phone.In addition, memory 733
High-speed random access memory can be included, can also include nonvolatile memory, a for example, at least disk memory,
Flush memory device or other volatile solid-state parts.The memory 733 for example can be random access memory (Random
Access Memory, RAM), flash memory, read-only storage (Read Only Memory, ROM), the read-only storage of erasable programmable
Device (Erasable Programmable ROM, EPROM), EEPROM (Electrically
EPROM, EEPROM), register, hard disk, mobile hard disk, read-only optical disc (CD-ROM) or any other shape well known in the art
The storage medium of formula.
The embodiment of the present application also provides a kind of computer-readable storage medium, wherein, the computer-readable storage medium is stored for electricity
The computer program that subdata exchanges, the computer program cause computer to perform any as described in above-mentioned embodiment of the method
The part or all of step of method, above computer include mobile terminal.
The embodiment of the present application also provides a kind of computer program product, and above computer program product includes storing calculating
The non-transient computer-readable recording medium of machine program, above computer program are operable to make computer perform side as described above
The part or all of step of either method described in method embodiment.The computer program product can be a software installation
Bag, above computer include 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 the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion being described in detail in some embodiment
Point, it may refer 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, such as the division of said units, it is only one kind
Division of logic function, can there is an other dividing mode when actually realizing, such as multiple units or component can combine or can
To be integrated into another system, or some features can be ignored, or not perform.Another, shown or discussed is mutual
Coupling direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING or communication connection of device or unit,
Can be electrical or other forms.
The above-mentioned unit illustrated as separating component can be or may not be physically separate, show as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
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.Above-mentioned integrated list
Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If above-mentioned integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or use
When, it can be stored in a computer-readable access to memory.Based on such understanding, the technical scheme of the application substantially or
Person say the part to be contributed to prior art or the technical scheme all or part can in the form of software product body
Reveal and, 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.) performs all or part of each embodiment above method of the application
Step.And foregoing memory includes:USB flash disk, read-only storage (ROM, Read-Only Memory), random access memory
(RAM, Random Access Memory), mobile hard disk, magnetic disc or CD etc. are various can be with the medium of store program codes.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can
To instruct the hardware of correlation to complete by program, the program can be stored in a computer-readable memory, memory
It can include:Flash disk, read-only storage (English:Read-Only Memory, referred to as:ROM), random access device (English:
Random Access Memory, referred to as:RAM), disk or CD etc..
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 above-mentioned, this specification content should not be construed as the limitation to the application.
Claims (11)
1. a kind of resource allocation method, it is characterised in that being run applied to mobile terminal, on the mobile terminal has operating system
And one or more application programs, the operating system include preset service routine, methods described includes:
The service routine receives the performance boost strategy bag from remote server, and the performance boost strategy bag includes target
The Run-time scenario of application program performance boost strategy corresponding with the Run-time scenario and optimization duration, the performance boost strategy
Including the adjustment grade being adjusted to required for system resource to be adjusted and the system resource to be adjusted;
The service routine receives the contextual data bag from the destination application being currently running, and the contextual data bag includes
The scene relating information of the destination application;
The service routine inquires about the performance boost strategy bag according to the contextual data bag and determines the destination application
Performance boost strategy;
The system that the operating system adjusts the destination application according to the performance boost strategy and the optimization duration
The distribution of resource.
2. according to the method for claim 1, it is characterised in that the contextual data bag identifies including application type, described
Scene relating information includes scene identity, and the service routine inquires about the performance boost strategy bag according to the contextual data bag
The performance boost strategy of the destination application is determined, including:
The service routine is identified as inquiry mark with the application type, determines to answer with described in the performance boost strategy bag
Multiple performance boost strategies corresponding to type identification;
The service routine obtains the scene relating information in the contextual data bag;
The service routine according to the scene relating information determine in the multiple performance boost strategy with the scene identity
The performance boost strategy of the corresponding destination application.
3. according to the method for claim 1, it is characterised in that the contextual data bag identifies including application type, described
Scene relating information includes key message parameter, and the key message parameter comprises at least one or more in following information:
Start information, resource updates information, account logon information, interface type information;The service routine is according to the contextual data
Bag inquires about the performance boost strategy that the performance boost strategy bag determines the destination application, including:
The service routine is identified as inquiry mark with the application type, determines to answer with described in the performance boost strategy bag
Multiple performance boost strategies corresponding to type identification;
The service routine obtains the scene relating information in the contextual data bag;
The key message parameter of the service routine in the scene relating information determines the destination application
Run-time scenario;
The service routine determines corresponding with the Run-time scenario in the multiple performance boost strategy according to the Run-time scenario
The destination application performance boost strategy.
4. according to the method described in claim any one of 1-3, it is characterised in that the operating system is according to the performance boost
Tactful and described optimization duration adjusts the distribution of the system resource of the destination application, including:
The adjustment grade that the operating system is adjusted to according to required for the system resource to be adjusted determines described to be adjusted
System resource adjustment amount;
The operating system adjusts the described to be adjusted of the destination application according to the adjustment amount and the optimization duration
System resource distribution.
5. according to the method described in claim any one of 1-4, it is characterised in that the operating system is according to the performance boost
Tactful and described optimization duration adjusts the distribution of the system resource of the destination application, including:
The operating system ought detect is more than or equal to the optimization duration according to the adjustment duration of the performance boost strategy
When, cancel the distribution according to the system resource of destination application described in the performance boost Developing Tactics.
6. according to the method described in claim any one of 1-4, it is characterised in that methods described also includes:
The service routine receives the instruction message from the destination application, and the instruction message is used to indicate the behaviour
Make distribution of the system cancellation according to the system resource of destination application described in the performance boost Developing Tactics;
The operating system is cancelled according to the performance boost strategy and the optimization duration adjustment institute according to the instruction message
State the distribution of the system resource of destination application.
7. according to the method described in claim any one of 1-6, it is characterised in that the service routine is received to come from and is currently running
Destination application contextual data bag before, methods described also includes:
The service routine receives the connection request from the destination application, and the connection request should including the target
With the application identities of program;
The service routine identifies by inquiry of the application identities, authority list of the inquiry for the multiple application program;
When the authority list includes the application identities of the destination application, the service routine is the intended application journey
Sequence distributes data transmission interface, and the data transmission interface is used to transmit between the destination application and the service routine
Data, the data comprise at least the contextual data bag.
8. according to the method described in claim any one of 1-7, it is characterised in that adjusted required for the system resource to be adjusted
The whole adjustment grade arrived comprises at least the adjustment grade of following system resource:CPU, GPU, the internal memory of the mobile terminal.
9. a kind of device for allocating resources, it is characterised in that being run applied to mobile terminal, on the mobile terminal has operating system
And one or more application programs, the operating system include preset service routine, the device for allocating resources includes processing
Unit and communication unit,
The processing unit, for controlling the service routine to receive the performance from remote server by the communication unit
Promotion Strategy bag, the performance boost strategy bag include the Run-time scenario property corresponding with the Run-time scenario of destination application
Energy Promotion Strategy and optimization duration, the performance boost strategy include system resource to be adjusted and the system money to be adjusted
The adjustment grade being adjusted to required for source;And for controlling the service routine to be received by the communication unit from
The contextual data bag of the destination application of operation, the scene relating that the contextual data bag includes the destination application are believed
Breath;And determine the mesh for controlling the service routine to inquire about the performance boost strategy bag according to the contextual data bag
Mark the performance boost strategy of application program;And for controlling the operating system according to the performance boost strategy and described excellent
Change the distribution that duration adjusts the system resource of the destination application.
A kind of 10. 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-8 method.
11. a kind of computer-readable recording medium, it is characterised in that the computer-readable recording medium storage is used for electron number
According to the computer program of exchange, wherein, the computer program causes computer to perform as described in claim any one of 1-8
Method, the computer include mobile terminal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710771156.3A CN107547744A (en) | 2017-08-31 | 2017-08-31 | Resource allocation method and Related product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710771156.3A CN107547744A (en) | 2017-08-31 | 2017-08-31 | Resource allocation method and Related product |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107547744A true CN107547744A (en) | 2018-01-05 |
Family
ID=60957989
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710771156.3A Pending CN107547744A (en) | 2017-08-31 | 2017-08-31 | Resource allocation method and Related product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107547744A (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108491275A (en) * | 2018-03-13 | 2018-09-04 | 广东欧珀移动通信有限公司 | program optimization method, device, terminal and storage medium |
CN108600529A (en) * | 2018-04-09 | 2018-09-28 | 北京小米移动软件有限公司 | Information interacting method, device and computer readable storage medium |
CN109391734A (en) * | 2018-09-26 | 2019-02-26 | Oppo广东移动通信有限公司 | Data transmission method for uplink, device, terminal and storage medium |
CN109413186A (en) * | 2018-10-31 | 2019-03-01 | Oppo广东移动通信有限公司 | Application program update method, terminal, server and system |
CN109491715A (en) * | 2018-11-06 | 2019-03-19 | 深圳市风云实业有限公司 | Application management method, device and terminal based on Windows NT |
CN109522131A (en) * | 2018-11-26 | 2019-03-26 | Oppo广东移动通信有限公司 | Resource allocation method, device and equipment |
CN109558165A (en) * | 2018-11-29 | 2019-04-02 | 广州市百果园信息技术有限公司 | A kind of method for optimizing configuration, device, equipment and storage medium |
CN110071952A (en) * | 2018-01-24 | 2019-07-30 | 北京京东尚科信息技术有限公司 | The control method and device of service call amount |
CN111414265A (en) * | 2020-03-23 | 2020-07-14 | 海信电子科技(深圳)有限公司 | Service framework and method for calling system resources |
CN111444511A (en) * | 2018-12-29 | 2020-07-24 | 北京奇虎科技有限公司 | Safety protection method and system for vehicle-mounted system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103430151A (en) * | 2012-07-06 | 2013-12-04 | 华为终端有限公司 | Method and apparatus for configuring resource |
CN106020990A (en) * | 2016-06-30 | 2016-10-12 | 宇龙计算机通信科技(深圳)有限公司 | Control method for central processing unit and terminal equipment |
CN106095592A (en) * | 2016-05-31 | 2016-11-09 | 广东欧珀移动通信有限公司 | A kind of prospect application scenarios synchronous method and device, system |
-
2017
- 2017-08-31 CN CN201710771156.3A patent/CN107547744A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103430151A (en) * | 2012-07-06 | 2013-12-04 | 华为终端有限公司 | Method and apparatus for configuring resource |
CN106095592A (en) * | 2016-05-31 | 2016-11-09 | 广东欧珀移动通信有限公司 | A kind of prospect application scenarios synchronous method and device, system |
CN106020990A (en) * | 2016-06-30 | 2016-10-12 | 宇龙计算机通信科技(深圳)有限公司 | Control method for central processing unit and terminal equipment |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110071952A (en) * | 2018-01-24 | 2019-07-30 | 北京京东尚科信息技术有限公司 | The control method and device of service call amount |
CN110071952B (en) * | 2018-01-24 | 2023-08-08 | 北京京东尚科信息技术有限公司 | Service call quantity control method and device |
CN108762937B (en) * | 2018-03-13 | 2021-03-26 | Oppo广东移动通信有限公司 | Configuration information sending method, configuration information obtaining method, configuration information sending device, configuration information obtaining device and terminal |
CN108491275A (en) * | 2018-03-13 | 2018-09-04 | 广东欧珀移动通信有限公司 | program optimization method, device, terminal and storage medium |
CN108762937A (en) * | 2018-03-13 | 2018-11-06 | Oppo广东移动通信有限公司 | Configuration information transmitting method, acquisition methods, device and terminal |
CN108874539A (en) * | 2018-03-13 | 2018-11-23 | Oppo广东移动通信有限公司 | Resource allocation method, device, terminal and storage medium |
CN108536524A (en) * | 2018-03-13 | 2018-09-14 | Oppo广东移动通信有限公司 | Resource regeneration method, device, terminal and storage medium |
US11513820B2 (en) | 2018-03-13 | 2022-11-29 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Method for resource allocation, terminal, and computer-readable storage medium |
CN108536461B (en) * | 2018-03-13 | 2021-08-10 | Oppo广东移动通信有限公司 | Resource updating method, device, terminal and storage medium |
CN108874539B (en) * | 2018-03-13 | 2020-08-25 | Oppo广东移动通信有限公司 | Resource allocation method, device, terminal and storage medium |
CN108536461A (en) * | 2018-03-13 | 2018-09-14 | Oppo广东移动通信有限公司 | Resource regeneration method, device, terminal and storage medium |
CN108600529A (en) * | 2018-04-09 | 2018-09-28 | 北京小米移动软件有限公司 | Information interacting method, device and computer readable storage medium |
CN109391734A (en) * | 2018-09-26 | 2019-02-26 | Oppo广东移动通信有限公司 | Data transmission method for uplink, device, terminal and storage medium |
CN109413186A (en) * | 2018-10-31 | 2019-03-01 | Oppo广东移动通信有限公司 | Application program update method, terminal, server and system |
CN109491715A (en) * | 2018-11-06 | 2019-03-19 | 深圳市风云实业有限公司 | Application management method, device and terminal based on Windows NT |
CN109522131A (en) * | 2018-11-26 | 2019-03-26 | Oppo广东移动通信有限公司 | Resource allocation method, device and equipment |
CN109558165A (en) * | 2018-11-29 | 2019-04-02 | 广州市百果园信息技术有限公司 | A kind of method for optimizing configuration, device, equipment and storage medium |
CN109558165B (en) * | 2018-11-29 | 2022-07-08 | 广州市百果园信息技术有限公司 | Configuration optimization method, device, equipment and storage medium |
CN111444511A (en) * | 2018-12-29 | 2020-07-24 | 北京奇虎科技有限公司 | Safety protection method and system for vehicle-mounted system |
CN111414265A (en) * | 2020-03-23 | 2020-07-14 | 海信电子科技(深圳)有限公司 | Service framework and method for calling system resources |
CN111414265B (en) * | 2020-03-23 | 2024-03-19 | 海信电子科技(深圳)有限公司 | Service framework and method for calling system resources |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107547744A (en) | Resource allocation method and Related product | |
CN107528976A (en) | Resource allocation method and Related product | |
CN107577537A (en) | Resource allocation method and Related product | |
CN107426432B (en) | Resource allocation method and Related product | |
CN107483725A (en) | Resource allocation method and Related product | |
CN107515787A (en) | Resource allocation method and Related product | |
CN107613107A (en) | Resource allocation method and related product | |
CN107861816B (en) | Resource allocation method and device | |
CN107589998A (en) | Resource allocation method and Related product | |
CN107577533B (en) | Resource allocation method and related product | |
CN107547746B (en) | Resource allocation method and related product | |
CN107479970B (en) | Resource allocation method and related product | |
CN107450988B (en) | Resource allocation method and related product | |
CN107894920A (en) | Resource allocation method and Related product | |
CN107861814A (en) | Resource allocation method and equipment | |
CN107621981A (en) | Resource allocation method and Related product | |
CN107807852A (en) | Application program capacity control method and equipment | |
CN107589977A (en) | Resource allocation method and related product | |
CN107547745A (en) | Resource allocation method and Related product | |
CN107861603A (en) | Power consumption control method and equipment | |
CN107797868A (en) | resource adjusting method and device | |
CN107832141A (en) | Application program progress control method and equipment | |
CN107517306B (en) | Resource allocation method and related product | |
CN107832148A (en) | Performance optimization method and equipment | |
CN107832142A (en) | The resource allocation method and equipment of application program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180105 |