WO2019128563A1 - Application freezing method and device, storage medium, and terminal - Google Patents

Application freezing method and device, storage medium, and terminal Download PDF

Info

Publication number
WO2019128563A1
WO2019128563A1 PCT/CN2018/116736 CN2018116736W WO2019128563A1 WO 2019128563 A1 WO2019128563 A1 WO 2019128563A1 CN 2018116736 W CN2018116736 W CN 2018116736W WO 2019128563 A1 WO2019128563 A1 WO 2019128563A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
foreground
freeze
foreground application
freezing
Prior art date
Application number
PCT/CN2018/116736
Other languages
French (fr)
Chinese (zh)
Inventor
陈岩
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019128563A1 publication Critical patent/WO2019128563A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/482Application

Definitions

  • the present application relates to the field of terminal technologies, and in particular, to an application freezing method, apparatus, storage medium, and terminal.
  • the general freeze application mainly determines whether an application should be frozen according to the application running state, whether it is the foreground or the background application.
  • the embodiment of the present application provides an application freezing method, a device, a storage medium, and a terminal, which can improve the intelligence of the terminal by monitoring the operation information received by the foreground application to freeze the application.
  • An application freezing method including:
  • the current foreground application is monitored to receive operation information input by the user;
  • the operation information includes an operation mode and an operation time point;
  • mapping relationship between the operation mode and the freeze condition of each foreground application, and determining, according to the mapping relationship, whether the foreground application needs to be frozen at the current time
  • the foreground application When the foreground application needs to be frozen, the foreground application is frozen according to a preset policy.
  • An application freezing device comprising:
  • a monitoring module configured to: when the current station starts a new application, listen to the currently running foreground application to receive operation information input by the user; the operation information includes an operation mode and an operation time point;
  • a determining module configured to invoke a mapping relationship between an operation mode and a freeze condition of each foreground application, and determine, according to the mapping relationship, whether the foreground application needs to be frozen at the current time;
  • the freezing module is configured to freeze the foreground application according to a preset policy when the foreground application needs to be frozen.
  • a computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to implement the steps of the application freezing method in various embodiments of the present application.
  • a terminal comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor executing the computer program to implement the step of freezing the application in various embodiments of the present application.
  • the application freezing method and device, the storage medium and the terminal provided by the embodiment of the present application, when the current station starts the application, the current foreground application is monitored to receive the operation information input by the user; and the mapping between the operation mode and the freezing condition of each foreground application is invoked. And determining, according to the mapping relationship, whether the current application needs to freeze the foreground application; when the foreground application needs to be frozen, the foreground application is frozen according to the preset policy, and the current user is used to obtain the current user by using the operation information.
  • the usage rate of the application when the user does not input the operation information for a long time, can freeze the foreground application in time to improve the intelligence of the terminal.
  • FIG. 1 is a schematic diagram showing the internal structure of a terminal in an embodiment
  • FIG. 2 is a partial schematic diagram of a system in a terminal in an embodiment
  • FIG. 3 is a flow chart of an application freezing method in an embodiment
  • FIG. 5 is a flowchart of determining whether a current application needs to freeze the foreground application according to the mapping relationship according to the mapping relationship;
  • FIG. 6 is a flowchart of determining, according to the category information of the foreground application, whether the foreground application needs to be frozen according to an embodiment
  • FIG. 7 is a flowchart of freezing a foreground application according to a preset policy in an embodiment
  • FIG. 8 is a flowchart of freezing the foreground application according to a preset policy in another embodiment
  • Figure 10 is a block diagram showing the structure of an application freezing device in an embodiment
  • Figure 11 is a block diagram showing a portion of the structure of a handset in an embodiment.
  • first, second and the like may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another.
  • first frozen condition may be referred to as a second frozen condition
  • second frozen condition may be referred to as a first frozen condition, without departing from the scope of the present invention.
  • Both the first frozen condition and the second frozen condition are frozen conditions, but they are not the same frozen condition.
  • FIG. 1 a schematic diagram of an internal structure of a terminal is provided.
  • the terminal includes a processor, memory, and display connected via a system bus.
  • the processor is used to provide computing and control capabilities to support the operation of the entire terminal.
  • the memory is used to store data, programs, and/or instruction codes, etc., and the memory stores at least one computer program, which can be executed by the processor to implement the application-free application freezing method provided in the embodiments of the present application.
  • the memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random storage memory (Random-Access-Memory, RAM).
  • the memory includes a non-volatile storage medium and an internal memory.
  • Non-volatile storage media stores operating systems, databases, and computer programs.
  • the database stores data related to an application freezing method provided by the above various embodiments, for example, information such as the name of each process or application may be stored.
  • the computer program can be executed by a processor for implementing an application freezing method provided by various embodiments of the present application.
  • the internal memory provides a cached operating environment for operating systems, databases, and computer programs in non-volatile storage media.
  • the display screen can be a touch screen, such as a capacitive screen or an electronic screen, for displaying interface information of an application corresponding to the foreground process, and can also be used for detecting a touch operation acting on the display screen, and generating corresponding instructions, such as performing front and back Application switching instructions, etc.
  • FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the terminal to which the solution of the present application is applied.
  • the specific terminal may include a ratio. More or fewer components are shown in the figures, or some components are combined, or have different component arrangements.
  • the terminal further includes a network interface connected through a system bus, and the network interface may be an Ethernet card or a wireless network card, etc., for communicating with an external terminal, for example, for communicating with a server.
  • a partial architectural diagram of a terminal is provided.
  • the architecture system of the terminal includes a JAVA spatial layer 210, a local framework layer 220, and a kernel (Kernel) spatial layer 230.
  • the freeze and thaw application 210 can be included in the JAVA spatial layer.
  • the freeze and thaw application 210 can be used by the terminal to implement a freeze policy for each application, and freeze the related application of the background power consumption.
  • the resource priority and restriction management module 222 and the platform freeze management module 224 are included in the local framework layer 220.
  • the terminal can maintain different applications in different priorities and different resource organizations through the resource priority and limit management module 222, and adjust the resource group of the application according to the requirements of the upper layer to achieve optimized performance and save power. .
  • the terminal freezes the task that can be frozen in the background by the platform freeze management module 224, and allocates the freeze layer to the preset different levels according to the length of the entry freeze time.
  • the freeze layer may include three, respectively: CPU limit Sleep mode, CPU freeze sleep mode, process deep freeze mode.
  • the CPU restricts the sleep mode to limit the CPU resources occupied by the related processes, so that the related processes occupy less CPU resources, and the free CPU resources are tilted to other unfrozen processes, thereby limiting the occupation of CPU resources.
  • the kernel space layer 230 includes a UID management module 231, a Cgroup module 232, a Binder management module 233, a process memory collection module 234, and a timeout freeze exit module 235.
  • the UID management module 231 is configured to implement an application-based User Identifier (UID) to manage resources of a third-party application or freeze. Compared with the Process Identifier (PID) for process management and control, it is easier to uniformly manage the resources of a user's application through UID.
  • the Cgroup module 232 is used to provide a complete set of Central Processing Unit (CPU), CPUSET, memory, input/output (I/O), and Net related resource restriction mechanisms.
  • the Binder management module 233 is used to implement the priority control of the background binder communication.
  • the interface module of the local framework layer 220 includes a binder interface developed to the upper layer, and the upper layer framework or application sends a resource restriction or frozen instruction to the resource priority and restriction management module 222 and the platform freeze management module 224 through the provided binder interface.
  • the process memory recovery module 234 is configured to implement the process deep freeze mode, so that when a third-party application is in a frozen state for a long time, the file area of the process is mainly released, thereby saving the memory module and speeding up the application next time. The speed at startup.
  • the timeout freeze exit module 235 is configured to solve the abnormality generated by the freeze timeout scenario.
  • an application freezing method for freezing a foreground application of a terminal. This embodiment is described by applying the method to the terminal shown in FIG. 1 as an example.
  • the application freezing method includes steps 302-306. among them,
  • Step 302 When the current station starts the application, the foreground application currently running is monitored to receive operation information input by the user; the operation information includes an operation mode and an operation time point.
  • the operation of an application is usually reflected by the operation of multiple related processes.
  • the process involved in the foreground application runtime is the foreground process
  • the process involved in the background application runtime is the background process.
  • the application corresponding to the operation page of the application displayed by the current display interface of the terminal is the foreground application currently running by the terminal.
  • only the application corresponding to the input focus is the foreground application, or only the application corresponding to the window object at the top of the stack of the window stack of the operating system is the foreground application currently corresponding to the terminal.
  • To determine whether the target application is a foreground application obtain a window object corresponding to the target application, and determine whether the window object is located at the top of the stack of the window stack of the operating system, and if yes, the target application is a foreground application, and if not, the description is The app runs in the background and is a background app.
  • the foreground application When the foreground application is opened, the foreground application will listen to the operation information input by the user.
  • the operation information includes an operation mode and an operation time point input by the user.
  • the operation mode includes at least an input operation mode such as a button, a voice, a touch, a fingerprint, and a scan.
  • the current input operation time point is also obtained. For example, when the application opened by the current station is “Glory of the King”, it monitors all input information of the user, such as voice, touch, and the like, when the user uses the foreground application, and also records the current operation.
  • the input time point corresponding to the input mode such as voice input - 20:00: 00; touch input - 20:00: 01 and so on.
  • Step 304 Invoke each application to receive a mapping relationship between the operation mode input by the user and the freeze condition, and determine, according to the operation information, whether the foreground application needs to be frozen at the current time.
  • each foreground application running in the foreground corresponds to one or more freeze conditions
  • the corresponding freeze condition can be determined according to the operation mode of receiving the user input.
  • the operation mode corresponds to a freeze condition.
  • the freeze condition corresponding to the touch operation mode is the first freeze condition
  • the freeze condition corresponding to the voice operation mode is the second freeze condition
  • the freeze condition corresponding to the scan operation mode is The third freezing condition and so on. That is, each operation mode of each application can correspond to a freeze condition.
  • the freezing condition is a time condition, and a time freezing condition corresponding to each operation mode may be set, and the time freezing condition may be understood to be that when a certain operation information is not monitored within the preset time period, the time freezing condition is considered to be satisfied. .
  • the operation mode of each application is different, and the freezing conditions corresponding to the same operation mode of different applications may be the same or different.
  • the preset mapping relationship according to the operation information of the monitoring, it can be determined whether the current application needs to freeze the foreground application.
  • Step 306 When the foreground application needs to be frozen, the foreground application is frozen according to a preset policy.
  • the foreground application When the foreground application needs to be frozen, the foreground application is frozen according to the preset policy.
  • the corresponding freeze policy may be set according to the monitored operation information to implement the freeze operation on the foreground application.
  • different freeze levels may be set according to the acquired operation information, and the freeze of the foreground application may be implemented according to the freeze level.
  • the foreground application currently being monitored receives the operation information input by the user, and according to the operation information and the preset mapping relationship, it can be determined whether the foreground application needs to be frozen at the current time;
  • the foreground application is frozen according to the preset policy, and the operation information input by the user is received according to the foreground application to decide whether to freeze the foreground application, that is, the operation information can be used to obtain the usage rate of the current user to the foreground application.
  • the user does not input the operation information for a long time, the user can freeze the foreground application in time to improve the intelligence of the terminal.
  • mapping relationship before mapping the relationship between the received operation mode and the freeze condition of each application, the mapping relationship needs to be constructed.
  • step 402-step 406 is included. among them,
  • Step 402 Acquire a historical running time of each running of the application in the foreground and receive a historical operation record input by the user.
  • the terminal obtains the operation information input by the user when each application runs in the foreground, and counts the historical running time of each application running in the foreground and the historical operation record input by the user.
  • the historical running time is a continuous running time of the foreground application;
  • the historical operation record includes a historical operation mode, and a usage frequency corresponding to the operation mode.
  • the historical operation mode includes at least a operation mode such as a button, a voice, a touch, a fingerprint, and a scan, and the usage frequency corresponding to the operation mode is the frequency of use of each operation mode.
  • the terminal When the current running "God Glory” game application (APP), the terminal will record the start time point of turning on or switching from the background to the foreground running "Glory Glory", and ending or switching to the background end time point,
  • the duration between the start time and the end time is the historical run time, such as 40 minutes.
  • the input operation mode of the receiving user includes voice input and touch input. According to the input operation mode, the frequency of use of each operation mode can be obtained, wherein the frequency of use of the touch operation mode is 120 times/minute, and the voice operation is 2 times/minute.
  • the terminal When the current application (APP) of the player such as "OPPO Video Player" is running, the terminal records the startup time point of turning on or switching from the background to the foreground to run the "OPPO Video Player", and ending or switching to the end of the background.
  • the duration between the start time point and the end time point is the historical running time, such as 120 minutes.
  • the input operation mode of the receiving user includes a touch input, a sliding input, and the like. According to the input operation mode, the frequency of use of each operation mode can be obtained, wherein the frequency of the touch input operation mode is 2 times/60 minutes, and the sliding input operation mode is 6 times/60 minutes.
  • Step 404 Set a freeze condition of each foreground application according to the historical running time length and the usage frequency corresponding to the operation mode.
  • the freezing condition is a time condition.
  • the running time of each application running in the foreground is different, and the operation mode of receiving user input may also be different.
  • the corresponding freezing condition can be set for each application. For example, if the game application APP "King of the Glory" running in the foreground, the freezing condition can be divided according to the received operation mode, when the king glory is in the foreground application, if the touch operation is not monitored within the first preset duration And satisfying the first freezing condition; wherein the first preset duration is related to the frequency of use in the historical operation record, when the first preset duration is greater than a preset multiple of the usage frequency of the touch operation mode (120 times/minute) Then, it can be determined that the touch operation mode is not generated again within the first preset time period, and it can be determined that the user is not currently using the currently running foreground application.
  • the second preset duration is related to the frequency of use in the historical operation record.
  • the second preset duration is greater than the preset multiple of the voice operation mode (2 times/1 minute), it may be determined that the second During the preset duration, the voice operation mode will not be generated again, indicating that the user is not currently using the currently running foreground application.
  • first preset duration and the second preset duration may be set according to user requirements, and no further limitation is made.
  • Step 406 Construct a mapping relationship between the operation mode and the freeze condition of each foreground application.
  • each foreground application is set according to the historical running time and the usage frequency corresponding to the operation mode.
  • Each application has one or more operation modes, and each operation mode corresponds to a freeze condition, that is, one application can correspond to multiple freeze conditions.
  • a mapping relationship in which such an application may correspond to a plurality of freeze conditions is graphically represented for identification purposes.
  • the operation mode of the user input that each foreground application can monitor is diverse, and the freezing condition of the application can be set according to the input mode most commonly used by the user, and the freezing condition corresponding to other operation modes is ignored.
  • the priority of the freeze condition may be set according to the frequency of use of the operation mode, and the user's use frequency is higher, and the corresponding freeze condition is used as a priority condition for freezing the application. That is, the freeze of the foreground application may be judged according to the priority of the freeze condition corresponding to the operation mode.
  • the determining, according to the mapping relationship, whether the current time needs to freeze the foreground application includes steps 502-506. among them,
  • Step 502 Acquire the operation information that is closest to the current time, and record the time interval of the latest operation information from the current time.
  • the foreground application monitors the operation information input by the user, and the operation mode includes at least an input operation mode such as a button, a voice, a touch, a fingerprint, and a scan. At the same time, when the operation information input by the user is received, the current input operation time point is also obtained.
  • the latest operation information may be the operation information corresponding to the operation time point of the shortest time interval between the current time and the operation information input by the foreground application from the start of the current application.
  • the terminal will obtain the operation information (operation mode and operation time point) that was last monitored from the current time (20:30:00). If the latest operation information is used, the operation mode For the touch operation mode, the operation time point is 20:20:00, and the time interval from the current time can be obtained, and the time interval is 10 minutes.
  • Step 504 Determine, according to the mapping relationship, whether the time interval satisfies the freezing condition.
  • the set mapping relationship is invoked to obtain the freezing condition corresponding to all the operation modes of the application.
  • the freezing condition is a time condition, and according to the mapping relationship, it can be known whether the acquired time interval satisfies the freezing condition of freezing the foreground application.
  • Step 506 When the freezing condition is met, the terminal detects whether there is a face image in the visible area.
  • the terminal when the time interval satisfies the freezing condition, it can be determined that the user does not operate the foreground application, and the terminal can detect whether the current terminal's visible area is a face image, and the current terminal can be determined. Whether there is a user before.
  • the visible area can be understood as the area where the user can normally use the terminal, and can also be understood as the distance between the user and the terminal, which is the comfortable distance of the user using the terminal.
  • the face recognition technology can be used to detect whether a person exists before the terminal.
  • Face recognition is a biometric recognition technology based on human facial feature information for identification.
  • portrait recognition face recognition.
  • the face image is recognized, it indicates that the user is viewing the display area of the terminal, but the user does not operate the terminal; if there is no face image, it indicates that the current user has been away from the terminal, and the user needs to freeze the Front desk application. That is, step 508: when the face image does not exist, the foreground application needs to be frozen.
  • step 602-606. it is determined whether the foreground application needs to be frozen according to the category information of the foreground application, and further includes steps 602-606. among them,
  • Step 602 When the face image is present, the age feature of the current face image is obtained by the face recognition technology.
  • the age of the face image can be identified based on the method of constructing the face recognition and age synthesis joint model of deep learning. feature.
  • the preprocessing of the dimensionality reduction is performed, and through a trained automatic encoder, the feature set for the identity representation and the feature set represented by different age groups are obtained, and then The results of the feature set are outputted by the parallel convolutional neural network, and the image similarity is output. Then the weighted fusion is used to obtain the matching result, which can realize face recognition and age detection to obtain the age feature of the face image. Because it distinguishes the characteristics of age characteristics and face image identity, it is also robust to face recognition across ages.
  • Step 604 Acquire application information of the foreground application.
  • the application information includes an application network identifier and an application type.
  • the application network identifier includes a mobile cellular network identifier and a wireless network identifier.
  • the application type can be divided into puzzle, game, audio and video, instant communication, system tools, etc. according to the function division of each application; according to whether the application needs to use network division, it can be divided into networked and non-networked, among which Networking applications include communication applications, mailboxes, browsers, dialers, and SMS services.
  • Step 606 Determine, according to the application information, whether the foreground application needs to be frozen according to the corresponding relationship between the age feature and the exclusive application.
  • the user can be divided into multiple user groups, such as an elderly user group, a middle-aged user group, a youth user group, and a child user group.
  • the exclusive application can be separately formulated for the elderly user group and the child user group.
  • the corresponding exclusive application is an application that can be run under the WIFI connection state.
  • the application information of the foreground application it can be determined whether the foreground application is a dedicated application corresponding to the old user group (an application that can be run under the WIFI connection state), and if not, an application that needs to be operated by the mobile cellular network is considered to be
  • the foreground application needs to be frozen to prevent large amounts of data traffic due to misuse.
  • the corresponding exclusive application is a puzzle application.
  • the application information of the foreground application it can be determined whether the foreground application is a dedicated application corresponding to the child user group (educational application), and if not, but for games and audio-visual applications other than the puzzle application, The foreground application needs to be frozen, reducing the probability that student users are addicted to the game.
  • Step 702 Obtain a duration of the time interval when the time interval satisfies the freezing condition.
  • the latest operation information is the operation information corresponding to the operation time point of the shortest time interval between the current time and the operation information input by the foreground application from the start of the current application.
  • the duration of the time interval is obtained.
  • Step 704 Divide a freeze level according to the duration; the freeze level is used to indicate that the maximum allowed resource that can be used by the foreground application is configured.
  • the freeze level is divided according to the duration of the acquired time interval.
  • the freeze level is used to indicate the maximum allowed resources that can be used by the foreground application.
  • the resources that can be used represent the resources that the process can use at each moment of execution.
  • the maximum allowed resource represents the maximum resource that the process is allowed to use at various times. The longer the interval, the higher the freeze level, and the higher the freeze level, the less the maximum allowed resources for the foreground application.
  • the process is a basic operation of a program on a certain data set in a computer. It is the basic unit for resource allocation and scheduling, and is the basis of the operating system structure.
  • the process involved in the foreground application runtime is the foreground process, and the process involved in the background application runtime is the background process.
  • the interaction mechanism between processes is mainly divided into a synchronization mechanism and a communication mechanism.
  • the communication mechanism includes socket, binder, shared memory and so on.
  • the two programs on the network exchange data through a two-way communication connection.
  • One end of the connection is called a socket.
  • Binder is an interprocess communication mechanism that provides remote procedure call functionality.
  • the terminal may acquire the foreground process according to a preset frequency or according to the detected user operation instruction.
  • the process identifier of the foreground process may be obtained, where the process identifier is used to uniquely identify the corresponding process, and may be formed by a combination of one or more of a preset number of digits, letters, or other characters.
  • the process ID "0001" may be used to indicate the process A
  • the "1234" may be the process B or the like.
  • the manner of dividing the freeze level may be set according to the needs of the user, and may be set in combination with the historical running time of the foreground application and the application type of the foreground application.
  • the division rules of the freeze level of each application may be the same or different, and the number of division levels may be the same or different.
  • Step 706 Perform freeze on the foreground application according to the freeze level.
  • the freeze level corresponding to the current time interval is determined according to the duration of the time interval. If the memory required for the current process execution is 40Mb, if the freeze level is one level (lowest level), the resource is allocated to the foreground according to the level 1 freeze level, and the maximum allowable resource that the foreground application can use is 30Mb; The level is level 4 (the highest level), the resources are allocated to the foreground according to the level 1 freeze level, and the maximum allowable resource that the foreground application can use is 0Mb. Among them, the highest level of freezing level is completely frozen.
  • the foregoing resources may include a CPU, an I/O file resource, and the like. Taking resources as memory for example, the longer the interval, the higher the freeze level; the higher the freeze level, the less the maximum allowed resources that the foreground application can use.
  • the freeze level is set according to the duration of the time interval, and as the time length increases, the freeze level also increases, but the maximum allowable resource that can be used by the foreground application decreases, until the foreground application is applied. It is completely frozen. From partial freezing to complete freezing, it takes a certain time process to give the user a buffering time period. During this time period, the user can quickly and effectively unfreeze the foreground application and improve the user experience. At the same time, according to the freeze level, the maximum allowable resources that can be used by the foreground application can be restricted, and resources can be allocated reasonably to reduce power consumption.
  • the foreground application is frozen according to a preset policy, including steps 802-806.
  • Step 802 Acquire all the functions of the foreground application and the functions corresponding to the operation mode currently monitored by the foreground application.
  • the functions of the foreground application are various.
  • the function corresponding to the operation mode monitored by the foreground application is obtained.
  • One mode of operation may correspond to one or more functions.
  • voice operations may correspond to functions such as voice communication, voice control, voice search, etc.
  • Scan operations may correspond to functions such as scan recognition, scan payment, scan authentication, and the like.
  • the functions corresponding to the operation mode may include, but are not limited to, recording, photographing, connecting to the network, using Bluetooth, acquiring a geographical location, making a call, and sending a short message.
  • Step 804 Acquire an unused function according to a function corresponding to the monitored operation mode.
  • Unused functions refer to all functions of the foreground application, except for the functions corresponding to the monitored operation mode.
  • the “Glory of the King” includes many functions, such as the competitive function corresponding to the touch operation, the transaction function, the location acquisition function, the voice instant communication function corresponding to the voice operation, and the recording Features and more.
  • the functions corresponding to the acquired operation mode monitored by the foreground application are mainly the competitive function and the voice instant communication function, and the unused functions include the transaction function, the geographic location acquisition function, the recording and photographing function, and the like. Wait.
  • Step 806 Freeze the corresponding process of the unused function in the system.
  • Each application corresponds to a process group in the system framework.
  • the system allocates resources to its corresponding process group; and each functional module in the application also corresponds to the process in the process group, so each application will be applied.
  • the corresponding process of the function is identified to facilitate subsequent management of system resource allocation to the corresponding process.
  • the identifier is used to uniquely identify the corresponding process, and may be composed of a combination of one or more of a preset number of digits, letters, or other characters. For example, process ID "0001" can be used to represent process A, and "1234" can be used to indicate process B, etc.
  • the user can freeze the unused functions in the corresponding processes in the system, thereby achieving the purpose of saving resources and improving operational efficiency.
  • other functions of the foreground application can still be used, so the application does not need to freeze the entire application, but freezes some functions of the application, and ensures that other functions are used normally, thereby achieving the effect of reducing power consumption.
  • the application freeze method further includes steps 902- 906. among them,
  • Step 902 Acquire a thaw instruction for thawing the foreground application.
  • Step 904 Detect whether biometric information in the thaw instruction matches a preset biometric.
  • Step 906 Perform a thawing operation on the foreground application when the biometric information in the defrosting instruction matches the preset biometric.
  • the defrosting command includes biometric information, wherein the biometric information may be fingerprint information, iris information, voiceprint information, facial information, and the like.
  • the foreground application is thawed.
  • the corresponding defrosting strategy can also be set according to the freezing strategy to implement the defrosting operation of the foreground application.
  • an application freezing device comprising:
  • the monitoring module 1010 is configured to: when the current station starts the application, listen to the currently running foreground application to receive operation information input by the user; the operation information includes an operation mode and an operation time point;
  • the determining module 1020 is configured to invoke, by each application, a mapping relationship between an operation mode input by the user and a freeze condition, and determine, according to the operation information, whether the foreground application needs to be frozen at the current time;
  • the freezing module 1030 is configured to freeze the foreground application according to a preset policy when the foreground application needs to be frozen.
  • the application freezing device when the current application is started, the monitoring module 1010 can monitor the currently running foreground application to receive operation information input by the user; the determining module 1020 can call the mapping relationship between the operation mode and the freezing condition of each foreground application, according to the The mapping relationship determines whether the current application needs to freeze the foreground application; when the foreground application needs to be frozen, the freezing module 1030 freezes the foreground application according to the preset policy, and can obtain the current user's application to the foreground through the operation information.
  • the usage rate when the user does not input the operation information for a long time, can freeze the foreground application in time to improve the intelligence of the terminal.
  • each module in the application freezing device is for illustrative purposes only. In other embodiments, the application freezing device may be divided into different modules as needed to complete all or part of the functions of the application freezing device.
  • a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the application freezing method provided by the various embodiments described above.
  • a terminal including a memory, a processor, and a computer program stored on the memory and operable on the processor, and the application freezing method provided by the foregoing embodiments is implemented when the processor executes the computer program A step of.
  • the embodiment of the present application also provides a computer program product.
  • a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps of the application freeze method provided by the various embodiments described above.
  • the embodiment of the present application further provides a terminal.
  • a terminal As shown in FIG. 11 , for the convenience of description, only the parts related to the embodiments of the present application are shown. For details that are not disclosed, refer to the method part of the embodiment of the present application.
  • the terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, and the terminal is a mobile phone as an example:
  • FIG. 11 is a block diagram showing a partial structure of a mobile phone related to a terminal provided by an embodiment of the present application.
  • the mobile phone includes: a radio frequency (RF) circuit 1110 , a memory 1120 , an input unit 1130 , a display unit 1140 , a sensor 1150 , an audio circuit 1160 , a wireless fidelity (WiFi) module 1170 , and a processor 1180 .
  • RF radio frequency
  • the RF circuit 1110 can be used for receiving and transmitting information during the transmission and reception of information or during the call.
  • the downlink information of the base station can be received and processed by the processor 1180.
  • the uplink data can also be sent to the base station.
  • RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
  • LNA Low Noise Amplifier
  • RF circuitry 1110 can also communicate with the network and other devices via wireless communication.
  • the above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Messaging Service (SMS), and the like.
  • GSM Global System of Mobile communication
  • GPRS General Pack
  • the memory 1120 can be used to store software programs and modules, and the processor 1180 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 1120.
  • the memory 1120 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as an application of a sound playing function, an application of an image playing function, etc.);
  • the data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone.
  • memory 1120 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 1130 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset 1100.
  • the input unit 1130 may include an operation panel 1131 and other input devices 1132.
  • the operation panel 1131 which may also be referred to as a touch screen, may collect touch operations on or near the user (such as an operation of the user using a finger, a stylus, or the like on the operation panel 1131 or in the vicinity of the operation panel 1131). And drive the corresponding connection device according to a preset program.
  • the operation panel 1131 may include two parts of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 1180 is provided and can receive commands from the processor 1180 and execute them.
  • the operation panel 1131 can be realized by various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 1130 may further include other input devices 1132.
  • other input devices 1132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.).
  • the display unit 1140 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
  • the display unit 1140 may include a display panel 1141.
  • the display panel 1141 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the operation panel 1131 may cover the display panel 1141, and when the operation panel 1131 detects a touch operation thereon or nearby, it is transmitted to the processor 11110 to determine the type of the touch event, and then the processor 11110 according to the touch event The type provides a corresponding visual output on display panel 1141.
  • the operation panel 1131 and the display panel 1141 are two independent components to implement the input and input functions of the mobile phone, in some embodiments, the operation panel 1131 and the display panel 1141 may be integrated to implement the mobile phone. Input and output functions.
  • the handset 1100 can also include at least one sensor 1150, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1141 according to the brightness of the ambient light, and the proximity sensor may close the display panel 1141 and/or when the mobile phone moves to the ear. Or backlight.
  • the motion sensor may include an acceleration sensor, and the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
  • the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
  • Audio circuitry 1160, speaker 1161, and microphone 1162 can provide an audio interface between the user and the handset.
  • the audio circuit 1160 can transmit the converted electrical data of the received audio data to the speaker 1161, and convert it into a sound signal output by the speaker 1161; on the other hand, the microphone 1162 converts the collected sound signal into an electrical signal, and the audio circuit 1160 After receiving, it is converted into audio data, and then processed by the audio data output processor 1180, transmitted to another mobile phone via the RF circuit 1110, or outputted to the memory 1120 for subsequent processing.
  • WiFi is a short-range wireless transmission technology.
  • the mobile phone can help users to send and receive emails, browse web pages and access streaming media through the WiFi module 1170, which provides users with wireless broadband Internet access.
  • FIG. 11 shows the WiFi module 1170, it will be understood that it does not belong to the essential configuration of the handset 1100 and may be omitted as needed.
  • the processor 1180 is a control center for the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 1120, and invoking data stored in the memory 1120, The various functions of the mobile phone and the processing of the data, so that the overall monitoring of the mobile phone.
  • processor 1180 can include one or more processing units.
  • processor 1180 can integrate an application processor and a modem, where the application processor primarily processes an operating system, user interface, applications, etc.; the modem primarily handles wireless communications. It will be appreciated that the above modem may also not be integrated into the processor 1180.
  • the processor 1180 can integrate an application processor and a baseband processor, and the baseband processor and other peripheral chips can form a modem.
  • the handset 1100 also includes a power source 1190 (such as a battery) that supplies power to the various components.
  • the power source can be logically coupled to the processor 1180 via a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the handset 1100 can also include a camera, a Bluetooth module, and the like.
  • the processor included in the mobile phone implements the application freezing method described above when executing a computer program stored in the memory.
  • Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM), which acts as an external cache.
  • RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronization.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR SDRAM dual data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM Link (Synchlink) DRAM
  • SLDRAM Memory Bus
  • Rambus Direct RAM
  • RDRAM Direct Memory Bus Dynamic RAM
  • RDRAM Memory Bus Dynamic RAM

