WO2021013247A1 - 一种运行小程序的方法、设备和计算机存储介质 - Google Patents
一种运行小程序的方法、设备和计算机存储介质 Download PDFInfo
- Publication number
- WO2021013247A1 WO2021013247A1 PCT/CN2020/104488 CN2020104488W WO2021013247A1 WO 2021013247 A1 WO2021013247 A1 WO 2021013247A1 CN 2020104488 W CN2020104488 W CN 2020104488W WO 2021013247 A1 WO2021013247 A1 WO 2021013247A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- applet
- host application
- host
- memory
- terminal device
- Prior art date
Links
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/44568—Immediately runnable code
- G06F9/44578—Preparing or optimising for loading
Definitions
- Mini Program is an application that can be used without installation, and it runs in the environment provided by the host application. It is more and more widely used because it is available at any time without installation and uninstallation. At present, each host application needs to load and run small programs separately, resulting in low operating efficiency of the small programs and a waste of resources.
- the present invention provides a method, a device and a computer storage medium for running a small program to improve the operating efficiency of the small program and save resources.
- the present invention provides a method for running an applet, which is executed by a host application of a terminal device, and the method includes:
- the method further includes:
- the process of the small program existing in the memory of the host application is used to run the small program.
- confirming whether the process of the applet already exists in the memory of other host applications in the terminal device includes: confirming that each host application in the terminal device belongs to the same host alliance as the host application , Determining whether the process of the applet already exists in the determined memory of each host application;
- each host application in the same host alliance adopts the same applet standard.
- the method further includes:
- the host application queries the private database of the host application to perform the step of confirming whether the process of the applet already exists in the memory of other host applications in the terminal device.
- the method further includes:
- the method further includes:
- the Binder mechanism is used to execute the step of invoking the process of the existing applet.
- the present invention provides a device, which includes:
- FIG. 1 is a schematic diagram of a system architecture involved in an embodiment of the present invention
- Figure 5 shows a block diagram of an exemplary computer system suitable for implementing embodiments of the present invention.
- the same terminal device may contain multiple host applications.
- host application 1 and host application 2 are taken as an example.
- a host application may also run multiple applets, and different host applications may run different applets or the same applet.
- the host application 1 runs the applet a and the applet b
- the host application 2 runs the applet b and the applet c.
- the present invention is not limited to the types of events that trigger the running of the applet in the host application.
- the user can click the icon of the applet in the host application to trigger the applet to run, or the user can click on a link in the host application to trigger the corresponding applet Run, etc.
- the host application 1 When the host application 1 is started, it can send a synchronization request of the host alliance to the corresponding server, and the corresponding server returns to the host application 1 the information of each host application of the host alliance, such as the package name. Then the host application 1 can determine the host application information of the host alliance that the terminal device has installed.
- the host application 1 uses the Binder mechanism to call the process of the small program c that already exists in the memory of other host applications to run the small program c and end the startup process.
- the host application 1 can directly call the process of the applet c that already exists in the memory of the host application 2 to start the applet c.
- each other host application After receiving the broadcast message, each other host application records the information of the small program c process in the memory of the host application 1 in the private database of the host application.
- the process of the applet c is ended in the memory of the subsequent host application 1, the information about the process of the host application 1 ending the applet c can also be notified to other host applications of the same host alliance through a broadcast message, so that other host applications can be timely Update their own private databases. Through this mechanism, it can be ensured that each host application of the same host alliance in the terminal device can learn the latest applet process status.
- FIG. 4 is a flow chart of the method provided in Embodiment 2 of the present invention.
- the above-mentioned second implementation manner is described.
- the method executed by the host application 1 may include the following processes:
- a shared database is set in the terminal device, and the shared database has read and write permissions for each host application in the host alliance.
- the host applications in the host alliance record the status of the applet process running in the host application's memory in the shared database for sharing within the host alliance.
- the host application 1 uses the Binder mechanism to call the process of the applet c that already exists in the memory of other host applications to run the applet c and end the startup process.
- the host application 1 records the information of starting the applet c process in its own memory in the shared database.
- FIG. 5 shows a block diagram of an exemplary computer system 012 suitable for implementing embodiments of the present invention.
- the computer system 012 shown in FIG. 5 is only an example, and should not bring any limitation to the function and application scope of the embodiments of the present invention.
- the computer system 012 can also communicate with one or more external devices 014 (such as keyboards, pointing devices, displays 024, etc.).
- the computer system 012 communicates with external radar devices, and can also communicate with one or more users Communication with a device that can interact with the computer system 012, and/or with any device (such as a network card, modem, etc.) that enables the computer system 012 to communicate with one or more other computing devices. This communication can be performed through an input/output (I/O) interface 022.
- the computer system 012 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 020.
- networks such as a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet
- the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
- the computer-readable storage medium may be, for example, but not limited to, an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above.
- the computer program code used to perform the operations of the present invention can be written in one or more programming languages or a combination thereof.
- the programming languages include object-oriented programming languages-such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language.
- the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
- the remote computer can be connected to the user's computer through any kind of network-including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect to the user's computer) connection).
- LAN local area network
- WAN wide area network
Abstract
Description
Claims (12)
- 一种运行小程序的方法,由终端设备的宿主应用执行,其特征在于,该方法包括:获取到触发小程序运行的事件;若本宿主应用的内存中不存在所述小程序的进程,则确认所述终端设备中其他宿主应用的内存中是否已经存在所述小程序的进程;如果是,则调用已经存在的所述小程序的进程以运行所述小程序。
- 根据权利要求1所述的方法,其特征在于,该方法还包括:若确认所述终端设备中其他宿主应用的内存中均不存在所述小程序的进程,则在本宿主应用的内存中启动小程序的进程以运行所述小程序。
- 根据权利要求1所述的方法,其特征在于,该方法还包括:若本宿主应用的内存中存在所述小程序的进程,则利用本宿主应用的内存中存在的所述小程序的进程运行所述小程序。
- 根据权利要求1所述的方法,其特征在于,确认所述终端设备中其他宿主应用的内存中是否已经存在所述小程序的进程,包括:确认所述终端设备中与本宿主应用属于同一宿主联盟的各宿主应用,判断确定出的所述各宿主应用的内存中是否已经存在所述小程序的进程;其中,同一宿主联盟中各宿主应用采用相同的小程序标准。
- 根据权利要求4所述的方法,其特征在于,该方法还包括:从服务器端同步与本宿主应用属于同一宿主联盟的各宿主应用的信息,并确定所述终端设备已经安装的所述宿主联盟的宿主应用信息。
- 根据权利要求2所述的方法,其特征在于,所述在本宿主应用的内存中启动小程序的进程以运行所述小程序之后,该方法还包括:将启动所述小程序的进程信息广播给所述终端设备中的各宿主应用,以便各宿主应用记录于本宿主应用的私有数据库;宿主应用查询本宿主应用的私有数据库以执行确认所述终端设备中其他宿主应用的内存中是否已经存在所述小程序的进程的步骤。
- 根据权利要求6所述的方法,其特征在于,该方法还包括:在结束所述小程序的进程之后,将结束所述小程序的进程信息广播给所述终端设备中的各宿主应用,以便各宿主应用更新本宿主应用的私有数据库。
- 根据权利要求2所述的方法,其特征在于,在所述在本宿主应用的内存中启动小程序的进程以运行所述小程序之后,该方法还包括:将启动所述小程序的进程信息记录于所述终端设备的共享数据库;查询所述共享数据库以执行确认所述终端设备中其他宿主应用的内存中是否已经存在所述小程序的进程的步骤。
- 根据权利要求8所述的方法,其特征在于,该方法还包括:在结束所述小程序的进程之后,依据结束所述小程序的进程信息更新所述共享数据库。
- 根据权利要求1所述的方法,其特征在于,采用Binder机制执行所述调用已经存在的所述小程序的进程的步骤。
- 一种设备,其特征在于,所述设备包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-10中任一所述的方法。
- 一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-10中任一所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910676643.0 | 2019-07-25 | ||
CN201910676643.0A CN110377369B (zh) | 2019-07-25 | 2019-07-25 | 一种运行小程序的方法、设备和计算机存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021013247A1 true WO2021013247A1 (zh) | 2021-01-28 |
Family
ID=68255855
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/104488 WO2021013247A1 (zh) | 2019-07-25 | 2020-07-24 | 一种运行小程序的方法、设备和计算机存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110377369B (zh) |
WO (1) | WO2021013247A1 (zh) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110377369B (zh) * | 2019-07-25 | 2021-02-19 | 上海连尚网络科技有限公司 | 一种运行小程序的方法、设备和计算机存储介质 |
CN112835632B (zh) * | 2019-11-06 | 2022-05-27 | 上海连尚网络科技有限公司 | 一种端能力的调用方法、设备和计算机存储介质 |
CN112241473A (zh) * | 2020-09-07 | 2021-01-19 | 上海连尚网络科技有限公司 | 一种用于为应用配置数据的方法与设备 |
CN112148332B (zh) * | 2020-09-30 | 2023-09-05 | 亮风台(上海)信息科技有限公司 | 工具化系统及其更新方法、终端设备、存储介质 |
CN116263718A (zh) * | 2021-12-13 | 2023-06-16 | 北京有竹居网络技术有限公司 | 进程管理方法、装置、存储介质以及电子设备 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090172710A1 (en) * | 2007-12-28 | 2009-07-02 | Arman Toorians | Method and system for enabling a mini program on a computing device to access an auxiliary system |
CN109710332A (zh) * | 2018-12-28 | 2019-05-03 | 上海掌门科技有限公司 | 寄宿应用的处理方法、设备及计算机可读存储介质 |
CN109710333A (zh) * | 2018-12-28 | 2019-05-03 | 上海掌门科技有限公司 | 寄宿应用的处理方法、设备及计算机可读存储介质 |
CN109960541A (zh) * | 2019-03-15 | 2019-07-02 | 上海连尚网络科技有限公司 | 启动小程序的方法、设备和计算机存储介质 |
CN109976619A (zh) * | 2019-03-27 | 2019-07-05 | 携程计算机技术(上海)有限公司 | 微信小程序运行环境的切换系统及方法 |
CN110377369A (zh) * | 2019-07-25 | 2019-10-25 | 上海连尚网络科技有限公司 | 一种运行小程序的方法、设备和计算机存储介质 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108595220B (zh) * | 2018-04-25 | 2021-04-16 | 上海掌门科技有限公司 | 应用组件的处理方法、设备及计算机可读存储介质 |
CN109614207A (zh) * | 2018-10-12 | 2019-04-12 | 上海掌门科技有限公司 | 寄宿应用的处理方法、设备及计算机可读存储介质 |
-
2019
- 2019-07-25 CN CN201910676643.0A patent/CN110377369B/zh active Active
-
2020
- 2020-07-24 WO PCT/CN2020/104488 patent/WO2021013247A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090172710A1 (en) * | 2007-12-28 | 2009-07-02 | Arman Toorians | Method and system for enabling a mini program on a computing device to access an auxiliary system |
CN109710332A (zh) * | 2018-12-28 | 2019-05-03 | 上海掌门科技有限公司 | 寄宿应用的处理方法、设备及计算机可读存储介质 |
CN109710333A (zh) * | 2018-12-28 | 2019-05-03 | 上海掌门科技有限公司 | 寄宿应用的处理方法、设备及计算机可读存储介质 |
CN109960541A (zh) * | 2019-03-15 | 2019-07-02 | 上海连尚网络科技有限公司 | 启动小程序的方法、设备和计算机存储介质 |
CN109976619A (zh) * | 2019-03-27 | 2019-07-05 | 携程计算机技术(上海)有限公司 | 微信小程序运行环境的切换系统及方法 |
CN110377369A (zh) * | 2019-07-25 | 2019-10-25 | 上海连尚网络科技有限公司 | 一种运行小程序的方法、设备和计算机存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN110377369B (zh) | 2021-02-19 |
CN110377369A (zh) | 2019-10-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021013247A1 (zh) | 一种运行小程序的方法、设备和计算机存储介质 | |
WO2021013243A1 (zh) | 一种启动小程序的方法、设备和计算机存储介质 | |
WO2021013242A1 (zh) | 一种启动小程序的方法、设备和计算机存储介质 | |
US20220053068A1 (en) | Methods, apparatuses and computer storage media for applet state synchronization | |
US10193971B2 (en) | Method, server and system for application synchronization | |
WO2021088671A1 (zh) | 一种端能力的调用方法、设备和计算机存储介质 | |
US7877091B2 (en) | Method and system for executing a container managed application on a processing device | |
WO2020177698A1 (zh) | 小程序平台间的通讯方法、设备和计算机存储介质 | |
US20100269120A1 (en) | Method, apparatus and computer program product for sharing resources via an interprocess communication | |
JP2000289583A (ja) | 車両診断実行方法および車両診断実行システム | |
CN110489440B (zh) | 数据查询方法和装置 | |
WO2020135245A1 (zh) | 寄宿应用的处理方法、设备及计算机可读存储介质 | |
CN107256188B (zh) | 安卓设备的控制方法、装置、终端及存储介质 | |
CN114385091B (zh) | 网盘盘符的实现方法、装置、网盘及存储介质 | |
WO2020177697A1 (zh) | 小程序平台间的发现方法、设备和计算机存储介质 | |
CN111259022A (zh) | 一种信息同步方法、同步系统、计算机设备和介质 | |
CN114296646B (zh) | 基于io业务的缓存方法、装置、服务器和存储介质 | |
WO2021012795A1 (zh) | 网络节点的调度方法、装置、电子设备和存储介质 | |
WO2022062634A1 (zh) | 在业务中集成地图服务的方法、装置、设备和存储介质 | |
CN114201317A (zh) | 数据传输方法、装置、存储介质及电子设备 | |
CN111475230B (zh) | 应用的功能配置方法、装置和电子设备 | |
CN111596864A (zh) | 一种数据延时删除的方法、装置、服务器及存储介质 | |
CN109614089B (zh) | 数据访问代码的自动生成方法、装置、设备及存储介质 | |
WO2023051315A1 (zh) | 应用控制方法、装置、电子设备及存储介质 | |
WO2020224295A1 (zh) | 用于管理信息的方法、装置和系统 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20844432 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20844432 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20844432 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 08.09.2022) |