CN106844033B - Application quick starting method and terminal - Google Patents
Application quick starting method and terminal Download PDFInfo
- Publication number
- CN106844033B CN106844033B CN201710059130.6A CN201710059130A CN106844033B CN 106844033 B CN106844033 B CN 106844033B CN 201710059130 A CN201710059130 A CN 201710059130A CN 106844033 B CN106844033 B CN 106844033B
- Authority
- CN
- China
- Prior art keywords
- application
- starting
- value
- tpye
- pool
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Telephone Function (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a method and a terminal for quickly starting an application, wherein the method comprises the following steps: establishing a process pool in advance, wherein the process pool comprises a main process and a plurality of idle resource processes; when an application starting command is acquired, one idle resource process in the process pool is called to be allocated to the application corresponding to the application starting command so as to start the application. The invention establishes the process pool comprising a plurality of idle resource processes in advance when the terminal system is started, directly allocates the idle resource processes in the process pool for the application when the application is started, saves the time for newly establishing the processes when the application is started in a cold state, and greatly accelerates the application starting speed.
Description
Technical Field
The invention relates to the technical field of terminals, in particular to a method for quickly starting an application and a terminal.
Background
With the popularization rate of smart phones becoming higher and higher, the combination of daily life of people and mobile phones becomes tighter and tighter. For embedded devices such as mobile phones, which are used by individuals with very high frequency, people have higher and higher requirements on real-time performance of system response. On the other hand, as a mass consumer product, there is no specific use scenario, and therefore, it cannot be optimized for a specific scenario like other industrial devices with high real-time requirements. At present, the optimization aiming at the performance of the mobile phone is a pain point and a difficulty point of the mobile phone industry and is a problem to be solved urgently by various manufacturers.
At present, the starting modes of Android applications can be divided into two types: cold start and warm start; the cold start refers to the first start of the application, and when the application is started for the first time, the system needs to create a new process for the application, and loads resources such as class libraries and the like needed by the application operation; the warm start means that the application is temporarily stored in the background, and when the user clicks the application again, the application is directly scheduled to run from the background to the foreground. The application cold start is generally slow in starting speed due to the fact that a process is required to be created and resources are required to be loaded; compared with cold start, the warm start has no process of creating a process and loading resources, so the speed of applying the warm start is much higher than that of the cold start.
Disclosure of Invention
The invention mainly aims to provide a method and a terminal for quickly starting an application, and aims to solve the problem that the first time of starting the application by using the conventional android terminal is generally long.
In order to achieve the above object, the present invention provides a method for quickly starting an application, comprising the following steps:
starting up a process pool which comprises a main process and a plurality of idle resource processes;
when an application starting command is acquired, one idle resource process in the process pool is called to be allocated to the application, and the application is started.
Further, the invoking a free resource process in the process pool is allocated to the application, and the starting the application includes: and when an application starting command is acquired, calling a main process of the process pool, selecting one idle resource process by the main process through a process selection algorithm, and allocating an application starting task to the resource process for execution.
Further, when the application exits from the foreground, the historical use frequency or time of the application is checked, if the historical use frequency or time is within a first set range, the application is marked as being frequently used, otherwise, the application is marked as being not frequently used;
background applications marked as not-commonly used are compressed according to the set compression value and stored in a memory compression area.
Further, after the step of compressing the background application marked as being not commonly used according to the set compression value and storing the background application in the memory compression area, the method further comprises the following steps: upon receiving a command to start a compressed application, the application is decompressed and started.
Further, the historical usage frequency or time is the number of times that the application was started after the last boot or the total duration of usage.
In addition, in order to achieve the above object, the present invention further provides a device for quickly starting an application, including:
the system comprises a process pool creating unit, a process pool creating unit and a processing unit, wherein the process pool creating unit is used for pre-creating a process pool which comprises a main process and a plurality of idle resource processes;
and the execution unit is used for calling one idle resource process in the process pool to allocate to the application and starting the application when the application starting command is acquired.
Further, the execution unit is further configured to: and when an application starting command is acquired, calling a main process of the process pool, selecting one idle resource process by the main process through a process selection algorithm, and allocating an application starting task to the resource process for execution.
Further, the method also comprises the following steps:
the application classification marking unit is used for checking the historical use frequency or time of the application when the application exits from the foreground, marking the application as common if the historical use frequency or time is within a first set range, and otherwise marking the application as non-common; and
and the application compression unit is used for compressing the background application marked as the non-common application according to the set compression value and storing the background application in the memory compression area.
Further, the method also comprises the following steps:
and the decompression unit is used for decompressing and starting the application when receiving the command for starting the compressed application.
Further, the method also comprises the following steps: the historical use frequency or time is the number of times that the application is started after the last startup or the total duration of use.
According to the application quick starting method and the terminal, the process pool comprising the main process and the plurality of idle resource processes is established when the terminal is started, and when the application is started for the first time, one idle resource process in the process pool is allocated to the application which is executed and started, so that the application starting speed is greatly accelerated. When the application exits from the foreground, whether the application is very useful is identified through the historical use time or frequency of the application, the non-common application is compressed, power consumption and memory occupation are avoided, and the application can be started more quickly when being restarted.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of an alternative mobile terminal for 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 schematic flowchart of a storage processing method for a terminal application according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of another storage processing method for a terminal application according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of a storage processing apparatus for a terminal application according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of another storage processing apparatus for a terminal application according to a fourth embodiment of the present invention;
FIG. 7 is a logical model of a process pool according to various embodiments of the present invention.
FIG. 8 is a system framework diagram of various embodiments 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 structure of an alternative mobile terminal for 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-related 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-related information or a server that receives a previously generated broadcast signal and/or broadcast-related information and transmits it to a terminal, the broadcast signal may include a TV broadcast signal, a radio broadcast signal, a data broadcast signal, etc. also, the broadcast signal may further include a broadcast signal combined with the TV or radio broadcast signal, the broadcast-related information may also be provided via a mobile communication network, and in this case, the broadcast-related 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), a digital video broadcasting handheld (DVB-H) Electronic Service Guide (ESG), etc., the broadcast-receiving module 111 may receive a signal broadcast using various types of broadcast systems, in particular, the broadcast receiving module 111 may receive a broadcast signal via a media storage medium suitable for multimedia broadcast systems such as a digital broadcast-terrestrial broadcast-information storage (DVB-H), a DVB-H, a media storage medium suitable for receiving system, and the above-DVB-H, a digital broadcast system.
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 access technology to which the module refers may include W L AN (wireless L AN) (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 bluetoothTMRadio Frequency Identification (RFID), infrared data association (IrDA), Ultra Wideband (UWB), zigbeeTMAnd so on.
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 122, 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 unit 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 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 unit 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 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 unit 151, an audio output module 152, an alarm unit 153, and the like.
The display unit 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 unit 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 unit 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 unit 151 and the touch pad are stacked on each other in the form of a layer TO form a touch screen, the display unit 151 may be used as an input device and an output device, the display unit 151 may include at least one of a liquid crystal display (L CD), a thin film transistor L CD (TFT-L CD), an organic light emitting diode (O L ED) 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 a transparent display, a typical transparent display may be, for example, a TO L ED (transparent organic light emitting diode) display, and the like, the mobile terminal 100 may include two or more display units (or other display devices) according TO a specific intended embodiment, for example, the mobile terminal may include an external display unit (not shown) and an internal display unit (not shown), and the touch screen may be used TO detect a touch input pressure and 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 unit 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 unit 153 may provide output in different ways to notify the occurrence of an event. For example, the alarm unit 153 may provide an output in the form of vibration, and when a call, a message, or some other incoming communication (communicating communication) is received, the alarm unit 153 may provide a tactile output (i.e., 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 unit 153 may also provide an output notifying the occurrence of an event via the display unit 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 181 for reproducing (or playing back) multimedia data, and the multimedia module 181 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.
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 (P L D), a Field Programmable Gate Array (FPGA), a processor, a controller, a microcontroller, a microprocessor, an electronic unit designed to perform the functions described herein, such an implementation may be implemented in the controller 180 in some cases.
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.
For example, the air interfaces used by communication systems include, for example, Frequency Division Multiple Access (FDMA), Time Division Multiple Access (TDMA), Code Division Multiple Access (CDMA), and Universal Mobile Telecommunications System (UMTS) (particularly Long term evolution (L TE)), Global System for Mobile communications (GSM), and so forth.
Referring to fig. 2, a 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 Mobile Switching Centers (MSCs) 280, the MSCs 280 are structured to interface with Public Switched Telephone Networks (PSTNs) 290, the MSCs 280 are also structured to interface with the BSCs 275, which may be coupled to the base stations 270 via backhaul lines, which may be structured according to any of several known interfaces including, for example, E1/T1, ATM, IP, PPP, frame relay, HDS L, ADS L, or xDS L, it will be appreciated that a system as shown in fig. 2 may include a plurality of BSCs 275.
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
An embodiment of the present invention provides a method for quickly starting an application, as shown in fig. 3, including the following steps:
s101, starting up to pre-establish a process pool, wherein the process pool comprises a main process and a plurality of idle resource processes;
when the android terminal is started, the system is started, a process pool comprising a main process and a plurality of idle resource processes is established in the starting process of the system, the idle resource processes in the process pool wait for application calling, and a logic model of the process pool is shown in FIG. 7.
The process pool comprises a main process and a plurality of resource processes; the main process is used for managing and scheduling resource processes, when a task arrives, the main process selects one idle resource process through a process selection algorithm, and allocates the task to the resource process for execution, wherein the process selection algorithm can be a process selection algorithm in the prior art; after the task is completed, the main process is responsible for recovering the process and putting the process into a process pool; the resource process is responsible for performing the specific tasks assigned by the host process.
S102, when an application starting command is obtained, one idle resource process in the process pool is called to be allocated to the application, and the application is started.
When a user opens an APP application for the first time, the system receives a command for starting the APP, such as any one of the applications a, B, and C shown in fig. 8. And after receiving the command of the application starting c, the system calls a main process a of the process pool, and the main process selects one resource process in the resource pool b according to a process selection algorithm for executing application starting. This is partly implemented at the system level.
In a process pool of an android system, each resource process is an empty android process, and can run only by loading specific application resources and a code library. When the APP finishes running, the process is recovered to the process pool again to wait for the next scheduling use.
According to the application quick starting method, the process pool comprising the plurality of idle resource processes is established when the system is started, and the idle resource processes are directly allocated for starting the application when the application is started, so that the time for building new processes can be saved for the application, and the application cold starting speed is greatly accelerated.
Example two
An embodiment of the present invention provides a method for quickly starting an application, as shown in fig. 4, including the following steps:
s201, starting up to pre-establish a process pool, wherein the process pool comprises a main process and a plurality of idle resource processes;
s202, when the application starting command is obtained, one idle resource process in the process pool is called to be allocated to the application, and the application is started.
S203, when the application exits from the foreground, checking the historical use frequency or time of the application, if the historical use frequency or time is within a first set range, marking the application as common, otherwise, marking the application as non-common;
the started applications are often switched between the foreground and the background, and after the applications are switched to the background, the applications are sometimes switched back again soon and sometimes are not used for a long time, so that when the applications are switched to the background and are not closed, the applications not only occupy the effective space of the memory, but also consume power. According to the invention, historical use data such as historical use time or frequency or use time period, associated process and the like of the terminal application are counted, and the historical use data is formed into a database and stored in the terminal.
The historical use time of the application refers to the sum of the use time of the terminal after the terminal is started for the last time; or recording the sum of the use time of each application in the last day after the application is started in units of 24 hours; the historical use frequency of the application refers to the number of times that the application is started after the terminal is started for the last time; or the number of times the application was started in the last day is recorded in 24 hours. An application usage period refers to the union of the application usage time intervals per day; the association process refers to other applications or processes that are associated with the application when the application is used, and the association process includes a plurality of processes.
When the application is switched from the foreground to the background, the historical use data of the application, namely historical use frequency or time, is checked by accessing the user behavior database, if the use frequency or time is within a first set range, the application is marked as being frequently used, and otherwise, the application is marked as being not frequently used. The first setting range is preset use duration or use frequency, and the preset use duration or use frequency represents that the application is longer in use time or higher in use frequency in the terminal. Of course, the first setting range may also be a time length or frequency range automatically set by a certain sort rule and a certain selection rule after the terminal self-learns.
The unusual applications can be further classified and identified, for example, the unusual applications are further classified into more common applications and less common applications, that is, a second setting range with a time length or frequency smaller than the first setting range is set, a third setting range with a time length or frequency smaller than the second setting range is set, the applications with the historical use time or frequency detected when the applications exit the foreground in the second setting range are marked as more common applications, and the applications with the historical use time or frequency detected when the applications exit the foreground in the third setting range are marked as less common applications.
For example as shown in the following table:
and S204, compressing background applications marked as unusual according to the set compression value and storing the background applications in a memory compression area.
The applications identified as the unusual applications are not stored in the memory for a long time, so that the memory resources and the power consumption are not wasted, and the applications marked as the unusual applications are compressed according to the set compression value and stored in the compression area of the memory.
The compression value can also be automatically set by the terminal according to the application use condition, and the setting mode is as follows:
the applied compression weight value is represented by a symbol COMPRESS _ EXPECTATION, the COMPRESS _ EXPECTATION represents the probability of applying compression, the value range is 0-100, and the larger the value is, the larger the probability of compression is. According to different application types, different compression weights can be set for different types of applications, and the specific compression weights are shown in the following table:
the specific composition _ extension value for each application is calculated as follows:
firstly, calculating the TYPE value of the current application according to the judgment standard of the application TYPE;
and then obtaining a final TPYE value of the application by combining the historical TYPE value, wherein the calculation formula is as follows:
the TYPE value is × 0.3.3 + the current TPYE value × 0.7.7, and the TPYE value needs to be an integer;
and after the TPYE value of the application is calculated, obtaining the COMPRESS _ EXPECTATION value of the application according to the corresponding table of TYPE and COMPRESS _ EXPECTATION.
When too many applications are temporarily stored in the memory, the compressed applications can be recycled and quit according to a certain priority rule, so that the memory is released for effective utilization by other applications.
S205, when receiving the command of starting the compressed application, decompressing and starting the application.
The terminal receives an instruction for starting the application, checks whether the application is in the background, checks whether the application is compressed or not if the application is in the background, and executes decompression and starting of the application if the application is compressed; if the application is not in the background, executing cold start; the cold start refers to the first start of the application, and when the application is started for the first time, the system needs to create a new process for the application, and loads resources such as class libraries and the like needed by the application operation; if the application is not compressed, a warm start is performed. The warm start means that the application is temporarily stored in the background, and when the user clicks the application again, the application is directly scheduled to run from the background to the foreground.
The application quick starting method not only accelerates the starting speed through the distribution of the idle resource processes in the process pool when the application is started for the first time, but also saves some started non-use applications in a compression mode, thereby saving the memory and the power consumption. When the emergency applications are called again from the background to the foreground, warm start is realized, and the starting speed is higher than that of cold start.
EXAMPLE III
A third embodiment of the present invention provides a quick application starting apparatus, as shown in fig. 5, including: a process pool creating unit 10 and an executing unit 20.
The process pool creating unit 10 is used for starting up and pre-establishing a process pool, wherein the process pool comprises a main process and a plurality of idle resource processes.
When the android terminal is started, the system is started, and in the process of starting the system, the process pool creating unit 10 establishes a resource pool b including a main process a and a plurality of idle resource processes, the idle resource processes in the resource pool wait for application invocation, and a logic model of the process pool is shown in fig. 7.
The process pool comprises a main process and a resource process; the main process is used for managing and scheduling resource processes, when a task arrives, the main process selects one idle resource process through a process selection algorithm, and allocates the task to the resource process for execution, wherein the process selection algorithm can be a process selection algorithm in the prior art; after the task is completed, the main process is responsible for recovering the process and putting the process into a process pool; the resource process is responsible for performing the specific tasks assigned by the host process.
And the execution unit 20 is configured to, when the application start command is obtained, invoke an idle resource process in the process pool to allocate to the application, and start the application.
When a user opens an APP for the first time, the system receives an application start command, the execution unit 20 directly obtains an idle process from the process pool, a new process is not needed, and then a task is allocated to the process. When the APP finishes running, the process is recovered to the process pool again to wait for the next scheduling use.
According to the application quick starting device, the process pool comprising the plurality of idle resource processes is established when the system is started, and the idle resource processes are directly allocated for starting the application when the application is started, so that the time for newly building the processes can be saved for the application, and the application cold starting speed is greatly accelerated.
Example four
A fourth embodiment of the present invention provides an application rapid start apparatus, as shown in fig. 6, including: the process pool creating unit 10, the executing unit 20, the application classification marking unit 30, the application compressing unit 40, and the decompressing unit 50.
The process pool creating unit 10 and the executing unit 20 are the same as those in the embodiment, and are not described herein again.
And the application classification marking unit 30 is used for checking the historical use frequency or time of the application when the application exits the foreground, marking the application as a common use if the historical use frequency or time is within a first set range, and otherwise marking the application as an abnormal use.
The started applications are often switched between the foreground and the background, and after the applications are switched to the background, the applications are sometimes switched back again soon and sometimes are not used for a long time, so that when the applications are switched to the background and are not closed, the applications not only occupy the effective space of the memory, but also consume power. According to the invention, historical use data such as historical use time or frequency or use time period, associated process and the like of the terminal application are counted, and the historical use data is formed into a database and stored in the terminal.
The historical use time of the application refers to the sum of the use time of the terminal after the terminal is started for the last time; or recording the sum of the use time of each application in the last day after the application is started in units of 24 hours; the historical use frequency of the application refers to the number of times that the application is started after the terminal is started for the last time; or the number of times the application was started in the last day is recorded in 24 hours. An application usage period refers to the union of the application usage time intervals per day; the association process refers to other applications or processes that are associated with the application when the application is used, and the association process includes a plurality of processes.
When the application is switched from the foreground to the background, the user behavior database is accessed to check historical use data of the application, namely historical use frequency or time, if the use frequency or time is within a first set range, the application classification marking unit 30 marks the application as being frequently used, otherwise, the application classification marking unit 30 marks the application as being not frequently used. The first setting range is preset use duration or use frequency, and the preset use duration or use frequency represents that the application is longer in use time or higher in use frequency in the terminal. Of course, the first setting range may also be a time length or frequency range automatically set by a certain sort rule and a certain selection rule after the terminal self-learns.
The unusual applications can be further classified and identified, for example, the unusual applications are further classified into more common applications and less common applications, that is, a second setting range with a time length or frequency smaller than the first setting range is set, a third setting range with a time length or frequency smaller than the second setting range is set, the applications with the historical use time or frequency detected when the applications exit the foreground in the second setting range are marked as more common applications, and the applications with the historical use time or frequency detected when the applications exit the foreground in the third setting range are marked as less common applications.
For example as shown in the following table:
and the application compression unit 40 is used for compressing background applications marked as unusual according to the set compression value and storing the background applications in the memory compression area.
The applications identified as the unusual applications are not prevented from wasting memory resources and consuming power for a long time of temporary storage in the memory, and the application compression unit 40 compresses the applications marked as the unusual applications according to the set compression value and stores the compressed applications in the compression area of the memory.
The compression value can also be automatically set by the terminal according to the application use condition, and the setting mode is as follows:
the applied compression weight value is represented by a symbol COMPRESS _ EXPECTATION, the COMPRESS _ EXPECTATION represents the probability of applying compression, the value range is 0-100, and the larger the value is, the larger the probability of compression is. According to different application types, different compression weights can be set for different types of applications, and the specific compression weights are shown in the following table:
the specific composition _ extension value for each application is calculated as follows:
firstly, calculating the TYPE value of the current application according to the judgment standard of the application TYPE;
and then obtaining a final TPYE value of the application by combining the historical TYPE value, wherein the calculation formula is as follows:
the TYPE value is × 0.3.3 + the current TPYE value × 0.7.7, and the TPYE value needs to be an integer;
and after the TPYE value of the application is calculated, obtaining the COMPRESS _ EXPECTATION value of the application according to the corresponding table of TYPE and COMPRESS _ EXPECTATION.
When too many applications are temporarily stored in the memory, the compressed applications can be recycled and quit according to a certain priority rule, so that the memory is released for effective utilization by other applications.
A decompression unit 50 for decompressing and starting the application when receiving a command to start the compressed application.
The terminal receives an instruction to start the application, checks whether the application is in the background, checks whether the application is compressed if the application is in the background, and performs application decompression and starting by the decompression unit 50 if the application is compressed; if the application is not in the background, executing cold start; the cold start refers to the first start of the application, and when the application is started for the first time, the system needs to create a new process for the application, and loads resources such as class libraries and the like needed by the application operation; if the application is not compressed, a warm start is performed. The warm start means that the application is temporarily stored in the background, and when the user clicks the application again, the application is directly scheduled to run from the background to the foreground.
The application quick starting device not only accelerates the starting speed through the distribution of the idle resource processes in the process pool when the application is started for the first time, but also stores some started non-use applications in a compression mode, thereby saving the memory and the power consumption. When the emergency applications are called again from the background to the foreground, warm start is realized, and the starting speed is higher than that of cold start.
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 method for quickly starting an application is characterized by comprising the following steps:
establishing a process pool in advance, wherein the process pool comprises a main process and a plurality of idle resource processes;
when an application starting command is acquired, calling an idle resource process in the process pool to allocate to an application corresponding to the application starting command so as to start the application;
when the application exits from the foreground, checking the historical use frequency or time of the application, if the historical use frequency or time is within a first set range, marking the application as common, otherwise, marking the application as non-common;
compressing background applications marked as unusual according to a set compression weight and storing the background applications in a memory compression area, wherein the compression weight is determined in the following way:
calculating the current TPYE value of the application according to the judgment standard of the application type, wherein the TPYE value is used for representing type identifications of different compression weights;
determining a final TPYE value of the application according to the current TPYE value of the application and the historical TPYE value of the application;
determining a compression weight of the application according to the final TPYE value, wherein the compression weight represents a probability that the application is compressed.
2. The application rapid-start method according to claim 1, characterized in that: the calling of one free resource process in the process pool is allocated to the application corresponding to the application starting command so as to start the application, and the calling of one free resource process in the process pool comprises the following steps:
and calling a main process in the process pool, selecting one idle resource process by the main process through a process selection algorithm, and allocating an application starting task to the resource process for execution.
3. The method for rapidly starting an application according to claim 1, wherein after compressing background applications marked as being not commonly used according to the set compression weight and storing the background applications in the memory compression area, the method further comprises:
when a command to start a compressed application is received, the application is decompressed and started.
4. The application rapid start method according to claim 1, wherein the historical usage frequency or time is the number of times the application was started or the total duration of usage after the last boot.
5. A terminal, comprising:
the system comprises a process pool creating unit, a process pool creating unit and a processing unit, wherein the process pool creating unit is used for pre-creating a process pool after starting up, and the process pool comprises a main process and a plurality of idle resource processes;
the execution unit is used for calling an idle resource process in the process pool to allocate to the application and starting the application when the application starting command is acquired;
the application classification marking unit is used for checking the historical use frequency or time of the application when the application exits from the foreground, marking the application as common if the historical use frequency or time is within a first set range, and otherwise marking the application as non-common; and
the application compression unit is used for compressing background applications marked as unusual according to a set compression weight and storing the background applications in a memory compression area, wherein the compression weight is determined in the following way:
calculating the current TPYE value of the application according to the judgment standard of the application type, wherein the TPYE value is used for representing type identifications of different compression weights;
determining a final TPYE value of the application according to the current TPYE value of the application and the historical TPYE value of the application;
determining a compression weight of the application according to the final TPYE value, wherein the compression weight represents a probability that the application is compressed.
6. The terminal of claim 5, wherein: the execution unit is further configured to: and when an application starting command is acquired, calling a main process of the process pool, selecting one idle resource process by the main process through a process selection algorithm, and allocating an application starting task to the resource process for execution.
7. The terminal of claim 5, further comprising:
and the decompression unit is used for decompressing and starting the application when receiving the command for starting the compressed application.
8. The terminal of claim 5, further comprising: the historical use frequency or time is the number of times that the application is started after the last startup or the total duration of use.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710059130.6A CN106844033B (en) | 2017-01-23 | 2017-01-23 | Application quick starting method and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710059130.6A CN106844033B (en) | 2017-01-23 | 2017-01-23 | Application quick starting method and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106844033A CN106844033A (en) | 2017-06-13 |
CN106844033B true CN106844033B (en) | 2020-07-28 |
Family
ID=59121398
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710059130.6A Active CN106844033B (en) | 2017-01-23 | 2017-01-23 | Application quick starting method and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106844033B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107391241A (en) * | 2017-06-22 | 2017-11-24 | 努比亚技术有限公司 | Using quick start method, terminal and computer-readable recording medium |
CN107704321A (en) * | 2017-09-30 | 2018-02-16 | 北京元心科技有限公司 | Memory allocation method and device and terminal equipment |
WO2019071610A1 (en) * | 2017-10-13 | 2019-04-18 | 华为技术有限公司 | Method and apparatus for compressing and decompressing memory occupied by processor |
CN109347894A (en) * | 2018-08-10 | 2019-02-15 | 锐捷网络股份有限公司 | Manage method, manager, equipment and the medium of FastCGI process |
CN109885340B (en) * | 2019-01-10 | 2022-06-10 | 北京字节跳动网络技术有限公司 | Application cold start acceleration method and device and electronic equipment |
CN110162345B (en) * | 2019-05-05 | 2022-02-18 | 网宿科技股份有限公司 | Application program access method and device and storage medium |
CN110673887B (en) * | 2019-08-15 | 2021-05-04 | 华为技术有限公司 | Application program starting method and device, terminal equipment and readable storage medium |
CN114357210B (en) * | 2021-12-17 | 2023-04-07 | 浙江仁欣环科院有限责任公司 | Unmanned aerial vehicle system for pipe network early warning sewage dynamic supervision and using method thereof |
CN114489842A (en) * | 2022-01-17 | 2022-05-13 | 重庆长安汽车股份有限公司 | Android platform-based acceleration application starting method |
CN116302209B (en) * | 2023-05-15 | 2023-08-04 | 阿里云计算有限公司 | Method for accelerating starting of application process, distributed system, node and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101222709A (en) * | 2008-01-22 | 2008-07-16 | 中兴通讯股份有限公司 | Fast starting method of mobile phone application program |
CN105468426A (en) * | 2016-01-05 | 2016-04-06 | 珠海市魅族科技有限公司 | Application freezing method and terminal |
US9400558B2 (en) * | 2009-03-18 | 2016-07-26 | HJ Laboratories, LLC | Providing an elevated and texturized display in an electronic device |
CN105893087A (en) * | 2016-03-30 | 2016-08-24 | 珠海市魅族科技有限公司 | Application program starting method and device |
CN106095561A (en) * | 2016-06-24 | 2016-11-09 | 宇龙计算机通信科技(深圳)有限公司 | Freeze the management method of application, the managing device freezing application and terminal |
CN106201708A (en) * | 2016-06-29 | 2016-12-07 | 宇龙计算机通信科技(深圳)有限公司 | The freezing method of application program, the freezing plant of application program and terminal |
-
2017
- 2017-01-23 CN CN201710059130.6A patent/CN106844033B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101222709A (en) * | 2008-01-22 | 2008-07-16 | 中兴通讯股份有限公司 | Fast starting method of mobile phone application program |
US9400558B2 (en) * | 2009-03-18 | 2016-07-26 | HJ Laboratories, LLC | Providing an elevated and texturized display in an electronic device |
CN105468426A (en) * | 2016-01-05 | 2016-04-06 | 珠海市魅族科技有限公司 | Application freezing method and terminal |
CN105893087A (en) * | 2016-03-30 | 2016-08-24 | 珠海市魅族科技有限公司 | Application program starting method and device |
CN106095561A (en) * | 2016-06-24 | 2016-11-09 | 宇龙计算机通信科技(深圳)有限公司 | Freeze the management method of application, the managing device freezing application and terminal |
CN106201708A (en) * | 2016-06-29 | 2016-12-07 | 宇龙计算机通信科技(深圳)有限公司 | The freezing method of application program, the freezing plant of application program and terminal |
Also Published As
Publication number | Publication date |
---|---|
CN106844033A (en) | 2017-06-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106844033B (en) | Application quick starting method and terminal | |
CN106803860B (en) | Storage processing method and device for terminal application | |
CN105718027B (en) | The management method and mobile terminal of background application | |
CN107066290B (en) | Method and device for starting application according to associated policy | |
CN106304037B (en) | Virtual SIM card management method and device | |
CN106227867B (en) | A kind of method and device of file management | |
CN105262819B (en) | A kind of mobile terminal and its method for realizing push | |
CN106559579B (en) | Mobile terminal and CPU/GPU scheduling parameter updating method | |
CN106131815A (en) | Mobile terminal and the method realizing data service switching | |
CN110928708B (en) | Icon display method and device, electronic equipment and computer readable storage medium | |
CN104980588A (en) | Method and apparatus for detecting state of mobile terminal | |
CN106598538B (en) | Instruction set updating method and system | |
CN105791541B (en) | Screenshot method and mobile terminal | |
CN105975500A (en) | Data processing method, data statistical system and backstage management system | |
CN105072279B (en) | A kind of back-up device based on mobile terminal and method | |
CN107018334A (en) | A kind of applied program processing method and device based on dual camera | |
CN105872997A (en) | Short message merging method and terminal equipment | |
CN106371704B (en) | Application shortcut layout method of screen locking interface and terminal | |
CN106161790B (en) | Mobile terminal and control method thereof | |
CN106951350B (en) | Method and device for checking mobile terminal disk | |
CN105094598A (en) | Device and method for processing operational objects | |
CN106385494B (en) | Method and device for acquiring dynamic home page of mobile terminal application | |
CN109165487B (en) | Face unlocking method, mobile terminal and computer readable storage medium | |
CN105245707A (en) | Mobile terminal and method for processing information | |
CN105159644B (en) | A kind of method of mobile terminal and realization split screen processing |
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 |