CN106776036A - A kind of resource allocation methods and device - Google Patents

A kind of resource allocation methods and device Download PDF

Info

Publication number
CN106776036A
CN106776036A CN201611260650.5A CN201611260650A CN106776036A CN 106776036 A CN106776036 A CN 106776036A CN 201611260650 A CN201611260650 A CN 201611260650A CN 106776036 A CN106776036 A CN 106776036A
Authority
CN
China
Prior art keywords
application
resource
memory source
default customization
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201611260650.5A
Other languages
Chinese (zh)
Inventor
白剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201611260650.5A priority Critical patent/CN106776036A/en
Publication of CN106776036A publication Critical patent/CN106776036A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of method for managing resource, it is applied to be provided with the terminal device of application, including:When the treatment of data processing task of application request is detected, the memory source for obtaining the application takes priority and cpu resource occupancy priority;Memory source according to the application takes priority by the resource allocation of default customization memory source to the application, and takes priority by the resource allocation of default customization cpu resource to the application according to the cpu resource of the application;Memory source and cpu resource for application distribution is called to complete the treatment request.The embodiment of the present invention additionally provides a kind of resource management apparatus and terminal device.The response time of application can be shortened using the embodiment of the present invention.

Description

A kind of resource allocation methods and device
Technical field
The present invention relates to electronic technology field, more particularly to a kind of application resource distribution method and device.
Background technology
With continuing to develop for technology, increasing application (such as Taobao, microblogging, wechat etc.) continuously emerges, peace It is also more and more loaded on the application in intelligent terminal (such as smart mobile phone, panel computer, notebook etc.).At present, intelligent terminal The task process of all applications of middle installation takes resource according to equal priority, and this causes running multiple applications On the basis of, if user want operation certain when applying, may because inadequate resource cannot be smooth operation, and then increase should Response time.
The content of the invention
The embodiment of the present invention provides a kind of resource allocation methods and device, to shorten the response time of application.
In a first aspect, the embodiment of the present invention provides a kind of method for managing resource, it is applied to be provided with the terminal device of application, Including:
When the treatment of data processing task of application request is detected, the memory source for obtaining the application takes preferentially Level and cpu resource take priority;
Memory source according to the application takes priority should to described in by the resource allocation of default customization memory source With, and priority is taken by the resource allocation of default customization cpu resource to the application according to the cpu resource of the application;
Memory source and cpu resource for application distribution is called to complete the treatment request.
Second aspect, the embodiment of the present invention provides a kind of resource management apparatus, is applied to be provided with the terminal device of application, Including:
Acquisition module, for when the treatment of data processing task of application request is detected, obtaining the interior of the application Deposit resource occupation priority and cpu resource takes priority;
Distribute module, for taking priority by the resource of default customization memory source according to the memory source of the application The application is distributed to, and priority is taken by the resource allocation of default customization cpu resource according to the cpu resource of the application To the application;
Calling module, for calling memory source and cpu resource for application distribution to complete the treatment request.
The third aspect, the embodiment of the present invention provides a kind of terminal device, and the terminal device includes processor, the treatment Device is configured as corresponding function in the method for supporting terminal device to perform above-mentioned first aspect.Further, terminal device is also Communication interface can be included.Further, mobile terminal can also include memory, and the memory is used for and processor coupling Close, it is preserved for the necessary programmed instruction of terminal device and data.
Fourth aspect, the embodiment of the invention provides a kind of computer-readable recording medium, wherein, the computer-readable Storage medium is stored with the program code performed for computer equipment, and the program code specifically includes instruction, the instruction use In the part or all of step described in execution embodiment of the present invention first aspect either method.
The memory source occupancy priority and cpu resource occupancy that the scheme that the present invention is provided has been previously set each application are excellent First level, is using the default customization money of reasonable distribution according to the two parameters during the follow-up data processing task for needing execution to apply Source, it is seen then that by default customization resource be using providing data processing resources, the response time of application can be shortened, in addition, also It can be reasonably allocated resources so that maximum resource utilization.
The aspects of the invention or other aspects can more straightforwards in the following description.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of method for managing resource provided in an embodiment of the present invention;
Fig. 2 is a kind of interaction mode exemplary plot of task management interface provided in an embodiment of the present invention;
Fig. 3 is the schematic flow sheet of another method for managing resource provided in an embodiment of the present invention;
Fig. 4 is a kind of structural representation of resource management apparatus disclosed in the embodiment of the present invention;
Fig. 5 is a kind of structural representation of terminal device disclosed in the embodiment of the present invention;
Fig. 6 is the structural representation of another terminal device disclosed in the embodiment of the present invention.
Specific embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention Accompanying drawing, is clearly and completely described to the technical scheme in the embodiment of the present invention, it is clear that described embodiment is only A part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Term " first ", " second " in description and claims of this specification and above-mentioned accompanying drawing etc. are for distinguishing Different objects, rather than for describing particular order.Additionally, term " comprising " and " having " and their any deformations, it is intended that It is to cover non-exclusive including.Process, method, system, product or the equipment for for example containing series of steps or unit do not have The step of having listed or unit are defined in, but alternatively also include the step of not listing or unit, or alternatively also wrapped Include for these processes, method, product or other intrinsic steps of equipment or unit.
Referenced herein " embodiment " is it is meant that the special characteristic, structure or the characteristic that describe can be wrapped in conjunction with the embodiments Containing at least one embodiment of the present invention.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.
Terminal device involved by the embodiment of the present invention can include the various handheld devices with radio communication function, Mobile unit, wearable device, computing device are connected to other processing equipments of 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 terminal device.The embodiment of the present invention is carried out in detail below It is thin to introduce.
Fig. 1 is referred to, Fig. 1 is a kind of schematic flow sheet of method for managing resource provided in an embodiment of the present invention, is applied to The terminal device of application is installed, this method for managing resource is comprised the following steps:
S101, when detecting the treatment of data processing task of application and asking, the terminal device obtains the application Memory source take priority and cpu resource and take priority.
Wherein, the application include terminal device in install various applications, such as wechat application, iqiyi.com, UC browsers, Taobao's application, Alipay application, QQ music applications etc..
Wherein, data processing task is including application startup task, using under more new task, audio frequency and video loading tasks, file Load task, audio and video playing task, picture loading tasks, data search task, file loading tasks etc..
In one embodiment, the memory source of application takes priority and the cpu resource occupancy priority of application can be By user-defined;Or set according to the first preset strategy by terminal device.
In one embodiment, the terminal device takes excellent according to the memory source that the first preset strategy sets the application The specific embodiment that first level and cpu resource take priority is:The terminal device obtains the type of the application, Yi Jigen Determine that the memory source of the application takes priority and cpu resource takes priority according to the type of the application.
Wherein, the type of application including Video Applications type (such as iqiyi.com, youku.com, Sohu), voice applications type (such as QQ music, KuGoo, Netease's cloud music etc.), image procossing application type (such as U.S. elegant and the U.S. face camera of figure, POCO cameras), i.e. When communication applications type (such as wechat, QQ, WhatsApp) etc..
If the application is iqiyi.com, i.e. Video Applications type, because Video Applications type needs to take in more Deposit resource, and it is so much to need the cpu resource for taking to be relatively free of, then the memory source of the application settings take priority compared with Height, and the cpu resource occupancy priority for setting is relatively low.If there is the application elegant for U.S. figure, i.e. image procossing application Type, because image procossing application type needs to take more cpu resource, and needs the memory source for taking to be relatively free of that It is many, then the cpu resource occupancy priority of the application settings is higher, and the memory source for setting takes priority relatively It is low.
In one embodiment, the terminal device takes excellent according to the memory source that the first preset strategy sets the application The specific embodiment that first level and cpu resource take priority is:The terminal device obtains the application in preset period of time Use parameter (such as access times, the memory source occupancy for using every time, the cpu resource occupancy for using every time);The end The memory source that end equipment is applied according to the use parameter setting takes priority and cpu resource takes priority.
If the application is wechat application, wechat is applied and used 3 times in preset period of time, and this 3 times memory source is accounted for Consumption has the first memory source occupancy, the second memory source occupancy, the 3rd memory source occupancy, this 3 times CPU respectively Resource occupation amount has the first cpu resource occupancy, the second cpu resource occupancy, the 3rd cpu resource occupancy respectively, then eventually End equipment takes priority according to the memory source that the average value of this memory source occupancy of 3 times sets the application, and The cpu resource that the average value of this cpu resource occupancy of 3 times sets the application takes priority.
In addition, the embodiment of the present invention takes priority to the memory source for how setting application and cpu resource takes preferentially The specific implementation of level does not do unique restriction.
In one embodiment, the memory source of the terminal device acquisition application takes priority and cpu resource is accounted for It is with the specific embodiment of priority:When the application is for default application, the memory source occupancy for obtaining the application is excellent First level and cpu resource take priority.
Wherein, preset application and represent the application that user commonly uses, such as wechat application, QQ, UC browser.Or, preset Using popular application is represented, such as, and wechat application, QQ, Taobao's application etc..
In addition, default application can be user-defined, or set according to the second preset strategy by terminal device Fixed, the second preset strategy for example can be first to obtain making for the interior multiple applications in terminal device of the first preset period of time With parameter (such as number of times, frequency, duration), then selected at least from this multiple application according to the use parameter that each is applied One application, and be default application by this at least one application definition.Such as, it is assumed that the termination time of the first preset period of time is Present system time, the first preset period of time when a length of 1 week, the multiple applications in terminal device have:Wechat application, QQ And iqiyi.com, this 3 applications use parameter within 1 week is:The access times of wechat application are 50 times, the access times of QQ are 55 times, the access times of iqiyi.com are 20 times, then application definition of the terminal device by access times more than 40 times is answered for default With i.e. wechat application and QQ is default application.In addition, the embodiment of the present invention to preset application setting specific implementation not Do unique restriction.
S102, the terminal device take priority by default customization memory source according to the memory source of the application Resource allocation gives the application, and takes priority by the resource of default customization cpu resource according to the cpu resource of the application Distribute to the application.
Wherein, it is preferential committed memory resource to preset customization memory source.Default customization cpu resource is preferential committed memory Resource.
In one embodiment, before above step S102, the method shown in Fig. 1 also includes:
The terminal device determines whether the default customization memory source current residual occupancy is less than first threshold, with And determine whether the default customization CPU current residuals occupancy is less than Second Threshold;When the default customization memory source is worked as Preceding remaining occupancy is more than or equal to the first threshold, and the default customization CPU current residuals occupancy is more than or waits When the Second Threshold, above step S102 is performed.
Because the default customization memory source and the default customization cpu resource are not only for processing the application Task, moreover it is possible to for processing the task of other application, therefore under normal circumstances, the default customization memory source and described pre- Setting cpu resource processed is can be occupied.In order to avoid taking the default customization memory source and described pre- because of the application Set the resource of cpu resource processed and cause other presetting showing for the appearance interim card of the other application run in customization resource As, therefore before above step S102 is performed, terminal device is it needs to be determined that whether default customization resource has enough resource energy The application is distributed to, if so, above step S102 is then directly performed, if it is not, then needing to discharge some just presetting The resource of the application run in resource processed, to cause to there are enough memory sources to be used for the application.How some are discharged just It is as described below in the resource of the application of running background.
In one embodiment, the above method also includes:
It is when the default customization memory source current residual occupancy is less than the first threshold and/or described presetting When CPU current residuals occupancy processed is less than the Second Threshold, release currently takes the default customization memory source and described The resource of at least one application of default customization cpu resource;And perform above step S102.
In one embodiment, the memory source of at least one application takes priority and is provided less than the internal memory of the application Source takes priority;Or, the memory source of at least one application takes priority and is less than the first pre-set priority.
In one embodiment, the cpu resource of at least one application takes cpu resource of the priority less than the application Take priority;Or, the cpu resource of at least one application takes priority and is less than the second pre-set priority.
In one embodiment, the above method also includes:
It is when the default customization memory source current residual occupancy is less than the first threshold and/or described presetting When CPU current residuals occupancy processed is less than the Second Threshold, task management interface is exported, the task management interface includes working as The preceding application for taking the default customization memory source and the default customization cpu resource;Detecting for the management field At least one of face application selection operation when, discharge it is described at least one application take it is described it is default customization memory source and The resource of the default customization cpu resource;And perform above step S102.
Wherein, terminal device output task management interface can be found in Fig. 2, and Fig. 2 shows currently to take in the default customization The application (taking the application of default customization resource) of resource and the default customization cpu resource is deposited, user can be by task pipe Reason interface is gone to choose the resource that user wants which application of release, such as want the resource of release application A, and A is applied in user's click Tick boxes chosen.It can be seen that, terminal device independently chooses needs by providing Visual Intelligent Interface Model, guiding user The application of release so that during user can participate directly in releasing memory resource, is conducive to raising user to use Convenience.In addition, the memory source of system application is discharged in order to avoid user, therefore in answering shown in the task management interface With being nonsystematic application.
S103, the terminal device call memory source and cpu resource for application distribution to complete the treatment Request.
It can be seen that, the memory source that the scheme that the present invention is provided has been previously set each application takes priority and cpu resource Take priority, it is follow-up when needing to perform the data processing task of application, according to the two parameters be using reasonable distribution resource, To cause that application there are enough resources to perform data processing task, and then shorten the response time of application.
The embodiment of the present invention additionally provides another more detailed method flow, as shown in figure 3, being applied to be provided with application Terminal device, including:
S301, when detect the treatment of data processing task of application ask when, the terminal device determines the application Whether it is default application.
If the application is default application, step S302 is performed.
If the application is not default application, any operation is not made.
The memory source that S302, the terminal device obtain the application takes priority and cpu resource occupancy priority.
Whether S303, the terminal device determine the default customization memory source current residual occupancy less than the first threshold Value, and determine whether the default customization CPU current residuals occupancy is less than Second Threshold.
If the default customization memory source current residual occupancy is more than or equal to the first threshold, and described pre- When setting CPU current residuals occupancy processed is more than or equal to the Second Threshold, then step S306 is performed.
If the default customization memory source current residual occupancy is less than the first threshold, and/or described presetting When CPU current residuals occupancy processed is less than the Second Threshold, then step S304 is performed.
S304, terminal device output task management interface, the task management interface are described pre- including currently taking The application of setting memory source processed and the default customization cpu resource.
S305, detect at least one of described administration interface application selection operation when, the terminal sets Standby release at least one application takes the resource of the default customization memory source and the default customization cpu resource.Hold The step S305 that gone performs step S306.
S306, the terminal device take priority by default customization memory source according to the memory source of the application Resource allocation gives the application, and takes priority by the resource of default customization cpu resource according to the cpu resource of the application Distribute to the application.
S307, the terminal device call memory source and cpu resource for application distribution to complete the treatment Request.
It should be noted that each step of method shown in Fig. 3 implements process reference can be made to described in the above method Implement process, no longer describe herein.
The embodiment of the present invention additionally provides a kind of resource management apparatus 400, as shown in figure 4, being applied to be provided with application Terminal device, including:
Acquisition module 401, for when the treatment of data processing task of application request is detected, obtaining the application Memory source takes priority and cpu resource takes priority;
Distribute module 402, for taking priority by default customization memory source according to the memory source of the application Resource allocation gives the application, and takes priority by the resource of default customization cpu resource according to the cpu resource of the application Distribute to the application;
Calling module 403, for calling memory source and cpu resource for application distribution to be asked to complete the treatment Ask.
In one embodiment, described device also includes:
Determining module 404, for determining the default customization memory source current residual occupancy whether less than the first threshold Value, and determine whether the default customization CPU current residuals occupancy is less than Second Threshold;
The distribute module 402 specifically for:When the default customization memory source current residual occupancy is more than or waits When the first threshold, and the default customization CPU current residuals occupancy are more than or equal to the Second Threshold, according to The memory source of the application takes priority by the resource allocation of default customization memory source to the application, and according to institute The cpu resource for stating application takes priority by the resource allocation of default customization cpu resource to the application.
In one embodiment, described device also includes:
First release module 405, for being less than described first when the default customization memory source current residual occupancy Threshold value, and/or the default customization CPU current residuals occupancy be less than the Second Threshold when, release currently take it is described pre- The resource of at least one application of setting memory source processed and the default customization cpu resource;
The distribute module 402 specifically for:Memory source according to the application takes priority by default customization The resource allocation of resource is deposited to the application, and priority is taken according to the cpu resource of the application and provide default customization CPU The resource allocation in source gives the application.
In one embodiment, described device also includes:
Output module 406, for being less than the first threshold when the default customization memory source current residual occupancy, And/or the default customization CPU current residuals occupancy be less than the Second Threshold when, export task management interface, described Business administration interface includes currently taking the application of the default customization memory source and the default customization cpu resource;
Second release module 407, for detecting the selection behaviour for the application of at least one of described administration interface When making, the resource that at least one application takes the default customization memory source and the default customization cpu resource is discharged;
The distribute module 402 specifically for:Memory source according to the application takes priority by default customization The resource allocation of resource is deposited to the application, and priority is taken according to the cpu resource of the application and provide default customization CPU The resource allocation in source gives the application.
In one embodiment, described device also includes:
The acquisition module 401 specifically for:When the application is for default application, the memory source of the application is obtained Take priority and cpu resource takes priority.
It should be noted that above-mentioned each module (acquisition module 401, distribute module 402, calling module 403, determining module 404th, the first release module 405, the release module 407 of output module 406 and second) for performing the correlation step of the above method. Such as, acquisition module 401 is used to perform above step S101, distribute module 402 for performing above step S102, calling module 403 are used to perform above step S103, etc..
In the present embodiment, resource management apparatus 400 are to present in modular form.Here " module " can refer to spy Determine application integrated circuit (application-specific integrated circuit, ASIC), perform one or more soft The processor and memory of part or firmware program, integrated logic circuit, and/or other can provide the device of above-mentioned functions.This Outward, above acquisition module 401, distribute module 402, calling module 403, determining module 404, the first release module 405, output mould The release module 407 of block 406 and second can be realized by the processor 501 shown in Fig. 5.
As shown in figure 5, terminal device 500 can be realized with the structure in Fig. 5, the terminal device 500 includes at least one Individual processor 501, at least one memory 502 and at least one communication interface 503.The processor 501 is by described logical Letter bus is connected and completes mutual communication with the memory 502 and communication interface 503 by the communication bus.
Processor 501 can be general central processor (CPU), microprocessor, ASIC (application-specific integrated circuit, ASIC), or one or more are for controlling above scheme journey The integrated circuit that sequence is performed.
Communication interface 503, for other equipment or communication, such as Ethernet, wireless access network (RAN), nothing Line LAN (Wireless Local Area Networks, WLAN) etc..
Memory 502 can be read-only storage (read-only memory, ROM) or can store static information and instruction Other kinds of static storage device, random access memory (random access memory, RAM) or letter can be stored Breath and the other kinds of dynamic memory, or EEPROM (Electrically of instruction Erasable Programmable Read-Only Memory, EEPROM), read-only optical disc (Compact Disc Read- Only Memory, CD-ROM) or other optical disc storages, laser disc storage (including compression laser disc, laser disc, laser disc, digital universal Laser disc, Blu-ray Disc etc.), magnetic disk storage medium or other magnetic storage apparatus or can be used in carrying or store with referring to The desired program code of order or data structure form simultaneously can be by any other medium of computer access, but not limited to this. Memory can be individually present, and be connected with processor by bus.Memory can also be integrated with processor.
Wherein, the memory 502 is used to store the application code for performing above scheme, and by processor 501 Control is performed.The processor 501 is used to perform the application code stored in the memory 502.
The code of the storage of memory 502 can perform the above-mentioned method for managing resource that terminal device provided above is performed, than Such as when detecting the treatment of data processing task of application and asking, obtain the application memory source take priority and Cpu resource takes priority;Memory source according to the application takes priority by the resource point of default customization memory source Applied described in dispensing, and priority is taken according to the cpu resource of the application and give the resource allocation of default customization cpu resource The application;Memory source and cpu resource for application distribution is called to complete the treatment request.
Fig. 6 is illustrated that the block diagram of the part-structure of the mobile phone related to terminal device provided in an embodiment of the present invention.Ginseng Fig. 6 is examined, mobile phone includes:Radio frequency (Radio Frequency, RF) circuit 910, memory 920, input block 930, display unit 940th, sensor 950, voicefrequency circuit 960, Wireless Fidelity (Wireless Fidelity, WiFi) module 970, processor 980, And the grade part of power supply 990.It will be understood by those skilled in the art that the handset structure shown in Fig. 6 is not constituted to mobile phone Limit, part more more or less than diagram can be included, or combine some parts, or different part arrangements.
Each component parts of mobile phone is specifically introduced with reference to Fig. 6:
RF circuits 910 can be used for the reception of information and transmission.Generally, RF circuits 910 include but is not limited to antenna, at least one Individual amplifier, transceiver, coupler, low-noise amplifier (Low Noise Amplifier, LNA), duplexer etc..Additionally, RF circuits 910 can also be communicated by radio communication with network and other equipment.Above-mentioned radio communication can use any communication Standard or agreement, including but not limited to global system for mobile communications (Global System of Mobile Communication, GSM), general packet radio service (General Packet Radio Service, GPRS), code division it is many Location (Code Division Multiple Access, CDMA), WCDMA (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), Email, Short Message Service (Short Messaging Service, SMS) etc..
Memory 920 can be used to store software program and module, and processor 980 is by running storage in memory 920 Software program and module, so as to perform various function application and the data processing of mobile phone.Memory 920 can mainly include Storing program area and storage data field, wherein, the application journey that storing program area can be needed for storage program area, at least one function Sequence etc.;Storage data field can be stored and use created data (the memory source occupancy priority such as applied according to mobile phone Cpu resource with application takes priority etc.) etc..Additionally, memory 920 can include high-speed random access memory, may be used also With including nonvolatile memory, for example, at least one disk memory, flush memory device or other volatile solid-states Part.
Input block 930 can be used to receive the numeral or character information of input, and produce with the user of mobile phone set with And the relevant key signals input of function control.Specifically, input block 930 may include fingerprint recognition module 931 and other are defeated Enter equipment 932.Fingerprint recognition module 931, can gather user's finger print data thereon.Except fingerprint recognition module 931, input Unit 930 can also include other input equipments 932.Specifically, other input equipments 932 can include but is not limited to touch-control One kind in screen, physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc. Or it is various.
Display unit 940 can be used for show by user input information or be supplied to user information and mobile phone it is various Menu.Display unit 940 may include display screen 941, optionally, can use liquid crystal display (Liquid Crystal Display, LCD), the form such as Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED) it is aobvious to configure Display screen 941.Although in Figure 5, fingerprint recognition module 931 and display screen 941 are to realize mobile phone as two independent parts Input and input function, but it is in some embodiments it is possible to fingerprint recognition module 931 is integrated and real with display screen 941 The input of existing mobile phone and playing function.
Mobile phone may also include at least one sensor 950, such as optical sensor, motion sensor and other sensors. Specifically, optical sensor may include ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to ambient light Light and shade adjust the brightness of display screen 941, proximity transducer can when mobile phone is moved in one's ear, close display screen 941 and/or Backlight.Used as one kind of motion sensor, (generally three axles) acceleration is big in the detectable all directions of accelerometer sensor It is small, size and the direction of gravity are can detect that when static, can be used to recognize application (such as horizontal/vertical screen switching, the phase of mobile phone attitude Close game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Be can also configure as mobile phone The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared ray sensor, will not be repeated here.
Voicefrequency circuit 960, loudspeaker 961, microphone 962 can provide the COBBAIF between user and mobile phone.Audio-frequency electric Electric signal after the voice data conversion that road 960 will can receive, is transferred to loudspeaker 961, and sound is converted to by loudspeaker 961 Signal is played;On the other hand, the voice signal of collection is converted to electric signal by microphone 962, is turned after being received by voicefrequency circuit 960 It is changed to voice data, then after voice data playback process device 980 is processed, through RF circuits 910 to be sent to such as another mobile phone, Or play to memory 920 so as to further treatment voice data.
WiFi belongs to short range wireless transmission technology, and mobile phone can help user's transceiver electronicses postal by WiFi module 970 Part, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and has accessed.Although Fig. 6 shows WiFi module 970, but it is understood that, it is simultaneously not belonging to must be configured into for mobile phone, can not change as needed completely Become in the essential scope of invention and omit.
Processor 980 is the control centre of mobile phone, using various interfaces and the various pieces of connection whole mobile phone, is led to Cross operation or perform software program of the storage in memory 920 and/or module, and call storage in memory 920 Data, perform the various functions and processing data of mobile phone, so as to carry out integral monitoring to mobile phone.Optionally, processor 980 can be wrapped Include one or more processing units;Preferably, processor 980 can integrated application processor and modem processor, wherein, should Operating system, user interface and application program etc. are mainly processed with processor, modem processor mainly processes radio communication. It is understood that above-mentioned modem processor can not also be integrated into processor 980.
Mobile phone also includes the power supply 990 (such as battery) powered to all parts, it is preferred that power supply can be by power supply pipe Reason system is logically contiguous with processor 980, so as to realize management charging, electric discharge and power managed by power-supply management system Etc. function.
Although not shown, mobile phone can also will not be repeated here including camera, bluetooth module etc..
In embodiment shown in 1~Fig. 3 of earlier figures, the structure that each step method flow can be based on the mobile phone is realized.
In embodiment shown in earlier figures 4, the structure that each unit function can be based on the mobile phone is realized.
The embodiment of the present invention also provides a kind of computer-readable storage medium, wherein, the computer-readable storage medium can be stored with journey Sequence, the part or all of step including any method for managing resource described in the above method embodiment when program is performed Suddenly.
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 present invention not by described by sequence of movement limited because According to the present invention, some steps can sequentially or simultaneously be carried out using other.Secondly, those skilled in the art should also know Know, embodiment described in this description belongs to preferred embodiment, involved action and module is not necessarily of the invention 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 described in detail in certain embodiment Point, 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 described unit is only one kind Division of logic function, can there is 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.It is another, it is shown or discussed each other Coupling or direct-coupling or communication connection can be the INDIRECT COUPLING or communication connection of device or unit by some interfaces, Can be electrical or other forms.
The unit that is illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit The part for showing can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be according to the actual needs selected to realize the mesh of this embodiment scheme 's.
In addition, during each functional unit in each embodiment of the invention can be integrated in a processing unit, it is also possible to It is that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.Above-mentioned integrated list Unit can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If the integrated unit is to realize in the form of SFU software functional unit and as independent production marketing or use When, can store in a computer-readable access to memory.Based on such understanding, technical scheme substantially or Person say the part or technical scheme contributed to prior art 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 used to so that a computer equipment (can be personal computer, server or network equipment etc.) performs all or part of each embodiment methods described of the invention 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 Completed with instructing the hardware of correlation by program, the program can be stored in a computer-readable memory, memory 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 invention is described in detail above, specific case used herein to principle of the invention and Implementation method is set forth, and the explanation of above example is only intended to help and understands the method for the present invention and its core concept; Simultaneously for those of ordinary skill in the art, according to thought of the invention, can in specific embodiments and applications There is change part, to sum up above-mentioned, this specification content should not be construed as limiting the invention.

