WO2019223510A1 - Application program preloading method and apparatus, storage medium, and mobile terminal - Google Patents

Application program preloading method and apparatus, storage medium, and mobile terminal Download PDF

Info

Publication number
WO2019223510A1
WO2019223510A1 PCT/CN2019/085463 CN2019085463W WO2019223510A1 WO 2019223510 A1 WO2019223510 A1 WO 2019223510A1 CN 2019085463 W CN2019085463 W CN 2019085463W WO 2019223510 A1 WO2019223510 A1 WO 2019223510A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
preloaded
startup
probability
preloading
Prior art date
Application number
PCT/CN2019/085463
Other languages
French (fr)
Chinese (zh)
Inventor
韩世广
陈岩
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019223510A1 publication Critical patent/WO2019223510A1/en

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/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Definitions

  • the embodiments of the present application relate to the technical field of application program loading, for example, to a method, a device, a storage medium, and a mobile terminal for preloading an application program.
  • mobile terminals such as smart phones, tablet computers, notebook computers, and smart home appliances have become essential electronic devices in people's daily lives.
  • mobile terminal devices With the continuous intelligentization of mobile terminal devices, most mobile terminal devices are loaded with operating systems, so that mobile terminal devices can install a variety of applications to meet different needs of users.
  • the embodiments of the present application provide a method, a device, a storage medium, and a mobile terminal for preloading an application program, which can optimize a preloading solution for the application program.
  • an embodiment of the present application provides a method for preloading an application program, including:
  • the launch probability includes a probability that the application is about to be opened
  • an application preloading device including:
  • the startup probability prediction module is configured to predict a startup probability of a candidate application when an application preload event is triggered, where the startup probability includes a probability that the application is about to be opened;
  • An application determining module configured to determine an application to be preloaded included in the candidate application according to the startup probability
  • a preloading policy determining module configured to determine a preloading policy corresponding to the application to be preloaded according to the startup probability
  • the preloading module is configured to perform a preloading operation on the preloaded application program according to the preloading policy.
  • a computer-readable storage medium in an embodiment of the present application.
  • the storage medium stores a computer program, and when the computer program is executed by a processor, the application program according to the embodiment of the present application is preloaded. method.
  • an embodiment of the present application provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and executable by the processor.
  • the processor executes the computer program, the processor implements the present invention.
  • FIG. 1 is a schematic flowchart of an application preloading method according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of a relative position relationship between a preloaded active window stack and a display screen display area according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of a relative position relationship between another preloaded active window stack and a display screen display area according to an embodiment of the present application
  • FIG. 4 is a schematic diagram of application interface migration provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of another application preloading method according to an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of another application preloading method according to an embodiment of the present application.
  • FIG. 7 is a structural block diagram of an application preloading device according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of another mobile terminal according to an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of an application preloading method according to an embodiment of the present application.
  • the method may be executed by an application preloading device, where the device may be implemented by software and / or hardware, and may generally be integrated in a mobile terminal.
  • the method includes:
  • Step 110 When it is detected that an application preloading event is triggered, predicting a startup probability of the candidate application program.
  • the startup probability includes a probability that an application program is about to be opened.
  • the mobile terminal in the embodiment of the present application may include a mobile terminal device such as a mobile phone, a tablet computer, a notebook computer, and a smart home appliance.
  • the mobile terminal is loaded with an operating system.
  • the triggering condition of the application preload event can be set according to the actual situation, which is not specifically limited in the embodiment of the present application.
  • an application preload event can be triggered when it is detected that the user's action meets a preset condition (such as picking up a mobile terminal, entering a screen unlock operation, or entering a mobile terminal unlock operation, etc.); or it can detect a change in the foreground application , The application preload event is triggered; or the application preload event may be triggered immediately (or after a preset period of time has elapsed) after the prediction process of the preloaded application ends; or it may be triggered at regular intervals and so on.
  • the system can detect that the application preload event has been triggered by reading a flag bit or receiving a trigger instruction, and the specific detection method is not limited in this embodiment of the present application.
  • the candidate application programs may include all application programs installed in the mobile terminal, and may also include some application programs. Some applications may include applications that are frequently used by users, and may also include third-party applications, that is, some applications may not include applications that are rarely used by users, or may not include system applications. This embodiment of the present application does not limit the manner and quantity of candidate application programs.
  • the candidate application can be determined according to the number of times and / or the use time of one or more applications in a preset period before the current time.
  • the preset period is, for example, 1 month, when the number of uses and / or When the usage time exceeds the corresponding threshold, the corresponding application is determined as a candidate application, or multiple applications are sorted according to the number of uses and / or the length of use, and the top-ranked application is determined as a candidate application .
  • the startup probability includes a probability that an application program is about to be opened.
  • the application to be opened can be understood as the application to be started next after the current application ends, and the startup probability can be used to characterize the possibility of an application becoming the next to be started.
  • a prediction model may be used to predict the launch probability of the candidate application.
  • the prediction model can be a machine learning model, and the algorithms used can include Recurrent Neural Networks (RNN), Long Short-Term Memory (LSTM) networks, threshold recurrent units, simple recurrent units, automatic encoding , Decision tree, random forest, feature mean classification, classification regression tree, hidden Markov, K-NearestNeighbor (KNN) algorithm, logistic regression model, Bayesian model, Gaussian model, and KL divergence (Kullback – Leibler divergence) and so on.
  • RNN Recurrent Neural Networks
  • LSTM Long Short-Term Memory
  • KNN K-NearestNeighbor
  • logistic regression model Bayesian model
  • Gaussian model Gaussian model
  • KL divergence Kullback – Leibler divergence
  • training samples can be collected, the training samples can be used to train the preset initial model, and finally a prediction model for the startup probability of the candidate application can be obtained.
  • the elements included in the training sample may include a time series or an order sequence in which the application is opened; may include the time, place, and frequency of the application being opened; and may include the running status of the mobile terminal, such as the mobile data network Switch status, wireless hotspot connection status, identity information of the connected wireless hotspot, currently running application, previous foreground application, the length of time the current application stays in the background, and the time when the current application was last switched to the background , Plugging and unplugging status, charging status, battery power information, and screen display duration of the headphone jack; it can also include data collected by sensors integrated in the mobile terminal, such as motion sensors, light sensors, temperature sensors, and humidity sensors, etc. .
  • the appropriate sample elements can be selected according to the selected machine learning model, and the selected machine learning model can be determined according to the selected sample elements.
  • the model can also be combined with the needs for prediction accuracy and prediction speed.
  • the selection of sample elements are not limited in the embodiments of the present application.
  • Step 120 Determine, according to the startup probability, an application to be preloaded included in the candidate application and a preloading strategy corresponding to the application to be preloaded.
  • the applications to be preloaded may be understood as applications that the user may be about to open, and the applications to be preloaded may include one or more.
  • a candidate application with a startup probability greater than a preset probability threshold may be determined as an application to be preloaded; a preset number of candidate applications with a higher startup probability may be determined as the application to be preloaded.
  • the preset probability threshold or preset value can be set freely. For example, the preset probability threshold can be 0.2 and the preset value can be 4.
  • corresponding preloading policies may be set for different applications to be preloaded according to the size of the startup probability.
  • its corresponding preloading strategy can also be set according to its corresponding startup probability.
  • the pre-loaded resources may include resources related to at least one of an application process startup, application process initialization, application service startup, memory allocation, file content reading, network data acquisition, and interface rendering.
  • application process startup and initialization are usually the first operations performed when an application is started.
  • multiple preloading strategies may include application process startup and initialization.
  • Other preloading strategies may also include subsequent at least One item, such as also including application service startup, application service startup and memory allocation, application service startup, memory allocation and file content reading, application service startup, memory allocation, file content reading and network data acquisition, or application service startup, Memory allocation, file content reading, network data acquisition and interface rendering.
  • interface rendering interface drawing, or interface drawing and display
  • more levels can be divided, such as the number of interfaces to be rendered or the form of interface rendering, and so on.
  • the interface in the interface rendering may include a startup interface of an application, a startup animation, or an interface corresponding to one or more functions inside the application, and the like.
  • the pre-loaded resources may also include resources that may be involved in the running process of the application, such as network video data, audio data, and application patch installation packages.
  • resources that may be involved in the running process of the application, such as network video data, audio data, and application patch installation packages.
  • some applications such as some game applications
  • the application patch installation package can be downloaded or even installed in the pre-loading stage. In this way, when the user actually starts this kind of application, he / she does not need to wait for the patch installation process and can directly use the application.
  • interval division may be performed between the preset probability threshold and 1, and the number of divided intervals is implemented in this application. Examples are not limited.
  • the preset probability threshold can be recorded as f, then the startup probability of the application to be preloaded will appear between f to 1, and f to 1 will be divided into intervals in advance. Take three probability intervals as an example, such as the first probability interval Is (f, m), the second probability interval is (m, n), and the third probability interval is (n, 1).
  • a corresponding preloading strategy can be set in advance for each probability interval, such as the first probability interval
  • the second probability interval corresponds to the second preloading strategy
  • the third probability interval corresponds to the third preloading strategy.
  • a preset number of candidate applications with a higher startup probability are determined as the applications to be preloaded, and then the preset value can be determined, and the startup probability between at least one application to be preloaded can be determined. Size relationship to determine the corresponding preload strategy. Assuming that the preset value is recorded as N, then there are N applications to be preloaded, and N can be divided based on the number of intervals. The applications to be preloaded can be started from high to low according to the startup probability (of course, it can also be low to High, this application is not limited).
  • the sequence numbers 1 to M are the first quantity interval
  • the sequence numbers M + 1 to L are the second quantity interval
  • the sequence numbers L + 1 to N are the third quantity interval.
  • a corresponding preloading strategy can be set in advance for each quantity interval, for example, the first quantity interval corresponds to the first preloading strategy, the second quantity interval corresponds to the second preloading strategy, and the third quantity interval corresponds to the third preloading strategy.
  • the preloading strategy corresponding to the quantity interval For the current application to be preloaded, to determine in which quantity interval the sequence number of the corresponding startup probability falls, then determine the preloading strategy corresponding to the quantity interval as the current preloading strategy corresponding to the application to be preloaded.
  • the high probability of startup indicates that the user is more likely to choose the application.
  • the application to be preloaded with a higher probability of startup can be preferentially preloaded, or more preload resources can be set Type, or set a greater number of preload resources, or ensure a higher degree of completion of the preload operation, or set a longer time for the preload operation, and so on.
  • Step 130 Perform a corresponding preloading operation on the application to be preloaded according to the preloading policy.
  • the multiple applications to be preloaded may be determined one by one as The current application to be preloaded and the first preload operation is performed in sequence, or more than 2 applications to be preloaded may be determined as the current to be preloaded application and the first preload operation is performed simultaneously, that is, multiple The first preload operation of the application may be performed in parallel.
  • the preloading strategy includes the order of performing the preloading operation, the preloading operation is performed in the order specified in the preloading strategy.
  • the application preloading method provided in the embodiment of the present application predicts a startup probability of a candidate application when an application preloading event is triggered, determines an application to be preloaded and a corresponding preloading strategy according to the startup probability, and follows the preloading The policy treats the preloaded application accordingly.
  • a suitable preloading strategy can be selected according to the predicted startup probability of an application that needs to be preloaded, system resources can be reasonably used for preloading, and the preloading function can be improved.
  • determining the to-be-loaded application included in the candidate application and the pre-loading strategy corresponding to the to-be-loaded application according to the startup probability includes: changing the startup probability from high to Low-rank or low-to-high ranking, and sequentially obtain a preset number of starting probabilities from a high starting probability, and determine a candidate application corresponding to the preset number of starting probabilities as a pending application included in the candidate application.
  • Pre-loading the application program determining the pre-loading resource corresponding to the application to be pre-loaded according to the startup probability of the application to be pre-loaded, where the higher the startup probability is, the more pre-loading resources corresponding to the application to be pre-loaded.
  • the advantage of this setting is that it can control the number of pre-loaded applications, which can prevent the number of pre-loads from being too small and cause a low prediction hit rate. It can also prevent the number of applications from burdening the overall system performance and wasting system resources.
  • the higher the probability of startup the higher the probability that the application to be preloaded is actually started by the user, more resources can be preloaded, and the speed at which it is actually started is effectively improved, while the application to be preloaded with a lower startup probability, can be Pre-loading fewer resources can save system resources, and at the same time, it can increase the startup speed when it is actually started.
  • determining the preloaded resource corresponding to the application to be preloaded according to the startup probability of the application to be preloaded includes: dividing the application to be preloaded according to the startup probability of the application to be preloaded. It is divided into a first type of application and a second type of application, wherein the startup probability corresponding to the first type of application is greater than the startup probability corresponding to the second type of application.
  • Determine the preloaded resources corresponding to the first type of application including application process startup, application process initialization, application service startup, memory allocation, file content reading, network data acquisition, and interface rendering; determine the preloaded resources corresponding to the second type of application Including application process startup, application process initialization, application service startup, memory allocation, and file content reading.
  • the advantage of this setting is that it can more reasonably determine the preload resources corresponding to the applications to be preloaded with different startup probabilities. For network data acquisition and interface rendering, it may require more system resources during the preload process and consume time. It is longer, so for applications with relatively low startup probability, this part of preloading can be omitted, which can save resources such as terminal storage space, and preload more applications, and improve the prediction hit rate.
  • the method when performing a preload operation for the interface rendering, includes: preloading an application interface corresponding to the application to be preloaded based on a pre-created preloading active window stack, wherein the preloading activity
  • the boundary coordinates corresponding to the window stack are outside the coordinate range of the display screen.
  • the active window may be understood as an independent interface that directly provides users with interaction and operation, and different terms may be used to name the interface in different operating systems.
  • the following description is made by taking an Android operating system as an example.
  • the active window is called Activity.
  • Activity is a component responsible for interacting with the user. It provides a screen (which can be understood as a screen interface instead of a physical display screen) for the user to interactively complete a certain task.
  • an Activity is usually a separate screen, which can display some controls or listen to and handle user events.
  • Task stack Task stack
  • Stack activity window stack
  • Task corresponds to an application. Task is set to store Activity. One Task can store one or more Activities, and these Activities follow the principle of "first in, first out, last in, first out”.
  • the Stack is set to manage Tasks.
  • a Stack manages the Tasks belonging to one or more Activities that need to be displayed on a screen.
  • a Stack can manage one or more Tasks.
  • the Stack also follows the basics of the Stack. Management principles.
  • the screens described here are not necessarily complete and independent display screens. Taking “two screens" as an example, these two screens may be just two areas in a complete display screen that independently display their respective display contents. Of course, if the mobile terminal has two or more independent display screens, the "two screens" may also be two independent display screens.
  • multi-window mode is supported, which can include split-screen mode, picture-in-picture mode, and FreeForm.
  • the stack where the application is located may have its own size, which may include the upper, lower, left, and right coordinates in a coordinate system with the upper left corner of the mobile terminal screen as the origin.
  • (a, b, c, d) generally describes a rectangular boundary, which can be expressed by the coordinates of the upper left corner and the lower right corner of the rectangle, that is, the upper left corner of the rectangle is (a, b), right The lower corner coordinate is (c, d), and such a rectangular area corresponds to the size of the Stack.
  • the layout of the application in the stack is based on the size of the stack, which means that the application interface corresponding to the activity is displayed within the boundary of the size.
  • pre-loading the application interface of the application to be pre-loaded outside the display screen can be implemented based on the multi-window mechanism of the operating system, and the size corresponding to the application program is set outside the display screen through the multi-window mechanism to achieve For the purpose of being invisible to the user, so that the display content of the foreground application is not displayed on the display screen.
  • Stack represents the stack displayed by desktop applications
  • App Stack represents the third-party application display
  • a preloaded active window stack (preloaded stack) is added, which is set to represent the stack displayed by the preloaded application, and the boundary coordinates of the preloaded stack are set outside the coordinate range of the display screen, to be preloaded
  • the application can be displayed on that Stack.
  • a new Stack dedicated to displaying preloaded applications can be created.
  • a new stack is created because the newly created preloaded stack can have its own size and visibility, thereby achieving the purpose of preloading outside the display screen.
  • the timing for creating the preloaded stack is not limited.
  • the preloaded stack is set to be resident by default before the mobile terminal leaves the factory, that is, the preloaded stack always exists; it can also be used when the mobile terminal is powered on or moved. It is created after the terminal is successfully unlocked; it can also be created after the application preload event is triggered (before the application to be preloaded is determined) and so on.
  • pre-loading an application interface corresponding to the application to be pre-loaded based on a pre-created pre-loaded active window stack includes: determining whether a pre-created pre-loaded active window stack exists; if not, then A preloaded active window stack is created according to a preset rule; an application interface corresponding to the application to be preloaded is preloaded based on the created preloaded active window stack.
  • the specific process of preloading the application interface corresponding to the application to be preloaded based on the preloaded stack is not limited, for example, the application interface may be drawn and displayed based on the size of the preloaded stack.
  • a task stack corresponding to the application to be preloaded is created in a pre-created preloaded active window stack, and the standby process is started in the task stack based on the target process.
  • the active window corresponding to the pre-loaded application draws and displays the application interface corresponding to the application to be pre-loaded based on the activated active window.
  • the method further includes: sending a fake focus notification to the application to be preloaded, and maintaining a continuous drawing of an application interface corresponding to the application to be preloaded for a preset period of time based on the fake focus notification. And display updates.
  • the advantage of this setting is that it can complete the drawing and display of the application interface when the application to be preloaded has the focus and is visible to the system, improving the completion of the preloading without affecting the focus of the foreground application.
  • the focus in the embodiments of the present application is also referred to as input focus, and the fake focus and the focus corresponding to the foreground application are independent of each other.
  • the focus is unique. For example, input operations such as touch only take effect on the focus.
  • the system and the application are consistent. Once the system changes the input focus information, it will Send information to the application that the input focus information has changed, this way to ensure that the system and application side input focus information is consistent.
  • the purpose of falsifying the focus on the application side is achieved by separating the system side and the application side from inputting focus information.
  • the focus notification for the preloaded application is forged, so that the preloaded application has focus information, but the focus information on the system side is still correct. Such processing can enable the preloaded application to draw normally and achieve the purpose of all loading.
  • the focus exists on the system side and the application side. It can be considered as the server and the client.
  • the system side records the application that has the focus, and the application side saves a flag to indicate whether it has focus.
  • the timing of falsifying the input focus may be that when the Android window system adds a new window and the focus needs to be updated, a fake focus notification is generated and sent.
  • the method of falsifying the focus may be a method of calling the client side of the window to change the focus of the window, so that the window acquires focus.
  • a fake focus notification can be sent based on the Binder mechanism.
  • the Binder mechanism is the most commonly used method for inter-process communication of the Android system, and adopts a c / s architecture, that is, a client / service architecture.
  • the preset time period may be designed according to actual conditions, for example, it may be within a fixed time range after starting preloading, or it may be a period from starting preloading to completing preloading, etc., which may be specifically included in the preloading strategy in.
  • the length of the preset time period includes a playing duration of starting an advertisement or starting an animation in the application to be preloaded.
  • some advertisements or animations are usually played.
  • the duration of advertisements or animations usually ranges from 3 seconds to more than ten seconds.
  • the user may not be able to perform any operation, only Can wait for the playback to finish, wasting valuable time of the user.
  • the advantage of this embodiment of the present application is that it can play the startup advertisement or startup animation off the screen before the application to be preloaded is launched.
  • the application to be preloaded When the application to be preloaded is launched, it can directly enter the main page of the application or other User-operable interface, which further advances the operable time point of the application to be preloaded, reducing waiting time.
  • the display mode of the display screen usually includes vertical screen display and horizontal screen display.
  • Many applications use vertical screen display by default, and Some applications display in the horizontal screen mode by default (such as some online games).
  • some applications also switch between the horizontal and vertical screen display as the user holds the mobile terminal.
  • 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 In the upper left corner of the display screen
  • H is the length of the long side of the display area of the display screen.
  • FIG. 2 is a schematic diagram of a relative position relationship between a preloaded active window stack and a display screen display area according to an embodiment of the present application. As shown in FIG.
  • FIG. 3 is a schematic diagram of a relative position relationship between another preloaded active window stack and a display screen display area according to an embodiment of the present application. As shown in FIG.
  • the display screen is in a landscape mode at this time
  • the origin of the mobile 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 Stack 202 are (H, 0, 2H, H), and H is the screen height, that is, the area within the solid rectangle on the left is the main screen display area, and the area within the rectangle on the right dashed line is the preload display. region.
  • the horizontal axis of the upper left corner is H, which is to prevent the display screen (also called the home screen) from being displayed on the pre-loaded application interface when the screen is horizontal, because the home screen has a horizontal screen mode in addition to the vertical screen mode.
  • the horizontal coordinate of the upper left corner of the rectangular area corresponding to the preloaded stack is set to the screen height.
  • the vertical coordinate of the upper left corner is 0, so that the preloaded application can correctly calculate the height of the status bar.
  • the Android application will customize the top status bar. If the corresponding vertical coordinate is not equal to 0, the height of the status bar may be wrong.
  • the size of the preloaded stack is set to (H, 0, 2H, H).
  • determining the to-be-loaded application included in the candidate application and the pre-loading strategy corresponding to the to-be-loaded application according to the startup probability includes: determining according to the startup probability
  • the application to be preloaded included in the candidate application program obtains current behavior state information of the user, and determines a preloading strategy corresponding to the application to be preloaded according to the current behavior state information and the startup probability.
  • the advantage of this setting is that the preloading strategy corresponding to the application to be preloaded can be determined more reasonably.
  • the behavior state information may include posture information of the user, information of one or more operations performed by the user on the mobile terminal, physiological state information of the user, and the like.
  • the user's behavior status information can be collected through the mobile terminal's own integrated sensors, etc., or it can be collected with other devices (such as wearable devices such as bracelets, watches, headphones, glasses, helmets and belts)
  • the user's behavior status information is sent to the mobile terminal.
  • the current behavior of the user may affect how the user uses the application. For example, for sports applications such as Keep, the application provides training videos, fitness articles, training plans, and diet recommendations.
  • the latest fitness articles and other related content may be preloaded without preloading the training video; when the user is currently relaxed based on the physiological state information At this time, it is predicted that the user may exercise immediately, so the training video recorded by the current user in the training plan may be preloaded. Then when the user starts the application, there is no need to wait for the video loading process and directly watch the video to start training.
  • content such as recommended songs from the server is generally displayed in the interface, such as popular song rankings or new song rankings.
  • obtaining the current behavior status information of the user may include: determining whether the application to be preloaded includes a preset application program, and if yes, obtaining the current behavior status information of the user. If not, the preloading strategy corresponding to the application to be preloaded can be directly determined according to the startup probability.
  • the advantage of this setting is that for some applications, the user's different behavior status information may not affect the way the application is used, so there is no need to set the preload policy of the application based on the behavior status, and it is not necessary to obtain User's current behavior status information saves mobile terminal power consumption.
  • the preset application may be pushed by the server to the mobile terminal, or may be determined according to the user's usage habits of historical collection, which is not limited in the embodiment of the present application.
  • the method further includes: upon receiving a running instruction of the target application that has performed the preloading operation, based on the preloaded The resource launches the target application.
  • the target application included in the preloading active window stack is The corresponding application interface is migrated to the display screen for display.
  • the migrating an application interface corresponding to the target application included in the preloaded active window stack to the display screen for display includes: The task stack corresponding to the target application is migrated to the top of the application active window stack, and the size information, configuration information, and visibility of the task stack are updated to implement the application interface corresponding to the target application on the display screen. display.
  • FIG. 4 is a schematic diagram of an application interface migration provided by an embodiment of the present application.
  • the target application program included in the active window stack is correspondingly loaded.
  • the application interface 401 is transferred to the display screen 201 for display.
  • the task to which the preloaded application interface belongs is migrated to the top of the application activity window Stack, and the size information, configuration information, and visibility of the task are updated, thereby The application interface can be displayed normally on the display screen.
  • FIG. 5 is a schematic flowchart of another application preloading method according to an embodiment of the present application. The method includes the following steps:
  • Step 501 When it is detected that an application preload event is triggered, a preset prediction model is used to predict a startup probability of a candidate application.
  • Step 502 Determine a preset number of candidate applications with a higher startup probability as the applications to be preloaded.
  • Step 503 Divide the application to be preloaded into a first-type application and a second-type application according to a startup probability.
  • the startup probability corresponding to the first type of application is greater than the startup probability corresponding to the second type of application.
  • the predicted applications to be preloaded include WeChat (startup probability 0.31), QQ (startup probability 0.23), Alipay (startup probability 0.21), and Baidu map (startup probability 0.2).
  • Two applications (ie WeChat and QQ) with higher launch probability are determined as the first type of applications; two applications with lower launch probability (ie, Alipay and Baidu Map) are determined as the second type of applications.
  • Step 504 Determine a first preloading strategy corresponding to the first type of application program and a second preloading strategy corresponding to the second type of application program, respectively.
  • determining the preloaded resources corresponding to the first type of application includes application process startup, application process initialization, application service startup, memory allocation, file content reading, network data acquisition, and interface rendering; determining the second type of application corresponding
  • the pre-loaded resources include application process startup, application process initialization, application service startup, memory allocation, and file content reading.
  • Step 505 Pre-load the first-type application according to the first pre-loading strategy in order from the highest starting probability, and pre-load the second-type application according to the second pre-loading strategy.
  • a preloading operation of interface rendering is involved.
  • an application interface corresponding to the first type of application program is drawn and displayed based on a pre-created preloaded active window stack.
  • the boundary coordinates corresponding to the preloaded active window stack are outside the coordinate range of the display screen.
  • the application interface may include a startup interface, a startup animation, or a predicted target interface that a user is about to open.
  • Step 506 When receiving a running instruction of the target application that has been preloaded, start the target application based on the preloaded resource.
  • a prediction model is used to predict several applications with a high probability that a user may use, and then determined according to the startup probability of these applications.
  • Corresponding preloading strategy preloading operation according to the preloading strategy corresponding to each application, can make more reasonable use of system resources, and when the application is actually started by the user, start the application based on the preloaded resources, Can effectively improve the startup speed of the application.
  • FIG. 6 is a schematic flowchart of another application preloading method according to an embodiment of the present application. The method includes:
  • Step 601 When a foreground application program change is detected, a preset prediction model is used to predict a startup probability of the candidate application program.
  • the triggering condition of the application preload event may be detecting a change in the foreground application program.
  • Step 602 Determine a candidate application whose startup probability is greater than a preset probability threshold as an application to be preloaded.
  • Step 603 Determine whether the application to be preloaded contains a preset application, and if yes, perform step 604; otherwise, perform step 606.
  • Step 604 Acquire the current behavior status information of the user.
  • Step 605 For a preset application included in the application to be preloaded, determine a corresponding preliminary preloading strategy according to the probability interval to which the corresponding startup probability belongs, and then modify the preliminary preloading strategy according to the current behavior state information; Load the remaining application programs other than the preset application program, determine the corresponding preloading strategy according to the probability interval to which the remaining application startup probability belongs, and execute step 607.
  • Step 606 For each application to be preloaded, determine a target probability interval to which the starting probability of the current application to be preloaded belongs, and determine the preloading strategy corresponding to the target probability interval as the preloading strategy corresponding to the current application to be preloaded. Go to step 607.
  • Step 607 Perform the preloading operation according to the preloading strategy corresponding to each application to be preloaded in order from the startup probability from high to low.
  • Step 608 When receiving a running instruction of the target application that has been preloaded, start the target application based on the preloaded resource.
  • the preloading strategy corresponding to the current application to be preloaded may be determined and the corresponding preloading operation may be performed in the order of the startup probability from high to low. For example, for the application to be preloaded with the highest startup probability, determine whether it belongs to a preset application. If so, determine the corresponding preloading strategy according to the startup probability and the current behavior state information, otherwise determine the corresponding preloading strategy based on the startup probability. , And then preload the preloaded application according to the determined preloading strategy. Then, for the application to be preloaded with the second highest startup probability, perform the similar operation described above. By analogy, the pre-loading strategy and pre-loading of the application to be pre-loaded are determined in order.
  • the advantage of this setting is that it saves time to determine the preloading strategy. If the user has chosen to open an application with a higher probability of launching within a short time after the preloading event is triggered, the preloading operation of the application can be guaranteed Has a high degree of completion to ensure the effect of preloading.
  • a prediction model is used to predict several applications with a high probability that the user may use, and the startup probability and the user's current behavior are combined
  • the state information determines the preloading strategy corresponding to each application, which can more reasonably determine the personalized preloading method of the application, thereby better utilizing system resources, and based on the preloaded application when the application is actually started by the user. Starting the application with resources can effectively improve the startup speed of the application.
  • FIG. 7 is a structural block diagram of an application preloading device according to an embodiment of the present application.
  • the device may be implemented by software and / or hardware, and is generally integrated in a mobile terminal.
  • the application program may be performed by executing an application preloading method. Preloading. As shown in Figure 7, the device includes:
  • the startup probability prediction module 701 is configured to predict a startup probability of a candidate application when an application preload event is detected to be triggered, where the startup probability includes a probability that the application is about to be opened;
  • An application determining module 702 configured to determine an application to be preloaded included in the candidate application according to the startup probability
  • the preloading module 704 is configured to perform a preloading operation on the preloaded application program according to the preloading policy.
  • the application preloading device provided in the embodiment of the present application predicts a startup probability of a candidate application when an application preloading event is triggered, determines an application to be preloaded and a corresponding preloading strategy according to the startup probability, and follows the preloading The policy treats the preloaded application accordingly.
  • a suitable preloading strategy can be selected according to the predicted startup probability of an application that needs to be preloaded, system resources can be reasonably used for preloading, and the preloading function can be improved.
  • the application determining module 702 is configured to:
  • the startup probabilities are arranged from high to low or from low to high, and a preset number of startup probabilities are sequentially obtained from a high startup probability, and a candidate application corresponding to the preset number of startup probabilities is determined as the candidate.
  • the application to be preloaded contained in the application.
  • the preloading policy determining module 703 is configured to:
  • the pre-loaded resources corresponding to the application to be pre-loaded are determined according to the startup probability of the application to be pre-loaded, where the higher the startup probability is, the more pre-loaded resources corresponding to the application to be pre-loaded.
  • the preloaded resources include resources related to at least one of an application process startup, application process initialization, application service startup, memory allocation, file content reading, network data acquisition, and interface rendering.
  • the preloading policy determining module 703 is configured to divide the to-be-loaded application into a first-type application and a second-type application according to a startup probability of the application to be pre-loaded;
  • the startup probability corresponding to the first type of application program is greater than the startup probability corresponding to the second type of application program;
  • preloaded resources corresponding to the first type of application include application process startup, application process initialization, application service startup, memory allocation, file content reading, network data acquisition, and interface rendering;
  • Determining the preloaded resources corresponding to the second type of application includes application process startup, application process initialization, application service startup, memory allocation, and file content reading.
  • the preload module 704 when performing a preload operation on the interface rendering, is configured to:
  • the application interface corresponding to the application to be preloaded is preloaded based on a pre-created preloaded active window stack, wherein the boundary coordinates corresponding to the preloaded active window stack are outside the coordinate range of the display screen.
  • the application determining module 702 is configured to determine, according to the startup probability, an application to be preloaded included in the candidate application;
  • the preloading policy determination module 703 is set to:
  • the device further includes:
  • the startup module is configured to, after performing a corresponding preload operation on the preloaded application program according to the preloading policy, and upon receiving a running instruction of the target application program that has performed the preload operation, start based on the preloaded resource.
  • the target application is configured to, after performing a corresponding preload operation on the preloaded application program according to the preloading policy, and upon receiving a running instruction of the target application program that has performed the preload operation, start based on the preloaded resource.
  • the application determining module 702 is configured to:
  • a candidate application whose startup probability is greater than a preset probability threshold is determined as the application to be preloaded.
  • the preloading policy determining module 703 is configured to:
  • Determining whether the application to be preloaded includes a preset application
  • the preset application is included in the application to be preloaded, obtaining current behavior status information of the user;
  • the preset application program is pushed by the server, or determined according to the user's usage habits collected in history.
  • the preloading policy determining module 703 is configured to:
  • the startup module is further configured to:
  • the interface rendering is performed during the preloading operation
  • the target included in the preloading active window stack is The application interface corresponding to the application is migrated to the display screen for display.
  • the startup module is configured to: migrate a task stack corresponding to the target application included in the preloaded active window stack to the top of an application active window stack, and update the size of the task stack Information, configuration information, and visibility to enable an application interface corresponding to the target application to be displayed on the display screen.
  • An embodiment of the present application further provides a storage medium including computer-executable instructions, where the computer-executable instructions are used to execute an application program preloading method when executed by a computer processor, the method includes:
  • the launch probability includes a probability that the application is about to be opened
  • Storage medium any one or more types of memory devices or storage devices.
  • storage media is intended to include: installation media such as Compact Disc Read-Only Memory (CD-ROM), floppy disks or magnetic tape devices; computer system memory or random access memory, such as dynamic random access memory Access Memory (Dynamic Random Access Memory, DRAM), Double Rate Random Access Memory (DDR Random Access Memory, DDR RAM), Static Random Access Memory (Static Random Access Memory, SRAM), and extended data output random storage Access Memory (Extended Data, Random-Access Memory, EDO, RAM), Rambus Random-Access Memory (Random-Access Memory, RAM), etc .; Non-volatile memory, such as flash memory, magnetic media (such as hard disk or Optical storage); registers or other similar types of memory elements, etc.
  • installation media such as Compact Disc Read-Only Memory (CD-ROM), floppy disks or magnetic tape devices
  • computer system memory or random access memory such as dynamic random access memory Access Memory (Dynamic Random Access Memory, DRAM), Double Rate Random Access Memory
  • the storage medium may further include other types of memory or a combination thereof.
  • 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 system, and the first computer system is configured to execute the program instructions.
  • the term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems connected through a network.
  • the storage medium may store program instructions (for example, embodied as a computer program) executable by one or more processors.
  • a storage medium including computer-executable instructions provided in the embodiments of the present application is not limited to the application preloading operation described above, and may also execute the application provided by any embodiment of the present application Related operations in the preload method.
  • FIG. 8 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
  • the mobile terminal 800 may include: a memory 801, a processor 802, and a computer program stored on the memory 801 and executable by the processor 802. When the processor 802 executes the computer program, the application according to the embodiment of the present application is implemented. Program preloading method.
  • the mobile terminal provided in the embodiment of the present application can select a suitable preloading strategy according to the predicted startup probability of the application to be preloaded, reasonably utilize system resources for preloading, and improve the preloading function.
  • FIG. 9 is a schematic structural diagram of another mobile terminal according to an embodiment of the present application.
  • the mobile terminal may include a housing (not shown), a memory 901, a central processing unit (CPU) 902 (and (Referred to as a processor), a circuit board (not shown in the figure), and a power supply circuit (not shown in the figure).
  • CPU central processing unit
  • FIG. 9 is a schematic structural diagram of another mobile terminal according to an embodiment of the present application.
  • the mobile terminal may include a housing (not shown), a memory 901, a central processing unit (CPU) 902 (and (Referred to as a processor), a circuit board (not shown in the figure), and a power supply circuit (not shown in the figure).
  • CPU central processing unit
  • the circuit board is disposed in a space surrounded by the housing; the CPU 902 and the memory 901 are provided on the circuit board; and the power supply circuit is provided as a plurality of circuits of the mobile terminal or The device supplies power; the memory 901 is configured to store executable program code; the CPU 902 reads the executable program code stored in the memory 901 to run a computer program corresponding to the executable program code to implement The following steps:
  • the launch probability includes a probability that the application is about to be opened
  • the mobile terminal further includes: a peripheral interface 903, a radio frequency (RF) circuit 905, an audio circuit 906, a speaker 911, a power management chip 908, an input / output (I / O) subsystem 909, Other input / control devices 910, touch screen 912, other input / control devices 910, and external ports 904, these components communicate through one or more communication buses or signal lines 907.
  • RF radio frequency
  • the illustrated mobile terminal 900 is only an example of a mobile terminal, and the mobile terminal 900 may have more or fewer components than those shown in the figure, and may combine two or more components. Or it can have different component configurations.
  • the one or more 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 mobile terminal uses a mobile phone as an example.
  • Memory 901 which can be accessed by CPU 902, peripheral interface 903, etc.
  • the memory 901 can include high-speed random access memory, and can also include non-volatile memory, such as one or more disk storage devices, flash memory Devices, or other volatile solid-state storage devices.
  • Peripheral interface 903 which can connect the input and output peripherals of the device to the CPU 902 and the memory 901.
  • the I / O subsystem 909 which can connect input / output peripherals on the device, such as touch screen 912 and other input / control devices 910, to 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. Among them, one or more input controllers 9092 receive electrical signals from or send electrical signals to other input / control devices 910.
  • Other input / control devices 910 may include physical buttons (press buttons, rocker buttons, etc.) ), Dial, slide switch, joystick, click wheel. It is worth noting that the input controller 9092 may be connected to any of the following: a keyboard, an infrared port, a universal serial bus (Universal Serial Bus, USB) interface, and a pointing device such as a mouse.
  • USB Universal Serial Bus
  • a touch screen 912 which is an input interface and an output interface between the user's mobile terminal and the user, and displays visual output to the user.
  • the visual output may include graphics, text, icons, videos, and the like.
  • the display controller 9091 in the I / O subsystem 909 receives an electric signal from the touch screen 912 or sends an electric signal 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 interaction with a user interface object displayed on the touch screen 912, that is, realizes human-computer interaction.
  • the user interface object displayed on the touch screen 912 may be running Icons for games, icons connected to the appropriate network, etc. It is worth noting that the device may also include a light mouse, which is a touch-sensitive surface that does not display visual output, or an extension of the touch-sensitive surface formed by a touch screen.
  • the RF circuit 905 is configured to establish communication between a mobile phone and a wireless network (that is, a network side), and realize data reception and transmission of the mobile phone and the wireless network. For example, send and receive text messages, e-mail, and so on.
  • the RF circuit 905 receives and sends RF signals.
  • the RF signals are also referred to as electromagnetic signals.
  • the RF circuit 905 converts electrical signals into electromagnetic signals or converts electromagnetic signals into electrical signals, and communicates with the communication network through the electromagnetic signals. As well as other devices.
  • RF circuit 905 may include known circuits for performing these functions, including, but not limited to, antenna systems, RF transceivers, one or more amplifiers, tuners, one or more oscillators, digital signal processors, codecs (COder-DECoder, CODEC) chipset, Subscriber Identity Module (SIM), and so on.
  • antenna systems including, but not limited to, antenna systems, RF transceivers, one or more amplifiers, tuners, one or more oscillators, digital signal processors, codecs (COder-DECoder, CODEC) chipset, Subscriber Identity Module (SIM), and so on.
  • CODEC codecs
  • SIM Subscriber Identity Module
  • the audio circuit 906 is configured to receive audio data from the peripheral interface 903, convert the audio data into an electrical signal, and send the electrical signal to the speaker 911.
  • the speaker 911 is configured to restore a voice signal received by the mobile phone from the wireless network through the RF circuit 905 to a sound and play the sound to a user.
  • the power management chip 908 is configured to provide power and power management for the hardware connected to the CPU 902, the I / O subsystem, and peripheral interfaces.
  • the application preloading device, storage medium, and mobile terminal provided in the foregoing embodiments can execute the application preloading method provided in any embodiment of the present application, and have corresponding function modules and effects for executing the method.
  • application preloading method provided in any embodiment of the present application.

Abstract

Disclosed is an application program preloading method, comprising: predicting starting probabilities of candidate application programs when it is detected that an application preloading event is triggered, the starting probabilities comprising probabilities that the application programs are about to be opened; determining, according to the starting probabilities, an application program to be preloaded included in the candidate application programs and a preloading policy corresponding to the application program to be preloaded; and performing, according to the preloading policy, a corresponding preloading operation on the application program to be preloaded. Also disclosed are an application program preloading apparatus, a storage medium, and a mobile terminal.

Description

应用程序预加载方法、装置、存储介质及移动终端Application program preloading method, device, storage medium and mobile terminal
本申请要求在2018年05月21日提交中国专利局、申请号为201810490618.9的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims priority from a Chinese patent application filed with the Chinese Patent Office on May 21, 2018, with application number 201810490618.9, the entire contents of which are incorporated herein by reference.
技术领域Technical field
本申请实施例涉及应用程序加载技术领域,例如涉及应用程序预加载方法、装置、存储介质及移动终端。The embodiments of the present application relate to the technical field of application program loading, for example, to a method, a device, a storage medium, and a mobile terminal for preloading an application program.
背景技术Background technique
目前,诸如智能手机、平板电脑、笔记本电脑以及智能家电等移动终端已成为人们日常生活中必不可少的电子设备。随着移动终端设备不断地智能化,多数移动终端设备中都装载有操作系统,使得移动终端设备能够安装丰富多样的应用程序,满足用户不同的需求。At present, mobile terminals such as smart phones, tablet computers, notebook computers, and smart home appliances have become essential electronic devices in people's daily lives. With the continuous intelligentization of mobile terminal devices, most mobile terminal devices are loaded with operating systems, so that mobile terminal devices can install a variety of applications to meet different needs of users.
随着移动终端设备的配置不断提升,多数移动终端设备中可以安装几十甚至上百个应用程序,而随着应用程序的功能日益丰富,应用程序运行时所需加载的资源也越来越多。当用户选择启动一个应用程序时,移动终端会对该应用程序启动所需的资源进行加载,待加载完毕后,进入应用程序的初始界面,整个过程通常要花费数秒甚至十几秒的时间,导致应用程序的启动效率较低,亟需改进。With the continuous improvement of the configuration of mobile terminal devices, dozens or even hundreds of applications can be installed in most mobile terminal devices. As the functions of applications become more and more abundant, more resources need to be loaded when the applications run. . When the user chooses to launch an application, the mobile terminal will load the resources required for the application to start. After loading, the initial interface of the application is entered. The entire process usually takes several seconds or even ten seconds, resulting in Application startup efficiency is low and needs to be improved.
发明内容Summary of the Invention
本申请实施例提供一种应用程序预加载方法、装置、存储介质及移动终端,可以优化应用程序的预加载方案。The embodiments of the present application provide a method, a device, a storage medium, and a mobile terminal for preloading an application program, which can optimize a preloading solution for the application program.
在一实施例中,本申请实施例提供了一种应用程序预加载方法,包括:In an embodiment, an embodiment of the present application provides a method for preloading an application program, including:
检测到应用预加载事件被触发时,预测候选应用程序的启动概率,所述启动概率包括应用程序即将被打开的概率;When it is detected that the application preload event is triggered, predicting the launch probability of the candidate application, the launch probability includes a probability that the application is about to be opened;
根据所述启动概率,确定所述候选应用程序中包含的待预加载应用程序以及所述待预加载应用程序对应的预加载策略;Determining, according to the startup probability, an application to be preloaded included in the candidate application and a preloading strategy corresponding to the application to be preloaded;
依照所述预加载策略对所述待预加载应用程序进行相应的预加载操作。Perform a corresponding preload operation on the application to be preloaded according to the preload policy.
在一实施例中,本申请实施例提供了一种应用程序预加载装置,包括:In an embodiment, an embodiment of the present application provides an application preloading device, including:
启动概率预测模块,设置为检测到应用预加载事件被触发时,预测候选应用程序的启动概率,所述启动概率包括应用程序即将被打开的概率;The startup probability prediction module is configured to predict a startup probability of a candidate application when an application preload event is triggered, where the startup probability includes a probability that the application is about to be opened;
应用确定模块,设置为根据所述启动概率确定所述候选应用程序中包含的待预加载应用程序;An application determining module configured to determine an application to be preloaded included in the candidate application according to the startup probability;
预加载策略确定模块,设置为根据所述启动概率确定所述待预加载应用程序对应的预加载策略;A preloading policy determining module, configured to determine a preloading policy corresponding to the application to be preloaded according to the startup probability;
预加载模块,设置为依照所述预加载策略对待预加载应用程序进行预加载操作。The preloading module is configured to perform a preloading operation on the preloaded application program according to the preloading policy.
在一实施例中,本申请实施例提供了一种计算机可读存储介质,该存储介质上存储有计算机程序,该计算机程序被处理器执行时实现如本申请实施例所述的应用程序预加载方法。In an embodiment, a computer-readable storage medium is provided in an embodiment of the present application. The storage medium stores a computer program, and when the computer program is executed by a processor, the application program according to the embodiment of the present application is preloaded. method.
在一实施例中,本申请实施例提供了一种移动终端,包括存储器,处理器及存储在存储器上并可在处理器运行的计算机程序,所述处理器执行所述计算机程序时实现如本申请实施例所述的应用程序预加载方法。In an embodiment, an embodiment of the present application provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and executable by the processor. When the processor executes the computer program, the processor implements the present invention. The application preloading method described in the embodiment of the application.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请实施例提供的一种应用程序预加载方法的流程示意图;FIG. 1 is a schematic flowchart of an application preloading method according to an embodiment of the present application; FIG.
图2为本申请实施例提供的一种预加载活动窗口堆栈与显示屏幕显示区域的相对位置关系示意图;2 is a schematic diagram of a relative position relationship between a preloaded active window stack and a display screen display area according to an embodiment of the present application;
图3为本申请实施例提供的另一种预加载活动窗口堆栈与显示屏幕显示区域的相对位置关系示意图;3 is a schematic diagram of a relative position relationship between another preloaded active window stack and a display screen display area according to an embodiment of the present application;
图4为本申请实施例提供的一种应用界面迁移示意图;4 is a schematic diagram of application interface migration provided by an embodiment of the present application;
图5为本申请实施例提供的另一种应用程序预加载方法的流程示意图;5 is a schematic flowchart of another application preloading method according to an embodiment of the present application;
图6为本申请实施例提供的又一种应用程序预加载方法的流程示意图;6 is a schematic flowchart of another application preloading method according to an embodiment of the present application;
图7为本申请实施例提供的一种应用程序预加载装置的结构框图;FIG. 7 is a structural block diagram of an application preloading device according to an embodiment of the present application; FIG.
图8为本申请实施例提供的一种移动终端的结构示意图;8 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application;
图9为本申请实施例提供的另一种移动终端的结构示意图。FIG. 9 is a schematic structural diagram of another mobile terminal according to an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图并通过实施方式来说明本申请的技术方案。可以理解的是,此处所描述的实施例仅仅用于解释本申请,而非对本申请的限定。为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。The technical solution of the present application will be described below with reference to the drawings and embodiments. It can be understood that the embodiments described herein are only used to explain the present application, rather than limiting the present application. For ease of description, only some, but not all, structures related to the present application are shown in the drawings.
在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将多个步骤描述成顺序的处理,但是其中的许多步骤可以被并行地、并发地或者同时实施。此外,一个或多个步骤的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although flowcharts describe multiple steps as sequential processing, many of these steps can be performed in parallel, concurrently, or simultaneously. In addition, the order of one or more steps may be rearranged. The process may be terminated when its operation is completed, but may also have additional steps not included in the drawings. The processing may correspond to methods, functions, procedures, subroutines, subroutines, and so on.
图1为本申请实施例提供的一种应用程序预加载方法的流程示意图,该方法可以由应用程序预加载装置执行,其中该装置可由软件和/或硬件实现,一般可集成在移动终端中。如图1所示,该方法包括:FIG. 1 is a schematic flowchart of an application preloading method according to an embodiment of the present application. The method may be executed by an application preloading device, where the device may be implemented by software and / or hardware, and may generally be integrated in a mobile terminal. As shown in Figure 1, the method includes:
步骤110、检测到应用预加载事件被触发时,预测候选应用程序的启动概率。Step 110: When it is detected that an application preloading event is triggered, predicting a startup probability of the candidate application program.
其中,所述启动概率包括应用程序即将被打开的概率。The startup probability includes a probability that an application program is about to be opened.
示例性的,本申请实施例中的移动终端可包括手机、平板电脑、笔记本电脑以及智能家电等移动终端设备。移动终端中装载有操作系统。Exemplarily, the mobile terminal in the embodiment of the present application may include a mobile terminal device such as a mobile phone, a tablet computer, a notebook computer, and a smart home appliance. The mobile terminal is loaded with an operating system.
示例性的,应用预加载事件的触发条件可以根据实际情况设置,本申请实施例不作具体限定。例如,可以在检测到用户的动作满足预设条件(如拿起移动终端、输入屏幕解锁操作或输入移动终端解锁操作等)时,触发应用预加载事件;或者可以在检测到前台应用程序发生变更时,触发应用预加载事件;或者可以在预加载应用的预测流程结束后,立即(或经过预设时长后)触发应用预加载事件;或者可以定时间隔触发等等。当应用预加载事件被触发 后,系统可以通过读取标志位或接收触发指令等方式检测到应用预加载事件已被触发,具体的检测方式本申请实施例也不做限定。Exemplarily, the triggering condition of the application preload event can be set according to the actual situation, which is not specifically limited in the embodiment of the present application. For example, an application preload event can be triggered when it is detected that the user's action meets a preset condition (such as picking up a mobile terminal, entering a screen unlock operation, or entering a mobile terminal unlock operation, etc.); or it can detect a change in the foreground application , The application preload event is triggered; or the application preload event may be triggered immediately (or after a preset period of time has elapsed) after the prediction process of the preloaded application ends; or it may be triggered at regular intervals and so on. After the application preload event is triggered, the system can detect that the application preload event has been triggered by reading a flag bit or receiving a trigger instruction, and the specific detection method is not limited in this embodiment of the present application.
本申请实施例中,候选应用程序可包括移动终端中安装的所有应用程序,也可包括部分应用程序。部分应用程序可包括用户经常使用的应用程序,也可包括第三方应用程序,也就是说,部分应用程序可以不包含用户很少使用的应用程序,也可以不包含系统应用程序。本申请实施例对候选应用程序的确定方式以及数量不做限定。在一实施例中,可根据当前时刻之前的预设时段内一个或多个应用程序的使用次数和/或使用时长确定候选应用程序,预设时段例如是1个月,当使用次数和/或使用时长超过相应的阈值时,将所对应的应用程序确定为候选应用程序,或者,按照使用次数和/或使用时长对多个应用程序进行排序,将排名靠前的应用程序确定为候选应用程序。In the embodiment of the present application, the candidate application programs may include all application programs installed in the mobile terminal, and may also include some application programs. Some applications may include applications that are frequently used by users, and may also include third-party applications, that is, some applications may not include applications that are rarely used by users, or may not include system applications. This embodiment of the present application does not limit the manner and quantity of candidate application programs. In an embodiment, the candidate application can be determined according to the number of times and / or the use time of one or more applications in a preset period before the current time. The preset period is, for example, 1 month, when the number of uses and / or When the usage time exceeds the corresponding threshold, the corresponding application is determined as a candidate application, or multiple applications are sorted according to the number of uses and / or the length of use, and the top-ranked application is determined as a candidate application .
本申请实施例中,所述启动概率包括应用程序即将被打开的概率。其中,即将被打开的应用程序可理解为在当前应用程序结束运行后,下一个启动的应用程序,而启动概率可用于表征一个应用程序成为下一个启动的应用程序的可能性的高低。In the embodiment of the present application, the startup probability includes a probability that an application program is about to be opened. Among them, the application to be opened can be understood as the application to be started next after the current application ends, and the startup probability can be used to characterize the possibility of an application becoming the next to be started.
在一实施例中,可采用预测模型来对候选应用程序的启动概率进行预测。该预测模型可以是机器学习模型,所采用的算法可以包括循环神经网络(Recurrent neural networks,RNN)、长短期记忆(Long Short-Term Memory,LSTM)网络、门限循环单元、简单循环单元、自动编码器、决策树、随机森林、特征均值分类、分类回归树、隐马尔科夫、K最近邻(k-NearestNeighbor,KNN)算法、逻辑回归模型、贝叶斯模型、高斯模型以及KL散度(Kullback–Leibler divergence)等等。例如,按照预测模型训练时的训练样本,采集当前样本,将当前样本输入至预测模型中,得到即将启动的应用程序及其对应的启动概率。In one embodiment, a prediction model may be used to predict the launch probability of the candidate application. The prediction model can be a machine learning model, and the algorithms used can include Recurrent Neural Networks (RNN), Long Short-Term Memory (LSTM) networks, threshold recurrent units, simple recurrent units, automatic encoding , Decision tree, random forest, feature mean classification, classification regression tree, hidden Markov, K-NearestNeighbor (KNN) algorithm, logistic regression model, Bayesian model, Gaussian model, and KL divergence (Kullback – Leibler divergence) and so on. For example, according to the training samples during prediction model training, current samples are collected, and the current samples are input into the prediction model to obtain the application to be launched and its corresponding launch probability.
在一实施例中,可在用户使用移动终端的过程中,采集训练样本,采用训练样本对预设初始模型进行训练,最终得到用于候选应用程序启动概率的预测模型。示例性的,训练样本中包含的元素可包括应用程序被打开的时间序列或次序序列;可包括应用程序被打开的时间、地点以及频次等;可包括移动终端的运行状态,如移动数据网络的开关状态、无线热点的连接状态、所连接的无线热点的身份信息、当前运行的应用程序、上一个前景应用程序、当前应用程序在后台停留的时长、当前应用程序最近一次被切换至后台的时间、耳机插孔的插拔状态、充电状态、电池电量信息以及屏幕显示时长等等;还可包括移动终端中集成的传感器采集到的数据,如运动传感器、光线传感器、温度传感器以及湿度传感器等等。In one embodiment, during the process of using the mobile terminal by the user, training samples can be collected, the training samples can be used to train the preset initial model, and finally a prediction model for the startup probability of the candidate application can be obtained. Exemplarily, the elements included in the training sample may include a time series or an order sequence in which the application is opened; may include the time, place, and frequency of the application being opened; and may include the running status of the mobile terminal, such as the mobile data network Switch status, wireless hotspot connection status, identity information of the connected wireless hotspot, currently running application, previous foreground application, the length of time the current application stays in the background, and the time when the current application was last switched to the background , Plugging and unplugging status, charging status, battery power information, and screen display duration of the headphone jack; it can also include data collected by sensors integrated in the mobile terminal, such as motion sensors, light sensors, temperature sensors, and humidity sensors, etc. .
示例性的,可根据所选用的机器学习模型选择合适的样本元素,也可根据所选的样本元素确定所选用的机器学习模型,还可结合对预测准确度以及预测速度等方面的需求进行模型及样本元素的选择等,本申请实施例不做限定。For example, the appropriate sample elements can be selected according to the selected machine learning model, and the selected machine learning model can be determined according to the selected sample elements. The model can also be combined with the needs for prediction accuracy and prediction speed. And the selection of sample elements are not limited in the embodiments of the present application.
步骤120、根据所述启动概率,确定所述候选应用程序中包含的待预加载应用程序以及所述待预加载应用程序对应的预加载策略。Step 120: Determine, according to the startup probability, an application to be preloaded included in the candidate application and a preloading strategy corresponding to the application to be preloaded.
示例性的,待预加载应用程序可以理解为用户可能即将打开的应用程序,待预加载的应用程序可以包括一个或多个。可将启动概率大于预设概率阈值的候选应用程序确定为待预加载应用程序;也可将启动概率较高的预设数值个候选应用程序确定为待预加载应用程序。其中,预设概率阈值或预设数值可自由设置,例如预设概率阈值可以是0.2,预设数值可以是4。Exemplarily, the applications to be preloaded may be understood as applications that the user may be about to open, and the applications to be preloaded may include one or more. A candidate application with a startup probability greater than a preset probability threshold may be determined as an application to be preloaded; a preset number of candidate applications with a higher startup probability may be determined as the application to be preloaded. The preset probability threshold or preset value can be set freely. For example, the preset probability threshold can be 0.2 and the preset value can be 4.
可以理解的是,一个待预加载应用程序对应的启动概率越大,那么该待预加载应用程序即将启动的可能性越高。本申请实施例中,可以根据启动概率的大小,来为不同的待预加载应用程序分别设置对应的预加载策略。当然,当待预加载应用程序只有一个时,也可以根据其对应的启动概率设置其对应的预加载策略。It can be understood that the larger the startup probability corresponding to an application to be preloaded, the higher the probability that the application to be preloaded will be started soon. In the embodiment of the present application, corresponding preloading policies may be set for different applications to be preloaded according to the size of the startup probability. Of course, when there is only one application to be preloaded, its corresponding preloading strategy can also be set according to its corresponding startup probability.
示例性的,可以预先设置多种预加载策略,每两种预加载策略之间的差别可以体现在预 加载资源的类型、预加载资源的数量、预加载操作的完成度、进行预加载操作的时长以及进行预加载操作的顺序等方面中的任意一种或多种,可与应用程序的启动方式以及移动终端装载的操作系统等有关,本申请实施例不做限定。示例性的,预加载资源可包括应用进程启动、应用进程初始化、应用服务启动、内存分配、文件内容读取、网络数据获取和界面渲染中的至少一项操作的相关资源。一般的,应用进程启动及初始化通常是应用启动时最先进行的操作,因此,本申请实施例中,多个预加载策略可均包括应用进程启动及初始化,其他预加载策略还可包括后续至少一项,如还包括应用服务启动,应用服务启动和内存分配,应用服务启动、内存分配和文件内容读取,应用服务启动、内存分配、文件内容读取和网络数据获取,或应用服务启动、内存分配、文件内容读取、网络数据获取和界面渲染等。此外,对于界面渲染(界面绘制,或界面绘制并显示)来说还可划分更多的层次,例如渲染的界面的数量或界面渲染的形式等等。界面渲染中的界面可包括应用程序的启动界面、启动动画或应用内部一个或多个功能对应的界面等。此外,预加载资源还可包括应用程序在运行过程中可能会涉及到的资源,如网络视频数据、音频数据以及应用程序补丁安装包等等。例如,以应用程序补丁安装包为例,有些应用程序(如一些游戏应用)可能会不定时更新,若未安装补丁可能无法使用,对于这类应用程序,若预测出其启动概率较高,且存在补丁,则可在预加载阶段对应用程序补丁安装包进行下载,甚至安装,这样,用户在真正启动这类应用程序时,就不用等待补丁安装的过程,可直接正常使用应用程序。For example, multiple preloading strategies can be set in advance, and the difference between each two preloading strategies can be reflected in the type of preloaded resources, the number of preloaded resources, the completion of the preload operation, and the Any one or more of the time duration and the order of performing the preload operation may be related to the startup method of the application and the operating system loaded on the mobile terminal, which are not limited in the embodiments of the present application. Exemplarily, the pre-loaded resources may include resources related to at least one of an application process startup, application process initialization, application service startup, memory allocation, file content reading, network data acquisition, and interface rendering. Generally, application process startup and initialization are usually the first operations performed when an application is started. Therefore, in the embodiment of the present application, multiple preloading strategies may include application process startup and initialization. Other preloading strategies may also include subsequent at least One item, such as also including application service startup, application service startup and memory allocation, application service startup, memory allocation and file content reading, application service startup, memory allocation, file content reading and network data acquisition, or application service startup, Memory allocation, file content reading, network data acquisition and interface rendering. In addition, for interface rendering (interface drawing, or interface drawing and display), more levels can be divided, such as the number of interfaces to be rendered or the form of interface rendering, and so on. The interface in the interface rendering may include a startup interface of an application, a startup animation, or an interface corresponding to one or more functions inside the application, and the like. In addition, the pre-loaded resources may also include resources that may be involved in the running process of the application, such as network video data, audio data, and application patch installation packages. For example, taking an application patch installation package as an example, some applications (such as some game applications) may be updated from time to time, and may not be available if the patch is not installed. For such applications, if the probability of their activation is predicted to be high, and If there is a patch, the application patch installation package can be downloaded or even installed in the pre-loading stage. In this way, when the user actually starts this kind of application, he / she does not need to wait for the patch installation process and can directly use the application.
在一实施例中,若将启动概率大于预设概率阈值的候选应用程序确定为待预加载应用程序,那么可在预设概率阈值和1之间进行区间划分,所划分的区间数量本申请实施例不做限定。预设概率阈值可记为f,那么待预加载应用程序的启动概率会出现在f至1之间,预先将f至1进行区间划分,以划分三个概率区间为例,如第一概率区间为(f,m],第二概率区间为(m,n],第三概率区间为(n,1]。随后,可为每个概率区间预先设置对应的预加载策略,例如第一概率区间对应第一预加载策略,第二概率区间对应第二预加载策略,第三概率区间对应第三预加载策略。对于当前待预加载应用程序来说,判断其对应的启动概率落入哪个概率区间内,则将该概率区间对应的预加载策略确定为当前待预加载应用程序对应的预加载策略。In an embodiment, if a candidate application whose startup probability is greater than a preset probability threshold is determined as an application to be preloaded, interval division may be performed between the preset probability threshold and 1, and the number of divided intervals is implemented in this application. Examples are not limited. The preset probability threshold can be recorded as f, then the startup probability of the application to be preloaded will appear between f to 1, and f to 1 will be divided into intervals in advance. Take three probability intervals as an example, such as the first probability interval Is (f, m), the second probability interval is (m, n), and the third probability interval is (n, 1). Then, a corresponding preloading strategy can be set in advance for each probability interval, such as the first probability interval Corresponds to the first preloading strategy, the second probability interval corresponds to the second preloading strategy, and the third probability interval corresponds to the third preloading strategy. For the current application to be preloaded, determine which probability interval the corresponding startup probability falls into. The preloading strategy corresponding to the probability interval is determined as the preloading strategy corresponding to the application to be preloaded.
在一实施例中,将启动概率较高的预设数值个候选应用程序确定为待预加载应用程序,那么预设数值是可以确定的,可以按照至少一个待预加载应用程序之间的启动概率的大小关系来确定对应的预加载策略。假设预设数值记为N,那么待预加载应用程序为N个,可对N进行基于数量的区间划分,可以将待预加载应用程序按照启动概率由高到低(当然也可以是由低到高,本申请不做限定)的顺序进行排序,序号1至M为第一数量区间,序号M+1至L为第二数量区间,序号L+1至N为第三数量区间。随后,可为每个数量区间预先设置对应的预加载策略,例如第一数量区间对应第一预加载策略,第二数量区间对应第二预加载策略,第三数量区间对应第三预加载策略。对于当前待预加载应用程序来说,判断其对应的启动概率的序号落入哪个数量区间内,则将该数量区间对应的预加载策略确定为当前待预加载应用程序对应的预加载策略。In an embodiment, a preset number of candidate applications with a higher startup probability are determined as the applications to be preloaded, and then the preset value can be determined, and the startup probability between at least one application to be preloaded can be determined. Size relationship to determine the corresponding preload strategy. Assuming that the preset value is recorded as N, then there are N applications to be preloaded, and N can be divided based on the number of intervals. The applications to be preloaded can be started from high to low according to the startup probability (of course, it can also be low to High, this application is not limited). The sequence numbers 1 to M are the first quantity interval, the sequence numbers M + 1 to L are the second quantity interval, and the sequence numbers L + 1 to N are the third quantity interval. Subsequently, a corresponding preloading strategy can be set in advance for each quantity interval, for example, the first quantity interval corresponds to the first preloading strategy, the second quantity interval corresponds to the second preloading strategy, and the third quantity interval corresponds to the third preloading strategy. For the current application to be preloaded, to determine in which quantity interval the sequence number of the corresponding startup probability falls, then determine the preloading strategy corresponding to the quantity interval as the current preloading strategy corresponding to the application to be preloaded.
一般的,启动概率高,说明用户更有可能选择该应用程序,在进行预加载策略设置时,可使启动概率较高的待预加载应用程序优先被预加载,或设置更多的预加载资源类型,或设置更多的预加载资源数量,或保证更高的预加载操作完成度,或设置更长的进行预加载操作的时长等等。Generally, the high probability of startup indicates that the user is more likely to choose the application. When setting the preload policy, the application to be preloaded with a higher probability of startup can be preferentially preloaded, or more preload resources can be set Type, or set a greater number of preload resources, or ensure a higher degree of completion of the preload operation, or set a longer time for the preload operation, and so on.
步骤130、依照所述预加载策略对所述待预加载应用程序进行相应的预加载操作。Step 130: Perform a corresponding preloading operation on the application to be preloaded according to the preloading policy.
本申请实施例中,当待预加载应用程序仅有一个时,无需考虑应用的预加载顺序;而当待预加载的应用程序有多个时,可将多个待预加载应用程序逐一确定为当前待预加载应用程 序,并依次进行第一预加载操作,也可将2个以上待预加载应用程序确定为当前待预加载应用程序,并同时进行第一预加载操作,也就是说多个应用程序的第一预加载操作可以是并行进行的。此外,当预加载策略中包含进行预加载操作的顺序时,按照预加载策略中规定的顺序进行预加载操作。In the embodiment of the present application, when there is only one application to be preloaded, there is no need to consider the preloading order of the applications; and when there are multiple applications to be preloaded, the multiple applications to be preloaded may be determined one by one as The current application to be preloaded and the first preload operation is performed in sequence, or more than 2 applications to be preloaded may be determined as the current to be preloaded application and the first preload operation is performed simultaneously, that is, multiple The first preload operation of the application may be performed in parallel. In addition, when the preloading strategy includes the order of performing the preloading operation, the preloading operation is performed in the order specified in the preloading strategy.
本申请实施例中提供的应用程序预加载方法,检测到应用预加载事件被触发时,预测候选应用程序的启动概率,根据启动概率确定待预加载应用程序以及对应的预加载策略,依照预加载策略对待预加载应用程序进行相应的预加载操作。通过采用上述技术方案,可以根据预测出来的需要进行预加载的应用程序的启动概率的不同,来选择合适的预加载策略,合理利用系统资源进行预加载,完善预加载功能。The application preloading method provided in the embodiment of the present application predicts a startup probability of a candidate application when an application preloading event is triggered, determines an application to be preloaded and a corresponding preloading strategy according to the startup probability, and follows the preloading The policy treats the preloaded application accordingly. By adopting the above technical solution, a suitable preloading strategy can be selected according to the predicted startup probability of an application that needs to be preloaded, system resources can be reasonably used for preloading, and the preloading function can be improved.
在一些实施例中,所述根据所述启动概率,确定所述候选应用程序中包含的待预加载应用程序以及所述待预加载应用程序对应的预加载策略,包括:将启动概率由高到低排列或由低到高排列,并从高的启动概率开始顺序获取预设数值个启动概率,将所述预设数值个启动概率对应的候选应用程序确定为所述候选应用程序中包含的待预加载应用程序;根据待预加载应用程序的启动概率确定所述待预加载应用程序对应的预加载资源,其中,启动概率越高的待预加载应用程序对应的预加载资源越多。这样设置的好处在于,能够对待预加载应用程序的数量进行控制,可避免数量过少而导致预测命中率低,又能避免数量过多而对系统整体运行性能造成负担,浪费系统资源。启动概率越高的待预加载应用程序被用户真正启动的概率越大,可以预加载更多的资源,有效提高其在真正启动时的速度,而启动概率稍低的待预加载应用程序,可以预加载少一些的资源,能够节省系统资源,同时在其真正启动时也能够提升启动速度。In some embodiments, determining the to-be-loaded application included in the candidate application and the pre-loading strategy corresponding to the to-be-loaded application according to the startup probability includes: changing the startup probability from high to Low-rank or low-to-high ranking, and sequentially obtain a preset number of starting probabilities from a high starting probability, and determine a candidate application corresponding to the preset number of starting probabilities as a pending application included in the candidate application. Pre-loading the application program; determining the pre-loading resource corresponding to the application to be pre-loaded according to the startup probability of the application to be pre-loaded, where the higher the startup probability is, the more pre-loading resources corresponding to the application to be pre-loaded. The advantage of this setting is that it can control the number of pre-loaded applications, which can prevent the number of pre-loads from being too small and cause a low prediction hit rate. It can also prevent the number of applications from burdening the overall system performance and wasting system resources. The higher the probability of startup, the higher the probability that the application to be preloaded is actually started by the user, more resources can be preloaded, and the speed at which it is actually started is effectively improved, while the application to be preloaded with a lower startup probability, can be Pre-loading fewer resources can save system resources, and at the same time, it can increase the startup speed when it is actually started.
在一些实施例中,所述根据待预加载应用程序的启动概率确定所述待预加载应用程序对应的预加载资源,包括:根据待预加载应用程序的启动概率将所述待预加载应用程序划分为第一类应用程序和第二类应用程序,其中,所述第一类应用程序对应的启动概率大于所述第二类应用程序对应的启动概率。确定第一类应用程序对应的预加载资源包括应用进程启动、应用进程初始化、应用服务启动、内存分配、文件内容读取、网络数据获取和界面渲染;确定第二类应用程序对应的预加载资源包括应用进程启动、应用进程初始化、应用服务启动、内存分配和文件内容读取。这样设置的好处在于,能够更加合理地确定启动概率不同的待预加载应用程序对应的预加载资源,对于网络数据获取和界面渲染来说,可能预加载过程中所需系统资源较多,耗时较长,所以对于启动概率相对较低的应用程序来说,可以不进行这部分的预加载,这样可以节约终端存储空间等资源,并预加载更多的应用程序,提高预测命中率。In some embodiments, determining the preloaded resource corresponding to the application to be preloaded according to the startup probability of the application to be preloaded includes: dividing the application to be preloaded according to the startup probability of the application to be preloaded. It is divided into a first type of application and a second type of application, wherein the startup probability corresponding to the first type of application is greater than the startup probability corresponding to the second type of application. Determine the preloaded resources corresponding to the first type of application, including application process startup, application process initialization, application service startup, memory allocation, file content reading, network data acquisition, and interface rendering; determine the preloaded resources corresponding to the second type of application Including application process startup, application process initialization, application service startup, memory allocation, and file content reading. The advantage of this setting is that it can more reasonably determine the preload resources corresponding to the applications to be preloaded with different startup probabilities. For network data acquisition and interface rendering, it may require more system resources during the preload process and consume time. It is longer, so for applications with relatively low startup probability, this part of preloading can be omitted, which can save resources such as terminal storage space, and preload more applications, and improve the prediction hit rate.
在一些实施例中,当针对所述界面渲染进行预加载操作时,包括:基于预先创建的预加载活动窗口堆栈预加载所述待预加载应用程序对应的应用界面,其中,所述预加载活动窗口堆栈对应的边界坐标位于显示屏幕的坐标范围之外。这样设置的好处在于,对应用界面进行预加载,能够较大程度地完成应用启动前的准备工作,提升待预加载应用程序的启动速度,且不会影响到前台应用程序的显示内容在显示屏幕上的显示。In some embodiments, when performing a preload operation for the interface rendering, the method includes: preloading an application interface corresponding to the application to be preloaded based on a pre-created preloading active window stack, wherein the preloading activity The boundary coordinates corresponding to the window stack are outside the coordinate range of the display screen. The advantage of this setting is that pre-loading the application interface can greatly complete the preparation work before the application is started, and improve the startup speed of the application to be pre-loaded without affecting the display content of the foreground application on the display screen. On the display.
本申请实施例中,活动窗口可理解为一个独立的直接面向用户提供交互和操作的界面,在不同的操作系统中可能采用不同的名词来命名该界面。为了便于理解,下面以安卓(Android)操作系统为例进行下面的说明。In the embodiment of the present application, the active window may be understood as an independent interface that directly provides users with interaction and operation, and different terms may be used to name the interface in different operating systems. In order to facilitate understanding, the following description is made by taking an Android operating system as an example.
在Android系统中,活动窗口被称为Activity。Activity是一个负责与用户交互的组件,其提供一个屏幕(可以理解为屏幕界面,而非实体的显示屏幕),以供用户交互完成某项任务。在一个android应用程序中,一个Activity通常就是一个单独的屏幕,它上面可以显示一些控件也可以监听并处理用户的事件。在对Activity进行管理中,有这样两个概念:任务栈 (Task)和活动窗口堆栈(Stack)。Task对应一个应用程序,Task设置为存放Activity,一个Task中可以存放一个或多个Activity,且这些Activity遵循―先进后出,后进先出‖的原则。而Stack设置为对Task进行管理,通常,一个Stack对一个屏幕所需展示的一个或多个Activity所属的Task进行管理,一个Stack可以管理一个或多个Task,当然,Stack也同样遵循堆栈的基本管理原则。这里所述的屏幕并不一定是完整独立的显示屏,以“两个屏幕”为例,这两个屏幕可能只是一个完整显示屏中两个独立显示各自显示内容的区域。当然,如果移动终端具备两个甚至是两个以上的独立显示屏,则“两个屏幕”也可以是两个独立的显示屏。In the Android system, the active window is called Activity. Activity is a component responsible for interacting with the user. It provides a screen (which can be understood as a screen interface instead of a physical display screen) for the user to interactively complete a certain task. In an android application, an Activity is usually a separate screen, which can display some controls or listen to and handle user events. In the management of Activity, there are two concepts: Task stack (Task) and activity window stack (Stack). Task corresponds to an application. Task is set to store Activity. One Task can store one or more Activities, and these Activities follow the principle of "first in, first out, last in, first out". The Stack is set to manage Tasks. Generally, a Stack manages the Tasks belonging to one or more Activities that need to be displayed on a screen. A Stack can manage one or more Tasks. Of course, the Stack also follows the basics of the Stack. Management principles. The screens described here are not necessarily complete and independent display screens. Taking "two screens" as an example, these two screens may be just two areas in a complete display screen that independently display their respective display contents. Of course, if the mobile terminal has two or more independent display screens, the "two screens" may also be two independent display screens.
在Android系统中,支持多窗口模式,可包括分屏模式、画中画模式以及自由模式(FreeForm)。在多窗口模式下,应用程序所在的Stack可以有自己的尺寸(size),可以包括以移动终端屏幕左上角为原点的坐标系中的上下左右坐标。例如,(a,b,c,d),一般描述的是一个矩形的边界,可采用矩形左上角的坐标和右下角的坐标进行表示,即矩形的左上角坐标为(a,b),右下角坐标为(c,d),这样的矩形区域就对应Stack的size。Stack中的应用内布局是以Stack的size为准的,也就是说Activity对应的应用界面是在size的边界范围内进行显示的。In the Android system, multi-window mode is supported, which can include split-screen mode, picture-in-picture mode, and FreeForm. In the multi-window mode, the stack where the application is located may have its own size, which may include the upper, lower, left, and right coordinates in a coordinate system with the upper left corner of the mobile terminal screen as the origin. For example, (a, b, c, d) generally describes a rectangular boundary, which can be expressed by the coordinates of the upper left corner and the lower right corner of the rectangle, that is, the upper left corner of the rectangle is (a, b), right The lower corner coordinate is (c, d), and such a rectangular area corresponds to the size of the Stack. The layout of the application in the stack is based on the size of the stack, which means that the application interface corresponding to the activity is displayed within the boundary of the size.
在多窗口模式下,可以允许多个应用程序处于可见状态,包括系统和用户均可见和仅系统可见。系统和用户均可见指的是在显示屏幕上进行显示,且用户能够看到;仅系统可见指的是操作系统可见,而用户不可见,可能被前台的应用遮挡或者如本申请所要实现的在显示屏幕外显示。In multi-window mode, you can allow multiple applications to be visible, including both system and user visible and system only visible. Both visible to the system and the user means to be displayed on the display screen and can be seen by the user; only visible to the system means that the operating system is visible and the user is not visible, which may be obscured by the application in the foreground or as implemented in this application Show off screen.
本申请实施例中,在显示屏幕外对待预加载应用程序的应用界面进行预加载,可以基于操作系统的多窗口机制来实现,通过多窗口机制将应用程序对应的size设在显示屏幕外而达到对用户不可见的目的,从而不会影响到前台应用程序的显示内容在显示屏幕上的显示。In the embodiment of the present application, pre-loading the application interface of the application to be pre-loaded outside the display screen can be implemented based on the multi-window mechanism of the operating system, and the size corresponding to the application program is set outside the display screen through the multi-window mechanism to achieve For the purpose of being invisible to the user, so that the display content of the foreground application is not displayed on the display screen.
一般的,多窗口模式下,可以存在多种类型的Stack,如Home Stack表示桌面应用显示的Stack,App Stack表示第三方应用显示,还可以有其他分屏Stack等。本申请实施例中,新增了预加载活动窗口堆栈(预加载Stack),设置为表示预加载应用显示的Stack,并设置预加载Stack的边界坐标位于显示屏幕的坐标范围之外,待预加载的应用程序可以显示在该Stack。对于Android系统来说,可以基于Android系统的多窗口机制,新建一个专门用于显示预加载应用的Stack。本申请实施例中,新建Stack是因为可以让新建的预加载Stack拥有自己的size以及可见性,从而实现在显示屏幕外预加载的目的。Generally, in the multi-window mode, there can be multiple types of stacks. For example, Home Stack represents the stack displayed by desktop applications, App Stack represents the third-party application display, and there can be other split-screen stacks. In the embodiment of the present application, a preloaded active window stack (preloaded stack) is added, which is set to represent the stack displayed by the preloaded application, and the boundary coordinates of the preloaded stack are set outside the coordinate range of the display screen, to be preloaded The application can be displayed on that Stack. For the Android system, based on the multi-window mechanism of the Android system, a new Stack dedicated to displaying preloaded applications can be created. In the embodiment of the present application, a new stack is created because the newly created preloaded stack can have its own size and visibility, thereby achieving the purpose of preloading outside the display screen.
本申请实施例中,对预加载Stack的创建时机不做限定,可以是在移动终端出厂前默认设置预加载Stack处于常驻状态,即预加载Stack一直存在;也可以在移动终端开机时或移动终端解锁成功后创建;还可以在应用预加载事件被触发后(可以在确定待预加载应用程序之前)创建等等。在一实施例中,所述基于预先创建的预加载活动窗口堆栈预加载所述待预加载应用程序对应的应用界面,包括:判断是否存在预先创建的预加载活动窗口堆栈;若不存在,则按照预设规则创建预加载活动窗口堆栈;基于所创建的预加载活动窗口堆栈预加载所述待预加载应用程序对应的应用界面。这样设置的好处在于,在确定待预加载的待预加载应用程序之后,判断预加载Stack是否存在,若存在,则无需新建,若不存在,则进行创建,可以节省系统资源。可以理解的是,当需要进行界面渲染的待预加载应用程序包含多个时,也即需要在短时间内连续预加载多个需要进行界面渲染的应用程序时,在第一个待预加载应用程序开始加载前,预加载Stack已创建完毕,那么第二个待预加载应用程序开始加载前,预加载Stack是存在的,可以不必进行上述判断。In the embodiment of the present application, the timing for creating the preloaded stack is not limited. The preloaded stack is set to be resident by default before the mobile terminal leaves the factory, that is, the preloaded stack always exists; it can also be used when the mobile terminal is powered on or moved. It is created after the terminal is successfully unlocked; it can also be created after the application preload event is triggered (before the application to be preloaded is determined) and so on. In one embodiment, pre-loading an application interface corresponding to the application to be pre-loaded based on a pre-created pre-loaded active window stack includes: determining whether a pre-created pre-loaded active window stack exists; if not, then A preloaded active window stack is created according to a preset rule; an application interface corresponding to the application to be preloaded is preloaded based on the created preloaded active window stack. The advantage of this setting is that after determining the application to be preloaded to be preloaded, it is determined whether a preloaded stack exists. If it exists, it does not need to be created. If it does not exist, it is created, which can save system resources. It can be understood that when there are multiple applications to be preloaded for interface rendering, that is, to continuously preload multiple applications for interface rendering in a short time, the first application to be preloaded Before the program starts to load, the pre-loading stack has been created, so before the second application to be pre-loaded starts to load, the pre-loading stack exists, and the above judgment may not be necessary.
本申请实施例中,对基于预加载Stack预加载待预加载应用程序对应的应用界面的具体过程不做限定,例如可以基于预加载Stack的size进行应用界面的绘制并显示等。在一实施例中,可在创建待预加载应用程序对应的目标进程后,在预先创建的预加载活动窗口堆栈中 创建待预加载应用程序对应的任务栈,基于目标进程在任务栈中启动待预加载应用程序对应的活动窗口,基于所启动的活动窗口绘制并显示待预加载应用程序对应的应用界面。这样设置的好处在于,不会干扰前台应用程序的运行及显示,保证系统稳定性,同时有效提高待预加载应用程序启动时的速度。在上述步骤的执行过程中,还可能涉及其他资源的预加载,如应用服务启动、内存分配、文件内容读取及网络数据获取等,本申请实施例对其他资源的预加载过程不做限定。In the embodiment of the present application, the specific process of preloading the application interface corresponding to the application to be preloaded based on the preloaded stack is not limited, for example, the application interface may be drawn and displayed based on the size of the preloaded stack. In one embodiment, after the target process corresponding to the application to be preloaded is created, a task stack corresponding to the application to be preloaded is created in a pre-created preloaded active window stack, and the standby process is started in the task stack based on the target process. The active window corresponding to the pre-loaded application draws and displays the application interface corresponding to the application to be pre-loaded based on the activated active window. The advantage of this setting is that it will not interfere with the operation and display of the foreground application, ensure system stability, and effectively increase the speed of the application to be preloaded at startup. During the execution of the above steps, pre-loading of other resources may also be involved, such as application service startup, memory allocation, file content reading, and network data acquisition. The embodiments of this application do not limit the pre-loading process of other resources.
在一些实施例中,还包括:向所述待预加载应用程序发送伪造焦点通知,并基于所述伪造焦点通知在预设时间段内保持所述待预加载应用程序对应的应用界面的持续绘制以及显示更新。这样设置的好处在于,能够在待预加载应用程序获得焦点并对系统可见的情况下完成应用界面的绘制及显示,提高预加载的完成度,且不对前台应用的焦点产生影响。本申请实施例中的焦点又称为输入焦点,伪造焦点与前台应用对应的焦点相互独立。一般的,对于目前的Android系统来说,焦点是唯一的,例如触摸等输入操作只对焦点生效,对于输入焦点信息,系统端和应用端是一致的,系统端一旦修改输入焦点信息,就会向应用发送输入焦点信息发生变化的信息,以此方法保证系统端和应用端输入焦点信息一致。本申请实施例中,通过分离系统端和应用端输入焦点信息的方式,实现应用端可伪造焦点的目的。本申请实施例中,对预加载应用伪造焦点通知,使预加载应用具有焦点信息,而系统端的焦点信息仍然是正确的,这样处理可以使得预加载应用能够正常绘制,达到全部加载的目的。焦点存在于系统端和应用端,可认为是服务端(server)和客户端(client),系统端记录拥有焦点的应用,应用端保存标志位(flag)标识自己是否有焦点。伪造输入焦点的时机可以是当Android的窗口系统新增窗口,需要更新焦点时,生成伪造焦点通知并进行发送。伪造焦点的方法可以是调用窗口的client端的改变窗口焦点的方法,使得该窗口获取焦点。在一实施例中,可基于Binder机制进行伪造焦点通知的发送,Binder机制是Android系统的进程间通信的最常用的方式,采用c/s架构,即客户/服务架构。In some embodiments, the method further includes: sending a fake focus notification to the application to be preloaded, and maintaining a continuous drawing of an application interface corresponding to the application to be preloaded for a preset period of time based on the fake focus notification. And display updates. The advantage of this setting is that it can complete the drawing and display of the application interface when the application to be preloaded has the focus and is visible to the system, improving the completion of the preloading without affecting the focus of the foreground application. The focus in the embodiments of the present application is also referred to as input focus, and the fake focus and the focus corresponding to the foreground application are independent of each other. Generally, for the current Android system, the focus is unique. For example, input operations such as touch only take effect on the focus. For the input of focus information, the system and the application are consistent. Once the system changes the input focus information, it will Send information to the application that the input focus information has changed, this way to ensure that the system and application side input focus information is consistent. In the embodiment of the present application, the purpose of falsifying the focus on the application side is achieved by separating the system side and the application side from inputting focus information. In the embodiment of the present application, the focus notification for the preloaded application is forged, so that the preloaded application has focus information, but the focus information on the system side is still correct. Such processing can enable the preloaded application to draw normally and achieve the purpose of all loading. The focus exists on the system side and the application side. It can be considered as the server and the client. The system side records the application that has the focus, and the application side saves a flag to indicate whether it has focus. The timing of falsifying the input focus may be that when the Android window system adds a new window and the focus needs to be updated, a fake focus notification is generated and sent. The method of falsifying the focus may be a method of calling the client side of the window to change the focus of the window, so that the window acquires focus. In one embodiment, a fake focus notification can be sent based on the Binder mechanism. The Binder mechanism is the most commonly used method for inter-process communication of the Android system, and adopts a c / s architecture, that is, a client / service architecture.
本申请实施例中,预设时间段可根据实际情况设计,例如可以是开始预加载后的固定时长范围内,也可以是开始预加载到完成预加载的时段等,具体可包含于预加载策略中。在一些实施例中,所述预设时间段的长度包括所述待预加载应用程序中启动广告或启动动画的播放时长。一些应用程序在启动的过程中,通常会播放一些广告或动画,广告或动画的播放时长通常为3秒至十几秒不等,在播放广告或动画期间,用户可能没办法进行任何操作,只能等待播放完毕,浪费用户的宝贵时间。本申请实施例这样设置的好处在于,能够在待预加载应用程序启动之前,在屏幕外播放完启动广告或启动动画,当待预加载应用程序启动时,可直接进入应用程序的主页面或其他用户可操作的界面,从而将待预加载应用程序的可操作时间点进一步提前,减少等待时间。In the embodiment of the present application, the preset time period may be designed according to actual conditions, for example, it may be within a fixed time range after starting preloading, or it may be a period from starting preloading to completing preloading, etc., which may be specifically included in the preloading strategy in. In some embodiments, the length of the preset time period includes a playing duration of starting an advertisement or starting an animation in the application to be preloaded. During the startup of some applications, some advertisements or animations are usually played. The duration of advertisements or animations usually ranges from 3 seconds to more than ten seconds. During the playback of advertisements or animations, the user may not be able to perform any operation, only Can wait for the playback to finish, wasting valuable time of the user. The advantage of this embodiment of the present application is that it can play the startup advertisement or startup animation off the screen before the application to be preloaded is launched. When the application to be preloaded is launched, it can directly enter the main page of the application or other User-operable interface, which further advances the operable time point of the application to be preloaded, reducing waiting time.
对于一些移动终端来说,例如手机及平板电脑等移动移动终端,为了方便用户的使用,显示屏幕的显示方式通常包括竖屏显示和横屏显示,许多应用程序默认采用竖屏方式进行显示,而有些应用程序默认采用横屏方式进行显示(如一些网络游戏),在移动终端的使用过程中,有些应用程序还会随着用户握持移动终端的方向而进行横竖屏显示的切换。在本申请的一些实施例中,所述预加载活动窗口堆栈对应的边界坐标为(H,0,2H,H),所述边界坐标对应的坐标系为系统坐标,所述系统坐标的原点为所述显示屏幕的左上角,H为所述显示屏幕的显示区域的长边长度。也就是说,H对应的边是显示屏幕的显示区域的最大边,在竖屏显示时为显示屏幕的高,在横屏显示时为显示屏幕的宽。这样设置的目的是考虑到显示屏幕横屏、预加载应用横屏显示,以及一些应用程序的正常显示。图2为本申请实施例提供的一种预加载活动窗口堆栈与显示屏幕显示区域的相对位置关系示意图。如图2所示,此时显示屏幕为竖屏方式,移动终端系统坐标的原点为显示屏幕201的左顶点(0,0),显示屏幕201的宽度方向为X轴,高度方向为Y轴,预加载Stack 202对应的边界坐标为(H,0,2H, H),H为屏幕高,即左边实线矩形范围内的区域为主屏幕显示区域,右边虚线矩形范围内的区域为预加载显示区域。图3为本申请实施例提供的另一种预加载活动窗口堆栈与显示屏幕显示区域的相对位置关系示意图。如图3所示,此时显示屏幕为横屏方式,移动终端系统坐标的原点为显示屏幕301的左顶点(0,0),显示屏幕301的高度方向为X轴,宽度方向为Y轴,预加载Stack 202对应的边界坐标为(H,0,2H,H),H为屏幕高,即左边实线矩形范围内的区域为主屏幕显示区域,右边虚线矩形范围内的区域为预加载显示区域。For some mobile terminals, such as mobile phones and tablet computers, in order to facilitate the use of the user, the display mode of the display screen usually includes vertical screen display and horizontal screen display. Many applications use vertical screen display by default, and Some applications display in the horizontal screen mode by default (such as some online games). During the use of the mobile terminal, some applications also switch between the horizontal and vertical screen display as the user holds the mobile 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, and an origin of the system coordinate is In the upper left corner of the display screen, H is the length of the long side of the display area of the display screen. That is, the side corresponding to H is the largest side of the display area of the display screen, which is the height of the display screen when displayed in the vertical screen and the width of the display screen when displayed in the horizontal screen. The purpose of this setting is to consider the horizontal screen of the display screen, the horizontal screen display of pre-loaded applications, and the normal display of some applications. FIG. 2 is a schematic diagram of a relative position relationship between a preloaded active window stack and a display screen display area according to an embodiment of the present application. As shown in FIG. 2, the display screen is in the vertical screen mode at this time, the origin of the system coordinates of the mobile terminal is the left vertex (0,0) of the display screen 201, the width direction of the display screen 201 is the X axis, and the height direction is the Y axis. The boundary coordinates corresponding to the preloaded Stack 202 are (H, 0, 2H, H), where H is the screen height, that is, the area within the solid rectangle on the left is the main screen display area, and the area within the rectangle on the right dashed line is the preload display. region. FIG. 3 is a schematic diagram of a relative position relationship between another preloaded active window stack and a display screen display area according to an embodiment of the present application. As shown in FIG. 3, the display screen is in a landscape mode at this time, the origin of the mobile 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, and the width direction is the Y axis. The boundary coordinates corresponding to the preloaded Stack 202 are (H, 0, 2H, H), and H is the screen height, that is, the area within the solid rectangle on the left is the main screen display area, and the area within the rectangle on the right dashed line is the preload display. region.
预加载Stack的边界如此设置的原因在于:The reason for the pre-loaded Stack boundary is so:
左上角的横坐标为H,是为了防止横屏时显示屏幕(也可称为主屏幕)显示到预加载应用的界面,因为主屏幕除了竖屏模式,还有横屏模式,当主屏幕横屏的时候,为了防止主屏幕显示区域显示了预加载的应用的局部,所以将预加载Stack对应的矩形区域的左上角横坐标设为屏幕高。The horizontal axis of the upper left corner is H, which is to prevent the display screen (also called the home screen) from being displayed on the pre-loaded application interface when the screen is horizontal, because the home screen has a horizontal screen mode in addition to the vertical screen mode. In order to prevent part of the preloaded application from being displayed in the main screen display area, the horizontal coordinate of the upper left corner of the rectangular area corresponding to the preloaded stack is set to the screen height.
左上角的纵坐标为0,是为了预加载应用能够正确计算状态栏高度。Android应用为了更好的设计用户界面(User Interface,UI),会自定义顶部状态栏,如果上边对应的纵坐标不等于0,那么状态栏的高度可能会错误。The vertical coordinate of the upper left corner is 0, so that the preloaded application can correctly calculate the height of the status bar. In order to better design the user interface (UI), the Android application will customize the top status bar. If the corresponding vertical coordinate is not equal to 0, the height of the status bar may be wrong.
右下角的横坐标为2H(2倍屏幕高),即预加载Stack对应的矩形的宽=屏幕高,是为了预加载Stack的size能够包含预加载时候的横屏应用(即应用界面为横屏显示方式的应用程序)。The horizontal axis of the lower right corner is 2H (2 times the screen height), that is, the width of the rectangle corresponding to the preloaded stack = screen height, so that the size of the preloaded stack can include the horizontal screen application when preloaded (that is, the application interface is horizontal screen) Display mode application).
右下角的纵坐标为H,即预加载Stack对应的矩形的高=屏幕高,是为了预加载Stack的size能够包含预加载时候的竖屏应用。The vertical coordinate of the lower right corner is H, that is, the height of the rectangle corresponding to the pre-loaded Stack = screen height, so that the size of the pre-loaded Stack can include the vertical screen application when pre-loaded.
基于上述的原因,将预加载Stack的size设置为(H,0,2H,H)。Based on the above reasons, the size of the preloaded stack is set to (H, 0, 2H, H).
在一些实施例中,所述根据所述启动概率,确定所述候选应用程序中包含的待预加载应用程序以及所述待预加载应用程序对应的预加载策略,包括:根据所述启动概率确定所述候选应用程序中包含的待预加载应用程序,获取用户的当前行为状态信息,根据所述当前行为状态信息以及所述启动概率确定所述待预加载应用程序对应的预加载策略。这样设置的好处在于,可以更加合理的确定待预加载应用程序对应的预加载策略。示例性的,行为状态信息可以包括用户的姿态信息、用户作用于移动终端上的一种或多种操作的信息以及用户的生理状态信息等等。在获取用户的行为状态信息时,可通过移动终端自身集成的传感器等采集用户的行为状态信息,也可借助其他设备(如手环、手表、耳机、眼镜、头盔及腰带等可穿戴设备)采集用户的行为状态信息,并发送给移动终端。用户当前的行为状态的不同,可能会影响用户对应用程序的使用方式。例如,对于运动类应用,如Keep,该应用程序中提供了训练视频、健身文章、训练计划以及饮食建议等内容。当根据生理状态信息确定用户当前比较疲劳时,预测用户不会立即进行锻炼,那么可预加载最新的健身文章等相关内容,而不会预加载训练视频;当根据生理状态信息确定用户当前比较轻松时,预测用户可能马上会进行锻炼,那么可预加载训练计划中记录的当前用户可能进行训练的训练视频,那么在用户启动应用程序时,就无需等待视频加载过程,直接观看视频开始训练。又如,对于音乐类应用,如酷我音乐盒,一般会从服务器获取推荐歌曲等内容在界面中显示,如热门歌曲排名或新歌排名等。当检测到用户处于奔跑或快走等状态时,说明用户可能不会关注页面上显示的内容,因为在运动过程中很难看清页面内容,因此,在预加载时无需获取对应的网络数据,也无需绘制包含推荐内容的界面部分;当检测到用户处于静止状态,或慢走状态时,用户可能会查看界面内容,此时,可在预加载过程中获取推荐歌曲列表数据,并绘制相应的界面,待应用程序真正启动时,快速进行显示。In some embodiments, determining the to-be-loaded application included in the candidate application and the pre-loading strategy corresponding to the to-be-loaded application according to the startup probability includes: determining according to the startup probability The application to be preloaded included in the candidate application program obtains current behavior state information of the user, and determines a preloading strategy corresponding to the application to be preloaded according to the current behavior state information and the startup probability. The advantage of this setting is that the preloading strategy corresponding to the application to be preloaded can be determined more reasonably. Exemplarily, the behavior state information may include posture information of the user, information of one or more operations performed by the user on the mobile terminal, physiological state information of the user, and the like. When obtaining the user's behavior status information, the user's behavior status information can be collected through the mobile terminal's own integrated sensors, etc., or it can be collected with other devices (such as wearable devices such as bracelets, watches, headphones, glasses, helmets and belts) The user's behavior status information is sent to the mobile terminal. The current behavior of the user may affect how the user uses the application. For example, for sports applications such as Keep, the application provides training videos, fitness articles, training plans, and diet recommendations. When it is determined that the user is currently fatigued based on the physiological state information, it is predicted that the user will not exercise immediately, then the latest fitness articles and other related content may be preloaded without preloading the training video; when the user is currently relaxed based on the physiological state information At this time, it is predicted that the user may exercise immediately, so the training video recorded by the current user in the training plan may be preloaded. Then when the user starts the application, there is no need to wait for the video loading process and directly watch the video to start training. For another example, for music applications, such as cool music boxes, content such as recommended songs from the server is generally displayed in the interface, such as popular song rankings or new song rankings. When it is detected that the user is running or brisk walking, it means that the user may not pay attention to the content displayed on the page, because it is difficult to see the content of the page during the exercise. Therefore, there is no need to obtain corresponding network data and pre-loading Draw the part of the interface that contains the recommended content; when it is detected that the user is stationary or walking slowly, the user may view the content of the interface. At this time, you can get the recommended song list data during the preload process and draw the corresponding interface. When the application actually starts, display it quickly.
在一些实施例中,所述获取用户的当前行为状态信息可包括:判断待预加载应用程序中 是否包含预设应用程序,若是,则获取用户的当前行为状态信息。若否,则可直接根据启动概率确定待预加载应用程序对应的预加载策略。这样设置的好处在于,对于有些应用程序来说,用户的不同行为状态信息可能对应用程序的使用方式不会产生影响,那么也无需根据行为状态来设定该应用程序的预加载策略,可不获取用户的当前行为状态信息,节省移动终端功耗。预设应用程序可以由服务器向移动终端推送,也可以根据历史采集的用户使用习惯来确定,本申请实施例不做限定。In some embodiments, obtaining the current behavior status information of the user may include: determining whether the application to be preloaded includes a preset application program, and if yes, obtaining the current behavior status information of the user. If not, the preloading strategy corresponding to the application to be preloaded can be directly determined according to the startup probability. The advantage of this setting is that for some applications, the user's different behavior status information may not affect the way the application is used, so there is no need to set the preload policy of the application based on the behavior status, and it is not necessary to obtain User's current behavior status information saves mobile terminal power consumption. The preset application may be pushed by the server to the mobile terminal, or may be determined according to the user's usage habits of historical collection, which is not limited in the embodiment of the present application.
在一些实施例中,在依照所述预加载策略对待预加载应用程序进行相应的预加载操作之后,还包括:在接收到已进行预加载操作的目标应用程序的运行指令时,基于已预加载资源启动所述目标应用程序。这样设置的好处在于,在用户真正启动已进行了预加载操作的待预加载应用程序时,可以基于已经预加载的资源快速启动运行指令对应的目标应用程序。In some embodiments, after performing a corresponding preloading operation on the preloaded application according to the preloading policy, the method further includes: upon receiving a running instruction of the target application that has performed the preloading operation, based on the preloaded The resource launches the target application. The advantage of this setting is that when the user actually starts the application to be preloaded that has been preloaded, the target application program corresponding to the running instruction can be quickly started based on the resources that have been preloaded.
在一些实施例中,若预加载过程中进行了界面渲染,那么在接收到已进行预加载操作的目标应用程序的运行指令时,将所述预加载活动窗口堆栈中包含的所述目标应用程序对应的应用界面迁移至所述显示屏幕进行显示。在一实施例中,所述将所述预加载活动窗口堆栈中包含的所述目标应用程序对应的应用界面迁移至所述显示屏幕进行显示,包括:将所述预加载活动窗口堆栈中包含的所述目标应用程序对应的任务栈迁移至应用活动窗口堆栈的顶部,更新所述任务栈的尺寸信息、配置信息和可见性,以实现所述目标应用程序对应的应用界面在所述显示屏幕进行显示。这样设置的好处在于,能够保证界面迁移过程的稳定性,保证恢复过程不会出现卡屏、黑屏或迁移速度慢等问题。In some embodiments, if interface rendering is performed during the preloading process, when receiving a running instruction of the target application that has performed the preloading operation, the target application included in the preloading active window stack is The corresponding application interface is migrated to the display screen for display. In an embodiment, the migrating an application interface corresponding to the target application included in the preloaded active window stack to the display screen for display includes: The task stack corresponding to the target application is migrated to the top of the application active window stack, and the size information, configuration information, and visibility of the task stack are updated to implement the application interface corresponding to the target application on the display screen. display. The advantage of this setting is that it can ensure the stability of the interface migration process and ensure that no issues such as screen freezes, black screens, or slow migration speeds occur during the recovery process.
此外,图4为本申请实施例提供的一种应用界面迁移示意图,如图4所示,在接收到目标应用程序的运行指令的情况下,将预加载活动窗口堆栈中包含的目标应用程序对应的应用界面401迁移至显示屏幕201进行显示,在一实施例中,将预加载应用界面所属的task迁移至应用活动窗口Stack的顶部,并更新该task的尺寸信息、配置信息和可见性,从而应用界面能够在显示屏幕上正常显示。In addition, FIG. 4 is a schematic diagram of an application interface migration provided by an embodiment of the present application. As shown in FIG. 4, when a running instruction of a target application program is received, the target application program included in the active window stack is correspondingly loaded. The application interface 401 is transferred to the display screen 201 for display. In one embodiment, the task to which the preloaded application interface belongs is migrated to the top of the application activity window Stack, and the size information, configuration information, and visibility of the task are updated, thereby The application interface can be displayed normally on the display screen.
图5为本申请实施例提供的另一种应用程序预加载方法的流程示意图,该方法包括如下步骤:FIG. 5 is a schematic flowchart of another application preloading method according to an embodiment of the present application. The method includes the following steps:
步骤501、检测到应用预加载事件被触发时,利用预设预测模型预测候选应用程序的启动概率。Step 501: When it is detected that an application preload event is triggered, a preset prediction model is used to predict a startup probability of a candidate application.
步骤502、将启动概率较高的预设数值个候选应用程序确定为待预加载应用程序。Step 502: Determine a preset number of candidate applications with a higher startup probability as the applications to be preloaded.
步骤503、根据启动概率将所述待预加载应用程序划分为第一类应用程序和第二类应用程序。Step 503: Divide the application to be preloaded into a first-type application and a second-type application according to a startup probability.
其中,所述第一类应用程序对应的启动概率大于所述第二类应用程序对应的启动概率。例如,预设数值为4个,假设预测出来的待预加载应用程序包括微信(启动概率0.31)、QQ(启动概率0.23)、支付宝(启动概率0.21)和百度地图(启动概率0.2)。将启动概率较高的2个应用程序(即微信和QQ)确定为第一类应用程序;将启动概率较低的2个应用程序(即支付宝和百度地图)确定为第二类应用程序。The startup probability corresponding to the first type of application is greater than the startup probability corresponding to the second type of application. For example, there are four preset values. It is assumed that the predicted applications to be preloaded include WeChat (startup probability 0.31), QQ (startup probability 0.23), Alipay (startup probability 0.21), and Baidu map (startup probability 0.2). Two applications (ie WeChat and QQ) with higher launch probability are determined as the first type of applications; two applications with lower launch probability (ie, Alipay and Baidu Map) are determined as the second type of applications.
步骤504、分别确定第一类应用程序对应的第一预加载策略和第二类应用程序对应的第二预加载策略。Step 504: Determine a first preloading strategy corresponding to the first type of application program and a second preloading strategy corresponding to the second type of application program, respectively.
示例性的,确定第一类应用程序对应的预加载资源包括应用进程启动、应用进程初始化、应用服务启动、内存分配、文件内容读取、网络数据获取和界面渲染;确定第二类应用程序对应的预加载资源包括应用进程启动、应用进程初始化、应用服务启动、内存分配和文件内容读取。Exemplarily, determining the preloaded resources corresponding to the first type of application includes application process startup, application process initialization, application service startup, memory allocation, file content reading, network data acquisition, and interface rendering; determining the second type of application corresponding The pre-loaded resources include application process startup, application process initialization, application service startup, memory allocation, and file content reading.
步骤505、按照启动概率由高到低的顺序,依次依照第一预加载策略预加载第一类应用程序,以及依照第二预加载策略预加载第二类应用程序。Step 505: Pre-load the first-type application according to the first pre-loading strategy in order from the highest starting probability, and pre-load the second-type application according to the second pre-loading strategy.
其中,在对第一类应用程序进行预加载时,涉及到界面渲染的预加载操作。在进行界面渲染预加载操作时,基于预先创建的预加载活动窗口堆栈绘制并显示所述第一类应用程序对应的应用界面。其中,预加载活动窗口堆栈对应的边界坐标位于显示屏幕的坐标范围之外。应用界面可包括启动界面、启动动画、或者预测出来的用户即将打开的目标界面。Among them, when preloading the first type of application, a preloading operation of interface rendering is involved. When performing an interface rendering preload operation, an application interface corresponding to the first type of application program is drawn and displayed based on a pre-created preloaded active window stack. The boundary coordinates corresponding to the preloaded active window stack are outside the coordinate range of the display screen. The application interface may include a startup interface, a startup animation, or a predicted target interface that a user is about to open.
步骤506、在接收到已进行预加载操作的目标应用程序的运行指令时,基于已预加载资源启动所述目标应用程序。Step 506: When receiving a running instruction of the target application that has been preloaded, start the target application based on the preloaded resource.
本申请实施例提供的应用预加载方法,在检测到应用预加载事件被触发时,利用预测模型预测出用户可能会使用的概率较高的几个应用程序,再根据这些应用程序的启动概率确定对应的预加载策略,按照每个应用程序对应的预加载策略进行预加载操作,能够更加合理地利用系统资源,并在应用程序真正被用户启动时,基于已预加载的资源启动该应用程序,能够有效提高该应用程序的启动速度。In the application preloading method provided in the embodiment of the present application, when an application preloading event is detected to be triggered, a prediction model is used to predict several applications with a high probability that a user may use, and then determined according to the startup probability of these applications. Corresponding preloading strategy, preloading operation according to the preloading strategy corresponding to each application, can make more reasonable use of system resources, and when the application is actually started by the user, start the application based on the preloaded resources, Can effectively improve the startup speed of the application.
图6为本申请实施例提供的又一种应用程序预加载方法的流程示意图,该方法包括:FIG. 6 is a schematic flowchart of another application preloading method according to an embodiment of the present application. The method includes:
步骤601、检测到前台应用程序变更时,利用预设预测模型预测候选应用程序的启动概率。Step 601: When a foreground application program change is detected, a preset prediction model is used to predict a startup probability of the candidate application program.
本申请实施例中,应用预加载事件的触发条件可以是检测到前台应用程序变更。In the embodiment of the present application, the triggering condition of the application preload event may be detecting a change in the foreground application program.
步骤602、将启动概率大于预设概率阈值的候选应用程序确定为待预加载应用程序。Step 602: Determine a candidate application whose startup probability is greater than a preset probability threshold as an application to be preloaded.
步骤603、判断待预加载应用程序中是否包含预设应用程序,若是,则执行步骤604;否则,执行步骤606。Step 603: Determine whether the application to be preloaded contains a preset application, and if yes, perform step 604; otherwise, perform step 606.
步骤604、获取用户的当前行为状态信息。Step 604: Acquire the current behavior status information of the user.
步骤605、对于待预加载应用程序中包含的预设应用程序,根据对应的启动概率所属概率区间确定对应的初步预加载策略,再根据当前行为状态信息对初步预加载策略进行修正;对于待预加载应用程序中的除预设应用程序以外的剩余应用程序,根据剩余应用程序的启动概率所属概率区间确定对应的预加载策略,执行步骤607。Step 605: For a preset application included in the application to be preloaded, determine a corresponding preliminary preloading strategy according to the probability interval to which the corresponding startup probability belongs, and then modify the preliminary preloading strategy according to the current behavior state information; Load the remaining application programs other than the preset application program, determine the corresponding preloading strategy according to the probability interval to which the remaining application startup probability belongs, and execute step 607.
步骤606、对于每个待预加载应用程序,确定当前待预加载应用程序的启动概率所属的目标概率区间,将目标概率区间对应的预加载策略确定为当前待预加载应用程序对应的预加载策略,执行步骤607。Step 606: For each application to be preloaded, determine a target probability interval to which the starting probability of the current application to be preloaded belongs, and determine the preloading strategy corresponding to the target probability interval as the preloading strategy corresponding to the current application to be preloaded. Go to step 607.
步骤607、按照启动概率由高到低的顺序,依次依照每个待预加载应用程序对应的预加载策略进行预加载操作。Step 607: Perform the preloading operation according to the preloading strategy corresponding to each application to be preloaded in order from the startup probability from high to low.
步骤608、在接收到已进行预加载操作的目标应用程序的运行指令时,基于已预加载资源启动所述目标应用程序。Step 608: When receiving a running instruction of the target application that has been preloaded, start the target application based on the preloaded resource.
可以理解的是,在本申请实施例中,也可按照启动概率由高到低的顺序,确定当前待预加载应用程序对应的预加载策略并进行相应的预加载操作。例如,对于启动概率最高的待预加载应用程序,确定其是否属于预设应用程序,若是,则根据启动概率和当前行为状态信息确定对应的预加载策略,否则根据启动概率确定对应的预加载策略,然后根据所确定的预加载策略对该预加载应用程序进行预加载操作。随后,针对启动概率排名第二高的待预加载应用程序,执行上述类似操作。依次类推,从而实现待预加载应用程序的顺次确定预加载策略及预加载。这样设置的好处在于,节省确定预加载策略的时间,若预加载事件被触发后的短时间内,用户已选择打开某个启动概率较高的应用程序,则能够保证该应用程序的预加载操 作具有较高的完成度,保证预加载效果。It can be understood that, in the embodiment of the present application, the preloading strategy corresponding to the current application to be preloaded may be determined and the corresponding preloading operation may be performed in the order of the startup probability from high to low. For example, for the application to be preloaded with the highest startup probability, determine whether it belongs to a preset application. If so, determine the corresponding preloading strategy according to the startup probability and the current behavior state information, otherwise determine the corresponding preloading strategy based on the startup probability. , And then preload the preloaded application according to the determined preloading strategy. Then, for the application to be preloaded with the second highest startup probability, perform the similar operation described above. By analogy, the pre-loading strategy and pre-loading of the application to be pre-loaded are determined in order. The advantage of this setting is that it saves time to determine the preloading strategy. If the user has chosen to open an application with a higher probability of launching within a short time after the preloading event is triggered, the preloading operation of the application can be guaranteed Has a high degree of completion to ensure the effect of preloading.
本申请实施例提供的应用程序预加载方法,在检测到前台应用程序变更的情况下,利用预测模型预测出用户可能会使用的概率较高的几个应用程序,并结合启动概率和用户当前行为状态信息确定每个应用程序对应的预加载策略,能够更加合理地确定应用程序个性化的预加载方式,从而更好地利用系统资源,并在应用程序真正被用户启动时,基于已预加载的资源启动该应用程序,能够有效提高该应用程序的启动速度。In the application preloading method provided in the embodiment of the present application, when a foreground application change is detected, a prediction model is used to predict several applications with a high probability that the user may use, and the startup probability and the user's current behavior are combined The state information determines the preloading strategy corresponding to each application, which can more reasonably determine the personalized preloading method of the application, thereby better utilizing system resources, and based on the preloaded application when the application is actually started by the user. Starting the application with resources can effectively improve the startup speed of the application.
图7为本申请实施例提供的一种应用程序预加载装置的结构框图,该装置可由软件和/或硬件实现,一般集成在移动终端中,可通过执行应用程序预加载方法来对应用程序进行预加载。如图7所示,该装置包括:FIG. 7 is a structural block diagram of an application preloading device according to an embodiment of the present application. The device may be implemented by software and / or hardware, and is generally integrated in a mobile terminal. The application program may be performed by executing an application preloading method. Preloading. As shown in Figure 7, the device includes:
启动概率预测模块701,设置为在检测到应用预加载事件被触发时,预测候选应用程序的启动概率,所述启动概率包括应用程序即将被打开的概率;The startup probability prediction module 701 is configured to predict a startup probability of a candidate application when an application preload event is detected to be triggered, where the startup probability includes a probability that the application is about to be opened;
应用确定模块702,设置为根据所述启动概率确定所述候选应用程序中包含的待预加载应用程序;An application determining module 702, configured to determine an application to be preloaded included in the candidate application according to the startup probability;
预加载策略确定模块703,设置为根据所述启动概率确定所述待预加载应用程序对应的预加载策略;A preloading policy determining module 703, configured to determine a preloading policy corresponding to the application to be preloaded according to the startup probability;
预加载模块704,设置为依照所述预加载策略对待预加载应用程序进行预加载操作。The preloading module 704 is configured to perform a preloading operation on the preloaded application program according to the preloading policy.
本申请实施例中提供的应用程序预加载装置,检测到应用预加载事件被触发时,预测候选应用程序的启动概率,根据启动概率确定待预加载应用程序以及对应的预加载策略,依照预加载策略对待预加载应用程序进行相应的预加载操作。通过采用上述技术方案,可以根据预测出来的需要进行预加载的应用程序的启动概率的不同,来选择合适的预加载策略,合理利用系统资源进行预加载,完善预加载功能。The application preloading device provided in the embodiment of the present application predicts a startup probability of a candidate application when an application preloading event is triggered, determines an application to be preloaded and a corresponding preloading strategy according to the startup probability, and follows the preloading The policy treats the preloaded application accordingly. By adopting the above technical solution, a suitable preloading strategy can be selected according to the predicted startup probability of an application that needs to be preloaded, system resources can be reasonably used for preloading, and the preloading function can be improved.
在一实施例中,应用确定模块702是设置为:In an embodiment, the application determining module 702 is configured to:
将启动概率由高到低排列或由低到高排列,并从高的启动概率开始顺序获取预设数值个启动概率,将所述预设数值个启动概率对应的候选应用程序确定为所述候选应用程序中包含的待预加载应用程序。The startup probabilities are arranged from high to low or from low to high, and a preset number of startup probabilities are sequentially obtained from a high startup probability, and a candidate application corresponding to the preset number of startup probabilities is determined as the candidate. The application to be preloaded contained in the application.
在一实施例中,预加载策略确定模块703是设置为:In one embodiment, the preloading policy determining module 703 is configured to:
根据待预加载应用程序的启动概率确定所述待预加载应用程序对应的预加载资源,其中,启动概率越高的待预加载应用程序对应的预加载资源越多。The pre-loaded resources corresponding to the application to be pre-loaded are determined according to the startup probability of the application to be pre-loaded, where the higher the startup probability is, the more pre-loaded resources corresponding to the application to be pre-loaded.
在一实施例中,所述预加载资源包括应用进程启动、应用进程初始化、应用服务启动、内存分配、文件内容读取、网络数据获取和界面渲染中的至少一项操作的相关资源。In one embodiment, the preloaded resources include resources related to at least one of an application process startup, application process initialization, application service startup, memory allocation, file content reading, network data acquisition, and interface rendering.
在一实施例中,预加载策略确定模块703是设置为:根据待预加载应用程序的启动概率将所述待预加载应用程序划分为第一类应用程序和第二类应用程序;其中,所述第一类应用程序对应的启动概率大于所述第二类应用程序对应的启动概率;In an embodiment, the preloading policy determining module 703 is configured to divide the to-be-loaded application into a first-type application and a second-type application according to a startup probability of the application to be pre-loaded; The startup probability corresponding to the first type of application program is greater than the startup probability corresponding to the second type of application program;
确定第一类应用程序对应的预加载资源包括应用进程启动、应用进程初始化、应用服务启动、内存分配、文件内容读取、网络数据获取和界面渲染;Determine that the preloaded resources corresponding to the first type of application include application process startup, application process initialization, application service startup, memory allocation, file content reading, network data acquisition, and interface rendering;
确定第二类应用程序对应的预加载资源包括应用进程启动、应用进程初始化、应用服务启动、内存分配和文件内容读取。Determining the preloaded resources corresponding to the second type of application includes application process startup, application process initialization, application service startup, memory allocation, and file content reading.
在一实施例中,当针对所述界面渲染进行预加载操作时,预加载模块704是设置为:In one embodiment, when performing a preload operation on the interface rendering, the preload module 704 is configured to:
基于预先创建的预加载活动窗口堆栈预加载所述待预加载应用程序对应的应用界面,其 中,所述预加载活动窗口堆栈对应的边界坐标位于显示屏幕的坐标范围之外。The application interface corresponding to the application to be preloaded is preloaded based on a pre-created preloaded active window stack, wherein the boundary coordinates corresponding to the preloaded active window stack are outside the coordinate range of the display screen.
在一实施例中,应用确定模块702是设置为:根据所述启动概率确定所述候选应用程序中包含的待预加载应用程序;In an embodiment, the application determining module 702 is configured to determine, according to the startup probability, an application to be preloaded included in the candidate application;
预加载策略确定模块703是设置为:The preloading policy determination module 703 is set to:
获取用户的当前行为状态信息;Get the user's current behavior status information;
根据所述当前行为状态信息以及所述启动概率确定所述待预加载应用程序对应的预加载策略。Determine a preloading strategy corresponding to the application to be preloaded according to the current behavior state information and the startup probability.
在一实施例中,该装置还包括:In an embodiment, the device further includes:
启动模块,设置为在依照所述预加载策略对待预加载应用程序进行相应的预加载操作之后,在接收到已进行预加载操作的目标应用程序的运行指令的情况下,基于已预加载资源启动所述目标应用程序。The startup module is configured to, after performing a corresponding preload operation on the preloaded application program according to the preloading policy, and upon receiving a running instruction of the target application program that has performed the preload operation, start based on the preloaded resource. The target application.
在一实施例中,应用确定模块702是设置为:In an embodiment, the application determining module 702 is configured to:
将所述启动概率大于预设概率阈值的候选应用程序确定为所述待预加载应用程序。A candidate application whose startup probability is greater than a preset probability threshold is determined as the application to be preloaded.
在一实施例中,预加载策略确定模块703是设置为:In one embodiment, the preloading policy determining module 703 is configured to:
判断所述待预加载应用程序中是否包含预设应用程序;Determining whether the application to be preloaded includes a preset application;
在所述待预加载应用程序中包含所述预设应用程序的情况下,获取所述用户的当前行为状态信息;If the preset application is included in the application to be preloaded, obtaining current behavior status information of the user;
其中,所述预设应用程序由服务器推送,或者根据历史采集的用户使用习惯来确定。Wherein, the preset application program is pushed by the server, or determined according to the user's usage habits collected in history.
在一实施例中,预加载策略确定模块703是设置为:In one embodiment, the preloading policy determining module 703 is configured to:
根据所述启动概率所属概率区间确定所述预设应用程序对应的初步预加载策略;Determining a preliminary preloading strategy corresponding to the preset application according to a probability interval to which the startup probability belongs;
根据所述当前行为状态信息对所述初步预加载策略进行修正。Modify the preliminary preloading strategy according to the current behavior state information.
在一实施例中,所述启动模块还设置为:In an embodiment, the startup module is further configured to:
在所述预加载操作的过程中进行了所述界面渲染的情况下,当接收到已进行预加载操作的目标应用程序的运行指令时,将所述预加载活动窗口堆栈中包含的所述目标应用程序对应的应用界面迁移至所述显示屏幕进行显示。In a case where the interface rendering is performed during the preloading operation, when receiving a running instruction of a target application that has performed a preloading operation, the target included in the preloading active window stack is The application interface corresponding to the application is migrated to the display screen for display.
在一实施例中,所述启动模块是设置为:将所述预加载活动窗口堆栈中包含的所述目标应用程序对应的任务栈迁移至应用活动窗口堆栈的顶部,更新所述任务栈的尺寸信息、配置信息和可见性,以实现所述目标应用程序对应的应用界面在所述显示屏幕进行显示。In one embodiment, the startup module is configured to: migrate a task stack corresponding to the target application included in the preloaded active window stack to the top of an application active window stack, and update the size of the task stack Information, configuration information, and visibility to enable an application interface corresponding to the target application to be displayed on the display screen.
本申请实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行应用程序预加载方法,该方法包括:An embodiment of the present application further provides a storage medium including computer-executable instructions, where the computer-executable instructions are used to execute an application program preloading method when executed by a computer processor, the method includes:
检测到应用预加载事件被触发时,预测候选应用程序的启动概率,所述启动概率包括应用程序即将被打开的概率;When it is detected that the application preload event is triggered, predicting the launch probability of the candidate application, the launch probability includes a probability that the application is about to be opened;
根据所述启动概率,确定所述候选应用程序中包含的待预加载应用程序以及所述待预加载应用程序对应的预加载策略;Determining, according to the startup probability, an application to be preloaded included in the candidate application and a preloading strategy corresponding to the application to be preloaded;
依照所述预加载策略对所述待预加载应用程序进行相应的预加载操作。Perform a corresponding preload operation on the application to be preloaded according to the preload policy.
存储介质——任何的一种或多种类型的存储器设备或存储设备。术语―存储介质‖旨在包括:安装介质,例如便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、 软盘或磁带装置;计算机系统存储器或随机存取存储器,诸如动态随机存取存储器(Dynamic Random Access Memory,DRAM)、双倍速率随机存取存储器(double data rate Random Access Memory,DDR RAM)、静态随机存取存储器(Static Random-Access Memory,SRAM)、扩展数据输出随机存取存储器(Extended Data Out Random-Access Memory,EDO RAM),兰巴斯(Rambus)随机存取存储器(Random-Access Memory,RAM)等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网)连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机系统,第一计算机系统设置为执行该程序指令。术语―存储介质‖可以包括可以驻留在不同位置中(例如在通过网络连接的不同计算机系统中)的两个或更多存储介质。存储介质可以存储可由一个或多个处理器执行的程序指令(例如具体实现为计算机程序)。Storage medium-any one or more types of memory devices or storage devices. The term "storage media" is intended to include: installation media such as Compact Disc Read-Only Memory (CD-ROM), floppy disks or magnetic tape devices; computer system memory or random access memory, such as dynamic random access memory Access Memory (Dynamic Random Access Memory, DRAM), Double Rate Random Access Memory (DDR Random Access Memory, DDR RAM), Static Random Access Memory (Static Random Access Memory, SRAM), and extended data output random storage Access Memory (Extended Data, Random-Access Memory, EDO, RAM), Rambus Random-Access Memory (Random-Access Memory, RAM), etc .; Non-volatile memory, such as flash memory, magnetic media (such as hard disk or Optical storage); registers or other similar types of memory elements, etc. The storage medium may further include other types of memory or a combination 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 system, and the first computer system is configured to execute the program instructions. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems connected through a network. The storage medium may store program instructions (for example, embodied as a computer program) executable by one or more processors.
当然,本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的应用程序预加载操作,还可以执行本申请任意实施例所提供的应用程序预加载方法中的相关操作。Certainly, a storage medium including computer-executable instructions provided in the embodiments of the present application is not limited to the application preloading operation described above, and may also execute the application provided by any embodiment of the present application Related operations in the preload method.
本申请实施例提供了一种移动终端,该移动终端中可集成本申请实施例提供的应用程序预加载装置。图8为本申请实施例提供的一种移动终端的结构示意图。移动终端800可以包括:存储器801,处理器802及存储在存储器801上并可在处理器802运行的计算机程序,所述处理器802执行所述计算机程序时实现如本申请实施例所述的应用程序预加载方法。The embodiment of the present application provides a mobile terminal, and the mobile terminal may integrate the application preloading device provided by the embodiment of the present application. FIG. 8 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application. The mobile terminal 800 may include: a memory 801, a processor 802, and a computer program stored on the memory 801 and executable by the processor 802. When the processor 802 executes the computer program, the application according to the embodiment of the present application is implemented. Program preloading method.
本申请实施例提供的移动终端,可以根据预测出来的待预加载的应用程序的启动概率的不同,来选择合适的预加载策略,合理利用系统资源进行预加载,完善预加载功能。The mobile terminal provided in the embodiment of the present application can select a suitable preloading strategy according to the predicted startup probability of the application to be preloaded, reasonably utilize system resources for preloading, and improve the preloading function.
图9为本申请实施例提供的另一种移动终端的结构示意图,该移动终端可以包括:壳体(图中未示出)、存储器901、中央处理器(central processing unit,CPU)902(又称处理器)、电路板(图中未示出)和电源电路(图中未示出)。所述电路板安置在所述壳体围成的空间内部;所述CPU 902和所述存储器901设置在所述电路板上;所述电源电路,设置为为所述移动终端的多个电路或器件供电;所述存储器901,设置为存储可执行程序代码;所述CPU 902通过读取所述存储器901中存储的可执行程序代码来运行与所述可执行程序代码对应的计算机程序,以实现以下步骤:FIG. 9 is a schematic structural diagram of another mobile terminal according to an embodiment of the present application. The mobile terminal may include a housing (not shown), a memory 901, a central processing unit (CPU) 902 (and (Referred to as a processor), a circuit board (not shown in the figure), and a power supply circuit (not shown in the figure). The circuit board is disposed in a space surrounded by the housing; the CPU 902 and the memory 901 are provided on the circuit board; and the power supply circuit is provided as a plurality of circuits of the mobile terminal or The device supplies power; the memory 901 is configured to store executable program code; the CPU 902 reads the executable program code stored in the memory 901 to run a computer program corresponding to the executable program code to implement The following steps:
检测到应用预加载事件被触发时,预测候选应用程序的启动概率,所述启动概率包括应用程序即将被打开的概率;When it is detected that the application preload event is triggered, predicting the launch probability of the candidate application, the launch probability includes a probability that the application is about to be opened;
根据所述启动概率,确定所述候选应用程序中包含的待预加载应用程序以及所述待预加载应用程序对应的预加载策略;Determining, according to the startup probability, an application to be preloaded included in the candidate application and a preloading strategy corresponding to the application to be preloaded;
依照所述预加载策略对所述待预加载应用程序进行相应的预加载操作。Perform a corresponding preload operation on the application to be preloaded according to the preload policy.
所述移动终端还包括:外设接口903、射频(Radio Frequency,RF)电路905、音频电路906、扬声器911、电源管理芯片908、输入/输出(Input/Output,I/O)子系统909、其他输入/控制设备910、触摸屏912、其他输入/控制设备910以及外部端口904,这些部件通过一个或多个通信总线或信号线907来通信。The mobile terminal further includes: a peripheral interface 903, a radio frequency (RF) circuit 905, an audio circuit 906, a speaker 911, a power management chip 908, an input / output (I / O) subsystem 909, Other input / control devices 910, touch screen 912, other input / control devices 910, and external ports 904, these components communicate through one or more communication buses or signal lines 907.
应该理解的是,图示移动终端900仅仅是移动终端的一个范例,并且移动终端900可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的一种或多种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the illustrated mobile terminal 900 is only an example of a mobile terminal, and the mobile terminal 900 may have more or fewer components than those shown in the figure, and may combine two or more components. Or it can have different component configurations. The one or more 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 the mobile terminal for application preloading provided in this embodiment. The mobile terminal uses a mobile phone as an example.
存储器901,所述存储器901可以被CPU 902、外设接口903等访问,所述存储器901可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。 Memory 901, which can be accessed by CPU 902, peripheral interface 903, etc. The memory 901 can include high-speed random access memory, and can also include non-volatile memory, such as one or more disk storage devices, flash memory Devices, or other volatile solid-state storage devices.
外设接口903,所述外设接口903可以将设备的输入和输出外设连接到CPU 902和存储器901。 Peripheral interface 903, which can connect the input and output peripherals of the device to the CPU 902 and the memory 901.
I/O子系统909,所述I/O子系统909可以将设备上的输入输出外设,例如触摸屏912和其他输入/控制设备910,连接到外设接口903。I/O子系统909可以包括显示控制器9091和用于控制其他输入/控制设备910的一个或多个输入控制器9092。其中,一个或多个输入控制器9092从其他输入/控制设备910接收电信号或者向其他输入/控制设备910发送电信号,其他输入/控制设备910可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器9092可以与以下任一个连接:键盘、红外端口、通用串行总线(Universal Serial Bus,USB)接口以及诸如鼠标的指示设备。I / O subsystem 909, which can connect input / output peripherals on the device, such as touch screen 912 and other input / control devices 910, to 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. Among them, one or more input controllers 9092 receive electrical signals from or send electrical signals to other input / control devices 910. Other input / control devices 910 may include physical buttons (press buttons, rocker buttons, etc.) ), Dial, slide switch, joystick, click wheel. It is worth noting that the input controller 9092 may be connected to any of the following: a keyboard, an infrared port, a universal serial bus (Universal Serial Bus, USB) interface, and a pointing device such as a mouse.
触摸屏912,所述触摸屏912是用户移动终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。A touch screen 912, which is an input interface and an output interface between the user's mobile terminal and the user, and displays visual output to the user. The visual output may include graphics, text, icons, videos, and the like.
I/O子系统909中的显示控制器9091从触摸屏912接收电信号或者向触摸屏912发送电信号。触摸屏912检测触摸屏上的接触,显示控制器9091将检测到的接触转换为与显示在触摸屏912上的用户界面对象的交互,即实现人机交互,显示在触摸屏912上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。The display controller 9091 in the I / O subsystem 909 receives an electric signal from the touch screen 912 or sends an electric signal 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 interaction with a user interface object displayed on the touch screen 912, that is, realizes human-computer interaction. The user interface object displayed on the touch screen 912 may be running Icons for games, icons connected to the appropriate network, etc. It is worth noting that the device may also include a light mouse, which is a touch-sensitive surface that does not display visual output, or an extension of the touch-sensitive surface formed by a touch screen.
RF电路905,设置为建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。在一实施例中,RF电路905接收并发送RF信号,RF信号也称为电磁信号,RF电路905将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路905可以包括用于执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、编译码器(COder-DECoder,CODEC)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。The RF circuit 905 is configured to establish communication between a mobile phone and a wireless network (that is, a network side), and realize data reception and transmission of the mobile phone and the wireless network. For example, send and receive text messages, e-mail, and so on. In an embodiment, the RF circuit 905 receives and sends RF signals. The RF signals are also referred to as electromagnetic signals. The RF circuit 905 converts electrical signals into electromagnetic signals or converts electromagnetic signals into electrical signals, and communicates with the communication network through the electromagnetic signals. As well as other devices. RF circuit 905 may include known circuits for performing these functions, including, but not limited to, antenna systems, RF transceivers, one or more amplifiers, tuners, one or more oscillators, digital signal processors, codecs (COder-DECoder, CODEC) chipset, Subscriber Identity Module (SIM), and so on.
音频电路906,设置为从外设接口903接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器911。The audio circuit 906 is configured to receive audio data from the peripheral interface 903, convert the audio data into an electrical signal, and send the electrical signal to the speaker 911.
扬声器911,设置为将手机通过RF电路905从无线网络接收的语音信号,还原为声音并向用户播放该声音。The speaker 911 is configured to restore a voice signal received by the mobile phone from the wireless network through the RF circuit 905 to a sound and play the sound to a user.
电源管理芯片908,设置为为CPU 902、I/O子系统及外设接口所连接的硬件进行供电及电源管理。The power management chip 908 is configured to provide power and power management for the hardware connected to the CPU 902, the I / O subsystem, and peripheral interfaces.
上述实施例中提供的应用程序预加载装置、存储介质及移动终端可执行本申请任意实施例所提供的应用程序预加载方法,具备执行该方法相应的功能模块和效果。未在上述实施例中详尽描述的技术细节,可参见本申请任意实施例所提供的应用程序预加载方法。The application preloading device, storage medium, and mobile terminal provided in the foregoing embodiments can execute the application preloading method provided in any embodiment of the present application, and have corresponding function modules and effects for executing the method. For technical details not described in detail in the foregoing embodiments, reference may be made to an application preloading method provided in any embodiment of the present application.

