CN108762838B - Application program preloading method and device, storage medium and terminal - Google Patents

Application program preloading method and device, storage medium and terminal Download PDF

Info

Publication number
CN108762838B
CN108762838B CN201810490619.3A CN201810490619A CN108762838B CN 108762838 B CN108762838 B CN 108762838B CN 201810490619 A CN201810490619 A CN 201810490619A CN 108762838 B CN108762838 B CN 108762838B
Authority
CN
China
Prior art keywords
application program
starting
application
preloading
target 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.)
Expired - Fee Related
Application number
CN201810490619.3A
Other languages
Chinese (zh)
Other versions
CN108762838A (en
Inventor
陈岩
刘耀勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810490619.3A priority Critical patent/CN108762838B/en
Publication of CN108762838A publication Critical patent/CN108762838A/en
Application granted granted Critical
Publication of CN108762838B publication Critical patent/CN108762838B/en
Expired - Fee Related 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading

Landscapes

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

Abstract

The embodiment of the application discloses an application program preloading method, an application program preloading device, a storage medium and a terminal. The method comprises the following steps: detecting that an application preload event is triggered; determining an application program to be started and a starting probability corresponding to the application program to be started; when partial starting resources corresponding to target application programs in the application programs to be started already preloaded exist, determining a processing mode of the partial starting resources according to the starting probability corresponding to the target application programs. By adopting the technical scheme, when the situation that the preloaded partial starting resources corresponding to the target application program in the application program to be started exist is determined, the processing mode of the preloaded partial starting resources can be reasonably determined according to the starting probability corresponding to the target application program, so that the memory space can be saved, and the starting speed of the application program can be increased.

Description

Application program preloading method and device, storage medium and terminal
Technical Field
The embodiment of the application relates to the technical field of application preloading, in particular to an application preloading method, an application preloading device, a storage medium and a terminal.
Background
At present, terminals such as smart phones, tablet computers, notebook computers, and smart appliances have become essential electronic devices in people's daily life. With the continuous intellectualization of the terminal equipment, the operating system is loaded in most terminal equipment, so that the terminal equipment can install abundant and various application programs and meet different requirements of users.
With the continuous improvement of the configuration of the terminal device, dozens or even hundreds of application programs can be installed in most terminal devices, and with the increasing abundance of the functions of the application programs, more and more resources are needed to be loaded when the application programs run. When a user selects to start an application program, a terminal loads resources required by the start of the application program, and after the loading is completed, an initial interface of the application program is entered, the whole process usually takes several seconds or even tens of seconds, so that the start efficiency of the application program is low, and improvement is needed urgently.
Disclosure of Invention
The embodiment of the application program preloading method and device, the storage medium and the terminal can optimize the preloading scheme of the application program in the terminal.
In a first aspect, an embodiment of the present application provides an application preloading method, including:
detecting that an application preload event is triggered;
determining an application program to be started and a starting probability corresponding to the application program to be started;
when partial starting resources corresponding to target application programs in the application programs to be started already preloaded exist, determining a processing mode of the partial starting resources according to the starting probability corresponding to the target application programs.
In a second aspect, an embodiment of the present application provides an application preloading device, including:
the device comprises a preloading event detection module, a pre-loading event detection module and a pre-loading event processing module, wherein the preloading event detection module is used for detecting whether an application preloading event is triggered or not;
the application determination module is used for determining an application program to be started and a starting probability corresponding to the application program to be started after detecting that an application preloading event is triggered;
and the processing mode determining module is used for determining the processing mode of the partial starting resources according to the starting probability corresponding to the target application program when the partial starting resources corresponding to the target application program in the application program to be started already preloaded exist.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the application preloading method according to the first aspect of the embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a terminal, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the application preloading method according to the first aspect of the embodiment of the present application.
According to the application program preloading scheme provided in the embodiment of the application program preloading method, after an application preloading event is detected to be triggered, the application program to be started and the starting probability corresponding to the application program to be started are determined, and when partial starting resources corresponding to a target application program in the application program to be started already preloaded exist, a processing mode of the partial starting resources is determined according to the starting probability corresponding to the target application program. By adopting the technical scheme, when the situation that the pre-loaded partial starting resources corresponding to the target application program in the application program to be started exist is determined, the processing mode of the pre-loaded partial starting resources can be reasonably determined according to the starting probability corresponding to the target application program, so that the memory space can be saved, and the starting speed of the application program can be increased.
Drawings
Fig. 1 is a schematic flowchart of application preloading according to an embodiment of the present application;
FIG. 2 is a diagram illustrating a relative position relationship between a preloaded active window stack and a display area of a display screen according to an embodiment of the present disclosure;
FIG. 3 is a diagram illustrating a relative position relationship between a preloaded active window stack and a display area of a display screen according to an embodiment of the present application;
fig. 4 is a schematic diagram of application interface migration according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating another application preloading method according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating a method for preloading an application according to an embodiment of the present application;
fig. 7 is a block diagram illustrating an application preloading apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of another terminal according to an embodiment of the present application.
Detailed Description
The technical scheme of the application is further explained by the specific implementation mode in combination with the attached drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Fig. 1 is a flowchart of an application preloading method according to an embodiment of the present application, where the method may be performed by an application preloading device, where the device may be implemented by software and/or hardware, and may be generally integrated in a terminal. As shown in fig. 1, the method includes:
step 101, detecting that an application preloading event is triggered.
For example, the terminal in the embodiment of the present application may include terminal devices such as a mobile phone, a tablet computer, a notebook computer, and an intelligent appliance. The terminal is loaded with an operating system.
For example, the trigger condition of the application preloading event may be set according to an actual situation, and the embodiment of the present application is not particularly limited. For example, an application preloading event may be triggered when detecting that a user's action satisfies a preset condition (e.g., picking up a terminal, inputting a screen unlocking operation, inputting a terminal unlocking operation, or the like); or when detecting that the foreground application program is changed, triggering an application preloading event; or after the prediction process of the preloaded application is finished, an application preloading event can be triggered immediately (or after a preset time length is passed); or may be triggered at timed intervals, etc. After the application preloading event is triggered, the system may detect that the application preloading event is triggered by reading a flag bit or receiving a trigger instruction, and the like, and the specific detection method is not limited in this embodiment of the application.
Step 102, determining an application program to be started and a starting probability corresponding to the application program to be started.
For example, the application to be started may be understood as an application that is predicted to be opened by a user, and may be a preset fixed application, an application that is predicted in a certain manner, or the like. The application to be launched may include one or more applications. The starting probability corresponding to the application program to be started reflects the possibility of the application program which is probably to be opened by the user, and the higher the starting probability is, the higher the possibility that the application program corresponding to the starting probability is opened by the user is; the smaller the launch probability, the less likely it is that the user opens the application corresponding to the launch probability.
Optionally, the application program to be started and the starting probability corresponding to the application program to be started may be predicted by using a prediction model. The prediction model may be a machine learning model, and the algorithm used may include a Recurrent Neural Networks (RNN), a Long Short-Term Memory (LSTM) network, a threshold cycle unit, a simple cycle unit, an auto-encoder, a decision tree, a random forest, a feature mean classification, a classification regression tree, a hidden markov, a K-nearest neighbor (KNN) algorithm, a logistic regression model, a bayesian model, a gaussian model, and a KL divergence (Kullback-Leibler) or the like. For example, according to a training sample during the training of the prediction model, a current sample is collected and input into the prediction model, so as to obtain the application program to be started and the starting probability corresponding to the application program.
Optionally, in the process that the user uses the terminal, a training sample may be collected, the training sample is adopted to train the preset initial model, and finally, a prediction model for predicting the application program to be started is obtained. For example, the elements contained in the training sample may include a time sequence or an order sequence in which the application was opened; can include the time, place, frequency, etc. that the application was opened; the method can include the running state of the terminal, such as the on-off state of a mobile data network, the connection state of a wireless hotspot, the identity information of the connected wireless hotspot, the currently running application program, the previous foreground application program, the stay time of the current application program in the background, the last time the current application program is switched to the background, the plugging state of an earphone jack, the charging state, the battery power information, the screen display time and the like; and the data collected by sensors integrated in the terminal can be included, such as a motion sensor, a light sensor, a temperature sensor, a humidity sensor and the like.
For example, a suitable sample element may be selected according to the selected machine learning model, the selected machine learning model may be determined according to the selected sample element, and the model and the sample element may be selected according to requirements on prediction accuracy, a preset speed, and the like, which is not limited in the embodiment of the present application.
In the embodiment of the application, determining the application program to be started may include determining the application program to be started according to an output result before the prediction model, or may include performing prediction by using the prediction model and determining the application program to be started according to a current output result of the prediction model.
Step 103, when there is a pre-loaded partial starting resource corresponding to a target application program in the application programs to be started, determining a processing mode for the partial starting resource according to a starting probability corresponding to the target application program.
In the embodiment of the application, whether a preloaded partial starting resource corresponding to one or more application programs in the application programs to be started exists is judged, and if yes, the application programs are determined to be target application programs, that is, the preloaded partial starting resource corresponding to the target application program in the application programs to be started exists. At this time, the processing mode of the preloaded partial starting resource corresponding to the target application program is determined according to the starting probability of the target application program. It should be noted that there may be one or more target application programs, and the number of the target application programs is not limited in the embodiment of the present application. It is to be understood that when there are a plurality of target applications, it indicates that there are pre-loaded partial startup resources corresponding to the respective target applications in the application to be started. And when the number of the target application programs is multiple, determining a processing mode of the pre-loaded partial starting resources corresponding to the current target application program according to the starting probability corresponding to the current target application program aiming at each target application program in the multiple target application programs. That is, when there are a plurality of target applications, the processing method for the pre-loaded partial starting resources corresponding to the target applications is determined according to the starting probabilities corresponding to the target applications.
The partial starting resource can be understood as a part of all starting resources required when the application program is started. The partial starting resources may include starting resources corresponding to the preloaded target application program when the application preloading event is triggered last time, starting resources corresponding to the preloaded target application program before the application preloading event is triggered each time, and starting resources corresponding to the preloaded target application program when the target application program meets a certain preset rule when the application preloading event is triggered last time. It should be noted that, the embodiment of the present application does not limit the source of the preloaded partial boot resource.
For example, when there are some pre-loaded starting resources corresponding to a target application program in an application program to be started, if a starting probability corresponding to the target application program is greater than a certain preset probability threshold, the remaining starting resources corresponding to the target application program may be pre-loaded on the basis of reserving the some starting resources corresponding to the target application program. And if the starting probability corresponding to the target application program is smaller than a certain preset probability threshold, releasing the preloaded partial starting resources corresponding to the target application program. Optionally, the applications to be started are sequenced from high to low according to the starting probability corresponding to the applications to be started, and when the target application is located at the top N bits, the remaining starting resources corresponding to the target application can be preloaded on the basis of reserving the part of the starting resources corresponding to the target application; or reserving the corresponding preloaded partial starting resource of the target application program. When the target application program is located at the back Q bit, the corresponding preloaded partial starting resource of the target application program can be released. Wherein N + Q is less than the determined total number of applications to be started.
It should be noted that, in the embodiment of the present application, how to determine what processing manner to partially start the resource according to the start probability corresponding to the target application program is not limited.
According to the application program preloading method provided in the embodiment of the application program preloading method, after an application preloading event is detected to be triggered, the application program to be started and the starting probability corresponding to the application program to be started are determined, and when partial starting resources corresponding to a target application program in the application program to be started already preloaded exist, a processing mode of the partial starting resources is determined according to the starting probability corresponding to the target application program. By adopting the technical scheme, when the situation that the pre-loaded partial starting resources corresponding to the target application program in the application program to be started exist is determined, the processing mode of the pre-loaded partial starting resources can be reasonably determined according to the starting probability corresponding to the target application program, so that the memory space can be saved, and the starting speed of the application program can be increased.
In some embodiments, determining a processing manner for the partial boot resource according to the boot probability corresponding to the target application includes: when the starting probability corresponding to the target application program is larger than a first preset probability threshold, preloading the residual starting resources corresponding to the target application program; wherein the first preset probability threshold is a fixed numerical value; or the first preset probability threshold is dynamically set, so that the application programs to be started comprise the application programs of which the starting probability values of the first preset number are greater than the first preset probability threshold. The method has the advantages that when the predicted starting probability of the target application program is high, the residual starting resources corresponding to the target application program are preloaded, the effect of completely preloading the starting resources corresponding to the target application program can be achieved through two times of batch preloading of the starting resources corresponding to the target application program, and the starting speed of the target application program is improved.
For example, the first preset probability threshold may be a fixed value, and at this time, the first preset probability threshold may be set according to the predicted actual starting situation of the application program to be started by the user for multiple times, for example, the actual starting times of the application program with the corresponding starting probability greater than 30% in the application program to be started by the user are more, and the actual starting times of the application program with the starting probability less than 30% are less, the first preset probability threshold may be set to 30%. When the starting probability corresponding to the target application program is greater than a first preset probability threshold (e.g., 30%), it indicates that the possibility of starting the target application program by the user is high, and in order to further increase the starting speed of the target application program, on the basis of reserving the pre-loaded partial starting resources corresponding to the target application program, the remaining starting resources corresponding to the target application program are pre-loaded, so as to implement complete pre-loading of the starting resources corresponding to the target application program.
Optionally, the first preset probability threshold may be dynamically set, so that the application programs to be started include application programs of which the starting probability values of the first preset number are greater than the first preset probability threshold. If the first preset probability threshold is set to be a larger value and the determined starting probability corresponding to the application program to be started is smaller, if the application program with the starting probability larger than the first preset probability threshold is determined as the application program to be preloaded, the situation that the application program to be preloaded does not exist or the number of the application programs to be preloaded is smaller is easy to occur. For example, the determined application to be started and the corresponding start probabilities are: application a (50%), application B (12%), application C (1%), application D (25%), and application E (10%), where the values inside the brackets indicate the probability of launching the corresponding application. If the first preset probability threshold is set to 60%, obviously, the application program with the starting probability greater than the first preset probability threshold (60%) does not exist, that is, the application program to be preloaded does not exist. If the first preset probability threshold is set to be 30%, the application programs with the starting probability greater than the first preset probability threshold (30%) are only the application program a, and when the application programs are preloaded, the hit rate of preloading the started application programs in advance is reduced. Therefore, the first preset probability threshold value can be dynamically set to ensure that the application programs to be started include the application programs of which the starting probability of the first preset number is greater than the first preset probability threshold value. For example, the first preset number is 3, even if the applications to be started include 3 applications with the starting probability greater than the first preset probability threshold, as in the foregoing example, the first preset probability threshold may be set to 10%.
In this embodiment of the application, the first preset probability threshold is dynamically set, so that when the application to be started includes an application whose start probability value of the first preset number is greater than the first preset probability threshold, if the start probability corresponding to the target application is greater than the first preset probability threshold, it indicates that the target application belongs to the first preset number of applications whose start probability is higher (the start probability is greater than the first preset probability threshold) in the application to be started. The method further indicates that the possibility that the user starts the target application program is high, and in order to further improve the starting speed of the target application program, on the basis of reserving the pre-loaded partial starting resources corresponding to the target application program, the residual starting resources corresponding to the target application program are pre-loaded, so that the complete pre-loading of the starting resources corresponding to the target application program is realized.
In some embodiments, when the starting probability corresponding to the target application program is less than or equal to the first preset probability threshold, determining whether the starting probability corresponding to the target application program is greater than a second preset probability threshold, and determining a processing mode for the partial starting resources according to a determination result; wherein the second preset probability threshold is a fixed value; or the second preset probability threshold is dynamically set, so that the application programs to be started comprise application programs of which the starting probability values of a second preset number are greater than the second preset probability threshold; the first preset probability threshold is larger than the second preset probability threshold, and the first preset number is smaller than the second preset number.
In this embodiment of the application, when the starting probability corresponding to the target application is smaller than or equal to the first preset probability threshold, it indicates that the starting probability corresponding to the target application does not reach the standard of the starting probability corresponding to the application that the user is likely to start, or it indicates that the target application does not belong to a first preset number of applications to be started, where the starting probability is higher (the starting probability is greater than the first preset probability threshold). At this time, if the preloaded part of the starting resources corresponding to the target application program is directly released, the starting speed is slow when the user really wants to start the target application program, which affects the user experience. If the pre-loaded partial starting resources corresponding to the target application program are continuously reserved or the remaining starting resources corresponding to the target application program are pre-loaded on the basis of reserving the pre-loaded partial starting resources corresponding to the target application program, when the user does not have a tendency to start the target application program, system resources are easily wasted, and a large amount of memory space is occupied. Therefore, it is necessary to further determine the relationship between the starting probability corresponding to the target application and the second preset probability threshold, and determine a specific processing manner for the preloaded partial starting resource corresponding to the target application according to the determination result.
The second preset probability threshold may be a fixed value, and at this time, the first preset probability threshold is greater than the second preset probability threshold. The second preset probability threshold may also be set according to the predicted actual starting situation of the application program to be started by multiple users, for example, the user sets the actual starting times to be the most (for example, 6 times out of 10 times) for the application program with the corresponding starting probability being greater than 30% among the application programs to be started, and sets the first preset probability threshold to be 30% and the second preset probability threshold to be 20% when the actual starting times to be the most (for example, 3 times out of 10 times) for the application programs with the starting probability being less than 30% and greater than 20% are relatively large, and sets the first preset probability threshold to be 30% and the second preset probability threshold to be 20% when the actual starting times to be the least (for example, 1 time out of 10 times or even none).
Optionally, the second preset probability threshold may be dynamically set, so that the application programs to be started include application programs of which the second preset number of starting probability values is greater than the second preset probability threshold. For example, the distribution of the determined starting probabilities corresponding to the applications to be started is not uniform, for example, the starting probabilities corresponding to the applications to be started are distributed at two ends, that is, there are more applications with higher starting probabilities and more applications with lower starting probabilities, and there are fewer or no applications with intermediate starting probabilities. For example, the determined application to be started and the corresponding start probabilities are: application a (33%), application B (36%), application C (10%), application D (8%), application E (5%), and application F (6%), wherein the numerical values inside the brackets indicate the launch probability of the corresponding application. Obviously, the application program with the starting probability higher than 30% corresponding to the application program to be started comprises the application program a and the application layer sequence B, the application program with the starting probability lower than 20% comprises the application program C, the application program D, the application program E and the application program F, and the application program with the starting probability between 20% and 30% is empty. However, if the user sets the second preset probability threshold to a larger value (for example, to 25%), it is easy for the user to not have the application program with the starting probability being less than or equal to the first preset probability threshold and being greater than the second preset probability threshold. If the second predetermined probability threshold is set to a smaller value (e.g., 4%), it is easy to determine all applications to be started as applications having a starting probability less than or equal to the first predetermined probability threshold and greater than the second predetermined probability threshold. Therefore, the second preset probability threshold can be dynamically set to ensure that the application programs to be started include the application programs of which the starting probabilities of the second preset number are greater than the second preset probability threshold. For example, the second preset number is 4, even if the applications to be started include 4 applications with the starting probability greater than the second preset probability threshold, as in the foregoing example in this paragraph, the second preset probability threshold may be set to 7%.
Optionally, determining a processing manner of the partial starting resource according to the judgment result includes: when the starting probability corresponding to the target application program is larger than the second preset probability threshold, reserving a part of starting resources corresponding to the target application program, or preloading the residual starting resources corresponding to the target application program; and when the starting probability corresponding to the target application program is smaller than or equal to the second preset probability threshold, releasing part of starting resources corresponding to the target application program. The method has the advantages that when the starting probability corresponding to the target application program is larger than the second preset probability threshold, the starting resource corresponding to the target application program is reserved, and the hit probability of the user for the starting of the preloaded application program can be improved while the memory space is saved; when the starting probability corresponding to the target application program is larger than a second preset probability threshold, the residual starting resources corresponding to the target application program are preloaded, the effect of completely preloading the starting resources corresponding to the target application program can be achieved through two times of batch preloading of the starting resources corresponding to the target application program, and the starting speed of the target application program is improved; when the starting probability corresponding to the target application program is smaller than the second preset probability threshold, the preloaded partial starting resources corresponding to the target application program are released, and the memory space can be effectively saved.
Illustratively, the starting probabilities corresponding to the applications to be started are sorted from high to low, which are: application a (26%), application B (25%), application C (21%), application D (12%), application E (6%), application F (3%), and application G (1%). For example, the first preset probability threshold is set to 20% and the second preset probability threshold is set to 10%. If there is a pre-loaded partially launched resource corresponding to application D, the target application is application D. Obviously, the starting probability (12%) corresponding to the application program D is smaller than the first preset probability threshold (20%) and larger than the second preset probability threshold (10%), the pre-loaded partial starting resources corresponding to the application program D are reserved, that is, if a starting instruction for the application program D is received, the starting is performed only based on the pre-loaded partial starting resources corresponding to the application program D, and in the starting process, the remaining starting resources corresponding to the application program D are loaded. Or, on the basis of reserving the pre-loaded part of the starting resources corresponding to the application program D, the remaining starting resources corresponding to the application program D are pre-loaded, so as to implement the total pre-loading of the starting resources corresponding to the application program D. That is, if a start instruction for the application program D is received, the application program D may be directly started based on the start resources corresponding to the preloaded application program D (including the part of the start resources that have been preloaded before and the remaining start resources that are preloaded when it is detected that the application program preloading event is triggered). If there is a pre-loaded partially launched resource corresponding to application E, the target application is application E. Obviously, if the starting probability (6%) corresponding to the application program E is smaller than the second preset probability threshold (10%), the preloaded partial starting resource corresponding to the application program E is released.
In some embodiments, the partial starting resource includes a starting resource corresponding to the target application program, which is preloaded when the starting probability corresponding to the target application program is less than or equal to the first preset probability threshold and greater than the second preset probability threshold when the application preloading event is detected to be triggered last time. The method has the advantages that when the application preloading event is triggered last time, the part of the starting resources corresponding to the target application program to be started, the starting probability of which meets the preset rule, can be preloaded to serve as a reference basis for determining the processing mode of the preloaded part of the starting resources corresponding to the target application program when the application preloading event is triggered.
For example, the process of preloading the application program may be allocating corresponding hardware resources to the application program to be preloaded, and loading relevant data required for starting based on the allocated hardware resources. The loading operation corresponding to the starting resource may include application process starting, application process initializing, application service starting, memory allocation, file content reading, network data acquisition, interface rendering, and the like, and generally includes at least two of them. That is, the starting resource includes related resources of at least two operations of application process starting, application process initialization, application service starting, memory allocation, file content reading, network data acquisition, and interface rendering.
For example, the application process starting and initialization is generally the first operation performed when the application is started, and therefore, in the embodiment of the present application, the part of the starting resource corresponding to the target application may include the application process starting and initialization. In addition, the partial starting resource may further include at least one of the following items, such as application service starting, application service starting and memory allocation, application service starting, memory allocation and file content reading, or application service starting, memory allocation, file content reading, network data acquisition and the like.
Illustratively, when it is detected that the application preloading event is triggered last time, the application preloading events are sorted according to the order of the starting probability corresponding to the application program to be started from high to low, and the sorting result is: application B (26%), application F (25%), application D (21%), application E (15%), application H (6%), application a (3%) and application L (1%). The application program to be started with the starting probability larger than the first preset probability threshold (20%) comprises the following steps: and the application program B, the application program F and the application program D are used as application programs to be all preloaded, and all starting resources corresponding to the application programs to be all preloaded are preloaded. And if the starting probability (15%) corresponding to the application program E is smaller than a first preset probability threshold (20%) and larger than a second preset probability threshold (10%), preloading is carried out on partial starting resources corresponding to the application program E, and the starting probabilities corresponding to the application program H, the application program A and the application program L are smaller than the second preset probability threshold (10%), and preloading is not carried out on the starting resources corresponding to the application program H, the application program A and the application program L.
With the above arrangement, in the two prediction results, if the starting probabilities corresponding to a certain application program or a plurality of application programs are both smaller than the first preset probability threshold but larger than the second preset probability threshold, it indicates that the user really has a tendency to start the application program. At this time, the effect of completely preloading the starting resource corresponding to the application program can be achieved by performing two times of batch preloading on the starting resource corresponding to the application program, and the starting speed of the application program is improved.
Optionally, the partial starting resource includes a starting resource corresponding to the target application program that is preloaded when the application preloading event is detected to be triggered last time and the starting probability corresponding to the target application program is less than or equal to the first preset probability threshold. Therefore, the number of the target application programs can be increased, and the hit rate of preloading of the application programs which are actually started by the user is improved when the prediction results of the application programs to be started are synthesized twice.
In some embodiments, when performing the preloading operation for the interface rendering, the method includes: and preloading an application interface corresponding to the target application program based on a pre-created pre-loaded active window stack, wherein the boundary coordinate corresponding to the pre-loaded active window stack is positioned outside the coordinate range of the display screen.
In the embodiment of the present application, the active window may be understood as a separate interface directly providing interaction and operation for a user, and different names may be used in different operating systems to name the interface. For ease of understanding, the following description will be made taking an Android (Android) operating system as an example.
In the Android system, the active window is called Activity. Activity is a component responsible for interacting with a user that provides a screen (which may be understood as a screen interface, rather than a display screen of an entity) for the user to interact to accomplish a task. In an android application, an Activity is usually a separate screen on which controls can be displayed and events of the user can be monitored and processed. In managing Activity, there are two concepts: task Stack and Stack. The Task corresponds to an application program, the Task is used for storing activities, one Task can store one or more activities, and the activities follow the principle of first-in first-out and last-in first-out. And the Stack is used for managing the Task, generally, one Stack manages the Task to which each Activity required to be shown by one screen belongs, and one Stack can manage one or more tasks, and of course, the Stack also follows the basic management principle of the Stack. The screens described herein are not necessarily completely separate display screens, and in the case of "two screens", the two screens may be only two regions of a complete display screen that independently display respective display contents. Of course, if the terminal has two or even more separate display screens, the "two screens" may also be two separate display screens.
In the Android system, multi-window modes are supported, which may include split screen mode, picture-in-picture mode, and free mode (FreeForm). In the multi-window mode, the Stack in which the application is located may have its own size (size), and may include upper, lower, left, and right coordinates in a coordinate system with the upper left corner of the terminal screen as the origin. For example, (a, b, c, d), which generally describes the boundary of a rectangle, the coordinates of the upper left corner and the coordinates of the lower right corner of the rectangle can be used for representation, i.e. the coordinates of the upper left corner of the rectangle are (a, b), and the coordinates of the lower right corner are (c, d), and such a rectangular area corresponds to the size of Stack. The in-application layout in the Stack is based on the size of the Stack, that is, the application interface corresponding to Activity is displayed within the boundary range of the size.
In the multi-window mode, multiple applications may be allowed to be visible, including both system and user visibility and system-only visibility. The system and the user can see the display on the display screen, and the user can see the display; system-only-visible means that the operating system is visible, but not the user, and may be obscured by foreground applications or displayed outside the display screen as the application is intended to implement.
In the embodiment of the application, the application interface of the target application program is preloaded outside the display screen, the preloading can be realized based on a multi-window mechanism of an operating system, and the size corresponding to the application program is set outside the display screen through the multi-window mechanism so as to achieve the purpose of being invisible to a user, so that the display of the display content of the foreground application program on the display screen is not influenced.
Generally, in the multi-window mode, there may be multiple types of stacks, for example, Home Stack represents a Stack displayed by a desktop application, App Stack represents a Stack displayed by a third-party application, and there may be other split-screen stacks, and contents contained in the three types of stacks may be displayed on a display screen, which are collectively referred to as application active window stacks in this embodiment. In the embodiment of the application, a preloaded active window Stack (preloaded Stack) is added to indicate a Stack displayed by a preloaded application, and the boundary coordinates of the preloaded Stack are set to be outside the coordinate range of a display screen, so that an application program to be preloaded can be displayed on the Stack. For the Android system, a Stack special for displaying preloaded applications can be newly built based on a multi-window mechanism of the Android system. In the embodiment of the application, the reason for newly building the Stack is that the newly built preloaded Stack can own size and visibility, so that the purpose of preloading outside a display screen is achieved.
In the embodiment of the application, the creation time of the preloaded Stack is not limited, and the preloaded Stack can be set to be in a resident state by default before the terminal leaves a factory, namely the preloaded Stack exists all the time; the method can also be established when the terminal is started or after the terminal is successfully unlocked; it may also be created after an application preload event is triggered (which may be before the target application is determined), and so on. Optionally, the preloading an application interface corresponding to the target application program based on a pre-created active window stack includes: judging whether a pre-established preloading active window stack exists or not; if not, creating a preloaded active window stack according to a preset rule; and preloading an application interface corresponding to the target application program based on the created preloading active window stack. The method has the advantages that after the target application program to be preloaded is determined, whether the preloading Stack exists or not is judged, if yes, new construction is not needed, and if not, creation is carried out, so that system resources can be saved. It can be understood that, when a plurality of target applications are included, that is, when a plurality of applications need to be continuously preloaded in a short time, the preloaded Stack is already created before the first target application starts to load, and then the preloaded Stack exists before the second target application starts to load, which may not be necessary.
In the embodiment of the application, a specific process of preloading an application interface corresponding to a target application program based on the preloaded Stack is not limited, and for example, the application interface may be drawn and displayed based on the size of the preloaded Stack.
In some embodiments, the preloading an application interface corresponding to the target application program based on a pre-created preload active window stack includes: creating a target process corresponding to the target application program; creating a task stack corresponding to the target application program in a pre-created preloading active window stack; starting an active window corresponding to the target application program in the task stack based on the target process; and drawing and displaying an application interface corresponding to the target application program based on the started active window. The advantage of setting up like this lies in, can draw and show the application interface of target application program based on the preloading activity window stack outside the screen coordinate scope, can not disturb the operation and the demonstration of foreground application program, guarantees system stability, effectively improves the speed when target application program starts simultaneously. While creating the target process, an initialization process of the target process may also be included. In the execution process of the above steps, preloading of other resources may also be involved, such as application service starting, memory allocation, file content reading, network data acquisition, and the like.
In some embodiments, further comprising: and sending a fake focus notification to the target application program, and keeping continuous drawing and display updating of an application interface corresponding to the target application program in a preset time period based on the fake focus notification. The method has the advantages that the drawing and the display of the application interface can be completed under the condition that the target application program obtains the focus and is visible to the system, the preloading completion degree is improved, and the focus of foreground application is not affected. The focus in the embodiment of the present application is also referred to as an input focus, and the fake focus is independent from the focus corresponding to the foreground application. Generally, for the current Android system, a focus is unique, for example, input operations such as touch and the like only take effect on the focus, the system end and the application end are consistent for inputting focus information, and once the system end modifies the input focus information, the system end sends information that the input focus information changes to the application, so that the method ensures that the input focus information of the system end and the application end is consistent. In the embodiment of the application, the purpose that the application end can forge the focus is achieved by separating the mode that the system end and the application end input the focus information. Specifically, in the embodiment of the application, the focus information is forged for the preloaded application, so that the preloaded application has the focus information, and the focus information of the system end is still correct, so that the preloaded application can be drawn normally, and the purpose of full loading is achieved. The focus exists in the system end and the application end, which can be regarded as a server end (server) and a client end (client), the system end records the application with the focus, and the application end stores a flag bit (flag) to identify whether the application has the focus. The time for forging the input focus can be that when a new window of the Android window system is added and the focus needs to be updated, a forged focus notification is generated and sent. The method for forging the focus may be a method for changing the focus of the window by calling the client end of the window, so that the window acquires the focus. Specifically, the forged focus notification can be sent based on a Binder mechanism, which is the most common mode of interprocess communication of the Android system and adopts a c/s architecture, i.e., a client/service architecture.
In the embodiment of the present application, the preset time period may be designed according to actual situations, and may be, for example, within a fixed time length range after the start of the preloading, or a time period from the start of the preloading to the completion of the preloading, and the like. In some embodiments, the length of the preset time period includes a playing time length of the start advertisement or start animation in the target application program. Some application programs usually play some advertisements or animations during the starting process, the playing time of the advertisements or animations usually ranges from 3 seconds to ten seconds, and during the playing of the advertisements or animations, a user may not have any operation and only wait for the completion of the playing, which wastes valuable time of the user. The method and the device have the advantages that the starting advertisement or the starting animation can be played out of the screen before the target application program is started, and when the target application program is started, the main page or other user operable interfaces of the application program can be directly accessed, so that the operable time point of the target application program is further advanced, and the waiting time is reduced.
In some embodiments, after preloading the application interface corresponding to the target application program based on the pre-created preloading active window stack, the method further includes: and when an operation instruction of the target application program is received, transferring an application interface corresponding to the target application program contained in the preloading active window stack to the display screen for displaying. The method has the advantages that when the target application program really needs to be started, the drawn application interface is directly migrated to the display screen to be displayed, the application interface can be rapidly switched, and the starting speed is improved.
In some embodiments, the migrating an application interface corresponding to the target application program included in the preloaded active window stack to the display screen for display includes: migrating a task stack corresponding to the target application program contained in the preloading active window stack to the top of an application active window stack; and updating the size information, the configuration information and the visibility of the task stack to realize that the application interface corresponding to the target application program is displayed on the display screen. The advantage that sets up like this lies in, can guarantee the stability of interface migration process, guarantees that the card screen can not appear in the recovery process, the black screen or the migration speed is slow scheduling problem.
For some terminals, especially mobile terminals such as mobile phones and tablet computers, in order to facilitate the use of users, the display modes of the display screen generally include vertical screen display and horizontal screen display, many applications display by default in the vertical screen mode, some applications display by default in the horizontal screen mode (such as some network games), and some applications switch the horizontal and vertical screen display along with the direction in which the user holds the terminal during the use of the terminal. In some embodiments of the present application, a boundary coordinate corresponding to the preloaded active window stack is (H, 0, 2H, H), a coordinate system corresponding to the boundary coordinate is a system coordinate, an origin of the system coordinate is an upper left corner of the display screen, and H is a length of a long side of a display area of the display screen. That is, the side corresponding to H is the maximum side of the display area of the display screen, and is the height of the display screen in the vertical screen display and the width of the display screen in the horizontal screen display. This is done to allow for the display of a landscape screen, pre-loaded application landscape displays, and the normal display of some applications. Fig. 2 is a schematic diagram illustrating a relative position relationship between a preloaded active window stack and a display area of a display screen according to an embodiment of the present disclosure. As shown in fig. 2, at this time, the display screen is in a vertical screen mode, the origin of the terminal system coordinates is the left vertex (0,0) of the display screen 201, the width direction of the display screen 201 is the X axis, the height direction is the Y axis, the boundary coordinates corresponding to the preloaded Stack202 are (H, 0, 2H, H), H is the screen height, that is, the area in the left solid line rectangular range is the main screen display area, and the area in the right dotted line rectangular range is the preloaded display area. Fig. 3 is a schematic diagram illustrating a relative position relationship between a preloaded active window stack and a display area of a display screen according to an embodiment of the present application. As shown in fig. 3, at this time, the display screen is in a landscape mode, the origin of the terminal system coordinates is the left vertex (0,0) of the display screen 301, the height direction of the display screen 301 is the X axis, the width direction is the Y axis, the boundary coordinates corresponding to the preloaded Stack202 are (H, 0, 2H, H), H is the screen height, that is, the area in the left solid line rectangular range is the main screen display area, and the area in the right dotted line rectangular range is the preloaded display area.
The reason why the pre-loaded Stack boundaries are so set is that:
the abscissa of the upper left corner is H, which is an interface for preventing the display screen (also referred to as a main screen) from displaying the preloaded application during the landscape screen, and since the main screen has a landscape mode in addition to the portrait mode, the abscissa of the upper left corner of the rectangular area corresponding to the preloaded Stack is set to the screen height in order to prevent the main screen display area from displaying the local part of the preloaded application during the landscape screen of the main screen.
The ordinate in the upper left corner is 0 in order for the preload application to be able to calculate the status bar height correctly. In order to better design a User Interface (UI), the Android application can customize the top status bar, and if the vertical coordinate corresponding to the upper edge is not equal to 0, the height of the status bar may be wrong.
The abscissa of the lower right corner is 2H (2 times the screen height), that is, the width of the rectangle corresponding to the preloaded Stack is equal to the screen height, so that the size of the preloaded Stack can contain the landscape application at the time of preloading (that is, the application interface is an application program in a landscape display mode).
The ordinate of the lower right corner is H, i.e. the height of the rectangle corresponding to the preloaded Stack is equal to the screen height, so as to preload the size of the Stack and be able to contain the vertical screen application at the time of preloading.
For the reasons described above, the inventors set the size of the preload Stack to (H, 0, 2H, H).
In addition, fig. 4 is a schematic application interface migration diagram provided in the embodiment of the present application, as shown in fig. 4, when an operation instruction of a target application program is received, an application interface 401 corresponding to the target application program included in a preloaded active window Stack is migrated to a display screen 201 to be displayed, specifically, a task to which the preloaded application interface belongs is migrated to the top of an application active window Stack, and size information, configuration information, and visibility of the task are updated, so that the application interface can be normally displayed on the display screen.
Fig. 5 is a schematic flowchart of another application preloading method according to an embodiment of the present application, where the method includes the following steps:
step 501, when detecting that an application preloading event is triggered, predicting an application program to be started and a starting probability corresponding to the application program to be started by using a preset prediction model.
Illustratively, the application to be started and the corresponding start probability are: application a (35%), application D (8%), application B (33%), application F (16%), application E (5%), application S (1%).
Step 502, judging whether a part of preloaded starting resources corresponding to a target application program in the application programs to be started exist, if so, executing step 503, otherwise, executing step 508.
The partial starting resources comprise starting resources corresponding to the target application program, which are pre-loaded when the starting probability corresponding to the target application program is smaller than or equal to T1 and larger than T2 when the application pre-loading event is detected to be triggered last time. Wherein T1 represents a first preset probability threshold, T2 represents a second preset probability threshold, and T2 ≦ T1.
Step 503, determining whether the starting probability T corresponding to the target application program is greater than T1, if yes, executing step 507, otherwise, executing step 504.
For example, T1 is 30%.
Step 504, determining whether the starting probability T corresponding to the target application program is greater than T2, if so, executing step 505, otherwise, executing step 506.
For example, T2 ═ 15%.
And 505, reserving a part of starting resources corresponding to the target application program, or preloading the residual starting resources corresponding to the target application program.
For example, in step 502, it is determined that there is a pre-loaded partial starting resource corresponding to the application F, where the starting probability T corresponding to the application F is 16%, and at this time, T2 < T1, the partial starting resource corresponding to the application F is reserved, or the remaining starting resources corresponding to the application F are pre-loaded.
Step 506, releasing a part of the starting resources corresponding to the target application program.
For example, in step 502, it is determined that there is a pre-loaded partial starting resource corresponding to the application D, where the starting probability T corresponding to the application D is 8%, and at this time, T < T2, the pre-loaded partial starting resource corresponding to the application D is released.
And 507, preloading the residual starting resources corresponding to the target application program.
For example, in step 502, it is determined that there is a pre-loaded partial startup resource corresponding to the application B, where the startup probability T corresponding to the application B is 33%, and in this case, T > T1, the remaining startup resource corresponding to the application B is pre-loaded.
And step 508, preloading the application program to be started, wherein the starting probability is larger than T1.
According to the application program preloading method provided by the embodiment of the application program, when the existence of the preloaded partial starting resources corresponding to the target application program in the application program to be started is determined, when the starting probability corresponding to the target application program is larger than a first preset probability threshold value, the residual starting resources corresponding to the target application program are preloaded, and the starting speed of the target application program can be improved; when the starting probability corresponding to the target application program is smaller than or equal to a first preset probability threshold and larger than a second preset probability threshold, partial starting resources corresponding to the target application program are reserved, and the hit probability of a user for starting the preloaded application program can be improved while the memory space is saved; or when the starting probability corresponding to the target application program is smaller than or equal to the first preset probability threshold and larger than the second preset probability threshold, the residual starting resources corresponding to the target application program are preloaded, the effect of completely preloading the starting resources corresponding to the target application program can be achieved by performing two-time batch preloading on the starting resources corresponding to the target application program, and the starting speed of the target application program is improved; when the starting probability corresponding to the target application program is smaller than the second preset probability threshold, the preloaded partial starting resources corresponding to the target application program are released, and the memory space can be effectively saved.
Fig. 6 is a schematic flowchart of another application preloading method according to an embodiment of the present application, where the method includes the following steps:
step 601, when detecting that the application preloading event is triggered, predicting the application program to be started and the starting probability corresponding to the application program to be started by using a preset prediction model.
Illustratively, the application to be started and the corresponding start probability are: application B (30%), application J (22%), application D (6%), application F (2%), application a (10%), application H (16%).
Step 602, sequencing the application programs to be started according to the sequence from high to low of the starting probability corresponding to the application programs to be started.
In this embodiment of the present application, according to the order from high to low of the starting probability corresponding to the application program to be started, the result of ranking the application program to be started is: application B, application J, application H, application A, application D, and application F.
Step 603, determining whether a pre-loaded partial starting resource corresponding to a target application program in the application programs to be started exists, if so, executing step 604, otherwise, executing step 609.
Step 604, determining whether the target application program belongs to the first N application programs to be started, if so, performing step 608, otherwise, performing step 605.
Where N is an integer of 1 or more, for example, N ═ 3.
Step 605, determining whether the target application program belongs to the (N + 1) th to (M) th application programs to be started, if so, executing step 606, otherwise, executing step 607.
Wherein M ≧ N, M is a positive integer, e.g., M ═ 4.
Step 606, reserving a part of the starting resources corresponding to the target application program, or preloading the remaining starting resources corresponding to the target application program.
For example, in step 603, it is determined that there are pre-loaded partial startup resources corresponding to the application a, and the application a belongs to the 4 th application to be started (in the order from high startup probability to low startup probability, the application a is located at the 4 th bit), the partial startup resources corresponding to the application a are reserved, or the remaining startup resources corresponding to the application a are pre-loaded.
And step 607, releasing the corresponding part of the starting resources of the target application program.
For example, in step 603, if it is determined that there is a pre-loaded partial starting resource corresponding to the application program F and the application program F does not belong to the 4 th application program to be started (the application program F is located at the 6 th bit in the order of the starting probability from high to low), the pre-loaded partial starting resource corresponding to the application program F is released.
And 608, preloading an application interface corresponding to the target application program based on the pre-created preloading active window stack.
And the boundary coordinate corresponding to the preloading active window stack is positioned outside the coordinate range of the display screen.
For example, in step 603, if it is determined that there are applications that belong to the first 3 applications to be launched (in the order of the launch probability, application J is located at the 2 nd position), the application interface corresponding to application J is preloaded based on the pre-created preloaded active window stack.
And step 609, preloading the first N application programs to be started.
For example, in step 603, if it is determined that there is no preloaded partially-launched resource corresponding to any one of the applications to be launched, the applications to be launched (application B, application J, and application H) ranked in the top 3 are preloaded.
According to the application program preloading method provided by the embodiment of the application program preloading method, the application programs to be started are sequenced according to the sequence from high to low starting probability, and when the situation that the preloaded partial starting resources corresponding to the target application programs in the application programs to be started exist is determined, the processing mode of the preloaded partial starting resources is reasonably determined according to the positions, corresponding to the target application programs, in the sequencing result, so that the memory space can be saved, and the starting speed of the application programs can be increased.
The method can synthesize the two prediction results of the application program to be started, and improve the hit rate of preloading the application program actually started by the user.
Fig. 7 is a schematic structural diagram of an application preloading device according to an embodiment of the present disclosure, where the application preloading device may be implemented by software and/or hardware, and is generally integrated in a terminal, and may preload an application to be started by executing an application preloading method. As shown in fig. 7, the apparatus includes:
a preloading event detection module 701, configured to detect whether an application preloading event is triggered;
an application determining module 702, configured to determine, after detecting that an application preloading event is triggered, an application program to be started and a start probability corresponding to the application program to be started;
a processing mode determining module 703, configured to determine, when there is a pre-loaded partial startup resource corresponding to a target application program in the application programs to be started, a processing mode for the partial startup resource according to a startup probability corresponding to the target application program.
The application program preloading device provided in the embodiment of the application program determines an application program to be started and a starting probability corresponding to the application program to be started after detecting that an application preloading event is triggered, and determines a processing mode of a part of starting resources according to the starting probability corresponding to a target application program in the application program to be started when the part of starting resources corresponding to the target application program exist in the preloaded application program to be started. By adopting the technical scheme, when the situation that the pre-loaded partial starting resources corresponding to the target application program in the application program to be started exist is determined, the processing mode of the pre-loaded partial starting resources can be reasonably determined according to the starting probability corresponding to the target application program, so that the memory space can be saved, and the starting speed of the application program can be increased.
Optionally, the processing manner determining module includes:
the first processing mode determining unit is used for preloading the residual starting resources corresponding to the target application program when the starting probability corresponding to the target application program is greater than a first preset probability threshold;
wherein the first preset probability threshold is a fixed numerical value; or the first preset probability threshold is dynamically set, so that the application programs to be started comprise the application programs of which the starting probability values of the first preset number are greater than the first preset probability threshold.
Optionally, the apparatus further comprises:
a second processing mode determining unit, configured to, when the starting probability corresponding to the target application is smaller than or equal to the first preset probability threshold, determine whether the starting probability corresponding to the target application is greater than a second preset probability threshold, and determine a processing mode for the partial starting resource according to a determination result;
wherein the second preset probability threshold is a fixed value; or the second preset probability threshold is dynamically set, so that the application programs to be started comprise application programs of which the starting probability values of a second preset number are greater than the second preset probability threshold;
the first preset probability threshold is larger than the second preset probability threshold, and the first preset number is smaller than the second preset number.
Optionally, the second processing mode determining unit is configured to:
when the starting probability corresponding to the target application program is larger than the second preset probability threshold, reserving a part of starting resources corresponding to the target application program, or preloading the residual starting resources corresponding to the target application program;
and when the starting probability corresponding to the target application program is smaller than or equal to the second preset probability threshold, releasing part of starting resources corresponding to the target application program.
Optionally, the partial starting resource includes a starting resource corresponding to the target application program that is preloaded when the application preloading event is detected to be triggered last time and the starting probability corresponding to the target application program is smaller than or equal to the first preset probability threshold and larger than the second preset probability threshold.
Optionally, the starting resource includes related resources of at least two operations of application process starting, application process initializing, application service starting, memory allocation, file content reading, network data obtaining, and interface rendering.
Optionally, when performing the preloading operation for the interface rendering, the method includes:
and preloading an application interface corresponding to the target application program based on a pre-created pre-loaded active window stack, wherein the boundary coordinate corresponding to the pre-loaded active window stack is positioned outside the coordinate range of the display screen.
Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a method for preloading applications, the method comprising:
detecting that an application preload event is triggered;
determining an application program to be started and a starting probability corresponding to the application program to be started;
when partial starting resources corresponding to target application programs in the application programs to be started already preloaded exist, determining a processing mode of the partial starting resources according to the starting probability corresponding to the target application programs.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDRRAM, SRAM, EDORAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium provided in the embodiments of the present application contains computer-executable instructions, and the computer-executable instructions are not limited to the application preloading operation described above, and may also perform related operations in the application preloading method provided in any embodiment of the present application.
The embodiment of the application provides a terminal, and the terminal can be integrated with the application preloading device provided by the embodiment of the application. Fig. 8 is a schematic structural diagram of a terminal according to an embodiment of the present application. The terminal 800 may include: the application preloading method comprises a memory 801, a processor 802 and a computer program stored on the memory and capable of being executed by the processor, wherein the application preloading method is realized when the processor 802 executes the computer program.
According to the terminal provided by the embodiment of the application, when a user uses the terminal to navigate in the driving process, if the navigation function is abnormal and the navigation information cannot be successfully acquired, the navigation application is restarted or switched to other navigation applications to continuously acquire the navigation information, so that the active operation of the user can be reduced, and the reliability of the navigation function and the navigation efficiency of the terminal are improved.
Fig. 9 is a schematic structural diagram of another terminal provided in the embodiment of the present application, where the terminal may include: a casing (not shown), a memory 901, a Central Processing Unit (CPU) 902 (also called a processor, hereinafter referred to as CPU), a circuit board (not shown), and a power circuit (not shown). The circuit board is arranged in a space enclosed by the shell; the CPU902 and the memory 901 are disposed on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the terminal; the memory 901 is used for storing executable program codes; the CPU902 executes a computer program corresponding to the executable program code by reading the executable program code stored in the memory 901, so as to implement the following steps:
detecting that an application preload event is triggered;
determining an application program to be started and a starting probability corresponding to the application program to be started;
when partial starting resources corresponding to target application programs in the application programs to be started already preloaded exist, determining a processing mode of the partial starting resources according to the starting probability corresponding to the target application programs.
The terminal further comprises: peripheral interface 903, RF (Radio Frequency) circuitry 905, audio circuitry 906, speakers 911, power management chip 908, input/output (I/O) subsystems 909, other input/control devices 910, touch screen 912, other input/control devices 910, and external port 904, which communicate through one or more communication buses or signal lines 907.
It should be understood that the terminal 900 shown is only one example of a terminal and that the terminal 900 can have more or fewer components than shown, can combine two or more components, or can have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The following describes in detail a terminal for preloading an application program provided in this embodiment, where the terminal is a mobile phone as an example.
Memory 901, the memory 901 being accessible by the CPU902, the peripheral interface 903, etc., the memory 901 may comprise high speed random access memory, and may also comprise non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
A peripheral interface 903, the peripheral interface 903 may connect input and output peripherals of the device to the CPU902 and the memory 901.
An I/O subsystem 909, which I/O subsystem 909 may connect input and output peripherals on the device, such as a touch screen 912 and other input/control devices 910, to the peripheral interface 903. The I/O subsystem 909 may include a display controller 9091 and one or more input controllers 9092 for controlling other input/control devices 910. Where one or more input controllers 9092 receive electrical signals from or send electrical signals to other input/control devices 910, the other input/control devices 910 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is worth noting that the input controller 9092 may be connected with any one of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
A touch screen 912, which is an input interface and an output interface between the user terminal and the user, displays visual output to the user, which may include graphics, text, icons, video, and the like.
The display controller 9091 in the I/O subsystem 909 receives electrical signals from the touch screen 912 or transmits electrical signals to the touch screen 912. The touch screen 912 detects a contact on the touch screen, and the display controller 9091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 912, that is, to implement a human-computer interaction, where the user interface object displayed on the touch screen 912 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 905 is mainly used to establish communication between the mobile phone and the wireless network (i.e., network side), and implement data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. In particular, RF circuitry 905 receives and transmits RF signals, also referred to as electromagnetic signals, through which RF circuitry 905 converts electrical signals to or from electromagnetic signals and communicates with a communication network and other devices. The RF circuitry 905 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC (CODEC) chipset, a Subscriber Identity Module (SIM), and so forth.
The audio circuit 906 is mainly used to receive audio data from the peripheral interface 903, convert the audio data into an electric signal, and transmit the electric signal to the speaker 911.
The speaker 911 is used to convert the voice signal received by the mobile phone from the wireless network through the RF circuit 905 into sound and play the sound to the user.
And the power management chip 908 is used for supplying power and managing power to the hardware connected with the CPU902, the I/O subsystem and the peripheral interfaces.
The application preloading device, the storage medium and the terminal provided in the above embodiments can execute the application preloading method provided in any embodiment of the present application, and have corresponding functional modules and beneficial effects for executing the method. Technical details that are not described in detail in the above embodiments may be referred to an application preloading method provided in any embodiment of the present application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (10)

1. An application preloading method, comprising:
detecting that an application preload event is triggered;
determining an application program to be started and a starting probability corresponding to the application program to be started;
when partial starting resources corresponding to a target application program in the application programs to be started already preloaded exist, determining a processing mode of the partial starting resources according to a starting probability corresponding to the target application program;
the part of the starting resources are one part of all starting resources required by the starting of the application program.
2. The method of claim 1, wherein determining a processing manner for the partially launched resource according to the launch probability corresponding to the target application comprises:
when the starting probability corresponding to the target application program is larger than a first preset probability threshold, preloading the residual starting resources corresponding to the target application program;
wherein the first preset probability threshold is a fixed numerical value; or the first preset probability threshold is dynamically set, so that the application programs to be started comprise the application programs of which the starting probability values of the first preset number are greater than the first preset probability threshold.
3. The method of claim 2, further comprising:
when the starting probability corresponding to the target application program is smaller than or equal to the first preset probability threshold, judging whether the starting probability corresponding to the target application program is larger than a second preset probability threshold, and determining a processing mode of the partial starting resources according to a judgment result;
wherein the second preset probability threshold is a fixed value; or the second preset probability threshold is dynamically set, so that the application programs to be started comprise application programs of which the starting probability values of a second preset number are greater than the second preset probability threshold;
the first preset probability threshold is larger than the second preset probability threshold, and the first preset number is smaller than the second preset number.
4. The method of claim 3, wherein determining the manner of processing the partially started resource according to the determination result comprises:
when the starting probability corresponding to the target application program is larger than the second preset probability threshold, reserving a part of starting resources corresponding to the target application program, or preloading the residual starting resources corresponding to the target application program;
and when the starting probability corresponding to the target application program is smaller than or equal to the second preset probability threshold, releasing part of starting resources corresponding to the target application program.
5. The method according to claim 4, wherein the part of the starting resources includes starting resources corresponding to the target application program that are preloaded when a starting probability corresponding to the target application program is less than or equal to the first preset probability threshold and greater than the second preset probability threshold last time an application preloading event is detected to be triggered.
6. The method according to any one of claims 1 to 5, wherein the start-up resources include resources related to at least two operations selected from the group consisting of application process start-up, application process initialization, application service start-up, memory allocation, file content reading, network data acquisition, and interface rendering.
7. The method of claim 6, when performing a preload operation for the interface rendering, comprising:
and preloading an application interface corresponding to the target application program based on a pre-created pre-loaded active window stack, wherein the boundary coordinate corresponding to the pre-loaded active window stack is positioned outside the coordinate range of the display screen.
8. An application preloading device, comprising:
the device comprises a preloading event detection module, a pre-loading event detection module and a pre-loading event processing module, wherein the preloading event detection module is used for detecting whether an application preloading event is triggered or not;
the application determination module is used for determining an application program to be started and a starting probability corresponding to the application program to be started after detecting that an application preloading event is triggered;
the processing mode determining module is used for determining a processing mode of the partial starting resources according to the starting probability corresponding to the target application program when the partial starting resources corresponding to the target application program in the application program to be started already preloaded exist;
the part of the starting resources are one part of all starting resources required by the starting of the application program.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the application preloading method according to any one of claims 1-7.
10. A terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the application preloading method according to any of claims 1-7 when executing the computer program.
CN201810490619.3A 2018-05-21 2018-05-21 Application program preloading method and device, storage medium and terminal Expired - Fee Related CN108762838B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810490619.3A CN108762838B (en) 2018-05-21 2018-05-21 Application program preloading method and device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810490619.3A CN108762838B (en) 2018-05-21 2018-05-21 Application program preloading method and device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN108762838A CN108762838A (en) 2018-11-06
CN108762838B true CN108762838B (en) 2022-01-28

Family

ID=64007457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810490619.3A Expired - Fee Related CN108762838B (en) 2018-05-21 2018-05-21 Application program preloading method and device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN108762838B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109635199B (en) * 2018-12-17 2021-06-01 广州大学 Application list dynamic recommendation method and system based on user behaviors
CN110231963B (en) * 2019-06-12 2022-11-15 Oppo广东移动通信有限公司 Application control method and related device
CN110413347B (en) * 2019-07-31 2023-08-18 Oppo广东移动通信有限公司 Advertisement processing method and device in application program, storage medium and terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095227B (en) * 2014-04-28 2019-03-26 小米科技有限责任公司 The method and device that webpage preloads
CN104598270B (en) * 2014-12-22 2018-06-01 北京像素软件科技股份有限公司 The method and apparatus that resource loads in a kind of more people's online games
CN106406966B (en) * 2016-10-31 2020-04-07 维沃移动通信有限公司 Application program preloading method and mobile terminal
CN106648747B (en) * 2016-11-14 2021-01-05 腾讯科技(深圳)有限公司 Process preloading processing method and device
CN107608778B (en) * 2017-09-30 2020-01-14 Oppo广东移动通信有限公司 Application program control method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN108762838A (en) 2018-11-06

Similar Documents

Publication Publication Date Title
CN108363593B (en) Application program preloading method and device, storage medium and terminal
CN108614722B (en) Application program preloading method and device, storage medium and terminal
CN108681475B (en) Application program preloading method and device, storage medium and mobile terminal
CN108762843B (en) Application program preloading method and device, storage medium and intelligent terminal
CN108710513B (en) Application program starting method and device, storage medium and terminal
CN108958830B (en) Application program starting method and device, storage medium and terminal
CN108647055B (en) Application program preloading method and device, storage medium and terminal
CN108829457B (en) Application program prediction model updating method and device, storage medium and terminal
CN108647052B (en) Application program preloading method and device, storage medium and terminal
CN108595224B (en) Application program prompting method and device, storage medium and terminal
EP3579104B1 (en) Method and apparatus for establishing an application prediction model, storage medium and terminal
US11467855B2 (en) Application preloading method and device, storage medium and terminal
CN108762831B (en) Application program preloading method and device, storage medium and terminal
CN108595230B (en) Application program preloading method and device, storage medium and terminal
US11099861B2 (en) Method for preloading application, storage medium, and terminal
CN108595231B (en) Application program preloading method and device, storage medium and intelligent terminal
CN108958828B (en) Application program preloading method and device, storage medium and terminal
CN108776599B (en) Management method and device for preloaded application, storage medium and intelligent terminal
CN108804153B (en) Application program preloading method and device, storage medium and terminal
CN108647056B (en) Application program preloading method and device, storage medium and terminal
CN108762844B (en) Application program preloading method and device, storage medium and terminal
CN108647057B (en) Screen direction setting method and device, storage medium and terminal
CN108762836B (en) Management method and device for preloaded application, storage medium and intelligent terminal
CN108845838B (en) Application program preloading method and device, storage medium and terminal
CN108710512B (en) Application program preloading method and device, storage medium and intelligent terminal

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220128