CN111651218A - Applet reservation method and device, electronic equipment and storage medium - Google Patents
Applet reservation method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111651218A CN111651218A CN202010456553.3A CN202010456553A CN111651218A CN 111651218 A CN111651218 A CN 111651218A CN 202010456553 A CN202010456553 A CN 202010456553A CN 111651218 A CN111651218 A CN 111651218A
- Authority
- CN
- China
- Prior art keywords
- applet
- current user
- background
- current
- local database
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 230000014759 maintenance of location Effects 0.000 claims description 78
- 230000015654 memory Effects 0.000 claims description 22
- 230000006399 behavior Effects 0.000 claims description 8
- 238000004590 computer program Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 238000012423 maintenance Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000000717 retained effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44594—Unloading
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/485—Task life-cycle, e.g. stopping, restarting, resuming execution
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Electric Clocks (AREA)
Abstract
The application discloses an applet reserving method, an applet reserving device, electronic equipment and a storage medium, and relates to the technical field of integrated circuits. The specific scheme is as follows: when the fact that the current user closes the applet on the front-end page is detected, obtaining the background reserved time of the applet aiming at the current user; and reserving the applet in the background application according to the background reserved time length of the applet aiming at the current user. According to the embodiment of the application, the heat duty ratio of the applet can be effectively improved, the performance of the applet is further improved, and the user experience of the applet is ensured.
Description
Technical Field
The present application relates to the field of computer technologies, and further relates to internet technologies, and in particular, to a method and an apparatus for reserving an applet, an electronic device, and a storage medium.
Background
With the rapid development of the internet technology, an application program is opened through an application client installed in electronic equipment and information interaction is performed, so that the requirement of convenience for people to acquire information cannot be met, and a small program is produced at the right moment. The small program can be issued from the server, and can be executed in a specific container without installation, so that the information interaction mode of the user through the application program is more convenient.
The user starts the applet in two ways: cold start and warm start; the cold start refers to that a user opens the smart applet for the first time, or the user reopens the smart applet after the smart applet is actively destroyed by the mobile phone hectogram client, and the smart applet is initialized and started under the two conditions; the warm start means that the user has accessed the smart applet and quits the smart applet again after a short exit. At this time, the smart applet cannot be destroyed immediately by hundreds of mobile phones, and is preserved for a period of time in background application and then destroyed.
The performance and experience of the applet reopening are solved to a certain extent by starting the applet in the hot start mode, but from the current data analysis, the hot start ratio of the applet (the hot start ratio is the ratio of the number of times of hot start to the sum of the number of times of hot start and the number of times of cold start) is relatively low, so that the performance of the applet and the use experience of a user are poor. Therefore, a means is needed to effectively increase the hot start percentage of the applet, so as to improve the performance of the applet and ensure the user experience of the applet.
Disclosure of Invention
The application provides an applet reserving method, an applet reserving device, an applet reserving equipment and a storage medium, which can effectively improve the heat duty ratio of an applet, further improve the performance of the applet and ensure the user experience of the applet.
In a first aspect, the present application provides an applet preserving method, comprising:
when it is detected that a current user closes an applet on a front-end page, acquiring a background reserved time of the applet for the current user;
and reserving the small program in background application according to the background reserved time length of the small program for the current user.
In a second aspect, the present application provides an applet preserving apparatus, the apparatus comprising: an acquisition module and a reservation module; wherein,
the acquisition module is used for acquiring the background reserved time of the applet aiming at the current user when the fact that the applet is closed by the current user on a front-end page is detected;
and the reservation module is used for reserving the small program in background application according to the background reservation duration of the small program for the current user.
In a third aspect, an embodiment of the present application provides an electronic device, including:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the applet retention method described in any embodiment herein.
In a fourth aspect, the present application provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the applet preserving method according to any of the embodiments of the present application.
According to the technical scheme, the problem that the hot start occupation ratio of the applet is low in the prior art, so that the performance of the applet and the user experience are poor is solved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
fig. 1 is a schematic flowchart of an applet preserving method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of an applet preserving method according to a second embodiment of the present application;
fig. 3 is a schematic flowchart of an applet preserving method provided in the third embodiment of the present application;
fig. 4 is a schematic flowchart of an applet preserving method according to the fourth embodiment of the present application;
fig. 5 is a schematic structural diagram of an applet retaining device provided in the fifth embodiment of the present application;
fig. 6 is a schematic structural diagram of an obtaining module provided in the fifth embodiment of the present application;
fig. 7 is a block diagram of an electronic device for implementing the applet preserving method of an embodiment of the application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Example one
Fig. 1 is a flowchart of an applet preserving method provided in an embodiment of the present application, where the method may be performed by an applet preserving apparatus or an electronic device, where the apparatus or the electronic device may be implemented by software and/or hardware, and the apparatus or the electronic device may be integrated in any intelligent device with a network communication function. As shown in fig. 1, the applet preserving method may include the steps of:
s101, when it is detected that the current user closes the applet on the front-end page, obtaining the background reserved time of the applet for the current user.
In a specific embodiment of the present application, when it is detected that the current user closes the applet on the front-end page, the electronic device may obtain a background retention duration of the applet for the current user. Specifically, the electronic device may first obtain a background retention policy of the applet for the current user in a preset local database or a preset cloud database; and then, determining the background retention time of the small program for the current user according to the background retention strategy of the small program for the current user.
And S102, reserving the applet in the background application according to the background reserved time length of the applet aiming at the current user.
In a specific embodiment of the present application, the electronic device may reserve the applet in the background application according to the background reservation duration of the applet for the current user. For example, if the current user is an active user, the electronic device may reserve the applet for the current user for a longer time in the background application; if the current user is an inactive user, the electronic device may reserve the applet for the current user for a short time in the background application. The background retention strategy of the applet for the current user can be flexibly set and adjusted, so that the background retention duration of the applet for the current user can better meet the use requirement of the current user.
According to the applet reserving method provided by the embodiment of the application, when the fact that the current user closes the applet on a front-end page is detected, background reserving time of the applet for the current user is obtained; then taking the moment when the current user closes the small program on the front page as the current moment; and then reserving the applet in the background application according to the background reserved time length of the applet aiming at the current user. That is to say, the application may set different background retention times for different users, for example, for a user who is frequently used, the background retention time of the user may be increased, so that the speed of the user opening the applet again may be increased. In the existing applet preserving method, the background preserving duration of the applet is fixedly set, and the same background preserving duration is set for different users. The technical scheme provided by the application can effectively improve the hot duty ratio of the applet, further improve the performance of the applet and ensure the user experience of the applet; moreover, the technical scheme of the embodiment of the application is simple and convenient to implement, convenient to popularize and wide in application range.
Example two
Fig. 2 is a schematic flowchart of an applet preserving method according to a second embodiment of the present application. As shown in fig. 2, the applet preserving method may include the steps of:
s201, when it is detected that the current user closes the applet on the front-end page, obtaining the background reserved time of the applet for the current user.
In a specific embodiment of the present application, when it is detected that the current user closes the applet on the front-end page, the electronic device may obtain a background retention duration of the applet for the current user. Specifically, the electronic device may first obtain a background retention policy of the applet for the current user in a preset local database or a preset cloud database; and then, determining the background retention time of the small program for the current user according to the background retention strategy of the small program for the current user. The background retention strategy of the applet for the current user can be flexibly set and adjusted, so that the background retention duration of the applet for the current user can better meet the use requirement of the current user. For example, assuming that the current user is a high-end user, the electronic device may obtain a background high-end retention policy corresponding to the high-end user from a preset local database or a preset cloud database; and then, determining the retention time of the small program aiming at the background high end of the current user according to the background high end retention strategy of the small program aiming at the current user. Assuming that the current user is a middle-end user, the electronic device may obtain a background middle-end holding strategy corresponding to the middle-end user from a preset local database or a preset cloud database; and then determining the retention time of the small program for the background middle end of the current user according to the holding strategy of the small program for the background middle end of the current user. Assuming that the current user is a low-end user, the electronic device may obtain a background low-end retention policy corresponding to the low-end user from a preset local database or a preset cloud database; and then determining the background low-end retention time of the applet aiming at the current user according to the background low-end retention strategy of the applet aiming at the current user.
S202, taking the moment when the current user closes the small program on the front page as the current moment.
In a specific embodiment of the present application, the electronic device may use a current time when the user closes the applet on the front-end page as the current time. For example, assume that the current user closes an applet on the front page at 12: 00: 00, then in this step, the electronic device may compare 12: 00: 00 as the current time.
S203, if the small program meets a preset reservation condition at the current moment, reserving the small program in background application; and taking the next time as the current time according to a preset time unit, and repeatedly executing the operation until the small program does not meet the preset reservation condition at the current time.
In a specific embodiment of the application, if the applet satisfies a preset reservation condition at the current time, the electronic device may reserve the applet in the background application; and then, taking the next time as the current time according to a preset time unit, and repeatedly executing the operation until the small program does not meet the preset reservation condition at the current time. Specifically, if the difference between the current time and the time when the current user closes the applet on the front-end page is less than the background retention time of the applet for the current user, the electronic device may retain the applet in the background application; then, taking the next moment as the current moment according to a preset time unit, and repeatedly executing the operation until the difference between the current moment and the moment when the current user closes the applet on the front-end page is equal to the background reserved time length of the applet for the current user; specifically, the preset time unit can be set and adjusted according to actual requirements, for example, the preset time unit can be 1 second, or 5 seconds, and so on. It should be noted that, in the present application, the time when the current user closes the applet on the front-end page is static, and the current time is dynamic, and by calculating a difference between the current time and the time when the current user closes the applet on the front-end page, it can be determined whether the applet is retained or destroyed at the current time. Preferably, if the difference between the current time and the time when the current user closes the applet on the front-end page is equal to the background retention time of the applet for the current user, the electronic device may destroy the applet in the background application. Taking a preset time unit as 1 second as an example, and assuming that the background retention time of the applet for the current user is 5 minutes; the current time when the user closes the applet on the front page is 12: 00: 00, the electronic device firstly 12: 00: 00 as the current time, since the difference between the current time (12: 00: 00) and the time (12: 00: 00) when the current user closes the applet on the front-end page is equal to 0 second and less than the background retention time (5 minutes) of the applet for the current user, the applet is retained in the background application; the next time 12: 00: 01 as the current time, keeping the small program in the background application because the difference between the current time (12: 00: 01) and the time (12: 00: 00) when the current user closes the small program on the front-end page is equal to 1 second and less than 0 background retention time (5 minutes) of the small program for the current user; the next time 12: 00: 02 as the current time, the above operation is repeatedly performed until the difference between the current time (12: 05: 00) and the time (12: 00: 00) when the current user closes the applet on the front-end page is equal to 5 minutes, and the applet is destroyed in the background application.
According to the applet reserving method provided by the embodiment of the application, when the fact that the current user closes the applet on a front-end page is detected, background reserving time of the applet for the current user is obtained; then taking the moment when the current user closes the small program on the front page as the current moment; and then reserving the applet in the background application according to the background reserved time length of the applet aiming at the current user. That is to say, the application may set different background retention times for different users, for example, for a user who is frequently used, the background retention time of the user may be increased, so that the speed of the user opening the applet again may be increased. In the existing applet preserving method, the background preserving duration of the applet is fixedly set, and the same background preserving duration is set for different users. The technical scheme provided by the application can effectively improve the hot duty ratio of the applet, further improve the performance of the applet and ensure the user experience of the applet; moreover, the technical scheme of the embodiment of the application is simple and convenient to implement, convenient to popularize and wide in application range.
EXAMPLE III
Fig. 3 is a schematic flowchart of an applet preserving method according to a third embodiment of the present application. As shown in fig. 3, the applet preserving method may include the steps of:
s301, when it is detected that the current user closes the applet on the front-end page, a background holding strategy of the applet for the current user is obtained in a local database or a cloud database.
In a specific embodiment of the application, when it is detected that the applet is closed by the current user on the front-end page, the electronic device may obtain a background holding policy of the applet for the current user in the local database or the cloud database. Specifically, the electronic device may first obtain a background retention policy of the applet for the current user in the local database; and if the background holding strategy of the small program for the current user is not obtained in the local database, then obtaining the background holding strategy of the small program for the current user in the cloud database. The background maintenance strategy stored in the local database is closer to the use requirement of the current user, so that the electronic equipment preferentially obtains the background maintenance strategy of the applet aiming at the current user from the local database. The background retention strategy of the applet for the current user, which is stored in the cloud database, is closer to the use requirements of most users, so that the background retention strategy of the applet for the current user can be obtained in the cloud database by the electronic device under the condition that the background retention strategy of the applet for the current user is not obtained in the local database.
S302, determining the background retention time of the small program for the current user according to the background retention strategy of the small program for the current user.
In a specific embodiment of the application, the electronic device may determine the background retention duration of the applet for the current user according to a background retention policy of the applet for the current user. Specifically, when it is detected that the current user opens the applet on the front-end page, the electronic device may record key information of the current user opening the applet into a local database; if the key information of the current user for opening the applet, which is recorded in the local database, meets a preset first policy generation condition, the electronic device can generate a background holding policy of the applet for the current user according to the key information of the current user for opening the applet, which is recorded in the local database, and store the background holding policy of the applet for the current user in the local database; wherein, the key information of the current user for opening the applet at least comprises: the time when the current user opens the applet; the preset first policy generating condition may be that the current time when the user opens the applet this time and the time when the applet was opened last time are stored in the local database; the background retention policy may be to generate a background retention duration of the applet for the current user according to the time recorded in the local database when the applet is opened by the current user. Specifically, if the key information of the current user for opening the applet, which is recorded in the local database, meets a preset opening information condition, the electronic device may calculate an interval between the time when the current user opens the applet this time and the time when the applet was opened last time; and then determining the background reserved time length of the applet aiming at the current user according to the interval between the time of opening the applet by the current user and the time of opening the applet last time.
Preferably, in an embodiment of the present application, the electronic device may determine a quantile value corresponding to a current user according to an interval between a time when the current user opens an applet this time and a time when the applet is opened last time, where the quantile value may be understood as a level, for example, dividing a user whose opening time interval is within 5 minutes into a level; classifying users having an interval of an on time of 5 to 10 minutes into one level; users having an interval of 10 to 15 minutes of the on time are classified into one class, so that they can be classified into different classes for different users. And then the electronic equipment can determine the background retention time of the applet aiming at the current user according to the place value corresponding to the current user. Specifically, the electronic device may pre-store a corresponding relationship between the quantile value and the background retention time, for example, a quantile value 1 corresponds to a background retention time 1; quantile value 2 corresponds to background retention time 2, …, quantile value N corresponds to background retention time N; wherein N is a natural number of 1 or more. Therefore, the electronic device can determine the background retention time of the applet for the current user according to the place value corresponding to the current user.
And S303, taking the moment when the current user closes the small program on the front page as the current moment.
S304, if the small program meets the preset reservation condition at the current moment, reserving the small program in background application; and taking the next time as the current time according to a preset time unit, and repeatedly executing the operation until the small program does not meet the preset reservation condition at the current time.
According to the applet reserving method provided by the embodiment of the application, when the fact that the current user closes the applet on a front-end page is detected, background reserving time of the applet for the current user is obtained; and then reserving the applet in the background application according to the background reserved time length of the applet aiming at the current user. That is to say, the application may set different background retention times for different users, for example, for a user who is frequently used, the background retention time of the user may be increased, so that the speed of the user opening the applet again may be increased. In the existing applet preserving method, the background preserving duration of the applet is fixedly set, and the same background preserving duration is set for different users. The technical scheme provided by the application can effectively improve the hot duty ratio of the applet, further improve the performance of the applet and ensure the user experience of the applet; moreover, the technical scheme of the embodiment of the application is simple and convenient to implement, convenient to popularize and wide in application range.
Example four
Fig. 4 is a schematic flowchart of an applet preserving method according to the fourth embodiment of the present application. As shown in fig. 4, the applet preserving method may include the steps of:
s401, when it is detected that the current user opens the applet on the front-end page, recording key information of the applet opened by the current user into a local database.
In a specific embodiment of the application, when it is detected that the current user opens the applet on the front-end page, the electronic device may record key information of the applet opened by the current user into a local database; wherein, the key information of the current user for opening the applet at least comprises: the time when the current user opens the applet; further, the key information of the current user opening the applet may further include: name of the applet, scene of the applet opened by the current user; the scene may include a search scene, a stream of information (Feed) channel scene, and the like.
S402, if the key information of the current user for opening the applet recorded in the local database meets a preset first strategy generation condition, generating a background holding strategy of the applet for the current user according to the key information of the current user for opening the applet recorded in the local database, and storing the background holding strategy of the applet for the current user in the local database.
In a specific embodiment of the application, if the key information of the applet opened by the current user recorded in the local database meets a preset first policy generation condition, the electronic device may generate a background holding policy of the applet for the current user according to the key information of the applet opened by the current user recorded in the local database, and store the background holding policy of the applet for the current user in the local database; wherein, the key information of the current user for opening the applet at least comprises: the time when the current user opens the applet; the preset first policy generating condition may be that the current time when the user opens the applet this time and the time when the applet was opened last time are stored in the local database; the background retention policy may be to generate a background retention duration of the applet for the current user according to the time recorded in the local database when the applet is opened by the current user. Specifically, if the key information of the current user for opening the applet, which is recorded in the local database, meets a preset opening information condition, the electronic device may calculate an interval between the time when the current user opens the applet this time and the time when the applet was opened last time; and then determining the background reserved time length of the applet aiming at the current user according to the interval between the time of opening the applet by the current user and the time of opening the applet last time.
Further, if the key information of the applet opened by the current user recorded in the local database does not meet a preset first policy generation condition, the electronic device may record the key information of the applet used by the current user into the local database; if the key information of the applet used by the current user recorded in the local database meets a preset second policy generation condition, the electronic equipment can generate a background holding policy of the applet for the current user according to the key information of the applet used by the current user recorded in the local database, and store the background holding policy of the applet for the current user in the local database; the key information of the current user using the applet at least comprises one of the following items: the method comprises the following steps of judging the duration of the current user using the applet, the browsing behavior of the current user aiming at the applet and the model information of the electronic equipment used by the current user; the preset second policy generation condition may be that the number of key information of the current user using the applet is greater than a preset threshold; the background retention policy may be to generate a background retention duration of the applet for the current user according to one or more of the duration of the applet used by the current user, the browsing behavior of the applet by the current user, and model information of the electronic device used by the current user, which are recorded in the local database.
And S403, acquiring a background maintenance strategy of the applet aiming at the current user from the local database.
In a specific embodiment of the application, the electronic device may first obtain a background retention policy of the applet for a current user in a local database; and if the background holding strategy of the small program for the current user is not obtained in the local database, then obtaining the background holding strategy of the small program for the current user in the cloud database.
S404, determining the background retention time of the small program aiming at the current user according to the background retention strategy of the small program aiming at the current user.
In a specific embodiment of the application, the electronic device may determine the background retention duration of the applet for the current user according to a background retention policy of the applet for the current user. Specifically, the background retention policy may be to generate a background retention time length of the applet for the current user according to one or more items of the time length of the applet used by the current user, the browsing behavior of the applet by the current user, and the model information of the electronic device used by the current user, which are recorded in the local database. For example, the model information of the electronic device currently used by the user may include: information such as a CPU, a memory, a screen size, a hard disk and the like; the grade of the electronic device used by the current user can be determined according to the model information of the electronic device used by the current user, for example: high-end machines, medium-end machines, low-end machines and the like; then determining a background cache time coefficient corresponding to the electronic equipment according to the level of the electronic equipment; and multiplying the background cache time coefficient corresponding to the level of the electronic equipment by the preset initial background retention time to obtain the background retention time of the applet aiming at the current user. For example, if the level of the electronic device used by the current user is a high-end computer, the background cache time coefficient corresponding to the level is a numerical value greater than 1; if the level of the electronic equipment used by the current user is a middle-end computer, the background cache time coefficient corresponding to the level is a numerical value equal to 1; if the level of the electronic equipment used by the current user is a low-end computer, the background cache time coefficient corresponding to the level is a numerical value smaller than 1. For example, the station cache time coefficient corresponding to the high-end machine is 1.2; the buffer time coefficient of the station corresponding to the middle-end machine is 1; the buffer time coefficient of the station corresponding to the low-end machine is 0.8.
S405, taking the moment when the current user closes the small program on the front end page as the current moment.
S406, if the small program meets a preset reservation condition at the current moment, reserving the small program in background application; and taking the next time as the current time according to a preset time unit, and repeatedly executing the operation until the small program does not meet the preset reservation condition at the current time.
Preferably, in the specific implementation of the present application, if a difference between the current time and the time when the current user closes the applet on the front-end page is less than a background retention duration of the applet for the current user, the electronic device may further detect whether the applet meets a preset retention requirement; if the applet meets the preset reservation requirement, the electronic device can execute the operation of reserving the applet in the background application; if the applet does not meet the preset reservation requirement, the electronic device can destroy the applet in background application; the preset reservation requirement may be that the remaining memory space of the electronic device can meet the use requirement of the current user. After the background retention time is increased, the applet is not destroyed, and at this time, the applet developer can start a timer (sending logs at regular time or collecting some background behaviors and the like) to execute some behaviors which may be harmful at regular time by using the opportunity. In addition, API calls are also present inside the current applet, such as: the frequent calling of the request API to send the network request may exist in the developer code, which may cause congestion of other applets and even the network on the whole mobile phone, and these factors may cause the remaining memory space of the electronic device to fail to meet the use requirement of the current user. Therefore, if the remaining memory space of the electronic device cannot meet the use requirement of the current user, the electronic device may destroy the applet in advance under the condition that the difference between the current time and the time when the current user closes the applet on the front-end page is less than the background reserved time length of the applet for the current user, so as to avoid the influence on the foreground use task.
According to the applet reserving method provided by the embodiment of the application, when the fact that the current user closes the applet on a front-end page is detected, background reserving time of the applet for the current user is obtained; and then reserving the applet in the background application according to the background reserved time length of the applet aiming at the current user. That is to say, the application may set different background retention times for different users, for example, for a user who is frequently used, the background retention time of the user may be increased, so that the speed of the user opening the applet again may be increased. In the existing applet preserving method, the background preserving duration of the applet is fixedly set, and the same background preserving duration is set for different users. The technical scheme provided by the application can effectively improve the hot duty ratio of the applet, further improve the performance of the applet and ensure the user experience of the applet; moreover, the technical scheme of the embodiment of the application is simple and convenient to implement, convenient to popularize and wide in application range.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an applet preserving apparatus provided in the fifth embodiment of the present application. As shown in fig. 5, the apparatus 500 includes: an acquisition module 501 and a reservation module 502; wherein,
the obtaining module 501 is configured to, when it is detected that the current user closes the applet on the front-end page, obtain a background reserved duration of the applet for the current user;
the reservation module 502 is configured to reserve the applet in a background application according to the background reservation duration of the applet for the current user.
Further, the reservation module 502 is specifically configured to use a time when the current user closes the applet on the front-end page as a current time; if the small program meets a preset reservation condition at the current moment, reserving the small program in background application; and taking the next moment as the current moment according to a preset time unit, and repeatedly executing the operation until the small program does not meet the preset reservation condition at the current moment.
Further, the apparatus further comprises: a destroying module 503 (not shown in the figure) configured to destroy the applet in the background application if the applet does not meet the preset retention condition at the current time.
Fig. 6 is a schematic structural diagram of an acquisition module provided in the fifth embodiment of the present application. As shown in fig. 6, the obtaining module 501 includes: obtaining a submodule 5011 and determining a submodule 5012; wherein,
the obtaining submodule 5011 is configured to obtain a background retention policy of the applet for the current user in a local database or a cloud database;
the determining submodule 5012 is configured to determine, according to the background retention policy of the applet for the current user, a background retention duration of the applet for the current user.
Further, the apparatus further comprises: a generating module 504 (not shown in the figure) for recording the key information of the applet opened by the current user in the local database when it is detected that the applet is opened by the current user on the front-end page; if the key information of the applet opened by the current user recorded in the local database meets a preset first policy generation condition, generating a background holding policy of the applet for the current user according to the key information of the applet opened by the current user recorded in the local database, and storing the background holding policy of the applet for the current user in the local database.
Further, the key information of the current user for opening the applet at least comprises: the current time the user opened the applet.
Further, the generating module 504 is further configured to record, if the key information of the applet opened by the current user recorded in the local database does not satisfy the first policy generating condition, the key information of the applet used by the current user into the local database;
if the key information of the applet used by the current user recorded in the local database meets a preset second policy generation condition, generating a background holding policy of the applet for the current user according to the key information of the applet used by the current user recorded in the local database, and storing the background holding policy of the applet for the current user in the local database.
Further, the key information of the current user using the applet at least comprises one of the following items: the time length of the current user using the applet, the browsing behavior of the current user aiming at the applet and the model information of the electronic equipment used by the current user.
Further, the reservation module 502 is specifically configured to detect whether the applet meets a preset reservation requirement; and if the small program meets the preset reservation requirement, executing the operation of reserving the small program in the background application.
The small program reservation device can execute the method provided by any embodiment of the application, and has corresponding functional modules and beneficial effects of the execution method. For details of the technology not described in detail in this embodiment, reference may be made to the applet preserving method provided in any embodiment of the present application.
EXAMPLE six
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 7 is a block diagram of an electronic device according to an applet preserving method in an embodiment of the application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 7, the electronic apparatus includes: one or more processors 701, a memory 702, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 7, one processor 701 is taken as an example.
The memory 702 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the applet preserving method provided herein. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to perform the applet preserving method provided herein.
The memory 702, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules (e.g., the obtaining module 501 and the retaining module 502 shown in fig. 5) corresponding to the applet retaining method in the embodiments of the present application. The processor 501 executes various functional applications of the server and data processing, i.e., implementing the applet preserving method in the above method embodiments, by running non-transitory software programs, instructions and modules stored in the memory 702.
The memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the stored data area may store data created according to the use of the electronic device of the applet preserving method, and the like. Further, the memory 702 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 702 may optionally include memory located remotely from the processor 701, which may be connected to the applet retention method electronics over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the applet preserving method may further include: an input device 703 and an output device 704. The processor 701, the memory 702, the input device 703 and the output device 704 may be connected by a bus or other means, and fig. 7 illustrates an example of a connection by a bus.
The input device 703 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device of the applet preserving method, such as a touch screen, keypad, mouse, track pad, touch pad, pointer stick, one or more mouse buttons, track ball, joystick, etc. input devices. The output devices 704 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the technical scheme of the embodiment of the application, when the fact that the current user closes the small program on the front-end page is detected, the background reserved time length of the small program for the current user is obtained firstly; and then reserving the applet in the background application according to the background reserved time length of the applet aiming at the current user. That is to say, the application may set different background retention times for different users, for example, for a user who is frequently used, the background retention time of the user may be increased, so that the speed of the user opening the applet again may be increased. In the existing applet preserving method, the background preserving duration of the applet is fixedly set, and the same background preserving duration is set for different users. The technical scheme provided by the application can effectively improve the hot duty ratio of the applet, further improve the performance of the applet and ensure the user experience of the applet; moreover, the technical scheme of the embodiment of the application is simple and convenient to implement, convenient to popularize and wide in application range.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (20)
1. An applet reservation method, the method comprising:
when it is detected that a current user closes an applet on a front-end page, acquiring a background reserved time of the applet for the current user;
and reserving the small program in background application according to the background reserved time length of the small program for the current user.
2. The method of claim 1, wherein reserving the applet in a background application according to a background reserve duration of the applet for the current user comprises:
taking the moment when the current user closes the small program on the front-end page as the current moment;
if the small program meets a preset reservation condition at the current moment, reserving the small program in background application; and taking the next moment as the current moment according to a preset time unit, and repeatedly executing the operation until the small program does not meet the preset reservation condition at the current moment.
3. The method of claim 2, further comprising:
if the applet does not meet the preset reservation condition at the current moment, destroying the applet in the background application.
4. The method of claim 1, wherein obtaining the background retention duration of the applet for the current user comprises:
acquiring a background holding strategy of the applet aiming at the current user in a local database or a cloud database;
and determining the background retention time of the applet aiming at the current user according to the background retention strategy of the applet aiming at the current user.
5. The method of claim 4, wherein prior to said detecting that the current user closed the applet on the front end page, the method further comprises:
when the fact that the current user opens the small program on the front-end page is detected, recording key information of the small program opened by the current user in the local database;
if the key information of the applet opened by the current user recorded in the local database meets a preset first policy generation condition, generating a background holding policy of the applet for the current user according to the key information of the applet opened by the current user recorded in the local database, and storing the background holding policy of the applet for the current user in the local database.
6. The method of claim 5, wherein the key information of the current user opening the applet comprises at least: the current time the user opened the applet.
7. The method of claim 5, further comprising:
if the key information of the applet opened by the current user recorded in the local database does not meet the first strategy generation condition, recording the key information of the applet used by the current user into the local database;
if the key information of the applet used by the current user recorded in the local database meets a preset second policy generation condition, generating a background holding policy of the applet for the current user according to the key information of the applet used by the current user recorded in the local database, and storing the background holding policy of the applet for the current user in the local database.
8. The method of claim 7, wherein the key information of the current user using the applet comprises at least one of: the time length of the current user using the applet, the browsing behavior of the current user aiming at the applet and the model information of the electronic equipment used by the current user.
9. The method of claim 1, wherein prior to said retaining said applet in a background application, said method further comprises:
detecting whether the small program meets a preset reservation requirement or not; and if the small program meets the preset reservation requirement, executing the operation of reserving the small program in the background application.
10. An applet reservation mechanism, the mechanism comprising: an acquisition module and a reservation module; wherein,
the acquisition module is used for acquiring the background reserved time of the applet aiming at the current user when the fact that the applet is closed by the current user on a front-end page is detected;
and the reservation module is used for reserving the small program in background application according to the background reservation duration of the small program for the current user.
11. The apparatus of claim 10, wherein:
the reservation module is specifically configured to use a time when the current user closes the applet on the front-end page as a current time; if the small program meets a preset reservation condition at the current moment, reserving the small program in background application; and taking the next moment as the current moment according to a preset time unit, and repeatedly executing the operation until the small program does not meet the preset reservation condition at the current moment.
12. The apparatus of claim 11, further comprising: and the destroying module is used for destroying the small program in the background application if the small program does not meet the preset retention condition at the current moment.
13. The apparatus of claim 11, wherein the obtaining module comprises: obtaining a submodule and determining a submodule; wherein,
the obtaining submodule is used for obtaining a background holding strategy of the applet aiming at the current user in a local database or a cloud database;
the determining submodule is configured to determine, according to the background retention policy of the applet for the current user, a background retention duration of the applet for the current user.
14. The apparatus of claim 13, further comprising: the generating module is used for recording key information of the applet opened by the current user in the local database when the applet is detected to be opened on the front-end page by the current user; if the key information of the applet opened by the current user recorded in the local database meets a preset first policy generation condition, generating a background holding policy of the applet for the current user according to the key information of the applet opened by the current user recorded in the local database, and storing the background holding policy of the applet for the current user in the local database.
15. The apparatus of claim 14, wherein the key information of the current user opening the applet comprises at least: the current time the user opened the applet.
16. The apparatus of claim 14, wherein:
the generating module is further configured to record, if the key information, recorded in the local database, of the current user for opening the applet does not satisfy the first policy generating condition, the key information of the current user for using the applet into the local database;
if the key information of the applet used by the current user recorded in the local database meets a preset second policy generation condition, generating a background holding policy of the applet for the current user according to the key information of the applet used by the current user recorded in the local database, and storing the background holding policy of the applet for the current user in the local database.
17. The apparatus of claim 16, wherein key information of the current user using the applet comprises at least one of: the time length of the current user using the applet, the browsing behavior of the current user aiming at the applet and the model information of the electronic equipment used by the current user.
18. The apparatus of claim 10, wherein:
the reservation module is specifically configured to detect whether the applet meets a preset reservation requirement; and if the small program meets the preset reservation requirement, executing the operation of reserving the small program in the background application.
19. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.
20. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010456553.3A CN111651218A (en) | 2020-05-26 | 2020-05-26 | Applet reservation method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010456553.3A CN111651218A (en) | 2020-05-26 | 2020-05-26 | Applet reservation method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111651218A true CN111651218A (en) | 2020-09-11 |
Family
ID=72349666
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010456553.3A Pending CN111651218A (en) | 2020-05-26 | 2020-05-26 | Applet reservation method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111651218A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106502768A (en) * | 2016-09-22 | 2017-03-15 | 南京酷派软件技术有限公司 | A kind of applied program processing method, device, terminal and server |
CN108958824A (en) * | 2017-05-18 | 2018-12-07 | 龙芯中科技术有限公司 | Starting method, apparatus, electronic equipment and the storage medium of application program |
CN109388552A (en) * | 2017-08-07 | 2019-02-26 | 中兴通讯股份有限公司 | Start the determination method, apparatus and storage medium of the duration of application program |
CN109976611A (en) * | 2019-03-21 | 2019-07-05 | 维沃移动通信有限公司 | The control method and terminal device of terminal device |
-
2020
- 2020-05-26 CN CN202010456553.3A patent/CN111651218A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106502768A (en) * | 2016-09-22 | 2017-03-15 | 南京酷派软件技术有限公司 | A kind of applied program processing method, device, terminal and server |
CN108958824A (en) * | 2017-05-18 | 2018-12-07 | 龙芯中科技术有限公司 | Starting method, apparatus, electronic equipment and the storage medium of application program |
CN109388552A (en) * | 2017-08-07 | 2019-02-26 | 中兴通讯股份有限公司 | Start the determination method, apparatus and storage medium of the duration of application program |
CN109976611A (en) * | 2019-03-21 | 2019-07-05 | 维沃移动通信有限公司 | The control method and terminal device of terminal device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107995535A (en) | A kind of method, apparatus, equipment and computer-readable storage medium for showing video | |
CN110889064B (en) | Page display method, device, equipment and storage medium | |
CN111158799A (en) | Page rendering method and device, electronic equipment and storage medium | |
CN108090079B (en) | Chat record processing method and device of instant chat tool | |
US9383800B2 (en) | Managing a portal application | |
CN111880914A (en) | Resource scheduling method, resource scheduling apparatus, electronic device, and storage medium | |
CN112000394A (en) | Method, apparatus, device and storage medium for accessing an applet | |
CN110636366A (en) | Video playing processing method and device, electronic equipment and medium | |
CN112100481A (en) | Search method, search device, electronic device, and storage medium | |
CN114090223A (en) | Memory access request scheduling method, device, equipment and storage medium | |
CN112311597B (en) | Message pushing method and device | |
CN113765873A (en) | Method and apparatus for detecting abnormal access traffic | |
CN111881387A (en) | Data processing method, device, equipment and medium for small program | |
CN112817656A (en) | Applet running method and device | |
CN113158098A (en) | Page generation method, device, equipment and medium | |
CN111783013A (en) | Comment information publishing method, device, equipment and computer-readable storage medium | |
CN114513468B (en) | Method, device, equipment, storage medium and product for protecting flow in Sentinel | |
CN113220982A (en) | Advertisement searching method, device, electronic equipment and medium | |
CN111290912A (en) | Single-page application performance monitoring method and device and electronic equipment | |
CN111177513A (en) | Method and device for determining abnormal access address, electronic equipment and storage medium | |
US10601954B2 (en) | Sandboxing requests for web services | |
EP2997715A1 (en) | Transmitting information based on reading speed | |
CN112486644A (en) | Method, apparatus, device and storage medium for generating information | |
CN109831673B (en) | Live broadcast room data processing method, device, equipment and storage medium | |
CN111651218A (en) | Applet reservation method and device, electronic equipment and storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200911 |