Claims (20)

  1. 一种应用程序预加载方法,包括:An application preloading method includes:
    检测到应用预加载事件被触发时,预测候选应用程序的启动概率,所述启动概率包括应用程序即将被打开的概率;When it is detected that the application preload event is triggered, predicting the launch probability of the candidate application, the launch probability includes a probability that the application is about to be opened;
    根据所述启动概率,确定所述候选应用程序中包含的待预加载应用程序以及所述待预加载应用程序对应的预加载策略;Determining, according to the startup probability, an application to be preloaded included in the candidate application and a preloading strategy corresponding to the application to be preloaded;
    依照所述预加载策略对所述待预加载应用程序进行相应的预加载操作。Perform a corresponding preload operation on the application to be preloaded according to the preload policy.
  2. 根据权利要求1所述的方法,其中,所述根据所述启动概率,确定所述候选应用程序中包含的待预加载应用程序以及所述待预加载应用程序对应的预加载策略,包括:The method according to claim 1, wherein the determining, according to the startup probability, a to-be-loaded application included in the candidate application and a pre-loading strategy corresponding to the to-be-loaded application comprises:
    将所述启动概率由高到低排列或由低到高排列,并从高的启动概率开始顺序获取预设数值个启动概率,将所述预设数值个启动概率对应的候选应用程序确定为所述候选应用程序中包含的待预加载应用程序;Arranging the startup probabilities from high to low or from low to high, and sequentially obtaining a preset number of startup probabilities from a high startup probability, and determining candidate applications corresponding to the preset value of the startup probabilities as all The applications to be preloaded included in the candidate applications are described;
    根据所述待预加载应用程序的启动概率确定所述待预加载应用程序对应的预加载资源,其中,启动概率越高的待预加载应用程序对应的预加载资源越多。The preloaded resources corresponding to the application to be preloaded are determined according to the startup probability of the application to be preloaded, where the higher the startup probability is, the more preloaded resources corresponding to the application to be preloaded are.
  3. 根据权利要求2所述的方法,其中,所述预加载资源包括应用进程启动、应用进程初始化、应用服务启动、内存分配、文件内容读取、网络数据获取和界面渲染中的至少一项操作的相关资源。The method according to claim 2, wherein the preloaded resources include at least one of an application process startup, application process initialization, application service startup, memory allocation, file content reading, network data acquisition, and interface rendering. related resources.
  4. 根据权利要求3所述的方法,其中,所述根据所述待预加载应用程序的启动概率确定所述待预加载应用程序对应的预加载资源,包括:The method according to claim 3, wherein determining the preloaded resource corresponding to the application to be preloaded according to a startup probability of the application to be preloaded comprises:
    根据所述待预加载应用程序的启动概率将所述待预加载应用程序划分为第一类应用程序和第二类应用程序;其中,所述第一类应用程序对应的启动概率大于所述第二类应用程序对应的启动概率;Classifying the to-be-loaded application into a first-type application and a second-type application according to the starting probability of the to-be-loaded application; wherein the first-type application corresponds to a greater than- Startup probability corresponding to the second type of application;
    确定所述第一类应用程序对应的预加载资源包括所述应用进程启动、所述应用进程初始化、所述应用服务启动、所述内存分配、所述文件内容读取、所述网络数据获取和所述界面渲染;It is determined that the pre-loaded resources corresponding to the first type of application include the application process startup, the application process initialization, the application service startup, the memory allocation, the file content reading, the network data acquisition, and The interface rendering;
    确定所述第二类应用程序对应的预加载资源包括所述应用进程启动、所述应用进程初始化、所述应用服务启动、所述内存分配和所述文件内容读取。Determining the preloaded resource corresponding to the second type of application includes the application process startup, the application process initialization, the application service startup, the memory allocation, and the file content reading.
  5. 根据权利要求3所述的方法,其中,当针对所述界面渲染进行预加载操作时,包括:The method according to claim 3, wherein when performing a preloading operation for the interface rendering, comprising:
    基于预先创建的预加载活动窗口堆栈预加载所述待预加载应用程序对应的应用界面,其中,所述预加载活动窗口堆栈对应的边界坐标位于显示屏幕的坐标范围之外。An application interface corresponding to the application to be preloaded is preloaded based on a pre-created preloaded active window stack, wherein a boundary coordinate corresponding to the preloaded active window stack is outside a coordinate range of a display screen.
  6. 根据权利要求1所述的方法,其中,所述根据所述启动概率,确定所述候选应用程序中包含的待预加载应用程序以及所述待预加载应用程序对应的预加载策略,包括:The method according to claim 1, wherein the determining, according to the startup probability, a to-be-loaded application included in the candidate application and a pre-loading strategy corresponding to the to-be-loaded application comprises:
    根据所述启动概率确定所述候选应用程序中包含的待预加载应用程序;Determining an application to be preloaded included in the candidate application according to the startup probability;
    获取用户的当前行为状态信息;Get the user's current behavior status information;
    根据所述当前行为状态信息以及所述启动概率确定所述待预加载应用程序对应的预加载策略。Determine a preloading strategy corresponding to the application to be preloaded according to the current behavior state information and the startup probability.
  7. 根据权利要求1所述的方法,在依照所述预加载策略对待预加载应用程序进行相应的预加载操作之后,还包括:The method according to claim 1, after performing a corresponding preloading operation on the preloaded application according to the preloading policy, further comprising:
    在接收到已进行预加载操作的目标应用程序的运行指令的情况下,基于已预加载资源启 动所述目标应用程序。When a running instruction of a target application that has been preloaded is received, the target application is started based on the preloaded resource.
  8. 根据权利要求1所述的方法,其中,所述根据所述启动概率,确定所述候选应用程序中包含的待预加载应用程序,包括:The method according to claim 1, wherein determining the to-be-loaded application included in the candidate application according to the startup probability comprises:
    将所述启动概率大于预设概率阈值的候选应用程序确定为所述待预加载应用程序。A candidate application whose startup probability is greater than a preset probability threshold is determined as the application to be preloaded.
  9. 根据权利要求6所述的方法,其中,所述获取用户的当前行为状态信息,包括:The method according to claim 6, wherein the acquiring current behavior state information of a user comprises:
    判断所述待预加载应用程序中是否包含预设应用程序;Determining whether the application to be preloaded includes a preset application;
    在所述待预加载应用程序中包含所述预设应用程序的情况下,获取所述用户的当前行为状态信息;If the preset application is included in the application to be preloaded, obtaining current behavior status information of the user;
    其中,所述预设应用程序由服务器推送,或者根据历史采集的用户使用习惯来确定。Wherein, the preset application program is pushed by the server, or determined according to the user's usage habits collected in history.
  10. 根据权利要求9所述的方法,其中,所述根据所述当前行为状态信息以及所述启动概率确定所述待预加载应用程序对应的预加载策略,包括:The method according to claim 9, wherein determining the preloading strategy corresponding to the application to be preloaded according to the current behavior state information and the startup probability comprises:
    根据所述启动概率所属概率区间确定所述预设应用程序对应的初步预加载策略;Determining a preliminary preloading strategy corresponding to the preset application according to a probability interval to which the startup probability belongs;
    根据所述当前行为状态信息对所述初步预加载策略进行修正。Modify the preliminary preloading strategy according to the current behavior state information.
  11. 根据权利要求5所述的方法,其中,所述依照所述预加载策略对待预加载应用程序进行相应的预加载操作,包括:The method according to claim 5, wherein the performing a corresponding preloading operation on the preloaded application according to the preloading policy comprises:
    所述预加载操作包括所述界面渲染;The preloading operation includes the interface rendering;
    在依照所述预加载策略对待预加载应用程序进行相应的预加载操作之后,还包括:After performing a corresponding preloading operation on the preloaded application according to the preloading strategy, the method further includes:
    在接收到已进行预加载操作的目标应用程序的运行指令的情况下,将所述预加载活动窗口堆栈中包含的所述目标应用程序对应的应用界面迁移至所述显示屏幕进行显示。When a running instruction of the target application that has been preloaded is received, an application interface corresponding to the target application included in the preloading active window stack is migrated to the display screen for display.
  12. 根据权利要求11所述的方法,其中,所述将所述预加载活动窗口堆栈中包含的所述目标应用程序对应的应用界面迁移至所述显示屏幕进行显示,包括:The method according to claim 11, wherein the migrating an application interface corresponding to the target application included in the preloaded active window stack to the display screen for display comprises:
    将所述预加载活动窗口堆栈中包含的所述目标应用程序对应的任务栈迁移至应用活动窗口堆栈的顶部,更新所述任务栈的尺寸信息、配置信息和可见性,以实现所述目标应用程序对应的应用界面在所述显示屏幕进行显示。Migrate the task stack corresponding to the target application included in the preloaded active window stack to the top of the application active window stack, and update the size information, configuration information, and visibility of the task stack to achieve the target application The application interface corresponding to the program is displayed on the display screen.
  13. 一种应用程序预加载装置,包括:An application preloading device includes:
    启动概率预测模块,设置为检测到应用预加载事件被触发时,预测候选应用程序的启动概率,所述启动概率包括应用程序即将被打开的概率;The startup probability prediction module is configured to predict a startup probability of a candidate application when an application preload event is triggered, where the startup probability includes a probability that the application is about to be opened;
    应用确定模块,设置为根据所述启动概率确定所述候选应用程序中包含的待预加载应用程序;An application determining module configured to determine an application to be preloaded included in the candidate application according to the startup probability;
    预加载策略确定模块,设置为根据所述启动概率确定所述待预加载应用程序对应的预加载策略;A preloading policy determining module, configured to determine a preloading policy corresponding to the application to be preloaded according to the startup probability;
    预加载模块,设置为依照所述预加载策略对待预加载应用程序进行预加载操作。The preloading module is configured to perform a preloading operation on the preloaded application program according to the preloading policy.
  14. 根据权利要求13所述的装置,其中,所述应用确定模块是设置为:The apparatus according to claim 13, wherein the application determining module is configured to:
    将所述启动概率由高到低排列或由低到高排列,并从高的启动概率开始顺序获取预设数值个启动概率,将所述预设数值个启动概率对应的候选应用程序确定为所述候选应用程序中包含的待预加载应用程序;或者,Arranging the startup probabilities from high to low or from low to high, and sequentially obtaining a preset number of startup probabilities from a high startup probability, and determining candidate applications corresponding to the preset value of the startup probabilities as all The application to be preloaded included in the candidate application; or
    将所述启动概率大于预设概率阈值的候选应用程序确定为所述待预加载应用程序。A candidate application whose startup probability is greater than a preset probability threshold is determined as the application to be preloaded.
  15. 根据权利要求14所述的装置,其中,所述预加载策略确定模块是设置为:根据所述待预加载应用程序的启动概率确定所述待预加载应用程序对应的预加载资源,其中,启动概率越高的待预加载应用程序对应的预加载资源越多。The apparatus according to claim 14, wherein the preloading policy determination module is configured to determine a preloaded resource corresponding to the application to be preloaded according to a startup probability of the application to be preloaded, and The higher the probability, the more preloaded resources correspond to the application to be preloaded.
  16. 根据权利要求15所述的装置,其中,所述预加载资源包括应用进程启动、应用进程初始化、应用服务启动、内存分配、文件内容读取、网络数据获取和界面渲染中的至少一项操作的相关资源。The device according to claim 15, wherein the preloaded resource includes at least one of an application process startup, application process initialization, application service startup, memory allocation, file content reading, network data acquisition, and interface rendering. related resources.
  17. 根据权利要求16所述的装置,其中,所述预加载策略确定模块是设置为:The apparatus according to claim 16, wherein the preloading policy determining module is configured to:
    根据所述待预加载应用程序的启动概率将所述待预加载应用程序划分为第一类应用程序和第二类应用程序;其中,所述第一类应用程序对应的启动概率大于所述第二类应用程序对应的启动概率;Classifying the to-be-loaded application into a first-type application and a second-type application according to the starting probability of the to-be-loaded application; wherein the first-type application corresponds to a greater than- Startup probability corresponding to the second type of application;
    确定所述第一类应用程序对应的预加载资源包括所述应用进程启动、所述应用进程初始化、所述应用服务启动、所述内存分配、所述文件内容读取、所述网络数据获取和所述界面渲染;It is determined that the pre-loaded resources corresponding to the first type of application include the application process startup, the application process initialization, the application service startup, the memory allocation, the file content reading, the network data acquisition, and The interface rendering;
    确定所述第二类应用程序对应的预加载资源包括所述应用进程启动、所述应用进程初始化、所述应用服务启动、所述内存分配和所述文件内容读取。Determining the preloaded resource corresponding to the second type of application includes the application process startup, the application process initialization, the application service startup, the memory allocation, and the file content reading.
  18. 根据权利要求13所述的装置,还包括:The apparatus according to claim 13, further comprising:
    启动模块,设置为在依照所述预加载策略对待预加载应用程序进行相应的预加载操作之后,在接收到已进行预加载操作的目标应用程序的运行指令的情况下,基于已预加载资源启动所述目标应用程序。The startup module is configured to, after performing a corresponding preload operation on the preloaded application program according to the preloading policy, and upon receiving a running instruction of the target application program that has performed the preload operation, start based on the preloaded resource. The target application.
  19. 一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-12中任一项所述的方法。A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the method according to any one of claims 1-12 is implemented.
  20. 一种移动终端,包括存储器,处理器及存储在所述存储器上并可在所述处理器运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1-12中任一项所述的方法。A mobile terminal includes a memory, a processor, and a computer program stored on the memory and executable by the processor. When the processor executes the computer program, any one of claims 1-12 is implemented. The method described.
