CN109600409A - The method for managing resource and terminal of application - Google Patents
The method for managing resource and terminal of application Download PDFInfo
- Publication number
- CN109600409A CN109600409A CN201710940872.XA CN201710940872A CN109600409A CN 109600409 A CN109600409 A CN 109600409A CN 201710940872 A CN201710940872 A CN 201710940872A CN 109600409 A CN109600409 A CN 109600409A
- Authority
- CN
- China
- Prior art keywords
- terminal
- application
- resource
- file
- module
- 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
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1074—Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
-
- 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/5011—Allocation 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/5022—Mechanisms to release resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5038—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/565—Conversion or adaptation of application format or content
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the present application provides the method for managing resource and terminal of application, can there are the resources of the application of file transport behavior in running background application in management terminal.This method comprises: terminal determines target application, wherein target application is in terminal running background, and there are the applications of file transport behavior;Terminal adjusts the resource in the application of terminal front stage operation and/or the application of running background under the premise of guaranteeing the resource of target application process.
Description
Technical field
This application involves the method for managing resource and terminal of field of communication technology, more particularly to application.
Background technique
For user when using foreground application, running background applies executable file transformation task.As shown in Figure 1, it is assumed that
User starts the first application at the T1 moment, and carries out file transmission in the first application, when document size to be transmitted is larger, uses
Family can use other applications while pending file transmits, for example, starting the second application at the T2 moment, open at the Tn moment
Dynamic third application, it is assumed that third applies the application shown for current interface, then the first application and the second application become running background
Application, first apply continuing from the background file transmission.When system resource deficiency, the operating system of terminal can selectivity
The application or service for clearing up backstage, may cause backstage, there are the first applications of file transmission to be cleaned.
In general, terminal can provide file transmitting function in a manner of built-in system service for application, to guarantee each text
Part transformation task executes completion, for example, the download management (download manager) or iOS in the operating system of Android
NSURL Session.However, existing many application selections voluntarily realize that file transmission task, terminal can not identify never call
It whether there is file transport behavior in the application of these built-in system services, thus cannot be to there are the applications of file transport behavior
Implement targetedly resource management.
Currently, mainly thering is the interaction of network packet to confirm using there may be file transport behaviors by the application of terminal.So
And, on the one hand, there is also the transmitting-receiving of network packet in the case where browser reading generic web page, exist the general network row of application
To be mistakenly identified as file transport behavior;On the other hand, it can't detect network packet when network rate is serious compared with slow or Network Packet Loss
There is the case where file transport behavior that can not identify application in transmitting-receiving.
Therefore, how there are the resources of the application of file transport behavior in running background application in management terminal, are current
Urgent problem to be solved.
Summary of the invention
The method for managing resource and terminal for the application that embodiments herein provides, so that terminal can be with after in management terminal
There are the resources of the application of file transport behavior in platform operation application.
In order to achieve the above objectives, embodiments herein adopts the following technical scheme that
On the one hand, a kind of method for managing resource of application is provided, this method comprises: terminal determines target application, wherein should
Target application is in the terminal running background, and there are the application of file transport behavior, which is guaranteeing the target application
Process resource under the premise of, adjust the terminal front stage operation application and/or running background application resource.This
The method for managing resource for applying for the application that embodiment provides can make terminal that can answer with management objectives by determining target application
With the resource with other application, the wasting of resources is avoided, and then improves the user's body when using terminal carries out file transmission
It tests.
In a kind of possible implementation, which meets any one in the following conditions
Part: the connection established with server includes that at least one length connects, and connects in duration at least one length connection first
Any one length connection on the flow that transmits be more than first threshold;It is established at least by standard file transfer protocols and server
One connection, and the flow transmitted in any one connection in the second connection duration at least one connection is more than second
Threshold value;Connection is established by hypertext transfer protocol http protocol or Hyper text transfer security protocol HTTPS agreement and server,
And the size for transmitting file is more than third threshold value greatly.Based on the program, terminal can be by above several condition judgement applications
No is that there are the applications of file transport behavior, so that terminal can more accurately adjust the money of the application run in terminal
Source avoids the application accidentally cleaning that file transport behavior will be present.
In a kind of possible implementation, it is more than third threshold value that terminal, which determines that the size of transmission file is greater than webpage size,
It include: that the terminal obtains response message, wherein the response message is the response message that the terminal to server is sent, or service
The response message that device is sent to the terminal;The terminal determines the size of transmission file according to the response message;The terminal determines should
Whether the size for transmitting file is more than the third threshold value.Based on the program, the size of transmission file can be determined whether more than the
Three threshold values.
In a kind of possible implementation, terminal determines the size of transmission file according to response message, comprising: the terminal root
The size for the transmission file that the response message carries is obtained according to the first instruction;Alternatively, the terminal is carried according to the response message
Second indicate to determine the size that the data block transmitted is accumulative in the response message, wherein second instruction is used to indicate this and answers
Answering message is block transmission mode.It is detected by terminal and connection, terminal detection is established using http protocol using with server
The response message that server is sent obtains the size of transmission file according to the first instruction, when server or terminal are using HTTP association
The block transmission mode of view, terminal is by determining that the data block of transmission adds up the size that size obtains transmission file, so as to root
Determine that application whether there is file transport behavior according to the size of transmission file, and then the resource for the application of terminal reasonable management provides
Foundation.
In a kind of possible implementation, terminal obtains response message, comprising: the terminal parses point in connection object and obtains
And parse the response message;Wherein, if application establishes connection by http protocol and server, which parses point
Between HTTP layers and transmission control protocol layer TCP layer;Alternatively, if application establishes connection by HTTPS agreement and server,
Connection object parsing point is between HTTP layers and Secure Socket Layer/SSL/TLS layers of secure transport layers.Based on the program, eventually
The size of transmission file can be obtained in connection object parsing point by holding, and judge the application of running background with the presence or absence of file for terminal
Transport behavior provides foundation.If using http protocol using the connection established with server, terminal passes through in TCP layer and HTTP layers
Between parse response message, if using the connection established with server use HTTPS agreement, terminal by SSL/TLS layer with
Response message is obtained and decrypted between HTTP layers, to obtain the size of transmission file.
In a kind of possible implementation, standard file transfer protocols are that File Transfer Protocol File Transfer Protocol, peer-to-peer network are assisted
Discuss P2P agreement, Simple Mail Transfer protocol smtp protocol, Post Office Protocol 3 POP3 agreement or Mail Access Protocol IMAP
Agreement.Based on the program, if in terminal using at least one of above-mentioned agreement, terminal can determine application in exists
Target application.
In a kind of possible implementation, the application in the application and/or running background of terminal front stage operation is adjusted
Resource includes: if it is determined that being front stage operation when applying the resource of distribution less than four threshold values, cleaning is in addition to the target application
At least one running background application;Or, however, it is determined that when the assignable resource of the terminal is greater than or equal to five threshold values, weight
Newly distribute the resource of currently running application in the terminal.Based on the program, however, it is determined that for the money of the application distribution of front stage operation
When source is less than four threshold values, if terminal when determining that assignable resource is greater than or equal to four threshold values, thus in terminal
Using dynamic adjustresources, therefore resource can be increased for target application so that file transmission task is completed as early as possible, thus
Improve user experience.
In a kind of possible implementation, the adjustment is in the application of the terminal front stage operation and/or answering for running background
Resource further include: if the terminal detects the cleaning operation instruction of user's triggering, instructed in response to the cleaning operation, the end
Whether end display clears up the first display interface of the target application;Detect the first behaviour that user triggers in first display interface
It instructs, in response to first operational order, at least one running background of the terminal cleaning in addition to the target application is answered
With, wherein the target application is not cleared up in first operational order instruction.Based on the program, what terminal can be triggered by user
Cleaning operation instructs the first display interface for showing to user and whether clearing up target application, when terminal detects that user is aobvious first
When showing the cleaning operation of interface triggering, terminal can clear up the application of at least one running background in addition to the target application,
To provide better experience in the resource of terminal adjustment application for user.
In a kind of possible implementation, the adjustment is in the application of the terminal front stage operation and/or answering for running background
Resource further include: if the terminal detects the second operational order of user's triggering, in response to second operational order, the end
The second display interface of end display, second operation instruction redistribute the resource of currently running application in the terminal;It detects
The third operational order that user triggers in second display interface, the terminal redistribute currently running application in the terminal
Resource, the third operational order are designated as currently running allocated resources in the terminal.Based on the program, terminal can lead to
The resource for redistributing currently running application in the terminal for crossing user's triggering, when terminal detects that user shows boundary second
When the third operational order of face triggering, terminal can be implemented as currently running allocated resources in the terminal, thus at end
Better experience is provided when the resource of end adjustment application for user.
In a kind of possible implementation, the resource of currently running application in terminal is redistributed, comprising: according to deserving
The application of preceding operation determines the first weight factor of currently running application in the terminal with the presence or absence of file transport behavior;According to
Whether the currently running application is the second weight factor that foreground application determines currently running application in the terminal;According to this
First weight factor of currently running application and the second weight factor of the currently running application determine that this is currently running
The resource allocation weight of application;According to the resource allocation weight of the currently running application be at least one this currently running answer
With distribution resource.The method for managing resource of application provided by the embodiments of the present application, by determining each application run in terminal
The first weight factor and the second weight factor, and then can be with by the first weight factor of each application and the second weight factor
The resource allocation weight of each application run in the terminal is determined, so as to according to the resource allocation weight pipe of target application
Manage the resource of target application.
In a kind of possible implementation, terminal under the premise of not reducing the stock number of process of target application, alternatively,
Terminal adjusts the application in terminal front stage operation under the premise of the resource location that the process for not changing target application currently occupies
And/or the resource of the application of running background.Based on the program, can to avoid applying when redistributing resource caused by apply
Pause bring poor user experience the problem of.
In a kind of possible implementation, third operational order instruction is not cleared up the target application and specifically included: this
The instruction of one operational order do not change redistributed under the premise of the target application currently occupies the position of resource it is current in the terminal
The resource of the application of operation.Wherein, the resource object application of terminal selection other positions increases resource.
Another aspect provides a kind of terminal, which has the function of realizing terminal behavior in the above method.The function can
Corresponding software realization can also be executed by hardware by hardware realization.The hardware or software include it is one or more with
The corresponding module of above-mentioned function.
Another aspect provides a kind of terminal, comprising: processor, memory and communication interface;The memory is based on storing
Calculation machine executes instruction, and when the terminal operating, which executes the computer executed instructions of memory storage, so that
Terminal executes the method for managing resource of the application of above-mentioned various aspects.
Another aspect, the embodiment of the present application provide a kind of computer readable storage medium, the computer-readable storage medium
Instruction is stored in matter, when run on a computer, so that computer executes the resource management of the application of above-mentioned various aspects
Method.
Another aspect, the embodiment of the present application provide a kind of computer program product comprising instruction, when it is in computer
When upper execution, so that computer executes the method for managing resource of the application of above-mentioned various aspects.
In addition, technical effect brought by any design method can be found in the money of above-mentioned application in above-mentioned apparatus embodiment
Technical effect brought by different designs mode in power supply management method embodiment, details are not described herein again.
These aspects or other aspects of the application can more straightforward in the following description.
Detailed description of the invention
Fig. 1 is a kind of user starts application time diagram provided by the embodiments of the present application;
Fig. 2 is a kind of terminal schematic diagram provided by the embodiments of the present application;
Fig. 3 is a kind of method for managing resource flow diagram of application provided by the embodiments of the present application;
Fig. 4 is a kind of parsing response message schematic diagram provided by the embodiments of the present application;
Fig. 5 is another parsing response message schematic diagram provided by the embodiments of the present application;
Fig. 6 is a kind of display interface schematic diagram of terminal provided by the embodiments of the present application;
Fig. 7 is display interface schematic diagram that is provided by the embodiments of the present application and planting terminal;
Fig. 8 is the display interface schematic diagram of another terminal provided by the embodiments of the present application;
Fig. 9 is the display interface schematic diagram of another terminal provided by the embodiments of the present application;
Figure 10 is a kind of interface schematic diagram of terminal distribution resource provided by the embodiments of the present application;
Figure 11 is that a kind of terminal provided by the embodiments of the present application clears up running background application schematic diagram;
Figure 12 is that a kind of terminal provided by the embodiments of the present application is current application distribution resource schematic diagram;
Figure 13 is a kind of structural schematic diagram of terminal provided by the embodiments of the present application;
Figure 14 is a kind of structural schematic diagram of terminal provided by the embodiments of the present application.
Specific embodiment
It should be noted that "/" herein indicate or the meaning, for example, A/B can indicate A or B;Herein
"and/or" is only a kind of incidence relation for describing affiliated partner, indicates may exist three kinds of relationships, for example, A and/or B, it can
To indicate: individualism A exists simultaneously A and B, these three situations of individualism B." multiple " refer to two or more.
It should be noted that in the embodiment of the present application, " illustrative " or " such as " etc. words make example, example for indicating
Card or explanation.Be described as in the embodiment of the present application " illustrative " or " such as " any embodiment or design scheme do not answer
It is interpreted than other embodiments or design scheme more preferably or more advantage.Specifically, " illustrative " or " example are used
Such as " word is intended to that related notion is presented in specific ways.
It should be noted that in the embodiment of the present application, " (of) ", " corresponding (corresponding, relevant) "
" corresponding (corresponding) " can be used with sometimes, it is noted that when not emphasizing its difference, table
The meaning reached is consistent.
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application is described.
As shown in Fig. 2, being a kind of hardware structure diagram of terminal 200 provided by the embodiments of the present application, comprising: memory 201,
Other input equipments 202, display screen 203, sensor 204, voicefrequency circuit 205, input/output (input/output, I/O)
The components such as system 206, processor 207 and power supply 208.
It should be noted that the structure of terminal 200 shown in Figure 2 does not constitute the restriction to equipment, it may include ratio
More or fewer components are illustrated, certain components is perhaps combined and perhaps splits certain components or different component layouts.It can
With the combination of hardware, software or the hardware and software comprising one or more signal processing and/or specific integrated circuit
To realize various parts shown in Fig. 2.In addition, display screen 203 belongs to user interface (user interface, UI), and terminal
200 may include than illustrating more or less user interface.
It should be noted that terminal provided by the embodiments of the present application can support one or more application in applying below
Etc various applications: contact application, phone application, video conference application, e-mail, instant message are answered
With, voice memo application, camera application, image management application, video player application, music player application, browsing
Device application, calendar application, shopping application, game application, text processing application or demonstration application etc..
It is specifically introduced below with reference to each component parts of the Fig. 2 to terminal 200:
Memory 201 can be used for storing software program and module, and processor 207 is stored in memory 201 by operation
In software program and module, thereby executing the various function application and data processing of terminal 200.Memory 201 can wrap
Containing one or more computer readable storage mediums.Memory 201 includes storing program area and storage data area, wherein storage
Program area can application program needed for storage program area, at least one function (for example, sound-playing function, image play function
Energy is equal) etc.;Storage data area, which can be stored, uses created data (for example, audio data, phone directory etc.) according to terminal 200
Deng.In addition, memory 201 may include high-speed random access memory, it can also include nonvolatile memory, for example, at least
One disk memory, flush memory device or other volatile solid-state parts.Optionally, memory 201 can be used for storing
Operating system 217, communication module 218, contact/mobile module 219, figure module 220, attachment editor module 221, text input
Module 222, global positioning system (global positioning system, GPS) module 223, file transport behavior detect mould
Block 224, resources detection module 225, resource cleaning modul 226, the software program of resource distribution module 227;Memory 201 may be used also
To store the software program of at least one following application, it may include contact module 228, phone module 229, video conference module
230, email client module 231, instant message module 232, voice memo module 233, camera module 234, figure
As management module 235, video player module 236, musical player module 237, browser module 238, calendaring module 239,
Shopping module 240, game module 241, word processing module 242 and demonstration module 243, can also store including weather widget
244, calculator widget 245 and/or dictionary widget 246 etc. are applied.
Other input equipments 202 can be used for receiving the number or character information of input, and generate the user with terminal 200
Setting and the related key signals input of function control.Specifically, other input equipments 202 may include but be not limited to secondary or physical bond
Disk, function key (for example, volume control button, switch key etc.), trace ball, mouse, operating stick, (light mouse is not show to light mouse
The touch sensitive surface visually exported, or the extension of touch sensitive surface formed by touch screen) etc. one of or it is more
Kind.Other input equipments 202 are connected with other input device controls devices 202 of I/O subsystem 206, in other input equipments
Signal interaction is carried out with processor 207 under the control of controller 209.
Display screen 203 includes display panel 214 and touch panel 215.Wherein, touch panel 215, also referred to as touch screen,
Touch-sensitive screen etc. collects the on it or neighbouring contact of user or Touchless manipulation (for example, user uses finger, stylus etc.
The operation of any suitable object or attachment on touch panel 215 or near touch panel 215 also may include body-sensing behaviour
Make;The operation includes the action types such as single-point control operation, 210 work of multiparty control behaviour), and driven according to preset formula
Corresponding attachment device.Optionally, touch panel 215 may include both touch detecting apparatus and touch controller.Wherein,
Touch detecting apparatus detects touch orientation, the posture of user, and detects touch operation bring signal, transmits a signal to touch
Controller;Touch controller receives touch information from touch detecting apparatus, and is converted into the letter that processor is capable of handling
Breath, then processor 207 is given by I/O subsystem 206, and the life that processor 207 is sent can be received by I/O subsystem 206
It enables and is executed.Furthermore, it is possible to realize touch-control using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves
Panel 215 can also realize touch panel 215 using any technology of future development.Further, touch panel 215 can cover
Lid display panel 214, user can (the display content includes but is not limited to soft key according to the content that display panel 214 is shown
Disk, virtual mouse, virtual key, icon etc.), on the touch panel 215 covered on display panel 214 or nearby carry out
Operation, after touch panel 215 detects operation on it or nearby, by I/O subsystem 206 send to processor 207 with
It determines that user inputs, is followed by subsequent processing device 207 and is provided on display panel 214 accordingly according to user's input by I/O subsystem 206
Visual output.
It should be noted that, although touch panel 215 and display panel 214 are as two independent components in Fig. 2
Realize the function that outputs and inputs of terminal 200, but in some embodiments it is possible to by touch panel 215 and display panel
The 214 integrated functions that output and input to realize terminal 200, the embodiment of the present application are not especially limited this.
Terminal 200 may also include at least one sensor 204, such as optical sensor, motion sensor and other sensings
Device.Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment
The light and shade of light adjusts the brightness of display panel 214, combines with camera module 234, optical sensor can capture static
Image or video.Optionally, optical sensor is located at behind the terminal 200 opposite with the display screen 203 before equipment, so that
It obtains display screen 203 and is used as the view finder obtained for static and/or video image.Optionally, optical sensor is located at eventually
Before end 200, so that carrying out video council while watching other video conference participants on display screen 203 in user
Discuss and obtain the image of user.The position of optical sensor can be changed by user (for example, by the lens in slewing shell
And sensor), so that optical sensor can be used together with display screen 203 with video conference module 230, to be used for video
Meeting and static and/or video image obtain.Proximity sensor can close display panel 214 when terminal 200 is moved in one's ear
And/or backlight.As a kind of motion sensor, accelerometer sensor can detect (generally three axis) acceleration in all directions
Size, can detect that size and the direction of gravity when static, can be used to identify the application of equipment posture, (such as horizontal/vertical screen is cut
Change, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Also as terminal 200
The other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared sensor, details are not described herein.
Optionally, terminal 200 can also include radio frequency (radio frequency, RF) circuit 216.RF circuit 216 can be used
In receive and send messages or communication process in, signal sends and receivees;In general, RF circuit include antenna, amplifier, transceiver,
Coupler, low-noise amplifier, duplexer etc..In addition, RF circuit 216 can also by wireless communication with network and other set
Standby communication.Any communication standard or agreement, including but not limited to global system for mobile communications can be used in the wireless communication
(global System of mobile communication, GSM), CDMA (code division multiple
Access, CDMA), general packet radio service (general packet radio service, GPRS), wideband code division multiple access
(wideband code division multiple access, WCDMA), long term evolution (long term evolution,
LTE), Email, short message service (short messaging service, SMS) etc..
Voicefrequency circuit 205, loudspeaker 212 and microphone 213 can provide the audio interface between user and terminal 200.Sound
Signal after the audio data received conversion can be transferred to loudspeaker 212, be converted to sound by loudspeaker 212 by frequency circuit 205
Sound signal output;On the other hand, the voice signal of collection is converted to signal by microphone 213, and signal is received by voicefrequency circuit 205
After be converted to audio data, then audio data is exported to RF circuit 216 to be sent to another equipment, or audio data is defeated
Out to memory 201 to be further processed.
I/O subsystem 206 is used to control the external equipment of input and output, including other input device controls devices 209, sensing
Device controller 210, display controller 211.Optionally, other one or more input device controls devices 209 are set from other inputs
Standby 202 receive signal and/or send signal to other input equipments 202.Display controller 206 in I/O subsystem 206 from
Display screen 203 receives signal and/or sends signal to display screen 203.After display screen 203 detects user's input, display control
User's input that device 206 processed will test is converted to and is shown in the interaction of the user interface object on display screen 203, that is, realizes
Human-computer interaction.Sensor controller 210 can from one or more sensor 204 receive signal and/or to one or
Multiple sensors 204 send signal.
Processor 207 is the control centre of terminal 200, utilizes each of various interfaces and the entire terminal 200 of connection
Part by running or execute the software program and/or module that are stored in memory 201, and calls and is stored in memory
Data in 201 execute the various functions and processing data of terminal 200, to carry out integral monitoring to terminal 200.Optionally,
A storage unit can be set for more smooth processing speed, inside processor 207, the storage unit is for storing various behaviour
It instructs and is called for processor 207.Optionally, processor 207 may include one or more processing units;Optionally, processor
207 can integrate application processor and modem processor, wherein the main processing operation system of application processor, user interface
With application program etc., modem processor mainly handles wireless communication.It is understood that above-mentioned modem processor
It can not be integrated into processor 207.
Terminal 200 further includes the power supply 208 (for example, battery) powered to all parts, and optionally, power supply can pass through electricity
Management system and processor 207 are logically contiguous, to realize management charging, electric discharge and power consumption by power-supply management system
Etc. functions.Although being not shown, terminal 200 can also include camera, bluetooth, Menu key etc., and details are not described herein.
In the following, being briefly described in conjunction with all parts in terminal 200 to the modules stored in memory 201:
Operating system 217 includes for controlling and managing general system task (for example, memory management, storage equipment control
System, electrical management etc.) various software components and/or driver, and be conducive to logical between various hardware and software components
Letter.
Communication module 218 via one or more outside ports and other equipment communication, and also comprising for handling
By RF circuit 216 and/or the various software components of the received data of outside port.
Contact/mobile module 219 is detectable sensitive with display screen 203 (being combined with display controller 211) and other touches
The contact of equipment (for example, touch tablet).Optionally, contact/mobile module 219 and display controller 211 can be in conjunction with detection touchings
Contact in template.
Figure module 220 includes for the various known soft of figure to be presented and shown on touch screen or other displays
Part component.Wherein, " figure " includes that can be shown to any object of user, including but not limited to text, webpage, icon (such as
User interface object comprising soft key), digital picture, video and animation etc..Optionally, the storage of figure module 220 indicates to make
The data of figure.Figure module 220 receives one or more codes from application etc., and the code regulation is if necessary
The figure to be display together with coordinate data and other graphic attribute data, and then generate output to display controller 211
Screen image data.
Text input module 222 can be the component of figure module 220, provide for applying various (for example, contact person
Module 228, email client module 231, instant message module 232, browser module 238 and times for needing text input
What other application) in key in the soft keyboard of text.
GPS module 223 can be used for determining the position of terminal 200 and provide the information in various applications (for example,
Phone module 229 is supplied to be used for location-based during dialing, be supplied to camera module 234 as picture/video element number
According to the application with the offer location based service for being supplied to map/navigation etc).
File transport behavior detection module 224 can be used to identify the application in terminal with the presence or absence of file transport behavior.It can
Choosing, file transmission includes file upload and file download.For example, user passes through clicks download link in a browser, or
By the uniform resource locator (uniform resource locator, URL) for inputting file to be downloaded in downloading software
Address can star file download task.
Resources detection module 225 can be used for detecting remaining money in the resource service condition and terminal of each application in terminal
Source situation.
Resource cleaning modul 226 be used for clear up run in terminal application or service, can with resources detection module 225 and/
Or file transport behavior detection module 224 is used in combination.
Resource distribution module 227 is used to be each various resources using in distribution terminal.Optionally, the embodiment of the present application
In resource include CPU, memory or network bandwidth of terminal etc., it should be noted that may also include it in the embodiment of the present application
His resource, for the assignable resource type of resource distribution module 227, the embodiment of the present application is not especially limited.
Using may include with lower module (or multiple groups instruction) or their subset or superset: contact module 228 (can also claim
For address book or contacts list);Phone module 229;Video conference module 230;Email client module 231;Immediately
Message module 232;Voice memo module 233;For shooting static and/or video image camera module 234;Image tube
Manage module 235;Video player module 236;Musical player module 237;Browser module 238;Calendaring module 239;Shopping
Module 240, game module 241, word processing module 242, demonstration module 243 and weather widget 244, calculator widget
245 and/or dictionary widget 246 etc..
Contact module 228 can provide telephone number or e-mail address, and contact module 228 can be with display screen
203, display controller 211, contact/mobile module 219, figure module 220 and text input module 222 combine.User can be with
Using 228 management address of contact module is thin or contacts list, or combine phone module 229, video conference module 230,
Email client module 230 or instant message module 231 use contact module etc..
Phone module 229 can be used for keying in a series of characters corresponding with telephone number, access in contact module 228
One or more telephone numbers, modification keyed in telephone number, to corresponding phone number dial, carry out call and complete
It disconnects or hangs up when at call.Phone module 229 can be with RF circuit 216, voicefrequency circuit 205, loudspeaker 212, microphone
213, display screen 203, display controller 206, contact/mobile module 219, figure module 220 and/or text input module 222
In conjunction with.
Video conference module 230 can be used for starting, carry out and terminate between user and one or more of the other participant
Video conference.Video conference module 230 can be with RF circuit 216, voicefrequency circuit 205, loudspeaker 212, microphone 213, aobvious
Display screen 203, display controller 206, optical sensor, optical sensor controller, contact/mobile module 219, figure module
220, text input module 222, contact module 228 and/or phone module 229 combine.
Email client module 231 can be used for creation, send, receives and manage Email.Email visitor
Family end module 231 can be with RF circuit 216, display screen 203, display controller 206, contact/mobile module 219, figure module
220 and/or text input module 222 combine.Email client module 231 is combined with image management module 235, can be made
It must create and send to have and become very easy by static or video image the Email that camera module 234 is shot.
Instant message module 232 can be used for a series of key entry characters corresponding with instant message, modification has previously entered
Character, the corresponding instant message of transmission are (for example, use SMS or multimedia messaging service for the instant message based on phone
(multimedia messaging service, MMS) agreement uses expanding for the instant message based on internet
Exhibition communication and presentation protocol (extensible messaging and presence protocol, XMPP), simple agreement
(session initiation protocol for instant messaging and presence leveraging,
SIMPLE) or instant messaging and the service of status information (instant messaging presence services, IMPS)),
It receives instant message and watches the instant message received.Instant message module 232 can with RF circuit 216, display screen 203,
Display controller 206, contact/mobile module 219, figure module 220 and/or text input module 222 combine;It needs to illustrate
It is that transmission and/or received instant message may include figure, photo, audio file, video file and/or other attachmentes.Immediately
Message refer to the message (for example, the message sent using SMS or MMS) based on phone and the message based on internet (for example,
The message sent using XMPP, SIMPLE or IMPS).
Voice memo module 233 can be used for the sound for recording speech, controlled dictation, telephone talk, session, performance etc.
Frequently, and in Email or instant message send the audio.Voice memo module 233 and RF circuit 216, display screen
203, display controller 206, contact/mobile module 219, figure module 220, text input module 222, email client
Module 231 and/or instant message module 232 combine.
Camera module 234 can be used for capturing still image or video (comprising video flowing), camera module 234 and aobvious
Display screen 203, display controller 206, optical sensor (one or more), optical sensor controller, contact/mobile module
219, figure module 220 and/or image management module 235 combine, and store them in memory 201, modify it is static
The characteristic of image or video, or static image or video are deleted from memory 201.
Image management module 235 can be used for configuration, modification (for example, editor) or in addition operate, mark, delete, present
(for example, in a manner of digital slide show or photograph album) and store static and/or video image.Image management module 235
With display screen 203, display controller 206, contact/mobile module 219, figure module 220, text input module 222 and/or photograph
Camera model 234 combines.
Video player module 236 can be used for display, present or in addition play back video (for example, on the touchscreen, or
Person, through outside port on the display of external connection), video player module 236 and display screen 203, display control
Device 206, contact/mobile module 219, figure module 220, voicefrequency circuit 205 and/or loudspeaker 212 combine.
Musical player module 237 allows user to download and play back MP3 (moving picture experts group
Audio layer-3) format or Advanced Audio Coding (advanced audio coding, AAC) file with one or more
The music of stored in file format recorded and other audio files.Musical player module 237 and display screen 203, display are controlled
Device 206, contact/mobile module 219, figure module 220, voicefrequency circuit 205, loudspeaker 212, RF circuit 216 and/or browsing processed
Device module 238 combines, and optionally, terminal 200 also may include the function of MP3 player.
Browser module 238 can be used for browse internet, including search for, be linked to, receive and show webpage or it
Each section and with the attachment of web page interlinkage and other files.Browser module 238 can be with RF circuit 216, display screen
203, display controller 206, contact/mobile module 219, figure module 220 and/or text input module 222 combine.
Calendaring module 239 can be used for generating, display, modify and store calendar and data relevant to calendar (for example, day
Go through entry, item list to be done etc.).Calendaring module 239 and RF circuit 216, display screen 203, display controller 206, contact/shifting
Dynamic model block 219, figure module 220, text input module 222, email client module 231 and/or browser module 238
In conjunction with.
Widget module is the miniature applications that can be downloaded and be used by a user, widget module can with RF circuit 216,
Display screen 203, display controller 206, contact/mobile module 219, figure module 220, text input module 221 and/or browsing
Device module 238 combines.
These modules (that is, multiple groups instruction) do not need to be implemented as individual software program, process, or module, can be each
Each subset of these modules is combined or in addition reconfigured in kind embodiment.For example, video player module 236 can be with music
Player module 237 is combined into individual module.In some embodiments, memory 201 can store module sum number identified above
According to the subset of structure.Also, memory 201 can store other modules and data structure as not described above.
It should be noted that equipment involved in the embodiment of the present application can be mobile phone (or for " honeycomb " electricity
Words), the equipment of any specific above-mentioned functional module such as tablet computer, the embodiment of the present application is not especially limited this.
It is specifically addressed below in conjunction with method for managing resource of the Fig. 2 to application provided by the embodiments of the present application.
Fig. 3 is a kind of method for managing resource flow diagram of application provided by the embodiments of the present application, including step S101-
S102:
S101, terminal determine target application.
Wherein, target application is in terminal running background, and there are the applications of file transport behavior.
Optionally, there are the applications of file transport behavior to meet any one condition in the following conditions:
First condition: the connection established with server includes that at least one length connects, and is somebody's turn to do in the first connection duration
The flow transmitted in any one length connection at least one length connection is more than first threshold.
Wherein, the first connection duration first threshold corresponding with the first connection duration may be determining based on experience value
, or what user was arranged at the terminal.Illustratively, first condition can be to transmit in a long connection in 1min
20MB flow, first condition may be to transmit 80MB flow in 5min in a long connection, and the embodiment of the present application is for
The value of one connection duration and first threshold is not especially limited.
In general, long connection, which refers to, can continuously transmit multiple data packets in a connection, during connecting holding, if do not had
There is data packet transmission, both sides is needed to send out link detecting packet.
Illustratively, it is long to provide a transmission control layer agreement (transmission control protocol, TCP)
The brief citing of connection.Assuming that client (client) is initiated the connection to server (server), server receives client hair
The connection risen, server and client side establish connection, after client and server complete primary read-write, client and service
Connection between device can't actively close, and the read-write operation between the subsequent client and the server continues to use the company
It connects.In general, client server may occur accident power-off, crash, collapse, restart in the interactive process of application;Or
Person's network has interrupted, and client and server is not aware that.In order to determine whether TCP connection disconnects, Transmission Control Protocol at present
TCP keepalive feature is provided, keepalive feature is mainly that server application provides, and whether server application is desired to determine client host
Collapse uses resource so as to represent client.Retain a semi-open TCP if client has disappeared, on server to connect
It connecing and waits the data from client, keepalive feature is just attempt to detect this semi-open TCP connection in server end, from
And guarantee at the time of emergency, semi-open TCP connection can be discharged.
It should be noted that HTTP long connection and the short connection of HTTP are essentially TCP long connection and the short connection of TCP.HTTP
Belong to application layer protocol, Transmission Control Protocol belongs to transport layer protocol, and the embodiment of the present application does not make specifically the connection for being connected as which layer
It limits.
Optionally, applying when transmitting file in terminal, file transmission can be carried out by establishing one with server and connecting,
Multiple connections can be established and carry out file transmission, the embodiment of the present application is not especially limited the number of the connection of foundation.
Second condition: at least one connection is established by standard file transfer protocols and server, and in the second connection
The flow transmitted in any one connection in duration at least one connection is more than second threshold.
Wherein, the second connection duration second threshold corresponding with the second connection duration empirical value can determine according to,
It can be arranged at the terminal for user.Illustratively, setting, which connects, transmits in upper 1min more than 20MB flow, or setting
30MB flow is transmitted in connection in 2min, the embodiment of the present application does not make specifically the value of the second connection duration and second threshold
It limits.
It should be noted that in the embodiment of the present application, the first connection duration and the second connection duration can identical can also be with
Difference, first threshold and second threshold can be the same or different, and the embodiment of the present application is not especially limited this.
Wherein, File Transfer Protocol is for the standard agreement in the enterprising style of writing part transmission of network.
Optionally, standard file transfer protocols are that file transmits (file transfer protocol, FTP) agreement, right
Equal networks (peer to peer, P2P) agreement, Simple Mail Transfer protocol (simple mail transfer protocol,
SMTP) agreement, third version post office protocol (post office protocol-version 3, POP3) agreement or
Internet Mail Access Protocol (Internet mail access protocol, IMAP).
If establishing at least one connection using at least one of above-mentioned agreement in terminal, and in the second connection
The flow transmitted in any one connection in duration at least one connection is more than second threshold, and terminal can determine in application
There are target applications.
File Transfer Protocol further includes http protocol and Hyper text transfer security protocol (hyper text transfer
Protocol over secure socket layer, HTTPS) agreement.Using the communicating pair of HTTPS agreement on HTTP
Layer is communicated using http protocol, and bottom passes through secure socket layer protocol (secure sockets layer, SSL)/safe transmission
Layer protocol (transport layer security, TLS) agreement encrypted packet.
Optionally, it can determine that connects the File Transfer Protocol used by following any mode.
1, the File Transfer Protocol for identifying that the connection uses by connecting corresponding port numbers.
For example, if a corresponding port-for-port 20/21 of connection, it is determined that the File Transfer Protocol that the connection uses is
File Transfer Protocol;If the corresponding port-for-port 80 of a connection or port 8080, it is determined that the File Transfer Protocol that the connection uses
For http protocol;If the corresponding port-for-port 25 of a connection, it is determined that the File Transfer Protocol that the connection uses is SMTP
Agreement;If the corresponding port-for-port 110 of a connection, it is determined that the File Transfer Protocol that the connection uses is POP3 agreement;
If the corresponding port-for-port 143 of a connection, it is determined that the File Transfer Protocol that the connection uses is IMAP protocol.
2, the File Transfer Protocol that the upper identification of former a data packets of data packet connection uses is connected by monitoring.
For example, detect that the 1st packet in connection is Hello message, and 1 byte in preceding 6 bytes is protocol-identifier,
1 byte is type of message, and 4 bytes are message-length, it is determined that the File Transfer Protocol that the connection uses is eMule agreement
(a kind of common P2P agreement).
Third condition: connection is established by http protocol or HTTPS agreement and server, and the size for transmitting file is super
Cross third threshold value.
It should be noted that third threshold value can be set to tens of million or more.
In general, the flow that conventional business needs is less, such as browsing webpage, general webpage is having a size of several hundred KB to several
Ten times or more that third threshold value is webpage size can be set in MB.The embodiment of the present application corresponds to the specific value of third threshold value not
Make specific limit.
Optionally, in the embodiment of the present application, terminal can judge whether the application is mesh after one application of each opening
Mark application can also determine that the application of running background whether there is target application every a cycle, or when terminal detects
Resource is not enough to need to clear up the application of current background operation (such as just in the browser of foradownloaded video, music, video, game
Or the application such as word processing) or service, it can be determined before cleaning in background application with the presence or absence of target application;Alternatively, working as
User triggers cleaning manually, and terminal determines before cleaning whether there is target application in background application;Terminal can also be at it
Determine that target application, the embodiment of the present application determine that target application is not especially limited for when in the case of him.
S102, terminal guarantee target application process resource under the premise of, adjust terminal front stage operation application and/
Or the resource of the application of running background.
Optionally, the resource in the embodiment of the present application include the CPU of terminal, the memory of terminal, terminal electricity or network
The resources such as bandwidth.
Specifically, terminal under the premise of not reducing the stock number of target application process, is adjusted in terminal front stage operation
Using and/or running background application resource.Alternatively, terminal is in the resource-niche for not changing target application process and currently occupying
The resource in the application of terminal front stage operation and/or the application of running background is adjusted under the premise of setting.
It should be noted that the resource of application process is includable deposit in state, such as occupancy memory it is big
It is small, position etc. in memory.Terminal can be kept using the size and position occupied in memory, in this premise
Under, increase additional resource for application, more moneys can also be redistributed under the premise of not influencing using operation for application
Source, the embodiment of the present application are not especially limited this.
Optionally, when terminal detects that the shortage of resources of terminal, terminal need to clear up executable step S102 when resource;Or
Person, terminal are detected with the presence of file transport behavior is applied, and need that above-mentioned step can be performed when transmitting for file and increase network bandwidth
Rapid S102;Alternatively, user has found that foreground application operation is not smooth, step is executed to the instruction instruction terminal of terminal triggering adjustresources
Rapid S102;Alternatively, terminal is monitoring show whether be application adjustment money to user using there are after file transport behavior
Source, after receiving user and determining the instruction of adjustresources, step S102 is also can be performed in terminal, and terminal can also be in other cases
Step S102 is executed, the condition that the embodiment of the present application executes step S102 for terminal is not especially limited.
Specifically, the file transport behavior detection module 224 in terminal 200 is for supporting terminal 200 to execute in conjunction with Fig. 2
Resource cleaning modul 226 in step S101, terminal 200 or resource distribution module 227 in the embodiment of the present application is for supporting
Terminal 200 executes the step S102 in the embodiment of the present application.
The method for managing resource of application provided by the embodiments of the present application passes through first condition, second condition or third condition
It determines target application, can make terminal that can apply the resource with other application with management objectives, avoid the wasting of resources, Jin Erti
The high user experience when using terminal carries out file transmission.
When terminal determines that connection has used http protocol or HTTPS agreement, file transmission and common browsing webpage behavior
It cannot be distinguished, therefore, further whether there is in the embodiment of the present application by the size of judgement transmission file to determine in application
File transport behavior.
Optionally, terminal determines that " size of transmission file is greater than at least one order of magnitude of webpage size " includes step
S101a-S101c:
S101a, terminal obtain response message.
Wherein, response message is that the response message of terminal to server transmission or server disappear to the response that terminal is sent
Breath.
It should be noted that terminal to server sends transfer request message when user passes through terminal transmission file, it should
The mark for needing the file transmitted is carried in request message to be sent out after server receives the request message of terminal transmission according to terminal
The request message sent sends the first response message to terminal, and the file that user needs to transmit is carried in first response message.When
When user passes through terminal transmission file, after terminal to server sends transmission request, terminal agrees to transmission in the service of receiving
The second response message is sent to server after instruction, the file that user needs to transmit is carried in second response message.
Optionally, if the application in terminal establishes connection, the application of terminal detection operation by http protocol and server
When needing to obtain response message with the presence or absence of file transport behavior, step S101a may include S101a1:
S101a1, terminal parse point acquisition in connection object and parse response message.
Wherein, if establishing connection by http protocol and server, connection object parsing point can be located at HTTP layers and transmission
Between control protocol layer TCP layer.
Fig. 4 is a kind of schematic diagram for parsing response message, as shown in figure 4, terminal side and server side respectively include HTTP
Layer, TCP layer and IP layers, wherein the IP layer of terminal side and the IP layer of server side are by network communication, and terminal is in TCP layer (transmission
Layer) and HTTP layer (application layer) between be arranged HTTP connection object parsing point, obtain and parse response message in the parsing point, from
And obtain the size of transmission file.
Response message is parsed between TCP layer and HTTP layers, the size of transmission file can be obtained, for terminal judgement backstage
The application of operation provides foundation with the presence or absence of file transport behavior.
Optionally, if establishing connection by HTTPS agreement and server, connection object parsing point can be located at HTTP layer with
Between SSL/TLS layers.
The key of cryptographic protocol only has communicating pair to hold, and intermediary network device can not parse data, and internet takes at present
The normal protocol recognizer that business provider (Internet Service Provider, ISP) provides can not parse cryptographic protocol
Data.
Fig. 5 is a kind of schematic diagram for parsing response message, as shown in figure 5, terminal side and server side respectively include HTTP
Layer, SSL/TLS layers, TCP layer and IP layers, wherein the IP layer of terminal side and the IP layer of server side are by network communication, in terminal
SSL (Secure Socket Layer)/between TLS layers (secure transport layers) and HTTP layers (application layer) be arranged HTTP connection object parse
Point, terminal can obtain and parse response message in the parsing point, to obtain the size of transmission file.
If using HTTPS agreement using the connection established with server, terminal passes through between SSL/TLS layers and HTTP layers
Response message is obtained and decrypts, to obtain the size of transmission file.
S101b, terminal determine the size of transmission file according to response message.
S101c, terminal determine whether the size of transmission file is more than third threshold value.
Specifically, the file transport behavior detection module 224 in terminal 200 can be used for that terminal 200 is supported to hold in conjunction with Fig. 2
Step S101a, S101b and S101bc in row the embodiment of the present application.
The method for managing resource of application provided by the embodiments of the present application, if terminal detects the application and service of running background
The connection that device is established uses http protocol or HTTPS agreement, and the size for transmitting file is greater than at least one quantity of webpage size
Grade, then terminal can determine that there are file transport behaviors in the application, so that terminal can be flexible to the resource of the application
Management, can make file transmission task complete as early as possible, improve the experience that user carries out file transmission in using terminal.
Optionally, if the application in terminal establishes connection using http protocol or HTTPS agreement and server, terminal is determined
When transmitting the size of file, step S101b includes S101b1:
S101b1, terminal obtain the size for the transmission file that response message carries according to the first instruction.
It should be noted that response message is overall transfer mode when carrying the first instruction in response message.
In general, the operation of user at the terminal can be sent to terminal or server in the form of request message, terminal or
Person's server can send response message to terminal according to the request that user sends, and be returned again to user to user according to response message
The response of operation.Wherein, request message includes that request is capable and request header further includes optionally request body;Response message packet
Include: statusline, response header further include optionally response main body.Request row is started with requesting party's religious name, is followed by resource mark
Know the protocol version that symbol and browser use.Most common requesting method is GET, and GET request from server for taking money
Source, for the requesting method of default.It is linked for example, user inputs a URL or click one in the address field of browser, then user
Request server is sent to GET request.
Illustratively, it is assumed that the request message that terminal to server is sent is as follows:
GET/HTTP/1.1 (request row)
Host:www.google.com(request header)
Illustratively, in response to above-mentioned request message, when overall transfer, the response message that server is sent to terminal is such as
Under:
It should be noted that " Content-Length " field, that is, the embodiment of the present application in the response message of above-mentioned example
In first instruction.The size of transmission file is obtained according to the first instruction.If carrying " Content-Length " in response message
Field indicates that the response message is overall transfer mode;If an application establishes connection using http protocol and server, and answers
The value for answering in message " Content-Length " is tens of MB, and terminal can determine that the application is file transmission.
Specifically, the file transport behavior detection module 224 in terminal 200 can be used for that terminal 200 is supported to hold in conjunction with Fig. 2
Step S101b1 in row the embodiment of the present application.
It is detected by terminal and connection is established using http protocol using with server, what terminal detection service device was sent answers
Message is answered, when being overall transfer, the size of transmission file is obtained according to the first of response message the instruction, so as to according to transmission text
The size of part determines that application whether there is file transport behavior, and then the resource for the application of terminal reasonable management provides foundation.
Optionally, if the application in terminal establishes connection using http protocol or HTTPS agreement and server, terminal is determined
When transmitting the size of file, step S101b can also include S101b2:
S101b2, terminal indicate to determine what the data block transmitted in response message added up according to second that response message carries
Size.
Wherein, it is block transmission mode that the second instruction, which is used to indicate response message,.
In the embodiment of the present application, when server or terminal use the block transmission mode of http protocol, terminal passes through determination
The data block of transmission adds up the size that size obtains transmission file.
Illustratively, in response to above-mentioned request message, when block transmission, the response message that server is sent to terminal is such as
Under:
It should be noted that " Transfer-Encoding:chunked " in above-mentioned response message is in the application
Second instruction." 23 ", " 1A ", " 3 " and " 8 " in above-mentioned response message are length (16 systems, the conversion of 4 data blocks
It is respectively 35,26,3,8 bytes for 10 systems) corresponding 4 segment data is respectively " This is the data in the first
chunk”、“and this is the second one”、“con”、“sequence”。
Specifically, the file transport behavior detection module 224 in terminal 200 is for supporting terminal 200 to execute in conjunction with Fig. 2
Step S101b2 in the embodiment of the present application.
If terminal detects that the application of running background establishes connection, terminal detection service device using http protocol with server
The response message of transmission can determine that accumulative block HTTP is passed if response message is designated as block transmission from response message
The size of defeated object, and then judge that background application provides foundation with the presence or absence of file transport behavior for terminal.
Optionally, it is clear can also to can receive user's selection in the application of the automatic cleaning running background in backstage, terminal for terminal
Manage the application on backstage.
When terminal in the automatic cleaning running background in backstage in application, then step S102 may include step S102a1:
S102a1, if it is determined that for front stage operation application distribution resource less than four threshold values when, terminal cleaning remove target
The application of at least one running background except.
Illustratively, Fig. 6 is the selection interface whether one kind provided by the embodiments of the present application clears up background application.Assuming that with
Family returns to homepage after starting multiple applications, and terminal detects the first application when executing cleaning operation to there is downloading row
For terminal shows the interface as shown in the 6A in Fig. 6 in homepage, and a selection prompting frame is shown on terminal display screen, shows
Show " clearing up, if the following application of cleaning? ", select to show that there are the application of file transport behavior and prompts in prompting frame
Switch, such as the first application indicate that user disagrees the first application of cleaning, open if user clicks if user clicks the switch left side
The right is closed, indicates that user agrees to the first application of cleaning;If existing simultaneously the application of multiple downloadings, multiple downloading application is shown
The prompting frame whether cleared up, such as the second application are the application of downloading film, and third is applied as the application of downloading file, then terminal
It can be shown on interface in the 6B such as Fig. 6, if the first application (file transmission) of cleaning, second apply (file transmission) and third
Using the prompting frame of (file transmission), interface shown in 6A or 6B of the user in Fig. 6 chooses whether the operation of cleaning.
It should be noted that the selection prompting frame in the embodiment of the present application can be passed according to the application of cleaning with the presence or absence of file
The application of defeated behavior chooses whether to show, when there are file transport behaviors in application, terminal is shown in the application of running background
Prompting frame is selected, when there is no file transport behaviors in application, terminal is directly cleared up on backstage, eventually in the application of running background
End can not show selection prompting frame, can also show selection prompting frame, the embodiment of the present application is not especially limited this.
Illustratively, Fig. 7 is the selection interface whether one kind provided by the embodiments of the present application clears up background application.Assuming that with
After starting multiple applications, user just watches video in the second application at family, and the first of backstage is applied there are file download behavior,
File download behavior is not present in other background applications, and terminal can be shown when backstage executes cleaning operation to user as in Fig. 7
7A shown in interface shown in interface or 7B, wherein choice box is located at the edge that display screen is shown in the 7A in Fig. 7, in Fig. 7
7B in the choice box cleared up be located in the video clip in display screen, user can the interface shown in the 7A or 7B in Fig. 7
The operation of the first application is not cleared up in triggering.
The method for managing resource of application provided by the embodiments of the present application, however, it is determined that for the resource of the application distribution of front stage operation
When less than four threshold values, the application of at least one running background of the terminal cleaning in addition to target application, it is ensured that target is answered
With not being cleaned, so that terminal can be avoided the failure that file transmits in target application, be subtracted to the resource of application with flexible management
The flow loss for having lacked user, improves user experience.
When user triggers cleaning background application, such as when triggering cleaning icon, terminal is without judging foreground application resource
Whether less than the 4th threshold value, terminal can directly execute the cleaning operation of the application of running background, then step S102 may include step
S102a2-S102a3:
If S102a2, terminal detect the cleaning operation instruction of user's triggering, instructed in response to cleaning operation, terminal is aobvious
Show and shows the first display interface for whether clearing up target application on interface.
S102a3, the first operational order that user triggers in the first display interface is detected, in response to the first operational order,
The application of at least one running background of the terminal cleaning in addition to target application.
Wherein, target application is not cleared up in the first operational order instruction.
Fig. 8 is that a kind of display interface of terminal provided by the embodiments of the present application can when terminal, which receives user, indicates cleaning
To provide display interface as shown in Figure 8 for user.Wherein, the 8A in Fig. 8 is that user clicks cleaning icon on homepage, can
To show the interface as shown in the 7B in Fig. 7, the first application for being carrying out downloading and the second application and third application are shown,
It selects to clear up for user.
Illustratively, user is watching video, and as shown in the 9A in Fig. 9, user triggers the cleaning figure in taskbar
Mark, display selection interface as shown in the 9B in Fig. 9 is selected for user or user triggers after clearing up a period of time and has been cleaned to
First application of downloading behavior shows that the selection interface shown such as the 9C in Fig. 9 is selected for user in the notification bar of terminal.
Specifically, the resources detection module 202 and resource cleaning modul 226 in terminal 200 are for supporting end in conjunction with Fig. 2
End 200 executes the step S102a1-S102a3 in the embodiment of the present application.
The method for managing resource of application provided by the embodiments of the present application, if terminal detects the cleaning operation of user's triggering
When, the application of at least one running background of the terminal cleaning in addition to target application, it is ensured that target application is not cleaned, and is made
The failure that file transmits in target application can be avoided, be reduced the stream of user to the resource of application with flexible management by obtaining terminal
Amount loss, improves user experience.
Optionally, terminal detect file transport behavior in application, in order to make file transmission faster, or in order to
Make the user experience of current application more preferably, terminal can be that there are the applications of file transport behavior to redistribute resource.Certainly,
Terminal also can receive user instruction and redistribute transfer resource.
When terminal meets the condition of distribution according to the resource that terminal determines, step S102 may include step S102b1:
S102b1, if it is determined that the assignable resource of terminal be greater than or equal to five threshold values when, terminal is redistributed in terminal
The resource of currently running application.
Optionally, terminal is not under the premise of reducing the resource of target application, or does not change target application Current resource
Situation under, redistribute the resource of currently running application in terminal.Wherein Current resource information is to occupy resource
Position or size, terminal can be more resources that target application increase is redistributed in the other positions of resource, such as from
Other memory blocks are that target application increases more memories, and the embodiment of the present application is not especially limited this.
It should be noted that the 5th threshold value can be unused numerical value for different resources, it can be according to every kind of resource
Service condition select an empirical value, such as network bandwidth surplus be 50% be network bandwidth resources threshold value, in reality
The 5th threshold value can determine an empirical value according to the stock number that the operating condition of terminal and each application need in, this Shen
Please embodiment the occurrence of the 5th threshold value is not especially limited.
The method for managing resource of application provided by the embodiments of the present application, if terminal determines that assignable resource is greater than or equal to
When four threshold values, terminal redistributes the resource of currently running application in terminal, to adjust for the application in terminal is dynamic
Whole resource, therefore resource can be increased for target application, so that file transmission task is completed as early as possible, to improve user's body
It tests.
Optionally, when the instruction of resource is redistributed in user's triggering, step S102 may include step S102b2-
S102b3:
If S102b2, terminal detect the second operational order of user's triggering, in response to the second operational order, terminal is shown
Second display interface.
Wherein, the second operation instruction redistributes the resource of currently running application in terminal.
S102b3, the third operational order that user triggers in the second display interface is detected, terminal is redistributed in terminal
The resource of currently running application.
Wherein, the second operation instruction is currently running allocated resources in terminal.
It should be noted that the third operational order of user's triggering can be at least one allocated resources, the application is real
Example is applied to be not especially limited the number for the application that the third operational order that user triggers adjusts.
Specifically, the resources detection module 202 and resource distribution module 227 in terminal 200 are for supporting end in conjunction with Fig. 2
End 200 executes the step S102b1-S102b3 in the embodiment of the present application.
The method for managing resource of application provided by the embodiments of the present application, if terminal detect user triggering redistribute money
When the instruction in source, terminal redistributes the resource of currently running application in terminal, to adjust for the application in terminal is dynamic
Whole resource, therefore resource can be increased for target application, so that file transmission task is completed as early as possible, to improve user's body
It tests.
Need to redistribute that resource or terminal receive user's triggering redistributes resource in terminal when terminal determines
When instruction, " resource that terminal redistributes currently running application in terminal " in above-mentioned steps S102b1 and S102b2 includes
Step W1-W4:
W1, terminal are determined in terminal with the presence or absence of file transport behavior according to application currently running in terminal and are currently run
Application the first weight factor.
Whether W2, terminal are that foreground application determines currently running application in terminal according to application currently running in terminal
The second weight factor.
W3, terminal are according to the first weight factor of currently running application and the second weight factor of currently running application
Determine the resource allocation weight of currently running application.
W4, terminal are at least one currently running application distribution money according to the resource allocation weight of currently running application
Source.
It should be noted that terminal can apply adjustresources for all, running background in terminal may also be only,
And there are the applications of file transport behavior to increase resource, the embodiment of the present application is not especially limited this.
Specifically, the resource distribution module 227 in terminal 200 is for supporting that it is real that terminal 200 executes the application in conjunction with Fig. 2
Apply the step W1-W4 in example.
It should be noted that user can also execute answering for file transmission manually for backstage in the set interface of terminal
With the resource of selection distribution.For example, user can allow background to upload the Netowrk tape that downloading uses 70% by setting
It is wide.Terminal detects the first application, and there are file transport behaviors, and 70% network bandwidth can be retained for the first application.
Illustratively, for distributing network bandwidth, Figure 10 provides a kind of terminal distribution resource for the embodiment of the present application
Interface schematic diagram.As shown in the 10A in Figure 10, it is assumed that the application occupancy of the application and front stage operation of terminal default running background
Network bandwidth is 50%, and the network bandwidth that the application that running background can be directly arranged in user occupies is 70%, front stage operation
Application occupy 30%, interface after setting is shown in the 10B in Figure 10.It is of course also possible to show the net that each application occupies
Network bandwidth, such as shown in the 10C in Figure 10, the first application occupies 50% network bandwidth, the second application occupies 30% net
Network bandwidth, third application occupy 20% network bandwidth, adjustable when terminal, which determines, to be needed again to allocated resources
The management item of the resource of currently running each application.Assuming that terminal shows the first application of running background for there are file transmission
The application of behavior, the second application is running background, and the application of file transport behavior is not present, and user can also reduce second
The network bandwidth of application increases resource for the first application, for example, increasing by 20% network bandwidth for the first application.
The method for managing resource of application provided by the embodiments of the present application, by determine each application run in terminal the
One weight factor and the second weight factor, and then can be determined by the first weight factor and the second weight factor of each application
The resource allocation weight of each application run in the terminal, so as to manage mesh according to the resource allocation weight of target application
Mark the resource of application.
Optionally, before step S102, terminal can be also application setting priority.Priority include cleaning priority and
Distribute priority.Terminal setting foreground application cleaning priority is minimum, and the cleaning priority that target application is arranged is lower, after setting
The cleaning priority of the non-targeted application of platform operation is higher, in terminal cleaning running background in application, terminal is cleared up clearly first
Manage the higher application of priority.
Optionally, terminal is that highest distribution priority is arranged in foreground application, and the higher distribution of setting target application is preferential
Grade, the non-targeted lower distribution priority of application, in adjustresources, adjustment distributes the higher application of priority to terminal first
Resource.
Illustratively, it is assumed that terminal has currently run 8 applications, wherein the first application is target application with the second application,
It is foreground application that third, which is applied, and other application is non-targeted application, then terminal is applied in cleaning according to currently running 8
Preceding 5 applications are come according to the sequence cleaning of cleaning cleaning priority from high to low.
The method for managing resource of application provided by the embodiments of the present application can be made by the way that priority is arranged for target application
Terminal when carrying out resource management to application, can preferentially clear up according to the priority of application and clear up that priority is higher to answer
With, or the preferential adjustment adjustment higher application of priority, so as to avoid to deposit in platform operation application process after the cleaning
In the application cleaning of file transport behavior, the flexibility of application resource management is increased.
Example 1: the application resource deficiency of front stage operation needs to clear up the application of running background
As shown in figure 11, it is assumed that the first application is that P2P downloads software in the terminal of user 1, and the second application is that browser is soft
Part, it is Games Software that third, which is applied, wherein the first application can download to video file in terminal.
User, which opens a terminal, to wish to watch some movie and television play, since the too popular video server of program is more crowded, online
Viewing effect is bad, user determine by video file it is locally downloading after review.At the moment 1, is started on user terminal
One applies to download video files.Since video file size is bigger, downloading needs the long period, and user is in order to avoid uninteresting
Start second using the webpage that surfs the web etc. the moment 2 is stayed in;Interest shifts after user has seen a period of time webpage, at the moment 3
Third application is started to start to play game.
Step 1, terminal determine target application.
(1) file transport behavior detection module 223 detects that the first application establishes one by P2P agreement and server
Long connection, the length connect the flow that 200MB is transmitted in 1 minute, it is determined that there are file transport behaviors for the first application.
(2) file transport behavior detection module 223 detects that the second application accesses network by http protocol, and transmits text
The size of part is 60KB, it is determined that file transport behavior is not present in the second application.
Assuming that user consumes a large amount of memory source during game is played in third application.
Step 2, terminal adjust the application in terminal front stage operation under the premise of guaranteeing the resource of process of target application
And/or the resource of the application of running background.
(1) resources detection module 225 detects that memory starvation, resources detection module 225 notify that resource cleaning modul 226 is clear
Manage background application and background service.
(2) resource cleaning modul 226 obtains the notice of resources detection module 225, and the resource cleaning inquiry of detection module 226 is answered
Determining the first application with the result that transport behavior detection module 223 detects, there are file transport behaviors, and there is no texts for the second application
Part transport behavior.
(3), second application of the cleaning of resource cleaning modul 226.
Example 2: front stage operation application resource is sufficient, can in the application of running background there are the applications of transport behavior to increase
Add resource
As shown in figure 12, it is assumed that the first application is mail (Email) client software, and the second application is browser software,
Wherein, mail can be sent to by server by the first application.User opens the first application at the T1 moment and sends mail, wherein
User is added to a bigger attachment in mail, and upload needs the long period.User stays in order to avoid uninteresting etc.
The T2 moment starts the second application-browsing webpage.Assuming that the first application occupies 50% network bandwidth, the second application occupies 10%
Network bandwidth.
Step 1, terminal determine target application.
(1) it is one long to detect that the first application is established using smtp protocol with server for transport behavior detection module 224
Connection, the length connect the flow that 100M is transmitted in 1 minute, it is determined that there are file transport behaviors for the first application.
(2) second application of the detection of transport behavior detection module 223 accesses network by http protocol, obtains parsing HTTP and passes
The size of defeated object is 100KB, it is determined that file transport behavior is not present in the second application.
Step 2, terminal under the premise of retaining target application existing resource, adjust terminal front stage operation application and/
Or the resource of the application of running background.
(1) resource distribution module 227 determines the resource allocation factor of each application in terminal.
For the first application, file is being transmitted and in backstage, it is assumed that the first weight factor of the first application is KDL1=
10, the second weight factor of the first application is KFG1=1, then the resource allocation weight of the first application is W1=KDL1×KFG 2=
10。
For the second application, file is not transmitted and in foreground, it is assumed that the first weight factor of the second application is KDL2=
1, the second weight factor of the second application is KFG2=5, then second application resource allocation weight W2=KDL2×KFG2=5.
(2) resource distribution module 227 is at least one current operation according to the resource allocation weight of currently running application
Allocated resources.
Assuming that there is no third application to need to carry out network communication in system, then only need to answer in the first application and second
Network bandwidth is distributed between.
Weight is distributed according to first resource and Secondary resource distribution weight determines the network bandwidth ratio of the first application distribution
Are as follows: W1/(W1+W2)=10/ (10+5) ≈ 67%.
Weight is distributed according to first resource and Secondary resource distribution weight determines the network bandwidth ratio of the second application distribution
Are as follows: W2/(W1+W2)=5/ (10+5) ≈ 33%.
The network bandwidth of first application is increased to 67% by 50% by terminal.
It should be noted that the application for not transport behavior, terminal can increase network bandwidth for this certain applications,
Can also keep not no transport behavior can increase to 33% using currently used bandwidth, such as terminal for the second application
Network bandwidth can also keep the network bandwidth of the second application current 10%.
Terminal can not only guarantee that foreground second is answered according to the above-mentioned network bandwidth pro rate network bandwidth being calculated
Usage experience avoids user from experiencing operational Caton, and provides enough Netowrk tapes for the first application of backstage
Wide resource, it is hereby achieved that stable background transfer speed, completes the transmission of Email mail as early as possible.
It is above-mentioned that mainly scheme provided by the present application is introduced from the angle of terminal, it is to be understood that above-mentioned terminal
In order to realize the above functions, it comprises execute the corresponding hardware configuration of each function and/or software module.Those skilled in the art
Member should be readily appreciated that, unit and algorithm steps described in conjunction with the examples disclosed in the embodiments of the present disclosure, this Shen
It please can be realized with the combining form of hardware or hardware and computer software.Some function is actually soft with hardware or computer
Part drives the mode of hardware to execute, the specific application and design constraint depending on technical solution.Professional technician can
To use different methods to achieve the described function to each specific application, but this realization is it is not considered that beyond this
The range of application.
The embodiment of the present application can carry out the division of functional module according to above method example to terminal, for example, can be right
The each functional module of each function division is answered, two or more functions can also be integrated in a processing module.
Above-mentioned integrated module both can take the form of hardware realization, can also be realized in the form of software function module.It needs
Illustrate, is schematical, only a kind of logical function partition to the division of module in the embodiment of the present application, it is practical to realize
When there may be another division manner.
For example, Figure 13 shows above-described embodiment in the case where each function division of use correspondence each functional module
Involved in terminal 1300 a kind of possible structural schematic diagram.As shown in figure 13, terminal 1300 includes 131 He of determining module
Adjust module 132.Step S101, S101a- that determining module 131 is used to that terminal 1300 to be supported to execute in embodiment of the method
S101c, S101a1, S101b1 and 101b2;The step that adjustment module 132 is used to that terminal 1300 to be supported to execute in embodiment of the method
Rapid S102, S102a1, S102a2, S102a3, S102b1, S102b2, S102b3 and W1-W4;Wherein, above method embodiment
All related contents for each step being related to can quote the function description of corresponding function module, and details are not described herein.
In the case where using the integrated each functional module of model split, Figure 14 shows involved in above-described embodiment
Terminal 1400 a kind of possible structural schematic diagram.As shown in figure 14, terminal 1400 includes processing module 141.Processing module
141 for support terminal 1400 execute step S101-S102, S101a-S101c of embodiment of the method, S101a1, S101b1,
101b2, S102a1, S102a2, S102a3, S102b1, S102b2, S102b3 and W1-W4.Wherein, above method embodiment
All related contents for each step being related to can quote the function description of corresponding function module, and details are not described herein.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When being realized using software program, can entirely or partly realize in the form of a computer program product.The computer
Program product includes one or more computer instructions.On computers load and execute computer program instructions when, all or
It partly generates according to process or function described in the embodiment of the present application.The computer can be general purpose computer, dedicated meter
Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium
In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer
Instruction can from a web-site, computer, server or data center by it is wired (for example, coaxial cable, optical fiber,
Digital Subscriber Line (digital subscriber line, DSL)) or wireless (for example, infrared, wireless, microwave etc.) mode to another
One web-site, computer, server or data center are transmitted.The computer readable storage medium can be calculating
Any usable medium that machine can access either includes one or more server, data center etc. that can be integrated with medium
Data storage device.The usable medium can be magnetic medium (for example, floppy disk, hard disk, tape), and optical medium is (for example, number
Change video disc (digital video disk, DVD)) or semiconductor medium (for example, solid state hard disk (solid state
Disk, SSD)) etc..
Although the application is described in conjunction with each embodiment herein, however, implementing the application claimed
In the process, those skilled in the art are by checking the attached drawing, disclosure and the appended claims, it will be appreciated that and it is real
Other variations of the existing open embodiment.In the claims, " comprising " (comprising) word is not excluded for other compositions
Part or step, "a" or "an" are not excluded for multiple situations.Claim may be implemented in single processor or other units
In several functions enumerating.Mutually different has been recited in mutually different dependent certain measures, it is not intended that these are arranged
It applies to combine and generates good effect.
Although the application is described in conjunction with specific features and embodiment, it is clear that, do not departing from this Shen
In the case where spirit and scope please, it can be carry out various modifications and is combined.Correspondingly, the specification and drawings are only institute
The exemplary illustration for the application that attached claim is defined, and be considered as covered within the scope of the application any and all and repair
Change, change, combining or equivalent.Obviously, those skilled in the art the application can be carried out various modification and variations without
It is detached from spirit and scope.If in this way, these modifications and variations of the application belong to the claim of this application and its
Within the scope of equivalent technologies, then the application is also intended to include these modifications and variations.
Claims (23)
1. a kind of method for managing resource of application, which is characterized in that the described method includes:
Terminal determines target application, wherein the target application be in the terminal running background, and there are file transmission go
For application;
The terminal adjusts answering in the terminal front stage operation under the premise of guaranteeing the resource of process of the target application
With and/or running background application resource.
2. the method according to claim 1, wherein the application of the file transport behavior meets in the following conditions
Any one condition:
The connection established with server includes that at least one length connects, and connects at least one described length connection in duration first
In any one length connection on the flow that transmits be more than first threshold;
At least one connection is established by standard file transfer protocols and server, and described at least one in the second connection duration
The flow transmitted in any one connection in a connection is more than second threshold;
Connection is established by hypertext transfer protocol http protocol or Hyper text transfer security protocol HTTPS agreement and server,
And the size for transmitting file is more than third threshold value.
3. according to the method described in claim 2, it is characterized in that, the terminal determines that the size of the transmission file is more than institute
State third threshold value, comprising:
The terminal obtains response message, wherein and the response message is the response message that the terminal to server is sent, or
The response message that server is sent to the terminal;
The terminal determines the size of transmission file according to the response message;
The terminal determines whether the size of the transmission file is more than the third threshold value.
4. according to the method described in claim 3, it is characterized in that, the terminal determines transmission file according to the response message
Size, comprising:
The terminal obtains the size for the transmission file that the response message carries according to the first instruction;
Alternatively,
The terminal determines that the data block transmitted in the response message is accumulative according to the second instruction that the response message carries
Size, wherein it is described second instruction be used to indicate the response message be block transmission mode.
5. according to the method described in claim 4, it is characterized in that, the terminal obtains response message, comprising:
The terminal parses point acquisition in connection object and parses the response message;
Wherein, if application establishes connection by http protocol and server, the connection object parsing point be located at HTTP layers with
Between transmission control protocol layer TCP layer;
Alternatively,
If application establishes connection by HTTPS agreement and server, the connection object parsing point is located at HTTP layers and safety
Between socket layer/SSL/TLS layers of secure transport layers.
6. according to the method described in claim 2, it is characterized in that, the standard file transfer protocols are File Transfer Protocol
File Transfer Protocol, peer-to-peer network agreement P2P agreement, Simple Mail Transfer protocol smtp protocol, Post Office Protocol 3 POP3 agreement or
Person's Mail Access Protocol IMAP protocol.
7. method according to claim 1-6, which is characterized in that the adjustment is in the terminal front stage operation
Using and/or the resource of application of running background include:
If it is determined that being front stage operation when applying the resource of distribution less than four threshold values, clear up in addition to the target application extremely
The application of a few running background;
Alternatively,
If it is determined that redistributing and currently being run in the terminal when the assignable resource of terminal is greater than or equal to five threshold values
Application resource.
8. the method according to the description of claim 7 is characterized in that it is described adjustment the terminal front stage operation application and/
Or the resource of the application of running background further include:
If the terminal detects the cleaning operation instruction of user's triggering, instructed in response to the cleaning operation, the terminal is aobvious
The first display interface for whether clearing up the target application shown;
The first operational order that user triggers in first display interface is detected, in response to first operational order, institute
State the application of at least one running background of the terminal cleaning in addition to the target application, wherein first operational order refers to
Show and does not clear up the target application.
9. the method according to the description of claim 7 is characterized in that it is described adjustment the terminal front stage operation application and/
Or the resource of the application of running background further include:
If the terminal detects the second operational order of user's triggering, in response to second operational order, the terminal is aobvious
Show the second display interface, second operation instruction redistributes the resource of currently running application in the terminal;
Detect the third operational order that user triggers in second display interface, the terminal is redistributed in the terminal
The resource of currently running application, the third operational order are designated as currently running allocated resources in the terminal.
10. the method according to claim 7 or 9, which is characterized in that it is described redistribute it is currently running in the terminal
The resource of application, comprising:
Currently running application in the terminal is determined according to whether there is file transport behavior in the currently running application
The first weight factor;
It whether is that foreground application determines that second of currently running application in the terminal weighs according to the currently running application
Repeated factor;
The second weight factor according to the first weight factor of the currently running application and the currently running application is true
The resource allocation weight of the fixed currently running application;
It is at least one described currently running allocated resources according to the resource allocation weight of the currently running application.
11. a kind of terminal, which is characterized in that the terminal includes determining module and adjustment module;
The determining module is used for: determining target application;Wherein, the target application be in the terminal running background, and
There are the applications of file transport behavior;
The adjustment module is used for: under the premise of guaranteeing the resource of process of the target application, being adjusted before the terminal
The resource of the application of the application and/or running background of platform operation.
12. terminal according to claim 11, which is characterized in that the application of the file transport behavior meets the following conditions
In any one condition:
The connection established with server includes that at least one length connects, and connects at least one described length connection in duration first
In any one length connection on the flow that transmits be more than first threshold;
At least one connection is established by standard file transfer protocols and server, and described at least one in the second connection duration
The flow transmitted in any one connection in a connection is more than second threshold;
Connection is established by hypertext transfer protocol http protocol or Hyper text transfer security protocol HTTPS agreement and server,
And the size for transmitting file is more than third threshold value.
13. terminal according to claim 12, which is characterized in that the determining module is specifically used for:
Obtain response message, wherein the response message be the terminal to server send response message or server to
The response message that the terminal is sent;
The size of transmission file is determined according to the response message;
Whether the size for determining the transmission file is more than the third threshold value.
14. terminal according to claim 13, which is characterized in that the determining module is specifically used for:
The size for the transmission file that the response message carries is obtained according to the first instruction;
Alternatively,
The accumulative size of the data block transmitted in the response message is determined according to the second instruction that the response message carries,
In, it is block transmission mode that second instruction, which is used to indicate the response message,.
15. terminal according to claim 14, which is characterized in that the determining module is specifically used for:
Point acquisition is parsed in connection object and parses the response message;
Wherein, if application establishes connection by http protocol and server, the connection object parsing point be located at HTTP layers with
Between transmission control protocol layer TCP layer;
Alternatively,
If application establishes connection by HTTPS agreement and server, the connection object parsing point is located at HTTP layers and safety
Between socket layer/SSL/TLS layers of secure transport layers.
16. terminal according to claim 12, which is characterized in that the standard file transfer protocols are File Transfer Protocol
File Transfer Protocol, peer-to-peer network agreement P2P agreement, Simple Mail Transfer protocol smtp protocol, Post Office Protocol 3 POP3 agreement or
Person's Mail Access Protocol IMAP protocol.
17. the described in any item terminals of 1-16 according to claim 1, which is characterized in that the adjustment module is specifically used for:
If it is determined that being front stage operation when applying the resource of distribution less than four threshold values, clear up in addition to the target application extremely
The application of a few running background;
Alternatively,
If it is determined that redistributing and currently being run in the terminal when the assignable resource of terminal is greater than or equal to five threshold values
Application resource.
18. terminal according to claim 17, which is characterized in that the terminal should include display module;The display mould
Block is used for:
If detecting the cleaning operation instruction of user's triggering, in response to the operational order, whether display, which clears up the target, is answered
First display interface;
The first operational order that detection user triggers in first display interface;
The adjustment module is also used to, and detects the first behaviour that user triggers in first display interface in the display module
After instructing, in response to first operational order, answering at least one running background in addition to the target application is cleared up
With, wherein the target application is not cleared up in the first operational order instruction.
19. terminal according to claim 17, which is characterized in that the terminal should include display module;The display mould
Block is used for:
If detecting the second operational order of user's triggering, in response to second operational order, the second display interface, institute are shown
State the resource that the second operation instruction redistributes currently running application in the terminal;
The third operational order that detection user triggers in second display interface;
The adjustment module is also used to, and detects the third behaviour that user triggers in second display interface in the display module
After instructing, the resource of currently running application in the terminal is redistributed, the third operational order is designated as the end
Currently running allocated resources in end.
20. terminal described in 7 or 19 according to claim 1, which is characterized in that the adjustment module is specifically used for:
Currently running application in the terminal is determined according to whether there is file transport behavior in the currently running application
The first weight factor;
It whether is that foreground application determines second of currently running application in the terminal according in the currently running application
Weight factor;
The second weight factor according to the first weight factor of the currently running application and the currently running application is true
The resource allocation weight of the fixed currently running application;
It is at least one described currently running allocated resources according to the resource allocation weight of the currently running application.
21. a kind of terminal characterized by comprising processor, memory and communication interface;
The memory is for storing computer executed instructions, and when the terminal operating, the processor executes the storage
The computer executed instructions of device storage, so that the terminal executes the application as described in any one of claim 1-10
Method for managing resource.
22. a kind of computer readable storage medium, which is characterized in that including computer instruction, when run on a computer,
So that computer executes the method for managing resource of the application as described in any one of claim 1-10.
23. a kind of computer program product comprising instruction, which is characterized in that when run on a computer, so that calculating
Machine executes the method for managing resource of the application as described in any one of claim 1-10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710940872.XA CN109600409B (en) | 2017-09-30 | 2017-09-30 | Resource management method and terminal for application |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710940872.XA CN109600409B (en) | 2017-09-30 | 2017-09-30 | Resource management method and terminal for application |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109600409A true CN109600409A (en) | 2019-04-09 |
CN109600409B CN109600409B (en) | 2022-08-19 |
Family
ID=65956588
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710940872.XA Active CN109600409B (en) | 2017-09-30 | 2017-09-30 | Resource management method and terminal for application |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109600409B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111954286A (en) * | 2020-08-06 | 2020-11-17 | 捷开通讯(深圳)有限公司 | Power adjusting method, device, storage medium and terminal |
CN114916017A (en) * | 2022-07-18 | 2022-08-16 | 荣耀终端有限公司 | Data transmission method, electronic equipment and readable storage medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060017558A1 (en) * | 2004-07-23 | 2006-01-26 | Albert David E | Enhanced fire, safety, security, and health monitoring and alarm response method, system and device |
CN101355590A (en) * | 2008-09-05 | 2009-01-28 | 深圳市迅雷网络技术有限公司 | Method, system and apparatus for prompting download |
CN103024538A (en) * | 2012-11-12 | 2013-04-03 | 北京奇虎科技有限公司 | Memory management method and system |
CN105468426A (en) * | 2016-01-05 | 2016-04-06 | 珠海市魅族科技有限公司 | Application freezing method and terminal |
CN105677477A (en) * | 2015-12-30 | 2016-06-15 | 北京金山安全软件有限公司 | Method and device for optimizing application program resources and electronic equipment |
CN105701025A (en) * | 2015-12-31 | 2016-06-22 | 华为技术有限公司 | Memory recovery method and device |
CN105824702A (en) * | 2016-03-22 | 2016-08-03 | 乐视云计算有限公司 | Method and terminal for managing program memory footprint |
CN106125882A (en) * | 2016-06-15 | 2016-11-16 | 深圳市万普拉斯科技有限公司 | The management method of a kind of application program and electronic equipment |
CN106919428A (en) * | 2017-03-21 | 2017-07-04 | 北京奇虎科技有限公司 | Clear up method, device and the mobile terminal of mobile terminal internal memory |
CN107168791A (en) * | 2017-04-13 | 2017-09-15 | 北京安云世纪科技有限公司 | Terminal Memory Optimize Method, device and mobile terminal under bright screen state |
-
2017
- 2017-09-30 CN CN201710940872.XA patent/CN109600409B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060017558A1 (en) * | 2004-07-23 | 2006-01-26 | Albert David E | Enhanced fire, safety, security, and health monitoring and alarm response method, system and device |
CN101355590A (en) * | 2008-09-05 | 2009-01-28 | 深圳市迅雷网络技术有限公司 | Method, system and apparatus for prompting download |
CN103024538A (en) * | 2012-11-12 | 2013-04-03 | 北京奇虎科技有限公司 | Memory management method and system |
CN105677477A (en) * | 2015-12-30 | 2016-06-15 | 北京金山安全软件有限公司 | Method and device for optimizing application program resources and electronic equipment |
CN105701025A (en) * | 2015-12-31 | 2016-06-22 | 华为技术有限公司 | Memory recovery method and device |
CN105468426A (en) * | 2016-01-05 | 2016-04-06 | 珠海市魅族科技有限公司 | Application freezing method and terminal |
CN105824702A (en) * | 2016-03-22 | 2016-08-03 | 乐视云计算有限公司 | Method and terminal for managing program memory footprint |
CN106125882A (en) * | 2016-06-15 | 2016-11-16 | 深圳市万普拉斯科技有限公司 | The management method of a kind of application program and electronic equipment |
CN106919428A (en) * | 2017-03-21 | 2017-07-04 | 北京奇虎科技有限公司 | Clear up method, device and the mobile terminal of mobile terminal internal memory |
CN107168791A (en) * | 2017-04-13 | 2017-09-15 | 北京安云世纪科技有限公司 | Terminal Memory Optimize Method, device and mobile terminal under bright screen state |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111954286A (en) * | 2020-08-06 | 2020-11-17 | 捷开通讯(深圳)有限公司 | Power adjusting method, device, storage medium and terminal |
CN114916017A (en) * | 2022-07-18 | 2022-08-16 | 荣耀终端有限公司 | Data transmission method, electronic equipment and readable storage medium |
CN114916017B (en) * | 2022-07-18 | 2022-10-04 | 荣耀终端有限公司 | Data transmission method, electronic equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109600409B (en) | 2022-08-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110582017B (en) | Video playing method, device, terminal and storage medium | |
RU2702049C2 (en) | Real-time sharing during telephone call | |
KR102040754B1 (en) | Interaction method, terminal and server based on recommended content | |
US20190124400A1 (en) | Interactive method, apparatus, and system in live room | |
CN105337843B (en) | Interactive system, method, client and background server | |
US9432314B2 (en) | Quick navigation of message conversation history | |
WO2022017107A1 (en) | Information processing method and apparatus, computer device and storage medium | |
CN107707828B (en) | A kind of method for processing video frequency and mobile terminal | |
CN113360238A (en) | Message processing method and device, electronic equipment and storage medium | |
CN112947823A (en) | Session processing method, device, equipment and storage medium | |
CN104142868B (en) | Establish the method and device of connection | |
CN107004226A (en) | Multi-endpoint is controllable to be notified | |
WO2018157812A1 (en) | Method and apparatus for implementing video branch selection and playback | |
EP3610362A2 (en) | Voice communication method | |
CN110569220B (en) | Game resource file display method and device, terminal and storage medium | |
WO2016119165A1 (en) | Chat history display method and apparatus | |
CN109491632A (en) | A kind of resource sharing method and terminal | |
CN109683768A (en) | A kind of operating method and mobile terminal of application | |
CN109600409A (en) | The method for managing resource and terminal of application | |
CN108429668A (en) | A kind of message treatment method, device, terminal and system | |
CN112417180A (en) | Method, apparatus, device and medium for generating album video | |
US20230403413A1 (en) | Method and apparatus for displaying online interaction, electronic device and computer readable medium | |
CN110808985B (en) | Song on-demand method, device, terminal, server and storage medium | |
CN114237450A (en) | Virtual resource transfer method, device, equipment, readable storage medium and product | |
CN114968021A (en) | Message display method, device, equipment and medium |
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: 523808 Southern Factory Building (Phase I) Project B2 Production Plant-5, New Town Avenue, Songshan Lake High-tech Industrial Development Zone, Dongguan City, Guangdong Province Applicant after: HUAWEI DEVICE Co.,Ltd. Address before: 523808 Southern Factory Building (Phase I) Project B2 Production Plant-5, New Town Avenue, Songshan Lake High-tech Industrial Development Zone, Dongguan City, Guangdong Province Applicant before: Huawei terminal (Dongguan) Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |