CN112997132A - Application freezing method and device and electronic equipment - Google Patents

Application freezing method and device and electronic equipment Download PDF

Info

Publication number
CN112997132A
CN112997132A CN201880097730.4A CN201880097730A CN112997132A CN 112997132 A CN112997132 A CN 112997132A CN 201880097730 A CN201880097730 A CN 201880097730A CN 112997132 A CN112997132 A CN 112997132A
Authority
CN
China
Prior art keywords
target application
processes
application
identification information
frozen
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201880097730.4A
Other languages
Chinese (zh)
Inventor
陈岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN112997132A publication Critical patent/CN112997132A/en
Pending legal-status Critical Current

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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

An application freezing method and device and electronic equipment. The method comprises the following steps: judging whether the electronic device is in a screen-off state (S10); if the electronic equipment is in a screen-off state, detecting whether a target application has a power lock, wherein the target application is an application currently in a running state in the electronic equipment, and the power lock is used for indicating that the target application still keeps the running state when the target application is in the screen-off state (S20); and if the target application holds the power lock, releasing the power lock of the target application, and performing a freezing operation on the target application according to the identification information of the target application (S30). The method and the device for freezing the application and the electronic equipment can enable the electronic equipment to enter a standby state after the application is completely frozen in a screen-off state, so that the power consumption of the electronic equipment and the occupation amount of a CPU are saved.

Description