PCT/CN2019/085463 2018-05-21 2019-05-05 Application program preloading method and apparatus, storage medium, and mobile terminal WO2019223510A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810490618.9A CN108681475B (en) 2018-05-21 2018-05-21 Application program preloading method and device, storage medium and mobile terminal
CN201810490618.9 2018-05-21

Publications (1)

Publication Number Publication Date
WO2019223510A1 true WO2019223510A1 (en) 2019-11-28

Family

ID=63807343

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/085463 WO2019223510A1 (en) 2018-05-21 2019-05-05 Application program preloading method and apparatus, storage medium, and mobile terminal

Country Status (2)

Country Link
CN (1) CN108681475B (en)
WO (1) WO2019223510A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124632A (en) * 2019-12-06 2020-05-08 西安易朴通讯技术有限公司 Optimization method and device of mobile terminal, terminal equipment and storage medium
CN111767837A (en) * 2020-06-28 2020-10-13 中国计量大学 Visual assessment method for valve operation normative during loading and unloading of tank truck
CN111966603A (en) * 2020-09-04 2020-11-20 网易(杭州)网络有限公司 Memory leak detection method and device, readable storage medium and electronic equipment
CN112416402A (en) * 2020-11-23 2021-02-26 百度在线网络技术(北京)有限公司 Applet updating method and device, electronic equipment and storage medium
CN112685104A (en) * 2021-01-07 2021-04-20 北京字节跳动网络技术有限公司 Application program starting control method and device, electronic equipment and storage medium
CN114780167A (en) * 2022-03-28 2022-07-22 上海幻电信息科技有限公司 Preloading method and system based on ReactNative
CN115002216A (en) * 2022-04-27 2022-09-02 北京奇艺世纪科技有限公司 Downloading method, downloading device, terminal equipment and readable storage medium
CN115705241A (en) * 2021-08-10 2023-02-17 荣耀终端有限公司 Application scheduling method and electronic equipment

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11922187B2 (en) 2018-03-05 2024-03-05 Tensera Networks Ltd. Robust application preloading with accurate user experience
WO2019171237A1 (en) * 2018-03-05 2019-09-12 Tensera Networks Ltd. Application preloading in the presence of user actions
CN108681475B (en) * 2018-05-21 2021-11-26 Oppo广东移动通信有限公司 Application program preloading method and device, storage medium and mobile terminal
CN109739639A (en) * 2018-12-07 2019-05-10 珠海格力电器股份有限公司 A kind of teaching machine memory uses management method, device, terminal and storage medium
CN109743456B (en) * 2018-12-29 2021-03-12 Oppo广东移动通信有限公司 Data transmission method and related device
CN110035126A (en) * 2019-04-17 2019-07-19 珠海金山网络游戏科技有限公司 A kind of document handling method, calculates equipment and storage medium at device
CN110231963B (en) * 2019-06-12 2022-11-15 Oppo广东移动通信有限公司 Application control method and related device
CN114144777A (en) 2019-07-30 2022-03-04 腾赛拉网络有限公司 Pre-rendering of application user interface in user equipment
CN110996134B (en) * 2019-12-23 2022-09-09 腾讯科技(深圳)有限公司 Video playing method, device and storage medium
CN112162796A (en) * 2020-10-10 2021-01-01 Oppo广东移动通信有限公司 Application starting method and device, terminal equipment and storage medium
CN116627534B (en) * 2021-11-19 2024-04-05 荣耀终端有限公司 Application processing method and device
WO2024090897A1 (en) * 2022-10-28 2024-05-02 삼성전자 주식회사 Iot device control device and control method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130120294A1 (en) * 2011-11-16 2013-05-16 Samsung Electronics Co. Ltd. Apparatus with touch screen for preloading multiple applications and method of controlling the same
CN103369508A (en) * 2013-06-25 2013-10-23 华为技术有限公司 Data loading method and terminal device
CN106528210A (en) * 2016-10-20 2017-03-22 广东欧珀移动通信有限公司 Application running method and apparatus
CN107783801A (en) * 2017-11-06 2018-03-09 广东欧珀移动通信有限公司 Application program forecast model is established, preloads method, apparatus, medium and terminal
CN108681475A (en) * 2018-05-21 2018-10-19 Oppo广东移动通信有限公司 Application program preloads method, apparatus, storage medium and mobile terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120324481A1 (en) * 2011-06-16 2012-12-20 Samsung Electronics Co. Ltd. Adaptive termination and pre-launching policy for improving application startup time
US9508040B2 (en) * 2013-06-12 2016-11-29 Microsoft Technology Licensing, Llc Predictive pre-launch for applications
CN103376974A (en) * 2013-06-28 2013-10-30 广州市动景计算机科技有限公司 Window switching method and device
CN106547582A (en) * 2015-09-22 2017-03-29 阿里巴巴集团控股有限公司 A kind of preprocess method and device
CN108647055B (en) * 2018-05-10 2021-05-04 Oppo广东移动通信有限公司 Application program preloading method and device, storage medium and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130120294A1 (en) * 2011-11-16 2013-05-16 Samsung Electronics Co. Ltd. Apparatus with touch screen for preloading multiple applications and method of controlling the same
CN103369508A (en) * 2013-06-25 2013-10-23 华为技术有限公司 Data loading method and terminal device
CN106528210A (en) * 2016-10-20 2017-03-22 广东欧珀移动通信有限公司 Application running method and apparatus
CN107783801A (en) * 2017-11-06 2018-03-09 广东欧珀移动通信有限公司 Application program forecast model is established, preloads method, apparatus, medium and terminal
CN108681475A (en) * 2018-05-21 2018-10-19 Oppo广东移动通信有限公司 Application program preloads method, apparatus, storage medium and mobile terminal

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124632B (en) * 2019-12-06 2024-02-13 西安易朴通讯技术有限公司 Optimization method and device of mobile terminal, terminal equipment and storage medium
CN111124632A (en) * 2019-12-06 2020-05-08 西安易朴通讯技术有限公司 Optimization method and device of mobile terminal, terminal equipment and storage medium
CN111767837B (en) * 2020-06-28 2023-12-05 中国计量大学 Visual assessment method for valve operation normalization during loading and unloading of tank truck
CN111767837A (en) * 2020-06-28 2020-10-13 中国计量大学 Visual assessment method for valve operation normative during loading and unloading of tank truck
CN111966603A (en) * 2020-09-04 2020-11-20 网易(杭州)网络有限公司 Memory leak detection method and device, readable storage medium and electronic equipment
CN111966603B (en) * 2020-09-04 2024-01-19 网易(杭州)网络有限公司 Memory leakage detection method and device, readable storage medium and electronic equipment
CN112416402A (en) * 2020-11-23 2021-02-26 百度在线网络技术(北京)有限公司 Applet updating method and device, electronic equipment and storage medium
CN112685104A (en) * 2021-01-07 2021-04-20 北京字节跳动网络技术有限公司 Application program starting control method and device, electronic equipment and storage medium
CN115705241B (en) * 2021-08-10 2023-12-15 荣耀终端有限公司 Application scheduling method and electronic equipment
CN115705241A (en) * 2021-08-10 2023-02-17 荣耀终端有限公司 Application scheduling method and electronic equipment
CN114780167A (en) * 2022-03-28 2022-07-22 上海幻电信息科技有限公司 Preloading method and system based on ReactNative
CN115002216A (en) * 2022-04-27 2022-09-02 北京奇艺世纪科技有限公司 Downloading method, downloading device, terminal equipment and readable storage medium
CN115002216B (en) * 2022-04-27 2024-02-23 北京奇艺世纪科技有限公司 Downloading method, downloading device, terminal equipment and readable storage medium

