CN114398094B - 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
CN114398094B
CN114398094B CN202111571828.9A CN202111571828A CN114398094B CN 114398094 B CN114398094 B CN 114398094B CN 202111571828 A CN202111571828 A CN 202111571828A CN 114398094 B CN114398094 B CN 114398094B
Authority
CN
China
Prior art keywords
applet
target
user
target applet
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111571828.9A
Other languages
Chinese (zh)
Other versions
CN114398094A (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

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

Landscapes

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

Abstract

The application discloses an applet starting method, device, equipment and a computer readable storage medium. The method for starting the applet comprises the steps of executing the pre-rendering operation of the applet container under the condition that a target application program is started, so as to obtain a pre-loaded resource; loading a first program resource corresponding to the first target applet based on the preloaded resource; receiving a first input of a user to initiate a target applet; in the case 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 so as to start the target applet; in the case where the target applet is a second target applet, the target applet is loaded based on the preloaded resource in response to the first input to launch the target applet, wherein the second target applet is any applet of the plurality of applets other than the first target applet. According to the embodiment of the application, the starting speed of the small program 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 relates 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 the form of applets, and more applications have applet-running capabilities. In the process of opening the applet by a user, the problems of slow applet starting, blank pages, unsmooth page switching and the like often occur, and based on the problems, how to improve the starting speed of the applet becomes one of key problems for improving the use experience of the user.
In the prior art, the main mode of the applet starting is that after the user triggers the applet starting, a series of resource loading processes are started, so that the applet starting speed is too slow, and especially under the conditions of poor equipment performance, weak network and the like, the problems of page white screen, overlong waiting time of the user and the like are easy to occur, and the user experience is poor.
Disclosure of Invention
The embodiment of the application provides an applet starting method, device and equipment and a computer readable storage medium, which can improve the applet starting speed and the user experience.
In a first aspect, an embodiment of the present application provides an applet starting method, applied to a terminal device, where the method includes:
under the condition that a target application program is started, executing the pre-rendering operation of an applet container to obtain a pre-loaded resource, wherein the target application program is a host program of a plurality of applets, and the plurality of applets comprise a preset number of first target applets determined according to user historical behavior data;
loading a first program resource corresponding to the first target applet based on the preloaded resource;
receiving a first input of a user to initiate a target applet;
in the case that the target applet is the first target applet, in response to the first input, rendering a page of the target applet based on the first program resource to launch the target applet;
and in the case that the target applet is the second target applet, loading the target applet based on the preloaded resource to start the target applet in response to the first input, wherein the second target applet is any applet except the first target applet in the plurality of applets.
In some embodiments, before loading the first program resource corresponding to the first target applet based on the preloaded resource, the method further comprises:
user information is sent to a server, so that the server obtains the user historical behavior data according to the user information, and a preset number of first target applets are determined from the plurality of applets according to the user historical behavior data;
program parameters corresponding to the first target applet and sent by the server are received;
and downloading and caching the first program resource corresponding to the first target applet according to the program parameters.
Based on the pre-loaded resource, loading a first program resource corresponding to the first target applet includes:
verifying the validity of the first program resource to obtain a verification result;
and under the condition that the verification result is that the verification is successful, loading the first program resource corresponding to the first target applet into a memory based on the preloaded resource.
In some implementations, the performing the applet container prerendering operation includes: at least one of loading an applet framework, 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 implementations, where the preloaded resource includes a plurality of containers in a pool of applet containers, the loading the target applet based on the preloaded resource includes:
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 applet, and loading the second program resource;
and performing page rendering 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 from a user closing the target applet;
determining, in response to the second input, whether to set the target applet as a resident applet based on a device state parameter corresponding to the terminal device and a user history behavior parameter and configuration parameter corresponding to the target applet;
hiding the target applet in the event that it is determined to set the target applet as a resident applet;
in the event that it is determined to set the target applet to a very resident applet, the target applet is closed.
In some embodiments, the device state parameter includes a memory usage rate, the user history 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 scene configuration parameter;
the 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 history behavior parameter and the configuration parameter corresponding to the target applet includes:
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;
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 duration of the target applet is greater than a preset duration threshold value and whether the access frequency of the target applet is greater than a preset frequency threshold value;
determining whether the target applet belongs to a service main pushing applet according to the service 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 according to the scene configuration parameters, and obtaining a fourth decision result;
And 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.
In some embodiments, the determining whether to set the target applet as a resident applet based on the first decision result, the second decision result, the third decision result, and the fourth decision result comprises:
determining to set the target applet as a resident applet if at least one of the first, third, or fourth decision results 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 a very resident applet in the case that any one of the first, third and fourth decision results is to set the target applet as a very resident applet or the second decision result is to set the target applet as a very resident applet.
In a second aspect, an embodiment of the present application further provides an applet launching method, applied to a server, where 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 user historical behavior data according to the user information;
determining a preset number of first target applets from the plurality of applets according to the user historical 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 access information, personal concern information, and personal recent access information;
the determining a preset number of first target applets from the plurality of applets according to the user historical behavior data comprises:
determining a first application parameter according to the applet access amount information for each applet in the plurality of applets;
Determining a second application parameter according to the personal attention information;
determining a third application parameter according to the recent personal access information;
the first application parameter, the second application parameter and the third application parameter are weighted and summed to obtain evaluation values respectively corresponding to each applet;
a preset number of applets is determined from the plurality of applets as the first target applet based on the evaluation values respectively corresponding to each applet.
In some embodiments, the determining the first application parameter according to the applet access amount information includes:
and calculating the first application parameters corresponding to each applet according to the ratio of the access quantity corresponding to each applet to the access quantity corresponding to the highest access quantity applet.
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 comprises the following steps:
aiming at the at least one third target applet, acquiring a time interval between the concerned time corresponding to the third target applet and the current time;
Determining the arrangement sequence corresponding to the third target applet according to the time interval;
determining a sequencing position index value corresponding to the third target applet based on the sequencing order;
calculating a second application parameter corresponding to the third target applet according to the sequencing position index value;
and determining a first preset value as a second application parameter corresponding to a 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.
In some embodiments, the plurality of applets includes at least one fifth target applet accessed by the logged-in user within a preset period of time;
the determining a third application parameter according to the personal recent access information comprises the following steps:
determining, for the at least one fifth target applet, a number of times the fifth target applet is accessed by the logged-in 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 plurality of applets, wherein the sixth target applet is other applets except the fifth target applet in the plurality of applets.
In a third aspect, an embodiment of the present application provides an applet launching device, applied to a terminal device, including:
the container rendering module is used for executing the applet container pre-rendering operation under the condition that the target application program is started to obtain a pre-loaded resource, wherein the target application program is a host program of a plurality of applets, and the plurality of applets comprise a preset number of first target applets determined according to the user historical behavior data;
the resource loading module is used for loading first program resources corresponding to the first target applet based on the preloaded resources;
the first input module is used for receiving a first input of a user for starting a target applet;
the first starting module is used for responding to the first input and performing page rendering on the target applet based on the first program resource so as to start the target applet when the target applet is the first target applet;
And 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, where the second target applet is any applet other than the first target applet in the plurality of applets.
In some embodiments, the apparatus further comprises:
the information sending module is used for sending user information to a server before loading first program resources corresponding to the first target applets based on the preloaded resources, so that the server obtains the user historical behavior data according to the user information, and determines 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 the program parameters corresponding to the first target applet, which are sent by the server;
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 parameter.
In some embodiments, the resource loading module includes:
The verification sub-module is used for verifying the validity of the first program resource to obtain a verification result;
and the loading sub-module is used for 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.
In some implementations, the performing the applet container prerendering operation includes: at least one of loading an applet framework, 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 start-up module comprises:
a container loading sub-module, configured to, in a case where the preloaded resource includes a plurality of containers in a applet container pool, acquire a target container currently in an idle state from the applet container pool, and load the target container;
the resource loading sub-module is used for acquiring a second program resource corresponding to the target applet and loading the second program resource;
and the page rendering sub-module is used for performing page rendering on the target applet 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 status parameter corresponding to the terminal device, and a user historical behavior parameter and a configuration parameter corresponding to the target applet;
program hiding module for hiding the target applet under the condition of determining to set the target applet as 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 to be a very resident applet.
In some embodiments, the device state parameter includes a memory usage rate, the user history 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 scene configuration parameter;
the resident determination module includes:
the first decision sub-module 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 sub-module 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 duration of the target applet is greater than a preset duration threshold value and whether the access frequency of the target applet is greater than a preset frequency threshold value;
the third decision sub-module is used for determining whether the target applet belongs to a service main pushing applet according to the service configuration parameters to obtain a third decision result;
the fourth decision sub-module is used for determining whether the current access scene is matched with the preset scene corresponding to the target application program 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 according to the first decision result, the second decision result, the third decision result and the fourth decision result.
In some embodiments, the determining submodule includes:
a first determining unit configured to determine that the target applet is set as a resident applet, in a case where at least one of the first decision result, the third decision result, or the fourth decision result is that the target applet is set as a resident applet, and the second decision result is that the target applet is set as a resident applet;
A second determining unit configured to determine that the target applet is set as a very resident applet, in a case where any one of the first decision result, the third decision result, and the fourth decision result is set as a very resident applet, or the second decision result is set as a very resident applet.
In a fourth aspect, an embodiment of the present application provides an applet launching device, applied to a server, including:
the information receiving module is used for 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;
the data acquisition module is used for acquiring user historical behavior data according to the user information;
program determining module, which is used for determining 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 resources 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 access information, personal concern information, and personal recent access information;
the program determining module includes:
a first determining sub-module, configured to determine, for each applet in the plurality of applets, a first application parameter according to the applet access amount information;
the second determining submodule is used for determining a second application parameter according to the personal attention information;
a third determining submodule, configured to determine a third application parameter according to the recent access information of the person;
the weighted summation sub-module is used for weighted summation of the first application parameter, the second application parameter and the third application parameter to obtain evaluation values respectively corresponding to each applet;
an object determination sub-module configured to determine, as the first object applet, a preset number of applets from the plurality of applets based on the evaluation values respectively corresponding to each applet.
In some embodiments, the first determining submodule is specifically configured to:
and calculating the first application parameters corresponding to each applet according to the ratio of the access quantity corresponding to each applet to the access quantity corresponding to the highest access quantity applet.
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;
a sequence arrangement unit, configured to determine an arrangement sequence corresponding to the third target applet according to the time interval;
the index determining unit is used for determining an ordering position index value corresponding to the third target applet based on the ordering 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 plurality of 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 plurality of applets except the third target applet.
In some embodiments, the plurality of applets includes at least one fifth target applet accessed by the logged-in user within a preset period of time;
The third determination submodule includes:
a number determining unit configured to determine, for the at least one fifth target applet, a number of times the fifth target applet is accessed by the login user within the preset period of time;
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;
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 plurality of applets, wherein the sixth target applet is other applets except the fifth target applet in the plurality of applets.
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 initiation method as described in any one of the embodiments of the first aspect are implemented when the computer program instructions are executed by a processor.
In a sixth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the applet starting method as in any one of the embodiments of the first aspect.
According to the method, the device, the equipment and the computer readable storage medium for starting the applet, after the target application program serving as the host program is started and before the first input of starting the target applet is carried out by a user, the pre-rendering operation of the applet container is executed in advance to pre-load resources, and further after the first input of starting the target applet by the user is received, the target applet can be directly loaded based on the pre-loaded resources, so that the loading time of the applet can be saved, and the starting speed of the applet can be improved. In addition, the embodiment of the application further loads 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 in advance before the user triggers the starting applet, so that when the user starts the target applet and the target applet is the first target applet, page rendering is directly carried out on the target applet based on the first program resource to complete the starting process, and therefore, the resource loading process is not needed when the user starts the first target applet, the applet loading time can be further saved, the applet starting speed is improved, and the user experience is further improved.
Drawings
In order to more clearly illustrate the technical solution of the embodiments of the present application, the drawings that are needed to be used in the embodiments of the present application will be briefly described, and it is possible for a person skilled in the art to obtain other drawings according to these drawings without inventive effort.
FIG. 1 is a schematic diagram of an example applet initiation provided by the present application;
FIG. 2 is a flowchart illustrating an embodiment of an applet launching method according to the present application;
FIG. 3 is a flow chart of an example of an applet initiation process provided by the present application;
FIG. 4 is a flow chart of another embodiment of the applet launching method provided by the present application;
FIG. 5 is a flow diagram of an example of a dynamic decision process provided by the present application;
FIG. 6a is a schematic diagram of an example of an applet initiation scenario provided by the present application;
FIG. 6b is a schematic diagram of an example of an applet closing scenario provided by the present application;
FIG. 7 is a flow chart of yet another embodiment of an applet launching method provided by the present application;
FIG. 8 is a flow chart of yet another embodiment of an applet launching method provided by the present application;
FIG. 9 is a schematic diagram of an example of an applet evaluation process provided by the present application;
FIG. 10 is an architecture diagram of an example of an applet initiation processing system provided by the present application;
FIG. 11 is a schematic diagram of an embodiment of an applet launching device according to the present application;
FIG. 12 is a schematic view of another embodiment of an applet launching device provided by the present application;
fig. 13 is a schematic structural diagram of an embodiment of an electronic device provided by 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 the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail below with reference to the accompanying drawings and the detailed embodiments. It should be understood that the particular embodiments described herein are meant to be illustrative of the application only and not 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 application by showing examples of the application.
It is noted that relational terms such as first and second, and the like are 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. Moreover, 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 like elements in a process, method, article or apparatus that comprises the element.
After the host program corresponding to the plurality of applets is started, the user can trigger any one of the applets to be started through the host program. When a user opens a certain applet, a cold start of the applet is required. The cold start of the applet includes the start process of the entire applet from the user clicking on the applet icon to the applet home page presentation.
At present, the cold start process of the applet mainly comprises: a terminal initialization flow, such as starting a process, initializing a run time, creating a WebView and the like; page resource loads, such as WebView, request Html load pages from the CDN (Content Delivery Network ); and loading service data, such as acquiring corresponding data by a page request or acquiring data by local storage (localStorage), and updating the DOM (Document Object Model ) in an operation manner. Such applications destroy the applet every time it is closed, and recreate a new applet instance the next time it is opened.
In the process of the cold start of the applet, the first step of the applet page rendering is kernel initialization, which consumes a certain time, and the network is completely in an idle waiting state, and in the stage of page resource loading and service data loading, a certain time is also consumed for downloading resources from the network. When a user opens an applet in a host App (Application program) for the first time, and when the terminal device performance is poor, a network is weak, and the like, bad user experience such as a page white screen, excessively long waiting time of the user, and the like is easily caused.
In order to solve the problems in the prior art, the embodiment of the application provides an applet starting method, an applet starting device, an applet starting equipment and a computer readable storage medium. The applet starting method is applied to the architecture shown in fig. 1, and is described in detail below with reference to fig. 1.
Fig. 1 is a block diagram showing an example of applet initiation provided by the present application.
As shown in fig. 1, the architecture diagram may include at least one terminal device 10 and a server 11. Wherein the terminal device 10 has installed therein a target application client, and the server 11 includes a server corresponding to the target application client. Here, the target application may be a host 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, an integrated machine, or a device simulated by a virtual machine or a simulator. The server 11 may be a cloud server or a server cluster or the like having a storage and calculation function.
With the foregoing architecture, the following describes in detail the method for starting the applet according to the embodiment of the present application with reference to fig. 2 to 10.
Fig. 2 is a schematic flow chart of an embodiment of an applet launching method according to 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 specifically includes the following steps:
s210, under the condition that a target application program is started, executing an applet container prerendering operation to obtain preloaded resources, wherein the target application program is a host program of a plurality of applets, and the plurality of applets comprise a preset number of first target applets determined according to user historical behavior data;
s220, loading a first program resource corresponding to the first target applet based on the preloaded resource;
s230, receiving a first input of a user for starting a target applet;
s240, in the case 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 so as to start the target applet; in the case where the target applet is a second target applet, the target applet is loaded based on the preloaded resource in response to the first input to launch the target applet, wherein the second target applet is any applet of the plurality of applets other than the first target applet.
Therefore, after the target application program serving as the host program is started and before the first input of starting the target applet is carried out by the user, the applet container prerendering operation is executed in advance to carry out resource preloading, and further after the first input of 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, the embodiment of the application further loads 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 in advance before the user triggers the starting applet, so that when the user starts the target applet and the target applet is the first target applet, page rendering is directly carried out on the target applet based on the first program resource to complete the starting process, and therefore, the resource loading process is not needed when the user starts the first target applet, the applet loading time can be further saved, the applet starting speed is improved, and the user experience is further improved.
A specific implementation of each of the above steps is described below.
In some embodiments, in S210, the target application may be a host of the plurality of applets, i.e., the user may launch and run the plurality of applets through the target application. The applet container may be a container for providing a runtime environment for the applet. Wherein, a small program can be correspondingly used when running.
When the target application program is started, resources required by the starting of the applet can be prepared in advance through the prerendering operation of the applet container, and the time consumption of a terminal during the starting of the applet is reduced. In some embodiments, the performing the applet container prerendering operation in S210 may specifically include: at least one of loading an applet framework, 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 applet common resources may include, for example, resources such as a common basic package that are required to be used by each of the applets. Loading the kernel resources may include, for example, creating WebView, etc. Additionally, multiple reusable containers may be included in the created applet container pool so that the applet is loaded for use after start-up.
In addition, the first target applet may be one or more applets of the plurality of applets that are most likely to be initiated by the user, where the first target applet may be resource loaded in advance. The first target applet may be specifically determined according to user historical behavior data, where the user historical behavior data includes, but is not limited to, historical behavior data of a whole network user with big data statistics, and historical behavior data acquired by aiming at a user individual, and the historical behavior data may include applet access information, applet attention information, and the like, for example. In addition, the number of the first target applets for resource loading in advance, that is, the preset number, may be one or more, specifically may be dynamically set according to actual situations, for example, the current memory usage situation in the terminal device, etc., and the values of the preset number may be differentiated for the terminal devices used by different users, which is not limited herein.
It should be noted here that the above procedure for determining the first target applet from the plurality of applets may be performed by the terminal device or by a corresponding server, which is not limited herein.
In some embodiments, in S220, illustratively, on the basis of preloading the resource, the first target applet may be loaded in advance before the user triggers the first target applet to be started, which may specifically include: 1) Loading containers, in particular, empty containers can be obtained from a container pool, and if the empty containers exist, loading is performed; if no empty container exists, a new container is built and added into the container pool; 2) Loading the resource, in particular, may include reading and parsing a cache resource package, obtaining an HTTP (Hyper Text Transfer Protocol ) cache resource, and asynchronously updating the resource package, wherein the cache resource package may include a first program resource corresponding to the preloaded resource and the first target applet.
In order to further increase the resource loading speed of the first target applet, in some embodiments, before S220, the applet starting method provided in the embodiment of the present application may further include:
the method comprises the steps of 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;
program parameters corresponding to the first target applet and sent by the server are received;
and downloading and caching the first program resource corresponding to the first target applet according to the program parameters.
Here, a process of determining one or more first target applets, which are most likely to be started by the user, from among the plurality of applets is performed by the server.
For example, when the target application program is started, the terminal equipment sends user information to the server and establishes communication with the server; the server can obtain corresponding user historical behavior data according to the user information, and further calculate N recommended applets corresponding to the user by utilizing an applet evaluation model based on the user historical behavior data. As such, the server may issue program parameters { app id-1, & gt, app id-N }, corresponding to the N applets, respectively, to the terminal device. After receiving the program parameters of the N applets, the terminal device analyzes the program parameters, and based on the analyzed program parameters, the terminal device silently downloads a resource packet corresponding to the N applets, namely, a first program resource, when the network condition is good, and caches the resource packet locally.
Therefore, by downloading and caching the first program resource corresponding to the first target applet in advance, the user can quickly open and display the page corresponding to the first target applet without depending on the network condition during triggering when triggering and starting the first target applet.
In some embodiments, the step S220 may specifically include:
verifying the validity of the first program resource to obtain a verification result;
and under the condition that the verification result is that the verification is successful, loading the first program resource corresponding to the first target applet into the memory based on the preloaded resource.
Here, before the first program resource is loaded, validity verification may be further performed on the first program resource, so as to improve security of resource loading.
The method includes that a small program management module in the terminal equipment can check the validity of a resource package, and if the small program management module determines that the resource package is legal, whether a first target program is in a starting state is determined, if the small program management module is not started, the first program resource is preloaded into a memory, and page rendering is conducted based on the loaded first program resource when the first target program is started. The specific resource loading process can be referred to in the above related description, and will not be described herein.
Therefore, the validity of the resource can be checked before the resource is loaded into the memory, so that the safety and reliability of the loading process of the applet resource are improved.
In some implementations, in S230, the first input can be a click input that the user triggers to launch the target applet. The manner in which the user triggers the launching of the applet includes, but is not limited to, clicking on a corresponding applet icon from within the applet page in the target application, clicking on an applet icon added to the desktop from the system desktop, clicking on 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 a preloaded first target applet, or may be other applets, i.e., a second target applet, among the plurality of applets, other than the first target applet.
In some embodiments, in S240, if the target applet started by the user trigger is the first target applet, the terminal device may directly complete the 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 started by the user trigger is the second target applet, the terminal device may load the target applet based on the preloaded resource, which may specifically include processes such as container loading, resource loading, and page rendering, so as to complete the applet starting process.
Based on this, in the case where the preloaded resource includes a plurality of containers in the applet container pool, in some embodiments, loading the target applet based on the preloaded resource in S240 described above 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 applet, and loading the second program resource;
and performing page rendering on the target applet based on the second program resource.
For example, a container currently in an idle state may be obtained from a pool of applet containers, if there is a container in an idle state, i.e., a target container, the target container is loaded, and if there is no container in an idle state, a container is newly created and added to the pool of containers.
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 applet is not opened for the first time, the corresponding cache resource package can be read directly from the cache. Meanwhile, the cache resource package corresponding to the preloaded resource is read and analyzed, the HTTP (Hyper Text Transfer Protocol ) cache resource is obtained, and the resource package is updated asynchronously.
Based on the loaded containers and resources, HTML (Hyper Text Markup Language ) file resources can be obtained from the CDN, the HTML file resources are parsed, and a DOM (Document Object Model ) tree is rendered; parsing JS (JavaScript) is performed to obtain service data from the application server and update the DOM.
In this way, through preloading the resource, after the container Chi Dengrong device prerendering operation is created in advance, the container loading, resource loading and page rendering processes are directly performed based on the preloaded resource, so that the loading time of the front stage of the applet can be saved, the starting time of the applet is shortened, and the starting speed of the applet is improved.
In order to more clearly describe the above-described aspects of the present application, a detailed description will be given 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 prerendering flow is triggered to prepare resources required by the applet in running in advance. The applet container prerendering process includes: the method comprises the steps of preloading an applet framework, preloading an applet process, preloading public resources such as an applet public foundation package, preloading kernel resources, preloading an applet container pool, and starting the preloading flow of the first N applets.
And after the user clicks the applet icon, opening the formal starting flow of the applet. If the applet is other than the N preloaded applets, the starting process may specifically include three sub-processes of loading a container, loading a resource, and first page rendering, where the sub-processes corresponding to the loading resource include three processes of reading the resource, caching the HTTP resource, and updating the resource, and the sub-processes corresponding to the first page rendering include four processes of parsing HTML, DOM rendering, parsing JS execution, and JS requesting data.
Based on this, in order to increase the starting speed of the applet in the secondary starting, after S240, referring to fig. 4, the applet starting method provided in the present application may further include the following steps: s2501 to S2504, which are explained in detail below.
S2501, receiving a second input of closing the target applet by the user.
Here, the second input may be, for example, a click input of a close button displayed in a display interface corresponding to the target applet by the user.
S2502, in response to the second input, determining whether to set the target applet as a resident applet according to the device status parameter corresponding to the terminal device and the user history behavior parameter and configuration parameter corresponding to the target applet, if yes, executing S2503, and if no, executing S2504.
Here, the device state parameter may be a parameter capable of reflecting a current operation state (e.g., memory use state) of the terminal device. The user history behavior parameter may be a parameter capable of reflecting a history operation performed by the user on the target applet, wherein the history operation type includes, but is not limited to, an opening mode, a use duration, a use frequency, and the like. The configuration parameters may be parameters that are remotely configured by the server background operator according to the business characteristics or usage scenario characteristics of the target applet.
In a specific example, when the user closes the target applet, the user can determine to close or hide the target applet according to the resident memory management policy of the applet, so as to realize on-demand and dynamic management of the applet and achieve optimization of the second opening effect of the applet. Specifically, the management policy of the applet is generated by a dynamic decision system comprising two parts: local decisions and parameter-configurable remote decisions related to the user and terminal equipment. The final decision result is determined by both parts together. Specifically, as shown in fig. 5, the service configuration parameters and the scene configuration parameters provided by the server are taken as remote parameters according to the remote decision, and the equipment state parameters and the user historical behavior parameters are taken as local parameters according to the local decision, so as to obtain a combined decision which is determined by the remote decision and the local decision together. Based on the merge decision, it may be determined whether to set the target applet as a resident applet, if resident applet is the applet is hidden, the applet is closed.
S2503, hiding the target applet.
In some embodiments, where the target applet is set to 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, closing the target applet.
In some embodiments, where the target applet is set to a very resident applet, the user, upon closing the target applet, may close the target applet and release the applet container into the container pool for reuse of subsequently launched applets.
Thus, by dynamically setting the target applet as a resident applet, the memory in which the applet can reside when the user closes the applet is realized, and the time for the applet to be started for the second time can be greatly shortened.
In some embodiments, the device state parameter comprises memory usage, the user history behavior parameter comprises at least one of a target applet opening, an access duration, and an access frequency, and the configuration parameter comprises at least one of a business configuration parameter and a scene configuration parameter.
Based on this, S2502 described above 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;
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 applet belongs to the service main pushing applet according to the service 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 according to the scene configuration parameters, and obtaining a fourth decision result;
and determining whether to set the target applet as the resident applet according to the first decision result, the second decision result, the third decision result and the fourth decision result.
Here, a specific embodiment of determining the first decision result may be: the method comprises the steps of obtaining a current host App, namely a target application program, on a terminal device, wherein the maximum memory maxMemory can be applied for, the memory total memory can be applied for, and further, the memory utilization rate can be calculated according to the ratio of the maxMemory to the total memory, the calculation formula of the memory utilization rate is total memory/maxMemory, and a first decision result can be obtained by comparing the memory utilization rate with a preset utilization rate threshold M. For example, when the memory usage is greater than M, the first decision result is to set the target applet as a very resident applet; when the memory usage is less than or equal to M, the first decision result is to set the target applet as the resident applet.
In addition, a 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 a preset mode S at the same time, namely S epsilon S, and the access time length T reaches a preset time length threshold T, namely T is more than or equal to T, and the access frequency F reaches a preset frequency threshold F, namely F is more 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, in the case where the above three conditions are satisfied simultaneously, the second decision result obtained is to set the target applet as the resident applet, otherwise, the second decision result obtained is to set the target applet as the very resident applet. Of course, the second decision result may also be determined according to whether some of the conditions are satisfied, which is not limited herein.
The specific implementation of determining the third decision result may be: according to the business characteristics of the applet, whether the applet resides in the background or not is determined through switch configuration, and when the parameter form is { app id:1}, the applet is resident, and the other applet is not resident. For example, a business push-up applet may be configured to reside.
The specific implementation of determining the fourth decision result may be: according to the use scene characteristics of the applet, whether the applet resides in the background or not is determined by setting scene configuration parameters in the form of { app id: < scene rule, 1> }. The scene rule may be a rule that an applet is set to be resident or non-resident in a preset scene. For example, if the mobile phone recharging applet has the highest access flow rate at the end of the month, the mobile phone recharging applet can be configured to be resident at the end of the month and the end of the month according to a time rule; a regional applet is most accessible in that region and may be configured to reside within that region according to regional rules.
Based on the four decision results, after comprehensive judgment is carried out according to preset rules, whether the target applet is set as the resident applet can be finally determined. The preset rule includes, but is not limited to, performing comprehensive decision according to a weight value of the decision result, or taking one or some decision results as a dominant one, and taking other decision results as auxiliary ones to perform final decision.
In addition, the S, T, F, M may be dynamically configured and issued to the terminal device by the server, and the configuration and the issuing manner are not limited herein.
Therefore, by combining the service parameter configuration, the operation parameter configuration, the user behavior and the current running state of the device of the applet, whether the current applet resides in the memory or not is commonly determined from two dimensions of the local strategy and the remote strategy, 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 conveniently and rapidly started and displayed when the applet is started by the user for the second time. In addition, the on-demand and dynamic management of the applet can be realized by automatically generating the resident memory strategy of the applet.
In some embodiments, the step of determining whether to set the target applet as the 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 the resident applet in the case that at least one of the first decision result, the third decision result or the fourth decision result is to set the target applet as the resident applet and the second decision result is to set the target applet as the resident applet;
in the case that any one of the first decision result, the third decision result, and the fourth decision result is that the target applet is set as the very resident applet, or the second decision result is that the target applet is set as the very resident applet, it is determined that the target applet is set as the very resident applet.
Here, the second decision result may be taken as a dominant, and the other decision results as an auxiliary, to determine whether to set the target applet as a resident applet. In addition, the first, second, third, and fourth decision results may be boolean values, i.e., result 0 or 1. Where 0 may denote setting the target applet as a very resident applet and 1 denotes setting the target applet as a resident applet.
In a specific example, a user opens an applet, and a host App obtains or updates service configuration parameters and scene configuration parameters from a server; caching service configuration parameters and scene configuration parameters into the applet parameter table; acquiring the behavior sequence of the user of the applet, and obtaining whether the applet resides in a memory or not through evaluation, and recording the result as a Boolean value t1; acquiring the current equipment state, and obtaining whether the applet resides in a memory or not through evaluation, and recording the result as a Boolean value t2; analyzing service configuration parameters, acquiring resident background switch configuration of an applet, and recording the result as a Boolean value t3; 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 t4; the final decision result is t= (t 1 t3 t 4) & t2; if the final decision result is judged to be resident in the memory, caching the applet application in the memory, and hiding the applet; if the final judgment is that the memory is not resident, the small program is closed and the container is recycled.
Therefore, the second decision result determined by the state of the terminal equipment is taken as the leading, the decision result determined by other factors is taken as the auxiliary, and the final judgment is carried out, so that the final judgment result fully considers the running state of the terminal equipment, and the target applet is set as a resident applet as far as possible under the condition that the terminal equipment can normally run, thereby improving the starting speed of the target applet during secondary starting.
In summary, the embodiment of the application provides an applet multitask stack management model, which can be used for residing in a memory after the applet is closed through applet instance cache, so that the secondary starting time of the applet is shortened, and the secondary second opening effect is realized. 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 through pages a and b of applet C, if applet C is not a resident applet, applet C is closed and the corresponding instance of applet C is fetched from the App page stack. Applet a and applet B are resident applets, with their corresponding instances cached all the way to the App page stack.
In addition, as described in the foregoing embodiments, in order to reduce the waiting time of the user and increase the starting speed of the applet, a method for preloading a preset number of first target applets when the user opens the host application is proposed herein. How to effectively judge the commonly used applet of the user and take the applet as the preloaded first target applet is another technical problem solved by the application. The application relates to an evaluation model based on big data and personal history data of a user, wherein the model is used for scoring applets, and the first N applets are selected as first target applets according to the scoring result to be preloaded. This process is described in detail below.
Fig. 7 is a schematic flow chart diagram of another embodiment of the applet starting method provided by 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 specifically includes the following steps: s710 to S740, which will be explained in detail below.
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 applets.
Here, the user information may be, for example, information that can identify the user's identity, such as an account number, a user name, or the like, used when the user logs in to the target application.
S720, acquiring user historical behavior data according to the user information.
Here, the user historical behavior data includes, but is not limited to, historical behavior data of the whole network user counted by big data, and historical behavior data collected for the user individual, wherein the historical behavior data may include, for example, applet access information, applet attention information, and the like.
In some implementations, the user historical behavior data may include, in particular, applet access volume information, personal attention information, and personal recent access information.
The applet access amount information may include access amount data of a large data statistics of all network users. 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 period of time, which may include information of one or more applets that the user has accessed within the preset period of time.
S730, determining a preset number of first target applets from the plurality of applets according to the user historical behavior data.
For example, the evaluation score value corresponding to each applet may be calculated by using the obtained historical behavior data of the user through a preset score calculation formula or a preset applet evaluation model, and the first N applets are used as preloaded first target applets based on the evaluation score value.
And S740, transmitting the program parameters corresponding to the first target applet to the terminal equipment so that the terminal equipment preloads the first program resources corresponding to the first target applet according to the program parameters before starting the first target applet.
For example, after determining the first target applet, the server may issue the applet parameters { app id-1,..app id-n } corresponding to the one or more first target applets, respectively, to the client of the terminal device, so that after the client parses the parameters, the first target applet resource package is correspondingly downloaded, cached locally to the client, and preloaded into the memory before the first target applet is started.
In this way, the terminal equipment preloads the first target applet by determining the first target applet with the preset number from the plurality of applets according to the user history behavior data, so that the starting time of the first target applet can be reduced, the starting speed of the applet can be improved, and the user experience can be improved.
In some embodiments, in the case where the user history behavior data includes applet access amount information, personal attention information, and personal recent access information, as shown in fig. 8, the above S730 may specifically include the steps of:
s7301, determining a first application parameter according to the applet access amount information for each applet in a plurality of applets;
s7302, determining a second application parameter according to the personal attention information;
s7303, determining a third application parameter according to the recent access information of the person;
s7304, 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 applet;
s7305, a preset number of applets is determined as a first target applet from among the plurality of applets based on the evaluation values corresponding to the respective applets.
In this way, by calculating the evaluation value corresponding to each applet 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 further determining the first target applet based on the evaluation value, the probability that the determined first target applet is started by the user can be increased, the starting speed of the applet most likely to be started by the user is further increased, and the waiting time of the user is further reduced.
A specific implementation of each of the above steps is described below.
In some embodiments, in S7301, the applet access information may be, for example, a list of popular applications that are statistically large, ranked by the access of users across the web.
In some embodiments, the S7301 may specifically include:
and calculating the first application parameters corresponding to each applet according to the ratio of the access quantity corresponding to each applet to the access quantity corresponding to the highest access quantity applet.
For the application parameters of the commonly used applets, namely the first application parameter, the access amount of all the applets is counted through big data, and the evaluation value e of each applet is calculated through system analysis 1
e 1 =f(I),e 1 ∈[0,100]
I=[i 1 ,i 2 ,…,i n ]
Where f (I) represents an applet analysis function based on the access volume of the whole network user, the return value of which can be the value of the first application parameter. I represents the collection of access volumes of all n applets in the collected host APP.
For applet C, f (I C ) The calculation method of (1) is as follows:
wherein i is c Is the access amount of applet C.
Thus, by the method, the first application parameters corresponding to each applet can be calculated according to the applet access amount.
In some embodiments, in S7302, the personal attention information may include a list of applications of personal attention of the user.
In some embodiments, the plurality of applets includes at least one third target applet that is focused on by the logged-in user, and based on this, the step S7302 may specifically include:
aiming at least one third target applet, acquiring a time interval between the concerned time corresponding to the third target applet and the current time;
determining the arrangement sequence corresponding to the third target applet according to the time interval;
determining an ordering position index value corresponding to the third target applet based on the ordering sequence;
calculating a second application parameter corresponding to the third target applet according to the sequencing position index value;
And determining the first preset value as a second application parameter corresponding to a 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, for example, 0.
Illustratively, for the applet application parameters of interest, i.e., the second application parameters, the user clicks the trigger of interest in the applet menu panel, records the interest list in the background, and the system analyzes and calculates each applet evaluation value e 2
e 2 =g(D,dt),e 2 ∈[0,100]
D=[d 1 ,d 2 ,…,d n ]
dt=[dt 1 ,dt 2 ,…,dt n ]
Where g (D, dt) represents an applet analysis function based on a 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 of interest to the user, including n applets of interest to the user. dt represents the time interval from the time of interest to the current time for each applet.
For applet C, g (D C Dt) is calculated by the following steps:
the Seq (dt) is a ranking position index value corresponding to the applet C after ranking from big to small according to the time interval.
Thus, by the method, the second application parameters corresponding to the applets can be calculated according to the applet information focused by the user.
In some embodiments, in S7303, the personal recent access information may include a list of applications recently used by the user' S personal, wherein the list may include, in particular, a list of applets and access behaviors that the user has accessed within a preset period of time.
In some embodiments, the plurality of applets includes at least one fifth target applet accessed by the login user within a preset time period, and based on this, the step S7303 may specifically include:
determining the number of times that the fifth target applet is accessed by a login user in a preset time period aiming at least one fifth target applet;
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 the second preset value as a third application parameter corresponding to a 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.
For the most recently used applet application parameters, namely the third application parameters, the information of the currently opened applet is collected in real time by the host App runtime, the number of times of opening the applet is counted, and each applet evaluation value e is calculated through system analysis 3
e 3 =h(RT),e 3 ∈[0,100]
RT=[rt 1 ,rt 2 ,…,rt n ]
BT=[bt 1 ,bt 2 ,…,bt m ]
Where h (RT) represents an applet analysis function based on the user's most recently opened applet application list, the return value of which can be the value of the third application parameter. RT represents a list of all open applets by the user for a specified period of time, and BT represents a sequence of user access to applets for a specified period of time, which may include m user access applets.
For applet C, the calculation method for h (RT) is:
where m is the sequence length of the BT sequence.
Thus, by the method, the second application parameters corresponding to the applets can be calculated according to the applet information focused 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 final evaluation values corresponding to each applet.
In some specific examples, as shown in fig. 9, the applet access volume information applet evaluation model mainly contains three parameters: a common application list of whole network big data statistics, a user individual attention application list and a user individual recently used application list. The calculation method of the applet evaluation model is as follows:
E=αe 1 +βe 2 +γe 3
Alpha+beta+gamma=1 and alpha, beta, gamma is not less than 0
E,e 1 ,e 2 ,e 3 ∈[0,100]
Wherein E represents the evaluation value of the applet; e, e 1 、e 2 And e 3 Respectively representing the commonly used applet application parameters, the concerned applet application parameters and the applet predicted evaluation values which are recently given by using the applet application parameters; alpha, beta and gamma are the weight values of the three parameters respectively, and the sum of the weight values is 1.
In some embodiments, in S7305, the plurality of applets may be ranked according to the evaluation value, and the top N applets with the highest evaluation value may be taken as the first target applet.
In summary, in order to better describe the overall solution, some specific examples are given based on the above embodiments.
For example, an architecture diagram of an applet boot processing system as shown in fig. 10. The applet launching processing system may include an applet container prerendering module 1001, an applet preloading module 1002, a dynamic management module 1003 and a container pool 1004, which are explained in detail below.
In some examples, the applet container prerendering module 1001 is primarily used to preread applet frameworks, to preread kernel resources, to preread applet processes, to prerebuilt applet container pools, and the like; after the host application is started, resources required by the starting of the applet are prepared in advance through container prerendering, and the time consumption of the terminal is reduced.
In some examples, the applet preloading module 1002 may include an applet evaluation sub-module, a download sub-module, and a load sub-module, where the applet evaluation sub-module is mainly configured to evaluate a list corresponding to the applets that need to be preloaded, the download sub-module is configured to download resource packages of the individual applets in the list, and the load sub-module is configured to load the applet resource packages into the container pool.
In some examples, the dynamic management module 1003 is configured to dynamically determine whether the current applet needs to reside according to the multidimensional information by using a dynamic decision model in response to an operation of opening or closing the applet by a user, where main functions include caching applet application, device memory status monitoring, applet container multiplexing.
In some examples, container pool 1004 can exist in memory space for holding applet instances; the container pool size is dynamically configurable, creating containers when the CPU is idle.
Therefore, through the framework, the second opening of the applet can be realized, the cold start speed and the secondary start speed of the applet are improved, the waiting time of a user is reduced, and the user experience is improved.
It should be noted that, the application scenario described in the foregoing embodiment of the present application is for more clearly describing the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided by the embodiment of the present application, and as a person of ordinary skill in the art can know, with the appearance of a new application scenario, the technical solution provided by the embodiment of the present application is also applicable to similar technical problems.
Based on the same inventive concept, the application also provides an applet starting device. This is described in detail with reference to fig. 11 and 12.
Fig. 11 is a schematic structural diagram of an embodiment of an applet launching device provided by the present application. The apparatus is applicable to the terminal device 10 shown in fig. 1.
As shown in fig. 11, the applet launching apparatus 1100 may include:
the container rendering module 1101 is configured to perform an applet container prerendering operation under a condition that a target application program is started to obtain preloaded resources, where the target application program is a host program of a plurality of applets, and the plurality of applets includes a preset number of first target applets determined according to user historical behavior data;
the resource loading module 1102 is configured to load a first program resource corresponding to the first target applet based on the preloaded resource;
a first input module 1103 for receiving a first input of a user-initiated target applet;
a first starting module 1104, configured to respond to the first input and perform page rendering on the target applet based on the first program resource to start the target applet if the target applet is the first target applet;
The second starting module 1105 is configured to load, in response to the first input, the target applet based on the preloaded resource to start the target applet, where the second target applet is any applet other than the first target applet among the plurality of applets.
The following describes the above-mentioned applet launching device 1100 in detail, and is specifically described as follows:
in some of these embodiments, the applet launching apparatus 1100 further comprises:
the information sending module is used for sending user information to the server before the first program resource corresponding to the first target applet is loaded based on the preloaded resource, so that the server obtains user historical behavior data according to the user information, and a preset number of first target applets are determined from a plurality of applets according to the user historical behavior data;
the parameter receiving module is used for receiving the program parameters corresponding to the first target applet, which are sent by the server;
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 implementations, the resource loading module 1102 can include:
The verification sub-module is used for verifying the validity of the first program resource to obtain a verification result;
and the loading sub-module is used for 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.
In some implementations, performing the applet container prerendering operation includes: at least one of loading an applet framework, 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 starting module 1105 may include:
a container loading sub-module, configured to, in a case where the preloaded resource includes a plurality of containers in the applet container pool, obtain a target container currently in an idle state from the applet container pool, and load the target container;
the resource loading sub-module is used for acquiring a second program resource corresponding to the target applet and loading the second program resource;
and the page rendering sub-module is used for rendering the page of the target applet based on the second program resource.
In some embodiments, the applet launching apparatus 1100 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 whether to set the target applet as a resident applet according to the device status parameter corresponding to the terminal device and the user history behavior parameter and the configuration parameter corresponding to the target applet in response to the second input;
program hiding module for hiding the target applet in case of determining to set the target applet as resident applet;
and the program closing module is used for closing the target applet in the case of determining to set the target applet as a very resident applet.
In some embodiments, the device state parameter includes a memory usage rate, the user history 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 scene configuration parameter;
the resident determination module includes:
the first decision sub-module 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;
The second decision sub-module 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 sub-module is used for determining whether the target applet belongs to the service main pushing applet according to the service configuration parameters to obtain a third decision result;
the fourth decision sub-module is used for determining whether the current access scene is matched with a preset scene corresponding to the target application program 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 the resident applet according to the first decision result, the second decision result, the third decision result and the fourth decision result.
In some implementations, determining the sub-module includes:
a first determining unit configured to determine that the target applet is set as a resident applet, in a case where at least one of the first decision result, the third decision result, or the fourth decision result is that the target applet is set as a resident applet, and the second decision result is that the target applet is set as a resident applet;
And a second determining unit configured to determine that the target applet is set as a very resident applet in a case where any one of the first decision result, the third decision result, and the fourth decision result is the setting of the target applet as the very resident applet, or the second decision result is the setting of the target applet as the very resident applet.
Therefore, after the target application program serving as the host program is started and before the first input of starting the target applet is carried out by the user, the applet container prerendering operation is executed in advance to carry out resource preloading, and further after the first input of 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, the embodiment of the application further loads 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 in advance before the user triggers the starting applet, so that when the user starts the target applet and the target applet is the first target applet, page rendering is directly carried out on the target applet based on the first program resource to complete the starting process, and therefore, the resource loading process is not needed when the user starts the first target applet, the applet loading time can be further saved, the applet starting speed is improved, and the user experience is further improved.
Fig. 12 is a schematic structural view of an embodiment of the applet launching device provided by the present application. The device can be applied to the server 11 shown in fig. 1.
As shown in fig. 12, the applet launching apparatus 1200 may include:
an information receiving module 1201, 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 a plurality of applets;
a data acquisition module 1202 for acquiring user historical behavior data according to user information;
program determining module 1203 configured to determine a preset number of first target applets from the plurality of applets according to the user history behavior data;
and the parameter sending module 1204 is configured to send a 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.
The following describes the above-mentioned applet launching device 1200 in detail, and is specifically described as follows:
in some of these embodiments, the user historical behavior data includes applet access volume information, personal attention information, and personal recent access information;
The program determination module 1203 may include:
the first determining submodule is used for determining a first application parameter according to the applet access amount information aiming at each applet in 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 personal access information;
the weighted summation sub-module is used for weighted summation of the first application parameter, the second application parameter and the third application parameter to obtain evaluation values corresponding to each applet respectively;
the object determination sub-module is used for determining a preset number of applets from a plurality of applets as a first object applet based on evaluation values respectively corresponding to the applets.
In some embodiments, the first determination submodule is specifically configured to:
and calculating the first application parameters corresponding to each applet according to the ratio of the access quantity corresponding to each applet to the access quantity corresponding to the highest access quantity applet.
In some implementations, 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 a time interval between the concerned 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 the arrangement sequence corresponding to the third target applet according to the time interval;
the index determining unit is used for determining an ordering position index value corresponding to the third target applet based on the ordering sequence;
the first calculation unit is used for calculating a second application parameter corresponding to the third target applet according to the sequencing position index value;
the first determining unit is configured to determine, for a fourth object applet in the plurality of applets, the first preset value as a second application parameter corresponding to the fourth object applet, where the fourth object applet is another applet in the plurality of applets except the third object applet.
In some embodiments, the plurality of applets includes at least one fifth target applet accessed by the logged-in user within a preset period of time;
the third determination submodule includes:
the number determining unit is used for determining the number of times that the fifth target applet is accessed by a login user in a preset time period for at least one fifth target applet;
The second calculation 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 a preset time period;
and the second determining unit is used for determining the second preset value as a third application parameter corresponding to a 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.
Therefore, the terminal equipment preloads the first target small program by determining the first target small program with the preset number from the plurality of small programs according to the historical behavior data of the user, so that the starting time of the first target small program can be reduced, the starting speed of the small program is improved, and the user experience is improved.
Fig. 13 is a schematic hardware structure of an embodiment of an electronic device according to the present application.
The electronic device 1300 may include a processor 1301 and a memory 1302 storing computer program instructions.
In particular, the processor 1301 may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured as one or more integrated circuits that implement 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 comprise a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. 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 a 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 the operations described with reference to a method in accordance with an aspect of the application.
Processor 1301 implements any of the applet starting methods of the above embodiments by reading and executing computer program instructions stored in 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 via a bus 1310 and perform communication with each other.
The communication interface 1303 is mainly used to implement communication between each module, apparatus, unit, and/or device in the embodiment of the present application.
Bus 1310 includes hardware, software, or both, coupling components of an online data flow billing device to each other. By way of example, and not limitation, 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 HyperTransport (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 the above. Bus 1310 can include one or more buses, where appropriate. Although embodiments of the application have been described and illustrated with respect to a particular bus, the application contemplates any suitable bus or interconnect.
For example, the electronic device 1300 may be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), or the like when used as a terminal device. The electronic device 1300 may be a cloud server, a server cluster, or the like when acting as a server.
The electronic device 1300 may perform the applet starting method in the embodiment of the application, thereby implementing the applet starting method and apparatus described in connection with fig. 2-12.
In addition, in combination with the applet starting method in the above embodiment, the embodiment of the application may be implemented by providing a computer readable storage medium. The computer readable storage medium has stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the applet initiation methods of 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 (EPROM or flash memories), portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, and the like.
It should be understood that the application is not limited to the particular arrangements and instrumentality described above and shown in the drawings. For the sake of brevity, a detailed description of known methods is omitted here. 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 shown, and those skilled in the art can make various changes, modifications and additions, or change the order between steps, after appreciating the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented in 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, a plug-in, a function card, or the like. When implemented in software, the elements of the 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 over transmission media or communication links by a data signal carried in a carrier wave. A "machine-readable medium" may include any medium that can store or transfer information. Examples of machine-readable media include electronic circuitry, 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 the like. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should also be noted that the exemplary embodiments mentioned in this disclosure 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, or may be performed in a different order from the order in the embodiments, or several steps 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 being, 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 which performs the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the foregoing, only the specific embodiments of the present application are described, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the systems, modules and units described above may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein. It should be understood that the scope of the present application is not limited thereto, and any equivalent modifications or substitutions can be easily made by those skilled in the art within the technical scope of the present application, and they should be included in the scope of the present application.

Claims (15)

1. An applet starting method applied to a terminal device, comprising:
under the condition that a target application program is started, executing the pre-rendering operation of an applet container to obtain a pre-loaded resource, wherein the target application program is a host program of a plurality of applets, and the plurality of applets comprise a preset number of first target applets determined according to user historical behavior data;
loading a first program resource corresponding to the first target applet based on the preloaded resource;
receiving a first input of a user to initiate a target applet;
In the case that the target applet is the first target applet, in response to the first input, rendering a page of the target applet based on the first program resource to launch the target applet;
loading the target applet based on the preloaded resource to initiate the target applet in response to the first input if the target applet is a second target applet, wherein the second target applet is any applet of the plurality of applets other than the first target applet;
after launching the target applet, the method further comprises:
receiving a second input from a user closing the target applet;
determining, in response to the second input, whether to set the target applet as a resident applet based on a device state parameter corresponding to the terminal device and a user history behavior parameter and configuration parameter corresponding to the target applet;
hiding the target applet in the event that it is determined to set the target applet as a resident applet;
in the event that it is determined to set the target applet to a very resident applet, the target applet is closed.
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:
user information is sent to a server, so that the server obtains the user historical behavior data according to the user information, and a preset number of first target applets are determined from the plurality of applets according to the user historical behavior data;
program parameters corresponding to the first target applet and sent by the server are received;
and downloading and caching the first program resource corresponding to the first target applet according to the program parameters.
3. The method of claim 1, wherein loading the first program resource corresponding to the first target applet based on the preloaded resource comprises:
verifying the validity of the first program resource to obtain a verification result;
and under the condition that the verification result is that the verification is successful, loading the first program resource corresponding to the first target applet into a memory based on the preloaded resource.
4. The method of claim 1, wherein the performing applet container prerendering operations comprises: at least one of loading an applet framework, 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.
5. The method of claim 1, wherein, in the case where the preloaded resource comprises a plurality of containers in a pool of applet containers, the loading the target applet based on the preloaded 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 applet, and loading the second program resource;
and performing page rendering on the target applet based on the second program resource.
6. The method of claim 1, wherein the device state parameters include memory usage, the user history behavior parameters include at least one of a manner of opening, a length of access, and a frequency of access of the targeted applet, and the configuration parameters include at least one of a business configuration parameter and a scene configuration parameter;
the 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 history behavior parameter and the configuration parameter corresponding to the target applet includes:
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;
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 duration of the target applet is greater than a preset duration threshold value and whether the access frequency of the target applet is greater than a preset frequency threshold value;
determining whether the target applet belongs to a service main pushing applet according to the service 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 according to the scene configuration parameters, and obtaining a fourth decision result;
and 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.
7. The method of claim 6, wherein the determining whether to set the target applet as a resident applet based on the first decision result, the second decision result, the third decision result, and the fourth decision result comprises:
determining to set the target applet as a resident applet if at least one of the first, third, or fourth decision results 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 a very resident applet in the case that any one of the first, third and fourth decision results is to set the target applet as a very resident applet or the second decision result is to set the target applet as a very resident applet.
8. An applet launching method applied to a server, comprising:
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 user historical behavior data according to the user information;
determining a preset number of first target applets from the plurality of applets according to the user historical behavior data;
program parameters corresponding to the first target applet are sent to the terminal equipment, so that the terminal equipment preloads first program resources corresponding to the first target applet according to the program parameters before starting the first target applet;
the user history behavior data comprises applet access amount information, personal attention information and personal recent access information, wherein the personal attention information comprises a user personal attention application list, and the personal recent access information comprises a user personal recent use application list;
The determining a preset number of first target applets from the plurality of applets according to the user historical behavior data comprises:
determining a first application parameter according to the applet access amount information for each applet in the plurality of applets;
determining a second application parameter according to the personal attention information;
determining a third application parameter according to the recent personal access information;
the first application parameter, the second application parameter and the third application parameter are weighted and summed to obtain evaluation values respectively corresponding to each applet;
a preset number of applets is determined from the plurality of applets as the first target applet based on the evaluation values respectively corresponding to each applet.
9. The method of claim 8, wherein determining the first application parameter based on the applet access information comprises:
and calculating the first application parameters corresponding to each applet according to the ratio of the access quantity corresponding to each applet to the access quantity corresponding to the highest access quantity applet.
10. The method of claim 8, wherein 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 comprises the following steps:
aiming at the at least one third target applet, acquiring a time interval between the concerned time corresponding to the third target applet and the current time;
determining the arrangement sequence corresponding to the third target applet according to the time interval;
determining a sequencing position index value corresponding to the third target applet based on the sequencing order;
calculating a second application parameter corresponding to the third target applet according to the sequencing position index value;
and determining a first preset value as a second application parameter corresponding to a 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.
11. The method of claim 8, wherein the plurality of applets includes at least one fifth target applet accessed by the logged-in user within a preset period of time;
the determining a third application parameter according to the personal recent access information comprises the following steps:
determining, for the at least one fifth target applet, a number of times the fifth target applet is accessed by the logged-in 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 plurality of applets, wherein the sixth target applet is other applets except the fifth target applet in the plurality of applets.
12. An applet launching device for use in a terminal device, said device comprising:
the container rendering module is used for executing the applet container pre-rendering operation under the condition that the target application program is started to obtain a pre-loaded resource, wherein the target application program is a host program of a plurality of applets, and the plurality of applets comprise a preset number of first target applets determined according to the user historical behavior data;
the resource loading module is used for loading first program resources corresponding to the first target applet based on the preloaded resources;
the first input module is used for receiving a first input of a user for starting a target applet;
The first starting module is used for responding to the first input and performing page rendering on the target applet based on the first program resource so as to start the target applet when 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, where the second target applet is any applet other than the first target applet in the plurality of applets;
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 status parameter corresponding to the terminal device, and a user historical behavior parameter and a configuration parameter corresponding to the target applet;
program hiding module for hiding the target applet under the condition of determining to set the target applet as 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 to be a very resident applet.
13. An applet launching apparatus for use with a server, the apparatus comprising:
the information receiving module is used for 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;
the data acquisition module is used for acquiring user historical behavior data according to the user information;
program determining module, which is used for determining a preset number of first target applets from the plurality of applets according to the user historical behavior data;
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 first program resources corresponding to the first target applet according to the program parameters before starting the first target applet;
the user history behavior data comprises applet access amount information, personal attention information and personal recent access information, wherein the personal attention information comprises a user personal attention application list, and the personal recent access information comprises a user personal recent use application list;
The program determining module includes:
a first determining sub-module, configured to determine, for each applet in the plurality of applets, a first application parameter according to the applet access amount information;
the second determining submodule is used for determining a second application parameter according to the personal attention information;
a third determining submodule, configured to determine a third application parameter according to the recent access information of the person;
the weighted summation sub-module is used for weighted summation of the first application parameter, the second application parameter and the third application parameter to obtain evaluation values respectively corresponding to each applet;
an object determination sub-module configured to determine, as the first object applet, a preset number of applets from the plurality of applets based on the evaluation values respectively corresponding to each applet.
14. An electronic device, the device comprising: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the steps of the applet starting method according to anyone of claims 1-7 or 8-11.
15. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon computer program instructions which, when executed by a processor, implement the steps of the applet starting method according to anyone of claims 1-7 or 8-11.
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 CN114398094A (en) 2022-04-26
CN114398094B true 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)