Application freezing method and device and electronic equipment Technical Field
The present application relates to the field of electronic devices, and in particular, to a method and an apparatus for freezing an application, and an electronic device.
Background
With the development of internet technology, people have higher and higher requirements on the performance of electronic equipment. At ordinary times, people often download many types of application programs in order to enrich various functions of electronic devices. However, when the electronic device is in the screen-off state, the application programs usually continue to run, occupying the running space of the electronic device, so that the electronic device cannot enter the standby state, and the power consumption is continuously increased.
Currently, the industry proposes a freezing method for background application management of electronic devices. The freezing method can identify and prohibit the running of unnecessary applications, and unfreeze the applications when the users need to run the applications, so that the applications are restored to run. The freezing method can effectively solve the problem that the electronic equipment still consumes electric quantity in the screen-off state.
However, the conventional freezing technology cannot effectively freeze some running applications, and the electronic device cannot enter a standby state due to incomplete freezing of the applications.
Disclosure of Invention
In view of this, the present application discloses an application freezing method, an application freezing device, and an electronic device, so as to completely freeze an application to enable the electronic device to enter a standby state when the electronic device is turned off.
The embodiment of the application provides an application freezing method, which is applied to electronic equipment and comprises the following steps:
judging whether the electronic equipment is in a screen-off state or not;
if the electronic equipment is in a screen-off state, detecting whether a target application has a power supply lock, wherein the target application is an application in the electronic equipment which is currently in a running state, and the power supply lock is used for indicating that the target application still keeps the running state when the target application is in the screen-off state;
and if the target application holds the power supply lock, releasing the power supply lock of the target application, and performing freezing operation on the target application according to the identification information of the target application.
The embodiment of the present application further provides an apparatus for freezing an application, including:
the screen detection module is used for judging whether the electronic equipment is in a screen-off state;
the application detection module is used for detecting whether the target application has a power supply lock in a screen-off state, the target application is each application currently in a running state in the electronic equipment, and the power supply lock is used for indicating that the target application still keeps the running state when the target application is in the screen-off state;
and the control module is used for releasing the power lock of the target application and executing freezing operation on the target application according to the identification information of the target application.
An embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the step of freezing the application as described above.
Embodiments of the present application also provide a computer non-transitory readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for application freezing as described above.
According to the technical scheme, the application freezing method, the application freezing device and the electronic equipment are disclosed, and the electronic equipment can be used for completely freezing the application in the screen-off state by releasing the power supply lock held by the application, so that the problem that the electronic equipment still consumes electric quantity in the screen-off state is solved. When the electronic equipment is in a bright screen state, the method and the device for freezing the application and the condition that the electronic equipment controls the application to resume running are that the electronic equipment is unlocked, so that the problem that the electronic equipment is bright screen due to misoperation and the application resumes running is solved.
Therefore, when the electronic equipment is frozen, the application is completely frozen, and the application cannot be recovered due to misoperation, so that the power consumption of the electronic equipment and the occupation amount of a CPU (Central processing Unit) are saved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the disclosed drawings without creative efforts.
FIG. 1 is a flow chart of a method for applying freeze in accordance with an embodiment of the present disclosure;
FIG. 2 is a flow chart of a method for applying freeze in accordance with an embodiment of the present disclosure;
FIG. 3 is a flow chart of a method for freezing an application disclosed in an embodiment of the present application;
FIG. 4 is a flowchart of a method for freezing an application according to an embodiment of the present disclosure;
FIG. 5 is a flow chart of a method for freezing an application disclosed in an embodiment of the present application;
FIG. 6 is a schematic structural diagram of an apparatus for applying freezing according to an embodiment of the present disclosure;
fig. 7 is a block diagram of a partial structure of an electronic device disclosed in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application freezing method and device and electronic equipment is used for completely freezing the application when the electronic equipment is turned off, and the running application cannot be recovered due to misoperation, so that the power consumption and the CPU occupation amount of the electronic equipment can be saved, and the running time of the electronic equipment is reduced.
Referring to fig. 1, a flowchart of a method for applying freezing is disclosed in an embodiment of the present application, and the method is applied to the electronic device, and the method includes the steps of:
and S10, judging whether the electronic equipment is in a screen-off state.
In practical applications, the electronic device may include an Internet device such as a smart phone (e.g., an Android phone, an IOS phone, etc.), a personal computer, a tablet computer, a palmtop computer, a Mobile Internet device (MID, Mobile Internet Devices), or a wearable smart device, and the embodiment of the present invention is not limited thereto.
The screen-off state refers to a state that the screen of the electronic equipment is closed. In this application, when the electronic device is in the screen-off state, a part of applications in the electronic device may be frozen first, such as dynamic wallpaper, foreground applications, part of system applications, default input methods, and default desktops. If the process of freezing the application first is referred to as a 1.0 freeze operation, it should be noted that the method of freezing the application referred to in the present application is not for the application that has been frozen by the 1.0 freeze operation, but for the application that has been filtered to be unfrozen after the 1.0 freeze operation. The filtering means that the application is not frozen in progress in the freezing operation, i.e. the application is still running.
S20, if the electronic device is in the screen-off state, detecting whether a target application has a power lock, wherein the target application is an application currently in the running state in the electronic device, and the power lock is used for indicating that the target application still keeps the running state when the target application is in the screen-off state.
The target application refers to an application which is still in a running state after the 1.0 freezing operation, that is, the application which is still in the running state when the electronic device is in a screen-off state. The application freezing method aims at the target application.
The power lock is wakelock contained in the application, the wakelock is a lock mechanism, and as long as the application holds the wakelock, the CPU cannot enter a sleep state and is always in a working state. For example, when the screen of the mobile phone is closed, some applications can still wake up the screen to prompt the user for a message, and here, the wakelock lock mechanism is used, and although the screen of the mobile phone is closed, the applications still keep running.
S30, if the target application holds the power supply lock, releasing the power supply lock of the target application, and performing freezing operation on the target application according to the identification information of the target application.
Due to the existence of the power lock, namely wakelock, the target application is still in a running state when the electronic equipment is in a screen-off state. It will be appreciated that the power lock held by the target application needs to be released before a freeze operation is performed on the target application. The application freezing method provided by the application relates to the target application which can hold a timeout lock or a permanent lock. The lock performs automatic unlocking over time. The permanent lock requires external intervention to unlock.
The identification information of the target application comprises identification information, process identification information and the like of the target application. The electronic device may perform a freeze operation on all processes of the application according to the identification information of the target application.
In summary, the method for freezing application disclosed in the present application determines whether the freezing operation needs to be performed by determining whether the electronic device is in the screen-off state. And if the electronic equipment is in the screen-off state, detecting the application in the running state at the current moment, and detecting whether the application in the running state holds the power supply lock. And if so, freezing the application according to the identification information of the application after the power supply lock is released.
Therefore, the application is completely frozen when the screen of the electronic equipment is turned off, and the problem that the electronic equipment still consumes electric quantity when the screen of the electronic equipment is turned off can be effectively solved.
In the above embodiment, the identification information of the target application includes:
an application number UID of the target application.
It can be understood that, because the Android system is a single-user system, the Android system assigns a different application number UID to each application in order to implement data sharing. For example, if the target application is an application a currently running in the electronic device, and the application number UID corresponding to the target application is 2, the application number UID of the target application a obtained at this time is 2.
The application number UID of the target application is essentially identification information of the target application in the system, and in fact, the target application is not limited to the commonly used application number UID as long as the target application can be identified within the protection scope of the present application.
And each process number PID under the application number UID.
It will be appreciated that an application is made up of a plurality of processes, each of which has a respective one of said process numbers PID. For example, if the application number UID of the target application a is 2, the processes corresponding to the target application a are a1, a2, a3, and a4, and the process numbers PID corresponding to the processes a1, a2, a3, and a4 are 11, 12, 13, and 14, respectively, then the process numbers PID corresponding to the processes a1, a2, a3, and a4 with the application number 2 acquired at this time are 11, 12, 13, and 14, respectively.
The process number PID is essentially an identification of each process under the target application. In fact, the process number PID is not limited to the commonly used process number PID as long as the process can be identified within the scope of the present invention.
And each process number PID corresponds to a record file under the process.
It is to be understood that the process log file of one of the processes includes the process identification information of all the processes started by that process. For example, if the application number UID of the target application a is 2 and the corresponding process numbers PID are 11, 12, 13, and 14, the process record files corresponding to the process numbers PID are respectively a11.procs, a12.procs, a13.procs, and a14. procs.
In the Andriod system, the process record file is commonly referred to as cgroups. In the IOS system and other systems, it is necessary to look at the location where the process identification information of all the processes started by the process is specifically stored. In fact, in any other system, the process record file is not limited to the process record file commonly used as long as the process identification information of all the processes started by the processes is recorded in the process record file.
The method further comprises the following steps:
and acquiring the identification information of all processes of the target application according to the record file.
It is understood that the identification information of the process in this embodiment may include the process number PID, the process name, the process status, the process priority, the CPU time occupied by the process, and the like. It should be clear that what is listed here is only identification information of several common processes, and identification information of the processes does not necessarily include or only includes the above-mentioned information, and can be flexibly set according to specific application scenarios.
Referring to fig. 2, in the above embodiment, the S30 includes:
s301, acquiring all the processes of the target application according to the identification information of all the processes;
s302, freezing operation is carried out on all the acquired processes;
or the like, or, alternatively,
s303, determining the identification information of the process which is not frozen currently by the target application according to the identification information of all the processes;
s304, acquiring all the processes of the target application which are not frozen according to the identification information of the processes which are not frozen;
s305, freezing operation is carried out on all the acquired processes which are not frozen.
In this embodiment, the identification information of all processes includes the process number PID, the process name, the process state, the process priority, the CPU time occupied by the process, and the like, and all the processes of the target application can be obtained according to the identification information of all the processes of the target application. And after all the processes are acquired, the electronic equipment executes freezing operation on all the processes. The electronic device may also determine, according to the identification information of all processes of the target application, identification information of the process of the target application that is not frozen at present, and then obtain, according to the identification information of the process that is not frozen, for example, the process number PID, the process name, and the like, all the processes of the target application that are not frozen. The electronic device may perform a freeze operation on all of the processes that are not frozen, i.e., freeze all of the processes that are not frozen.
Referring to fig. 3, in one embodiment of the present application, the method further comprises:
and S40, if the target application does not hold the power supply lock, the electronic equipment executes a freezing operation on the target application according to the identification information of the target application.
After the target application does not hold the power supply lock, when the electronic equipment is in a screen-off state, the electronic equipment can perform freezing operation on all the processes of the target application according to the identification information of the target application. The identification information of the target application comprises the application number UID of the target application, each process number PID under the application number UID, the record file under the process corresponding to each process number PID, and the identification information of all the processes of the target application, which is obtained according to the record file. The identification information of all processes may include the process number PID, the process name, the process status, the process priority, the CPU time occupied by the process, and the like. It should be clear that, only some common identification information of the process is listed here, and identification information of the process does not necessarily include or only includes the above information, and can be flexibly set according to a specific application scenario.
Referring to fig. 4, in an embodiment of the present application, the method further includes:
s50, if the electronic equipment is in a bright screen state and a wake-up condition is met, waking up the frozen target application.
The wake-up condition refers to unlocking the electronic device. It is understood that in actual operation, the electronic device may be turned on due to a false touch on the electronic device, and at this time, the electronic device may wake up some applications such as dynamic wallpaper, foreground application, part of system application, default input method, default desktop, and the like. If the operation of the wake-up application is referred to as a 1.0 wake-up operation, it should be noted that the wake-up operation executed in step S50 is not a 1.0 wake-up operation.
Referring to fig. 5, in an embodiment of the present application, the step S50 includes:
s501, acquiring identification information of all the processes of the frozen target application;
s502, acquiring all the processes of the frozen target application according to the identification information of all the processes;
s503, executing a wakeup operation on all the processes of the frozen target application.
The identification information of all processes of the frozen target application comprises the application number UID of the frozen target application, each process number PID under the application number UID, the record file under the process corresponding to each process number PID, and the identification information of all processes of the target application obtained according to the record file. The identification information of all processes may include the process number PID, the process name, the process status, the process priority, the CPU time occupied by the process, and the like. It should be clear that, only some common identification information of the process is listed here, and identification information of the process does not necessarily include or only includes the above information, and can be flexibly set according to a specific application scenario.
The electronic device may obtain all prime number processes of the frozen target application according to the identification information of all the processes, and perform a wake-up operation on all the processes of the frozen target application. The wake-up operation is to resume running all the processes of the frozen target application.
Referring to fig. 6, the present application provides an apparatus for applying freezing, the apparatus including:
the screen detection module 21 is configured to determine whether the electronic device is in a screen-off state;
the application detection module 22 is configured to detect whether the target application has a power lock in a screen-off state, where the target application is each application currently in a running state in the electronic device, and the power lock is configured to indicate that the target application still keeps the running state when the target application is in the screen-off state;
and the control module 23 is configured to release the power lock of the target application and perform a freeze operation on the target application according to the identification information of the target application.
The screen detection module 21 may be configured to determine whether the electronic device is in a screen-off state, and further determine whether the electronic device should perform a freezing operation. If the target application is in the screen-off state, the application detection module 22 detects whether the target application holds the power lock. The target application is each application currently in a running state in the electronic equipment. The power supply lock is used for indicating that the target application still keeps a running state when being in a screen-off state. After the application detection module 22 detects the power lock held by the target application, the control module 23 releases the power lock held by the target application. At this time, the control module may perform a freeze operation on the target application according to the identification information of the target application.
In an embodiment of the present application, the identification information of the target application includes:
an application number UID of the target application.
In this embodiment, the application number UID of the target application is substantially identification information of the target application in the system. It can be understood that, because the Android system is a single-user system, the Android system assigns a different application number UID to each application in order to implement data sharing. For example, if the target application is an application a currently running in the electronic device, and the application number UID corresponding to the target application is 2, the application number UID of the target application a obtained at this time is 2.
In fact, the identification of the target application is not limited to the commonly used application number UID, but is within the scope of the present application.
And each process number PID under the application number UID.
It will be appreciated that an application is made up of a plurality of processes, each of which has a respective corresponding process number PID. For example, if the application number of the target application a is 2, the processes corresponding to the target application a are a1, a2, a3 and a4, and the process numbers PID corresponding to the processes a1, a2, a3 and a4 are 11, 12, 13 and 14, respectively, the process numbers PID corresponding to the processes a1, a2, a3 and a4 with the application number UID of 2 acquired at this time are 11, 12, 13 and 14, respectively.
The process number PID is essentially an identification of each process under the target application. In fact, the process number PID is not limited to the commonly used process number PID as long as the process can be identified within the scope of the present invention.
And the PID of each process number corresponds to a record file under the process.
It will be appreciated that the process log file under a process contains identification information of the processes of all the processes started by that process. For example, if the application number UID of the target application a is 2 and the corresponding process numbers PID are 11, 12, 13, and 14, the process record files corresponding to the process numbers are respectively a11.procs, a12.procs, a13.procs, and a14. procs.
In the Andriod system, the process record file is commonly referred to as cgroups. In IOS systems and other systems, it is necessary to look at the location where the process identification information for all processes initiated by the process is specifically stored. In fact, in any other system, the identification information of the process, in which all the processes started by the process are recorded in the process log file, is within the protection scope of the present invention and is not limited to the process log file in common use.
The application detection module is further configured to: and acquiring the identification information of all processes of the target application according to the record file.
It is understood that the identification information of the process in this embodiment may include the process number PID, the process name, the process status, the process priority, the CPU time occupied by the process, and the like. It should be clear that, only some common identification information of the process is listed here, and identification information of the process does not necessarily include or only includes the above information, and can be flexibly set according to a specific application scenario.
In one embodiment of the present application, the control module is further configured to:
acquiring all the processes of the target application according to the identification information of all the processes;
performing a freezing operation on all the acquired processes;
or the like, or, alternatively,
determining the identification information of the process which is not frozen currently by the target application according to the identification information of the process;
acquiring all the processes of the target application which are not frozen according to the identification information of the processes which are not frozen;
and executing freezing operation on all the acquired processes which are not frozen.
The control module 23 may obtain all the processes of the target application according to the identification information of all the processes of the target application. The identification information of all the processes comprises the process number PID, the process name, the process state, the process priority, the CPU time occupied by the process and the like. After all the processes are acquired, the control module 23 performs a freezing operation on all the processes. The control module 23 may also determine the identification information of the process that is not frozen currently by the target application according to the identification information of all processes of the target application, and then obtain all the processes that are not frozen by the target application according to the identification information of the processes that are not frozen, such as the process number PID, the process name, and the like. The control module 23 may perform a freeze operation on all the processes that are not frozen, i.e., freeze all the processes that are not frozen.
In an embodiment of the present application, if the target application does not hold the power lock, the control module 23 is further configured to: and performing freezing operation on the target application according to the identification information of the target application.
After the target application does not hold the power lock, when the electronic device is in a screen-off state, the control module 23 may perform a freezing operation on all the processes of the target application according to the identification information of the target application. The identification information of the target application comprises the application number UID of the target application, the process numbers PID under the application number UID, the record file under the process corresponding to the process number PID, and the identification information of all the processes of the target application obtained according to the record file. The identification information of all processes may include the process number PID, the process name, the process status, the process priority, the CPU time occupied by the process, and the like. It should be clear that, only some common identification information of the process is listed here, and identification information of the process does not necessarily include or only includes the above information, and can be flexibly set according to a specific application scenario.
In one embodiment of the present application, the control module 23 is further configured to: after the detection of the screen detection module 21, if the electronic device is in a bright screen state and meets the wake-up condition, the frozen target application is woken up.
In this embodiment, the screen state of the electronic device is detected by the screen detection module 21, and after the detection, the electronic device is in a bright screen state, where the wake-up condition refers to unlocking the electronic device. It is understood that in actual operation, the electronic device may be turned on due to a false touch on the electronic device, and at this time, the electronic device may wake up some applications such as dynamic wallpaper, foreground application, part of system application, default input method, default desktop, and the like. If the operation of the wake-up application is referred to as a 1.0 wake-up operation, it should be noted that the control module 23 wakes up not the application that is woken up in the 1.0 wake-up operation but the target application that is related to the method for freezing the application and has been frozen.
In one embodiment of the present application, the control module 23 wakes up the target application that has been frozen, including:
acquiring identification information of all processes of the frozen target application;
acquiring all the processes of the frozen target application according to the identification information of all the processes;
performing a wake-up operation on all the processes of the target application that have been frozen.
The identification information of all processes of the frozen target application comprises the application number UID of the frozen target application, each process number PID under the application number UID, the record file under the process corresponding to each process number PID, and the identification information of all processes of the target application, which is obtained according to the record file. The identification information of all processes may include the process number PID, the process name, the process status, the process priority, the CPU time occupied by the process, and the like. It should be clear that, only some common identification information of the process is listed here, and identification information of the process does not necessarily include or only includes the above information, and can be flexibly set according to a specific application scenario.
The control module 23 may obtain all the processes of the frozen target application according to the identification information of all the processes, and perform a wakeup operation on all the processes of the frozen target application. The wake-up operation is to resume running all the processes of the frozen target application.
An embodiment of the present application further provides an electronic device, which includes a memory 720 and a processor 780, where the memory 720 stores a computer program, and when the computer program is executed by the processor 780, the processor 780 is enabled to perform the step of freezing the application as described above. For convenience of explanation, only the parts related to the embodiments of the present application are shown, and details of the specific technology are not disclosed. The electronic device 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 like, taking the electronic device as a mobile phone as an example:
fig. 7 is a block diagram of a partial structure of a mobile phone related to the electronic [ mobile phone structure ] device provided in the embodiment of the present application. Referring to fig. 7, the handset includes: radio Frequency (RF) circuit 710, memory 720, input unit 730, display unit 740, sensor 750, audio circuit 760, wireless fidelity (WiFi) module 7570, processor 780, and power supply 790. Those skilled in the art will appreciate that the handset configuration shown in fig. 7 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The RF circuit 710 may be used for receiving and transmitting signals during information transmission or communication, and may receive downlink information of a base station and then process the downlink information to the processor 780; the uplink data may also be transmitted to the base station. Typically, the RF circuitry includes, but is 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, the RF circuit 710 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), e-mail, Short Messaging Service (SMS), and the like.
The memory 720 may be used to store software programs and modules, and the processor 780 may execute various functional applications and data processing of the cellular phone by operating the software programs and modules stored in the memory 720. The memory 720 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function (such as an application program for a sound playing function, an application program for an image playing function, and the like), and the like; the data storage area may store data (such as audio data, an address book, etc.) created according to the use of the mobile phone, and the like. Further, the memory 720 may include high speed random access memory, and may 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 730 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone 700. Specifically, the input unit 730 may include a touch panel 731 and other input devices 732. The touch panel 731, which may also be referred to as a touch screen, can collect touch operations of a user (e.g., operations of a user on or near the touch panel 731 by using a finger, a stylus, or any other suitable object or accessory) thereon or nearby, and drive the corresponding connection device according to a preset program. In one embodiment, the touch panel 731 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 780, and can receive and execute commands from the processor 780. In addition, the touch panel 731 may be implemented by various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 730 may include other input devices 732 in addition to the touch panel 731. In particular, other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), and the like.
The display unit 740 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 740 may include a display panel 741. In one embodiment, the Display panel 741 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 touch panel 731 can cover the display panel 741, and when the touch panel 731 detects a touch operation on or near the touch panel 731, the touch operation is transmitted to the processor 780 to determine the type of the touch event, and then the processor 780 provides a corresponding visual output on the display panel 741 according to the type of the touch event. Although the touch panel 731 and the display panel 741 are two independent components in fig. 7 to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 731 and the display panel 741 may be integrated to implement the input and output functions of the mobile phone.
The cell phone 700 may also include at least one sensor 750, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 741 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 741 and/or a backlight when the mobile phone is moved to the ear. The motion sensor can comprise an acceleration sensor, the acceleration sensor can detect the magnitude of acceleration in each direction, the magnitude and the direction of gravity can be detected when the mobile phone is static, and the motion sensor can be used for identifying the application of the gesture of the mobile phone (such as horizontal and vertical screen switching), the vibration identification related functions (such as pedometer and knocking) and the like; the mobile phone may be provided with other sensors such as a gyroscope, a barometer, a humidity meter, a thermometer, and an infrared sensor.
Audio circuitry 760, speaker 761, and microphone 762 may provide an audio interface between a user and a cell phone. The audio circuit 760 can transmit the electrical signal converted from the received audio data to the speaker 761, and the electrical signal is converted into a sound signal by the speaker 761 and output; on the other hand, the microphone 762 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 760, and then outputs the audio data to the processor 780 for processing, and then the processed audio data may be transmitted to another mobile phone through the RF circuit 710, or outputs the audio data to the memory 720 for subsequent processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 770, and provides wireless broadband Internet access for the user. Although fig. 7 shows WiFi module 770, it is understood that it does not belong to the essential components of handset 700 and may be omitted as desired.
The processor 780 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 720 and calling data stored in the memory 720, thereby integrally monitoring the mobile phone. In one embodiment, processor 780 may include one or more processing units. In one embodiment, processor 780 may integrate an application processor and a modem processor, where the application processor primarily handles operating systems, user interfaces, applications, and the like; the modem processor handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 780.
The handset 700 also includes a power supply 790 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 780 via a power management system that may be used to manage charging, discharging, and power consumption.
In one embodiment, the cell phone 700 may also include a camera, a bluetooth module, and the like.
In the embodiment of the present application, when the processor 780 included in the electronic device executes the computer program stored in the memory, the steps of the process processing method provided in the above embodiment are implemented.
Any reference to memory, storage, database, or other medium used herein may include non-volatile and/or volatile 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 external cache memory. 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), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (16)

  1. A method for freezing application, applied to an electronic device, includes:
    judging whether the electronic equipment is in a screen-off state or not;
    if the electronic equipment is in a screen-off state, detecting whether a target application has a power supply lock, wherein the target application is an application in the electronic equipment which is currently in a running state, and the power supply lock is used for indicating that the target application still keeps the running state when the target application is in the screen-off state;
    and if the target application holds the power supply lock, releasing the power supply lock of the target application, and performing freezing operation on the target application according to the identification information of the target application.
  2. The method of claim 1, wherein the identification information of the target application comprises:
    an application number UID of the target application;
    each process number PID under the application number UID;
    each process number PID corresponds to a record file under a process;
    the method further comprises the following steps:
    and acquiring the identification information of all processes of the target application according to the record file.
  3. The method of claim 2, wherein performing the freeze operation on the target application according to the identification information of the target application comprises:
    acquiring all the processes of the target application according to the identification information of all the processes;
    performing a freezing operation on all the acquired processes;
    or the like, or, alternatively,
    determining the identification information of the process which is not frozen currently by the target application according to the identification information of all the processes;
    acquiring all the processes of the target application which are not frozen according to the identification information of the processes which are not frozen;
    and executing freezing operation on all the acquired processes which are not frozen.
  4. The method of claim 1, further comprising:
    and if the target application does not hold the power supply lock, the electronic equipment executes freezing operation on the target application according to the identification information of the target application.
  5. The method of claim 1, further comprising:
    and if the electronic equipment is in a bright screen state and meets the awakening condition, awakening the frozen target application.
  6. The method of claim 5, wherein the waking up the target application that has been frozen comprises:
    acquiring identification information of all processes of the frozen target application;
    acquiring all the processes of the frozen target application according to the identification information of all the processes;
    performing a wake-up operation on all the processes of the target application that have been frozen.
  7. The method of claim 6, wherein the wake condition comprises:
    and unlocking the electronic equipment.
  8. An apparatus for applying freezing, the apparatus comprising:
    the screen detection module is used for judging whether the electronic equipment is in a screen-off state;
    the application detection module is used for detecting whether the target application has a power supply lock in a screen-off state, the target application is each application currently in a running state in the electronic equipment, and the power supply lock is used for indicating that the target application still keeps the running state when the target application is in the screen-off state;
    and the control module is used for releasing the power lock of the target application and executing freezing operation on the target application according to the identification information of the target application.
  9. The apparatus of claim 8, wherein the identification information of the target application comprises:
    an application number UID of the target application;
    each process number PID under the application number UID;
    each process number PID corresponds to a record file under a process;
    the application detection module is further configured to: and acquiring the identification information of all processes of the target application according to the record file.
  10. The apparatus of claim 9, wherein the control module is further configured to:
    acquiring all the processes of the target application according to the identification information of all the processes;
    performing a freezing operation on all the acquired processes;
    or the like, or, alternatively,
    determining the identification information of the process which is not frozen currently by the target application according to the identification information of all the processes;
    acquiring all the processes of the target application which are not frozen according to the identification information of the processes which are not frozen;
    and executing freezing operation on all the acquired processes which are not frozen.
  11. The apparatus of claim 8, wherein if the target application does not hold the power lock, the control module is further configured to: and performing freezing operation on the target application according to the identification information of the target application.
  12. The apparatus of claim 8, wherein the control module is further configured to: and after the detection of the screen detection module, if the electronic equipment is in a bright screen state and meets the awakening condition, awakening the frozen target application.
  13. The apparatus of claim 12, wherein the control module wakes the target application that has been frozen comprises:
    acquiring identification information of all processes of the frozen target application;
    acquiring all the processes of the frozen target application according to the identification information of all the processes;
    performing a wake-up operation on all the processes of the target application that have been frozen.
  14. The apparatus of claim 13, wherein the wake condition comprises:
    and unlocking the electronic equipment.
  15. An electronic device comprising a memory and a processor, the memory having stored therein a computer program, wherein the computer program, when executed by the processor, causes the processor to perform the step of application freezing as claimed in any one of claims 1-7.
  16. A computer non-transitory readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the steps of application freezing as claimed in any one of claims 1-7.
