CN114398094A - Applet starting method, device, equipment and computer readable storage medium - Google Patents

Applet starting method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN114398094A
CN114398094A CN202111571828.9A CN202111571828A CN114398094A CN 114398094 A CN114398094 A CN 114398094A CN 202111571828 A CN202111571828 A CN 202111571828A CN 114398094 A CN114398094 A CN 114398094A
Authority
CN
China
Prior art keywords
applet
target
program
target applet
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111571828.9A
Other languages
Chinese (zh)
Other versions
CN114398094B (en
Inventor
夏季
沈玺
汤之雄
解楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Unionpay Co Ltd
Original Assignee
China Unionpay Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN202111571828.9A priority Critical patent/CN114398094B/en
Publication of CN114398094A publication Critical patent/CN114398094A/en
Application granted granted Critical
Publication of CN114398094B publication Critical patent/CN114398094B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/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
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a small program starting method, a small program starting device, small program starting equipment and a computer readable storage medium. The small program starting method comprises the steps of executing small program container pre-rendering operation under the condition that a target application program is started to obtain pre-loaded resources; loading a first program resource corresponding to a first target applet based on the preloading resource; receiving a first input of a user starting a target applet; in response to a first input, performing page rendering on the target applet based on the first program resource to start the target applet, if the target applet is a first target applet; and in the case that the target applet is a second target applet, loading the target applet based on the preloading resource in response to the first input so as to start the target applet, wherein the second target applet is any one of the plurality of applets except the first target applet. According to the method and the device, the starting speed of the applet can be improved, and the use experience of a user is improved.

Description

Applet starting method, device, equipment and computer readable storage medium
Technical Field
The present application belongs to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for starting an applet.
Background
With the rapid development of applet related technologies, more and more services are provided in an applet manner, and more applications have applet running capabilities. In the process of opening the applet by a user, the problems of slow startup of the applet, blank pages, unsmooth page switching and the like often occur, and therefore how to improve the startup speed of the applet becomes one of the key problems for improving the user experience.
In the prior art, a main mode of applet starting is that a series of resource loading processes are started after a user triggers and starts an applet, so that the applet starting speed is too low, and especially under the conditions of poor equipment performance, weak networks and the like, the problems of blank pages, overlong user waiting time and the like easily occur, so that the user experience is poor.
Disclosure of Invention
The embodiment of the application provides a method, a device and equipment for starting an applet and a computer readable storage medium, which can improve the starting speed of the applet and improve the use experience of a user.
In a first aspect, an embodiment of the present application provides an applet starting method, which is applied to a terminal device, and the method includes:
under the condition that a target application program is started, executing small program container pre-rendering operation to obtain pre-loaded resources, wherein the target application program is a host program of a plurality of small programs, and the plurality of small programs comprise a preset number of first target small programs determined according to user historical behavior data;
loading a first program resource corresponding to the first target applet based on the preloading resource;
receiving a first input of a user starting a target applet;
in response to the first input, page rendering the target applet based on the first program resource to launch the target applet if the target applet is the first target applet;
and in response to the first input, loading the target applet based on the preloading resource to start the target applet if the target applet is the second target applet, wherein the second target applet is any one of the plurality of applets except the first target applet.
In some embodiments, before loading the first program resource corresponding to the first target applet based on the preloaded resource, the method further comprises:
sending user information to a server so that the server acquires the historical user behavior data according to the user information, and determining a preset number of first target applets from the plurality of applets according to the historical user behavior data;
receiving a program parameter corresponding to the first target applet and sent by the server;
and downloading and caching a first program resource corresponding to the first target small program according to the program parameter.
The loading, based on the preloaded resource, a first program resource corresponding to the first target applet includes:
verifying the legality of the first program resource to obtain a verification result;
and loading the first program resource corresponding to the first target applet into a memory based on the preloading resource under the condition that the verification result is successful.
In some embodiments, the performing applet container prerender operations comprises: at least one of loading an applet frame, starting an applet process, downloading an applet common resource, loading a kernel resource, and creating an applet container pool, wherein the applet container pool includes a plurality of containers.
In some embodiments, where the pre-loaded resource comprises a plurality of containers in a pool of applet containers, the loading the target applet based on the pre-loaded resource comprises:
acquiring a target container in an idle state from the applet container pool, and loading the target container;
acquiring a second program resource corresponding to the target small program, and loading the second program resource;
page rendering is performed on the target applet based on the second program resource.
In some embodiments, after launching the target applet, the method further comprises:
receiving a second input of the user to close the target applet;
responding to the second input, and determining whether the target applet is set as a resident applet or not according to the equipment state parameter corresponding to the terminal equipment and the user historical behavior parameter and configuration parameter corresponding to the target applet;
hiding the target applet if it is determined that the target applet is set as a resident applet;
in an instance in which it is determined that the target applet is set to a non-resident applet, shutting down the target applet.
In some embodiments, the device status parameter includes a memory usage rate, the user historical behavior parameter includes at least one of an open mode, an access duration, and an access frequency of the target applet, and the configuration parameter includes at least one of a service configuration parameter and a scenario configuration parameter;
determining whether to set the target applet as a resident applet according to the device state parameter corresponding to the terminal device and the user historical behavior parameter and configuration parameter corresponding to the target applet, including:
determining a first decision result according to whether the memory utilization rate of the target application program in the terminal equipment is greater than a preset utilization rate threshold value or not;
determining a second decision result according to at least one of whether the opening mode of the target applet belongs to a preset mode, whether the access time length of the target applet is greater than a preset time length threshold value and whether the access frequency of the target applet is greater than a preset frequency threshold value;
determining whether the target small program belongs to a main business push small program or not according to the business configuration parameters to obtain a third decision result;
determining whether the current access scene is matched with a preset scene corresponding to the target application program or not according to the scene configuration parameters to obtain a fourth decision result;
and determining whether the target applet is set as a resident applet or not according to the first decision result, the second decision result, the third decision result and the fourth decision result.
In some embodiments, the determining whether to set the target applet as a resident applet according to the first decision result, the second decision result, the third decision result and the fourth decision result includes:
determining to set the target applet as a resident applet if at least one of the first decision result, the third decision result or the fourth decision result is to set the target applet as a resident applet, and the second decision result is to set the target applet as a resident applet;
and determining to set the target applet as the non-resident applet if any one of the first decision result, the third decision result and the fourth decision result is to set the target applet as the non-resident applet, or the second decision result is to set the target applet as the non-resident applet.
In a second aspect, an embodiment of the present application further provides an applet starting method, which is applied to a server, and the method includes:
receiving user information sent by terminal equipment, wherein the user information is information of a login user of a target application program in the terminal equipment, and the target application program is a host program of a plurality of small programs;
acquiring historical behavior data of a user according to the user information;
determining a preset number of first target applets from the plurality of applets according to the historical user behavior data;
and sending a program parameter corresponding to the first target applet to the terminal equipment, so that the terminal equipment preloads a first program resource corresponding to the first target applet according to the program parameter before starting the first target applet.
In some embodiments, the user historical behavior data includes applet visit volume information, personal attention information, and personal recent visit information;
the determining a preset number of first target applets from the plurality of applets according to the user historical behavior data includes:
determining a first application parameter for each applet of the plurality of applets according to the applet access amount information;
determining a second application parameter according to the personal attention information;
determining a third application parameter according to the personal recent access information;
weighting and summing the first application parameter, the second application parameter and the third application parameter to obtain evaluation values respectively corresponding to each small program;
determining a preset number of applets from the plurality of applets as the first target applets based on the evaluation values corresponding to each of the applets, respectively.
In some embodiments, the determining a first application parameter according to the applet access amount information includes:
and calculating the first application parameters respectively corresponding to each small program according to the ratio of the access quantity respectively corresponding to each small program to the access quantity respectively corresponding to the small program with the highest access quantity.
In some embodiments, the plurality of applets includes at least one third target applet of interest to the logged-in user;
the determining a second application parameter according to the personal attention information includes:
for the at least one third target applet, acquiring a time interval between attention time and current time corresponding to the third target applet;
determining the arrangement sequence corresponding to the third target applet according to the time interval;
determining a sorting position index value corresponding to the third target applet based on the sorting order;
calculating a second application parameter corresponding to the third target applet according to the sorting position index value;
and determining a first preset value as a second application parameter corresponding to a fourth target applet in the applets, wherein the fourth target applet is other applets except the third target applet in the applets.
In some embodiments, the plurality of applets includes at least one fifth target applet that the logged-on user has accessed within a preset time period;
determining a third application parameter according to the personal recent access information, including:
for the at least one fifth target applet, determining a number of times the fifth target applet is accessed by the login user within the preset time period;
calculating a third application parameter corresponding to the fifth target applet according to the ratio of the times to the total times of accessing the applet by the login user in the preset time period;
and determining a second preset value as a third application parameter corresponding to a sixth target applet in the applets, wherein the sixth target applet is another applet in the applets except the fifth target applet.
In a third aspect, an embodiment of the present application provides an applet starting apparatus, which is applied to a terminal device, and includes:
the system comprises a container rendering module, a resource pre-loading module and a resource pre-loading module, wherein the container rendering module is used for executing small program container pre-rendering operation under the condition that a target application program is started to obtain pre-loaded resources, the target application program is a host program of a plurality of small programs, and the plurality of small programs comprise a preset number of first target small programs determined according to user historical behavior data;
the resource loading module is used for loading a first program resource corresponding to the first target applet based on the preloading resource;
the first input module is used for receiving first input of starting a target applet by a user;
a first launching module to, in response to the first input, page render the target applet based on the first programming resources to launch the target applet if the target applet is the first target applet;
a second starting module, configured to, in response to the first input, load the target applet based on the preloaded resource to start the target applet, if the target applet is the second target applet, where the second target applet is any applet of the multiple applets except the first target applet.
In some embodiments, the apparatus further comprises:
an information sending module, configured to send user information to a server before loading a first program resource corresponding to the first target applet based on the preloaded resource, so that the server obtains the user historical behavior data according to the user information, and determines a preset number of the first target applets from the multiple applets according to the user historical behavior data;
the parameter receiving module is used for receiving the program parameters which are sent by the server and correspond to the first target small program;
and the resource caching module is used for downloading and caching the first program resource corresponding to the first target small program according to the program parameter.
In some embodiments, the resource loading module includes:
the verification submodule is used for verifying the legality of the first program resource to obtain a verification result;
and the loading submodule is used for loading the first program resource corresponding to the first target small program into the memory based on the preloading resource under the condition that the verification result is successful.
In some embodiments, the performing applet container prerender operations comprises: at least one of loading an applet frame, starting an applet process, downloading an applet common resource, loading a kernel resource, and creating an applet container pool, wherein the applet container pool includes a plurality of containers.
In some embodiments, the second initiating module comprises:
the container loading submodule is used for acquiring a target container which is in an idle state currently from the applet container pool and loading the target container under the condition that the preloading resource comprises a plurality of containers in the applet container pool;
the resource loading submodule is used for acquiring a second program resource corresponding to the target applet and loading the second program resource;
and the page rendering submodule is used for performing page rendering on the target small program based on the second program resource.
In some embodiments, the apparatus further comprises:
the second input module is used for receiving a second input of closing the target applet by a user after the target applet is started;
a resident determining module, configured to determine, in response to the second input, whether to set the target applet as a resident applet according to a device state parameter corresponding to the terminal device and a user historical behavior parameter and a configuration parameter corresponding to the target applet;
the program hiding module is used for hiding the target applet under the condition that the target applet is determined to be set as a resident applet;
and the program closing module is used for closing the target applet under the condition that the target applet is determined to be set as the non-resident applet.
In some embodiments, the device status parameter includes a memory usage rate, the user historical behavior parameter includes at least one of an open mode, an access duration, and an access frequency of the target applet, and the configuration parameter includes at least one of a service configuration parameter and a scenario configuration parameter;
the resident determination module comprises:
the first decision submodule is used for determining a first decision result according to whether the memory utilization rate of the target application program in the terminal equipment is greater than a preset utilization rate threshold value or not;
the second decision submodule is used for determining a second decision result according to at least one of whether the opening mode of the target applet belongs to a preset mode, whether the access time length of the target applet is greater than a preset time length threshold value and whether the access frequency of the target applet is greater than a preset frequency threshold value;
the third decision submodule is used for determining whether the target small program belongs to a main business push small program or not according to the business configuration parameters to obtain a third decision result;
the fourth decision submodule is used for determining whether the current access scene is matched with a preset scene corresponding to the target application program or not according to the scene configuration parameters to obtain a fourth decision result;
and the determining submodule is used for determining whether the target applet is set as a resident applet or not according to the first decision result, the second decision result, the third decision result and the fourth decision result.
In some embodiments, the determining sub-module comprises:
a first determining unit, configured to determine that the target applet is set as a resident applet if at least one of the first decision result, the third decision result, or the fourth decision result is to set the target applet as a resident applet, and the second decision result is to set the target applet as a resident applet;
a second determining unit, configured to determine that the target applet is set as a non-resident applet if any one of the first decision result, the third decision result, and the fourth decision result is the target applet is set as the non-resident applet, or the second decision result is the target applet is set as the non-resident applet.
In a fourth aspect, an embodiment of the present application provides an applet starting apparatus, which is applied to a server, and includes:
the system comprises an information receiving module, a processing module and a processing module, wherein the information receiving module is used for receiving user information sent by terminal equipment, the user information is information of a login user of a target application program in the terminal equipment, and the target application program is a host program of a plurality of small programs;
the data acquisition module is used for acquiring historical behavior data of the user according to the user information;
a program determining module, configured to determine a preset number of first target applets from the plurality of applets according to the user historical behavior data;
and the parameter sending module is used for sending the program parameters corresponding to the first target applet to the terminal equipment so that the terminal equipment preloads the first program resource corresponding to the first target applet according to the program parameters before starting the first target applet.
In some embodiments, the user historical behavior data includes applet visit volume information, personal attention information, and personal recent visit information;
the program determining module includes:
the first determining submodule is used for determining a first application parameter according to the small program access amount information aiming at each small program in the plurality of small programs;
the second determining submodule is used for determining a second application parameter according to the personal attention information;
the third determining submodule is used for determining a third application parameter according to the personal recent access information;
the weighted summation sub-module is used for carrying out weighted summation on the first application parameter, the second application parameter and the third application parameter to obtain evaluation values respectively corresponding to each small program;
a target determination sub-module configured to determine a preset number of applets from the plurality of applets as the first target applets based on the evaluation values respectively corresponding to each of the applets.
In some embodiments, the first determination submodule is specifically configured to:
and calculating the first application parameters respectively corresponding to each small program according to the ratio of the access quantity respectively corresponding to each small program to the access quantity respectively corresponding to the small program with the highest access quantity.
In some embodiments, the plurality of applets includes at least one third target applet of interest to the logged-in user;
the second determination submodule includes:
a time obtaining unit, configured to obtain, for the at least one third target applet, a time interval between a time of interest corresponding to the third target applet and a current time;
the sequence arrangement unit is used for determining an arrangement sequence corresponding to the third target applet according to the time interval;
an index determining unit, configured to determine, based on the arrangement order, a ranking position index value corresponding to the third target applet;
the first calculation unit is used for calculating a second application parameter corresponding to the third target applet according to the sorting position index value;
a first determining unit, configured to determine, for a fourth target applet in the multiple applets, a first preset value as a second application parameter corresponding to the fourth target applet, where the fourth target applet is another applet in the multiple applets except the third target applet.
In some embodiments, the plurality of applets includes at least one fifth target applet that the logged-on user has accessed within a preset time period;
the third determination submodule includes:
a number determination unit, configured to determine, for the at least one fifth target applet, a number of times that the fifth target applet is accessed by the login user within the preset time period;
the second calculating unit is used for calculating a third application parameter corresponding to the fifth target applet according to the ratio of the times to the total times of accessing the applet by the login user in the preset time period;
a second determining unit, configured to determine, for a sixth target applet in the multiple applets, a second preset value as a third application parameter corresponding to the sixth target applet, where the sixth target applet is another applet in the multiple applets except the fifth target applet.
In a fifth aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory storing computer program instructions;
the steps of the applet launching method as described in any embodiment of the first aspect are implemented when the computer program instructions are executed by a processor.
In a sixth aspect, the present application provides a computer-readable storage medium, on which computer program instructions are stored, and the computer program instructions, when executed by a processor, implement the steps of the applet starting method as described in any one of the embodiments of the first aspect.
According to the applet starting method, the applet starting device, the applet starting equipment and the computer readable storage medium in the embodiment of the application, after a target application program serving as a host program is started and before a first input for starting the target applet is carried out by a user, the applet container prerendering operation is executed in advance to carry out resource preloading, and after the first input for starting the target applet by the user is received, the target applet can be directly loaded based on the preloaded resource, so that the applet loading time can be saved, and the applet starting speed can be improved. In addition, according to the embodiment of the application, before the user triggers the starting of the applet, the first program resource corresponding to the first target applet which is most likely to be started by the user and is determined according to the historical behavior data of the user is loaded in advance, so that when the user starts the target applet and the target applet is the first target applet, page rendering is directly performed on the target applet based on the first program resource, and the starting process is completed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is an architecture diagram of an example of applet launching provided herein;
FIG. 2 is a flowchart illustrating an embodiment of an applet launching method provided herein;
FIG. 3 is a flow diagram of an example of an applet launching process provided herein;
FIG. 4 is a schematic flow chart diagram illustrating another embodiment of an applet launching method provided herein;
FIG. 5 is a flow diagram of an example of a dynamic decision process provided herein;
FIG. 6a is a schematic diagram of an example of an applet launching scenario provided herein;
FIG. 6b is a schematic diagram of an example of an applet close scenario provided herein;
FIG. 7 is a schematic flow chart diagram illustrating a method for initiating an applet, in accordance with another embodiment;
FIG. 8 is a schematic flow chart diagram illustrating a method for applet launching in accordance with another embodiment;
FIG. 9 is a schematic diagram of an example of an applet evaluation process provided herein;
FIG. 10 is an architecture diagram of an example of an applet launching processing system provided herein;
FIG. 11 is a schematic structural diagram of an embodiment of an applet launching device provided in the present application;
FIG. 12 is a schematic structural diagram of another embodiment of an applet launching device provided in the present application;
fig. 13 is a schematic structural diagram of an embodiment of an electronic device provided in the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application will be described in detail below, and in order to make objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are intended to be illustrative only and are not intended to be limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by illustrating examples thereof.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
After the host program corresponding to the plurality of small programs is started, a user can trigger to start any one of the small programs through the host program. When a user opens a certain applet, a cold start of the applet is required. The cold starting of the small program comprises the starting process of the whole small program from the moment that a user clicks the icon of the small program to the moment that the icon of the small program is displayed on the home page of the small program.
Currently, the cold start process of the applet mainly includes: a terminal initialization process, such as starting a process, initializing Runtime, creating WebView and the like; loading page resources, such as WebView requesting an Html page from a CDN (Content Delivery Network); and (3) loading service data, for example, acquiring corresponding data by a page request or acquiring data through a local storage (localStorage), and then performing operation update on a DOM (Document Object Model). In such applications, the applet is destroyed each time it is closed, and a new applet instance is created again the next time it is opened.
In the cold starting process of the small program, the first step of rendering the page of the small program is kernel initialization, which consumes a certain time, at the moment, the network is in an idle waiting state completely, and in the stages of page resource loading and service data loading, the resource downloading from the network also consumes a certain time. When a user opens a small program in a host App (Application) for the first time and when the performance of terminal equipment is poor, a network is weak, and the like, poor user experience such as a page blank screen, overlong waiting time of the user, and the like is easily caused.
In order to solve the problem of the prior art, embodiments of the present application provide an applet starting method, apparatus, device, and computer-readable storage medium. The applet starting method is applied to the architecture shown in fig. 1, and is specifically described below with reference to fig. 1.
FIG. 1 is an architecture diagram illustrating one example of applet launching provided herein.
As shown in fig. 1, the architecture diagram may include at least one terminal device 10 and a server 11. The terminal device 10 has a target application client installed therein, and the server 11 includes a server corresponding to the target application client. Here, the target application may be a host program of a plurality of applets.
In addition, the server 11 may establish a communication connection with at least one terminal device 10 through a network and perform information interaction. The terminal device 10 may be a device with a communication function, such as a mobile phone, a tablet computer, and an all-in-one machine, or may be a device simulated by a virtual machine or a simulator. The server 11 may be a device having storage and computing functions, such as a cloud server or a server cluster.
According to the above architecture, the applet starting method provided by the embodiment of the present application is described in detail below with reference to fig. 2 to 10.
Fig. 2 is a flowchart illustrating an embodiment of an applet starting method provided in the present application. The applet starting method may be performed by the terminal device 10 shown in fig. 1.
As shown in fig. 2, the applet starting method may specifically include the following steps:
s210, under the condition that a target application program is started, executing small program container pre-rendering operation to obtain pre-loaded resources, wherein the target application program is a host program of a plurality of small programs, and the plurality of small programs comprise a preset number of first target small programs determined according to historical behavior data of a user;
s220, loading a first program resource corresponding to the first target small program based on the preloading resource;
s230, receiving a first input of starting a target applet by a user;
s240, under the condition that the target applet is a first target applet, responding to a first input, and performing page rendering on the target applet based on first program resources to start the target applet; and in the case that the target applet is a second target applet, loading the target applet based on the preloading resource in response to the first input so as to start the target applet, wherein the second target applet is any one of the plurality of applets except the first target applet.
Therefore, after the target application program serving as the host program is started and before the first input for starting the target applet is performed by the user, the small program container pre-rendering operation is executed in advance, resource preloading is performed, and after the first input for starting the target applet by the user is received, the target applet can be directly loaded based on the preloaded resource, so that the applet loading time can be saved, and the applet starting speed can be improved. In addition, according to the embodiment of the application, before the user triggers the starting of the applet, the first program resource corresponding to the first target applet which is most likely to be started by the user and is determined according to the historical behavior data of the user is loaded in advance, so that when the user starts the target applet and the target applet is the first target applet, page rendering is directly performed on the target applet based on the first program resource, and the starting process is completed.
Specific implementations of the above steps are described below.
In some embodiments, in S210, the target application may be a host program of multiple applets, that is, a user may start and run multiple applets through the target application. An applet container may be a container used to provide a runtime environment for an applet. Wherein, one container can be used correspondingly when one small program runs.
When the target application program is started, resources required by starting the applet can be prepared in advance through the small program container pre-rendering operation, and time consumption of a terminal during starting the applet is reduced. In some embodiments, the executing of the applet container prerendering operation in S210 may specifically include: at least one of loading an applet frame, starting an applet process, downloading an applet common resource, loading a kernel resource, and creating an applet container pool, wherein the applet container pool comprises a plurality of containers.
Here, the common resource of the applet may include, for example, a resource such as a common basic package that a plurality of applets all need to use. Loading kernel resources may include, for example, creating WebView, etc. In addition, multiple reusable containers may be included in the created applet container pool so that the applet can be loaded for use after startup.
In addition, the first target applet may be one or more applets of the plurality of applets that are most likely to be launched by the user, where the first target applet may be resource loaded in advance. The first target applet may specifically be determined according to historical user behavior data, where the historical user behavior data includes, but is not limited to, historical behavior data of a user on the whole network of big data statistics, and historical behavior data acquired for a user person, and the historical behavior data may include, for example, applet access information, applet attention information, and the like. In addition, the number of the first target applets for resource loading in advance, that is, the preset number, may be one or more, and may specifically be dynamically set according to an actual situation, for example, a current memory usage situation in the terminal device, and values of the preset number may be differentiated for terminal devices used by different users, which is not limited herein.
It should be noted that the above process of determining the first target applet from the plurality of applets may be executed by the terminal device, or may be executed by a corresponding server, and is not limited herein.
In some embodiments, in S220, for example, on the basis of preloading the resource, before the user triggers to start the first target applet, the loading of the first target applet in advance may specifically include: 1) loading containers, specifically, acquiring free containers from the container pool, and if the free containers exist, loading; if no empty container exists, a new container is built and added into the container pool; 2) loading the resource, specifically, the loading may include reading and parsing a cache resource packet, obtaining a HTTP (Hyper Text Transfer Protocol) cache resource, and asynchronously updating the resource packet, where the cache resource packet may include a preloaded resource and a first program resource corresponding to a first target applet.
In order to further increase the resource loading speed of the first target applet, in some embodiments, before the step S220, the applet starting method provided in this embodiment may further include:
sending user information to a server so that the server obtains user historical behavior data according to the user information, and determining a preset number of first target applets from a plurality of applets according to the user historical behavior data;
receiving program parameters which are sent by a server and correspond to a first target small program;
and downloading and caching a first program resource corresponding to the first target small program according to the program parameters.
Here, the process of determining, from among the plurality of applets, one or more first target applets that the user is most likely to start is performed by the server.
Illustratively, user information can be uploaded to the server by the terminal device when the target application program is started, and communication can be established between the terminal device and the server; the server can obtain corresponding historical user behavior data according to the user information, and then based on the historical user behavior data, N recommendable applets corresponding to the user are calculated by using an applet evaluation model. Thus, the server can issue program parameters { appid-1,.., appid-N } corresponding to the N applets to the terminal equipment. After receiving the program parameters of the N applets, the terminal device analyzes the program parameters, and silently downloads the resource packets corresponding to the N applets, i.e., the first program resource, based on the analyzed program parameters, when the network condition is good, and caches the resource packets locally.
Therefore, by downloading and caching the first program resource corresponding to the first target applet in advance, when the user triggers and starts the first target applet, the user can quickly open and display the page corresponding to the first target applet without depending on the network condition during triggering.
In some embodiments, the S220 may specifically include:
verifying the legality of the first program resource to obtain a verification result;
and loading the first program resource corresponding to the first target applet into the memory based on the pre-loaded resource under the condition that the verification result is that the verification is successful.
Here, before loading the first program resource, validity check may be further performed on the first program resource to improve security of resource loading.
Illustratively, the validity of the resource package may be checked by an applet management module in the terminal device, and if it is determined that the resource package is valid, it is determined whether the first object program is in a starting state, and if the first object program is not started, the first program resource is pre-loaded into the memory, so that when the first object program is started, page rendering is performed based on the loaded first program resource. For a specific resource loading process, reference may be made to the above related description, which is not described herein again.
Therefore, the legitimacy of the resources can be verified before the resources are loaded into the memory, so that the safety and the reliability of the applet resource loading process are improved.
In some embodiments, in S230, the first input may be a click input by which the user triggers the launching of the target applet. The manner for the user to trigger the launching of the applet includes, but is not limited to, clicking a corresponding applet icon from within an applet page in the target application, clicking an applet icon added to a desktop from the system desktop, clicking corresponding applet link information from a third-party application other than the target application, and the like, which is not limited herein.
Here, the target applet may be the first target applet to be preloaded, or may be another applet of the plurality of applets except the first target applet, that is, the second target applet.
In some embodiments, in S240, if the target applet triggered and started by the user is the first target applet, the terminal device may directly complete a page rendering operation on the target applet based on the preloaded first program resource, and further may directly display the target applet based on the rendering result, so as to complete the starting process of the applet.
In addition, if the target applet triggered and started by the user is the second target applet, the terminal device may load the target applet based on the preloaded resource, which may specifically include processes of container loading, resource loading, page rendering, and the like, so as to complete the applet starting process.
Based on this, in a case that the preloaded resource includes a plurality of containers in the applet container pool, in some embodiments, the loading the target applet based on the preloaded resource in the above S240 may specifically include:
acquiring a target container in an idle state from the small program container pool, and loading the target container;
acquiring a second program resource corresponding to the target small program, and loading the second program resource;
and rendering the page of the target small program based on the second program resource.
For example, a container currently in an idle state may be obtained from the applet container pool, if there is a container in the idle state, that is, a target container, the target container is loaded, and if there is no container in the idle state, a container is newly created and added to the container pool.
In the process of loading the second program resource, if the second target applet is the applet opened for the first time, the resource package of the second program resource corresponding to the second target applet can be downloaded first, and if the second target applet is not opened for the first time, the corresponding cache resource package can be directly read from the cache. Meanwhile, reading and analyzing a cache resource packet corresponding to the preloaded resource, acquiring an HTTP (Hyper Text Transfer Protocol) cache resource, and asynchronously updating the resource packet.
Based on the loaded container and resource, an HTML (Hyper Text Markup Language) file resource can be acquired from the CDN, the HTML file resource is parsed, and a DOM (Document Object Model) tree is rendered; and analyzing JS (JavaScript) execution, acquiring business data from the application server, and updating the DOM.
Therefore, by preloading resources, after the container prerendering operation such as a container pool is created in advance, the container loading, resource loading and page rendering processes are directly carried out based on the preloading resources, and the early loading time of the small program can be saved, so that the starting time of the small program is shortened, and the starting speed of the small program is improved.
In order to more clearly describe the above-described aspects of the present application, a detailed description is provided below with reference to fig. 3.
As shown in fig. 3, after the host App is started, a resource preparation phase is first entered, specifically, after the host App is started, an applet container pre-rendering process is triggered, and resources required by the applet running are prepared in advance. The small program container prerendering process comprises the following steps: preloading an applet framework, pre-starting an applet process, pre-downloading common resources such as an applet common basic package and the like, pre-loading kernel resources, pre-creating an applet container pool, and further starting the pre-loading processes of the first N applets.
And after the user clicks the small program icon, starting a formal starting process of the small program. If the applet is other applets than the N preloaded applets, the starting process may specifically include three sub-processes of loading a container, loading a resource, and rendering a top page, where the sub-process corresponding to the loading resource includes three processes of reading the resource, caching the resource by HTTP, and updating the resource, and the sub-process corresponding to the rendering of the top page includes four processes of parsing HTML, DOM rendering, parsing JS execution, and JS request data.
Based on this, in order to increase the starting speed at the time of the secondary start of the applet, after the above S240, referring to fig. 4, the applet starting method provided by the present application may further include the following steps: s2501 to S2504, which are explained in detail below.
S2501, receiving a second input of the user to close the target applet.
Here, the second input may be, for example, a click input by the user to a close button displayed in the display interface corresponding to the target applet.
And S2502, responding to the second input, determining whether the target applet is set as a resident applet or not according to the equipment state parameter corresponding to the terminal equipment, and the user historical behavior parameter and the configuration parameter corresponding to the target applet, if so, executing S2503, and if not, executing S2504.
Here, the device status parameter may be a parameter capable of reflecting a current operation status (e.g., a memory use status) of the terminal device. The user historical behavior parameters may be parameters that reflect historical operations performed by the user on the target applet, wherein the historical operation types include, but are not limited to, an opening mode, a usage duration, a usage frequency, and the like. The configuration parameters may be parameters that are remotely configured by the server backend operator according to the service characteristics or usage scenario characteristics of the target applet.
In a specific example, when a user closes a target applet, the target applet can be determined to be closed or hidden according to a resident memory management policy of the applet, so that the applet can be dynamically managed on demand, and optimization of the secondary second-on effect of the applet is achieved. In particular, the management policy of the applet is generated by a dynamic decision system comprising two parts: user and terminal equipment related local decisions and parameter configurable remote decisions. The final decision result is determined by both parts. Specifically, as shown in fig. 5, the service configuration parameter and the scenario configuration parameter provided by the server are used as remote parameters according to the remote decision, and the device state parameter and the user historical behavior parameter are used as local parameters according to the local decision, so as to obtain a combined decision determined by the remote decision and the local decision. And determining whether the target applet is set as a resident applet or not according to the merging decision, hiding the applet if the target applet is the resident applet, and closing the applet if the target applet is the non-resident applet.
S2503, hiding the target applet.
In some embodiments, in the case where the target applet is set as a resident applet, the user may not completely exit the target applet, hide the target applet, and run in the background while closing the target applet.
S2504, close the target applet.
In some embodiments, where the target applet is set to a non-resident applet, the user, upon closing the target applet, may close the target applet and release the applet container into a container pool for reuse by subsequently launched applets.
Therefore, the target applet is dynamically set as the resident applet, so that the memory can be resident when the user closes the applet, and the time for starting the applet for the second time can be greatly shortened.
In some embodiments, the device status parameter includes a memory usage rate, the user historical behavior parameter includes at least one of an open mode, an access duration, and an access frequency of the target applet, and the configuration parameter includes at least one of a service configuration parameter and a scenario configuration parameter.
Based on this, S2502 may specifically include:
determining a first decision result according to whether the memory utilization rate of the target application program in the terminal equipment is greater than a preset utilization rate threshold value or not;
determining a second decision result according to at least one of whether the opening mode of the target small program belongs to a preset mode, whether the access time length of the target small program is greater than a preset time length threshold value and whether the access frequency of the target small program is greater than a preset frequency threshold value;
determining whether the target small program belongs to a main business small pushing program or not according to the business configuration parameters to obtain a third decision result;
determining whether the current access scene is matched with a preset scene corresponding to the target application program or not according to the scene configuration parameters to obtain a fourth decision result;
and determining whether the target applet is set as a resident applet or not according to the first decision result, the second decision result, the third decision result and the fourth decision result.
Here, a specific implementation of determining the first decision result may be: the method comprises the steps of obtaining a current host App (application program), namely a target application program on the terminal device, a maximum memory maxMemory which can be applied for and a memory totalMemory which is applied for, and further calculating the memory utilization rate according to the ratio of the maxMemory to the totalMemory, wherein the calculation formula of the memory utilization rate is totalMemory/maxMemory, and a first decision result can be obtained by comparing the memory utilization rate with a preset utilization rate threshold value M. For example, when the memory usage rate is greater than M, the obtained first decision result is to set the target applet as a non-resident applet; when the memory utilization rate is less than or equal to M, the obtained first decision result is to set the target applet as a resident applet.
In addition, the specific implementation of determining the second decision result may be: and determining a second decision result according to whether the opening mode S belongs to the preset mode S or not, namely S belongs to S, the access time T reaches a preset time threshold T, namely T is larger than or equal to T, and the access frequency F reaches a preset frequency threshold F, namely F is larger than or equal to F. The preset mode may be a preset common opening mode, and specifically may be any one or more modes in a specific common opening mode set. For example, when the above three conditions are simultaneously satisfied, the second decision result is obtained by setting the target applet as a resident applet, otherwise, the second decision result is obtained by setting the target applet as a non-resident applet. Of course, the second decision result may also be determined according to whether some conditions are met, and is not limited herein.
Specific embodiments of determining the third decision result may be: and (3) determining whether the small program is resident in the background or not through switch configuration according to the service characteristics of the small program, wherein when the parameter form is { appid:1}, the small program is resident, and the other small program is not resident. For example, a business push-up applet may be configured to reside.
Specific embodiments of determining the fourth decision result may be: according to the characteristics of the use scene of the small program, whether the small program is resident in the background is determined by setting scene configuration parameters, wherein the parameter form is { appid: < scene rule, 1> }. The scenario rule may be a rule for setting the applet to be resident or non-resident in a preset scenario. For example, the mobile phone recharge applet has the highest access flow at the beginning of the month and at the end of the month, and can be configured to be resident at the beginning of the month and at the end of the month according to the time rule; a certain region level applet, which has the highest amount of access in that region, may be configured to be located resident in that region according to the rules of the region.
And based on the four decision results, after comprehensive judgment is carried out according to a preset rule, whether the target applet is set as a resident applet or not can be finally determined. The preset rules include, but are not limited to, performing comprehensive judgment according to the weight values of the decision results, or performing final judgment with a certain decision result or some decision results as a leading factor and other decision results as an auxiliary factor.
The S, T, F, M can be configured dynamically and sent to the terminal device by the server, and the configuration and sending method is not limited here.
Therefore, by combining the service parameter configuration, the operation parameter configuration, the user behavior and the current running state of the equipment of the applet, whether the current applet is resident in the memory or not is jointly decided from two dimensions of a local strategy and a remote strategy, so that the decision result can be more accurate, the applet really needed by the user is set as the resident applet which is not closed, and the applet can be quickly started and displayed when being started by the user for the second time. In addition, by automatically generating the resident memory strategy of the small program, the small program can be dynamically managed according to the requirement.
In some embodiments, the step of determining whether to set the target applet as a resident applet according to the first decision result, the second decision result, the third decision result and the fourth decision result may specifically include:
determining to set the target applet as a resident applet if at least one of the first decision result, the third decision result or the fourth decision result is to set the target applet as a resident applet, and the second decision result is to set the target applet as a resident applet;
and determining to set the target applet as the non-resident applet under the condition that any one of the first decision result, the third decision result and the fourth decision result sets the target applet as the non-resident applet or the second decision result sets the target applet as the non-resident applet.
Here, the second decision result may be used as a main decision result, and the other decision results may be used as an auxiliary decision result to determine whether or not to set the target applet as the resident applet. In addition, the first decision result, the second decision result, the third decision result and the fourth decision result may be boolean values, that is, the result is 0 or 1. Where 0 may represent setting the target applet to a non-resident applet and 1 represents setting the target applet to a resident applet.
In a specific example, a user opens an applet, and a host App acquires or updates a service configuration parameter and a scene configuration parameter from a server; caching the service configuration parameters and the scene configuration parameters into the small program parameter table; acquiring the user behavior sequence of the applet, and obtaining whether the applet is resident in the memory or not through evaluation, wherein the result is recorded as a Boolean value t 1; acquiring the current equipment state, and obtaining whether the applet is resident in the memory or not through evaluation, wherein the result is recorded as a Boolean value t 2; analyzing the service configuration parameters, acquiring resident background switch configuration of the applet, and recording the result as a Boolean value t 3; the user closes the applet, analyzes the operation configuration parameters, judges whether the current scene (such as time and position) meets the corresponding rule, and records the result as a Boolean value t 4; the final decision result is t ═ t (t1| | t3| | t4) & & t 2; if the final decision result is judged to be resident memory, caching the applet application into the memory and hiding the applet; and if the memory is not always stored in the memory, closing the small program and recycling the container.
In this way, the final judgment is carried out by taking the second decision result determined by the state of the terminal equipment as the leading factor and taking the decision result determined by other factors as the assisting factor, so that the final judgment result can fully consider the running state of the terminal equipment, and the target applet is set as the resident applet as far as possible under the condition that the terminal equipment can run normally, so that the starting speed of the target applet during secondary starting is improved.
In summary, the embodiments of the present application provide an applet multitask stack management model, which can reside in a memory after an applet is closed through an applet instance cache, thereby shortening the secondary startup time of the applet and achieving a secondary second-on effect. As shown in fig. 6a, when the user opens applet C, an instance of applet C is cached in the App page stack. As shown in fig. 6b, after the user browses the page a and the page b of the applet C, if the applet C is not resident, the applet C is closed, and the instance corresponding to the applet C is taken out from the App page stack. Applet a and applet B, as resident applets, have their corresponding instances cached in the App page stack.
In addition, as described in the foregoing embodiments, in order to reduce the user waiting time and increase the applet starting speed, a method for a user to pre-load a preset number of first target applets when opening a host application is proposed in this document. How to effectively judge the frequently-used applet of the user and use the frequently-used applet as the pre-loaded first target applet is another technical problem solved by the application. The application relates to an evaluation model based on big data and user personal historical data, wherein small programs are scored through the model, and the front N small programs are selected as first target small programs to be preloaded according to scoring results. This process is explained in detail below.
Fig. 7 is a flowchart illustrating another embodiment of an applet starting method provided in the present application. The applet starting method may be performed by the server 11 shown in fig. 1.
As shown in fig. 7, the applet starting method may specifically include the following steps: S710-S740, which is explained in detail below.
And S710, receiving user information sent by the terminal equipment, wherein the user information is information of a login user of a target application program in the terminal equipment, and the target application program is a host program of a plurality of small programs.
Here, the user information may be information that can identify the user identity, such as an account number and a user name used when the user logs in to the target application program.
And S720, acquiring historical behavior data of the user according to the user information.
Here, the user historical behavior data includes, but is not limited to, historical behavior data of a user of the whole network of big data statistics, and historical behavior data collected for a user person, where the historical behavior data may include, for example, applet access information, applet attention information, and the like.
In some embodiments, the user historical behavior data may specifically include applet access amount information, personal attention information, and personal recent access information.
The small program access amount information can comprise access amount data of the whole network users with big data statistics. The personal attention information may include a list of applets that the user is personally interested in, which may include information of one or more applets that the user is personally interested in. The personal recent access information may include a list of applets that the user has accessed within a preset time period, which may include information of one or more applets that the user has accessed within the preset time period.
And S730, determining a preset number of first target applets from the plurality of applets according to the historical behavior data of the user.
For example, the evaluation score value corresponding to each applet can be calculated by using the acquired historical behavior data of the user through a preset score calculation formula or a preset applet evaluation model, and then the top N applets are taken as the preloaded first target applets based on the evaluation score value.
S740, sending the program parameter corresponding to the first target applet to the terminal device, so that the terminal device preloads the first program resource corresponding to the first target applet according to the program parameter before starting the first target applet.
For example, after determining the first target applet, the server may issue the applet parameters { applet-1., applet-n } corresponding to the one or more first target applets to the client of the terminal device, so that the client may correspondingly download the first target applet resource package after analyzing the parameters, cache the first target applet resource package in the local of the client, and pre-load the first target applet resource package into the memory before starting the first target applet.
Therefore, the preset number of first target applets are determined from the plurality of applets according to the historical behavior data of the user, so that the terminal equipment can pre-load the first target applets, the starting time of the first target applets can be shortened, the starting speed of the applets is increased, and the user experience is improved.
In some embodiments, in the case that the user historical behavior data includes applet access amount information, personal attention information, and personal recent access information, as shown in fig. 8, S730 may specifically include the following steps:
s7301, determining a first application parameter for each applet in the plurality of applets according to the applet access amount information;
s7302, determining a second application parameter according to the personal attention information;
s7303, determining a third application parameter according to the personal recent access information;
s7304, performing weighted summation on the first application parameter, the second application parameter and the third application parameter to obtain evaluation values respectively corresponding to each applet;
s7305, a preset number of applets are determined from the plurality of applets as first target applets based on the evaluation values corresponding to the respective applets.
In this way, the evaluation value corresponding to each applet is calculated according to the first application parameter, the second application parameter and the third application parameter determined by the applet access amount information, the personal attention information and the personal recent access information, and the first target applet is determined based on the evaluation value, so that the probability that the determined first target applet is started by the user can be increased, the starting speed of the applet which is most likely to be started by the user is increased, and the waiting time of the user is further reduced.
Specific implementations of the above steps are described below.
In some embodiments, at S7301, the applet visitation amount information may be, for example, a list of common applications ranked by web-wide user visitation amount for big data statistics.
In some embodiments, S7301 may specifically include:
and calculating the first application parameters respectively corresponding to each small program according to the ratio of the access quantity respectively corresponding to each small program to the access quantity respectively corresponding to the small program with the highest access quantity.
Illustratively, for common small program application parameters, namely first application parameters, the access quantity of all small programs is counted through big data, and the system analyzes and calculates the evaluation value e of each small program1
e1=f(I),e1∈[0,100]
I=[i1,i2,…,in]
Wherein, f (I) represents a small program analysis function based on the access amount of the network-wide users, and the return value can be used as the value of the first application parameter. And I represents the collected access amount set of all n applets in the host APP.
For applet C, f (I)C) The calculation method comprises the following steps:
Figure BDA0003423544380000241
wherein icIs the access volume of applet C.
Therefore, by the method, the first application parameters corresponding to each applet can be calculated according to the access quantity of the applets.
In some embodiments, in S7302, the personal attention information may include a user personal attention application list.
In some embodiments, the plurality of applets include at least one third target applet focused by the login user, and based on this, the S7302 may specifically include:
aiming at least one third target small program, acquiring a time interval between attention time corresponding to the third target small program and current time;
determining the arrangement sequence corresponding to the third target applet according to the time interval;
determining a sorting position index value corresponding to the third target applet based on the sorting order;
calculating a second application parameter corresponding to the third target applet according to the sorting position index value;
and determining the first preset value as a second application parameter corresponding to a fourth target applet aiming at the fourth target applet in the plurality of applets, wherein the fourth target applet is other applets except the third target applet in the plurality of applets.
Here, the first preset value may be 0, for example.
Illustratively, aiming at the application parameter of the small program concerned, namely the second application parameter, the user clicks the attention trigger in the small program menu panel, the attention list is recorded in the background, and the system analyzes and calculates each small program evaluation value e2
e2=g(D,dt),e2∈[0,100]
D=[d1,d2,…,dn]
dt=[dt1,dt2,…,dtn]
Where g (D, dt) represents an applet analysis function based on the list of applet applications of interest to the user, the return value of which may be the value of the second application parameter. D represents a list of all applets that the user is interested in, including the n applets that the user is interested in. dt represents the time interval from the time of interest to the current time for each applet.
For applets C, g (D)CDt) is calculated as follows:
Figure BDA0003423544380000251
wherein seq (dt) is the index value of the sorting position corresponding to the small program C after sorting according to the time interval from big to small.
In this way, the second application parameters corresponding to each applet can be calculated according to the applet information concerned by the user.
In some embodiments, in S7303, the personal recent access information may include a list of applications that have been used by the user in the personal recent past, where the list may specifically include a list of applets and a list of access behaviors that the user has accessed within a preset time period.
In some embodiments, the plurality of applets include at least one fifth target applet that the login user has accessed within a preset time period, and based on this, the S7303 may specifically include:
for at least one fifth target applet, determining the number of times that the fifth target applet is accessed by a login user within a preset time period;
calculating a third application parameter corresponding to a fifth target applet according to the ratio of the times to the total times of accessing the applet by the login user in a preset time period;
and determining a second preset value as a third application parameter corresponding to a sixth target applet aiming at the sixth target applet in the plurality of applets, wherein the sixth target applet is other applets except the fifth target applet in the plurality of applets.
Here, the second preset value may be the same as or different from the first preset value, and is not limited herein. For example, the second preset value may be 0.
Illustratively, aiming at the application parameter of the small program which is used recently, namely the third application parameter, the host App collects the information of the small program which is opened currently in real time when running, counts the times of opening the small program, and calculates the evaluation value e of each small program through system analysis3
e3=h(RT),e3∈[0,100]
RT=[rt1,rt2,…,rtn]
BT=[bt1,bt2,…,btm]
Where h (rt) represents an applet parsing function based on the list of applet applications recently opened by the user, the returned value of which may be the value of the third application parameter. RT represents a list of all the applets opened by the user in a specified time period, and BT represents a behavior sequence of the user accessing the applets in the specified time period, wherein m applets accessed by the user can be included.
For the applet C, h (rt) the calculation method is:
Figure BDA0003423544380000261
Figure BDA0003423544380000262
wherein m is the sequence length of the BT sequence.
In this way, the second application parameters corresponding to each applet can be calculated according to the applet information concerned by the user.
In some embodiments, in S7304, the first application parameter, the second application parameter, and the third application parameter may be multiplied by corresponding preset weight values, and then summed to obtain a final evaluation value corresponding to each applet.
In some specific examples, as shown in fig. 9, the applet access quantity information applet evaluation model mainly includes three parameters: the method comprises the steps of a common application list of the whole network big data statistics, an attention application list of a user person and a recent use application list of the user person. The calculation method of the small program evaluation model is as follows:
E=αe1+βe2+γe3
alpha + beta + gamma is 1 and alpha, beta, gamma is not less than 0
E,e1,e2,e3∈[0,100]
Wherein E represents an evaluation value of the applet; e.g. of the type1、e2And e3Respectively representing common applet application parameters, attention applet application parameters and the applet prediction evaluation values given by the latest used applet application parameters; α, β, and γ are weight values of the three parameters, respectively, and the sum thereof is 1.
In some embodiments, in S7305, the plurality of applets may be sorted by evaluation value size, and the first N applets with the highest evaluation values may be taken as the first target applets.
In summary, specific examples are given based on the above embodiments in order to better describe the overall scheme.
For example, an applet as shown in FIG. 10 initiates the architecture diagram of the processing system. The applet launch processing system may include an applet container pre-rendering module 1001, an applet pre-load module 1002, a dynamic management module 1003 and a container pool 1004, which are explained in detail below.
In some examples, the applet container pre-rendering module 1001 is primarily used to preload applet frames, preload kernel resources, pre-launch applet processes, pre-create an applet container pool, and the like; after the host application is started, resources required by starting the small programs are prepared in advance through container pre-rendering, and time consumption of the terminal is reduced.
In some examples, the applet preloading module 1002 may include an applet evaluating sub-module, a downloading sub-module, and a loading sub-module, where the applet evaluating sub-module is mainly configured to evaluate a list corresponding to an applet that needs to be preloaded, the downloading sub-module is configured to download a resource package of each applet in the list, and the loading sub-module is configured to load the applet resource package into a container pool.
In some examples, the dynamic management module 1003 is configured to respond to an operation of opening or closing an applet by a user, and dynamically decide whether the current applet needs to reside according to multidimensional information by using a dynamic decision model, where the main functions include applet caching, device memory state monitoring, and applet container multiplexing.
In some examples, a container pool 1004 may exist in memory space for holding applet instances; the container pool size is dynamically configurable, creating containers when the CPU is idle.
Therefore, by the aid of the framework, the second starting of the applet can be realized, the cold starting speed and the secondary starting speed of the applet are improved, the waiting time of a user is shortened, and accordingly user experience is improved.
It should be noted that the application scenarios described in the embodiments of the present application are for more clearly illustrating the technical solutions in the embodiments of the present application, and do not constitute limitations on the technical solutions provided in the embodiments of the present application, and as a person having ordinary skill in the art can appreciate, with the occurrence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
Based on the same inventive concept, the application also provides a small program starting device. The details are described with reference to fig. 11 and 12.
Fig. 11 is a schematic structural diagram illustrating an embodiment of an applet starting apparatus provided in the present application. The apparatus can be applied to the terminal device 10 shown in fig. 1.
As shown in fig. 11, the applet starting apparatus 1100 may include:
the container rendering module 1101 is configured to, when a target application program is started, execute an applet container pre-rendering operation to obtain a pre-loaded resource, where the target application program is a host program of a plurality of applets, and the plurality of applets include a preset number of first target applets determined according to user historical behavior data;
a resource loading module 1102, configured to load a first program resource corresponding to a first target applet based on a preloaded resource;
a first input module 1103, configured to receive a first input that a user starts a target applet;
a first launching module 1104 for, in a case where the target applet is a first target applet, in response to a first input, page-rendering the target applet based on the first program resource to launch the target applet;
a second starting module 1105, configured to, in response to the first input, load the target applet based on the preloaded resource to start the target applet, where the target applet is a second target applet, and the second target applet is any applet of the plurality of applets except the first target applet.
The applet starting apparatus 1100 will be described in detail below, specifically as follows:
in some of these embodiments, the applet launching device 1100 further comprises:
the information sending module is used for sending user information to the server before loading a first program resource corresponding to the first target applet based on the preloaded resource so that the server can obtain user historical behavior data according to the user information and determine a preset number of first target applets from the plurality of applets according to the user historical behavior data;
the parameter receiving module is used for receiving program parameters which are sent by the server and correspond to the first target small program;
and the resource caching module is used for downloading and caching the first program resource corresponding to the first target applet according to the program parameters.
In some embodiments, resource loading module 1102 may include:
the verification submodule is used for verifying the legality of the first program resource to obtain a verification result;
and the loading submodule is used for loading the first program resource corresponding to the first target applet into the memory based on the preloading resource under the condition that the verification result is that the verification is successful.
In some embodiments, performing the applet container prerender operation comprises: at least one of loading an applet frame, starting an applet process, downloading an applet common resource, loading a kernel resource, and creating an applet container pool, wherein the applet container pool comprises a plurality of containers.
In some embodiments, the second initiation module 1105 may include:
the container loading submodule is used for acquiring a target container in an idle state from the small program container pool and loading the target container under the condition that the preloading resources comprise a plurality of containers in the small program container pool;
the resource loading submodule is used for acquiring a second program resource corresponding to the target small program and loading the second program resource;
and the page rendering submodule is used for rendering the page of the target small program based on the second program resource.
In some embodiments, the applet launching device 1100 further comprises:
the second input module is used for receiving a second input of closing the target applet by the user after the target applet is started;
the resident determining module is used for responding to the second input and determining whether the target small program is set as a resident small program or not according to the equipment state parameter corresponding to the terminal equipment and the user historical behavior parameter and the configuration parameter corresponding to the target small program;
the program hiding module is used for hiding the target applet under the condition that the target applet is determined to be set as the resident applet;
and the program closing module is used for closing the target applet under the condition that the target applet is determined to be set as the non-resident applet.
In some embodiments, the device state parameter includes a memory usage rate, the user historical behavior parameter includes at least one of an opening mode, an access duration, and an access frequency of the target applet, and the configuration parameter includes at least one of a service configuration parameter and a scenario configuration parameter;
the resident determining module comprises:
the first decision submodule is used for determining a first decision result according to whether the memory utilization rate of the target application program in the terminal equipment is greater than a preset utilization rate threshold value or not;
the second decision submodule is used for determining a second decision result according to at least one of whether the opening mode of the target small program belongs to a preset mode, whether the access time of the target small program is greater than a preset time threshold and whether the access frequency of the target small program is greater than a preset frequency threshold;
the third decision submodule is used for determining whether the target small program belongs to the main business push small program or not according to the business configuration parameters to obtain a third decision result;
the fourth decision submodule is used for determining whether the current access scene is matched with a preset scene corresponding to the target application program or not according to the scene configuration parameters to obtain a fourth decision result;
and the determining submodule is used for determining whether the target applet is set as a resident applet or not according to the first decision result, the second decision result, the third decision result and the fourth decision result.
In some embodiments, determining the sub-module comprises:
a first determining unit, configured to determine that the target applet is set as a resident applet if at least one of the first decision result, the third decision result, or the fourth decision result is to set the target applet as a resident applet, and the second decision result is to set the target applet as a resident applet;
and the second determining unit is used for determining that the target applet is set as the non-resident applet under the condition that any one of the first decision result, the third decision result and the fourth decision result is the target applet set as the non-resident applet or the second decision result is the target applet set as the non-resident applet.
Therefore, after the target application program serving as the host program is started and before the first input for starting the target applet is performed by the user, the small program container pre-rendering operation is executed in advance, resource preloading is performed, and after the first input for starting the target applet by the user is received, the target applet can be directly loaded based on the preloaded resource, so that the applet loading time can be saved, and the applet starting speed can be improved. In addition, according to the embodiment of the application, before the user triggers the starting of the applet, the first program resource corresponding to the first target applet which is most likely to be started by the user and is determined according to the historical behavior data of the user is loaded in advance, so that when the user starts the target applet and the target applet is the first target applet, page rendering is directly performed on the target applet based on the first program resource, and the starting process is completed.
Fig. 12 is a schematic structural diagram illustrating an embodiment of an applet starting apparatus provided in the present application. The apparatus may be applied to the server 11 shown in fig. 1.
As shown in fig. 12, the applet starting apparatus 1200 may include:
the information receiving module 1201 is configured to receive user information sent by a terminal device, where the user information is information of a login user of a target application program in the terminal device, and the target application program is a host program of multiple applets;
a data obtaining module 1202, configured to obtain user historical behavior data according to user information;
a program determining module 1203, configured to determine a preset number of first target applets from the multiple applets according to the historical behavior data of the user;
a parameter sending module 1204, configured to send a program parameter corresponding to the first target applet to the terminal device, so that before the terminal device starts the first target applet, the first program resource corresponding to the first target applet is preloaded according to the program parameter.
The applet starting apparatus 1200 described above is described in detail as follows:
in some embodiments, the user historical behavior data comprises applet visit volume information, personal attention information, and personal recent visit information;
the program determining module 1203 may include:
the first determining submodule is used for determining a first application parameter according to the access amount information of the applets aiming at each of the plurality of applets;
the second determining submodule is used for determining a second application parameter according to the personal attention information;
the third determining submodule is used for determining a third application parameter according to the recent access information of the individual;
the weighted summation sub-module is used for carrying out weighted summation on the first application parameter, the second application parameter and the third application parameter to obtain evaluation values respectively corresponding to each small program;
and an object determination sub-module for determining a preset number of applets from among the plurality of applets as first object applets based on the evaluation values corresponding to the respective applets.
In some embodiments, the first determination submodule is specifically configured to:
and calculating the first application parameters respectively corresponding to each small program according to the ratio of the access quantity respectively corresponding to each small program to the access quantity respectively corresponding to the small program with the highest access quantity.
In some embodiments, the plurality of applets includes at least one third target applet of interest to the logged-in user;
the second determination submodule includes:
the time acquisition unit is used for acquiring the time interval between the attention time corresponding to the third target applet and the current time aiming at least one third target applet;
the sequence arrangement unit is used for determining an arrangement sequence corresponding to the third target small program according to the time interval;
the index determining unit is used for determining a sorting position index value corresponding to the third target small program based on the sorting sequence;
the first calculation unit is used for calculating a second application parameter corresponding to the third target applet according to the sorting position index value;
the first determining unit is configured to determine, for a fourth target applet in the multiple applets, the first preset value as a second application parameter corresponding to the fourth target applet, where the fourth target applet is another applet in the multiple applets except the third target applet.
In some embodiments, the plurality of applets includes at least one fifth target applet that the login user has accessed within a preset time period;
the third determination submodule includes:
the frequency determining unit is used for determining the frequency of the fifth target small program accessed by the login user in a preset time period aiming at least one fifth target small program;
the second calculating unit is used for calculating a third application parameter corresponding to a fifth target applet according to the ratio of the times to the total times of accessing the applet by the login user in a preset time period;
and the second determining unit is used for determining a second preset value as a third application parameter corresponding to a sixth target applet in the multiple applets, wherein the sixth target applet is the other applets except the fifth target applet in the multiple applets.
Therefore, the preset number of first target applets are determined from the plurality of applets according to the historical behavior data of the user, so that the terminal equipment can pre-load the first target applets, the starting time of the first target applets can be shortened, the starting speed of the applets is increased, and the user experience is improved.
Fig. 13 shows a hardware structure diagram of an embodiment of the electronic device provided in the present application.
The electronic device 1300 may include a processor 1301 and a memory 1302 storing computer program instructions.
Specifically, the processor 1301 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of the embodiments of the present Application.
Memory 1302 may include mass storage for data or instructions. By way of example, and not limitation, memory 1302 may include a Hard Disk Drive (HDD), a floppy Disk Drive, flash memory, an optical Disk, a magneto-optical Disk, tape, or a Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 1302 may include removable or non-removable (or fixed) media, where appropriate. Memory 1302 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 1302 is non-volatile solid-state memory.
The memory may include Read Only Memory (ROM), Random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors), it is operable to perform operations described with reference to the methods according to an aspect of the application.
The processor 1301 realizes any one of the applet launching methods in the above embodiments by reading and executing computer program instructions stored in the memory 1302.
In some examples, electronic device 1300 may also include a communication interface 1303 and a bus 1310. As shown in fig. 13, the processor 1301, the memory 1302, and the communication interface 1303 are connected to each other via a bus 1310 to complete communication therebetween.
The communication interface 1303 is mainly used to implement communication between modules, apparatuses, units and/or devices in this embodiment of the application.
Bus 1310 includes hardware, software, or both to couple the components of the online data traffic billing device to each other. By way of example, and not limitation, the bus 1310 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. Bus 1310 may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the application, any suitable buses or interconnects are contemplated by the application.
For example, the electronic device 1300 may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA) as a terminal device. The electronic device 1300, when acting as a server, can be a cloud server, a cluster of servers, or the like.
The electronic device 1300 may execute the applet starting method in the embodiment of the present application, so as to implement the applet starting method and apparatus described in conjunction with fig. 2-12.
In addition, in combination with the applet starting method in the foregoing embodiments, the embodiments of the present application may provide a computer readable storage medium to implement. The computer readable storage medium having stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the applet launching methods in the above embodiments. Examples of computer-readable storage media include non-transitory computer-readable storage media such as portable disks, hard disks, Random Access Memories (RAMs), Read Only Memories (ROMs), erasable programmable read only memories (EPROMs or flash memories), portable compact disk read only memories (CD-ROMs), optical storage devices, magnetic storage devices, and so forth.
It is to be understood that the present application is not limited to the particular arrangements and instrumentality described above and shown in the attached drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions or change the order between the steps after comprehending the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
Aspects of the present application are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware for performing the specified functions or acts, or combinations of special purpose hardware and computer instructions.
As described above, only the specific embodiments of the present application are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered within the scope of the present application.

