CN106844029B - Self-management Android process freezing and unfreezing device and method - Google Patents

Self-management Android process freezing and unfreezing device and method Download PDF

Info

Publication number
CN106844029B
CN106844029B CN201710039046.8A CN201710039046A CN106844029B CN 106844029 B CN106844029 B CN 106844029B CN 201710039046 A CN201710039046 A CN 201710039046A CN 106844029 B CN106844029 B CN 106844029B
Authority
CN
China
Prior art keywords
freezing
application process
thread
control thread
application
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.)
Active
Application number
CN201710039046.8A
Other languages
Chinese (zh)
Other versions
CN106844029A (en
Inventor
李爵宇
罗晓明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201710039046.8A priority Critical patent/CN106844029B/en
Publication of CN106844029A publication Critical patent/CN106844029A/en
Application granted granted Critical
Publication of CN106844029B publication Critical patent/CN106844029B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution

Abstract

The invention discloses a self-managed Android process freezing and unfreezing device and method, and relates to the technical field of mobile terminals, wherein the device comprises the following components: the freezing control module is used for setting a freezing control thread in an application process; the freezing judgment module is used for judging whether the application process meets a preset freezing condition or not by the freezing control thread according to the running state of the system, if so, freezing the application process and keeping the activity states of the freezing control thread and the communication thread; and the unfreezing module is used for unfreezing the application process through the freezing control thread when the communication thread receives an external communication request, and enabling the application process to independently manage freezing and unfreezing operations by placing the freezing control thread in the application process, so that the stability of the whole equipment system cannot be influenced, and the user experience is improved.

Description

Self-management Android process freezing and unfreezing device and method
Technical Field
The invention relates to the technical field of mobile terminals, in particular to a self-managed Android process freezing and unfreezing device and method.
Background
The Android mobile phone can run any Application (APK) developed based on its API (Application Programming Interface), and this kind of open degree of freedom is very large: an application can run in the background according to the wishes of its designer-to push advertisements, collect user states, etc., but these behaviors are not necessarily what the user wants, but rather occupy the CPU, increase power consumption, and affect the user experience. The process freezing is a better background application management mode. It recognizes a process that is not necessary for the user to run, suspends it, prohibits its running, and waits until the user really needs the process to unfreeze and resume running.
The control logic for controlling when a certain process is frozen in the process freezing process and when the certain process is thawed is usually placed into a main process of a system frame, so that more comprehensive information can be collected to provide a basis for judgment, but the defects are obvious.
Disclosure of Invention
The invention mainly aims to provide a self-managed Android process freezing and unfreezing device and method.
In order to achieve the above object, the present invention provides a self-managed Android process freezing and thawing apparatus, including:
the freezing control module is used for setting a freezing control thread in an application process;
the freezing judgment module is used for judging whether the application process meets a preset freezing condition or not by the freezing control thread according to the running state of the system, if so, freezing the application process and keeping the activity states of the freezing control thread and the communication thread;
and the unfreezing module is used for unfreezing the application process through the freezing control thread when the communication thread receives an external communication request.
Optionally, the application process includes an application package and an application process framework, and the freeze control thread and the communication thread are both disposed in the application process framework.
Optionally, an external interface and an external interface agent are further arranged in the application process frame, the external interface is used for calling an external application program, and the external interface agent is used for acquiring calling information of an application program package and notifying the freezing control thread of the calling information which causes the change of the state of the application process.
Optionally, the application process is further connected to a system framework process, the system framework process is configured to provide current environment information of the system, and accordingly, the step of determining, by the freezing control thread according to the running state of the system, whether the application process meets a preset freezing condition specifically includes:
and the freezing control thread judges whether the application process meets a preset freezing condition according to the calling information provided by the external interface agent and the current environment information of the system.
Optionally, the thawing module comprises:
the request unit is used for receiving an external communication request by the communication thread;
and the judging unit is used for judging whether the external communication request needs to be solved in time, if so, unfreezing the application process through the freezing control thread, and otherwise, intercepting the external communication request.
In another aspect of the present invention, a method for freezing and thawing a self-managed Android process is provided, which includes:
setting a freezing control thread in an application process;
the freezing control thread judges whether the application process meets a preset freezing condition according to the running state of the system, if so, the application process is frozen, and the activity states of the freezing control thread and the communication thread are kept;
and when the communication thread receives an external communication request, unfreezing the application process through the freezing control thread.
Optionally, the application process includes an application package and an application process framework, and the freeze control thread and the communication thread are both disposed in the application process framework.
Optionally, an external interface and an external interface agent are further arranged in the application process frame, the external interface is used for calling an external application program, and the external interface agent is used for acquiring calling information of an application program package and notifying the freezing control thread of the calling information which causes the change of the state of the application process.
Optionally, the application process is further connected to a system framework process, the system framework process is configured to provide current environment information of the system, and accordingly, the step of determining, by the freezing control thread according to the running state of the system, whether the application process meets a preset freezing condition specifically includes:
and the freezing control thread judges whether the application process meets a preset freezing condition according to the calling information provided by the external interface agent and the current environment information of the system.
Optionally, when the communication thread receives an external communication request, unfreezing the application process by the freezing control thread includes:
the communication thread receives an external communication request;
and judging whether the external communication request needs to be solved in time, if so, unfreezing the application process through the freezing control thread, and otherwise, intercepting the external communication request.
The invention provides a self-management Android process freezing and thawing device and method, wherein the device comprises: the freezing control module is used for setting a freezing control thread in an application process; the freezing judgment module is used for judging whether the application process meets a preset freezing condition or not by the freezing control thread according to the running state of the system, if so, freezing the application process and keeping the activity states of the freezing control thread and the communication thread; and the unfreezing module is used for unfreezing the application process through the freezing control thread when the communication thread receives an external communication request, and enabling the application process to independently manage freezing and unfreezing operations by placing the freezing control thread in the application process, so that the stability of the whole equipment system cannot be influenced, and the user experience is improved.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention;
FIG. 2 is a diagram of a wireless communication system for the mobile terminal shown in FIG. 1;
fig. 3 is a block diagram illustrating an exemplary structure of a self-managed Android process freezing and thawing apparatus according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a functional structure of an application process in the prior art;
fig. 5 is a schematic structural diagram of application processes provided in the first and second embodiments of the present invention;
fig. 6 is a block diagram illustrating an exemplary structure of a self-managed Android process freezing and thawing apparatus according to a third embodiment of the present invention;
fig. 7 is a flowchart of a self-managed Android process freezing and thawing method according to a fourth embodiment of the present invention;
fig. 8 is a flowchart of a self-managed Android process freezing and thawing method according to a fifth embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
A mobile terminal implementing various embodiments of the present invention will now be described with reference to the accompanying drawings. In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
The mobile terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a navigation device, and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. In the following, it is assumed that the terminal is a mobile terminal. However, it will be understood by those skilled in the art that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for moving purposes.
Fig. 1 is a schematic hardware configuration of a mobile terminal implementing various embodiments of the present invention.
The mobile terminal 100 may include a wireless communication unit 110, an a/V (audio/video) input unit 120, a user input unit 130, a sensing unit 140, an output unit 150, a memory 160, an interface unit 170, a controller 180, and a power supply unit 190, etc. Fig. 1 illustrates a mobile terminal having various components, but it is to be understood that not all illustrated components are required to be implemented. More or fewer components may alternatively be implemented. Elements of the mobile terminal will be described in detail below.
The wireless communication unit 110 typically includes one or more components that allow radio communication between the mobile terminal 100 and a wireless communication system or network. For example, the wireless communication unit may include at least one of a broadcast receiving module 111, a mobile communication module 112, a wireless internet module 113, a short-range communication module 114, and a location information module 115.
The broadcast receiving module 111 receives a broadcast signal and/or broadcast associated information from an external broadcast management server via a broadcast channel. The broadcast channel may include a satellite channel and/or a terrestrial channel. The broadcast management server may be a server that generates and transmits a broadcast signal and/or broadcast associated information or a server that receives a previously generated broadcast signal and/or broadcast associated information and transmits it to a terminal. The broadcast signal may include a TV broadcast signal, a radio broadcast signal, a data broadcast signal, and the like. Also, the broadcast signal may further include a broadcast signal combined with a TV or radio broadcast signal. The broadcast associated information may also be provided via a mobile communication network, and in this case, the broadcast associated information may be received by the mobile communication module 112. The broadcast signal may exist in various forms, for example, it may exist in the form of an Electronic Program Guide (EPG) of Digital Multimedia Broadcasting (DMB), an Electronic Service Guide (ESG) of digital video broadcasting-handheld (DVB-H), and the like. The broadcast receiving module 111 may receive a signal broadcast by using various types of broadcasting systems. In particular, the broadcast receiving module 111 may receive digital broadcasting by using a digital broadcasting system such as a data broadcasting system of multimedia broadcasting-terrestrial (DMB-T), digital multimedia broadcasting-satellite (DMB-S), digital video broadcasting-handheld (DVB-H), forward link media (MediaFLO @), terrestrial digital broadcasting integrated service (ISDB-T), and the like. The broadcast receiving module 111 may be constructed to be suitable for various broadcasting systems that provide broadcast signals as well as the above-mentioned digital broadcasting systems. The broadcast signal and/or broadcast associated information received via the broadcast receiving module 111 may be stored in the memory 160 (or other type of storage medium).
The mobile communication module 112 transmits and/or receives radio signals to and/or from at least one of a base station (e.g., access point, node B, etc.), an external terminal, and a server. Such radio signals may include voice call signals, video call signals, or various types of data transmitted and/or received according to text and/or multimedia messages.
The wireless internet module 113 supports wireless internet access of the mobile terminal. The module may be internally or externally coupled to the terminal. The wireless internet access technology to which the module relates may include WLAN (wireless LAN) (Wi-Fi), Wibro (wireless broadband), Wimax (worldwide interoperability for microwave access), HSDPA (high speed downlink packet access), and the like.
The short-range communication module 114 is a module for supporting short-range communication. Some examples of short-range communication technologies include bluetooth (TM), Radio Frequency Identification (RFID), infrared data association (IrDA), Ultra Wideband (UWB), zigbee (TM), and the like.
The location information module 115 is a module for checking or acquiring location information of the mobile terminal. A typical example of the location information module is a GPS (global positioning system). According to the current technology, the GPS module 115 calculates distance information and accurate time information from three or more satellites and applies triangulation to the calculated information, thereby accurately calculating three-dimensional current location information according to longitude, latitude, and altitude. Currently, a method for calculating position and time information uses three satellites and corrects an error of the calculated position and time information by using another satellite. In addition, the GPS module 115 can calculate speed information by continuously calculating current position information in real time.
The a/V input unit 120 is used to receive an audio or video signal. The a/V input unit 120 may include a camera 121 and a microphone 1220, and the camera 121 processes image data of still pictures or video obtained by an image capturing apparatus in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display module 151. The image frames processed by the camera 121 may be stored in the memory 160 (or other storage medium) or transmitted via the wireless communication unit 110, and two or more cameras 1210 may be provided according to the construction of the mobile terminal. The microphone 122 may receive sounds (audio data) via the microphone in a phone call mode, a recording mode, a voice recognition mode, or the like, and can process such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the mobile communication module 112 in case of a phone call mode. The microphone 122 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The user input unit 130 may generate key input data according to a command input by a user to control various operations of the mobile terminal. The user input unit 130 allows a user to input various types of information, and may include a keyboard, dome sheet, touch pad (e.g., a touch-sensitive member that detects changes in resistance, pressure, capacitance, and the like due to being touched), scroll wheel, joystick, and the like. In particular, when the touch pad is superimposed on the display module 151 in the form of a layer, a touch screen may be formed.
The sensing unit 140 detects a current state of the mobile terminal 100 (e.g., an open or closed state of the mobile terminal 100), a position of the mobile terminal 100, presence or absence of contact (i.e., touch input) by a user with the mobile terminal 100, an orientation of the mobile terminal 100, acceleration or deceleration movement and direction of the mobile terminal 100, and the like, and generates a command or signal for controlling an operation of the mobile terminal 100. For example, when the mobile terminal 100 is implemented as a slide-type mobile phone, the sensing unit 140 may sense whether the slide-type phone is opened or closed. In addition, the sensing unit 140 can detect whether the power supply unit 190 supplies power or whether the interface unit 170 is coupled with an external device. The sensing unit 140 may include a proximity sensor 1410 as will be described below in connection with a touch screen.
The interface unit 170 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The identification module may store various information for authenticating a user using the mobile terminal 100 and may include a User Identity Module (UIM), a Subscriber Identity Module (SIM), a Universal Subscriber Identity Module (USIM), and the like. In addition, a device having an identification module (hereinafter, referred to as an "identification device") may take the form of a smart card, and thus, the identification device may be connected with the mobile terminal 100 via a port or other connection means. The interface unit 170 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal and the external device.
In addition, when the mobile terminal 100 is connected with an external cradle, the interface unit 170 may serve as a path through which power is supplied from the cradle to the mobile terminal 100 or may serve as a path through which various command signals input from the cradle are transmitted to the mobile terminal. Various command signals or power input from the cradle may be used as signals for recognizing whether the mobile terminal is accurately mounted on the cradle. The output unit 150 is configured to provide output signals (e.g., audio signals, video signals, alarm signals, vibration signals, etc.) in a visual, audio, and/or tactile manner. The output unit 150 may include a display module 151, an audio output module 152, an alarm module 153, and the like.
The display module 151 may display information processed in the mobile terminal 100. For example, when the mobile terminal 100 is in a phone call mode, the display module 151 may display a User Interface (UI) or a Graphical User Interface (GUI) related to a call or other communication (e.g., text messaging, multimedia file downloading, etc.). When the mobile terminal 100 is in a video call mode or an image capturing mode, the display module 151 may display a captured image and/or a received image, a UI or GUI showing a video or an image and related functions, and the like.
Meanwhile, when the display module 151 and the touch pad are stacked on each other in the form of layers to form a touch screen, the display module 151 may serve as an input device and an output device. The display module 151 may include at least one of a Liquid Crystal Display (LCD), a thin film transistor LCD (TFT-LCD), an Organic Light Emitting Diode (OLED) display, a flexible display, a three-dimensional (3D) display, and the like. Some of these displays may be configured to be transparent to allow a user to view from the outside, which may be referred to as transparent displays, and a typical transparent display may be, for example, a TOLED (transparent organic light emitting diode) display or the like. The mobile terminal 100 may include two or more display modules (or other display devices) according to a particular desired implementation, for example, the mobile terminal may include an external display module (not shown) and an internal display module (not shown). The touch screen may be used to detect a touch input pressure as well as a touch input position and a touch input area.
The audio output module 152 may convert audio data received by the wireless communication unit 110 or stored in the memory 160 into an audio signal and output as sound when the mobile terminal is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output module 152 may provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output module 152 may include a speaker, a buzzer, and the like.
The alarm module 153 may provide an output to notify the mobile terminal 100 of the occurrence of an event. Typical events may include call reception, message reception, key signal input, touch input, and the like. In addition to audio or video output, the alarm module 153 may provide output in different ways to notify the occurrence of an event. For example, the alarm module 153 may provide an output in the form of a vibration, and when a call, a message, or some other incoming communication (incomingmunication) is received, the alarm module 153 may provide a tactile output (i.e., a vibration) to inform the user thereof. By providing such a tactile output, the user can recognize the occurrence of various events even when the user's mobile phone is in the user's pocket. The alarm module 153 may also provide an output notifying the occurrence of an event via the display module 151 or the audio output module 152.
The memory 160 may store software programs and the like for processing and controlling operations performed by the controller 180, or may temporarily store data (e.g., a phonebook, messages, still images, videos, and the like) that has been or will be output. Also, the memory 160 may store data regarding various ways of vibration and audio signals output when a touch is applied to the touch screen.
The memory 160 may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. Also, the mobile terminal 100 may cooperate with a network storage device that performs a storage function of the memory 160 through a network connection.
The controller 180 generally controls the overall operation of the mobile terminal. For example, the controller 180 performs control and processing related to voice calls, data communications, video calls, and the like. In addition, the controller 180 may include a multimedia module 1810 for reproducing (or playing back) multimedia data, and the multimedia module 1810 may be constructed within the controller 180 or may be constructed separately from the controller 180. The controller 180 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as a character or an image.
The power supply unit 190 receives external power or internal power and provides appropriate power required to operate various elements and components under the control of the controller 180.
The various embodiments described herein may be implemented in a computer-readable medium using, for example, computer software, hardware, or any combination thereof. For a hardware implementation, the embodiments described herein may be implemented using at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a processor, a controller, a microcontroller, a microprocessor, an electronic unit designed to perform the functions described herein, and in some cases, such embodiments may be implemented in the controller 180. For a software implementation, the implementation such as a process or a function may be implemented with a separate software module that allows performing at least one function or operation. The software codes may be implemented by software applications (or programs) written in any suitable programming language, which may be stored in the memory 160 and executed by the controller 180.
Up to this point, mobile terminals have been described in terms of their functionality. Hereinafter, a slide-type mobile terminal among various types of mobile terminals, such as a folder-type, bar-type, swing-type, slide-type mobile terminal, and the like, will be described as an example for the sake of brevity. Accordingly, the present invention can be applied to any type of mobile terminal, and is not limited to a slide type mobile terminal.
The mobile terminal 100 as shown in fig. 1 may be configured to operate with communication systems such as wired and wireless communication systems and satellite-based communication systems that transmit data via frames or packets.
A communication system in which a mobile terminal according to the present invention is operable will now be described with reference to fig. 2.
Such communication systems may use different air interfaces and/or physical layers. For example, the air interface used by the communication system includes, for example, Frequency Division Multiple Access (FDMA), Time Division Multiple Access (TDMA), Code Division Multiple Access (CDMA), and Universal Mobile Telecommunications System (UMTS) (in particular, Long Term Evolution (LTE)), global system for mobile communications (GSM), and the like. By way of non-limiting example, the following description relates to a CDMA communication system, but such teachings are equally applicable to other types of systems.
Referring to fig. 2, the CDMA wireless communication system may include a plurality of mobile terminals 100, a plurality of Base Stations (BSs) 270, Base Station Controllers (BSCs) 275, and a Mobile Switching Center (MSC) 280. The MSC280 is configured to interface with a Public Switched Telephone Network (PSTN) 290. The MSC280 is also configured to interface with a BSC275, which may be coupled to the base station 270 via a backhaul. The backhaul may be constructed according to any of several known interfaces including, for example, E1/T1, ATM, IP, PPP, frame Relay, HDSL, ADSL, or xDSL. It will be understood that a system as shown in fig. 2 may include multiple BSCs 2750.
Each BS270 may serve one or more sectors (or regions), each sector covered by a multi-directional antenna or an antenna pointing in a particular direction being radially distant from the BS 270. Alternatively, each partition may be covered by two or more antennas for diversity reception. Each BS270 may be configured to support multiple frequency allocations, with each frequency allocation having a particular frequency spectrum (e.g., 1.25MHz,5MHz, etc.).
The intersection of partitions with frequency allocations may be referred to as a CDMA channel. The BS270 may also be referred to as a Base Transceiver Subsystem (BTS) or other equivalent terminology. In such a case, the term "base station" may be used to generically refer to a single BSC275 and at least one BS 270. The base stations may also be referred to as "cells". Alternatively, each sector of a particular BS270 may be referred to as a plurality of cell sites.
As shown in fig. 2, a Broadcast Transmitter (BT)295 transmits a broadcast signal to the mobile terminal 100 operating within the system. A broadcast receiving module 111 as shown in fig. 1 is provided at the mobile terminal 100 to receive a broadcast signal transmitted by the BT 295. In fig. 2, several Global Positioning System (GPS) satellites 300 are shown. The satellite 300 assists in locating at least one of the plurality of mobile terminals 100.
In fig. 2, a plurality of satellites 300 are depicted, but it is understood that useful positioning information may be obtained with any number of satellites. The GPS module 115 as shown in fig. 1 is generally configured to cooperate with satellites 300 to obtain desired positioning information. Other techniques that can track the location of the mobile terminal may be used instead of or in addition to GPS tracking techniques. In addition, at least one GPS satellite 300 may selectively or additionally process satellite DMB transmission.
As a typical operation of the wireless communication system, the BS270 receives reverse link signals from various mobile terminals 100. The mobile terminal 100 is generally engaged in conversations, messaging, and other types of communications. Each reverse link signal received by a particular base station 270 is processed within the particular BS 270. The obtained data is forwarded to the associated BSC 275. The BSC provides call resource allocation and mobility management functions including coordination of soft handoff procedures between BSs 270. The BSCs 275 also route the received data to the MSC280, which provides additional routing services for interfacing with the PSTN 290. Similarly, the PSTN290 interfaces with the MSC280, the MSC interfaces with the BSCs 275, and the BSCs 275 accordingly control the BS270 to transmit forward link signals to the mobile terminal 100.
Based on the above mobile terminal hardware structure and communication system, the present invention provides various embodiments of the method.
Example one
As shown in fig. 3, in this embodiment, a self-managed Android process freezing and thawing apparatus includes:
the freezing control module 10 is used for setting a freezing control thread in an application process;
a freezing judgment module 20, configured to judge, by the freezing control thread, whether the application process meets a preset freezing condition according to the running state of the system, and if so, freeze the application process and keep the activity states of the freezing control thread and the communication thread;
and the unfreezing module 30 is configured to unfreeze the application process through the freezing control thread when the communication thread receives an external communication request.
In the embodiment, the freezing control thread is placed in the application process, so that the application process independently manages the freezing and unfreezing operations, the stability of the whole equipment system cannot be influenced, and the user experience is improved.
In the prior art, as shown in fig. 4, an application process includes an Application Package (APK) and an application process framework, wherein the application package is provided by a developer of each application program, and an Android device user can download and use the application package on the market, which is invisible and unchangeable for a system how to run; the existing application process framework comprises an external interface and a communication thread, the external interface is used for calling an external application program, the communication thread is used for communicating with other application programs, sending a communication request to other application programs or receiving the communication request sent by other application programs, and the part can be modified by an Android equipment manufacturer; in the prior art, an external interface and a communication thread in an application process frame carry out information transmission with a system through a system frame process, and the acquired self information is sent to the system, so that the system can master the running state of each application program in the system in a global mode, or other application programs are called through the system frame process so as to be convenient for interaction with other application programs, and freezing and unfreezing of the application process are also carried out through the system frame process, generally speaking, the system frame has complex logic, and freezing and unfreezing of all application processes are carried out by depending on the system frame, so that the system stability is greatly influenced, therefore, in the scheme, through improving a part which can be modified in the application process, namely the application process frame, the freezing and unfreezing operation of the application process is managed by the application process itself, and the dependency on the system frame is reduced, even if the freezing and unfreezing operation of one application process fails, such as the freezing operation is too fast or the unfreezing operation is not timely, only the application process is influenced, other application programs and even the whole equipment system are not influenced, and therefore the stability of the whole system is improved.
Specifically, as shown in fig. 5, in this embodiment, the application process includes an application package and an application process framework, and unlike fig. 4, the application process framework is further provided with a freeze control thread and an external interface agent in addition to a communication thread and an external interface.
Since the application package part is not changeable in the application process, the freeze control thread and the external interface agent in the embodiment are provided in the application process framework, and this part can be completed by the equipment manufacturer.
In this embodiment, after an application process is started, the freezing control thread is started, some configuration-related basic information is loaded from the system, the external interface agent also obtains call information of the application process, more specifically, an application package, and the current system environment information provided by the system framework process is combined to obtain the running state of the system, and according to the running state of the system, it is determined whether the application process meets a preset freezing condition, for example, an application process tries to obtain privacy information of a user, such as an album, a geographic location, and the like, the call information is collected by the external interface agent, and it is determined that the state of the application process is changed due to the call information, the preset freezing condition is met, the application process is frozen, and when the application process is frozen, the communication thread and the freezing control thread are not frozen, to facilitate autonomous thawing of the application process.
In this embodiment, when the freezing control thread determines that the current application process does not meet the preset freezing condition according to the various information, the freezing operation is not performed, for example, a certain application process is always in a silent state, and the call information of the external interface also belongs to the essential basic call of the application program itself, so that the state of the application process is not changed, the system is not affected, and the freezing operation is not performed.
As another embodiment, the freezing control thread does not affect the direct control of the system on the application program while performing the freezing and unfreezing operations on the freezing control thread, which has the highest authority, and when a user or the system sends an operation instruction for closing an application, the freezing control thread can freeze the process of the application in time.
In this embodiment, the external interface is configured to invoke an external application program, and the external interface agent is configured to collect invocation information of an application package, and notify the invocation information that causes a change in the state of the application process in the invocation information to the freeze control thread.
In this embodiment, the efficiency of information collection is improved to a certain degree by collecting the self information of the application process through the external interface agent. Various information related to the application is collected in the application process, so that the condition of information retrieval in all processes can be reduced; moreover, the freezing control thread inquires the information of the freezing control thread through an external interface agent, extra authority is not needed, a back door does not need to be opened due to the authority problem, security holes are not left, and the security of the system is improved.
Example two
As shown in fig. 5, in this embodiment, the application process is further connected to a system framework process, the system framework process is configured to provide current environment information of the system, and accordingly, the step of determining, by the freeze control thread according to the running state of the system, whether the application process meets the preset freeze condition specifically includes:
and the freezing control thread judges whether the application process meets a preset freezing condition according to the calling information provided by the external interface agent and the current environment information of the system.
In this embodiment, after an application process is started, the freezing control thread is started, some configuration-related basic information is loaded from the system, the external interface agent also obtains call information of the application process, more specifically, an application package, and the current system environment information provided by the system framework process is combined to obtain the running state of the system, and according to the running state of the system, it is determined whether the application process meets a preset freezing condition, for example, an application process tries to obtain privacy information of a user, such as an album, a geographic location, and the like, the call information is collected by the external interface agent, and it is determined that the state of the application process is changed due to the call information, the preset freezing condition is met, the application process is frozen, and when the application process is frozen, the communication thread and the freezing control thread are not frozen, to facilitate autonomous thawing of the application process.
In this embodiment, when the freezing control thread determines that the current application process does not meet the preset freezing condition according to the various information, the freezing operation is not performed, for example, a certain application process is always in a silent state, and the call information of the external interface also belongs to the essential basic call of the application program itself, so that the state of the application process is not changed, the system is not affected, and the freezing operation is not performed.
As another embodiment, the freezing control thread does not affect the direct control of the system on the application program while performing the freezing and unfreezing operations on the freezing control thread, which has the highest authority, and when a user or the system sends an operation instruction for closing an application, the freezing control thread can freeze the process of the application in time.
EXAMPLE III
As shown in fig. 6, in the present embodiment, the thawing module 30 includes:
a request unit 31, configured to receive an external communication request by a communication thread;
and the judging unit 32 is configured to judge whether the external communication request needs to be solved in time, if so, unfreeze the application process through the freezing control thread, and otherwise, intercept the external communication request.
In this embodiment, whether the external communication request needs to be resolved in time may be determined by checking whether the external communication request has a requirement for timeliness, if the external communication request has a requirement for timeliness, for example, the external communication request relates to a real-time application program such as a call, a camera, or the like, the application process needs to be thawed by the freezing control thread, and if the external communication request does not need to be processed in time, for example, the external communication request relates to receiving a forum message or receiving an advertisement push, the application process does not need to be thawed, the external communication request is ignored, or even the external communication request is intercepted.
Example four
As shown in fig. 7, in this embodiment, a method for freezing and thawing a self-managed Android process includes:
s10, setting a freezing control thread in the application process;
s20, the freezing control thread judges whether the application process meets the preset freezing condition according to the running state of the system, if so, the step S30 is carried out, the application process is frozen, and the activity states of the freezing control thread and the communication thread are kept; otherwise, the step S21 is carried out, and the application process is not frozen;
and S40, when the communication thread receives an external communication request, unfreezing the application process through the freezing control thread.
In the embodiment, the freezing control thread is placed in the application process, so that the application process independently manages the freezing and unfreezing operations, the stability of the whole equipment system cannot be influenced, and the user experience is improved.
In the prior art, as shown in fig. 4, an application process includes an Application Package (APK) and an application process framework, wherein the application package is provided by a developer of each application program, and an Android device user can download and use the application package on the market, which is invisible and unchangeable for a system how to run; the existing application process framework comprises an external interface and a communication thread, the external interface is used for calling an external application program, the communication thread is used for communicating with other application programs, sending a communication request to other application programs or receiving the communication request sent by other application programs, and the part can be modified by an Android equipment manufacturer; in the prior art, an external interface and a communication thread in an application process frame carry out information transmission with a system through a system frame process, and the acquired self information is sent to the system, so that the system can master the running state of each application program in the system in a global mode, or other application programs are called through the system frame process so as to be convenient for interaction with other application programs, and freezing and unfreezing of the application process are also carried out through the system frame process, generally speaking, the system frame has complex logic, and freezing and unfreezing of all application processes are carried out by depending on the system frame, so that the system stability is greatly influenced, therefore, in the scheme, through improving a part which can be modified in the application process, namely the application process frame, the freezing and unfreezing operation of the application process is managed by the application process itself, and the dependency on the system frame is reduced, even if the freezing and unfreezing operation of one application process fails, such as the freezing operation is too fast or the unfreezing operation is not timely, only the application process is influenced, other application programs and even the whole equipment system are not influenced, and therefore the stability of the whole system is improved.
Specifically, as shown in fig. 5, in this embodiment, the application process includes an application package and an application process framework, and unlike fig. 4, the application process framework is further provided with a freeze control thread and an external interface agent in addition to a communication thread and an external interface.
Since the application package part is not changeable in the application process, the freeze control thread and the external interface agent in the embodiment are provided in the application process framework, and this part can be completed by the equipment manufacturer.
In this embodiment, after an application process is started, the freezing control thread is started, some configuration-related basic information is loaded from the system, the external interface agent also obtains call information of the application process, more specifically, an application package, and the current system environment information provided by the system framework process is combined to obtain the running state of the system, and according to the running state of the system, it is determined whether the application process meets a preset freezing condition, for example, an application process tries to obtain privacy information of a user, such as an album, a geographic location, and the like, the call information is collected by the external interface agent, and it is determined that the state of the application process is changed due to the call information, the preset freezing condition is met, the application process is frozen, and when the application process is frozen, the communication thread and the freezing control thread are not frozen, to facilitate autonomous thawing of the application process.
In this embodiment, when the freezing control thread determines that the current application process does not meet the preset freezing condition according to the various information, the freezing operation is not performed, for example, a certain application process is always in a silent state, and the call information of the external interface also belongs to the essential basic call of the application program itself, so that the state of the application process is not changed, the system is not affected, and the freezing operation is not performed.
As another embodiment, the freezing control thread does not affect the direct control of the system on the application program while performing the freezing and unfreezing operations on the freezing control thread, which has the highest authority, and when a user or the system sends an operation instruction for closing an application, the freezing control thread can freeze the process of the application in time.
In this embodiment, the external interface is configured to invoke an external application program, and the external interface agent is configured to collect invocation information of an application package, and notify the invocation information that causes a change in the state of the application process in the invocation information to the freeze control thread.
In this embodiment, the efficiency of information collection is improved to a certain degree by collecting the self information of the application process through the external interface agent. Various information related to the application is collected in the application process, so that the condition of information retrieval in all processes can be reduced; moreover, the freezing control thread inquires the information of the freezing control thread through an external interface agent, extra authority is not needed, a back door does not need to be opened due to the authority problem, security holes are not left, and the security of the system is improved.
In this embodiment, the application process is further connected to a system framework process, and the system framework process is configured to provide current environment information of the system, and accordingly, the step S20 specifically includes:
and the freezing control thread judges whether the application process meets a preset freezing condition according to the calling information provided by the external interface agent and the current environment information of the system.
EXAMPLE five
As shown in fig. 8, in the present embodiment, the step S30 includes:
s31, the communication thread receives an external communication request;
and S32, judging whether the external communication request needs to be solved in time, if so, entering a step S33, unfreezing the application process through the freezing control thread, and otherwise, entering a step S34, and intercepting the external communication request.
In this embodiment, whether the external communication request needs to be resolved in time may be determined by checking whether the external communication request has a requirement for timeliness, if the external communication request has a requirement for timeliness, for example, the external communication request relates to a real-time application program such as a call, a camera, or the like, the application process needs to be thawed by the freezing control thread, and if the external communication request does not need to be processed in time, for example, the external communication request relates to receiving a forum message or receiving an advertisement push, the application process does not need to be thawed, the external communication request is ignored, or even the external communication request is intercepted.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A device that self-managed Android process freezes and unfreezes, its characterized in that includes:
the freezing control module is used for setting a freezing control thread in an application process;
the freezing judgment module is used for judging whether the application process meets a preset freezing condition or not by the freezing control thread according to the running state of the system, if so, freezing the application process and keeping the activity states of the freezing control thread and the communication thread;
the unfreezing module is used for unfreezing the application process through the freezing control thread when the communication thread receives an external communication request;
the application process comprises an application program package and an application process frame, and the freezing control thread and the communication thread are both arranged in the application process frame.
2. The self-managed Android process freezing and thawing device of claim 1, wherein an external interface and an external interface agent are further arranged in the application process frame, the external interface is used for calling an external application program, and the external interface agent is used for collecting calling information of an application program package and notifying the freezing control thread of the calling information which causes the application process state change.
3. The self-managed Android process freezing and thawing device of claim 2, wherein the application process is further connected to a system framework process, the system framework process is configured to provide current environment information of a system, and accordingly, the freezing control thread determines whether the application process meets preset freezing conditions according to the running state of the system specifically:
and the freezing control thread judges whether the application process meets a preset freezing condition according to the calling information provided by the external interface agent and the current environment information of the system.
4. The device for self-managed Android process freezing and thawing of claim 1, wherein the thawing module comprises:
the request unit is used for receiving an external communication request by the communication thread;
and the judging unit is used for judging whether the external communication request needs to be solved in time, if so, unfreezing the application process through the freezing control thread, and otherwise, intercepting the external communication request.
5. A self-managed Android process freezing and unfreezing method is characterized by comprising the following steps:
setting a freezing control thread in an application process;
the freezing control thread judges whether the application process meets a preset freezing condition according to the running state of the system, if so, the application process is frozen, and the activity states of the freezing control thread and the communication thread are kept;
when the communication thread receives an external communication request, the application process is unfrozen through the freezing control thread;
the application process comprises an application program package and an application process frame, and the freezing control thread and the communication thread are both arranged in the application process frame.
6. The self-management Android process freezing and thawing method according to claim 5, wherein an external interface and an external interface agent are further arranged in the application process frame, the external interface is used for calling an external application program, and the external interface agent is used for collecting calling information of an application program package and notifying the freezing control thread of the calling information which causes the application process state change.
7. The self-managed Android process freezing and thawing method of claim 6, wherein the application process is further connected to a system framework process, the system framework process is configured to provide current environment information of a system, and accordingly, the step of judging whether the application process meets preset freezing conditions according to the running state of the system by the freezing control thread is specifically as follows:
and the freezing control thread judges whether the application process meets a preset freezing condition according to the calling information provided by the external interface agent and the current environment information of the system.
8. The method for freezing and unfreezing the self-managed Android process according to claim 5, wherein the unfreezing the application process by the freezing control thread when the communication thread receives an external communication request comprises:
the communication thread receives an external communication request;
and judging whether the external communication request needs to be solved in time, if so, unfreezing the application process through the freezing control thread, and otherwise, intercepting the external communication request.
CN201710039046.8A 2017-01-19 2017-01-19 Self-management Android process freezing and unfreezing device and method Active CN106844029B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710039046.8A CN106844029B (en) 2017-01-19 2017-01-19 Self-management Android process freezing and unfreezing device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710039046.8A CN106844029B (en) 2017-01-19 2017-01-19 Self-management Android process freezing and unfreezing device and method

Publications (2)

Publication Number Publication Date
CN106844029A CN106844029A (en) 2017-06-13
CN106844029B true CN106844029B (en) 2020-06-30

Family

ID=59124676

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710039046.8A Active CN106844029B (en) 2017-01-19 2017-01-19 Self-management Android process freezing and unfreezing device and method

Country Status (1)

Country Link
CN (1) CN106844029B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110007746A (en) * 2017-12-29 2019-07-12 广东欧珀移动通信有限公司 Application control method and apparatus, electronic equipment, readable storage medium storing program for executing
CN109992965B (en) * 2017-12-29 2021-08-17 Oppo广东移动通信有限公司 Process processing method and device, electronic equipment and computer readable storage medium
CN109992309B (en) * 2017-12-29 2021-03-12 Oppo广东移动通信有限公司 Application program processing method and device, electronic equipment and computer readable storage medium
CN110018911B (en) * 2018-01-09 2024-01-23 斑马智行网络(香港)有限公司 Process management and inter-process communication method and device, computing equipment and storage medium
CN110032397B (en) * 2018-01-10 2023-01-31 Oppo广东移动通信有限公司 Application processing method and device, electronic equipment and computer readable storage medium
CN109144232B (en) * 2018-08-01 2020-12-01 Oppo广东移动通信有限公司 Process processing method and device, electronic equipment and computer readable storage medium
CN109445917B (en) * 2018-10-16 2020-12-01 Oppo广东移动通信有限公司 Application processing method and device, electronic equipment and computer readable storage medium
CN109828835A (en) * 2019-01-04 2019-05-31 Oppo广东移动通信有限公司 Using restoration methods, electronic device and the computer readable storage medium freezed
CN111858081A (en) 2019-04-30 2020-10-30 中兴通讯股份有限公司 Broadcast control method, apparatus, terminal and computer readable storage medium
CN111897586A (en) * 2019-05-06 2020-11-06 中兴通讯股份有限公司 Application state control method, device, terminal and computer readable storage medium
CN111352732B (en) * 2020-02-24 2023-04-11 湖南快乐阳光互动娱乐传媒有限公司 Voice recognition process control method and device
CN113450835B (en) * 2021-06-04 2023-03-21 佛吉亚歌乐电子(丰城)有限公司 Method, equipment and storage medium for optimizing vehicle-mounted central control soundless time background noise

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1967471A (en) * 2005-10-27 2007-05-23 国际商业机器公司 Method and system for pausing a software thread
CN105988827A (en) * 2015-01-29 2016-10-05 阿里巴巴集团控股有限公司 Freezing and unfreezing method and device
CN106126325A (en) * 2016-06-21 2016-11-16 宇龙计算机通信科技(深圳)有限公司 The management method of application program, managing device and terminal
CN106227325A (en) * 2016-07-29 2016-12-14 宇龙计算机通信科技(深圳)有限公司 The management method of application program, managing device and terminal

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6507862B1 (en) * 1999-05-11 2003-01-14 Sun Microsystems, Inc. Switching method in a multi-threaded processor
US9389936B2 (en) * 2011-09-23 2016-07-12 Microsoft Technology Licensing, Llc. Monitoring the responsiveness of a user interface
KR102148948B1 (en) * 2013-12-06 2020-08-27 삼성전자주식회사 Multi tasking method of electronic apparatus and electronic apparatus thereof
US20150160968A1 (en) * 2013-12-11 2015-06-11 Metratech Corp. Freezing a call stack

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1967471A (en) * 2005-10-27 2007-05-23 国际商业机器公司 Method and system for pausing a software thread
CN105988827A (en) * 2015-01-29 2016-10-05 阿里巴巴集团控股有限公司 Freezing and unfreezing method and device
CN106126325A (en) * 2016-06-21 2016-11-16 宇龙计算机通信科技(深圳)有限公司 The management method of application program, managing device and terminal
CN106227325A (en) * 2016-07-29 2016-12-14 宇龙计算机通信科技(深圳)有限公司 The management method of application program, managing device and terminal

Also Published As

Publication number Publication date
CN106844029A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
CN106844029B (en) Self-management Android process freezing and unfreezing device and method
CN106304037B (en) Virtual SIM card management method and device
CN105188098B (en) Network switching device and network switching method of mobile terminal
CN107066320B (en) Android process freezing and unfreezing device and method
CN104731480B (en) Image display method and device based on touch screen
CN106533928B (en) Method and device for updating unread message reminding identification
CN106413128B (en) Projection method and mobile terminal
CN110928708B (en) Icon display method and device, electronic equipment and computer readable storage medium
CN110109528B (en) Application program control method, mobile terminal and computer readable storage medium
CN106598538B (en) Instruction set updating method and system
CN106371704B (en) Application shortcut layout method of screen locking interface and terminal
CN106301846B (en) Network awakening system analysis method and device
CN106455009B (en) Network searching device and method
CN106453883B (en) Intelligent terminal and message notification processing method thereof
CN106484534B (en) Control method and control device for displayed mobile terminal
CN106648324B (en) Hidden icon control method and device and terminal
CN106161790B (en) Mobile terminal and control method thereof
CN105939425B (en) Screen dynamic monitoring device and method
CN105791541B (en) Screenshot method and mobile terminal
CN106385494B (en) Method and device for acquiring dynamic home page of mobile terminal application
CN106412877B (en) Activation method and activation device for mobile terminal SIM card
CN106569670B (en) Device and method for processing application
CN105307156B (en) Device and method for requesting downloading of application
CN105094733B (en) Split screen display method and device
CN109041197B (en) Communication method of terminal, terminal 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
GR01 Patent grant
GR01 Patent grant