CN109992376A - Using freezing method, device, terminal and computer readable storage medium - Google Patents

Using freezing method, device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN109992376A
CN109992376A CN201711488951.8A CN201711488951A CN109992376A CN 109992376 A CN109992376 A CN 109992376A CN 201711488951 A CN201711488951 A CN 201711488951A CN 109992376 A CN109992376 A CN 109992376A
Authority
CN
China
Prior art keywords
application program
application
freeze
program
terminal
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
Application number
CN201711488951.8A
Other languages
Chinese (zh)
Other versions
CN109992376B (en
Inventor
陈岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711488951.8A priority Critical patent/CN109992376B/en
Priority to PCT/CN2018/116717 priority patent/WO2019128562A1/en
Publication of CN109992376A publication Critical patent/CN109992376A/en
Application granted granted Critical
Publication of CN109992376B publication Critical patent/CN109992376B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Stored Programmes (AREA)

Abstract

This application involves a kind of application freezing method, device, terminal and computer readable storage mediums.This method comprises: obtaining the first application program run on the terminal, detect whether there is the second application program being under same User Identity with first application program;When there are second application program, detect whether second application program is in normal operating conditions;When needing to freeze first application program, if second application program is in normal operating conditions, the corresponding default strategy that freezes is taken to freeze first application program according to working condition locating for second application program.By the above method, intelligentized freeze operation can be realized according to the working condition of the different application under same User Identity, guarantee freezes exception do not occur, promotes user experience.

Description

Using freezing method, device, terminal and computer readable storage medium
Technical field
This application involves data processing fields, can more particularly to a kind of application freezing method, device, terminal and computer Read storage medium.
Background technique
It is often both provided with the development of mobile communication technology, in Mobile operating system and resource is carried out to the process of application The method of limitation.It is applied in running background or not applying in front stage operation by user's reasonable employment in order to avoid unwanted, The electricity for occupying Installed System Memory, consuming terminal device, can generally freeze not needing or not by the application of user's reasonable employment.When more A application is there are when associated user identifier, if freezing an application under the user identifier, the institute under the user identifier Have using can all be frozen, may cause in this way be in front stage operation or other normal operating conditions using can not be normal Work, influences user experience.
Summary of the invention
The embodiment of the present application provides a kind of application freezing method, device, terminal and computer readable storage medium, Neng Gougen Intelligentized freeze operation is realized according to the working condition of the different application under same User Identity.
It is a kind of to apply freezing method, for freezing the application program run in terminal, which comprises
The first application program for running on the terminal is obtained, detects whether to exist and is in first application program The second application program under same User Identity;
When there are second application program, detect whether second application program is in normal operating conditions;
When needing to freeze first application program, if second application program is in normal operating conditions, root Take the corresponding default strategy that freezes to first application program progress according to working condition locating for second application program Freeze.
It is a kind of to apply freezing plant, comprising:
Module is obtained, for obtaining the first application program run on the terminal, is detected whether in the presence of with described the One application program is in the second application program under same User Identity;
Detection module, for detecting whether second application program is in just when there are second application program Normal working condition;
Freeze module, for when needing to freeze first application program, if second application program is in normal Working condition, then the working condition according to locating for second application program takes the corresponding default strategy that freezes to described first Application program is freezed.
A kind of terminal, including memory and processor store computer-readable instruction, described instruction in the memory When being executed by the processor, so that the step of processor executes the method.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor The step of method is realized when row.
Above-mentioned application freezing method, device, terminal and computer readable storage medium are transported on the terminal by obtaining The first capable application program detects whether that there is second be under same User Identity with first application program answers It detects whether second application program is in normal operating conditions when there are second application program with program, is needing When freezing first application program, if second application program is in normal operating conditions, answered according to described second The working condition locating for program takes the corresponding default strategy that freezes to freeze first application program, being capable of basis The working condition of different application under same User Identity realizes intelligentized freeze operation, and guarantee is freezed not occur different Often, user experience is promoted.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the schematic diagram of internal structure of terminal in one embodiment;
Fig. 2 is the part frame schematic diagram of the system in one embodiment in terminal;
Fig. 3 is the flow diagram that freezing method is applied in one embodiment;
Fig. 4 is the flow diagram that freezing method is applied in another embodiment;
Fig. 5 is the flow diagram that freezing method is applied in another embodiment;
Fig. 6 is the flow diagram that freezing method is applied in another embodiment;
Fig. 7 is the flow diagram that freezing method is applied in another embodiment;
Fig. 8 is the structural block diagram that freezing plant is applied in one embodiment;
Fig. 9 is the block diagram of the part-structure of mobile phone relevant to terminal provided by the embodiments of the present application.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and It is not used in restriction the application.
Unless otherwise defined, all technical and scientific terms used herein and the technical field for belonging to the application The normally understood meaning of technical staff is identical.The term used in the description of the present application is intended merely to description tool herein The purpose of the embodiment of body, it is not intended that limitation the application.It is appreciated that term " first " used in this application, " second " Etc. can be used to describe various elements herein, but these elements should not be limited by these terms.These terms are only used to by first A element and another element are distinguished.For example, in the case where not departing from scope of the present application, journey can be applied by first Sequence is known as the second application program, and similarly, can by second into application program be the first application program.First application program and Two application programs both application program, but it is not same application.
In one embodiment, as shown in Figure 1, providing a kind of schematic diagram of internal structure of terminal.The terminal includes logical Cross processor, memory and the display screen of system bus connection.Wherein, the processor is for providing calculating and control ability, branch Support the operation of entire terminal.Memory for storing data, program, and/or instruction code etc., store at least one on memory Computer program, the computer program can be executed by processor, to realize that is provided in the embodiment of the present application is suitable for terminal Using freezing method.Memory may include that magnetic disk, CD, read-only memory (Read-Only Memory, ROM) etc. are non-easily The property lost storage medium or random access memory (Random-Access-Memory, RAM) etc..For example, in one embodiment In, memory includes non-volatile memory medium and built-in storage.Non-volatile memory medium is stored with operating system, database And computer program.It is stored in the database for realizing a kind of application freezing method phase provided by above each embodiment The data of pass, for example the information such as title, committed memory size of each application or process can be stored with.The computer program can quilt Performed by processor, to apply freezing method for realizing a kind of provided by each embodiment of the application.Built-in storage is non- Operating system, database and computer program in volatile storage medium provide the running environment of cache.Display screen can It to be touch screen, for example is capacitance plate or electrical screen, it, can also quilt for showing the interface information of the corresponding application of the first process For detecting the touch operation for acting on the display screen, corresponding instruction is generated, for example carry out the switching command of front and back application Deng.
It will be understood by those skilled in the art that structure shown in Fig. 1, only part relevant to application scheme is tied The block diagram of structure, does not constitute the restriction for the terminal being applied thereon to application scheme, and specific terminal may include than figure Shown in more or fewer components, perhaps combine certain components or with different component layouts.Such as the terminal further includes The network interface connected by system bus, network interface can be Ethernet card or wireless network card etc., for the end with outside End is communicated, for example be can be used for same server and communicated.
In one embodiment, as shown in Fig. 2, providing a kind of part architecture diagram of terminal.Wherein, the framework of the terminal It include JAVA space layer 210, local ccf layer 220 and kernel (Kernel) space layer 230 in system.JAVA space layer 210 On may include freezing and thawing using 212, terminal can be freezed and thaw to apply 212 to freeze each application to realize by this Strategy does freeze operation to the related application of backstage power consumption.It include resource prioritization and limitation management mould in local ccf layer 220 Block 222 and platform freezing pipe manage module 224.Terminal can be different with 222 real-time servicing of limitation management module by resource prioritization Application in the tissue of different priorities and different resource, and adjust according to the demand on upper layer the resource group of application program Not to reach optimization performance, the effect of power consumption is saved.Terminal can freeze management module 224 by platform can freeze on backstage Task according to the length for entering freeze-off time, be assigned to the frozen crust of corresponding preset different levels, optionally, the frozen crust May include three, be respectively: CPU limitation sleep pattern, CPU freeze sleep pattern, process deep freezing mode.Wherein, CPU is limited Sleep pattern processed, which refers to, limits the occupied cpu resource of associated process, and associated process is made to occupy less cpu resource, By vacant cpu resource to other not frozen processes inclinations, limit the occupancy to cpu resource, also accordingly limit into Occupancy of the journey to Internet resources and I/O interface resource;CPU freezes sleep pattern and refers to forbid associated process using CPU, and protects The occupancy to memory is stayed, when being forbidden to use cpu resource, corresponding Internet resources and I/O interface resource are also prohibited from using; Process deep freezing mode refers in addition to being forbidden to use cpu resource, further to the occupied memory source of associated process into Row recycling, the memory of recycling use for other processes.It include UID management module 231, Cgroup mould in kernel spacing layer 230 Block 232, Binder, which manage module 233, proceeding internal memory recycling module 234 and freeze time-out, exits module 235.Wherein, UID is managed Module 231 is managed for realizing User Identity (User Identifier, UID) Lai Guanli third-party application based on application Resource or freezed.It is compared to and (Process Identifier, PID) Lai Jinhang process pipe is identified based on process identity Control is more convenient for being managed collectively the resource of the application of a user by UID.Cgroup module 232 is a set of perfect for providing Central processing unit (Central Processing Unit, CPU), CPUSET, memory (memory), input/output (input/ Output, I/O) and the relevant resource constraint mechanism of Net.Binder control module 233 communicates for realizing backstage binder The control of priority.Wherein, the interface module of local ccf layer 220 includes binder interface of the exploitation to upper layer, the frame on upper layer Frame or the instruction for sending resource constraint using the binder interface by offer or freezing are to resource prioritization and limitation Management module 222 and platform freezing pipe manage module 224.Proceeding internal memory recycling module 234 for realizing process deep freezing mode, The file area of process can be mainly discharged when some third-party application is chronically at frozen state in this way, to reach To the module for saving memory, also accelerates this and apply the speed in starting next time.Freeze time-out and exit module 235 to have decided for solution Now freeze the exception that overtime scene generates.By above-mentioned framework, it can be achieved that in each embodiment of the application application the side of freezing Method.
In one embodiment, as shown in figure 3, provide it is a kind of using freezing method, for freeze to run in terminal Application program.The present embodiment is applied to be illustrated for terminal as shown in Figure 1 in this way.This applies freezing method, packet It includes:
Step 302: obtaining the first application program run on the terminal, detect whether exist and first application Program is in the second application program under same User Identity.
Wherein, application program (Application, APP) refers to complete the computer program of a certain or multinomial particular job, It operates in user mode, can interact with user, has visual user interface.The present embodiment is with Android operation system For (Android OS), in Android operation system, each application program has a User Identity (User Identification, Uid), just identical two application programs of only Uid can be with shared data, for example, in order to share two The data of different application application program A and application program B can be arranged by setting shared Uid (shared Uid) For same Uid, then application program A and application program B can call mutually data in the process of running, if conversely, using journey Sequence A is not identical as the Uid of application program B, then application program A and application program B cannot arbitrarily call data.It is understood that It is that in other operating systems, such as IOS, Symbian etc. also has identical or corresponding data tune between different application Use principle.
The first application program run in terminal can be foreground application, be also possible to background application, obtain The Uid of first application program detects whether there is the second application program identical with the Uid of first application program, so as to With judge the first application program whether with other applications there are mutual call relations, and then may determine that and directly freeze first Whether application program can have an impact other applications.It is appreciated that identical with the Uid of the first application program second answers With program, there may be one or more, likewise, the second application program can be foreground application, are also possible to backstage and answer Use program.
Step 304: when there are second application program, detecting whether second application program is in normal work State.
The second application program identical with the Uid of the first application program if it exists, then it represents that the first application program and other There is the relationship mutually called in application program, at this time to freeze the first application program, need to detect total with first application program The operating status for enjoying the second application program of data to carry out the first application program in conjunction with the operating status of the second application program Freeze.
In one embodiment, terminal can be examined according to preset frequency or according to the user operation instruction detected The process for surveying the second application program, the process status by detecting the second application program obtain the current operation of the second application program State.The operation of one application program is usually to be embodied by the operation of relevant multiple processes.Foreground application operation When the process that is related to be foreground process, the process that background application is related to when running is background process.Optionally, it can obtain Take the process identification (PID) of the second application program, process identification (PID) is used for the corresponding process of unique identification, can number by presetting digit capacity, word The combination of one or more of female or other characters is constituted.For example, process A can be indicated with process identification (PID) " 0001 ", Process B etc. is indicated with " 1234 ", detects operating status locating for the process of different process identification (PID)s, so as to know the second application Program is work in background operation state or front stage operation state.
Step 306: when needing to freeze first application program, if second application program, which is in, works normally shape State, then the working condition according to locating for second application program takes corresponding preset to freeze strategy to described first using journey Sequence is freezed.
Wherein, normal operating conditions includes but is not limited to front stage operation state, backstage hold mode.Specifically, terminal is worked as The corresponding application program of operation pages for the application program that preceding display interface is shown is the currently running foreground application journey of terminal Sequence.In the present embodiment, the only corresponding application program of input focus is only foreground application, alternatively, being only located at operation The corresponding application program of the window object of the stack top of the window stack of system is only terminal currently corresponding foreground application.It is true Whether the application program that sets the goal is foreground application, obtains window object corresponding with destination application, and judge the window Whether mouth object is located at the stack top of the window stack of operating system, if so, illustrate that the destination application is foreground application, If it is not, then illustrating that the application program is background application in running background.Foreground application works in front stage operation shape State, background application work in background operation state;Backstage hold mode refers to that an application work is transported on backstage Row state, but user has use demand to the application program, and the application program is needed to remain background operation state, such as music Player, usual user can enter other procedure operation interfaces after opening music, and music players work is on backstage at this time Hold mode, music will continue to play.
Terminal can judge whether to need to freeze the first application program according to the working condition of the first application program, if first Application work is in background operation state, can be by the first application and when user is not needed temporarily using the first application program Program is freezed, if detecting at this time, the second application program is in normal operating conditions, due to the first application program and the second application The Uid of program is identical, and directly freezing the first application program will affect the operation of the second application program, freezes plan according to default at this time Slightly the first application program is freezed, it is ensured that exception does not occur in the work of the first application program and the second application program.
It is above-mentioned to apply freezing method, by obtaining the first application program run on the terminal, detect whether exist It is in the second application program under same User Identity with first application program, when there are second application programs When, detect whether second application program is in normal operating conditions, when needing to freeze first application program, if institute It states the second application program and is in normal operating conditions, then the working condition according to locating for second application program is taken corresponding The default strategy that freezes freezes first application program, can be according to the different application under same User Identity Working condition realizes intelligentized freeze operation, and guarantee freezes exception do not occur, promotes user experience.
In one embodiment, as shown in figure 4, it is described detect whether to exist with first application program be in same use The second application program under the identity of family, comprising the following steps:
Step 402: obtaining the User Identity that operating system distributes to first application program.
Under default situations, Android operation system can give one mutually different Uid of common grade of each application assigned, It can only be that the Uid of different application is identical, this allows for different application if different application needs to call mutually Shared data between program is provided with certain safety, and data cannot be arbitrarily obtained between each application program, and Each application program corresponds to only one Uid.Terminal reads the Uid of the first application program, judges whether there is and the first application Identical second application program of the Uid of program.
Step 404: having shared data and the identical application of User Identity with first application program when existing When program, the application program that will mutually call with first application program is as the second application program.
Further, terminal, which detects whether to exist, the application program of shared data with the first application program, when detecting When having other applications and the first Application sharing data, the Uid of the application program is obtained, if the Uid of the application program It is identical as the Uid of the first application program, then it is assumed that the application program is that can mutually call with the first application program second answers Use program.Such situation often has in the different application of same company research and development, such as two products have done in a company, only Think to call mutually between the two products, sets one for the Uid pressure of two software then shared Uid can be used Sample, the signature document with the said firm's signature must be used just to can be carried out data sharing in this case.It optionally, can be with Be system carry software Shared Uid under different application.
It is above-mentioned to apply freezing method, it is under same User Identity by detecting whether to exist with the first application program The second application program, when there are second application program, can come in conjunction with the operating status of the second application program for First application program is freezed, and avoids due to directly freezing the first application program and causes the second application program normal Operation guarantees that the operation of application program is unaffected while saving memory source, promotes user experience.
In one embodiment, during freezing to the first application program, whether the second application program of detection is located In normal operating conditions, if the second application program is in front stage operation state, freeze the first application program, keeps the second application The operating status of program is constant.When needing to freeze the first application program, and detect identical with the Uid of the first application program Two application programs are in front stage operation state, the use if directly freezing the first application program at this time, with the login of the first application program Uid identical second application program B in family can also be freezed based on user group, it is therefore desirable to which strategy is freezed in change, so that with answering from the background User group is no longer based on the identical other application of user Uid of login to freeze.
Specifically, as shown in figure 5, described freeze first application program, the operation of second application program is kept State is constant, comprising:
Step 502: obtaining all process identification (PID)s under the User Identity.
Wherein, process identification (PID) (Process identification;Pid process ID) is indicated, process (process) is meter Program in calculation machine is that system carries out the substantially single of Resource Distribution and Schedule about the primary operation activity on certain data acquisition system Position, is the basis of operating system configuration.The operation of one application is usually to be embodied by the operation of relevant multiple processes.Into Journey mark includes the process identification (PID) of the first application program and the process identification (PID) of the second application program.
The present embodiment reads all process identification (PID)s under same Uid, for example, application program " Jingdone district " generates when running Two processes: the first process 12041 and the second process 12607 are shown in the path library/proc/12041/cmdline The file content for showing the first process is " com.jingdong.app.mall ", on the road library/proc/12607/cmdline The file content that the second process is shown in diameter is " com.jingdong.app.mall:jdpush ", and two processes all include " capital East " packet name " com.jingdong.app.mall ", by obtain packet name " com.jingdong.app.mall " it is relevant into Journey can find all processes of application program " Jingdone district " at runtime.
Step 504: the process identification (PID) of first application program is filtered out according to the file packet name of the first application program.
The file packet name of application program is recorded in library, inquires difference by reading file Bao Mingke in library The file packet name of application program.Such as passage path kernel/proc/pid/cmdline may be read into comprising " packet name: process " shape The file of formula.Process only comprising the first application file packet name can be filtered out according to the file packet name of the first application program Mark, to obtain the process identification (PID) of the first application program.
Step 506: freezing the background process of first application program according to the process identification (PID) of first application program.
Specifically, after the process identification (PID) for obtaining the first application program, can be frozen according to the process identification (PID) of the first application program The background process of the first application program of knot, such as freeze to own/proc/pid/cmdline includes the first application package name pid.The associated process for having freezed the first application program by way of freezing process, without influencing and the first application program The operating status of identical second application program of Uid.
In one embodiment, during freezing to the first application program, whether the second application program of detection is located In normal operating conditions, if the second application program is in front stage operation state and the second application program depends on first to apply journey When sequence, keep the operating status of the first application program and the second application program constant.
Wherein, relying on indicates that an application program needs to be used in the data ability of another or multiple application programs Smoothly realize the relationship of the execution to an application program.There are two application programs of dependence, are respectively relied on Application program and dependence application program, terminal will test out by the background application relied on by the first application program make For the second application program.When the first application program is relied on by the second application program under same Uid, not to the first application program Freezed with the second application program.
For example, application program A is relied on dependent on application program B or application program B by application program A, that is, indicates to answer It is needed just to be able to achieve the execution to application program A using the data of application program B with program A, at this point, application program A is The second application program relied on, application program B is the first application program.It is to be appreciated that the application program relied on is also possible to For the first application program, the second application program may be background application.Terminal can be carried out from background application set Detection whether there is the application program relied on by the first application program to inquire.
In one embodiment, during freezing to the first application program, whether the second application program of detection is located In normal operating conditions, if the second application program is in abnormal operating state, when needing to freeze the first application program, freeze First application program and second application program of the knot under same User Identity.
It is provided in this embodiment to freeze using freezing method when second application program is in front stage operation state First application program keeps the operating status of second application program constant;If the second application program is in foreground fortune When row state and the second application program depend on the first application program, the fortune of the first application program and the second application program is kept Row state is constant;If the second application program is in abnormal operating state, when needing to freeze the first application program, freeze to locate The first application program and the second application program under same User Identity.Can intelligentized combination be in same user The working condition of different application under identity realizes the freezing method to application, increases freezing range, preferably excellent Change system resource.
In one embodiment, as shown in fig. 6, in the default strategy that freezes of the basis to first application program progress It is further comprising the steps of before freezing:
Step 602: detection acts on the operation information of first application program;The operation information includes mode of operation With operating time point.
When opening application program in terminal, application program can listen to the operation information of user's input.It needs to illustrate It is that the operation information includes the mode of operation and operating time point of user's input.Wherein, mode of operation includes at least key, language Sound, touch, fingerprint, scanning etc. input mode of operation.Meanwhile when receiving the operation information of user's input, it can also obtain and work as The operating time point of preceding input.For example, user is listened to when using the application program when an application program is opened, The input of the different operations modes such as all the input information, such as voice, touch of received user, while also will record current The corresponding input time point of input mode, as voice inputs -- 20:00:00;Touch input -- 20:00:01 etc..
Step 604: determining whether current time needs to freeze first application program according to the operation information.
Each application program corresponds to one or more freezing conditions, and corresponding freezing condition can be according to reception user The mode of operation of input determines.Wherein it is possible to set, the corresponding freezing condition of a mode of operation, for example, touch operation The corresponding freezing condition of mode is the first freezing condition, and the corresponding freezing condition of voice operating mode is the second freezing condition, is swept Retouching the corresponding freezing condition of mode of operation is third freezing condition etc..That is, each operation side that each application can arrive Formula can correspond to a kind of freezing condition.
Further, freezing condition is time conditions, can set the corresponding time freezing condition of each mode of operation, should Time freezing condition can be understood as when not hearing a certain operation information in preset duration, then it is assumed that meeting the time freezes Condition.
It should be noted that the mode of operation of each application is different, the corresponding jelly of mode of operation of the same race of different application Knot condition may be identical, it is also possible to different.
According to preset mapping relations, according to the operation information of monitoring it may determine that whether current time needs pair First application program carries out freeze operation.
In one embodiment, as shown in fig. 7, described determine whether current time needs to freeze according to the operation information First application program, comprising the following steps:
Step 702: when obtaining the operation information nearest apart from current time, and recording the operation of the operation information Between point apart from current time time interval.
When the application program operation in terminal, terminal can listen to the operation information of user's input, wherein mode of operation Mode of operation is inputted including at least key, voice, touch, fingerprint, scanning etc..Meanwhile when the operation letter for receiving user's input When breath, operating time point currently entered can be also obtained.
Wherein, nearest operation information can be application program since this starting, and all receives what user inputted In operation information, operation information corresponding to the shortest operating time point of time interval with current time.
If current time is evening 20:30:00, the foreground of terminal is currently running the first application program at this time, and user makes During with the first application program, can the display page to the application program operate, terminal can real-time monitoring users it is defeated The operation information entered.At current time (20:30:00), terminal can be obtained apart from current time (20:30:00) the last prison The operation information (mode of operation and operating time point) heard, if mode of operation is touch operation in the nearest operation information Mode, operating time point are 20:20:00, then the available time interval apart from current time, which is 10 points Clock.
Step 704: when the time interval meets default freezing condition, then needing to freeze first application program.
Specifically, default freezing condition can be time conditions, it is each apply front stage operation history run duration not Together, the mode of operation for receiving user's input may also be different, and corresponding freezing condition can be set for each application.Example Such as, the first application work is in front stage operation state, and freezing condition mode of operation can be divided based on the received, If the first application program does not hear touch operation in the first preset duration, meet first freezing condition;Wherein, One preset duration is related to the frequency of use in historical operation record, when the first preset duration is greater than the use of touch operation mode When the presupposition multiple of frequency (120 beats/min), then it can be assumed that, in the first preset duration, which will not be again It generates, it can be assumed that the first application program being currently running currently is not used in user, needs to freeze first application program.
Optionally, when the first application work is in front stage operation state, if not heard in the second preset duration When voice operating, then meet second freezing condition.Wherein, the second preset duration and the frequency of use phase in historical operation record It closes, when the second preset duration is greater than the presupposition multiple of the frequency of use (1 time/5 minutes) of voice operating mode, then can recognize Fixed, in the second preset duration, which will not generate again, show that assert that user is currently not used currently is transporting The first capable application program needs to freeze first application program.
It should be noted that the first preset duration, the second preset duration can be set according to the demand of user, herein not It is further to be limited.
In one embodiment, default freezing condition, which can further include, detects whether there are user, when between the time When meeting the default freezing condition, it can assert, user does not operate the application program at this time, is detected by terminal Whether facial image is it may determine that whether there is user before present terminal for the visible area of present terminal.Wherein, visible area It is to be understood that the region of terminal can be used normally in user, it is understood that be the distance between user and terminal, the distance For the comfort distance of user's using terminal.
Specifically, whether there is people before terminal can be detected by face recognition technology.Recognition of face is based on people A kind of biological identification technology of facial feature information progress identification.Contained with video camera or camera (front camera) acquisition There are the image or video flowing of facial image, and automatic detection and tracking facial image in the picture, and then to the face detected Image carries out a series of the relevant technologies of face, usually also referred to as Identification of Images, face recognition.By terminal processes, if identification Facial image out then shows user just in the display area of viewing terminal, and only the user does not operate terminal;If not depositing In facial image, then show that first application program can be freezed in using terminal currently without user.When there is no face figures When picture, show active user far from the terminal, the first application program being currently running can be freezed, to save power consumption.
In one embodiment, this applies freezing method further include: what acquisition thawed to first application program It thaws and instructs;Whether the biological information detected in the instruction of thawing matches with preset biological characteristic;When the solution When the biological information and preset biological characteristic frozen in instruction matches, defrosting behaviour is carried out to first application program Make.
That is, when needing to carry out the first application program defrosting processing, needing to obtain after the first application program is frozen The defrosting instruction of user's input.Thawing includes biological information in instructing, wherein biological information can be believed for fingerprint Breath, iris information, voiceprint, facial information etc..
It should be noted that different applications can set different biological informations, identical life can also be set Object characteristic information can carry out customized setting according to the demand of user.
When the biological information in instruction of thawing matches with preset biological information, then to background application journey Sequence carries out defrosting operation.When defrosting operation, it can also realize according to corresponding defrosting strategy is set with strategy is freezed to first The defrosting of application program operates.
In one embodiment, as shown in figure 8, providing a kind of using freezing plant, which includes:
Obtain module 810, for obtaining the first application program run on the terminal, detect whether in the presence of with it is described First application program is in the second application program under same User Identity;
Detection module 820, for detecting whether second application program is in when there are second application program Normal operating conditions;
Freeze module 830, for when needing to freeze first application program, if second application program is in just Normal working condition, then the working condition according to locating for second application program takes the corresponding default strategy that freezes to described the One application program is freezed.
In one embodiment, acquisition module 810 is also used to obtain operating system and distributes to first application program User Identity;There is shared data with first application program and User Identity is identical using journey when existing When sequence, the application program that will mutually call with first application program is as the second application program.
In one embodiment, freeze module 830 to be also used to when second application program is in front stage operation state, Freeze first application program, keeps the operating status of second application program constant.
In one embodiment, freeze module 830 and be also used to obtain all process identification (PID)s under the User Identity; The process identification (PID) includes the process identification (PID) of the first application program and the process identification (PID) of the second application program;Journey is applied according to first The file packet name of sequence filters out the process identification (PID) of first application program;Frozen according to the process identification (PID) of first application program Tie the background process of first application program.
In one embodiment, freeze module 830 be also used to when second application program be in front stage operation state and When second application program depends on first application program, first application program and the second application program are kept Operating status is constant.
It is above-mentioned to apply freezing plant, the first application program run on the terminal, inspection are obtained by obtaining module 810 It surveys with the presence or absence of with first application program being in the second application program under same User Identity, when there are described the When two application programs, detection module 820 detects whether second application program is in normal operating conditions, if described second answers It is in normal operating conditions with program, then when needing to freeze first application program, freezes module 830 and is freezed according to default Strategy freezes first application program, can be according to the working condition of the different application under same User Identity Realize intelligentized freeze operation, guarantee freezes exception do not occur, promotes user experience.
The above-mentioned division using modules in freezing plant is only used for for example, in other embodiments, can will answer It is divided into different modules, as required with freezing plant to complete above-mentioned all or part of function using freezing plant.
The embodiment of the present application also provides a kind of computer readable storage mediums.One or more is executable comprising computer The non-volatile computer readable storage medium storing program for executing of instruction, when the computer executable instructions are executed by one or more processors When, so that the processor is executed applies freezing method as described in the various embodiments described above.
The embodiment of the present application also provides a kind of computer program products.A kind of computer program product comprising instruction, When run on a computer, so that computer, which executes, applies freezing method described in the various embodiments described above.
The embodiment of the present application also provides a kind of terminals.As shown in figure 9, for ease of description, illustrate only and the application The relevant part of embodiment, it is disclosed by specific technical details, please refer to the embodiment of the present application method part.The terminal can be Including mobile phone, tablet computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of Sales, point-of-sale terminal), vehicle-mounted computer, any terminal device such as wearable device, taking the terminal as an example:
Fig. 9 is the block diagram of the part-structure of mobile phone relevant to terminal provided by the embodiments of the present application.With reference to Fig. 9, mobile phone It include: radio frequency (Radio Frequency, RF) circuit 910, memory 920, input unit 930, display unit 940, sensor 950, voicefrequency circuit 960, Wireless Fidelity (wireless fidelity, WiFi) module 970, processor 980 and power supply 990 Equal components.It will be understood by those skilled in the art that handset structure shown in Fig. 9 does not constitute the restriction to mobile phone, may include Than illustrating more or fewer components, certain components or different component layouts are perhaps combined.
Wherein, RF circuit 910 can be used for receiving and sending messages or communication process in, signal sends and receivees, can be by base station After downlink information receives, handled to processor 980;The data of uplink can also be sent to base station.In general, RF circuit include but Be not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier (Low Noise Amplifier, LNA), duplexer etc..In addition, RF circuit 910 can also be communicated with network and other equipment by wireless communication.Above-mentioned channel radio Any communication standard or agreement, including but not limited to global system for mobile communications (Global System of can be used in letter Mobile communication, GSM), general packet radio service (General Packet Radio Service, GPRS), CDMA (Code Division Multiple Access, CDMA), 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..
Memory 920 can be used for storing software program and module, and processor 980 is stored in memory 920 by operation Software program and module, thereby executing the various function application and data processing of mobile phone.Memory 920 can mainly include Program storage area and data storage area, wherein program storage area can application journey needed for storage program area, at least one function Sequence (such as application program, application program of image player function of sound-playing function etc.) etc.;Data storage area can store root Created data (such as audio data, address list etc.) etc. are used according to mobile phone.In addition, memory 920 may include high speed Random access memory, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or Other volatile solid-state parts.
Input unit 930 can be used for receiving the number or character information of input, and generate the user setting with mobile phone 900 And the related key signals input of function control.Specifically, input unit 930 may include touch panel 931 and other inputs Equipment 932.Touch panel 931, alternatively referred to as touch screen collect touch operation (such as the user of user on it or nearby Use the operation of any suitable object or attachment such as finger, stylus on touch panel 931 or near touch panel 931), And corresponding attachment device is driven according to preset formula.In one embodiment, touch panel 931 may include touching inspection Survey two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation Bring signal, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and will It is converted into contact coordinate, then gives processor 980, and can receive order that processor 980 is sent and be executed.In addition, Touch panel 931 can be realized using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch surface Plate 931, input unit 930 can also include other input equipments 932.Specifically, other input equipments 932 may include but not It is limited to one of physical keyboard, function key (such as volume control button, switch key etc.) etc. or a variety of.
Display unit 940 can be used for showing information input by user or be supplied to user information and mobile phone it is various Menu.Display unit 940 may include display panel 941.In one embodiment, liquid crystal display (Liquid can be used Crystal Display, LCD), the forms such as Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED) To configure display panel 941.In one embodiment, touch panel 931 can cover display panel 941, when touch panel 931 is examined After measuring touch operation on it or nearby, processor 980 is sent to determine the type of touch event, is followed by subsequent processing device 980 provide corresponding visual output according to the type of touch event on display panel 941.Although in Fig. 9, touch panel 931 and display panel 941 are the input and input function for realizing mobile phone as two independent components, but in certain implementations In example, can be integrated by touch panel 931 and display panel 941 and that realizes mobile phone output and input function.
Mobile phone 900 may also include at least one sensor 950, 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 941, and proximity sensor can close display panel when mobile phone is moved in one's ear 941 and/or backlight.Motion sensor may include acceleration transducer, can detect by acceleration transducer and adds in all directions The size of speed can detect that size and the direction of gravity when static, can be used to identify application (such as the horizontal/vertical screen of mobile phone posture Switching), Vibration identification correlation function (such as pedometer, tap) etc.;In addition, mobile phone can also configure gyroscope, barometer, humidity Other sensors such as meter, thermometer, infrared sensor etc..
Voicefrequency circuit 960, loudspeaker 961 and microphone 962 can provide the audio interface between user and mobile phone.Audio-frequency electric Electric signal after the audio data received conversion can be transferred to loudspeaker 961, be converted to sound by loudspeaker 961 by road 960 Signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 962, is turned after being received by voicefrequency circuit 960 It is changed to audio data, then by after the processing of audio data output processor 980, another mobile phone can be sent to through RF circuit 910, or Person exports audio data to memory 920 so as to subsequent processing.
WiFi belongs to short range wireless transmission technology, and mobile phone can help user's transceiver electronics postal by WiFi module 970 Part, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 9 is shown WiFi module 970, but it is understood that, and it is not belonging to must be configured into for mobile phone 900, it can according to need and omit.
Processor 980 is the control centre of mobile phone, using the various pieces of various interfaces and connection whole mobile phone, is led to It crosses operation or executes the software program and/or module being stored in memory 920, and call and be stored in memory 920 Data execute the various functions and processing data of mobile phone, to carry out integral monitoring to mobile phone.In one embodiment, it handles Device 980 may include one or more processing units.In one embodiment, processor 980 can integrate application processor and modulation Demodulator, wherein the main processing operation system of application processor, User Page and application program etc.;Modem is mainly located Reason wireless communication.It is understood that above-mentioned modem can not also be integrated into processor 980.For example, the processor 980 can integrate application processor and baseband processor, baseband processor with and the composable modem such as other peripheral chips. Mobile phone 900 further includes the power supply 990 (such as battery) powered to all parts, it is preferred that power supply can pass through power management system It unites logically contiguous with processor 980, to realize the function such as management charging, electric discharge and power managed by power-supply management system Energy.
In one embodiment, mobile phone 900 can also include camera, bluetooth module etc..
In the embodiment of the present application, when processor included by the mobile phone executes the computer program of storage on a memory It realizes and applies freezing method described in the various embodiments described above.
When the execution of the computer program run on a processor, it can be answered according to the difference under same User Identity Working condition realizes intelligentized freeze operation, and guarantee freezes exception do not occur, promotes user experience.
Any reference to memory, storage, database or other media used in this application may include non-volatile And/or volatile memory.Suitable nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), Electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include arbitrary access Memory (RAM), it is used as external cache.By way of illustration and not limitation, RAM is available in many forms, such as It is static RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM).
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously The limitation to the application the scope of the patents therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, without departing from the concept of this application, various modifications and improvements can be made, these belong to the guarantor of the application Protect range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of apply freezing method, for freezing the application program run in terminal, which comprises
The first application program run on the terminal is obtained, detects whether to exist with first application program in same The second application program under User Identity;
When there are second application program, detect whether second application program is in normal operating conditions;
When needing to freeze first application program, if second application program is in normal operating conditions, according to institute Stating working condition locating for the second application program takes the corresponding default strategy that freezes to freeze first application program.
2. the method according to claim 1, wherein it is described detect whether exist at first application program The second application program under same User Identity, comprising:
Obtain the User Identity that operating system distributes to first application program;Wherein, each application program is corresponding with One User Identity;
It, will when existing has shared data and the identical application program of User Identity with first application program Enough application programs mutually called with first application program are as the second application program.
3. the method according to claim 1, wherein the basis is default to freeze strategy to described first using journey Sequence is freezed, comprising:
When second application program is in front stage operation state, freeze first application program, keeps described second to answer It is constant with the operating status of program.
4. according to the method described in claim 3, it is characterized in that, described freeze first application program, described the is kept The operating status of two application programs is constant, comprising:
Obtain all process identification (PID)s under the User Identity;The process identification (PID) includes the process mark of the first application program Know the process identification (PID) with the second application program;
The process identification (PID) of first application program is filtered out according to the file packet name of the first application program;
Freeze the background process of first application program according to the process identification (PID) of first application program.
5. the method according to claim 1, wherein in the default strategy that freezes of the basis to first application Before program is freezed, further includes:
Detection acts on the operation information of first application program;The operation information includes mode of operation and operating time Point;
Determine whether current time needs to freeze first application program according to the operation information.
6. according to the method described in claim 5, it is characterized in that, whether described determine current time according to the operation information Need to freeze first application program, comprising:
The operation information nearest apart from current time is obtained, and the operating time point distance for recording the operation information is current The time interval at moment;
When the time interval meets default freezing condition, then need to freeze first application program.
7. the method according to claim 1, wherein further include:
It obtains and the defrosting that first application program is thawed is instructed;
Whether the biological information detected in the instruction of thawing matches with preset biological characteristic;
When the biological information in the instruction of thawing matches with preset biological characteristic, to first application program Carry out defrosting operation.
8. a kind of apply freezing plant characterized by comprising
Module is obtained, for obtaining the first application program run on the terminal, detects whether to exist and be answered with described first The second application program under same User Identity is in program;
Detection module, for detecting whether second application program is in normal work when there are second application program Make state;
Freeze module, for being worked normally if second application program is in when needing to freeze first application program State, then the working condition according to locating for second application program takes the corresponding default strategy that freezes to first application Program is freezed.
9. a kind of terminal, including memory and processor, computer-readable instruction, described instruction quilt are stored in the memory When the processor executes, so that the step of processor executes the method as described in any one of claims 1 to 7.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method as described in any one of claims 1 to 7 is realized when being executed by processor.
CN201711488951.8A 2017-12-29 2017-12-29 Application freezing method, device, terminal and computer readable storage medium Active CN109992376B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711488951.8A CN109992376B (en) 2017-12-29 2017-12-29 Application freezing method, device, terminal and computer readable storage medium
PCT/CN2018/116717 WO2019128562A1 (en) 2017-12-29 2018-11-21 Application freezing method and apparatus, and terminal and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711488951.8A CN109992376B (en) 2017-12-29 2017-12-29 Application freezing method, device, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109992376A true CN109992376A (en) 2019-07-09
CN109992376B CN109992376B (en) 2023-11-10