Also Published As

Publication number Publication date
CN108681475A (en) 2018-10-19
CN108681475B (en) 2021-11-26

Similar Documents

Publication Publication Date Title
WO2019223510A1 (en) Application program preloading method and apparatus, storage medium, and mobile terminal
WO2019223578A1 (en) Application program preloading method and apparatus, and storage medium and terminal
CN108647055B (en) Application program preloading method and device, storage medium and terminal
CN108762843B (en) Application program preloading method and device, storage medium and intelligent terminal
CN108614722B (en) Application program preloading method and device, storage medium and terminal
US20200342338A1 (en) Method for preloading application, storage medium, and terminal
US11604660B2 (en) Method for launching application, storage medium, and terminal
EP3575961B1 (en) Method and apparatus for updating application prediction model, storage medium, and terminal
WO2019233241A1 (en) Method and apparatus for starting application program, and storage medium and terminal
US11099861B2 (en) Method for preloading application, storage medium, and terminal
CN108628645B (en) Application program preloading method and device, storage medium and terminal
CN108762831B (en) Application program preloading method and device, storage medium and terminal
CN108595224B (en) Application program prompting method and device, storage medium and terminal
CN108776599B (en) Management method and device for preloaded application, storage medium and intelligent terminal
WO2019223511A1 (en) Application program preloading method and apparatus, storage medium, and terminal
CN108958828B (en) Application program preloading method and device, storage medium and terminal
WO2019228134A1 (en) Application program pre-loading method and device, storage medium, and terminal
WO2019223540A1 (en) Application program preloading method and apparatus, storage medium, and terminal
WO2019218886A1 (en) Application pre-loading management method, device, storage medium and smart terminal
CN108647056B (en) Application program preloading method and device, storage medium and terminal
WO2019214476A1 (en) Screen direction setting method and device, storage medium and terminal
WO2019228149A1 (en) Collection method and apparatus for prediction sample, and storage medium and smart terminal
CN108762836B (en) Management method and device for preloaded application, storage medium and intelligent terminal
CN108664286B (en) Application program preloading method and device, storage medium and mobile terminal
CN108762838B (en) Application program preloading method and device, storage medium and terminal

Legal Events

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

Ref document number: 19808019

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19808019

Country of ref document: EP

Kind code of ref document: A1