Families Citing this family (1)

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

Citations (19)

* 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
EP2907290A1 (en) * 2012-10-10 2015-08-19 Citrix Systems Inc. Policy-based application management
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
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
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

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8898667B2 (en) * 2008-06-04 2014-11-25 International Business Machines Corporation Dynamically manage applications on a processing system
US8671407B2 (en) * 2011-07-06 2014-03-11 Microsoft Corporation Offering network performance guarantees in multi-tenant datacenters
US9489194B2 (en) * 2011-07-09 2016-11-08 Mobile Epiphany, Llc Rapidly configurable program
US20160191645A1 (en) * 2014-12-30 2016-06-30 Citrix Systems, Inc. Containerizing Web Applications for Managed Execution
CN107783801B (en) * 2017-11-06 2021-03-12 Oppo广东移动通信有限公司 Application program prediction model establishing and preloading method, device, medium and terminal
CN109947498B (en) * 2017-12-20 2021-06-29 Oppo广东移动通信有限公司 Application program preloading method and device, storage medium and mobile terminal
US11055079B2 (en) * 2019-01-31 2021-07-06 Vmware, Inc. Systems and methods for just-in-time application implementation
CN115136564A (en) * 2020-02-13 2022-09-30 腾赛拉网络有限公司 Preloading of applications and content within applications in user equipment