Claims (17)

1. An applet starting method applied to a terminal device is characterized by comprising the following steps:
under the condition that a target application program is started, executing small program container pre-rendering operation to obtain pre-loaded resources, wherein the target application program is a host program of a plurality of small programs, and the plurality of small programs comprise a preset number of first target small programs determined according to user historical behavior data;
loading a first program resource corresponding to the first target applet based on the preloading resource;
receiving a first input of a user starting a target applet;
in response to the first input, page rendering the target applet based on the first program resource to launch the target applet if the target applet is the first target applet;
and in response to the first input, loading the target applet based on the preloading resource to start the target applet if the target applet is the second target applet, wherein the second target applet is any one of the plurality of applets except the first target applet.
2. The method of claim 1, wherein prior to loading the first program resource corresponding to the first target applet based on the preloaded resource, the method further comprises:
sending user information to a server so that the server acquires the historical user behavior data according to the user information, and determining a preset number of first target applets from the plurality of applets according to the historical user behavior data;
receiving a program parameter corresponding to the first target applet and sent by the server;
and downloading and caching a first program resource corresponding to the first target small program according to the program parameter.
3. The method of claim 1, wherein loading a first program resource corresponding to the first target applet based on the preloaded resource comprises:
verifying the legality of the first program resource to obtain a verification result;
and loading the first program resource corresponding to the first target applet into a memory based on the preloading resource under the condition that the verification result is successful.
4. The method of claim 1, wherein the performing applet container prerender operations comprises: at least one of loading an applet frame, starting an applet process, downloading an applet common resource, loading a kernel resource, and creating an applet container pool, wherein the applet container pool includes a plurality of containers.
5. The method of claim 1, wherein, in the case that the pre-loaded resource comprises a plurality of containers in an applet container pool, the loading the target applet based on the pre-loaded resource comprises:
acquiring a target container in an idle state from the applet container pool, and loading the target container;
acquiring a second program resource corresponding to the target small program, and loading the second program resource;
page rendering is performed on the target applet based on the second program resource.
6. The method of claim 1, wherein after the target applet is launched, the method further comprises:
receiving a second input of the user to close the target applet;
responding to the second input, and determining whether the target applet is set as a resident applet or not according to the equipment state parameter corresponding to the terminal equipment and the user historical behavior parameter and configuration parameter corresponding to the target applet;
hiding the target applet if it is determined that the target applet is set as a resident applet;
in an instance in which it is determined that the target applet is set to a non-resident applet, shutting down the target applet.
7. The method according to claim 6, wherein the device status parameters include memory usage, the user historical behavior parameters include at least one of an open mode, an access duration, and an access frequency of the target applet, and the configuration parameters include at least one of service configuration parameters and scenario configuration parameters;
determining whether to set the target applet as a resident applet according to the device state parameter corresponding to the terminal device and the user historical behavior parameter and configuration parameter corresponding to the target applet, including:
determining a first decision result according to whether the memory utilization rate of the target application program in the terminal equipment is greater than a preset utilization rate threshold value or not;
determining a second decision result according to at least one of whether the opening mode of the target applet belongs to a preset mode, whether the access time length of the target applet is greater than a preset time length threshold value and whether the access frequency of the target applet is greater than a preset frequency threshold value;
determining whether the target small program belongs to a main business push small program or not according to the business configuration parameters to obtain a third decision result;
determining whether the current access scene is matched with a preset scene corresponding to the target application program or not according to the scene configuration parameters to obtain a fourth decision result;
and determining whether the target applet is set as a resident applet or not according to the first decision result, the second decision result, the third decision result and the fourth decision result.
8. The method of claim 7, wherein the determining whether to set the target applet as a resident applet according to the first decision, the second decision, the third decision and the fourth decision comprises:
determining to set the target applet as a resident applet if at least one of the first decision result, the third decision result or the fourth decision result is to set the target applet as a resident applet, and the second decision result is to set the target applet as a resident applet;
and determining to set the target applet as the non-resident applet if any one of the first decision result, the third decision result and the fourth decision result is to set the target applet as the non-resident applet, or the second decision result is to set the target applet as the non-resident applet.
9. An applet starting method applied to a server is characterized by comprising the following steps:
receiving user information sent by terminal equipment, wherein the user information is information of a login user of a target application program in the terminal equipment, and the target application program is a host program of a plurality of small programs;
acquiring historical behavior data of a user according to the user information;
determining a preset number of first target applets from the plurality of applets according to the historical user behavior data;
and sending a program parameter corresponding to the first target applet to the terminal equipment, so that the terminal equipment preloads a first program resource corresponding to the first target applet according to the program parameter before starting the first target applet.
10. The method of claim 9, wherein the user historical behavior data includes applet visit information, personal attention information, and personal recent visit information;
the determining a preset number of first target applets from the plurality of applets according to the user historical behavior data includes:
determining a first application parameter for each applet of the plurality of applets according to the applet access amount information;
determining a second application parameter according to the personal attention information;
determining a third application parameter according to the personal recent access information;
weighting and summing the first application parameter, the second application parameter and the third application parameter to obtain evaluation values respectively corresponding to each small program;
determining a preset number of applets from the plurality of applets as the first target applets based on the evaluation values corresponding to each of the applets, respectively.
11. The method of claim 10, wherein determining the first application parameter according to the applet access amount information comprises:
and calculating the first application parameters respectively corresponding to each small program according to the ratio of the access quantity respectively corresponding to each small program to the access quantity respectively corresponding to the small program with the highest access quantity.
12. The method of claim 10, wherein the plurality of applets includes at least one third target applet of interest to the logged user;
the determining a second application parameter according to the personal attention information includes:
for the at least one third target applet, acquiring a time interval between attention time and current time corresponding to the third target applet;
determining the arrangement sequence corresponding to the third target applet according to the time interval;
determining a sorting position index value corresponding to the third target applet based on the sorting order;
calculating a second application parameter corresponding to the third target applet according to the sorting position index value;
and determining a first preset value as a second application parameter corresponding to a fourth target applet in the applets, wherein the fourth target applet is other applets except the third target applet in the applets.
13. The method of claim 10, wherein the plurality of applets includes at least a fifth target applet that the logged-on user has accessed within a preset time period;
determining a third application parameter according to the personal recent access information, including:
for the at least one fifth target applet, determining a number of times the fifth target applet is accessed by the login user within the preset time period;
calculating a third application parameter corresponding to the fifth target applet according to the ratio of the times to the total times of accessing the applet by the login user in the preset time period;
and determining a second preset value as a third application parameter corresponding to a sixth target applet in the applets, wherein the sixth target applet is another applet in the applets except the fifth target applet.
14. An applet starting apparatus applied to a terminal device, the apparatus comprising:
the system comprises a container rendering module, a resource pre-loading module and a resource pre-loading module, wherein the container rendering module is used for executing small program container pre-rendering operation under the condition that a target application program is started to obtain pre-loaded resources, the target application program is a host program of a plurality of small programs, and the plurality of small programs comprise a preset number of first target small programs determined according to user historical behavior data;
the resource loading module is used for loading a first program resource corresponding to the first target applet based on the preloading resource;
the first input module is used for receiving first input of starting a target applet by a user;
a first launching module to, in response to the first input, page render the target applet based on the first programming resources to launch the target applet if the target applet is the first target applet;
a second starting module, configured to, in response to the first input, load the target applet based on the preloaded resource to start the target applet, if the target applet is the second target applet, where the second target applet is any applet of the multiple applets except the first target applet.
15. An applet starting apparatus applied to a server, the apparatus comprising:
the system comprises an information receiving module, a processing module and a processing module, wherein the information receiving module is used for receiving user information sent by terminal equipment, the user information is information of a login user of a target application program in the terminal equipment, and the target application program is a host program of a plurality of small programs;
the data acquisition module is used for acquiring historical behavior data of the user according to the user information;
a program determining module, configured to determine a preset number of first target applets from the plurality of applets according to the user historical behavior data;
and the parameter sending module is used for sending the program parameters corresponding to the first target applet to the terminal equipment so that the terminal equipment preloads the first program resource corresponding to the first target applet according to the program parameters before starting the first target applet.
16. An electronic device, characterized in that the device comprises: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, performs the steps of the applet launching method as claimed in any one of claims 1-8 or 9-13.
17. A computer-readable storage medium, having stored thereon computer program instructions, which, when executed by a processor, implement the steps of the applet launching method as claimed in any one of claims 1-8 or 9-13.
CN202111571828.9A 2021-12-21 2021-12-21 Applet starting method, device, equipment and computer readable storage medium Active CN114398094B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111571828.9A CN114398094B (en) 2021-12-21 2021-12-21 Applet starting method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111571828.9A CN114398094B (en) 2021-12-21 2021-12-21 Applet starting method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN114398094A true CN114398094A (en) 2022-04-26
CN114398094B CN114398094B (en) 2023-08-18

