CN107528977A - Resource allocation method and Related product - Google Patents
Resource allocation method and Related product Download PDFInfo
- Publication number
- CN107528977A CN107528977A CN201710775951.XA CN201710775951A CN107528977A CN 107528977 A CN107528977 A CN 107528977A CN 201710775951 A CN201710775951 A CN 201710775951A CN 107528977 A CN107528977 A CN 107528977A
- Authority
- CN
- China
- Prior art keywords
- application program
- news category
- operating system
- performance boost
- run
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Environmental & Geological Engineering (AREA)
- Stored Programmes (AREA)
- Information Transfer Between Computers (AREA)
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 receives the contextual data bag from the news category application program being currently running, and the contextual data bag includes the performance boost strategy that the news category application program generates according to Run-time scenario;Operating system parses the contextual data bag and obtains the performance boost strategy;Operating system according to the system resource of news category application program described in the performance boost Developing Tactics distribution.The embodiment of the present application is advantageous to be lifted the processing speed of operating system in mobile terminal, and improves the real-time that mobile terminal control news category 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 lift operating system in mobile terminal
Processing speed, and improve the real-time that mobile terminal control news category application program carries out 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, methods described to include:
The operating system receives the contextual data bag from the news category application program being currently running, the contextual data
Include the performance boost strategy that the news category application program generates according to Run-time scenario;
The operating system parses the contextual data bag and obtains the performance boost strategy;
The operating system is divided according to the system resource of news category application program described in the performance boost Developing Tactics
Match somebody with somebody.
Second aspect, the embodiment of the present application provide a kind of resource allocation method, applied to mobile terminal, the mobile terminal
Upper operation has operating system and one or more application programs, methods described to include:
News category application program determines Run-time scenario;
The news category application program obtains the performance boost strategy of the Run-time scenario;
The news category application program sends contextual data bag to the operating system, and the contextual data bag includes described
Performance boost strategy, the contextual data bag are used for the operating system according to news category described in the performance boost Developing Tactics
The distribution of the system resource of application program.
The third 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 device for allocating resources includes processing unit and communication unit
Member,
The processing unit, for controlling the operating system new from what is be currently running by communication unit reception
The contextual data bag of class application program is heard, the contextual data bag generates including the news category application program according to Run-time scenario
Performance boost strategy;And obtain the performance boost plan for controlling the operating system to parse the contextual data bag
Slightly;And for controlling the operating system to be provided according to the system of news category application program described in the performance boost Developing Tactics
The distribution in source.
Fourth 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 device for allocating resources includes processing unit and communication unit
Member,
The processing unit, for controlling news category application program to determine Run-time scenario;And for controlling the news
Class application program obtains the performance boost strategy of the Run-time scenario;And for controlling the news category application program to pass through institute
State communication unit and send contextual data bag to the operating system, the contextual data bag includes the performance boost strategy, institute
State contextual data bag and be used for system of the operating system according to news category application program described in the performance boost Developing Tactics
The distribution of resource.
5th 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 to perform in any one of the embodiment of the present application first aspect and/or second aspect
The instruction of step.
6th 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 any one of the embodiment of the present application first aspect and/or second aspect, above-mentioned calculating
Machine includes mobile terminal.
7th 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 any one of the embodiment of the present application first aspect and/or second aspect.
The computer program product can be a software installation bag, and above computer includes mobile terminal.
As can be seen that in the embodiment of the present application, after the news category application program of mobile terminal determines Run-time scenario, obtain
The performance boost strategy of the Run-time scenario, the contextual data bag for including the performance boost strategy, behaviour are then sent to operating system
After making contextual data bag of the system reception from news category application program, parse the contextual data bag and obtain performance boost strategy,
And according to the distribution of the system resource of news category application program described in the performance boost Developing Tactics.Because contextual data bag includes
The performance boost strategy of the Run-time scenario of news category application program, and contextual data bag is by the news category application program that is currently running
Send, operating system can directly obtain the performance boost strategy of the current Run-time scenario of news category application program, be advantageous to be lifted
The processing speed of operating system in mobile terminal, operating system adjust news category application program in real time according to the performance boost strategy
System resource configuration, realize that to carry out real-time performance in the process of running to news category application program by operating system excellent
Change, be advantageous to improve the real-time that mobile terminal control news category 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, news category application program 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 news category application program,
It can only go to be adapted to using standard set parameter, the internal operation scene that can not be directed to news category application program is carried out targetedly
Performance optimizes, in addition, in some versions, operating system detects when being currently running news category application program, can select to adjust
The resources such as CPU, GPU, memory bandwidth in system resource are to highest state so that and Consumer's Experience gets a promotion, but due to
CPU, GPU, memory bandwidth etc. run on higher or highest state always, can cause higher power consumption and electric quantity consumption.
For the above situation, the embodiment of the present application proposes that a kind of resource of news category application program for mobile terminal is matched somebody with somebody
Put method, in this method, the operating system receives the contextual data bag from the news category application program being currently running, described
Contextual data bag includes the performance boost strategy that the news category application program generates according to Run-time scenario;The operating system solution
Analyse the contextual data bag and obtain the performance boost strategy;The operating system is according to described in the performance boost Developing Tactics
The distribution of the system resource of news category application program.Realize by operating system for news category application program in the process of running
Performance optimizes, and is advantageous to improve the real-time that mobile terminal control news category application program carries out 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, as illustrated, this resource is matched somebody with somebody
The method of putting includes:
S201, the operating system receive the contextual data bag from the news category application program being currently running, the field
Scape packet includes the performance boost strategy that the news category application program generates according to Run-time scenario.
Wherein, news category application program refers to the third party application of the user's space installed in mobile terminal, and this
Tripartite's application program can also can be pre-installed by user installation by developer before mobile terminal dispatches from the factory, and not done herein unique
Limit.
Wherein, the Run-time scenario comprise at least it is following any one:Scene, details reading scene, news are slided in list
Comment on scene, video playback scene.
Wherein, the Run-time scenario is the scene that the news category application program is currently run.The Run-time scenario can be with
Divided according to different preparatory conditions, such as list can be divided into according to the demand to cpu resource and slides scene, details are read
Look at scene, news analysis scene etc., video playback scene can be divided into according to the demand to GPU resource, checks picture scene
Deng marking off different Run-time scenarios according to the different demands to each system resource, be advantageous to quick according to Run-time scenario
Performance boost strategy is determined, in addition, the preparatory condition can also associate the different applications of news category application, different applications
Identical or different Run-time scenario can be marked off according to preparatory condition, does not do unique restriction herein.
Wherein, the performance boost strategy is that the news category applies the strategy determined according to current Run-time scenario, institute
The performance boost strategy for stating Run-time scenario is used for the runnability for lifting current Run-time scenario, and the performance boost strategy can wrap
System resource to be adjusted, the adjustment amount of system resource to be adjusted are included, or system resource to be adjusted can also be included
Adjust duration.In addition, the form of contextual data bag for example can be java script object tag (JavaScript Object
Notation, JSON), agreement buffering area (ProtocolBuffer, Protobuf), the data transmission format such as user-defined format,
Unique restriction is not done herein.
In a possible example, the operating system receives the scene from the news category application program being currently running
Before packet, methods described also includes:
The operating system receives the connection request from the news category application program, and the connection request includes described
The application identities of news category application program;
The operating system 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 news category application program, the operating system is the news
Class application assigned data transmission interface, the data transmission interface are used for the news category application program and the operation system
Data are transmitted between system, the data comprise at least the contextual data bag.
Wherein, the authority list is default authority list in operating system, and the authority list is pre-stored in behaviour by manufacturer
Make in system, can be by updating operating system come renewal authority table, the authority list includes allowing to realize with operating system
The application identities of multiple application programs of interprocess communication.
Wherein, the operating system is given after news category application assigned data transmission interface, the operation
Communication mode between system and the news category application program can be Socket port communications transmission, pipeline pipe communicate,
The modes such as shared storage SharedMemory, shared file, do not do unique restriction herein.
Wherein, it is news category application program when the data transmission interface is that the news category application program is currently running
Effective data transmission link is provided between operating system, after news category application program is not reruned, the data transmission link
It can be eliminated, the data transmission interface can be disabled.
It can be seen that in this example, operating system first determines when receiving the connection request from the news category application program
The authority of the news category application program, the news category application assigned data transmission interface for meeting jurisdictions mandate is then given,
Rather than blindness gives any application data coffret, be advantageous to avoid the disorder of data transfer, and ensure number
According to the security of transmission.
S202, the operating system parse the contextual data bag and obtain the performance boost strategy.
Wherein, performance boost strategy refers to the Run-time scenario for improving the above-mentioned news category application program being currently running
The resource allocation strategy of runnability, such as cpu resource adjustable strategies, GPU resource adjustable strategies, memory bandwidth resource adjustment plan
Summary, 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 contextual data bag includes data format mark, and the operating system is according to the Data Identification institute
The data format of instruction parses the contextual data bag and obtains the performance boost strategy.
S203, the operating system according to news category application program described in the performance boost Developing Tactics system resource
Distribution.
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 receives from the news being currently running first
The contextual data bag of class application program, the contextual data bag include the property of the Run-time scenario of news category application program generation
Energy Promotion Strategy, secondly, the operating system parse the contextual data bag and obtain the performance boost strategy, finally, described
Operating system according to the system resource of news category application program described in the performance boost Developing Tactics distribution.Due to scene number
According to the performance boost strategy for the Run-time scenario for including news category application program, and contextual data bag is by the news category that is currently running
Application program is sent, and operating system can directly obtain the performance boost strategy of the current Run-time scenario of news category application program, have
Beneficial to the processing speed of operating system in lifting mobile terminal, operating system adjusts news category in real time according to the performance boost strategy
The configuration of the system resource of application program, realize and news category application program is carried out in the process of running by operating system in real time
Performance optimization, be advantageous to improve the real-time that mobile terminal control news category application program carries out performance optimization.
In a possible example, the Run-time scenario is that scene is slided in list, and the performance boost strategy includes treating
The adjustment amount of the system resource of adjustment and system resource to be adjusted, the system resource to be adjusted are that cpu resource and GPU are provided
Source, the adjustment amount associate the list sliding speed.
Wherein, the adjustment amount includes the adjustment amount of the cpu resource and the adjustment amount of the GPU resource, the adjustment
Amount associates the list sliding speed, and when the sliding speed is fast, the adjustment amount of acquisition is larger, when the sliding speed
When slow, the adjustment amount of acquisition is smaller, determines that adjustment amount can accelerate interface loading velocity according to list sliding speed, favorably
In the performance of lifting news category application program.
In a possible example, the contextual data bag includes application identities and scene identity, the performance boost
Strategy includes the adjustment grade of system resource and the system resource to be adjusted to be adjusted, and the operating system is according to
The distribution of the system resource of news category application program described in performance boost Developing Tactics, including:
The operating system obtains the amount to be allocated of the system resource to be adjusted;
The operating system determines that the system to be adjusted provides according to the adjustment grade of the system resource to be adjusted
The Target Assignment amount in source;
When the amount to be allocated is less than or equal to the Target Assignment amount, the operating system is according to the scene identity
The Target Assignment amount is adjusted with the amount to be allocated;
The system that the operating system adjusts the news category application program according to the Target Assignment amount after the adjustment provides
The distribution in source.
Wherein, the amount to be allocated be the also unappropriated system resource of the operating system stock number, i.e., described system
The stock number that resource can distribute at present.
Wherein, division and operation system of the news category application program to the adjustment grade of the system resource to be adjusted
The division united to the adjustment grade of the system resource to be adjusted is identical, and the division of the adjustment grade can be by operating system
Division is sent to news category application program, can also be divided by application program and share to operating system, not limited herein, described
The division of adjustment grade can according to system resource total amount it is impartial be divided into multiple grades, or it is unequal be divided into it is more
Individual grade etc., is not limited herein, for example, cpu resource can be divided into grade 1, grade 2 ..., grade 7, grade 8, each
Grade represents the Target Assignment amount of a cpu resource.
Wherein, when the amount to be allocated is more than the Target Assignment amount, the operating system is according to the performance boost
The distribution of system resource described in Developing Tactics, when the amount to be allocated is less than or equal to the Target Assignment amount, the operation
System can redefine the Target Assignment amount according to the scene identity and the amount to be allocated, and specific implementation can be with
It is:The important level of the Run-time scenario is determined according to the scene identity, according to the important level and described to be allocated
Amount determines the Target Assignment amount.The important level of the Run-time scenario is by operating system according to default Run-time scenario and important
The mapping relations of grade determine, for example, important level can be divided into it is advanced, intermediate and rudimentary, when important level for it is advanced when, institute
State Target Assignment amount and be not higher than sendout A, when important level is intermediate, the Target Assignment amount is not higher than sendout B, when weight
Want grade for it is rudimentary when, the Target Assignment amount is more than the B not higher than sendout C, the A, and the B is more than the C.
It can be seen that in this example, operating system described is treated point when the amount to be allocated that detect system resource to be allocated is less than
During the Target Assignment amount for the system resource matched somebody with somebody, irrational Target Assignment amount in the performance boost strategy is abandoned, according to scene
The size of mark and amount to be allocated redefines Target Assignment amount, avoids because news category application program does not know operating system
In amount to be allocated number caused by the irrational situation of performance boost strategy, be advantageous to lifted resource distribution reasonability and
Accuracy.
In a possible example, the resource allocation request includes application identities, and the performance boost strategy includes
System resource to be adjusted and the adjustment grade of the system resource to be adjusted, the operating system is according to the resource allocation
Request adjusts the distribution of the system resource of the news category application program, including:
The operating system determines that the system to be adjusted provides according to the adjustment grade of the system resource to be adjusted
The Target Assignment amount in source;
The operating system obtains the distribution stock number of the system resource to be adjusted of news category application program, institute
State application program of the news category application program indicated by the application identities;
The operating system determines the system to be adjusted according to the Target Assignment amount and the stock number of having distributed
The adjustment amount of resource;
The operating system adjusts the distribution of the system resource of the news category application program according to the adjustment amount.
It can be seen that in this example, operating system directly obtains system resource to be adjusted according to performance boost strategy and waits to adjust
The adjustment amount of whole system resource, the contextual data parlor without being provided according to news category application program connect determination, favorably
In reducing system power consumption, lifting operating system adjusts the speed of system resource allocation.
In a possible example, the performance boost strategy includes preset duration, and the operating system is according to described
After the distribution of the system resource of news category application program described in performance boost Developing Tactics, methods described also includes:
The operating system is default more than or equal to described according to the adjustment duration of the performance boost strategy when detecting
During duration, cancel the distribution according to the system resource of news category application program described in the performance boost Developing Tactics.
Wherein, the preset duration is the adjustment duration of the system resource to be adjusted.
Wherein, the preset duration relating operation scene, when different Run-time scenarios presets different system resource adjustment
It is long.
Wherein, point cancelled according to the system resource of news category application program described in the performance boost Developing Tactics
With to cancel the authority to the data transmission interface, recover according to the news category before the performance boost Developing Tactics
The distribution of the system resource of application program.
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 preset duration
The dynamic distribution cancelled according to the system resource of news category application program described in the performance boost Developing Tactics, rather than allow news
Class application program takes more system resource always, advantageously reduces the power consumption and electric quantity consumption of mobile terminal.
In a possible example, the operating system is according to news category application described in the performance boost Developing Tactics
After the distribution of the system resource of program, methods described also includes:
The operating system receives the instruction message from the news category application program by the data transmission interface;
Operating system news category according to the instruction message cancellation according to the performance boost Developing Tactics should
With the distribution of the system resource of program.
At the end of wherein, the instruction message detects the Run-time scenario for the news category application program (such as clap
When video playback is completed, or news analysis Flushing success etc.), or detect and answered for the Run-time scenario or the news category
With program when exiting operation, the instruction message of the operating system is sent to, the instruction message is used for the operating system
Cancel the distribution according to the system resource of news category application program described in the performance boost Developing Tactics.
It can be seen that in this example, the instruction message that operating system is sent according to news category application program is cancelled according to the property
Energy Promotion Strategy adjusts the distribution of the system resource of the news category application program, is advantageous to the accuracy that the time is cancelled in lifting,
Rather than allow news category application program to take more system resource always, advantageously reduce the power consumption and electricity of mobile terminal
Amount 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.As illustrated, this resource allocation method includes:
S301, the operating system receive the connection request from news category application program, and the connection request includes institute
State the application identities of news category application program.
S302, the operating system identify by inquiry of the application identities, and inquiry is for the multiple application program
Authority list.
S303, when the authority list includes the application identities of the news category application program, the operating system is institute
State news category application assigned data transmission interface.
S304, the operating system are received from the news category application program being currently running by the data transmission interface
Contextual data bag.
S305, the operating system parse the contextual data bag and obtain the performance boost strategy.
S306, the operating system according to news category application program described in the performance boost Developing Tactics system resource
Distribution.
S307, the operating system receive the instruction from the news category application program by the data transmission interface
Message.
S308, operating system news according to the instruction message cancellation according to the performance boost Developing Tactics
The distribution of the system resource of class application program.
As can be seen that in the embodiment of the present application, the operating system of mobile terminal receives from the news being currently running first
The contextual data bag of class application program, the contextual data bag include the property of the Run-time scenario of news category application program generation
Energy Promotion Strategy, secondly, the operating system parse the contextual data bag and obtain the performance boost strategy, finally, described
Operating system according to the system resource of news category application program described in the performance boost Developing Tactics distribution.Due to scene number
According to the performance boost strategy for the Run-time scenario for including news category application program, and contextual data bag is by the news category that is currently running
Application program is sent, and operating system can directly obtain the performance boost strategy of the current Run-time scenario of news category application program, have
Beneficial to the processing speed of operating system in lifting mobile terminal, operating system adjusts news category in real time according to the performance boost strategy
The configuration of the system resource of application program, realize and news category application program is carried out in the process of running by operating system in real time
Performance optimization, be advantageous to improve the real-time that mobile terminal control news category application program carries out performance optimization.
In addition, operating system first determines the news when receiving the connection request from the news category application program
The authority of class application program, the news category application assigned data transmission interface for meeting jurisdictions mandate is then given, rather than it is blind
Purpose gives any application data coffret, is advantageous to avoid the disorder of data transfer, and ensure data transfer
Security.
In addition, the instruction message that operating system is sent according to news category application program is cancelled according to the performance boost strategy
The distribution of the system resource of the news category application program is adjusted, is advantageous to lifting and cancels the accuracy of time, rather than is allowed new
Hear class application program and take more system resource always, advantageously reduce the power consumption and electric quantity consumption of mobile terminal.
Referring to Fig. 4, Fig. 4 is a kind of schematic flow sheet for resource allocation method that the embodiment of the present application provides, it is applied to
Mobile terminal, on the mobile terminal operation have operating system and one or more application programs.As illustrated, this resource distribution
Method includes:
S401, news category application program determine Run-time scenario.
Wherein, the news category application program determines that the specific implementation of Run-time scenario can be:When detecting user
Operation requests when, the multiple Run-time scenarios stored are inquired about in the news category application program according to the operation requests, it is determined that
Run-time scenario corresponding to the operation requests.
Wherein, the Run-time scenario comprise at least it is following any one:Scene, details reading scene, news are slided in list
Comment on scene, video playback scene.
For example, when the Run-time scenario is video scene, the operation requests can be detected described in click
The broadcast button of some small video in news category application program.
Wherein, news category application program refers to the third party application of the user's space installed in mobile terminal, and this
Tripartite's application program can also can be pre-installed by user installation by developer before mobile terminal dispatches from the factory, and not done herein unique
Limit.
Wherein, the Run-time scenario is the scene that the news category application program is currently run.The Run-time scenario can be with
Divided according to different preparatory conditions, such as list can be divided into according to the demand to cpu resource and slides scene, details are read
Look at scene, news analysis scene etc., video playback scene can be divided into according to the demand to GPU resource, checks picture scene
Deng marking off different Run-time scenarios according to the different demands to each system resource, be advantageous to quick according to Run-time scenario
Performance boost strategy is determined, in addition, the preparatory condition can also associate the different applications of news category application, different applications
Identical or different Run-time scenario can be marked off according to preparatory condition, does not do unique restriction herein.
S402, the news category application program obtain the performance boost strategy of the Run-time scenario.
Wherein, performance boost strategy refers to the Run-time scenario for improving the above-mentioned news category application program being currently running
The resource allocation strategy of runnability, such as cpu resource adjustable strategies, GPU resource adjustable strategies, memory bandwidth resource adjustment plan
Summary, disk resource adjustable strategies, Internet resources adjustable strategies etc., do not do unique restriction herein, in addition, performance boost strategy can be with
Including system resource to be adjusted, the adjustment amount of system resource to be adjusted, or system resource to be adjusted can also be included
Adjustment duration.
Wherein, the news category application program prestores the mapping relations of multiple Run-time scenarios and performance boost strategy, described
Mapping relations can be that the news category application program is set when dispatching from the factory by developer according to test result.
S403, the news category application program send contextual data bag, the contextual data bag to the operating system
Include the performance boost strategy.
Wherein, the contextual data bag is used for the operating system according to news category described in 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 news category application program of mobile terminal determines Run-time scenario, secondly, institute
The performance boost strategy that news category application program obtains the Run-time scenario is stated, finally, the news category application program is to described
Operating system sends contextual data bag, and the contextual data bag includes the performance boost strategy, and the contextual data bag is used for
The operating system according to the system resource of news category application program described in the performance boost Developing Tactics distribution.Due to field
Scape packet includes the performance boost strategy of the Run-time scenario of news category application program, and contextual data bag is new by what is be currently running
Hear class application program to send, operating system can directly obtain the performance boost plan of the current Run-time scenario of news category application program
Slightly, be advantageous to be lifted the processing speed of operating system in mobile terminal, operating system adjusts in real time according to the performance boost strategy
The configuration of the system resource of news category application program, realize and news category application program is entered in the process of running by operating system
The real-time performance optimization of row, be advantageous to improve the real-time that mobile terminal control news category application program carries out performance optimization.
In a possible example, the news category application program obtains the performance boost strategy of the Run-time scenario,
Including:
The news category application program identifies by inquiry of the Run-time scenario, inquires about default Run-time scenario and is carried with performance
The mapping relations of strategy are risen, obtain the performance boost strategy corresponding with the Run-time scenario.
It can be seen that in this example, news category application program inquires about default Run-time scenario and performance boost according to Run-time scenario
The mapping relations of strategy, the performance boost strategy of the Run-time scenario is directly obtained, be advantageous to further lifting resource distribution
Speed.
In a possible example, the Run-time scenario is that scene is slided in list, and the news category application program obtains
The performance boost strategy of the Run-time scenario, including:
The news category application program identifies by inquiry of the Run-time scenario, inquires about default Run-time scenario and is provided with system
The mapping relations in source, it is cpu resource and GPU resource to obtain system resource to be adjusted corresponding with the Run-time scenario;
The news category application program obtains the list sliding speed;
The news category application program determines the adjustment of the system resource to be adjusted according to the list sliding speed
Amount;
The news category application program is according to the tune of the system resource to be adjusted and the system resource to be adjusted
Whole amount generates the performance boost strategy that scene is slided in the list.
Wherein, the news category application program determines the system resource to be adjusted according to the list sliding speed
Adjustment amount specific implementation can be identified by inquiry of the numerical intervals of the sliding speed, inquire about multiple sliding speeds
Numerical intervals and CPU adjustment amounts mapping relations, determine the adjustment amount of cpu resource to be adjusted, and the multiple operations of inquiry
The numerical intervals of speed and the mapping relations of GPU resource, determine the adjustment amount of GPU resource to be adjusted.
Wherein, when the Run-time scenario is the video playback scene or news analysis scene or details reading scene,
The news category application program can determine the system resource to be adjusted by obtaining the loading velocity of document or video
Adjustment amount.
It can be seen that in this example, news category apply according to list slide scene determine system resource to be adjusted and according to
List sliding speed quickly determines the adjustment amount of accurately system resource to be adjusted, be advantageous to be lifted resource distribution speed and
Accuracy.
In a possible example, the news category application program to the operating system send contextual data bag it
Before, methods described also includes:
The news category application program sends connection request to the operating system, and the connection request includes the news
The application identities of class application program, the application identities are used for the operating system and identified by inquiry of the application identities, looked into
The authority list for the multiple application program is ask, and when the authority list includes the application identities of the news category application program
When, the operating system is the news category application assigned data transmission interface, and the data transmission interface is used for described
Data are transmitted between news category application program and the operating system, the data comprise at least the contextual data bag.
It can be seen that in this example, the news category application program sends connection request, request operation system to the operating system
System distribution data transmission interface, operating system are answered after determining the authority of news category application program to the news category for meeting jurisdictions mandate
Data transmission interface is distributed with program, rather than blindness gives any application data coffret, is advantageous to avoid counting
According to the disorder of transmission, and ensure the security of data transfer.
In a possible example, the news category application program to the operating system send contextual data bag it
Afterwards, methods described also includes:
The news category application program sends instruction message by the data transmission interface to the operating system, described
Indicate that message is used for operating system news according to the instruction message cancellation according to the performance boost Developing Tactics
The distribution of the system resource of class application program.
It can be seen that in this example, news category application program sends instruction message at the end of Run-time scenario is detected and is to operation
System, instruction operating system cancel point according to the system resource of news category application program described in the performance boost Developing Tactics
Match somebody with somebody, be advantageous to lifting and cancel the accuracy of time, rather than allow news category application program to take more system resource always, have
Beneficial to the power consumption and electric quantity consumption for reducing mobile terminal.
It is consistent with the embodiment shown in above-mentioned Fig. 2, Fig. 3 or Fig. 4, provided referring to Fig. 5, Fig. 5 is the embodiment of the present application
A kind of mobile terminal structural representation, the running of mobile terminal has one or more application programs and operating system, such as schemes
Shown, the mobile terminal includes processor, memory, communication interface and one or more programs, wherein, said one or more
Individual program is different from said one or multiple application programs, and said one or multiple programs are stored in above-mentioned memory,
And it is configured by above-mentioned computing device, said procedure includes being used for the instruction for performing following steps;
The operating system is controlled to receive the contextual data bag from the news category application program being currently running, the scene
Packet includes the performance boost strategy that the news category application program generates according to Run-time scenario;
Control the operating system to parse the contextual data bag and obtain the performance boost strategy;
Control system resource of the operating system according to news category application program 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 receives from the news being currently running first
The contextual data bag of class application program, the contextual data bag include what the news category application program generated according to Run-time scenario
Performance boost strategy, secondly, the operating system parse the contextual data bag and obtain the performance boost strategy, finally, institute
State distribution of the operating system according to the system resource of news category application program described in the performance boost Developing Tactics.Due to scene
The performance boost strategy of the Run-time scenario of packet including news category application program, and contextual data bag is by the news that is currently running
Class application program is sent, and operating system can directly obtain the performance boost strategy of the current Run-time scenario of news category application program,
Be advantageous to be lifted the processing speed of operating system in mobile terminal, operating system adjusts news in real time according to the performance boost strategy
The configuration of the system resource of class application program, realize and reality is carried out in the process of running to news category application program by operating system
When performance optimization, be advantageous to improve the real-time that mobile terminal control news category application program carries out performance optimization.
In a possible example, the Run-time scenario comprise at least it is following any one:Scene, details are slided in list
Reading scene, news analysis scene, video playback scene.
In a possible example, the Run-time scenario is that scene is slided in list, and the performance boost strategy includes treating
The adjustment amount of the system resource of adjustment and system resource to be adjusted, the system resource to be adjusted are that cpu resource and GPU are provided
Source, the adjustment amount associate the list sliding speed.
In a possible example, the contextual data bag includes application identities and scene identity, the performance boost
Strategy includes the adjustment grade of system resource and the system resource to be adjusted to be adjusted, in the control operation system
In terms of system distribution of the system resource of news category application program according to the performance boost Developing Tactics, in described program
Instruction is specifically used for performing following operate:The operating system is controlled to obtain the amount to be allocated of the system resource to be adjusted;
And the control operating system determines that the system to be adjusted provides according to the adjustment grade of the system resource to be adjusted
The Target Assignment amount in source;And control when the amount to be allocated is less than or equal to the Target Assignment amount, the operating system
The Target Assignment amount is adjusted according to the scene identity and the amount to be allocated;And the control operating system is according to
Target Assignment amount after adjustment adjusts the distribution of the system resource of the news category application program.
In a possible example, said procedure also includes being used for the instruction for performing following steps:Described in the control
Before operating system receives the contextual data bag from the news category application program being currently running, the operating system is controlled to receive
Connection request from the news category application program, the connection request include the application mark of the news category application program
Know;And control the operating system to be identified by inquiry of the application identities, power of the inquiry for the multiple application program
Limit table;And control, when the authority list includes the application identities of the news category application program, the operating system is institute
State news category application assigned data transmission interface, the data transmission interface is used for the news category application program and described
Data are transmitted between operating system, the data comprise at least the contextual data bag.
In a possible example, the performance boost strategy includes preset duration, and said procedure also includes being used to hold
The instruction of row following steps:The control operating system is according to news category application journey described in the performance boost Developing Tactics
After the distribution of the system resource of sequence, the operating system is controlled to work as the adjustment duration detected according to the performance boost strategy
During more than or equal to the preset duration, cancel the system according to news category application program described in the performance boost Developing Tactics
The distribution of resource.
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 news category application program described in the performance boost Developing Tactics, institute is controlled
State operating system and the instruction message from the news category application program is received by the data transmission interface;And control institute
Stating operating system news category application program according to being cancelled according to the performance boost Developing Tactics instruction message is
The distribution for resource of uniting.
Or said procedure includes being used for the instruction for performing following steps;
Control news category application program determines Run-time scenario;
The news category application program is controlled to obtain the performance boost strategy of the Run-time scenario;
The news category application program is controlled to send contextual data bag to the operating system, the contextual data bag includes
The performance boost strategy, the contextual data bag are used for the operating system according to new described in the performance boost Developing Tactics
Hear the distribution of the system resource of class application program.
As can be seen that in the embodiment of the present application, the news category application program of mobile terminal determines Run-time scenario, secondly, institute
The performance boost strategy that news category application program obtains the Run-time scenario is stated, finally, the news category application program is to described
Operating system sends contextual data bag, and the contextual data bag includes the performance boost strategy, and the contextual data bag is used for
The operating system according to the system resource of news category application program described in the performance boost Developing Tactics distribution.Due to field
Scape packet includes the performance boost strategy of the Run-time scenario of news category application program, and contextual data bag is new by what is be currently running
Hear class application program to send, operating system can directly obtain the performance boost plan of the current Run-time scenario of news category application program
Slightly, be advantageous to be lifted the processing speed of operating system in mobile terminal, operating system adjusts in real time according to the performance boost strategy
The configuration of the system resource of news category application program, realize and news category application program is entered in the process of running by operating system
The real-time performance optimization of row, be advantageous to improve the real-time that mobile terminal control news category application program carries out performance optimization.
In a possible example, the Run-time scenario comprise at least it is following any one:Scene, details are slided in list
Reading scene, news analysis scene, video playback scene.
In a possible example, the performance of the Run-time scenario is obtained in the control news category application program
In terms of Promotion Strategy, the instruction in described program is specifically used for performing following operate:The news category application program is controlled with institute
State Run-time scenario to identify for inquiry, inquire about the mapping relations of default Run-time scenario and performance boost strategy, obtain and the fortune
The performance boost strategy corresponding to row scene.
In a possible example, the Run-time scenario is that scene is slided in list, should in the control news category
In terms of obtaining the performance boost strategy of the Run-time scenario with program, the instruction in described program is specifically used for performing following grasp
Make:Control the news category application program to be identified by inquiry of the Run-time scenario, inquire about default Run-time scenario and provided with system
The mapping relations in source, it is cpu resource and GPU resource to obtain system resource to be adjusted corresponding with the Run-time scenario;And
For controlling the news category application program to obtain the list sliding speed;And for controlling the news category application program
The adjustment amount of the system resource to be adjusted is determined according to the list sliding speed;And for controlling the news category should
The list is generated with program according to the adjustment amount of the system resource to be adjusted and the system resource to be adjusted to slide
The performance boost strategy of scene.
In a possible example, said procedure also includes being used for the instruction for performing following steps:Described in the control
Before news category application program sends contextual data bag to the operating system, the news category application program is controlled to the behaviour
Make system and send connection request, the connection request includes the application identities of the news category application program, the application identities
Being identified for the operating system by inquiry of the application identities, inquiry is directed to the authority list of the multiple application program, and
When the authority list includes the application identities of the news category application program, the operating system is the news category application journey
Sequence distributes data transmission interface, and the data transmission interface is used to pass between the news category application program and the operating system
Transmission of data, the data comprise at least the contextual data bag.
In a possible example, said procedure also includes being used for the instruction for performing following steps:Described in the control
After news category application program sends contextual data bag to the operating system, the news category application program is controlled to pass through described
Data transmission interface sends instruction message to the operating system, and the instruction message is used for the operating system according to the finger
Show that message cancels the distribution according to the system resource of news category application program described in the performance boost Developing Tactics.
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 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 performs the step S301-S308 in step S201-S203, Fig. 3 in Fig. 2, or for supporting resource distribution
Device performs the step S401-S403 in Fig. 4 and/or other processes for techniques described herein.Device for allocating resources
Memory cell 601 can also be included, for store program codes and data.
The processing unit 602, transported for controlling the operating system to receive to come from by the communication unit 603
The contextual data bag of capable news category application program, the contextual data bag include the news category application program according to operation field
The performance boost strategy of scape generation;And carried for controlling the operating system to parse the contextual data bag acquisition performance
Rise strategy;And for controlling the operating system to be according to news category application program described in the performance boost Developing Tactics
The distribution for resource of uniting.
In a possible example, the Run-time scenario comprise at least it is following any one:Scene, details are slided in list
Reading scene, news analysis scene, video playback scene.
In a possible example, the Run-time scenario is that scene is slided in list, and the performance boost strategy includes treating
The adjustment amount of the system resource of adjustment and system resource to be adjusted, the system resource to be adjusted are that cpu resource and GPU are provided
Source, the adjustment amount associate the list sliding speed.
In a possible example, the contextual data bag includes application identities and scene identity, the performance boost
Strategy includes the adjustment grade of system resource and the system resource to be adjusted to be adjusted, in the control operation system
In terms of system distribution of the system resource of news category application program according to the performance boost Developing Tactics, the processing unit
602 are specifically used for:The operating system is controlled to obtain the amount to be allocated of the system resource to be adjusted;And for controlling
State the target point that operating system determines the system resource to be adjusted according to the adjustment grade of the system resource to be adjusted
Dosage;And for controlling when the amount to be allocated is less than or equal to the Target Assignment amount, the operating system is according to institute
State scene identity and the amount to be allocated adjusts the Target Assignment amount;And for controlling the operating system according to the tune
Target Assignment amount after whole adjusts the distribution of the system resource of the news category application program.
In a possible example, the processing unit 602 controls the operating system to pass through the communication unit 603
Before receiving the contextual data bag from the news category application program being currently running, it is additionally operable to:The operating system is controlled to pass through
The communication unit 603 receives the connection request from the news category application program, and the connection request includes the news
The application identities of class application program;And for controlling the operating system to be identified by inquiry of the application identities, inquire about pin
To the authority list of the multiple application program;And for controlling when the authority list includes answering for the news category application program
During with mark, the operating system is the news category application assigned data transmission interface, and the data transmission interface is used
Data are transmitted between the news category application program and the operating system, the data comprise at least the contextual data
Bag.
In a possible example, the performance boost strategy includes preset duration, and the processing unit 602 controls institute
After operating system is stated according to the distribution of the system resource of news category application program 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 described default
When long, cancel the distribution according to the system resource of news category application program 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 news category application program, it is additionally operable to:The operating system is controlled to pass through described
Data transmission interface receives the instruction message from the news category application program;And for control the operating system according to
The instruction message cancels the distribution according to the system resource of news category application program described in the performance boost Developing Tactics.
Or
The processing unit 602, for controlling news category application program to determine Run-time scenario;It is and described new for controlling
Hear the performance boost strategy that class application program obtains the Run-time scenario;And for controlling the news category application program to pass through
The communication unit 603 sends contextual data bag to the operating system, and the contextual data bag includes the performance boost plan
Slightly, the contextual data bag is used for the operating system according to news category application program described in the performance boost Developing Tactics
The distribution of system resource.
In a possible example, the Run-time scenario comprise at least it is following any one:Scene, details are slided in list
Reading scene, news analysis scene, video playback scene.
In a possible example, the performance of the Run-time scenario is obtained in the control news category application program
In terms of Promotion Strategy, the processing unit 602 is specifically used for:The news category application program is controlled using the Run-time scenario to look into
Mark is ask, inquires about the mapping relations of default Run-time scenario and performance boost strategy, obtains institute corresponding with the Run-time scenario
State performance boost strategy.
In a possible example, the Run-time scenario is that scene is slided in list, should in the control news category
In terms of obtaining the performance boost strategy of the Run-time scenario with program, the processing unit 602 is specifically used for:Control the news
Class application program identifies by inquiry of the Run-time scenario, inquires about the mapping relations of default Run-time scenario and system resource, obtains
It is cpu resource and GPU resource to take system resource to be adjusted corresponding with the Run-time scenario;And for controlling the news
Class application program obtains the list sliding speed;And for controlling the news category application program to be slided according to the list
Speed determines the adjustment amount of the system resource to be adjusted;And for controlling the news category application program to be treated according to
The adjustment amount of the system resource of adjustment and the system resource to be adjusted generates the performance boost plan that scene is slided in the list
Slightly.
In a possible example, the processing unit 602 controls the news category application program to the operation system
Before system sends contextual data bag, it is additionally operable to:The news category application program is controlled to pass through the communication to the operating system
Unit 603 sends connection request, and the connection request includes the application identities of the news category application program, the application identities
Being identified for the operating system by inquiry of the application identities, inquiry is directed to the authority list of the multiple application program, and
When the authority list includes the application identities of the news category application program, the operating system is the news category application journey
Sequence distributes data transmission interface, and the data transmission interface is used to pass between the news category application program and the operating system
Transmission of data, the data comprise at least the contextual data bag.
In a possible example, the processing unit 602 controls the news category application program to the operation system
After system sends contextual data bag, it is additionally operable to:Control the news category application program by the data transmission interface to described
Operating system sends instruction message, and the instruction message is used for the operating system and cancelled according to the instruction message according to described
The distribution of the system resource of news category application program described in performance boost Developing Tactics.
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 news category application program and operating system, and news category application program runs on user
Space, operating system is in operating system space.Operating system is received from the field for the news category application program being currently running
Scape packet, the contextual data bag include the performance boost strategy that the news category application program generates according to Run-time scenario;
Operating system parses the contextual data bag and obtains the performance boost strategy;Operating system is adjusted according to the performance boost strategy
The distribution of the system resource of the whole news category application program.
Wherein, news category application program determines Run-time scenario;News category application program obtains the performance of the Run-time scenario
Promotion Strategy;News category application program sends contextual data bag to the operating system, and the contextual data bag includes the property
Energy Promotion Strategy, the contextual data bag is used for the operating system should according to news category described in the performance boost Developing Tactics
With the distribution of the system resource of program.
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 (15)
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, methods described include:
The operating system receives the contextual data bag from the news category application program being currently running, the contextual data bag
Include the performance boost strategy that the news category application program generates according to Run-time scenario;
The operating system parses the contextual data bag and obtains the performance boost strategy;
The distribution of operating system system resource of news category application program according to the performance boost Developing Tactics.
2. according to the method for claim 1, it is characterised in that the Run-time scenario comprise at least it is following any one:Row
Table slides scene, details reading scene, news analysis scene, video playback scene.
3. method according to claim 1 or 2, it is characterised in that the Run-time scenario is that scene, the property are slided in list
Energy Promotion Strategy includes the adjustment amount of system resource and system resource to be adjusted to be adjusted, the system resource to be adjusted
For cpu resource and GPU resource, the adjustment amount associates the list sliding speed.
4. according to the method described in claim any one of 1-3, it is characterised in that the contextual data bag include application identities and
Scene identity, the performance boost strategy include adjustment of system resource and the system resource to be adjusted to be adjusted etc.
Level, the distribution of operating system system resource of news category application program according to the performance boost Developing Tactics, bag
Include:
The operating system obtains the amount to be allocated of the system resource to be adjusted;
The operating system determines the system resource to be adjusted according to the adjustment grade of the system resource to be adjusted
Target Assignment amount;
When the amount to be allocated is less than or equal to the Target Assignment amount, the operating system is according to the scene identity and institute
State amount to be allocated and adjust the Target Assignment amount;
The operating system adjusts the system resource of the news category application program according to the Target Assignment amount after the adjustment
Distribution.
5. according to the method described in claim any one of 1-4, it is characterised in that the operating system is received to come from and is currently running
News category application program contextual data bag before, methods described also includes:
The operating system receives the connection request from the news category application program, and the connection request includes the news
The application identities of class application program;
The operating system 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 news category application program, the operating system should for the news category
Distribute data transmission interface with program, the data transmission interface be used for the news category application program and the operating system it
Between transmit data, the data comprise at least the contextual data bag.
6. according to the method described in claim any one of 1-5, it is characterised in that when the performance boost strategy includes default
It is long, the distribution of operating system system resource of news category application program according to the performance boost Developing Tactics it
Afterwards, methods described also includes:
The operating system ought detect is more than or equal to the preset duration according to the adjustment duration of the performance boost strategy
When, cancel the distribution of the system resource of news category application program according to the performance boost Developing Tactics.
7. according to the method described in claim any one of 1-5, it is characterised in that the operating system is according to the performance boost
After the distribution of the system resource of news category application program described in Developing Tactics, methods described also includes:
The operating system receives the instruction message from the news category application program by the data transmission interface;
The operating system cancels the news category application journey according to the performance boost Developing Tactics according to the instruction message
The distribution of the system resource of sequence.
8. 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, methods described include:
News category application program determines Run-time scenario;
The news category application program obtains the performance boost strategy of the Run-time scenario;
The news category application program sends contextual data bag to the operating system, and the contextual data bag includes the performance
Promotion Strategy, the contextual data bag are used for operating system news category application according to the performance boost Developing Tactics
The distribution of the system resource of program.
9. according to the method for claim 8, it is characterised in that the Run-time scenario comprise at least it is following any one:Row
Table slides scene, details reading scene, news analysis scene, video playback scene.
10. method according to claim 8 or claim 9, it is characterised in that the news category application program obtains the operation field
The performance boost strategy of scape, including:
The news category application program identifies by inquiry of the Run-time scenario, inquires about default Run-time scenario and performance boost plan
Mapping relations slightly, obtain the performance boost strategy corresponding with the Run-time scenario.
11. method according to claim 8 or claim 9, it is characterised in that the Run-time scenario is that scene is slided in list, described
News category application program obtains the performance boost strategy of the Run-time scenario, including:
The news category application program identifies by inquiry of the Run-time scenario, inquires about default Run-time scenario and system resource
Mapping relations, it is cpu resource and GPU resource to obtain system resource to be adjusted corresponding with the Run-time scenario;
The news category application program obtains the list sliding speed;
The news category application program determines the adjustment amount of the system resource to be adjusted according to the list sliding speed;
The news category application program is according to the system resource to be adjusted and the stock number of the system resource to be adjusted
Generate the performance boost strategy that scene is slided in the list.
12. a kind of device for allocating resources, it is characterised in that operation, which has to operate, applied to mobile terminal, on the mobile terminal is
System and one or more application programs, the device for allocating resources include processing unit and communication unit,
The processing unit, for controlling the operating system to be received by the communication unit from the news category being currently running
The contextual data bag of application program, the contextual data bag include the property that the news category application program generates according to Run-time scenario
Can Promotion Strategy;And obtain the performance boost strategy for controlling the operating system to parse the contextual data bag;With
And for controlling operating system system resource of news category application program according to the performance boost Developing Tactics
Distribution.
13. a kind of device for allocating resources, it is characterised in that operation, which has to operate, applied to mobile terminal, on the mobile terminal is
System and one or more application programs, the device for allocating resources include processing unit and communication unit,
The processing unit, for controlling news category application program to determine Run-time scenario;And for controlling the news category should
The performance boost strategy of the Run-time scenario is obtained with program;It is and described logical for controlling the news category application program to pass through
Believe that unit sends contextual data bag to the operating system, the contextual data bag includes the performance boost strategy, the field
Scape packet is used for the system resource of operating system news category application program according to the performance boost Developing Tactics
Distribution.
A kind of 14. 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-7 and/or 8-11 method.
15. 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 in claim 1-7 and/or 8-11
Method described in any one, the computer include mobile terminal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710775951.XA CN107528977B (en) | 2017-08-31 | 2017-08-31 | Resource allocation method and related product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710775951.XA CN107528977B (en) | 2017-08-31 | 2017-08-31 | Resource allocation method and related product |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107528977A true CN107528977A (en) | 2017-12-29 |
CN107528977B CN107528977B (en) | 2020-07-07 |
Family
ID=60683204
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710775951.XA Expired - Fee Related CN107528977B (en) | 2017-08-31 | 2017-08-31 | Resource allocation method and related product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107528977B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108647088A (en) * | 2018-03-13 | 2018-10-12 | 广东欧珀移动通信有限公司 | Resource allocation method, device, terminal and storage medium |
CN109542614A (en) * | 2018-05-30 | 2019-03-29 | Oppo广东移动通信有限公司 | Resource allocation method, device, terminal and storage medium |
CN116700915A (en) * | 2022-12-23 | 2023-09-05 | 荣耀终端有限公司 | Resource scheduling method and device |
Citations (5)
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 |
CN106293803A (en) * | 2016-07-22 | 2017-01-04 | 宇龙计算机通信科技(深圳)有限公司 | A kind of application control method and device |
CN106549880A (en) * | 2016-11-25 | 2017-03-29 | 珠海市魅族科技有限公司 | A kind of resource allocation methods and terminal unit of terminal |
CN106874168A (en) * | 2017-01-12 | 2017-06-20 | 北京奇虎科技有限公司 | Determine method, device and the mobile terminal of application program runnability |
-
2017
- 2017-08-31 CN CN201710775951.XA patent/CN107528977B/en not_active Expired - Fee Related
Patent Citations (5)
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 |
CN106293803A (en) * | 2016-07-22 | 2017-01-04 | 宇龙计算机通信科技(深圳)有限公司 | A kind of application control method and device |
CN106549880A (en) * | 2016-11-25 | 2017-03-29 | 珠海市魅族科技有限公司 | A kind of resource allocation methods and terminal unit of terminal |
CN106874168A (en) * | 2017-01-12 | 2017-06-20 | 北京奇虎科技有限公司 | Determine method, device and the mobile terminal of application program runnability |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108647088A (en) * | 2018-03-13 | 2018-10-12 | 广东欧珀移动通信有限公司 | Resource allocation method, device, terminal and storage medium |
CN109408223A (en) * | 2018-03-13 | 2019-03-01 | 广东欧珀移动通信有限公司 | Resource allocation method, device, terminal and storage medium |
CN109408223B (en) * | 2018-03-13 | 2020-11-27 | Oppo广东移动通信有限公司 | Resource allocation method, device, terminal and storage medium |
CN109542614A (en) * | 2018-05-30 | 2019-03-29 | Oppo广东移动通信有限公司 | Resource allocation method, device, terminal and storage medium |
CN109542614B (en) * | 2018-05-30 | 2023-06-23 | Oppo广东移动通信有限公司 | Resource allocation method, device, terminal and storage medium |
CN116700915A (en) * | 2022-12-23 | 2023-09-05 | 荣耀终端有限公司 | Resource scheduling method and device |
Also Published As
Publication number | Publication date |
---|---|
CN107528977B (en) | 2020-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107528976A (en) | Resource allocation method and Related product | |
CN107547744A (en) | Resource allocation method and Related product | |
CN107515787A (en) | Resource allocation method and Related product | |
CN107577533A (en) | Resource allocation method and Related product | |
CN107426432B (en) | Resource allocation method and Related product | |
CN107613107A (en) | Resource allocation method and related product | |
CN107577537A (en) | Resource allocation method and Related product | |
CN107483725A (en) | Resource allocation method and Related product | |
CN107589998A (en) | Resource allocation method and Related product | |
CN107547746B (en) | Resource allocation method and related product | |
CN107861816A (en) | Resource allocation method and device | |
CN107894920A (en) | Resource allocation method and Related product | |
CN107861814A (en) | Resource allocation method and equipment | |
CN107479970A (en) | Resource allocation method and Related product | |
CN107589977A (en) | Resource allocation method and related product | |
CN107797868A (en) | resource adjusting method and device | |
CN107621981A (en) | Resource allocation method and Related product | |
CN107450988B (en) | Resource allocation method and related product | |
CN107861603A (en) | Power consumption control method and equipment | |
CN107807852A (en) | Application program capacity control method and equipment | |
CN107547745A (en) | Resource allocation method and Related product | |
CN107832148A (en) | Performance optimization method and equipment | |
CN107786738B (en) | Network control method and equipment | |
CN107517306B (en) | Resource allocation method and related product | |
US20190205976A1 (en) | Account number registration method, apparatus, and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20200707 |
|
CF01 | Termination of patent right due to non-payment of annual fee |