Patent Citations (19)

* 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
EP2907290A1 (en) * 2012-10-10 2015-08-19 Citrix Systems Inc. Policy-based application management
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
CN111198730A (en) * 2018-10-30 2020-05-26 广州腾讯科技有限公司 Method, device, terminal and computer storage medium for starting sub-application program
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
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推荐***的设计与实现.《中国优秀硕士学位论文全文数据库 信息科技辑》.2020,全文. *

Also Published As

Publication number Publication date
CN114398094A (en) 2022-04-26

Similar Documents

Publication Publication Date Title
EP4020349A1 (en) Risk control method, computer device, and readable storage medium
US8209277B2 (en) Predicting the outcome of events based on related internet activity
CN107277036B (en) Login validation method, verifying equipment and storage medium based on multistation point data
CN111311136A (en) Wind control decision method, computer equipment and storage medium
CN108009934B (en) Server, case distribution method and system, and event distribution method and system
US10338663B2 (en) Energy saving method and apparatus of mobile terminal
CN103530292A (en) Webpage displaying method and device
CN108304452B (en) Article processing method and device and storage medium
CN107402938A (en) page display method, device and client device
CN112905928B (en) Webpage refreshing method and device, electronic equipment and storage medium
CN114398094B (en) Applet starting method, device, equipment and computer readable storage medium
Jha et al. The Internet with privacy policies: Measuring the Web upon consent
CN110659404A (en) Information recommendation method and device and storage medium
CN113626624B (en) Resource identification method and related device
CN110929129B (en) Information detection method, equipment and machine-readable storage medium
CN109522501B (en) Page content management method and device
CN114301692A (en) Attack prediction method, device, medium and equipment
CN114168847A (en) Data query method and device, electronic equipment and storage medium
CN113609409A (en) Method and system for recommending browsing information, electronic device and storage medium
CN103780592A (en) Method and apparatus for determining being stolen of user account
CN112182461A (en) Method and device for calculating webpage sensitivity
CN111723294A (en) AI-based RPA robot intelligent recommendation method, device and equipment
CN109120509B (en) Information collection method and device
CN109829043A (en) Part of speech confirmation method, device, electronic equipment and storage medium
CN106326419B (en) Network automata processing method and device

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