Abstract

The present application relates to an application freezing method and device, a storage medium, and a terminal. The method comprises: when an application is started at a front end, detecting operation information concerning a user input received by the running front end application; the operation information comprising an operation manner and an operation time point; invoking a mapping relationship between a freezing condition and an operation manner of a user input received by each application, and determining, according to the operation information, whether it is necessary to freeze the front end application at the current moment; and if it is necessary to freeze the front end application, freezing the front end application according to a preset policy.

Description

应用冻结方法和装置、存储介质和终端Application freezing method and device, storage medium and terminal
相关申请的交叉引用Cross-reference to related applications
本申请要求于2017年12月29日提交中国专利局、申请号为CN201711489078.4、申请名称为“应用冻结方法和装置、存储介质和终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application filed on Dec. 29, 2017, the Chinese Patent Office, the application number is CN201711489078.4, and the application name is "application freezing method and device, storage medium and terminal", the entire contents of which are incorporated by reference. Combined in this application.
技术领域Technical field
本申请涉及终端技术领域,特别是涉及一种应用冻结方法、装置、存储介质和终端。The present application relates to the field of terminal technologies, and in particular, to an application freezing method, apparatus, storage medium, and terminal.
背景技术Background technique
随着移动通信技术的发展,用户往往会在终端内安装多种多种多样的应用来满足用户的不同需求。为了避免不需要的应用在后台运行、或未被用户合理使用的应用在前台运行,占用系统内存、消耗终端设备的电量,一般会冻结不需要或未被用户合理使用的应用。一般冻结应用主要是根据应用运行状态、是前台、还是后台应用等方法来决定一个应用是否应该被冻结,这些方法主要考虑了应用本身的状态,不够智能化。With the development of mobile communication technology, users often install a variety of various applications in the terminal to meet the different needs of users. In order to prevent unwanted applications from running in the background, or applications that are not reasonably used by users, running in the foreground, occupying system memory and consuming power of terminal devices, applications that are not needed or are not reasonably used by users are generally frozen. The general freeze application mainly determines whether an application should be frozen according to the application running state, whether it is the foreground or the background application. These methods mainly consider the state of the application itself and are not intelligent enough.
发明内容Summary of the invention
本申请实施例提供一种应用冻结方法、装置、存储介质和终端,通过监听前台应用接收的操作信息来对应用进行冻结,可以提高终端的智能度。The embodiment of the present application provides an application freezing method, a device, a storage medium, and a terminal, which can improve the intelligence of the terminal by monitoring the operation information received by the foreground application to freeze the application.
一种应用冻结方法,包括:An application freezing method, including:
当前台开启新应用时,监听当前正在运行的前台应用接收用户输入的操作信息;所述操作信息包括操作方式和操作时间点;When the current application is started, the current foreground application is monitored to receive operation information input by the user; the operation information includes an operation mode and an operation time point;
调用每个前台应用的操作方式与冻结条件的映射关系,根据所述映射关系确定当前时刻是否需要冻结所述前台应用;Calling a mapping relationship between the operation mode and the freeze condition of each foreground application, and determining, according to the mapping relationship, whether the foreground application needs to be frozen at the current time;
当需要冻结所述前台应用时,则根据预设策略对所述前台应用进行冻结。When the foreground application needs to be frozen, the foreground application is frozen according to a preset policy.
一种应用冻结装置,所述装置包括:An application freezing device, the device comprising:
监听模块,用于当前台开启新应用时,监听当前正在运行的前台应用接收用户输入的操作信息;所述操作信息包括操作方式和操作时间点;a monitoring module, configured to: when the current station starts a new application, listen to the currently running foreground application to receive operation information input by the user; the operation information includes an operation mode and an operation time point;
确定模块,用于调用每个前台应用的操作方式与冻结条件的映射关系,根据所述映射关系确定当前时刻是否需要冻结所述前台应用;a determining module, configured to invoke a mapping relationship between an operation mode and a freeze condition of each foreground application, and determine, according to the mapping relationship, whether the foreground application needs to be frozen at the current time;
冻结模块,用于当需要冻结所述前台应用时,则根据预设策略对所述前台应用进行冻结。The freezing module is configured to freeze the foreground application according to a preset policy when the foreground application needs to be frozen.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现本申请各个实施例中的应用冻结方法的步骤。A computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to implement the steps of the application freezing method in various embodiments of the present application.
一种终端,包括存储器、处理器及存储在存储器上并可在处理器上运行的计 算机程序,所述处理器执行所述计算机程序时实现本申请各个实施例中的应用冻结的步骤。A terminal comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor executing the computer program to implement the step of freezing the application in various embodiments of the present application.
本申请实施例提供的应用冻结方法和装置、存储介质和终端,当前台开启应用时,监听当前正在运行的前台应用接收用户输入的操作信息;调用每个前台应用的操作方式与冻结条件的映射关系,根据所述映射关系确定当前时刻是否需要冻结所述前台应用;当需要冻结所述前台应用时,则根据预设策略对所述前台应用进行冻结,能够通过操作信息来获取当前用户对前台应用的使用率,当用户长时间未输入操作信息时,可以及时的对前台应用进行冻结,提高终端的智能度。The application freezing method and device, the storage medium and the terminal provided by the embodiment of the present application, when the current station starts the application, the current foreground application is monitored to receive the operation information input by the user; and the mapping between the operation mode and the freezing condition of each foreground application is invoked. And determining, according to the mapping relationship, whether the current application needs to freeze the foreground application; when the foreground application needs to be frozen, the foreground application is frozen according to the preset policy, and the current user is used to obtain the current user by using the operation information. The usage rate of the application, when the user does not input the operation information for a long time, can freeze the foreground application in time to improve the intelligence of the terminal.
附图说明DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings to be used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present application, and other drawings can be obtained according to the drawings without any creative work for those skilled in the art.
图1为一个实施例中终端的内部结构示意图;1 is a schematic diagram showing the internal structure of a terminal in an embodiment;
图2为一个实施例中终端中的系统的部分框架示意图;2 is a partial schematic diagram of a system in a terminal in an embodiment;
图3为一个实施例中应用冻结方法的流程图;3 is a flow chart of an application freezing method in an embodiment;
图4为另一个实施例中应用冻结方法的流程图;4 is a flow chart of an application freezing method in another embodiment;
图5为一个实施例中根据所述映射关系确定当前时刻是否需要冻结所述前台应用的流程图;FIG. 5 is a flowchart of determining whether a current application needs to freeze the foreground application according to the mapping relationship according to the mapping relationship;
图6为一个实施例中根据所述前台应用的类别信息来判断是否需要冻结所述前台应用的流程图;FIG. 6 is a flowchart of determining, according to the category information of the foreground application, whether the foreground application needs to be frozen according to an embodiment;
图7为一个实施例中根据预设策略对所述前台应用进行冻结的流程图;7 is a flowchart of freezing a foreground application according to a preset policy in an embodiment;
图8为另一个实施例中根据预设策略对所述前台应用进行冻结的流程图;FIG. 8 is a flowchart of freezing the foreground application according to a preset policy in another embodiment; FIG.
图9为又一个实施例中应用冻结方法的流程图;9 is a flow chart of an application freezing method in still another embodiment;
图10为一个实施例中应用冻结装置的结构框图;Figure 10 is a block diagram showing the structure of an application freezing device in an embodiment;
图11为一个实施例中手机的部分结构的框图。Figure 11 is a block diagram showing a portion of the structure of a handset in an embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
可以理解,本发明所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本发明的范围的情况下,可以将第一被冻结条件称为第二被冻结条件,且类似地,可将第二被冻结条件称为第一被冻结条件。第一被冻结条件和第二被冻结条件两者都是被冻结条件,但其不是同一被冻结条件。It will be understood that the terms "first", "second" and the like, as used herein, may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, the first frozen condition may be referred to as a second frozen condition, and similarly, the second frozen condition may be referred to as a first frozen condition, without departing from the scope of the present invention. Both the first frozen condition and the second frozen condition are frozen conditions, but they are not the same frozen condition.
在一个实施例中,如图1所示,提供了一种终端的内部结构示意图。该终端包括通过系统总线连接的处理器、存储器和显示屏。其中,该处理器用于提供计算和控制能力,支撑整个终端的运行。存储器用于存储数据、程序、和/或指令代码等,存储器上存储至少一个计算机程序,该计算机程序可被处理器执行,以实现本申请实施例中提供的适用于终端的应用冻结方法。存储器可包括磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random-Access-Memory,RAM)等。例如,在一个实施例中,存储器包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统、数据库和计算机程序。该数据库中存储有用于实现以上各个实施例所提供的一种应用冻结方法相关的数据,比如可存储有每个进程或应用的名称等信息。该计算机程序可被处理器所执行,以用于实现本申请各个实施例所提供的一种应用冻结方法。内存储器为非易失性存储介质中的操作系统、数据库和计算机程序提供高速缓存的运行环境。显示屏可以是触摸屏,比如为电容屏或电子屏,用于显示前台进程对应的应用的界面信息,还可以被用于检测作用于该显示屏的触摸操作,生成相应的指令,比如进行前后台应用的切换指令等。In one embodiment, as shown in FIG. 1, a schematic diagram of an internal structure of a terminal is provided. The terminal includes a processor, memory, and display connected via a system bus. The processor is used to provide computing and control capabilities to support the operation of the entire terminal. The memory is used to store data, programs, and/or instruction codes, etc., and the memory stores at least one computer program, which can be executed by the processor to implement the application-free application freezing method provided in the embodiments of the present application. The memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random storage memory (Random-Access-Memory, RAM). For example, in one embodiment, the memory includes a non-volatile storage medium and an internal memory. Non-volatile storage media stores operating systems, databases, and computer programs. The database stores data related to an application freezing method provided by the above various embodiments, for example, information such as the name of each process or application may be stored. The computer program can be executed by a processor for implementing an application freezing method provided by various embodiments of the present application. The internal memory provides a cached operating environment for operating systems, databases, and computer programs in non-volatile storage media. The display screen can be a touch screen, such as a capacitive screen or an electronic screen, for displaying interface information of an application corresponding to the foreground process, and can also be used for detecting a touch operation acting on the display screen, and generating corresponding instructions, such as performing front and back Application switching instructions, etc.
本领域技术人员可以理解,图1中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的终端的限定,具体的终端可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。如该终端还包括通过系统总线连接的网络接口,网络接口可以是以太网卡或无线网卡等,用于与外部的终端进行通信,比如可用于同服务器进行通信。A person skilled in the art can understand that the structure shown in FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the terminal to which the solution of the present application is applied. The specific terminal may include a ratio. More or fewer components are shown in the figures, or some components are combined, or have different component arrangements. For example, the terminal further includes a network interface connected through a system bus, and the network interface may be an Ethernet card or a wireless network card, etc., for communicating with an external terminal, for example, for communicating with a server.
在一个实施例中,如图2所示,提供了一种终端的部分架构图。其中,该终端的架构系统中包括JAVA空间层210、本地框架层220以及内核(Kernel)空间层230。JAVA空间层上可包含冻结和解冻应用210,终端可通过该冻结和解冻应用210来实现对各个应用的冻结策略,对后台耗电的相关应用做冻结操作。本地框架层220中包含资源优先级和限制管理模块222和平台冻结管理模块224。终端可通过资源优先级和限制管理模块222实时维护不同的应用处于不同优先级和不同资源的组织中,并根据上层的需求来调整应用程序的资源组别从而达到优化性能,节省功耗的作用。终端可通过平台冻结管理模块224将后台可以冻结的任务按照进入冻结时间的长短,分配到对应预设的不同层次的冻结层,可选地,该冻结层可包括三个,分别是:CPU限制睡眠模式、CPU冻结睡眠模式、进程深度冻结模式。其中,CPU限制睡眠模式是指对相关进程所占用的CPU资源进行限制,使相关进程占用较少的CPU资源,将空余的CPU资源向其它未被冻结的进程倾斜,限制了对CPU资源的占用,也相应限制了进行对网络资源以及I/O接口资源的占用;CPU冻结睡眠模式是指禁止相关进程使用CPU,而保留对内存的占用,当禁止使用CPU资源时,相应的网络资源以及I/O接口资源也被禁止使用;进程深度冻结模式是指除禁止使用CPU资源之外,进一步对相关进程所占用的内存资源进行回收,回收的内存可供其它进程使用。内核空间层230中包括UID管理模块231、Cgroup模块232、Binder管控模块233、进程内存回收模块234以及超时冻结退出模块235。 其中,UID管理模块231用于实现基于应用的用户身份标识(User Identifier,UID)来管理第三方应用的资源或进行冻结。相比较于基于进程身份标识(Process Identifier,PID)来进行进程管控,通过UID更便于统一管理一个用户的应用的资源。Cgroup模块232用于提供一套完善的中央处理器(Central Processing Unit,CPU)、CPUSET、内存(memory)、输入/输出(input/output,I/O)和Net相关的资源限制机制。Binder管控模块233用于实现后台binder通信的优先级的控制。其中,本地框架层220的接口模块包含开发给上层的binder接口,上层的框架或者应用通过提供的binder接口来发送资源限制或者冻结的指令给资源优先级和限制管理模块222和平台冻结管理模块224。进程内存回收模块234用于实现进程深度冻结模式,这样能当某个第三方应用长期处于冻结状态的时候,会主要释放掉进程的文件区,从而达到节省内存的模块,也加快该应用在下次启动时的速度。超时冻结退出模块235用于解决出现冻结超时场景产生的异常。通过上述的架构,可实现本申请各个实施例中的应用冻结方法。In one embodiment, as shown in FIG. 2, a partial architectural diagram of a terminal is provided. The architecture system of the terminal includes a JAVA spatial layer 210, a local framework layer 220, and a kernel (Kernel) spatial layer 230. The freeze and thaw application 210 can be included in the JAVA spatial layer. The freeze and thaw application 210 can be used by the terminal to implement a freeze policy for each application, and freeze the related application of the background power consumption. The resource priority and restriction management module 222 and the platform freeze management module 224 are included in the local framework layer 220. The terminal can maintain different applications in different priorities and different resource organizations through the resource priority and limit management module 222, and adjust the resource group of the application according to the requirements of the upper layer to achieve optimized performance and save power. . The terminal freezes the task that can be frozen in the background by the platform freeze management module 224, and allocates the freeze layer to the preset different levels according to the length of the entry freeze time. Optionally, the freeze layer may include three, respectively: CPU limit Sleep mode, CPU freeze sleep mode, process deep freeze mode. The CPU restricts the sleep mode to limit the CPU resources occupied by the related processes, so that the related processes occupy less CPU resources, and the free CPU resources are tilted to other unfrozen processes, thereby limiting the occupation of CPU resources. It also limits the occupation of network resources and I/O interface resources; CPU freeze sleep mode refers to prohibiting related processes from using CPU, while preserving the occupation of memory, when prohibiting the use of CPU resources, the corresponding network resources and I The /O interface resource is also forbidden; the process deep freeze mode means that in addition to prohibiting the use of CPU resources, the memory resources occupied by the related processes are further recovered, and the recovered memory can be used by other processes. The kernel space layer 230 includes a UID management module 231, a Cgroup module 232, a Binder management module 233, a process memory collection module 234, and a timeout freeze exit module 235. The UID management module 231 is configured to implement an application-based User Identifier (UID) to manage resources of a third-party application or freeze. Compared with the Process Identifier (PID) for process management and control, it is easier to uniformly manage the resources of a user's application through UID. The Cgroup module 232 is used to provide a complete set of Central Processing Unit (CPU), CPUSET, memory, input/output (I/O), and Net related resource restriction mechanisms. The Binder management module 233 is used to implement the priority control of the background binder communication. The interface module of the local framework layer 220 includes a binder interface developed to the upper layer, and the upper layer framework or application sends a resource restriction or frozen instruction to the resource priority and restriction management module 222 and the platform freeze management module 224 through the provided binder interface. . The process memory recovery module 234 is configured to implement the process deep freeze mode, so that when a third-party application is in a frozen state for a long time, the file area of the process is mainly released, thereby saving the memory module and speeding up the application next time. The speed at startup. The timeout freeze exit module 235 is configured to solve the abnormality generated by the freeze timeout scenario. Through the above architecture, the application freezing method in various embodiments of the present application can be implemented.
在一个实施例中,如图3所示,提供了一种应用冻结方法,用于冻结终端的前台应用。本实施例以该方法应用于如图1所示的终端为例进行说明。该应用冻结方法,包括步骤302-步骤306。其中,In one embodiment, as shown in FIG. 3, an application freezing method is provided for freezing a foreground application of a terminal. This embodiment is described by applying the method to the terminal shown in FIG. 1 as an example. The application freezing method includes steps 302-306. among them,
步骤302:当前台开启应用时,监听当前正在运行的前台应用接收用户输入的操作信息;所述操作信息包括操作方式和操作时间点。Step 302: When the current station starts the application, the foreground application currently running is monitored to receive operation information input by the user; the operation information includes an operation mode and an operation time point.
一个应用(Application,简称APP)的运行通常是由相关的多个进程的运行而体现的。前台应用运行时涉及的进程即为前台进程,后台应用运行时涉及的进程即为后台进程。终端当前的显示界面展示的应用程序的操作页面对应的应用为终端当前运行的前台应用。在本实施例中,只有输入焦点对应的应用才是前台应用,或者,只有位于操作系统的窗口栈的栈顶的窗口对象对应的应用才是终端当前对应的前台应用。要确定目标应用是否为前台应用,获取与目标应用对应的窗口对象,并判断该窗口对象是否位于操作系统的窗口栈的栈顶,若是,则说明该目标应用为前台应用,若否,则说明该应用程序在后台运行,为后台应用。The operation of an application (APP) is usually reflected by the operation of multiple related processes. The process involved in the foreground application runtime is the foreground process, and the process involved in the background application runtime is the background process. The application corresponding to the operation page of the application displayed by the current display interface of the terminal is the foreground application currently running by the terminal. In this embodiment, only the application corresponding to the input focus is the foreground application, or only the application corresponding to the window object at the top of the stack of the window stack of the operating system is the foreground application currently corresponding to the terminal. To determine whether the target application is a foreground application, obtain a window object corresponding to the target application, and determine whether the window object is located at the top of the stack of the window stack of the operating system, and if yes, the target application is a foreground application, and if not, the description is The app runs in the background and is a background app.
当开启前台应用时,前台应用会监听到用户输入的操作信息。需要说明的是,该操作信息包括用户输入的操作方式和操作时间点。其中,操作方式至少包括按键、语音、触摸、指纹、扫描等输入操作方式。同时,当接收到用户输入的操作信息时,也会获取当前输入的操作时间点。例如,当前台开启的应用为“王者荣耀”时,其监听到用户在使用该前台应用时,所接收到用户的所有输入信息,例如语音、触摸等不同操作方式的输入,同时也会记录当前输入方式对应的输入时间点,如语音输入--20:00:00;触摸输入--20:00:01等。When the foreground application is opened, the foreground application will listen to the operation information input by the user. It should be noted that the operation information includes an operation mode and an operation time point input by the user. The operation mode includes at least an input operation mode such as a button, a voice, a touch, a fingerprint, and a scan. At the same time, when the operation information input by the user is received, the current input operation time point is also obtained. For example, when the application opened by the current station is “Glory of the King”, it monitors all input information of the user, such as voice, touch, and the like, when the user uses the foreground application, and also records the current operation. The input time point corresponding to the input mode, such as voice input - 20:00: 00; touch input - 20:00: 01 and so on.
步骤304:调用每个应用接收用户输入的操作方式与冻结条件的映射关系,根据所述操作信息确定当前时刻是否需要冻结所述前台应用。Step 304: Invoke each application to receive a mapping relationship between the operation mode input by the user and the freeze condition, and determine, according to the operation information, whether the foreground application needs to be frozen at the current time.
当应用在前台运行时,即可认为该应用为前台应用,每个在前台运行的前台应用都对应一种或多种冻结条件,其对应的冻结条件可以根据接收用户输入的操作方式来决定。其中,可以设定,一个操作方式对应一个冻结条件,例如,触摸 操作方式对应的冻结条件为第一冻结条件,语音操作方式对应的冻结条件为第二冻结条件,扫描操作方式对应的冻结条件为第三冻结条件等等。也即,每个应用的每一种操作方式都可以对应一种冻结条件。When the application is running in the foreground, the application can be considered as a foreground application, and each foreground application running in the foreground corresponds to one or more freeze conditions, and the corresponding freeze condition can be determined according to the operation mode of receiving the user input. The operation mode corresponds to a freeze condition. For example, the freeze condition corresponding to the touch operation mode is the first freeze condition, the freeze condition corresponding to the voice operation mode is the second freeze condition, and the freeze condition corresponding to the scan operation mode is The third freezing condition and so on. That is, each operation mode of each application can correspond to a freeze condition.
进一步的,冻结条件为时间条件,可以设定每个操作方式对应的时间冻结条件,该时间冻结条件可以理解为当预设时长内未监听到某一操作信息时,则认为满足该时间冻结条件。Further, the freezing condition is a time condition, and a time freezing condition corresponding to each operation mode may be set, and the time freezing condition may be understood to be that when a certain operation information is not monitored within the preset time period, the time freezing condition is considered to be satisfied. .
需要说明的是,每个应用的操作方式不同,其不同应用的同种操作方式对应的冻结条件可能相同,也可能不同。It should be noted that the operation mode of each application is different, and the freezing conditions corresponding to the same operation mode of different applications may be the same or different.
根据预先设定的映射关系,根据监听的操作信息就可以判断当前时刻是否需要对前台应用进行冻结操作。According to the preset mapping relationship, according to the operation information of the monitoring, it can be determined whether the current application needs to freeze the foreground application.
步骤306:当需要冻结所述前台应用时,则根据预设策略对所述前台应用进行冻结。Step 306: When the foreground application needs to be frozen, the foreground application is frozen according to a preset policy.
当需要冻结前台应用时,则根据预设策略对前台应用进行冻结操作,例如,可以根据监听到的操作信息来设定相应的冻结策略来实现对前台应用的冻结操作。例如,可以根据获取的操作信息来设定不同的冻结等级,根据冻结等级来实现对前台应用的冻结。When the foreground application needs to be frozen, the foreground application is frozen according to the preset policy. For example, the corresponding freeze policy may be set according to the monitored operation information to implement the freeze operation on the foreground application. For example, different freeze levels may be set according to the acquired operation information, and the freeze of the foreground application may be implemented according to the freeze level.
上述冻结应用方法,当前台开启应用时,监听当前正在运行的前台应用接收用户输入的操作信息,根据操作信息和预先设定的映射关系就可以确定当前时刻是否需要冻结前台应用;当需要冻结前台应用时,则根据预设策略对前台应用进行冻结,能够根据前台应用接收用户输入的操作信息来决策是否冻结前台应用,也即,能够通过操作信息来获取当前用户对前台应用的使用率,当用户长时间未输入操作信息时,可以及时的对前台应用进行冻结操作,提高终端的智能度。In the above frozen application method, when the current application is started, the foreground application currently being monitored receives the operation information input by the user, and according to the operation information and the preset mapping relationship, it can be determined whether the foreground application needs to be frozen at the current time; When the application is applied, the foreground application is frozen according to the preset policy, and the operation information input by the user is received according to the foreground application to decide whether to freeze the foreground application, that is, the operation information can be used to obtain the usage rate of the current user to the foreground application. When the user does not input the operation information for a long time, the user can freeze the foreground application in time to improve the intelligence of the terminal.
在一个实施例中,如图4所示,调用每个应用的接收的操作方式与冻结条件的映射关系前,还需要构建该映射关系。In an embodiment, as shown in FIG. 4, before mapping the relationship between the received operation mode and the freeze condition of each application, the mapping relationship needs to be constructed.
调用每个应用接收用户输入的操作方式与冻结条件的映射关系前,包括步骤402-步骤406。其中,Before invoking each application to receive a mapping relationship between the operation mode input by the user and the freeze condition, step 402-step 406 is included. among them,
步骤402:获取每个所述应用每次在前台运行的历史运行时长和接收用户输入的历史操作记录。Step 402: Acquire a historical running time of each running of the application in the foreground and receive a historical operation record input by the user.
终端会获取每一个应用在前台运行时,所接收到的用户输入的操作信息,并统计每个应用每一次在前台运行的历史运行时长和接收用户输入的历史操作记录。其中,历史运行时长为处于前台应用的连续运行时长;历史操作记录包括历史操作方式,以及与所述操作方式对应的使用频率。历史操作方式至少包括按键、语音、触摸、指纹、扫描等操作方式,操作方式所对应的使用频率为每种操作方式的使用频率。The terminal obtains the operation information input by the user when each application runs in the foreground, and counts the historical running time of each application running in the foreground and the historical operation record input by the user. The historical running time is a continuous running time of the foreground application; the historical operation record includes a historical operation mode, and a usage frequency corresponding to the operation mode. The historical operation mode includes at least a operation mode such as a button, a voice, a touch, a fingerprint, and a scan, and the usage frequency corresponding to the operation mode is the frequency of use of each operation mode.
当前台运行“王者荣耀”这款游戏类的应用(APP)时,终端会记录开启或从后台切换至前台运行“王者荣耀”的启动时间点,以及结束或切换至后台的结束时间点,该启动时间点至结束时间点之间的时长为历史运行时长,如40分钟。在该历史运行时长内,接收用户的输入操作方式包括语音输入、触摸输入。 根据输入的操作方式,可以获取每种操作方式的使用频率,其中,触摸操作方式的使用频率为120次/分钟,语音操作为2次/分钟。When the current running "God Glory" game application (APP), the terminal will record the start time point of turning on or switching from the background to the foreground running "Glory Glory", and ending or switching to the background end time point, The duration between the start time and the end time is the historical run time, such as 40 minutes. During the historical running time, the input operation mode of the receiving user includes voice input and touch input. According to the input operation mode, the frequency of use of each operation mode can be obtained, wherein the frequency of use of the touch operation mode is 120 times/minute, and the voice operation is 2 times/minute.
当前台运行“OPPO视频播放器”这类播放器的应用(APP)时,终端会记录开启或从后台切换至前台运行“OPPO视频播放器”的启动时间点,以及结束或切换至后台的结束时间点,该启动时间点至结束时间点之间的时长为历史运行时长,如120分钟。在该历史运行时长内,接收用户的输入操作方式包括触摸输入、滑动输入等操作方式。根据输入的操作方式,可以获取每种操作方式的使用频率,其中,触摸输入操作方式的使用频率为2次/60分钟,滑动输入操作方式为6次/60分钟。When the current application (APP) of the player such as "OPPO Video Player" is running, the terminal records the startup time point of turning on or switching from the background to the foreground to run the "OPPO Video Player", and ending or switching to the end of the background. At the time point, the duration between the start time point and the end time point is the historical running time, such as 120 minutes. During the historical running time, the input operation mode of the receiving user includes a touch input, a sliding input, and the like. According to the input operation mode, the frequency of use of each operation mode can be obtained, wherein the frequency of the touch input operation mode is 2 times/60 minutes, and the sliding input operation mode is 6 times/60 minutes.
步骤404:根据所述历史运行时长和与所述操作方式对应的使用频率设定每个前台应用的冻结条件。其中,所述冻结条件为时间条件。Step 404: Set a freeze condition of each foreground application according to the historical running time length and the usage frequency corresponding to the operation mode. Wherein, the freezing condition is a time condition.
每个应用在前台运行的历史运行时长不同,其接收用户输入的操作方式也可能不同,可以针对每个应用来设定对应的冻结条件。例如,若前台运行的游戏类应用APP“王者荣耀”,其冻结条件可以根据接收的操作方式来进行划分,当王者荣耀处于前台应用时,若在第一预设时长内未监听到触摸操作时,则满足该第一冻结条件;其中,第一预设时长与历史操作记录中的使用频率相关,当第一预设时长大于触摸操作方式的使用频率(120次/分钟)的预设倍数时,则可以认定,在第一预设时长内,该触摸操作方式不会再产生,可以认定用户当前未使用当前正在运行的前台应用。The running time of each application running in the foreground is different, and the operation mode of receiving user input may also be different. The corresponding freezing condition can be set for each application. For example, if the game application APP "King of the Glory" running in the foreground, the freezing condition can be divided according to the received operation mode, when the king glory is in the foreground application, if the touch operation is not monitored within the first preset duration And satisfying the first freezing condition; wherein the first preset duration is related to the frequency of use in the historical operation record, when the first preset duration is greater than a preset multiple of the usage frequency of the touch operation mode (120 times/minute) Then, it can be determined that the touch operation mode is not generated again within the first preset time period, and it can be determined that the user is not currently using the currently running foreground application.
当王者荣耀处于前台应用时,若在第二预设时长内未监听到语音操作时,则满足该第二冻结条件等。其中,第二预设时长与历史操作记录中的使用频率相关,当第二预设时长大于语音操作方式的使用频率(2次/1分钟)的预设倍数时,则可以认定,在第二预设时长内,该语音操作方式不会再产生,表明认定用户当前未使用当前正在运行的前台应用。When the king glory is in the foreground application, if the voice operation is not monitored within the second preset time period, the second freeze condition or the like is satisfied. The second preset duration is related to the frequency of use in the historical operation record. When the second preset duration is greater than the preset multiple of the voice operation mode (2 times/1 minute), it may be determined that the second During the preset duration, the voice operation mode will not be generated again, indicating that the user is not currently using the currently running foreground application.
需要说明的是,第一预设时长、第二预设时长可以根据用户的需求来设定,再次不做进一步的限定。It should be noted that the first preset duration and the second preset duration may be set according to user requirements, and no further limitation is made.
步骤406:构建每个前台应用的操作方式与冻结条件的映射关系。Step 406: Construct a mapping relationship between the operation mode and the freeze condition of each foreground application.
根据历史运行时长和与操作方式对应的使用频率设定每个前台应用的冻结条件。每个应用对应的操作方式有一种或多种,每一种操作方式对应一种冻结条件,也即,一个应用可以对应多种冻结条件。将这种一种应用可能对应多种冻结条件的映射关系用图表进行表示,以备识别应用。The freeze condition of each foreground application is set according to the historical running time and the usage frequency corresponding to the operation mode. Each application has one or more operation modes, and each operation mode corresponds to a freeze condition, that is, one application can correspond to multiple freeze conditions. A mapping relationship in which such an application may correspond to a plurality of freeze conditions is graphically represented for identification purposes.
进一步的,每个前台应用能够监听的用户输入的操作方式具有多样性,可以根据用户最常用的输入方式来设定该应用的冻结条件,而忽略其他操作方式对应的冻结条件。Further, the operation mode of the user input that each foreground application can monitor is diverse, and the freezing condition of the application can be set according to the input mode most commonly used by the user, and the freezing condition corresponding to other operation modes is ignored.
另外,还可以根据操作方式的使用频率来设定冻结条件的优先级,其用户使用频率越高的操作方式,其对应的冻结条件作为冻结该应用的优先考虑条件。也即,可以根据操作方式对应的冻结条件的优先级来评判该前台应用的冻结与否。In addition, the priority of the freeze condition may be set according to the frequency of use of the operation mode, and the user's use frequency is higher, and the corresponding freeze condition is used as a priority condition for freezing the application. That is, the freeze of the foreground application may be judged according to the priority of the freeze condition corresponding to the operation mode.
在一个实施例中,如图5所示,所述根据所述映射关系确定当前时刻是否需 要冻结所述前台应用,包括步骤502-步骤506。其中,In an embodiment, as shown in FIG. 5, the determining, according to the mapping relationship, whether the current time needs to freeze the foreground application, includes steps 502-506. among them,
步骤502:获取距离当前时刻最近的所述操作信息,并记录最近的所述操作信息距离当前时刻的时间间隔。Step 502: Acquire the operation information that is closest to the current time, and record the time interval of the latest operation information from the current time.
当开启前台应用时,前台应用会监听用户输入的操作信息,其中,操作方式至少包括按键、语音、触摸、指纹、扫描等输入操作方式。同时,当接收到用户输入的操作信息时,也会获取当前输入的操作时间点。When the foreground application is enabled, the foreground application monitors the operation information input by the user, and the operation mode includes at least an input operation mode such as a button, a voice, a touch, a fingerprint, and a scan. At the same time, when the operation information input by the user is received, the current input operation time point is also obtained.
其中,最近的操作信息可以为前台应用从本次启动开始,所有的接收用户输入的操作信息中,与当前时刻的时间间隔最短的操作时间点所对应的操作信息。The latest operation information may be the operation information corresponding to the operation time point of the shortest time interval between the current time and the operation information input by the foreground application from the start of the current application.
若当前时刻为晚上20:30:00,此时终端的前台正在运行“王者荣耀”,用户在使用“王者荣耀”的过程中,会对该游戏进行操作,终端会实时监听用户输入的操作信息。在当前时刻(20:30:00),终端会获取距离当前时刻(20:30:00)最近一次监听到的操作信息(操作方式和操作时间点),若该最近的操作信息中,操作方式为触摸操作方式,操作时间点为20:20:00,则可以获取距离当前时刻的时间间隔,该时间间隔为10分钟。If the current time is 20:30:00 in the evening, the front desk of the terminal is running "Glory of the King", the user will operate the game during the process of using the "Glory of the King", and the terminal will monitor the operation information input by the user in real time. . At the current time (20:30:00), the terminal will obtain the operation information (operation mode and operation time point) that was last monitored from the current time (20:30:00). If the latest operation information is used, the operation mode For the touch operation mode, the operation time point is 20:20:00, and the time interval from the current time can be obtained, and the time interval is 10 minutes.
步骤504:根据所述映射关系确定所述时间间隔是否满足所述冻结条件。Step 504: Determine, according to the mapping relationship, whether the time interval satisfies the freezing condition.
调用设定的映射关系,获取该应用所有的操作方式对应的冻结条件,正如前述说明,冻结条件为时间条件,根据映射关系就可以知晓,获取的时间间隔是否满足冻结该前台应用的冻结条件。The set mapping relationship is invoked to obtain the freezing condition corresponding to all the operation modes of the application. As described above, the freezing condition is a time condition, and according to the mapping relationship, it can be known whether the acquired time interval satisfies the freezing condition of freezing the foreground application.
步骤506:当满足所述冻结条件时,则通过所述终端检测可视区域是否存在人脸图像。Step 506: When the freezing condition is met, the terminal detects whether there is a face image in the visible area.
根据设定的映射关系,当时间间隔满足该冻结条件时,即可认定,此时用户未对该前台应用进行操作,通过终端来检测当前终端的可视区域是否人脸图像就可以判断当前终端前是否存在用户。其中,可视区域可以理解为,用户可以正常使用终端的区域,也可以理解为用户与终端之间的距离,该距离为用户使用终端的舒适距离。According to the set mapping relationship, when the time interval satisfies the freezing condition, it can be determined that the user does not operate the foreground application, and the terminal can detect whether the current terminal's visible area is a face image, and the current terminal can be determined. Whether there is a user before. The visible area can be understood as the area where the user can normally use the terminal, and can also be understood as the distance between the user and the terminal, which is the comfortable distance of the user using the terminal.
具体的,可以通过人脸识别技术来检测终端前是否存在人。人脸识别,是基于人的脸部特征信息进行身份识别的一种生物识别技术。用摄像机或摄像头(前置摄像头)采集含有人脸图像的图像或视频流,并自动在图像中检测和跟踪人脸图像,进而对检测到的人脸图像进行脸部的一系列相关技术,通常也叫做人像识别、面部识别。通过终端处理,若识别出人脸图像,则表明用户正在观看终端的显示区域,只是该用户未对终端进行操作;若不存在人脸图像,则表明当前用户已远离该终端,需要冻结所述前台应用。也即,步骤508:当不存在所述人脸图像时,则需要冻结所述前台应用。Specifically, the face recognition technology can be used to detect whether a person exists before the terminal. Face recognition is a biometric recognition technology based on human facial feature information for identification. Using a camera or camera (front camera) to capture an image or video stream containing a face image, and automatically detect and track the face image in the image, and then perform a series of related techniques on the face of the detected face image, usually Also known as portrait recognition, face recognition. Through the terminal processing, if the face image is recognized, it indicates that the user is viewing the display area of the terminal, but the user does not operate the terminal; if there is no face image, it indicates that the current user has been away from the terminal, and the user needs to freeze the Front desk application. That is, step 508: when the face image does not exist, the foreground application needs to be frozen.
当不存在人脸图像时,表明当前用户已远离该终端,当前正在运行的前台应用可以冻结,以节省功耗。When there is no face image, it indicates that the current user is far away from the terminal, and the currently running foreground application can be frozen to save power.
进一步的,在一个实施例中,如图6所示,根据所述前台应用的类别信息来判断是否需要冻结所述前台应用,还包括步骤602-步骤606。其中,Further, in an embodiment, as shown in FIG. 6, it is determined whether the foreground application needs to be frozen according to the category information of the foreground application, and further includes steps 602-606. among them,
步骤602:当存在所述人脸图像时,通过人脸识别技术获取当前所述人脸图 像的年龄特征。Step 602: When the face image is present, the age feature of the current face image is obtained by the face recognition technology.
当存在人脸图像时,表明用户正在观看终端的显示区域,只是该用户未对终端进行操作,可以基于深度学习的人脸识别和年龄合成联合模型的构建方法来识别出该人脸图像的年龄特征。通过对摄像头采集的人脸图像进行对齐和无监督/监督学习降维的预处理,并通过一个经过训练得到的自动编码器,得到用于身份表示的特征和不同年龄段表示的特征组,然后对特征组的结果经过平行卷积神经网络,输出图像相似度,之后加权融合得到匹配结果,既可以实现人脸识别和年龄检测进而获取人脸图像的年龄特征。由于区分开了年龄特征与人脸图像身份的特征,因此对跨年龄的人脸识别也具有鲁棒性。When there is a face image, it indicates that the user is viewing the display area of the terminal, but the user does not operate the terminal, and the age of the face image can be identified based on the method of constructing the face recognition and age synthesis joint model of deep learning. feature. By aligning and unsupervised/supervised the face image collected by the camera, the preprocessing of the dimensionality reduction is performed, and through a trained automatic encoder, the feature set for the identity representation and the feature set represented by different age groups are obtained, and then The results of the feature set are outputted by the parallel convolutional neural network, and the image similarity is output. Then the weighted fusion is used to obtain the matching result, which can realize face recognition and age detection to obtain the age feature of the face image. Because it distinguishes the characteristics of age characteristics and face image identity, it is also robust to face recognition across ages.
步骤604:获取所述前台应用的应用信息。Step 604: Acquire application information of the foreground application.
获取前台应用过的应用信息,其中,应用信息包括应用网络标识和应用类型。其中,应用网络标识包括移动蜂窝网络标识和无线网络标识。应用类型按照各个应用的功能划分可以分为益智类、游戏类、影音类、即时通信类、系统工具类等;按照各个应用的是否需要使用网络划分可以分为联网类和非联网类,其中,联网类应用包括通讯应用、邮箱、浏览器、拨号器、短信服务等。Obtain application information applied by the foreground, where the application information includes an application network identifier and an application type. The application network identifier includes a mobile cellular network identifier and a wireless network identifier. The application type can be divided into puzzle, game, audio and video, instant communication, system tools, etc. according to the function division of each application; according to whether the application needs to use network division, it can be divided into networked and non-networked, among which Networking applications include communication applications, mailboxes, browsers, dialers, and SMS services.
步骤606:基于所述年龄特征与专属应用的对应关系,根据所述应用信息确定所述前台应用是否需要冻结。Step 606: Determine, according to the application information, whether the foreground application needs to be frozen according to the corresponding relationship between the age feature and the exclusive application.
根据年龄特征可以将用户划分为多个用户群,例如老年用户群、中年用户群、青年用户群、儿童用户群。其中,针对老年用户群和儿童用户群可以分别制定专属应用。According to the age feature, the user can be divided into multiple user groups, such as an elderly user group, a middle-aged user group, a youth user group, and a child user group. Among them, the exclusive application can be separately formulated for the elderly user group and the child user group.
老年用户群,对应的专属应用为WIFI连接状态下才能运行的应用。根据前台应用的应用信息,可以确定前台应用是否为老年用户群对应的专属应用(在WIFI连接状态下才能运行的应用),若不是,而是需要移动蜂窝网采能运行的应用,则认为该前台应用需要冻结,以防止由于误操作产生大量的数据流量。For the elderly user group, the corresponding exclusive application is an application that can be run under the WIFI connection state. According to the application information of the foreground application, it can be determined whether the foreground application is a dedicated application corresponding to the old user group (an application that can be run under the WIFI connection state), and if not, an application that needs to be operated by the mobile cellular network is considered to be The foreground application needs to be frozen to prevent large amounts of data traffic due to misuse.
儿童用户群,对应的专属应用为益智类应用。根据前台应用的应用信息,可以确定前台应用是否为儿童用户群对应的专属应用(益智类应用),若不是,而是为除益智类应用以外的游戏类、影音类应用时,则认为该前台应用需要冻结,降低学生用户沉迷于游戏的概率。For the children's user group, the corresponding exclusive application is a puzzle application. According to the application information of the foreground application, it can be determined whether the foreground application is a dedicated application corresponding to the child user group (educational application), and if not, but for games and audio-visual applications other than the puzzle application, The foreground application needs to be frozen, reducing the probability that student users are addicted to the game.
在一个实施例中,如图7所示,所述根据预设策略对所述前台应用进行冻结,包括步骤702-步骤706。其中,步骤702:当所述时间间隔满足所述冻结条件时,获取所述时间间隔的时长。In an embodiment, as shown in FIG. 7, the foreground application is frozen according to a preset policy, including steps 702-706. Step 702: Obtain a duration of the time interval when the time interval satisfies the freezing condition.
获取距离当前时刻最近的操作信息,并记录最近的操作信息距离当前时刻的时间间隔。其中,最近的操作信息为前台应用从本次启动开始,所有的接收用户输入的操作信息中,与当前时刻的时间间隔最短的操作时间点所对应的操作信息。当获取的时间间隔满足冻结条件时,获取该时间间隔的时长。Obtain the operation information closest to the current time, and record the time interval of the latest operation information from the current time. The latest operation information is the operation information corresponding to the operation time point of the shortest time interval between the current time and the operation information input by the foreground application from the start of the current application. When the acquired time interval satisfies the freeze condition, the duration of the time interval is obtained.
步骤704:根据所述时长划分冻结等级;所述冻结等级用于指示配置所述前台应用所能使用的最大允许资源。Step 704: Divide a freeze level according to the duration; the freeze level is used to indicate that the maximum allowed resource that can be used by the foreground application is configured.
根据获取的时间间隔的时长,来划分冻结等级。其中,冻结等级用于指示配 置前台应用所能使用的最大允许资源。其中,所能使用的资源表示进程在被执行的各个时刻下,所能使用的资源。最大允许资源表示进程在各个时刻下允许被使用的最大资源。间隔时间越长,其冻结等级也就越高,其冻结等级越高,其前台应用所能使用的最大允许资源也就越少。The freeze level is divided according to the duration of the acquired time interval. The freeze level is used to indicate the maximum allowed resources that can be used by the foreground application. Among them, the resources that can be used represent the resources that the process can use at each moment of execution. The maximum allowed resource represents the maximum resource that the process is allowed to use at various times. The longer the interval, the higher the freeze level, and the higher the freeze level, the less the maximum allowed resources for the foreground application.
终端中有多个处于运行状态的进程,进程(process)是计算机中的程序关于某数据集合上的一次运行活动,是系统进行资源分配和调度的基本单位,是操作系统结构的基础。前台应用运行时涉及的进程即为前台进程,后台应用运行时涉及的进程即为后台进程。There are multiple running processes in the terminal. The process is a basic operation of a program on a certain data set in a computer. It is the basic unit for resource allocation and scheduling, and is the basis of the operating system structure. The process involved in the foreground application runtime is the foreground process, and the process involved in the background application runtime is the background process.
在操作系统中,进程之间的交互机制主要分为同步机制和通信机制。其中,通信机制包括socket、binder、共享内存等。网络上的两个程序通过一个双向的通信连接实现数据的交换,这个连接的一端称为一个socket。Binder是一种进程间通信机制,提供远程过程调用功能。In the operating system, the interaction mechanism between processes is mainly divided into a synchronization mechanism and a communication mechanism. Among them, the communication mechanism includes socket, binder, shared memory and so on. The two programs on the network exchange data through a two-way communication connection. One end of the connection is called a socket. Binder is an interprocess communication mechanism that provides remote procedure call functionality.
终端可按照预设的频率或者根据检测到的用户操作指令来获取前台进程。可选地,可获取该前台进程的进程标识,进程标识用于唯一标识对应的进程,可由预设位数的数字、字母或者其他字符中的一种或几种的组合所构成。比如,可以以进程标识“0001”表示进程A,以“1234”表示进程B等。The terminal may acquire the foreground process according to a preset frequency or according to the detected user operation instruction. Optionally, the process identifier of the foreground process may be obtained, where the process identifier is used to uniquely identify the corresponding process, and may be formed by a combination of one or more of a preset number of digits, letters, or other characters. For example, the process ID "0001" may be used to indicate the process A, and the "1234" may be the process B or the like.
需要说明的是,冻结等级的划分方式可以根据用户的需求来设定,可以结合前台应用的历史运行时长、前台应用的应用类型来设定。其中,每个应用的冻结等级的划分规则可以相同,也可以不同,划分的等级数可以相同,也可以不同。It should be noted that the manner of dividing the freeze level may be set according to the needs of the user, and may be set in combination with the historical running time of the foreground application and the application type of the foreground application. The division rules of the freeze level of each application may be the same or different, and the number of division levels may be the same or different.
步骤706:根据所述冻结等级对所述前台应用进行相应等级的冻结。Step 706: Perform freeze on the foreground application according to the freeze level.
根据时间间隔的时长确定当前时间间隔所对应的冻结等级。若当前台进程执行时所需的内存为40Mb,若冻结等级为一级(最低级),则根据一级冻结等级给前台进行分配资源,前台应用所能使用的最大允许资源为30Mb;若冻结等级为四级(最高级),则根据一级冻结等级给前台进行分配资源,前台应用所能使用的最大允许资源为0Mb。其中,最高等级的冻结等级为完全冻结状态。The freeze level corresponding to the current time interval is determined according to the duration of the time interval. If the memory required for the current process execution is 40Mb, if the freeze level is one level (lowest level), the resource is allocated to the foreground according to the level 1 freeze level, and the maximum allowable resource that the foreground application can use is 30Mb; The level is level 4 (the highest level), the resources are allocated to the foreground according to the level 1 freeze level, and the maximum allowable resource that the foreground application can use is 0Mb. Among them, the highest level of freezing level is completely frozen.
其中,上述的资源可包括CPU、I/O文件资源等。以资源为内存来举例说明,间隔时间越长,冻结等级也就越高;冻结等级越高,其前台应用所能使用的最大允许资源也就越少。The foregoing resources may include a CPU, an I/O file resource, and the like. Taking resources as memory for example, the longer the interval, the higher the freeze level; the higher the freeze level, the less the maximum allowed resources that the foreground application can use.
上述方法中,根据时间间隔的时长来设定冻结等级,随着时长的增加,冻结的等级也随着增加,但是,其前台应用所能使用的最大允许资源却随之降低,直到使前台应用处于完全冻结状态。从部分冻结到完全冻结需要一定的时间过程,给用户一个缓冲时间段,在这个时间段内,用户可以快速有效的解冻该前台应用,提高用户的体验度。同时,根据冻结等级限制前台应用所能使用的最大允许资源,也能合理分配资源,减小功耗。In the above method, the freeze level is set according to the duration of the time interval, and as the time length increases, the freeze level also increases, but the maximum allowable resource that can be used by the foreground application decreases, until the foreground application is applied. It is completely frozen. From partial freezing to complete freezing, it takes a certain time process to give the user a buffering time period. During this time period, the user can quickly and effectively unfreeze the foreground application and improve the user experience. At the same time, according to the freeze level, the maximum allowable resources that can be used by the foreground application can be restricted, and resources can be allocated reasonably to reduce power consumption.
在一个实施例中,如图8所示,所述根据预设策略对所述前台应用进行冻结,包括步骤802-步骤806。其中,步骤802:获取前台应用的所有功能和当前所述前台应用监听到的操作方式所对应的功能。In an embodiment, as shown in FIG. 8, the foreground application is frozen according to a preset policy, including steps 802-806. Step 802: Acquire all the functions of the foreground application and the functions corresponding to the operation mode currently monitored by the foreground application.
前台应用的功能多种多样,当满足冻结条件时,获取当前所述前台应用监听 到的操作方式所对应的功能。一种操作方式可能对应一种或多种功能,例如,语音操作可能对应于语音通信、语音控制、语音搜索等功能,扫描操作可能对应于扫描识别、扫描支付、扫描认证等功能。通过获取监听的操作方式,就能对应获取监听到的操作方式所对应的功能。The functions of the foreground application are various. When the freeze condition is met, the function corresponding to the operation mode monitored by the foreground application is obtained. One mode of operation may correspond to one or more functions. For example, voice operations may correspond to functions such as voice communication, voice control, voice search, etc. Scan operations may correspond to functions such as scan recognition, scan payment, scan authentication, and the like. By obtaining the operation mode of the monitoring, the function corresponding to the monitored operation mode can be obtained.
需要说明的是,操作方式对应的功能还可以包括但不限于:录音、拍照、连接网络、使用蓝牙、获取地理位置、拨打电话和发送短信。It should be noted that the functions corresponding to the operation mode may include, but are not limited to, recording, photographing, connecting to the network, using Bluetooth, acquiring a geographical location, making a call, and sending a short message.
步骤804:根据监听到的操作方式所对应的功能获取未使用的功能。Step 804: Acquire an unused function according to a function corresponding to the monitored operation mode.
用户在使用当前前台应用时,一般会存在用户不经常使用的功能。未使用的功能,指的是前台应用的所有功能中,除了监听到的操作方式所对应的功能以外的其他功能。When users use the current foreground application, there are generally functions that users do not use often. Unused functions refer to all functions of the foreground application, except for the functions corresponding to the monitored operation mode.
以终端的“王者荣耀”游戏类应用为例,“王者荣耀”里包括很多个功能,例如触摸操作对应的竞技功能、交易功能、地理位置获取功能;语音操作对应的语音即时通信功能;录音拍照功能等等。当时间间隔满足冻结条件时,获取到的前台应用监听到的操作方式所对应的功能主要是竞技功能、语音即时通信功能,而未使用的功能包括交易功能、地理位置获取功能、录音拍照功能等等。Take the "King of Glory" game application of the terminal as an example. The "Glory of the King" includes many functions, such as the competitive function corresponding to the touch operation, the transaction function, the location acquisition function, the voice instant communication function corresponding to the voice operation, and the recording Features and more. When the time interval satisfies the freeze condition, the functions corresponding to the acquired operation mode monitored by the foreground application are mainly the competitive function and the voice instant communication function, and the unused functions include the transaction function, the geographic location acquisition function, the recording and photographing function, and the like. Wait.
步骤806:冻结所述未使用的功能在系统中对应的进程。Step 806: Freeze the corresponding process of the unused function in the system.
每个应用在系统框架中都对应有进程组,在运行应用的时候,系统会给其对应的进程组分配资源;而应用中的各个功能模块也对应进程组中的进程,故将应用的各个功能的对应进程进行标识,方便后续对相应进程的系统资源分配管理。标识用于唯一标识对应的进程,可由预设位数的数字、字母或者其他字符中的一种或几种的组合所构成。比如,可以以进程标识“0001”表示进程A,以“1234”表示进程B等Each application corresponds to a process group in the system framework. When the application is running, the system allocates resources to its corresponding process group; and each functional module in the application also corresponds to the process in the process group, so each application will be applied. The corresponding process of the function is identified to facilitate subsequent management of system resource allocation to the corresponding process. The identifier is used to uniquely identify the corresponding process, and may be composed of a combination of one or more of a preset number of digits, letters, or other characters. For example, process ID "0001" can be used to represent process A, and "1234" can be used to indicate process B, etc.
以终端的“王者荣耀”游戏类应用为例,当前台运行“王者荣耀”时根据监听到的操作方式所对应的功能可以获取未使用的功能。其中,未使用的功能(交易功能、地理位置获取功能、录音拍照功能等)。但是未使用的功能也会在后台运行,占用系统资源。Take the terminal's "King of Glory" game application as an example. When the current station runs "King of Glory", it can obtain unused functions according to the function corresponding to the monitored operation mode. Among them, unused functions (transaction function, location acquisition function, recording camera function, etc.). However, unused features also run in the background, taking up system resources.
通过上述方法,用户可以将未使用的功能在系统中对应的进程进行冻结,达到了节约资源和提高运行效率的目的。但是该前台应用的其他功能仍然可以使用,故本申请不需要冻结整个应用,而是冻结应用的部分功能,而保证其他部分功能正常使用,从而达到降低功耗的效果。Through the above method, the user can freeze the unused functions in the corresponding processes in the system, thereby achieving the purpose of saving resources and improving operational efficiency. However, other functions of the foreground application can still be used, so the application does not need to freeze the entire application, but freezes some functions of the application, and ensures that other functions are used normally, thereby achieving the effect of reducing power consumption.
在一个实施例中,如图9所示,应用冻结方法还包括步骤902-步骤906。其中,In one embodiment, as shown in FIG. 9, the application freeze method further includes steps 902- 906. among them,
步骤902:获取对所述前台应用进行解冻的解冻指令。Step 902: Acquire a thaw instruction for thawing the foreground application.
步骤904:检测所述解冻指令中的生物特征信息是否与预设的生物特征相匹配。Step 904: Detect whether biometric information in the thaw instruction matches a preset biometric.
步骤906:当解冻指令中的生物特征信息是否与预设的生物特征相匹配时,对所述前台应用进行解冻操作。Step 906: Perform a thawing operation on the foreground application when the biometric information in the defrosting instruction matches the preset biometric.
也即,当前台应用被冻结后,需要对前台应用进行解冻处理时,需要获取用 户输入的解冻指令。解冻指令中包括生物特征信息,其中,生物特征信息可以为指纹信息、虹膜信息、声纹信息、面部信息等等。That is, after the current application is frozen, when the foreground application needs to be thawed, it is necessary to obtain the thaw instruction input by the user. The defrosting command includes biometric information, wherein the biometric information may be fingerprint information, iris information, voiceprint information, facial information, and the like.
需要说明的是,不同的应用可以设定不同的生物特征信息,也可以设定相同的生物特征信息,可以根据用户的需求进行自定义设置。It should be noted that different applications can set different biometric information, and can also set the same biometric information, and can be customized according to the needs of the user.
当解冻指令中的生物特征信息与预设的生物特征信息相匹配时,则对前台应用进行解冻操作。解冻操作时,也可以根据与冻结策略来设定相应的解冻策略,实现对前台应用的解冻操作。When the biometric information in the thaw instruction matches the preset biometric information, the foreground application is thawed. During the defrosting operation, the corresponding defrosting strategy can also be set according to the freezing strategy to implement the defrosting operation of the foreground application.
应该理解的是,虽然图3-9的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图3-9中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flowcharts of FIGS. 3-9 are sequentially displayed as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and the steps may be performed in other orders. Moreover, at least some of the steps in Figures 3-9 may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, these sub-steps or stages The order of execution is not necessarily performed sequentially, but may be performed alternately or alternately with at least a portion of other steps or sub-steps or stages of other steps.
在一个实施例中,如图10所示,提供了一种应用冻结装置,该装置包括:In one embodiment, as shown in FIG. 10, an application freezing device is provided, the device comprising:
监听模块1010,用于当前台开启应用时,监听当前正在运行的前台应用接收用户输入的操作信息;所述操作信息包括操作方式和操作时间点;The monitoring module 1010 is configured to: when the current station starts the application, listen to the currently running foreground application to receive operation information input by the user; the operation information includes an operation mode and an operation time point;
确定模块1020,用于调用每个应用接收用户输入的操作方式与冻结条件的映射关系,根据所述操作信息确定当前时刻是否需要冻结所述前台应用;The determining module 1020 is configured to invoke, by each application, a mapping relationship between an operation mode input by the user and a freeze condition, and determine, according to the operation information, whether the foreground application needs to be frozen at the current time;
冻结模块1030,用于当需要冻结所述前台应用时,则根据预设策略对所述前台应用进行冻结。The freezing module 1030 is configured to freeze the foreground application according to a preset policy when the foreground application needs to be frozen.
上述应用冻结装置,当前台开启应用时,监听模块1010能够监听当前正在运行的前台应用接收用户输入的操作信息;确定模块1020能够调用每个前台应用的操作方式与冻结条件的映射关系,根据所述映射关系确定当前时刻是否需要冻结所述前台应用;当需要冻结所述前台应用时,冻结模块1030根据预设策略对所述前台应用进行冻结,能够通过操作信息来获取当前用户对前台应用的使用率,当用户长时间未输入操作信息时,可以及时的对前台应用进行冻结,提高终端的智能度。The application freezing device, when the current application is started, the monitoring module 1010 can monitor the currently running foreground application to receive operation information input by the user; the determining module 1020 can call the mapping relationship between the operation mode and the freezing condition of each foreground application, according to the The mapping relationship determines whether the current application needs to freeze the foreground application; when the foreground application needs to be frozen, the freezing module 1030 freezes the foreground application according to the preset policy, and can obtain the current user's application to the foreground through the operation information. The usage rate, when the user does not input the operation information for a long time, can freeze the foreground application in time to improve the intelligence of the terminal.
上述应用冻结装置中各个模块的划分仅用于举例说明,在其他实施例中,可将应用冻结装置按照需要划分为不同的模块,以完成上述应用冻结装置的全部或部分功能。The division of each module in the application freezing device is for illustrative purposes only. In other embodiments, the application freezing device may be divided into different modules as needed to complete all or part of the functions of the application freezing device.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述各实施例所提供的应用冻结方法的步骤。In one embodiment, a computer readable storage medium is provided having stored thereon a computer program that, when executed by a processor, implements the steps of the application freezing method provided by the various embodiments described above.
在一个实施例中,提供了一种终端,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现上述各实施例所提供的应用冻结方法的步骤。In one embodiment, a terminal is provided, including a memory, a processor, and a computer program stored on the memory and operable on the processor, and the application freezing method provided by the foregoing embodiments is implemented when the processor executes the computer program A step of.
本申请实施例还提供了一种计算机程序产品。一种包含指令的计算机程序产 品,当其在计算机上运行时,使得计算机执行上述各实施例所提供的应用冻结方法的步骤。The embodiment of the present application also provides a computer program product. A computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps of the application freeze method provided by the various embodiments described above.
本申请实施例还提供了一种终端。如图11所示,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该终端可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等任意终端设备,以终端为手机为例:The embodiment of the present application further provides a terminal. As shown in FIG. 11 , for the convenience of description, only the parts related to the embodiments of the present application are shown. For details that are not disclosed, refer to the method part of the embodiment of the present application. The terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, and the terminal is a mobile phone as an example:
图11为与本申请实施例提供的终端相关的手机的部分结构的框图。参考图11,手机包括:射频(Radio Frequency,RF)电路1110、存储器1120、输入单元1130、显示单元1140、传感器1150、音频电路1160、无线保真(wireless fidelity,WiFi)模块1170、处理器1180、以及电源1190等部件。本领域技术人员可以理解,图11所示的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 11 is a block diagram showing a partial structure of a mobile phone related to a terminal provided by an embodiment of the present application. Referring to FIG. 11 , the mobile phone includes: a radio frequency (RF) circuit 1110 , a memory 1120 , an input unit 1130 , a display unit 1140 , a sensor 1150 , an audio circuit 1160 , a wireless fidelity (WiFi) module 1170 , and a processor 1180 . And power supply 1190 and other components. It will be understood by those skilled in the art that the structure of the handset shown in FIG. 11 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different components may be arranged.
其中,RF电路1110可用于收发信息或通话过程中,信号的接收和发送,可将基站的下行信息接收后,给处理器1180处理;也可以将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路1110还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 1110 can be used for receiving and transmitting information during the transmission and reception of information or during the call. The downlink information of the base station can be received and processed by the processor 1180. The uplink data can also be sent to the base station. Generally, RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuitry 1110 can also communicate with the network and other devices via wireless communication. The above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Messaging Service (SMS), and the like.
存储器1120可用于存储软件程序以及模块,处理器1180通过运行存储在存储器1120的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器1120可主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能的应用程序、图像播放功能的应用程序等)等;数据存储区可存储根据手机的使用所创建的数据(比如音频数据、通讯录等)等。此外,存储器1120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 1120 can be used to store software programs and modules, and the processor 1180 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 1120. The memory 1120 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as an application of a sound playing function, an application of an image playing function, etc.); The data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone. Moreover, memory 1120 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
输入单元1130可用于接收输入的数字或字符信息,以及产生与手机1100的用户设置以及功能控制有关的键信号输入。具体地,输入单元1130可包括操作面板1131以及其他输入设备1132。操作面板1131,也可称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在操作面板1131上或在操作面板1131附近的操作),并根据预先设定的程式驱动相应的连接装置。在一个实施例中,操作面板1131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方 位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1180,并能接收处理器1180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现操作面板1131。除了操作面板1131,输入单元1130还可以包括其他输入设备1132。具体地,其他输入设备1132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)等中的一种或多种。The input unit 1130 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset 1100. Specifically, the input unit 1130 may include an operation panel 1131 and other input devices 1132. The operation panel 1131, which may also be referred to as a touch screen, may collect touch operations on or near the user (such as an operation of the user using a finger, a stylus, or the like on the operation panel 1131 or in the vicinity of the operation panel 1131). And drive the corresponding connection device according to a preset program. In one embodiment, the operation panel 1131 may include two parts of a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 1180 is provided and can receive commands from the processor 1180 and execute them. Further, the operation panel 1131 can be realized by various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the operation panel 1131, the input unit 1130 may further include other input devices 1132. Specifically, other input devices 1132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.).
显示单元1140可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元1140可包括显示面板1141。在一个实施例中,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1141。在一个实施例中,操作面板1131可覆盖显示面板1141,当操作面板1131检测到在其上或附近的触摸操作后,传送给处理器11110以确定触摸事件的类型,随后处理器11110根据触摸事件的类型在显示面板1141上提供相应的视觉输出。虽然在图11中,操作面板1131与显示面板1141是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将操作面板1131与显示面板1141集成而实现手机的输入和输出功能。The display unit 1140 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone. The display unit 1140 may include a display panel 1141. In one embodiment, the display panel 1141 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. In one embodiment, the operation panel 1131 may cover the display panel 1141, and when the operation panel 1131 detects a touch operation thereon or nearby, it is transmitted to the processor 11110 to determine the type of the touch event, and then the processor 11110 according to the touch event The type provides a corresponding visual output on display panel 1141. Although in FIG. 11, the operation panel 1131 and the display panel 1141 are two independent components to implement the input and input functions of the mobile phone, in some embodiments, the operation panel 1131 and the display panel 1141 may be integrated to implement the mobile phone. Input and output functions.
手机1100还可包括至少一种传感器1150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1141的亮度,接近传感器可在手机移动到耳边时,关闭显示面板1141和/或背光。运动传感器可包括加速度传感器,通过加速度传感器可检测各个方向上加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换)、振动识别相关功能(比如计步器、敲击)等;此外,手机还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器等。The handset 1100 can also include at least one sensor 1150, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1141 according to the brightness of the ambient light, and the proximity sensor may close the display panel 1141 and/or when the mobile phone moves to the ear. Or backlight. The motion sensor may include an acceleration sensor, and the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
音频电路1160、扬声器1161和传声器1162可提供用户与手机之间的音频接口。音频电路1160可将接收到的音频数据转换后的电信号,传输到扬声器1161,由扬声器1161转换为声音信号输出;另一方面,传声器1162将收集的声音信号转换为电信号,由音频电路1160接收后转换为音频数据,再将音频数据输出处理器1180处理后,经RF电路1110可以发送给另一手机,或者将音频数据输出至存储器1120以便后续处理。 Audio circuitry 1160, speaker 1161, and microphone 1162 can provide an audio interface between the user and the handset. The audio circuit 1160 can transmit the converted electrical data of the received audio data to the speaker 1161, and convert it into a sound signal output by the speaker 1161; on the other hand, the microphone 1162 converts the collected sound signal into an electrical signal, and the audio circuit 1160 After receiving, it is converted into audio data, and then processed by the audio data output processor 1180, transmitted to another mobile phone via the RF circuit 1110, or outputted to the memory 1120 for subsequent processing.
WiFi属于短距离无线传输技术,手机通过WiFi模块1170可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图11示出了WiFi模块1170,但是可以理解的是,其并不属于手机1100的必须构成,可以根据需要而省略。WiFi is a short-range wireless transmission technology. The mobile phone can help users to send and receive emails, browse web pages and access streaming media through the WiFi module 1170, which provides users with wireless broadband Internet access. Although FIG. 11 shows the WiFi module 1170, it will be understood that it does not belong to the essential configuration of the handset 1100 and may be omitted as needed.
处理器1180是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1120内的软件程序和/或模块,以及调用存储在存储器1120内的数据,执行手机的各种功能和处理数据,从而对手 机进行整体监听。在一个实施例中,处理器1180可包括一个或多个处理单元。在一个实施例中,处理器1180可集成应用处理器和调制解调器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调器主要处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1180中。比如,该处理器1180可集成应用处理器和基带处理器,基带处理器与和其它外围芯片等可组成调制解调器。手机1100还包括给各个部件供电的电源1190(比如电池),优选的,电源可以通过电源管理系统与处理器1180逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The processor 1180 is a control center for the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 1120, and invoking data stored in the memory 1120, The various functions of the mobile phone and the processing of the data, so that the overall monitoring of the mobile phone. In one embodiment, processor 1180 can include one or more processing units. In one embodiment, processor 1180 can integrate an application processor and a modem, where the application processor primarily processes an operating system, user interface, applications, etc.; the modem primarily handles wireless communications. It will be appreciated that the above modem may also not be integrated into the processor 1180. For example, the processor 1180 can integrate an application processor and a baseband processor, and the baseband processor and other peripheral chips can form a modem. The handset 1100 also includes a power source 1190 (such as a battery) that supplies power to the various components. Preferably, the power source can be logically coupled to the processor 1180 via a power management system to manage functions such as charging, discharging, and power management through the power management system.
在一个实施例中,手机1100还可以包括摄像头、蓝牙模块等。In one embodiment, the handset 1100 can also include a camera, a Bluetooth module, and the like.
在本申请实施例中,该手机所包括的处理器执行存储在存储器上的计算机程序时实现上述所描述的应用冻结方法。In the embodiment of the present application, the processor included in the mobile phone implements the application freezing method described above when executing a computer program stored in the memory.
本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。合适的非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDR SDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。Any reference to a memory, storage, database or other medium used herein may include non-volatile and/or volatile memory. Suitable non-volatile memories can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM), which acts as an external cache. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual 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 above embodiments are merely illustrative of several embodiments of the present application, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the claims. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the present application. Therefore, the scope of the invention should be determined by the appended claims.