Family

ID=67063062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711488951.8A Active CN109992376B (en) 2017-12-29 2017-12-29 Application freezing method, device, terminal and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN109992376B (en)
WO (1) WO2019128562A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111381952A (en) * 2020-03-12 2020-07-07 腾讯科技(深圳)有限公司 Process freezing method, device, terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020964A (en) * 2016-06-30 2016-10-12 宇龙计算机通信科技(深圳)有限公司 Method and device for freezing application, and terminal
CN106250185A (en) * 2016-07-29 2016-12-21 宇龙计算机通信科技(深圳)有限公司 The control method of application program, control device and terminal
CN106648767A (en) * 2016-12-08 2017-05-10 宇龙计算机通信科技(深圳)有限公司 Application freezing method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020964A (en) * 2016-06-30 2016-10-12 宇龙计算机通信科技(深圳)有限公司 Method and device for freezing application, and terminal
CN106250185A (en) * 2016-07-29 2016-12-21 宇龙计算机通信科技(深圳)有限公司 The control method of application program, control device and terminal
CN106648767A (en) * 2016-12-08 2017-05-10 宇龙计算机通信科技(深圳)有限公司 Application freezing method and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111381952A (en) * 2020-03-12 2020-07-07 腾讯科技(深圳)有限公司 Process freezing method, device, terminal and storage medium
CN111381952B (en) * 2020-03-12 2023-05-12 腾讯科技(深圳)有限公司 Process freezing method, device, terminal and storage medium