CN201880097730.4A 2018-11-08 2018-11-08 Application freezing method and device and electronic equipment Pending CN112997132A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/114465 WO2020093292A1 (en) 2018-11-08 2018-11-08 Application freezing method and apparatus, and electronic device

Publications (1)

Publication Number Publication Date
CN112997132A true CN112997132A (en) 2021-06-18

Family

ID=70612367

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880097730.4A Pending CN112997132A (en) 2018-11-08 2018-11-08 Application freezing method and device and electronic equipment

Country Status (2)

Country Link
CN (1) CN112997132A (en)
WO (1) WO2020093292A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472940B (en) * 2021-06-08 2022-06-10 Tcl通讯(宁波)有限公司 Mobile terminal optimization processing method and device based on wearable device, mobile terminal and storage medium
CN113747552B (en) * 2021-06-18 2024-03-19 荣耀终端有限公司 Power consumption optimization method and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468426A (en) * 2016-01-05 2016-04-06 珠海市魅族科技有限公司 Application freezing method and terminal
CN106020415A (en) * 2016-05-09 2016-10-12 深圳市万普拉斯科技有限公司 Application control method and apparatus for intelligent device in standby state
CN107291212A (en) * 2017-06-16 2017-10-24 深圳天珑无线科技有限公司 Power lock processing method and processing device
CN108021220A (en) * 2017-10-25 2018-05-11 努比亚技术有限公司 A kind of terminal applies control method, terminal and computer-readable recording medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105676993A (en) * 2015-12-29 2016-06-15 北京金山安全软件有限公司 Method and device for saving electric quantity and electronic equipment
CN108536269A (en) * 2018-03-26 2018-09-14 上海康斐信息技术有限公司 A kind of method and its system reducing terminal standby power consumption

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468426A (en) * 2016-01-05 2016-04-06 珠海市魅族科技有限公司 Application freezing method and terminal
CN106020415A (en) * 2016-05-09 2016-10-12 深圳市万普拉斯科技有限公司 Application control method and apparatus for intelligent device in standby state
CN107291212A (en) * 2017-06-16 2017-10-24 深圳天珑无线科技有限公司 Power lock processing method and processing device
CN108021220A (en) * 2017-10-25 2018-05-11 努比亚技术有限公司 A kind of terminal applies control method, terminal and computer-readable recording medium