Claims (16)

  1. 一种应用冻结方法,用于冻结终端的前台应用,包括:An application freezing method for freezing a foreground application of a terminal, including:
    当前台开启应用时,监听当前正在运行的前台应用接收用户输入的操作信息;所述操作信息包括操作方式和操作时间点;When the current application is started, the foreground application currently running is monitored to receive operation information input by the user; the operation information includes an operation mode and an operation time point;
    调用每个应用接收用户输入的操作方式与冻结条件的映射关系,根据所述操作信息确定当前时刻是否需要冻结所述前台应用;Invoking each application to receive a mapping relationship between the operation mode input by the user and the freeze condition, and determining, according to the operation information, whether the foreground application needs to be frozen at the current time;
    当需要冻结所述前台应用时,则根据预设策略对所述前台应用进行冻结。When the foreground application needs to be frozen, the foreground application is frozen according to a preset policy.
  2. 根据权利要求1所述的方法,其中,所述根据所述操作信息确定当前时刻是否需要冻结所述前台应用,包括:The method according to claim 1, wherein the determining, according to the operation information, whether the current time needs to freeze the foreground application comprises:
    获取距离当前时刻最近的所述操作信息,并记录最近的所述操作信息距离当前时刻的时间间隔;Obtaining the operation information that is closest to the current time, and recording the time interval of the latest operation information from the current time;
    根据所述映射关系确定所述时间间隔是否满足所述冻结条件;Determining, according to the mapping relationship, whether the time interval satisfies the freezing condition;
    当满足所述冻结条件时,则通过所述终端检测可视区域是否存在人脸图像;When the freezing condition is met, detecting, by the terminal, whether a visible image exists in the visible area;
    当不存在所述人脸图像时,则需要冻结所述前台应用。When the face image does not exist, the foreground application needs to be frozen.
  3. 根据权利要求2所述的方法,其中,进一步包括:The method of claim 2, further comprising:
    当存在所述人脸图像时,通过人脸识别技术获取当前所述人脸图像的年龄特征;Obtaining an age feature of the current face image by a face recognition technology when the face image is present;
    获取所述前台应用的应用信息;Obtaining application information of the foreground application;
    基于所述年龄特征与专属应用的对应关系,根据所述应用信息确定所述前台应用是否需要冻结。And determining, according to the application information, whether the foreground application needs to be frozen according to the correspondence between the age feature and the exclusive application.
  4. 根据权利要求3所述的方法,其中,所述通过人脸识别技术获取当前所述人脸图像的年龄特征,包括:The method according to claim 3, wherein the obtaining the age feature of the current face image by the face recognition technology comprises:
    对所述人脸图像进行对齐以及无监督或监督学习降维的预处理;Aligning the face image and preprocessing of unsupervised or supervised learning dimension reduction;
    基于训练得到的自动编码器,得到用于身份表示的特征和不同年龄段表示的特征组;Based on the trained automatic encoder, the feature set for identity representation and the feature set represented by different age segments are obtained;
    对所述特征组的结果经过平行卷积神经网络,输出图像相似度并做加权融合得到匹配结果以实现所述年龄检测并获取年龄特征。The results of the feature set are subjected to parallel convolutional neural networks, and image similarities are output and weighted fusion is performed to obtain matching results to achieve the age detection and obtain age characteristics.
  5. 根据权利要求2所述的方法,其中,所述基于所述年龄特征与专属应用的对应关系,根据所述应用信息确定所述前台应用是否需要冻结前,进一步包括:The method according to claim 2, wherein the determining, based on the application of the age feature and the exclusive application, whether the foreground application needs to be frozen according to the application information further comprises:
    根据年龄特征可以将用户划分为多个用户群;所述用户群至少包括老年用户群和儿童用户群;According to the age feature, the user may be divided into a plurality of user groups; the user group includes at least an elderly user group and a child user group;
    针对所述老年用户群和所述儿童用户群分别制定所述专属应用,其中,Dedicating the exclusive application to the elderly user group and the child user group, wherein
    所述老年用户群对应的专属应用为WIFI连接状态下才能运行的应用;The exclusive application corresponding to the old user group is an application that can be run under the WIFI connection state;
    所述儿童用户群,对应的专属应用为益智类应用。The child user group, the corresponding exclusive application is a puzzle application.
  6. 根据权利要求5所述的方法,其中,应用信息包括应用网络标识和应用类型;所述根据所述应用信息确定所述前台应用是否需要冻结,包括:The method of claim 5, wherein the application information comprises an application network identifier and an application type; and determining, according to the application information, whether the foreground application needs to be frozen, comprising:
    当用户群为老年用户群时,根据前台应用的应用网络标识判断所述前台应用是否属于专属应用,若否,则所述前台应用需要冻结;When the user group is an elderly user group, determining whether the foreground application belongs to a dedicated application according to an application network identifier of the foreground application, and if not, the foreground application needs to be frozen;
    当用户群为儿童用户群时,根据前台应用的应用类型判断所述前台应用是否属于专属应用,若否,则所述前台应用需要冻结。When the user group is a child user group, it is determined whether the foreground application belongs to a dedicated application according to an application type of the foreground application, and if not, the foreground application needs to be frozen.
  7. 根据权利要求2所述的方法,其中,所述根据预设策略对所述前台应用进行冻结,包括:The method of claim 2, wherein the freezing the foreground application according to a preset policy comprises:
    当所述时间间隔满足所述冻结条件时,获取所述时间间隔的时长;Obtaining a duration of the time interval when the time interval satisfies the freezing condition;
    根据所述时长划分冻结等级;所述冻结等级用于指示配置所述前台应用所能使用的最大允许资源;And dividing a freeze level according to the duration; the freeze level is used to indicate a maximum allowed resource that can be used by the foreground application;
    根据所述冻结等级对所述前台应用进行相应等级的冻结。The foreground application is frozen according to the freeze level according to the freeze level.
  8. 根据权利要求7所述的方法,其中,所述最大允许资源表示进程在各个时刻下前台应用允许被使用的最大资源;The method of claim 7, wherein the maximum allowed resource represents a maximum resource that the foreground application allows to be used at various times;
    所述间隔时间越长对应的所述冻结等级越高;所述冻结等级越高,所述前台应用所能使用的所述最大允许资源越少。The longer the interval is, the higher the freeze level is; the higher the freeze level, the less the maximum allowed resource that the foreground application can use.
  9. 根据权利要求1所述的方法,其中,所述根据预设策略对所述前台应用进行冻结,包括:The method of claim 1, wherein the freezing the foreground application according to a preset policy comprises:
    获取前台应用的所有功能和当前所述前台应用监听到的操作方式所对应的功能;Obtaining all functions of the foreground application and functions corresponding to the operation mode currently monitored by the foreground application;
    根据监听到的所述操作方式所对应的功能获取未使用的功能;Acquiring unused functions according to the function corresponding to the monitored operation mode;
    冻结所述未使用的功能在系统中对应的进程。Freeze the corresponding process in the system for the unused function.
  10. 根据权利要求1所述的方法,其中,所述调用每个应用接收用户输入的操作方式与冻结条件的映射关系前,还包括:The method according to claim 1, wherein before the invoking each application receives a mapping relationship between a mode of operation input by the user and a freeze condition, the method further includes:
    获取每个所述前台应用每次在前台运行的历史运行时长和接收用户输入的历史操作记录;所述历史操作记录包括历史操作方式,以及与所述操作方式对应的使用频率;Obtaining a historical running time that each of the foreground applications runs in the foreground and receiving a historical operation record input by the user; the historical operation record includes a historical operation mode, and a usage frequency corresponding to the operation mode;
    根据所述历史运行时长和与所述操作方式对应的使用频率设定每个前台应用的冻结条件;其中,所述冻结条件为时间条件;Setting a freeze condition of each foreground application according to the historical running time length and a usage frequency corresponding to the operation mode; wherein the freezing condition is a time condition;
    构建每个前台应用的操作方式与冻结条件的映射关系。Construct a mapping relationship between the operation mode of each foreground application and the freeze condition.
  11. 根据权利要求10所述的方法,其中,所述操作方式至少包括按键操作、语音操作、触摸操作、指纹操作和扫描等操作;所述构建每个前台应用的操作方式与冻结条件的映射关系,包括:The method according to claim 10, wherein the operation mode comprises at least a operation of a button operation, a voice operation, a touch operation, a fingerprint operation, and a scan; and the mapping between the operation mode of each foreground application and the freeze condition is performed, include:
    在第一预设时长内未监听到所述触摸操作时,则满足第一冻结条件,所述第一预设时长大于所述触摸操作的使用频率的预设倍数;When the touch operation is not detected within the first preset duration, the first freeze condition is satisfied, and the first preset duration is greater than a preset multiple of the use frequency of the touch operation;
    在第二预设时长内未监听到所述语音操作时,则满足第二冻结条件,所述第二预设时长大于所述语音操作的使用频率的预设倍数。When the voice operation is not monitored within the second preset duration, the second freeze condition is satisfied, and the second preset duration is greater than a preset multiple of the use frequency of the voice operation.
  12. 根据权利要求11所述的方法,其中,一个所述前台应用对应多种所述冻结条件,The method of claim 11 wherein one of said foreground applications corresponds to a plurality of said freeze conditions,
    根据操作方式的使用频率设定冻结条件的优先级;The priority of the freeze condition is set according to the frequency of use of the operation mode;
    根据所述优先级来判断是否冻结所述前台应用。Determining whether to freeze the foreground application according to the priority.
  13. 根据权利要求1所述的方法,其中,还包括:The method of claim 1 further comprising:
    获取对所述前台应用进行解冻的解冻指令;Obtaining a thaw instruction for thawing the foreground application;
    检测所述解冻指令中的生物特征信息是否与预设的生物特征相匹配;Detecting whether biometric information in the thaw instruction matches a preset biometric;
    当解冻指令中的生物特征信息是否与预设的生物特征相匹配时,对所述前台应用进行解冻操作。When the biometric information in the thaw instruction matches the preset biometric, the foreground application is thawed.
  14. 一种应用冻结装置,用于冻结终端的前台应用,所述装置包括:An application freezing device for freezing a foreground application of a terminal, the device comprising:
    监听模块,用于当前台开启应用时,监听当前正在运行的前台应用接收用户输入的操作信息;所述操作信息包括操作方式和操作时间点;a monitoring module, configured to: when the current station starts the application, listen to the currently running foreground application to receive operation information input by the user; the operation information includes an operation mode and an operation time point;
    确定模块,用于调用每个应用接收用户输入的操作方式与冻结条件的映射关系,根据所述操作信息确定当前时刻是否需要冻结所述前台应用;a determining module, configured to call each application to receive a mapping relationship between an operation mode input by the user and a freeze condition, and determine, according to the operation information, whether the foreground application needs to be frozen at the current time;
    冻结模块,用于当需要冻结所述前台应用时,则根据预设策略对所述前台应用进行冻结。The freezing module is configured to freeze the foreground application according to a preset policy when the foreground application needs to be frozen.
  15. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1至13中任一项所述方法的步骤。A computer readable storage medium having stored thereon a computer program, wherein the computer program is executed by a processor to perform the steps of the method of any one of claims 1 to 13.
  16. 一种终端,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现权利要求1至13中任一项所述方法的步骤。A terminal, comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor executes the computer program to implement the method of any one of claims 1 to A step of.
