+

CN114090104A - A kind of applet startup control method and device - Google Patents

A kind of applet startup control method and device Download PDF

Info

Publication number
CN114090104A
CN114090104A CN202110075175.9A CN202110075175A CN114090104A CN 114090104 A CN114090104 A CN 114090104A CN 202110075175 A CN202110075175 A CN 202110075175A CN 114090104 A CN114090104 A CN 114090104A
Authority
CN
China
Prior art keywords
applet
broadcast
application
started
normally
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110075175.9A
Other languages
Chinese (zh)
Other versions
CN114090104B (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110075175.9A priority Critical patent/CN114090104B/en
Publication of CN114090104A publication Critical patent/CN114090104A/en
Application granted granted Critical
Publication of CN114090104B publication Critical patent/CN114090104B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications

Landscapes

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

Abstract

本发明公开了一种小程序启动控制方法和装置,涉及计算机技术领域。该方法的一具体实施方式包括:在应用正常启动后,向第一广播发送一个广播事件,以启动与第一广播对应的第一小程序进程;响应于对一个小程序的启动操作,使用第一小程序进程加载一个小程序;在应用中显示一个小程序的操作首页的同时,发送一个广播事件至位于第一广播后的第二广播,以启动与第二广播对应的第二小程序进程。该实施方式使用Android平台广播技术来预加载进程,在宿主App启动完成,发送一个广播事件来提前准备小程序进程,在启动小程序时,直接使用预加载好的小程序进程加载,避免了启动空进程的等待耗时,极大提升小程序启动速度。

Figure 202110075175

The invention discloses a small program startup control method and device, and relates to the technical field of computers. A specific implementation of the method includes: after the application starts normally, sending a broadcast event to the first broadcast to start the first applet process corresponding to the first broadcast; The applet process loads an applet; while displaying the operation homepage of an applet in the application, a broadcast event is sent to the second broadcast after the first broadcast to start the second applet process corresponding to the second broadcast . This implementation uses the Android platform broadcasting technology to preload the process. After the host App is started, a broadcast event is sent to prepare the applet process in advance. When starting the applet, the preloaded applet process is directly used to load, avoiding the need to start the applet. The waiting time of the empty process greatly improves the startup speed of the applet.

Figure 202110075175

Description

Applet starting control method and device
Technical Field
The invention relates to the technical field of computers, in particular to a small program starting control method and device.
Background
The applet is a new species which is started in recent years, is a Hybrid application, combines technologies such as front-end H5, native Android and iOS, and can realize seamless operation of a set of programs on 2 platforms. In the Android platform, each applet is an independent process, and the independent process means that a memory can be monopolized, so that the memory pressure of a main process (a host, such as a WeChat App) is reduced. Such as: the upper limit of each process is 100MB, when an Android applet is opened, 100MB more memory is available, and the main process memory is not occupied.
On the Android platform, a plurality of small programs are allowed to be opened, namely, a plurality of processes are involved, but starting one process is costly, and even if the new process does not operate, the process is long in time. According to statistics, the time consumption is about 0.5-3 s generally, and the time consumption is more in medium and low-end Android equipment. In order to avoid that the initial and subsequent small program opening is too slow and the normal main process and the small program starting process are not influenced, a scheme for accelerating the small program starting is required to be provided.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for controlling applet starting, which can at least solve the problem in the prior art that the applet starting speed is too slow.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided an applet starting control method including:
after the application is normally started, sending a broadcast event to a first broadcast so as to start a first applet process corresponding to the first broadcast;
in response to a startup operation on an applet, loading the applet by using the first applet process;
and sending a broadcast event to a second broadcast after the first broadcast while displaying the operation home page of the applet in the application so as to start a second applet process corresponding to the second broadcast.
Optionally, before the sending a broadcast event to the first broadcast through the applet development kit SDK after the application is normally started, the method further includes:
and in the application starting process, initializing an application environment and a non-applet development kit, and after jumping to the home page of the application, determining that the application is normally started.
Optionally, the loading the applet by using the first applet process includes:
judging whether the first small program process is normally started and idled at present, and if the first small program process is normally started and idled, loading the small program by using the first small program process;
otherwise, restarting the first applet process to load the applet by using the normally started first applet process.
Optionally, the method further includes: and after the configured applet threads are all normally started and loaded with the applets, responding to the starting operation of a new applet, and replacing the applet loaded by using the first applet process with the new applet.
Optionally, the number of configured applet processes is 5.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an applet starting control apparatus including:
the first broadcast module is used for sending a broadcast event to a first broadcast after the application is normally started so as to start a first applet process corresponding to the first broadcast;
the loading module is used for responding to the starting operation of an applet and loading the applet by using the first applet process;
and the second broadcasting module is used for sending a broadcasting event to a second broadcast positioned after the first broadcast while displaying the operation home page of the applet in the application so as to start a second applet process corresponding to the second broadcast.
Optionally, the system further includes an application starting module, configured to: and in the application starting process, initializing an application environment and a non-applet development kit, and after jumping to the home page of the application, determining that the application is normally started.
Optionally, the loading module is configured to:
judging whether the first small program process is normally started and idled at present, and if the first small program process is normally started and idled, loading the small program by using the first small program process;
otherwise, restarting the first applet process to load the applet by using the normally started first applet process.
Optionally, the system further includes an applet replacing module, configured to: and after the configured applet threads are all normally started and loaded with the applets, responding to the starting operation of a new applet, and replacing the applet loaded by using the first applet process with the new applet.
Optionally, the number of configured applet processes is 5.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an applet starting control electronic device.
The electronic device of the embodiment of the invention comprises: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement any of the above-described applet launching control methods.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements any one of the applet starting control methods described above.
According to the scheme provided by the invention, one embodiment of the invention has the following advantages or beneficial effects: the Android platform broadcasting technology is used for preloading the small program process, a broadcasting event is sent to prepare the small program process in advance after or at the same time of starting the host App, and the preloaded process is directly used when the small program is started, so that the waiting problem of starting an empty process is avoided, and the small program starting speed is greatly improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic main flow chart of an applet starting control method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an application start-up warm-up applet process;
FIG. 3 is a schematic flow diagram of applet initiation;
FIG. 4 is a schematic overall implementation flow diagram;
FIG. 5 is a schematic diagram of the main blocks of an applet launching control device according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 7 is a schematic block diagram of a computer system suitable for use with a mobile device or server implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. 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 invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The words involved in the scheme are explained as follows:
app (full name: Application) refers to an executable Application program, and herein refers to an Application program that can be run on a smartphone, a computer, or the like.
Broadcast (full name: broadcastreever): one of the Android 4 large components is configured in an Android manifest file, can be operated in an independent process through process attribute configuration, and can also realize cross-process communication.
A main process: a program represents a process, such as a WeChat App. Since applets need to be host dependent (e.g., wechat applets depend on wechat), and are independent processes, the process run by the host is often referred to as the host process.
The small program: a program running on the host application can be opened through scanning and searching of the host without installation, and is very light.
Referring to fig. 1, a main flowchart of an applet starting control method provided in an embodiment of the present invention is shown, including the following steps:
s101: after the application is normally started, sending a broadcast event to a first broadcast so as to start a first applet process corresponding to the first broadcast;
s102: in response to a startup operation on an applet, loading the applet by using the first applet process;
s103: and sending a broadcast event to a second broadcast after the first broadcast while displaying the operation home page of the applet in the application so as to start a second applet process corresponding to the second broadcast.
In the above embodiment, for step S101, it is currently a practice to start an applet process of an empty process when the App application is started, so as to speed up the first applet opening. However, App start-up is generally a relatively heavy operation, such as initializing some non-applet SDKs (Software Development Kit), e.g., monitoring SDKs, embedded SDKs, etc., and the start-up of applet idle processes affects App start-up speed.
When a host/main process (such as a WeChat App) is started, the scheme preferably initializes the environment and various non-applet SDKs, such as point burying, hot repair, crash monitoring, and the like. After the initialization is completed and the main process normally jumps to the home page, it means that the application has been normally started, as shown in fig. 2.
Because certain time is needed for starting the application and initializing the non-applet SDK, the applet SDK preloading process (or a container) cannot be called immediately when the application is started, and a broadcast event is sent to the first broadcast through the applet SDK when the application normally jumps to a home page (or called parallel), so that the first applet process corresponding to the first broadcast is preheated.
For steps S102 and S103, sending the broadcast event does not affect the normal applet starting process, and when receiving the broadcast, the Android system starts a new empty applet process to complete the preloading process starting operation, and the applet process can be directly used subsequently when starting the applet.
When the applet is started (similar to the starting of the App), the pre-started first applet process can be directly used to open the applet in the first applet process. After the applet is started, the applet normally jumps to the applet operation home page, and simultaneously sends a broadcast event to a second broadcast (located after the first broadcast) through the applet SDK, so as to start a second applet process corresponding to the second broadcast. Through the above steps, a process is preloaded at the whole engine layer for loading the next applet to be opened.
Further, when the applet is started, it may be determined whether the current applet process has been normally started and idled, and if the current applet process has been normally started and idled, the applet process is directly reused, otherwise, the applet process needs to be restarted, and finally the applet is loaded using the applet process. Since the pre-started applet process may be recovered by the Android system or the pre-started applet process may fail, it is necessary to determine whether the applet process is normally started and idle, which is specifically shown in fig. 3.
The overall operation flow is shown in fig. 4:
1. when the application is started, sending a broadcast event to the broadcast 1 through the applet SDK so as to start the applet process 1 corresponding to the broadcast 1;
2. when the small program is started (such as the small program 1), the small program 1 can be directly loaded by using the pre-started process 1;
3. after the small program 1 is started, sending a broadcast event to the broadcast 2 through the small program SDK so as to start the small program process 2 corresponding to the broadcast 2;
4. if the small program is not started, stopping after the small program process 2 is started, if another small program is started, repeating the starting and sending operations until all small program processes are started and the small programs are loaded, and forming a running small program queue;
5. if an applet needs to be started later, the applet 1 loaded by the process 1 needs to be replaced by another applet.
In actual operation, the applet can be opened infinitely, but since resources such as mobile phones and computers are limited, 5 broadcasts and corresponding 5 applet processes are usually configured. After more than 5, the opened small program is replaced, as shown in the figure, the small program 1 runs in the process 1, and the small program 1 is replaced by the small program 6, so that a loop is formed.
For example, after the browser opens the web page a, the address of the web page B is input into the address bar of the web page, and then the browser displays the web page B, where the browser is an applet process, the page a is the applet 1, and the page B is the applet 6.
The embodiment of the invention provides a thought for increasing the starting speed of an applet from an Android applet engine layer, which is based on an Android SDK technology and an Android applet technology, combines an Android broadcasting mechanism, and preloads an applet process under the condition of not influencing the starting of an App and the applet, so that the starting of the applet is accelerated, and the experience of opening the applet by a user is improved.
The scheme is compared with the prior art:
1. the prior art is as follows: restarting the small program process when the small program is started, namely when the small program is not started, the small program process is always in a state of waiting to be started and being idle;
2. the scheme is as follows: when the application bearing the small program is started, only one broadcast and one small program process are started through the broadcast event, the started small program process is directly used when the subsequent small program is started, the starting operation of the second broadcast and the second small program process is triggered, a triggering cycle is formed, and a plurality of small program processes cannot be triggered and started at one time, so that the waste of system resources is avoided.
Referring to fig. 5, a schematic diagram of main modules of an applet starting control apparatus 500 provided in an embodiment of the present invention is shown, including:
a first broadcast module 501, configured to send a broadcast event to a first broadcast after an application is normally started, so as to start a first applet process corresponding to the first broadcast;
a loading module 502, configured to respond to a start operation on an applet, to load the applet by using the first applet process;
a second broadcasting module 503, configured to send a broadcast event to a second broadcast after the first broadcast while displaying the operation home page of the applet in the application, so as to start a second applet process corresponding to the second broadcast.
The apparatus further includes an application starting module 504 (not shown) for:
and in the application starting process, initializing an application environment and a non-applet development kit, and after jumping to the home page of the application, determining that the application is normally started.
In the implementation apparatus of the present invention, the loading module 502 is configured to:
judging whether the first small program process is normally started and idled at present, and if the first small program process is normally started and idled, loading the small program by using the first small program process;
otherwise, restarting the first applet process to load the applet by using the normally started first applet process.
The device for implementing the present invention further includes an applet replacing module 505 (not shown in the figure) for:
and after the configured applet threads are all normally started and loaded with the applets, responding to the starting operation of a new applet, and replacing the applet loaded by using the first applet process with the new applet.
In the implementation device of the invention, the number of the configured small program processes is 5.
In addition, the detailed implementation of the device in the embodiment of the present invention has been described in detail in the above method, so that the repeated description is not repeated here.
FIG. 6 illustrates an exemplary system architecture 600 to which embodiments of the invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605 (by way of example only). The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. Various communication client applications can be installed on the terminal devices 601, 602, 603.
The terminal devices 601, 602, 603 may be various electronic devices having display screens and supporting web browsing, and the server 605 may be a server providing various services.
It should be noted that the method provided by the embodiment of the present invention is generally executed by the server 605, and accordingly, the apparatus is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprises a first broadcast module, a loading module and a second broadcast module. Where the names of these modules do not in some cases constitute a limitation on the module itself, for example, a load module may also be described as an "applet load module".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
after the application is normally started, sending a broadcast event to a first broadcast so as to start a first applet process corresponding to the first broadcast;
in response to a startup operation on an applet, loading the applet by using the first applet process;
and sending a broadcast event to a second broadcast after the first broadcast while displaying the operation home page of the applet in the application so as to start a second applet process corresponding to the second broadcast.
According to the technical scheme of the embodiment of the invention, the Android platform broadcasting technology is used for preloading the process, when the host App is started, a broadcasting event is sent to prepare the small program process in advance, and when the small program is started, the preloaded small program process is directly used for loading, so that the waiting time for starting the empty process is avoided, and the small program starting speed is greatly improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1.一种小程序启动控制方法,其特征在于,包括:1. a small program startup control method, is characterized in that, comprises: 在应用正常启动后,向第一广播发送一个广播事件,以启动与所述第一广播对应的第一小程序进程;After the application starts normally, send a broadcast event to the first broadcast to start the first applet process corresponding to the first broadcast; 响应于对一个小程序的启动操作,使用所述第一小程序进程加载所述一个小程序;in response to a start-up operation for an applet, using the first applet process to load the one applet; 在所述应用中显示所述一个小程序的操作首页的同时,发送一个广播事件至位于所述第一广播后的第二广播,以启动与所述第二广播对应的第二小程序进程。When the operation home page of the one applet is displayed in the application, a broadcast event is sent to the second broadcast after the first broadcast, so as to start the second applet process corresponding to the second broadcast. 2.根据权利要求1所述的方法,其特征在于,在应用正常启动后,通过小程序开发工具包SDK向第一广播发送一个广播事件之前,还包括:2. The method according to claim 1, characterized in that, after the application is started normally, before sending a broadcast event to the first broadcast through the applet development kit SDK, the method further comprises: 在所述应用启动过程中,初始化应用环境和非小程序开发工具包,在跳转至所述应用的首页后,确定所述应用正常启动。During the application startup process, the application environment and the non-mini-program development toolkit are initialized, and after jumping to the home page of the application, it is determined that the application starts normally. 3.根据权利要求1所述的方法,其特征在于,所述使用所述第一小程序进程加载所述一个小程序,包括:3. The method according to claim 1, wherein the loading the one applet using the first applet process comprises: 判断所述第一小程序进程当前是否已正常启动且空闲,若已正常启动且空闲,则使用所述第一小程序进程加载所述一个小程序;Determine whether the first applet process is currently started normally and is idle, and if it has been started normally and is idle, use the first applet process to load the one applet; 否则,重新启动所述第一小程序进程,以使用正常启动的所述第一小程序进程加载所述一个小程序。Otherwise, the first applet process is restarted to load the one applet using the normally started first applet process. 4.根据权利要求1-3中任一项所述的方法,其特征在于,还包括:4. The method according to any one of claims 1-3, characterized in that, further comprising: 在已配置的小程序线程均已正常启动并加载小程序后,响应于对一个新的小程序的启动操作,将当前使用所述第一小程序进程加载的小程序替换为所述一个新的小程序。After the configured applet threads have been started normally and the applet has been loaded, in response to the start operation of a new applet, the applet currently loaded by the first applet process is replaced with the new applet Applets. 5.根据权利要求1所述的方法,其特征在于,配置的小程序进程数量为5个。5 . The method according to claim 1 , wherein the number of configured applet processes is five. 6 . 6.一种小程序启动控制装置,其特征在于,包括:6. A small program startup control device, characterized in that, comprising: 第一广播模块,用于在应用正常启动后,向第一广播发送一个广播事件,以启动与所述第一广播对应的第一小程序进程;a first broadcast module, configured to send a broadcast event to the first broadcast after the application starts normally, so as to start the first applet process corresponding to the first broadcast; 加载模块,用于响应于对一个小程序的启动操作,使用所述第一小程序进程加载所述一个小程序;a loading module, configured to use the first applet process to load the one applet in response to the start operation of the applet; 第二广播模块,用于在所述应用中显示所述一个小程序的操作首页的同时,发送一个广播事件至位于所述第一广播后的第二广播,以启动与所述第二广播对应的第二小程序进程。The second broadcast module is configured to send a broadcast event to the second broadcast located after the first broadcast while displaying the operation homepage of the one applet in the application, so as to start corresponding to the second broadcast The second applet process. 7.根据权利要求6所述的装置,其特征在于,所述加载模块,用于:7. The apparatus according to claim 6, wherein the loading module is used for: 判断所述第一小程序进程当前是否已正常启动且空闲,若已正常启动且空闲,则使用所述第一小程序进程加载所述一个小程序;Determine whether the first applet process is currently started normally and is idle, and if it has been started normally and is idle, use the first applet process to load the one applet; 否则,重新启动所述第一小程序进程,以使用正常启动的所述第一小程序进程加载所述一个小程序。Otherwise, the first applet process is restarted to load the one applet using the normally started first applet process. 8.根据权利要求6或7所述的装置,其特征在于,还包括小程序替换模块,用于:8. device according to claim 6 or 7, is characterized in that, also comprises applet replacement module, is used for: 在已配置的小程序线程均已正常启动并加载小程序后,响应于对一个新的小程序的启动操作,将当前使用所述第一小程序进程加载的小程序替换为所述一个新的小程序。After the configured applet threads have been started normally and the applet has been loaded, in response to the start operation of a new applet, the applet currently loaded by the first applet process is replaced with the new applet Applets. 9.一种电子设备,其特征在于,包括:9. An electronic device, characterized in that, comprising: 一个或多个处理器;one or more processors; 存储装置,用于存储一个或多个程序,storage means for storing one or more programs, 当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-5中任一所述的方法。The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5. 10.一种计算机可读介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现如权利要求1-5中任一所述的方法。10. A computer-readable medium on which a computer program is stored, characterized in that, when the program is executed by a processor, the method according to any one of claims 1-5 is implemented.
CN202110075175.9A 2021-01-20 2021-01-20 A small program startup control method and device Active CN114090104B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110075175.9A CN114090104B (en) 2021-01-20 2021-01-20 A small program startup control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110075175.9A CN114090104B (en) 2021-01-20 2021-01-20 A small program startup control method and device

Publications (2)

Publication Number Publication Date
CN114090104A true CN114090104A (en) 2022-02-25
CN114090104B CN114090104B (en) 2025-04-15

Family

ID=80295934

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110075175.9A Active CN114090104B (en) 2021-01-20 2021-01-20 A small program startup control method and device

Country Status (1)

Country Link
CN (1) CN114090104B (en)

Cited By (1)

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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070033239A1 (en) * 2005-08-03 2007-02-08 Stephane Beaule Preloading resources from data carousel of broadcast file system
CN110377369A (en) * 2019-07-25 2019-10-25 上海连尚网络科技有限公司 A kind of method, equipment and computer storage medium running small routine
WO2020187121A1 (en) * 2019-03-15 2020-09-24 上海连尚网络科技有限公司 Applet start method, device, and computer storage medium
CN111913707A (en) * 2020-08-06 2020-11-10 上海连尚网络科技有限公司 Running process multiplexing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070033239A1 (en) * 2005-08-03 2007-02-08 Stephane Beaule Preloading resources from data carousel of broadcast file system
WO2007019218A2 (en) * 2005-08-03 2007-02-15 Bluestreak Technology, Inc. Preloading resources from data carousel of broadcast file system
WO2020187121A1 (en) * 2019-03-15 2020-09-24 上海连尚网络科技有限公司 Applet start method, device, and computer storage medium
CN110377369A (en) * 2019-07-25 2019-10-25 上海连尚网络科技有限公司 A kind of method, equipment and computer storage medium running small routine
CN111913707A (en) * 2020-08-06 2020-11-10 上海连尚网络科技有限公司 Running process multiplexing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
秦泽宇;: "新闻小程序的应用模式与发展路径", 青年记者, no. 21, 30 July 2020 (2020-07-30) *

Cited By (2)

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

Also Published As

Publication number Publication date
CN114090104B (en) 2025-04-15

Similar Documents

Publication Publication Date Title
EP2864873B1 (en) Auto-update while running a client software application with update handshake between versions and runtime validation of the successor version
CN110018765B (en) Page display method, device, terminal and storage medium
CN110764805B (en) Client non-inductive upgrading method, device, terminal and storage medium
CN110750284B (en) Application quick starting method, terminal and computer readable storage medium
US20170199733A1 (en) Method for terminal to update operating system, terminal and system
CN109683992B (en) Method and apparatus for managing objects
CN111913707A (en) Running process multiplexing method and device
CN113791777B (en) Picture display method and device, computer readable storage medium and electronic equipment
CN111143031A (en) A method and device for changing the capacity of a virtual machine
CN114090104B (en) A small program startup control method and device
US20240378068A1 (en) Control method and electronic device
CN111580882A (en) Application program starting method, device, computer system and medium
CN108287737B (en) Service Worker starting method and device and electronic equipment
CN114610446B (en) Method, device and system for automatically injecting probe
CN110262841B (en) Method and device for enhancing byte codes
CN117785275A (en) Daemon implementation method, daemon implementation device, daemon implementation equipment, daemon implementation medium and daemon implementation program product
CN119621164A (en) Application program execution method, device, computer system and readable storage medium
CN110750242A (en) Method, system, medium and electronic device for deploying files
CN113986368A (en) Linux-based camera control method, device, equipment and storage medium
CN110727479A (en) Method, device, terminal and storage medium for executing application starting code
CN113515299A (en) Software development kit SDK hot upgrade method, device, device and storage medium
CN115220803A (en) Data processing method and equipment
CN114610331A (en) Software installation method and system
CN111130702A (en) Decoding method, decoding system, electronic device, and storage medium
CN118394611B (en) Out-of-band installation operating system progress identification method, device, equipment and 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
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载