Also Published As

Publication number Publication date
WO2019128562A1 (en) 2019-07-04
CN109992376B (en) 2023-11-10

Similar Documents

Publication Publication Date Title
CN109992378A (en) Using freezing method, device, terminal and computer readable storage medium
CN109144232B (en) Process processing method and device, electronic equipment and computer readable storage medium
CN110018904A (en) Information processing method, device, computer equipment and computer readable storage medium
CN109992438A (en) Information processing method, device, computer equipment and computer readable storage medium
US11082906B2 (en) Terminal behavior triggering method and terminal based on environment parameter and terminal status parameter
CN110008008A (en) Applied program processing method and device, electronic equipment, computer readable storage medium
US11245786B2 (en) Recommendation method and terminal
US11042621B2 (en) PPG authentication method and device
CN109992370A (en) Applied program processing method and device, electronic equipment, computer readable storage medium
CN109445917A (en) Application processing method and device, electronic equipment, computer readable storage medium
CN110018902A (en) Internal memory processing method and device, electronic equipment, computer readable storage medium
CN109992364A (en) Using freezing method, device, computer equipment and computer readable storage medium
CN110032431A (en) Application processing method and device, electronic equipment, computer readable storage medium
CN110032321A (en) Applied program processing method and device, electronic equipment, computer readable storage medium
CN109992380A (en) Applied program processing method and device, electronic equipment, computer readable storage medium
CN110046032A (en) Applied program processing method and device, electronic equipment, computer readable storage medium
CN109992375A (en) Information processing method, device, computer equipment and computer readable storage medium
CN109992323A (en) Process handling method and device, electronic equipment, computer readable storage medium
CN109992522A (en) Application processing method and device, electronic equipment, computer readable storage medium
JP2022008797A (en) Method for reducing power consumption of terminal, and terminal
CN109992360A (en) Process handling method and device, electronic equipment, computer readable storage medium
CN109992309A (en) Applied program processing method and device, electronic equipment, computer readable storage medium
CN110018886A (en) Application state switching method and apparatus, electronic equipment, readable storage medium storing program for executing
CN110032397A (en) Application processing method and device, electronic equipment, computer readable storage medium
CN109992425A (en) Information processing method, device, computer equipment and computer readable storage 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
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

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

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

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

GR01 Patent grant
GR01 Patent grant