PCT/CN2018/116736 2017-12-29 2018-11-21 Application freezing method and device, storage medium, and terminal WO2019128563A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711489078.4A CN109992379B (en) 2017-12-29 2017-12-29 Application freezing method and device, storage medium and terminal
CN201711489078.4 2017-12-29

Publications (1)

Publication Number Publication Date
WO2019128563A1 true WO2019128563A1 (en) 2019-07-04

Family

ID=67063053

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/116736 WO2019128563A1 (en) 2017-12-29 2018-11-21 Application freezing method and device, storage medium, and terminal

Country Status (2)

Country Link
CN (1) CN109992379B (en)
WO (1) WO2019128563A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112558745A (en) * 2019-09-24 2021-03-26 中兴通讯股份有限公司 Method and device for freezing control of terminal application program, terminal and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126295A (en) * 2016-06-29 2016-11-16 宇龙计算机通信科技(深圳)有限公司 The control method of application program and control device, terminal
CN106292998A (en) * 2016-07-28 2017-01-04 宇龙计算机通信科技(深圳)有限公司 The management method of a kind of running background program and terminal
CN106485106A (en) * 2016-09-09 2017-03-08 宇龙计算机通信科技(深圳)有限公司 application program freezing method and system
CN106843450A (en) * 2017-01-23 2017-06-13 努比亚技术有限公司 The storage processing method and device of a kind of terminal applies

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030217077A1 (en) * 2002-05-16 2003-11-20 Schwartz Jeffrey D. Methods and apparatus for storing updatable user data using a cluster of application servers
KR102089447B1 (en) * 2013-06-04 2020-03-16 삼성전자 주식회사 Electronic device and method for controlling applications thereof
CN103412708B (en) * 2013-07-31 2016-12-28 华为技术有限公司 Task management method on terminal unit and terminal unit
KR101649658B1 (en) * 2014-10-10 2016-08-19 엘지전자 주식회사 Central control apparatus for controlling facilities, facility control system comprising the same, and method for controlling facilities
CN105528228A (en) * 2015-12-07 2016-04-27 上海斐讯数据通信技术有限公司 Apparatus and method for automatically closing applications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126295A (en) * 2016-06-29 2016-11-16 宇龙计算机通信科技(深圳)有限公司 The control method of application program and control device, terminal
CN106292998A (en) * 2016-07-28 2017-01-04 宇龙计算机通信科技(深圳)有限公司 The management method of a kind of running background program and terminal
CN106485106A (en) * 2016-09-09 2017-03-08 宇龙计算机通信科技(深圳)有限公司 application program freezing method and system
CN106843450A (en) * 2017-01-23 2017-06-13 努比亚技术有限公司 The storage processing method and device of a kind of terminal applies