Family

ID=81227324

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111571828.9A Active CN114398094B (en) 2021-12-21 2021-12-21 Applet starting method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114398094B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114924807A (en) * 2022-04-28 2022-08-19 支付宝(杭州)信息技术有限公司 Method and device for increasing running speed of small program

Citations (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101162488A (en) * 2006-10-13 2008-04-16 夏普株式会社 Information communication system
US20090307693A1 (en) * 2008-06-04 2009-12-10 International Business Machines Corporation System and method to dynamically manage applications on a processing system
US20130014101A1 (en) * 2011-07-06 2013-01-10 Microsoft Corporation Offering Network Performance Guarantees in Multi-Tenant Datacenters
US20130298104A1 (en) * 2011-07-09 2013-11-07 Glenn Kletsky Rapidly configurable program
EP2907290A1 (en) * 2012-10-10 2015-08-19 Citrix Systems Inc. Policy-based application management
US20160191645A1 (en) * 2014-12-30 2016-06-30 Citrix Systems, Inc. Containerizing Web Applications for Managed Execution
CN106897128A (en) * 2017-01-19 2017-06-27 网宿科技股份有限公司 A kind of Distributed Application exits method, system and server
CN107015823A (en) * 2016-01-15 2017-08-04 谷歌公司 The application container loaded with dynamic attached bag
US20190138919A1 (en) * 2017-11-06 2019-05-09 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Methods and systems for preloading applications and generating prediction models
US20190188007A1 (en) * 2017-12-20 2019-06-20 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for Preloading Application, Storage Medium, and Terminal Device
CN110083413A (en) * 2019-03-13 2019-08-02 维沃移动通信有限公司 A kind of small routine call method and terminal device
CN110333912A (en) * 2019-07-11 2019-10-15 百度在线网络技术(北京)有限公司 A kind of method, apparatus and computer readable storage medium of small routine data pre-fetching
CN110741346A (en) * 2017-07-28 2020-01-31 华为技术有限公司 Application management method and terminal
CN110888635A (en) * 2019-11-28 2020-03-17 百度在线网络技术(北京)有限公司 Same-layer rendering method and device, electronic equipment and storage medium
CN111198730A (en) * 2018-10-30 2020-05-26 广州腾讯科技有限公司 Method, device, terminal and computer storage medium for starting sub-application program
CN111222062A (en) * 2020-01-09 2020-06-02 百度在线网络技术(北京)有限公司 Applet running method and device, electronic equipment and storage medium
CN111475246A (en) * 2020-04-10 2020-07-31 腾讯科技(深圳)有限公司 Applet page display method, device, terminal and storage medium
US20200249926A1 (en) * 2019-01-31 2020-08-06 Vmware, Inc. Systems and methods for just-in-time application implementation
CN111597027A (en) * 2020-05-15 2020-08-28 北京百度网讯科技有限公司 Application program starting method, device, equipment and storage medium
CN111767090A (en) * 2020-06-28 2020-10-13 百度在线网络技术(北京)有限公司 Method and device for starting small program, electronic equipment and storage medium
CN112035768A (en) * 2020-08-27 2020-12-04 深圳市欢太科技有限公司 Page rendering method and device for fast application, storage medium and electronic equipment
CN112214376A (en) * 2020-10-19 2021-01-12 维沃移动通信有限公司 Storage space prompting method and device
CN112559069A (en) * 2020-12-08 2021-03-26 腾讯科技(深圳)有限公司 Running control method and device of sub-application, storage medium and electronic equipment
KR20210038862A (en) * 2020-04-28 2021-04-08 바이두 온라인 네트웍 테크놀러지 (베이징) 캄파니 리미티드 Method, device, equipment and storage medium for obtaining mini program data
CN113568720A (en) * 2020-04-29 2021-10-29 阿里巴巴集团控股有限公司 Process management, development and configuration method, device, electronic equipment and storage medium
CN113656087A (en) * 2020-04-29 2021-11-16 腾讯科技(深圳)有限公司 Applet starting method, device, equipment and storage medium
US20230054174A1 (en) * 2020-02-13 2023-02-23 Tensera Networks Ltd. Preloading of applications and in-application content in user devices

Patent Citations (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101162488A (en) * 2006-10-13 2008-04-16 夏普株式会社 Information communication system
US20090307693A1 (en) * 2008-06-04 2009-12-10 International Business Machines Corporation System and method to dynamically manage applications on a processing system
US20130014101A1 (en) * 2011-07-06 2013-01-10 Microsoft Corporation Offering Network Performance Guarantees in Multi-Tenant Datacenters
US20130298104A1 (en) * 2011-07-09 2013-11-07 Glenn Kletsky Rapidly configurable program
EP2907290A1 (en) * 2012-10-10 2015-08-19 Citrix Systems Inc. Policy-based application management
US20160191645A1 (en) * 2014-12-30 2016-06-30 Citrix Systems, Inc. Containerizing Web Applications for Managed Execution
CN107015823A (en) * 2016-01-15 2017-08-04 谷歌公司 The application container loaded with dynamic attached bag
CN106897128A (en) * 2017-01-19 2017-06-27 网宿科技股份有限公司 A kind of Distributed Application exits method, system and server
CN110741346A (en) * 2017-07-28 2020-01-31 华为技术有限公司 Application management method and terminal
US20190138919A1 (en) * 2017-11-06 2019-05-09 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Methods and systems for preloading applications and generating prediction models
US20190188007A1 (en) * 2017-12-20 2019-06-20 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for Preloading Application, Storage Medium, and Terminal Device
CN111198730A (en) * 2018-10-30 2020-05-26 广州腾讯科技有限公司 Method, device, terminal and computer storage medium for starting sub-application program
US20200249926A1 (en) * 2019-01-31 2020-08-06 Vmware, Inc. Systems and methods for just-in-time application implementation
CN110083413A (en) * 2019-03-13 2019-08-02 维沃移动通信有限公司 A kind of small routine call method and terminal device
CN110333912A (en) * 2019-07-11 2019-10-15 百度在线网络技术(北京)有限公司 A kind of method, apparatus and computer readable storage medium of small routine data pre-fetching
CN110888635A (en) * 2019-11-28 2020-03-17 百度在线网络技术(北京)有限公司 Same-layer rendering method and device, electronic equipment and storage medium
CN111222062A (en) * 2020-01-09 2020-06-02 百度在线网络技术(北京)有限公司 Applet running method and device, electronic equipment and storage medium
US20230054174A1 (en) * 2020-02-13 2023-02-23 Tensera Networks Ltd. Preloading of applications and in-application content in user devices
CN111475246A (en) * 2020-04-10 2020-07-31 腾讯科技(深圳)有限公司 Applet page display method, device, terminal and storage medium
KR20210038862A (en) * 2020-04-28 2021-04-08 바이두 온라인 네트웍 테크놀러지 (베이징) 캄파니 리미티드 Method, device, equipment and storage medium for obtaining mini program data
CN113568720A (en) * 2020-04-29 2021-10-29 阿里巴巴集团控股有限公司 Process management, development and configuration method, device, electronic equipment and storage medium
CN113656087A (en) * 2020-04-29 2021-11-16 腾讯科技(深圳)有限公司 Applet starting method, device, equipment and storage medium
CN111597027A (en) * 2020-05-15 2020-08-28 北京百度网讯科技有限公司 Application program starting method, device, equipment and storage medium
CN111767090A (en) * 2020-06-28 2020-10-13 百度在线网络技术(北京)有限公司 Method and device for starting small program, electronic equipment and storage medium
CN112035768A (en) * 2020-08-27 2020-12-04 深圳市欢太科技有限公司 Page rendering method and device for fast application, storage medium and electronic equipment
CN112214376A (en) * 2020-10-19 2021-01-12 维沃移动通信有限公司 Storage space prompting method and device
CN112559069A (en) * 2020-12-08 2021-03-26 腾讯科技(深圳)有限公司 Running control method and device of sub-application, storage medium and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
姜阳: "基于用户行为的APP推荐系统的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114924807A (en) * 2022-04-28 2022-08-19 支付宝(杭州)信息技术有限公司 Method and device for increasing running speed of small program
CN114924807B (en) * 2022-04-28 2023-12-01 支付宝(杭州)信息技术有限公司 Method and device for improving running speed of applet

Also Published As

Publication number Publication date
CN114398094B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
WO2019120037A1 (en) Model construction method, network resource preloading method and apparatus, medium, and terminal
US10503710B2 (en) Webpage pre-reading method, apparatus and smart terminal
CN110442712B (en) Risk determination method, risk determination device, server and text examination system
CN111311136A (en) Wind control decision method, computer equipment and storage medium
CN109522501B (en) Page content management method and device
CN103530292A (en) Webpage displaying method and device
CN111666497A (en) Application program loading method and device, electronic equipment and readable storage medium
CN113383362B (en) User identification method and related product
CN113076416A (en) Information heat evaluation method and device and electronic equipment
Jha et al. The Internet with privacy policies: Measuring the Web upon consent
CN114398094B (en) Applet starting method, device, equipment and computer readable storage medium
CN110929129B (en) Information detection method, equipment and machine-readable storage medium
CN111459658A (en) Resource data acquisition method and related equipment
CN106817296B (en) Information recommendation test method and device and electronic equipment
CN111723294A (en) AI-based RPA robot intelligent recommendation method, device and equipment
CN111767053A (en) Front-end page data acquisition method and device
CN109120509B (en) Information collection method and device
CN110704614A (en) Information processing method and device for predicting user group type in application
CN113918776B (en) Data caching method and device, electronic equipment and data query method
CN111756744B (en) H5 user identification method, device, equipment and storage medium
CN115086194A (en) Data transmission method for cloud application, computing equipment and computer storage medium
CN110674839B (en) Abnormal user identification method and device, storage medium and electronic equipment
CN107222559B (en) Information calling method
CN110061864B (en) Method and system for automatically verifying domain name configuration
EP3526668A1 (en) Systems and methods for reducing download requirements

Legal Events

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