Claims (11)

1. a kind of method for managing resource, it is characterised in that be applied to be provided with the terminal device of application, methods described includes:
When detecting the treatment of data processing task of application and asking, obtain the application memory source take priority and Cpu resource takes priority;
The resource allocation of default customization memory source is given the application by the memory source occupancy priority according to the application, with And priority is taken by the resource allocation of default customization cpu resource to the application according to the cpu resource of the application;
Memory source and cpu resource for application distribution is called to complete the treatment request.
2. method according to claim 1, it is characterised in that methods described also includes:
Whether the default customization memory source current residual occupancy is determined less than first threshold, and is determined described presetting Whether CPU current residuals occupancy processed is less than Second Threshold;
It is when the default customization memory source current residual occupancy is more than or equal to the first threshold and described presetting When CPU current residuals occupancy processed is more than or equal to the Second Threshold, the memory source according to the application takes priority The application is given by the resource allocation of default customization memory source, and will according to the cpu resource of application occupancy priority The resource allocation of default customization cpu resource gives the application.
3. method according to claim 2, it is characterised in that methods described also includes:
When the default customization memory source current residual occupancy is less than the first threshold, and/or the default customization CPU When current residual occupancy is less than the Second Threshold, release currently takes the default customization memory source and described presetting The resource of at least one application of cpu resource processed;
The resource allocation of default customization memory source is given the application by the memory source occupancy priority according to the application, with And priority is taken by the resource allocation of default customization cpu resource to the application according to the cpu resource of the application.
4. method according to claim 2, it is characterised in that methods described also includes:
When the default customization memory source current residual occupancy is less than the first threshold, and/or the default customization CPU When current residual occupancy is less than the Second Threshold, task management interface is exported, the task management interface includes currently accounting for With the application of the default customization memory source and the default customization cpu resource;
When the selection operation for the application of at least one of described administration interface is detected, at least one application is discharged Take the resource of the default customization memory source and the default customization cpu resource;
The resource allocation of default customization memory source is given the application by the memory source occupancy priority according to the application, with And priority is taken by the resource allocation of default customization cpu resource to the application according to the cpu resource of the application.
5. the method according to claim any one of 1-4, it is characterised in that the memory source of the acquisition application is accounted for Priority is taken with priority and cpu resource, including:
When the application is for default application, the memory source occupancy priority and cpu resource occupancy for obtaining the application are preferential Level.
6. a kind of resource management apparatus, it is characterised in that be applied to be provided with the terminal device of application, including:
Acquisition module, the internal memory money for when the treatment of data processing task of application request is detected, obtaining the application Source takes priority and cpu resource takes priority;
Distribute module, for taking priority by the resource allocation of default customization memory source according to the memory source of the application To the application, and priority is taken by the resource allocation of default customization cpu resource to institute according to the cpu resource of the application State application;
Calling module, for calling memory source and cpu resource for application distribution to complete the treatment request.
7. device according to claim 6, it is characterised in that described device also includes:
Determining module, for whether determining the default customization memory source current residual occupancy less than first threshold, and Determine the default customization CPU current residuals occupancy whether less than Second Threshold;
The distribute module specifically for:When the default customization memory source current residual occupancy is more than or equal to described the One threshold value, and the default customization CPU current residuals occupancy be more than or equal to the Second Threshold when, according to the application Memory source take priority by the resource allocation of default customization memory source to the application, and according to the application Cpu resource takes priority by the resource allocation of default customization cpu resource to the application.
8. device according to claim 7, it is characterised in that described device also includes:
First release module, for being less than the first threshold when the default customization memory source current residual occupancy, and/ Or the default customization CPU current residuals occupancy be less than the Second Threshold when, release currently take in the default customization Deposit the resource of at least one application of resource and the default customization cpu resource;
The distribute module specifically for:Memory source according to the application takes priority by default customization memory source Resource allocation gives the application, and takes priority by the resource of default customization cpu resource according to the cpu resource of the application Distribute to the application.
9. device according to claim 7, it is characterised in that described device also includes:
Output module, for being less than the first threshold, and/or institute when the default customization memory source current residual occupancy When stating default customization CPU current residuals occupancy less than the Second Threshold, task management interface, task management circle are exported Face includes currently taking the application of the default customization memory source and the default customization cpu resource;
Second release module, for when the selection operation for the application of at least one of described administration interface is detected, releasing Put the resource that at least one application takes the default customization memory source and the default customization cpu resource;
The distribute module specifically for:Memory source according to the application takes priority by default customization memory source Resource allocation gives the application, and takes priority by the resource of default customization cpu resource according to the cpu resource of the application Distribute to the application.
10. the device according to claim any one of 6-9, it is characterised in that
The acquisition module specifically for:When the application is for default application, the memory source occupancy for obtaining the application is excellent First level and cpu resource take priority.
11. a kind of terminal devices, it is characterised in that including processor, memory, communication interface and bus;
The processor is connected and completes mutual communication by the bus with the memory and the communication interface;
The memory storage executable program instructions, the processor is used to call the executable program generation in the storage Code, performs the method as described by any one of claim 1 to 5.
CN201611260650.5A 2016-12-30 2016-12-30 A kind of resource allocation methods and device Pending CN106776036A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611260650.5A CN106776036A (en) 2016-12-30 2016-12-30 A kind of resource allocation methods and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611260650.5A CN106776036A (en) 2016-12-30 2016-12-30 A kind of resource allocation methods and device

Publications (1)

Publication Number Publication Date
CN106776036A true CN106776036A (en) 2017-05-31

Family

ID=58953458

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611260650.5A Pending CN106776036A (en) 2016-12-30 2016-12-30 A kind of resource allocation methods and device

Country Status (1)

Country Link
CN (1) CN106776036A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107423123A (en) * 2017-07-25 2017-12-01 广东欧珀移动通信有限公司 Method for scheduling task, device, storage medium and electronic equipment
CN107436801A (en) * 2017-06-23 2017-12-05 努比亚技术有限公司 I/O resource regulating methods, terminal and computer-readable recording medium
CN107450984A (en) * 2017-07-25 2017-12-08 广东欧珀移动通信有限公司 Method for scheduling task, device, storage medium and electronic equipment
CN107479744A (en) * 2017-07-28 2017-12-15 广东欧珀移动通信有限公司 Adjust method, apparatus, terminal and the storage medium of touch-screen dispatching priority
CN107656811A (en) * 2017-09-12 2018-02-02 惠州Tcl移动通信有限公司 Mobile terminal and memory distribution control method and storage medium
CN107734186A (en) * 2017-10-31 2018-02-23 奇酷互联网络科技(深圳)有限公司 Method, equipment, mobile terminal and the computer-readable storage medium of prompting message
CN109343902A (en) * 2018-09-26 2019-02-15 Oppo广东移动通信有限公司 Operation method, device, terminal and the storage medium of audio processing components
CN109582447A (en) * 2018-10-15 2019-04-05 中盈优创资讯科技有限公司 Computational resource allocation method, task processing method and device
CN109857561A (en) * 2019-02-12 2019-06-07 武汉深之度科技有限公司 A kind of EMS memory management process and calculate equipment
CN109918193A (en) * 2019-01-11 2019-06-21 维沃移动通信有限公司 A kind of resource allocation methods and terminal device
CN111445213A (en) * 2020-03-31 2020-07-24 乌鲁木齐众维汇联信息科技有限公司 Network management system for incubation service of park enterprise
CN111597040A (en) * 2020-04-30 2020-08-28 中国科学院深圳先进技术研究院 Resource allocation method, device, storage medium and electronic equipment
CN113495789A (en) * 2020-04-08 2021-10-12 大唐移动通信设备有限公司 Memory allocation method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1770125A (en) * 2004-11-04 2006-05-10 华为技术有限公司 Memory allocation method
CN103257898A (en) * 2012-02-15 2013-08-21 北京邦天信息技术有限公司 Resource allocation method and system in embedded system
CN105591809A (en) * 2015-10-12 2016-05-18 杭州华三通信技术有限公司 Resource distribution method and device
CN105700879A (en) * 2016-01-11 2016-06-22 苏州三星电子电脑有限公司 Fast closing method and device of task window of notebook computer
CN105893142A (en) * 2015-12-31 2016-08-24 乐视移动智能信息技术(北京)有限公司 Resource distribution method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1770125A (en) * 2004-11-04 2006-05-10 华为技术有限公司 Memory allocation method
CN103257898A (en) * 2012-02-15 2013-08-21 北京邦天信息技术有限公司 Resource allocation method and system in embedded system
CN105591809A (en) * 2015-10-12 2016-05-18 杭州华三通信技术有限公司 Resource distribution method and device
CN105893142A (en) * 2015-12-31 2016-08-24 乐视移动智能信息技术(北京)有限公司 Resource distribution method and device
CN105700879A (en) * 2016-01-11 2016-06-22 苏州三星电子电脑有限公司 Fast closing method and device of task window of notebook computer

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
THE MICRIΜM USB TEAM著: "《嵌入式协议栈μC/USB-Device》", 30 September 2015, 北京航空航天大学出版社 *
王正友 等主编: "《计算机应用基础实验指导》", 30 September 2013, 中国铁道出版社 *

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107436801A (en) * 2017-06-23 2017-12-05 努比亚技术有限公司 I/O resource regulating methods, terminal and computer-readable recording medium
CN107423123A (en) * 2017-07-25 2017-12-01 广东欧珀移动通信有限公司 Method for scheduling task, device, storage medium and electronic equipment
CN107450984A (en) * 2017-07-25 2017-12-08 广东欧珀移动通信有限公司 Method for scheduling task, device, storage medium and electronic equipment
CN107479744A (en) * 2017-07-28 2017-12-15 广东欧珀移动通信有限公司 Adjust method, apparatus, terminal and the storage medium of touch-screen dispatching priority
CN107479744B (en) * 2017-07-28 2021-02-02 Oppo广东移动通信有限公司 Method, device, terminal and storage medium for adjusting scheduling priority of touch screen
CN107656811A (en) * 2017-09-12 2018-02-02 惠州Tcl移动通信有限公司 Mobile terminal and memory distribution control method and storage medium
CN107734186A (en) * 2017-10-31 2018-02-23 奇酷互联网络科技(深圳)有限公司 Method, equipment, mobile terminal and the computer-readable storage medium of prompting message
CN109343902A (en) * 2018-09-26 2019-02-15 Oppo广东移动通信有限公司 Operation method, device, terminal and the storage medium of audio processing components
CN109343902B (en) * 2018-09-26 2021-08-03 Oppo广东移动通信有限公司 Audio processing assembly operation method and device, terminal and storage medium
CN109582447B (en) * 2018-10-15 2020-09-29 中盈优创资讯科技有限公司 Computing resource allocation method, task processing method and device
CN109582447A (en) * 2018-10-15 2019-04-05 中盈优创资讯科技有限公司 Computational resource allocation method, task processing method and device
CN109918193A (en) * 2019-01-11 2019-06-21 维沃移动通信有限公司 A kind of resource allocation methods and terminal device
CN109857561A (en) * 2019-02-12 2019-06-07 武汉深之度科技有限公司 A kind of EMS memory management process and calculate equipment
CN109857561B (en) * 2019-02-12 2021-03-26 武汉深之度科技有限公司 Memory management method and computing device
CN111445213A (en) * 2020-03-31 2020-07-24 乌鲁木齐众维汇联信息科技有限公司 Network management system for incubation service of park enterprise
CN113495789A (en) * 2020-04-08 2021-10-12 大唐移动通信设备有限公司 Memory allocation method and device
CN113495789B (en) * 2020-04-08 2024-02-13 大唐移动通信设备有限公司 Memory allocation method and device
CN111597040A (en) * 2020-04-30 2020-08-28 中国科学院深圳先进技术研究院 Resource allocation method, device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN106776036A (en) A kind of resource allocation methods and device
CN104243671B (en) Volume adjusting method, device and electronic equipment
CN106055408B (en) A kind of application control method and mobile terminal
CN107302628B (en) Application function control method and related product
CN106095489B (en) A kind of application control method and mobile terminal
CN107766139B (en) Application management method and device
CN106126176A (en) A kind of audio collocation method and mobile terminal
CN106776038A (en) A kind of popular application resource allocation methods and mobile terminal
CN106484326B (en) A kind of data transmission processing method and mobile terminal
CN104077184B (en) A kind of course control method and computer system of application program
CN107634962A (en) The management method and Related product of network bandwidth
CN106775828A (en) Application program installation method and device, computer equipment
CN103491240B (en) A kind of alarm clock ringing method, device and mobile terminal
CN107153576A (en) The distribution method and terminal device of a kind of memory source
CN106155557A (en) A kind of virtual key display packing and mobile terminal
CN106200970A (en) A kind of method of split screen display available and terminal
CN103491421B (en) Content displaying method, device and intelligent television
CN107066324A (en) A kind of control method and equipment of finger prints processing resource
CN106776040A (en) A kind of resource allocation methods and device
CN103200077B (en) The method of data interaction during a kind of voice call, Apparatus and system
CN106815079A (en) The method and mobile terminal of a kind of popular application control
CN106066814B (en) A kind of application control method and mobile terminal
CN110032430A (en) Applied program processing method and device, electronic equipment, computer readable storage medium
CN106951223A (en) Method and terminal that a kind of desktop is shown
CN106227542A (en) A kind of screen locking magazine content is play and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170531