Also Published As

Publication number Publication date
CN109992379A (en) 2019-07-09
CN109992379B (en) 2021-04-23

Similar Documents

Publication Publication Date Title
US11244672B2 (en) Speech recognition method and apparatus, and storage medium
US11636861B2 (en) Electronic device and method of operation thereof
CN108701178B (en) Authentication method and electronic device using the same
US20180205880A1 (en) Initializing camera subsystem for face detection based on sensor inputs
WO2019128546A1 (en) Application program processing method, electronic device, and computer readable storage medium
WO2019128540A1 (en) Resource management method, mobile terminal and computer readable storage medium
WO2019052316A1 (en) Image processing method and apparatus, computer-readable storage medium and mobile terminal
WO2019128598A1 (en) Application processing method, electronic device, and computer readable storage medium
WO2019128537A1 (en) Application freezing method, and computer device and computer-readable storage medium
WO2019128549A1 (en) Method and apparatus for freezing application, and terminal and computer-readable storage medium
EP3499853B1 (en) Ppg authentication method and device
CN110032266B (en) Information processing method, information processing device, computer equipment and computer readable storage medium
CN112703714A (en) Application program processing method and device, computer equipment and computer readable storage medium
WO2019128588A1 (en) Process processing method and apparatus, electronic device, computer readable storage medium
WO2019128573A1 (en) Information processing method, apparatus, computer device and computer-readable storage medium
WO2019184631A1 (en) Information processing method and apparatus, computer-readable storage medium, and terminal
WO2019128574A1 (en) Information processing method and device, computer device and computer readable storage medium
WO2019128571A1 (en) Resource management method and device, mobile terminal, as well as computer readable storage medium
CN110032429B (en) Information processing method and device, mobile terminal and computer readable storage medium
CN107257408B (en) Main screen page display method, terminal and computer readable storage medium
WO2019128569A1 (en) Method and apparatus for freezing application, and storage medium and terminal
WO2019128586A1 (en) Application processing method, electronic device, and computer readable storage medium
WO2019128563A1 (en) Application freezing method and device, storage medium, and terminal
CN110046033B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN109992369B (en) Application program processing method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18894884

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18894884

Country of ref document: EP

Kind code of ref document: A1