Also Published As

Publication number Publication date
WO2020093292A1 (en) 2020-05-14

Similar Documents

Publication Publication Date Title
CN106250223B (en) Background process management method and terminal equipment
CN109144232B (en) Process processing method and device, electronic equipment and computer readable storage medium
CN110018901B (en) Memory recovery method and device, computer equipment and computer readable storage medium
CN112703714B (en) Application processing method and device, computer equipment and computer readable storage medium
CN109445917B (en) Application processing method and device, electronic equipment and computer readable storage medium
CN110032266B (en) Information processing method, information processing device, computer equipment and computer readable storage medium
CN109992364B (en) Application freezing method and device, computer equipment and computer readable storage medium
CN108549698B (en) File processing method and device, mobile terminal and computer readable storage medium
CN104423996A (en) View refreshing method and view refreshing device
CN108632454B (en) Information processing method and device, computer readable storage medium and terminal
CN109992425B (en) Information processing method, information processing device, computer equipment and computer readable storage medium
CN109992375B (en) Information processing method, information processing device, computer equipment and computer readable storage medium
CN110413497B (en) Abnormality monitoring method, abnormality monitoring device, terminal device and computer-readable storage medium
CN112997132A (en) Application freezing method and device and electronic equipment
CN110018886B (en) Application state switching method and device, electronic equipment and readable storage medium
WO2019128569A1 (en) Method and apparatus for freezing application, and storage medium and terminal
CN107832191B (en) Black screen detection method, mobile terminal and computer readable storage medium
CN106454953B (en) Flow control method, device and terminal
CN108646909B (en) Information processing method, device, mobile terminal and computer readable storage medium
CN109992360B (en) Process processing method and device, electronic equipment and computer readable storage medium
CN110046033B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN108170360B (en) Control method of gesture function and mobile terminal
CN107872367B (en) Black screen detection method, mobile terminal and computer readable storage medium
CN112542867B (en) Mobile terminal power supply control method and device, terminal equipment and storage medium
CN110007968B (en) Information processing method, information processing device, computer equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination