[go: up one dir, main page]

CN110389935B - A method, device and computer storage medium for starting applet - Google Patents

A method, device and computer storage medium for starting applet Download PDF

Info

Publication number
CN110389935B
CN110389935B CN201910676162.XA CN201910676162A CN110389935B CN 110389935 B CN110389935 B CN 110389935B CN 201910676162 A CN201910676162 A CN 201910676162A CN 110389935 B CN110389935 B CN 110389935B
Authority
CN
China
Prior art keywords
applet
host application
host
file package
terminal device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910676162.XA
Other languages
Chinese (zh)
Other versions
CN110389935A (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.)
Shanghai Lianshang Network Technology Group Co ltd
Original Assignee
Shanghai Lianshang Network 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 Shanghai Lianshang Network Technology Co Ltd filed Critical Shanghai Lianshang Network Technology Co Ltd
Priority to CN201910676162.XA priority Critical patent/CN110389935B/en
Publication of CN110389935A publication Critical patent/CN110389935A/en
Priority to PCT/CN2020/104097 priority patent/WO2021013242A1/en
Application granted granted Critical
Publication of CN110389935B publication Critical patent/CN110389935B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1748De-duplication implemented within the file system, e.g. based on file segments
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • 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/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading
    • 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)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

本发明提供了一种启动小程序的方法、设备和计算机存储介质,其中方法包括:终端设备的宿主应用获取到触发小程序启动的事件后,确认所述终端设备中是否存在宿主应用存储有所述小程序的文件包;如果是,则利用所述小程序的文件包启动所述小程序;否则,从服务器端下载并存储所述小程序的文件包,设置所述小程序的文件包的存储位置其他宿主应用也可读。在本发明中同一终端设备中各宿主应用共享下载的小程序的文件包来进行小程序的启动,从而实现解决小程序重复下载的问题,节约资源。

Figure 201910676162

This invention provides a method, device, and computer storage medium for launching a mini-program. The method includes: after a host application on a terminal device receives an event triggering the launch of a mini-program, it confirms whether the host application on the terminal device stores the file package of the mini-program; if so, it launches the mini-program using the file package; otherwise, it downloads and stores the file package of the mini-program from a server, and sets the storage location of the file package so that other host applications can also read it. In this invention, host applications on the same terminal device share the downloaded file package of the mini-program to launch the mini-program, thereby solving the problem of repeated downloads of mini-programs and saving resources.

Figure 201910676162

Description

Method, equipment and computer storage medium for starting small program
[ technical field ] A method for producing a semiconductor device
The present invention relates to the field of computer application technologies, and in particular, to a method and an apparatus for starting an applet, and a computer storage medium.
[ background of the invention ]
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
A Mini Program (Mini Program) is an application that can be used without installation, and runs in an environment provided by a host application. It is becoming more and more widely used because it is readily available without the need for installation and removal. At present, when each host application starts the applet, the file package of the applet needs to be downloaded locally in the host application, which inevitably causes resource waste.
[ summary of the invention ]
In view of the foregoing, the present invention provides a method, apparatus, and computer storage medium for starting an applet to save resources.
The specific technical scheme is as follows:
in one aspect, the present invention provides a method for starting an applet, which is executed by a host application of a terminal device, and includes:
acquiring an event for triggering the start of the small program;
confirming whether a file packet with the applet stored in the host application exists in the terminal equipment;
if so, starting the small program by using the file package of the small program;
otherwise, downloading and storing the small program file package from the server side to start the small program, and setting the storage position of the small program file package to be readable by other host applications.
According to a preferred embodiment of the present invention, the determining whether the terminal device has a file package in which the applet is stored by the host application includes: confirming each host application belonging to the same host alliance with the host application in the terminal equipment, and judging whether each determined host application stores the file packet of the small program or not;
setting the storage position of the file packet of the applet to be readable by other host applications, wherein the setting comprises the following steps: setting the storage position of the file packet of the applet to be readable for each host application belonging to the same host alliance with the host application;
wherein, each host application in the same host alliance adopts the same applet standard.
According to a preferred embodiment of the invention, the method further comprises:
and the slave server side synchronizes the information of each host application belonging to the same host alliance with the host application, and determines the host application information of the host alliance which is installed by the terminal equipment.
According to a preferred embodiment of the present invention, the determining whether the terminal device has a file package in which the applet is stored by the host application includes:
and judging whether a host application stores the file packet of the applet or not in the terminal equipment, wherein the file packet of the applet meets the version requirement of the host application.
According to a preferred embodiment of the present invention, after the downloading and storing the package of the applet from the server, the method further comprises:
and reporting the status of the file packet of the local host application storage applet to a server so that other host applications of the terminal equipment can be acquired from the server.
According to a preferred embodiment of the invention, the method further comprises:
after the host application is started, acquiring the status of the file package of each host application storage applet in the terminal equipment from a server side, and storing the status in a private database of the host application;
and inquiring the private database to execute the step of confirming whether the file packet with the applet stored in the host application exists in the terminal equipment.
According to a preferred embodiment of the present invention, after the downloading and storing the package of the applet from the server, the method further comprises:
and synchronizing the state of the host application storing the file packet of the applet to a shared database in the terminal equipment so that other host applications of the terminal equipment can be obtained from the shared database.
According to a preferred embodiment of the present invention, the storage location of the applet package is under a private directory of the host application.
According to a preferred embodiment of the present invention, the determining whether the terminal device has a file package in which the applet is stored by the host application includes:
firstly, determining whether a file package of the small program exists under a private directory applied by a host;
if the small program does not exist, judging whether the terminal equipment has the file package of the small program stored in other host applications, and if so, reading the file package of the small program from the private directories of the other host applications of the file package of the small program.
According to a preferred embodiment of the present invention, the determining whether the terminal device has a file package in which the applet is stored by the host application includes: judging whether the shared storage space of the terminal equipment stores the file packet of the small program or not;
the downloading and storing of the package of the applet from the server side comprises: and downloading the small program file package from the server and storing the small program file package in the shared storage space of the terminal equipment.
In a second aspect, the present invention provides a method for starting an applet, where the method is executed by a server corresponding to a host application, and the method includes:
receiving the status of the file packet of the host application storage applet reported by the corresponding host application; and synchronizing the state of the file package of the applet stored by other host applications from the server side of other host applications;
integrating the conditions of the file packages of all host application storage applets in the same terminal equipment;
and synchronizing the status of the file packet of each host application storage applet in the terminal equipment where the host application is located to the corresponding host application so as to enable the corresponding host application to start the applet for use.
According to a preferred embodiment of the invention, the method further comprises:
and synchronizing the information of each host application belonging to the same host alliance with the corresponding host application to the corresponding host application, wherein the same applet standard is adopted by each host application in the same host alliance.
According to a preferred embodiment of the present invention, the integrating the status of the file package of each hosted application storage applet in the same terminal device includes:
and merging and de-duplicating the condition of the file packet of the host application storage small program stored by the server side and the condition of the file packet of each host application storage small program synchronized from the server sides of other host applications aiming at the same terminal equipment.
In a third aspect, the present invention provides an apparatus comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method as in any above.
In a fourth aspect, the present invention provides a storage medium containing computer-executable instructions for performing a method as described in any one of the above when executed by a computer processor.
According to the technical scheme, all hosts in the same terminal equipment share the downloaded applet file package to start the applet, so that the problem of repeated downloading of the applet is solved, and resources are saved.
[ description of the drawings ]
FIG. 1 is a system architecture diagram according to an embodiment of the present invention;
FIG. 2 is a flow chart of a main method provided by the embodiment of the present invention;
fig. 3 is a flowchart of a method executed by the host application 1 according to an embodiment of the present invention;
FIG. 4 is a flowchart executed by the server according to an embodiment of the present invention;
fig. 5 is a flowchart of a method executed by the host application 1 according to the second embodiment of the present invention;
fig. 6 is a flowchart of a method executed by the host application 1 according to the third embodiment of the present invention;
FIG. 7 illustrates a block diagram of an exemplary computer system suitable for use to implement embodiments of the present invention.
[ detailed description ] embodiments
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
In order to facilitate an understanding of the present invention, a system architecture and a main concept to which the present invention relates will be described first. As shown in fig. 1, the system architecture mainly includes a host application and a server corresponding to the host application.
The small program runs on the terminal equipment depending on the host application, and the environment where the small program runs is provided by the host application. Wherein the terminal devices may include, but are not limited to, devices such as: intelligent mobile terminals, intelligent home devices, network devices, wearable devices, intelligent medical devices, PCs (personal computers), and the like. Wherein the smart mobile device may include devices such as a cell phone, a tablet computer, a notebook computer, a PDA (personal digital assistant), an internet automobile, etc. The smart home device may include a smart home device, such as a smart television, a smart sound box, and the like. The network devices may include devices such as switches, wireless APs, servers, and the like. Wearable devices may include devices such as smart watches, smart glasses, smart bracelets, virtual reality devices, augmented reality devices, mixed reality devices (i.e., devices that can support virtual reality and augmented reality), and so forth.
Multiple host applications may be contained in the same terminal device, and fig. 1 illustrates an example of the host application 1 and the host application 2. Multiple applets may also be run in one host application, and different host applications may run different applets, or the same applet. As shown in fig. 1, an applet a and an applet b are run in the host application 1, and an applet b and an applet c are run in the host application 2.
Each host application has a corresponding server side, as shown in fig. 1, a host application 1 corresponds to a server side 1, and a host application 2 corresponds to a server side 2. Each host application can interact with the corresponding server side, and in the embodiment of the invention, data interaction can be performed between different server sides.
Each server may be a single server or a server group consisting of a plurality of servers. It should be understood that the number of terminal devices, hosting applications, applets, server sides in fig. 1 is merely illustrative. Any number of terminal devices, host applications, applets, server sides may be present, as desired for implementation.
The core idea of the invention is that all hosts in the same terminal equipment share the downloaded applet file package to start the applet, thereby realizing the problem of repeated downloading of the applet and saving resources. Fig. 2 is a flowchart of a main method provided in an embodiment of the present invention, where the method is executed by a host application of a terminal device, and an execution device may be a functional unit located in the host application of the terminal device, such as a plug-in or a Software Development Kit (SDK). As shown in fig. 2, the method mainly includes the following steps:
in 201, an event is acquired that triggers the start of an applet.
The invention is not limited to the type of event that triggers the launching of the applet in the host application, and for example, the user may click the applet icon in the host application to trigger the launching of the applet, or the user may click a link in the host application to trigger the launching of the corresponding applet, and so on.
In 202, confirming whether a file package with the applet stored in the host application exists in the terminal equipment, if so, executing 203; otherwise, 204 is performed.
Since the applet does not need to be installed in the host application, the package of the applet involved in the embodiment of the present invention is not an installation package, but contains the applet files required for starting the applet and running the applet, and may include, for example: source files, compressed code, resource files, and the like.
At 203, the applet is started using the package of the applet and the process ends.
If the host application already stores the file package of the applet in the terminal device, the applet can be started by directly utilizing the stored file package of the applet without repeated downloading.
At 204, the applet is started by downloading and storing the applet package from the server side, and the storage location of the applet package is set to be readable by other host applications.
If the host application does not store the file package of the applet in the terminal equipment, the file package of the applet needs to be downloaded from the server side and stored. In order for the package of applets downloaded to be usable by other hosting applications, the storage location of the package is readable by other hosting applications in addition to the storage location where the application can read the package.
In the embodiment of the present invention, a way of sharing a stored package of applets by a host application in the same terminal device is adopted, wherein the sharing way may adopt, but is not limited to, the following several ways:
the first mode is as follows: and the host application stores the downloaded applet file package in a private directory of the host application, and the private directory is set to be readable to other host applications. And meanwhile, the host application reports the status of the file package for storing the small program to the corresponding server side, and the server side of each host application synchronizes the status of the file package for storing the small program by the host application, so that other host applications can acquire the status of the file package for storing the small program by each host application in the same terminal equipment from the corresponding server side.
That is, in the first mode, the applet packages are stored in the private directory of the host application by the host application, and the states of the applet packages stored by the host applications are synchronized at the server side and acquired from the server side.
The second mode is as follows: and the host application stores the downloaded applet file package in a private directory of the host application, and the private directory is set to be readable to other host applications. Meanwhile, the host application records the status of the file package storing the small programs in a shared database in the terminal equipment. And each host application can acquire the storage condition of the applet file package from the shared database.
The third mode is as follows: and the host application stores the downloaded applet file packages in the shared storage space of the terminal equipment, and all the host applications in the terminal equipment read the applet file packages from the shared storage space to start the applets.
The above three modes will be described in detail with reference to specific embodiments. In addition, it should be noted that it is desirable that all host applications use the same applet standard. Often times, however, in practice, some host applications use the same applet standard, while other host applications use other applet standards. Then a hosting application that employs the same applet standards may be referred to as a hosting federation. The method for sharing the applet file package provided by the embodiment of the invention is adopted for each host application belonging to the same host alliance. And the host applications belong to the same host alliance, the host applications can be uniformly configured at the server side, and then the host applications are obtained from the server side. In the following embodiments, the manner in which the applet packages are shared by the hosting applications of the same hosting federation is described as an example. In addition, for all the host applications of the host alliance, a uniform naming mechanism is adopted for the file packages of all the applets, so that the corresponding applets can be known through the file package names of the applets.
The first embodiment,
Fig. 3 is a flowchart of a method according to an embodiment of the present invention, and the first implementation manner is described in this embodiment. Assuming that the user wants to start the applet c in the host application 1, as shown in fig. 3, the method performed by the host application 1 may include the following processes:
in 301, when the host application 1 is started, the information of the host federation is synchronized from the server and stored in the database local to the host application 1.
When the host application 1 is started, a synchronization request of the host federation may be sent to the corresponding server side, and the corresponding server side returns information of each host application of the host federation, such as a packet name, to the host application 1. The host application 1 can then determine the host application information of the host alliance that the terminal device has installed.
When the host application 1 is started, the locally installed application program of the terminal device can be scanned, and then the host application information of the host alliance installed in the terminal device can be determined by further using the information of the host alliance synchronized from the server, and the information of the host application can be stored in a database of the host application in a list form.
For example, it is assumed that the information of the hosting federation sent by the server includes: host application 1, host application 2, host application 3, host application 4 … …. After scanning the terminal device, the host application 1 finds that the terminal device is provided with the host application 1 and the host application 2, and then the host application 1 can store the information of the host application 1 and the host application 2 in a local database of the host application 1.
In 302, after the host application 1 is started, the server synchronizes the status of the applet storage packages of each host application in the same host federation in the terminal device, and stores the applet storage packages in the local database of the host application 1.
That is, after the host application 1 is started, it can be obtained from the server side which applet file packages, including package names, version numbers, etc., are stored in all the host applications of the host alliance in the terminal device.
In the above example, if the host application 1 obtains from the server side that the host application 1 stores the applet a and the applet b, and the host application 2 stores the applet b and the applet c, the information is stored in the local database of the host application 1.
In 303, after an event that the applet c is started in the host application 1 is acquired, whether a file package of the applet c is stored in a private directory of the host application 1 is judged, and if so, 304 is executed; otherwise 305 is performed.
In 304, the applet c is started by using the file package of the applet c stored in the private directory of the host application 1, and the starting process is ended.
In 305, a local database of the host application 1 is queried, whether other host applications of the same host alliance store the file package of the applet c is determined, and if so, 306 is executed; otherwise, 307 is performed.
In this step, it is determined whether other hosted applications of the same hosted federation store the package of the applet c on the one hand, and whether the stored package of the applet c meets the version requirement of the hosted application 1 on the other hand, if both are met, 306 is executed, otherwise 307 is executed. Typically the host application 1 considers the version requirements to be met if the required version is lower than or equal to the version of the applet c stored by the other host application.
In 306, the host application 1 reads the file package of the applet c from the private directories of other host applications, and starts the applet c in the host application 1, and ends the start process.
For example, if the host application 2 stores the package of the applet c already, the host application 1 reads the package of the applet c from the private directory of the host application 2 to start the applet c.
In 307, the host application 1 downloads the package of the applet c from the corresponding server, stores the package in the private directory of the host application 1, and sets the authority of the private directory to be readable by each host application of the host federation.
As a preferred embodiment, in order to ensure the security of the content in the private directory, the authority of the private directory may be set to be readable and unwritable by each host application of the host federation.
In 308, the host application 1 starts the applet c by using the downloaded package, and reports the status of the package storing the applet c to the server.
In this embodiment, the flow shown in fig. 4 may be executed for the server side, and includes:
in 401, a status of a file package of the applet stored in the host application reported by the corresponding host application is received.
When the host application reports the status of the file packet storing the applet, the host application can carry information such as a terminal device identifier, a host application identifier, an applet identifier, and an applet version number. And after receiving the information, the server side carries out corresponding maintenance on a local database of the server side.
For example, a relationship item "terminal device identification-hosting application identification-applet version number" is maintained.
At 402, the status of the package of files of the applet stored by the other hosting applications is synchronized from the server side of the other hosting applications.
The above 401 and 402 are not necessarily performed in the above order, and the synchronization in step 402 may be periodically or based on an event trigger.
The server side of each host application can open an interface for synchronization aiming at the host alliance, and the server side can synchronize the status of the file packet of each host application storage applet stored in the local database to other server sides in the host alliance.
At 403, the status of the package of files of the storage applet by each hosting application in the same terminal device is integrated.
The conditions stored in the local database of the server and the conditions synchronized from other servers are in the forms of terminal device identification, host application identification, applet identification and applet version number, and information under the same terminal device identification can be merged and subjected to deduplication processing, so that the conditions of the file packets of the applets stored in the hosts under the same terminal device identification can be obtained.
In 404, the status of the package of the applet stored by each host application in the terminal device where the host application is located is synchronized with the corresponding host application, so as to be used by the corresponding host application to start the applet.
The terminal device identifier of the hosting application may be obtained in a situation such as step 302 in fig. 3, and a situation of a file package of each hosting application storage applet under the terminal device identifier is issued thereto.
Example II,
Fig. 5 is a flowchart of a method provided in a second embodiment of the present invention, and the second implementation manner is described in this embodiment. Assuming that the user wants to start the applet c in the host application 1, as shown in fig. 5, the method performed by the host application 1 may include the following processes:
in 501, an event of the start of applet c in the host application 1 is obtained.
In 502, judging whether a file package of the applet c is stored in the private directory of the host application 1, if so, executing 503; otherwise 504 is performed.
At 503, the applet c is started by using the package of the applet c stored in the private directory of the host application 1, and the starting process is ended.
In 504, inquiring a shared database of the terminal device, determining whether other host applications of the same host alliance store the file package of the applet c, and if so, executing 505; otherwise, 506 is performed.
In the embodiment of the present invention, a shared database may be set in the terminal device, and the shared database opens read-write permission to all the host applications in the host federation. The shared database maintains the status of the file package of each hosted application storage applet in the terminal device under the hosting federation, including, for example, the package name and version number.
In this step, it is also determined whether other hosted applications of the same hosted federation store the package of the applet c on the one hand, and on the other hand, whether the stored package of the applet c meets the version requirement of the hosted application 1, if both are met, the step is executed 505, otherwise, the step is executed 506. Typically the host application 1 considers the version requirements to be met if the required version is lower than or equal to the version of the applet c stored by the other host application.
In 505, the host application 1 reads the file package of the applet c from the private directories of other host applications, and starts the applet c in the host application 1, and ends the start process.
For example, if the host application 2 stores the package of the applet c already, the host application 1 reads the package of the applet c from the private directory of the host application 2 to start the applet c.
In 506, the host application 1 downloads the package of the applet c from the corresponding server, stores the package in the private directory of the host application 1, and sets the authority of the private directory to be readable by each host application of the host federation.
As a preferred embodiment, in order to ensure the security of the content in the private directory, the authority of the private directory may be set to be readable and unwritable by each host application of the host federation.
At 507, the host application 1 starts the applet c using the downloaded package and records the status of the package storing the applet c in the shared database.
Example III,
Fig. 6 is a flowchart of a method provided by a third embodiment of the present invention, and the third implementation manner is described in this embodiment. Assuming that the user wants to start an applet c in the host application 1, as shown in fig. 6, the method may include the following processes:
in 601, the host application 1 gets the event that applet c starts.
In 602, the host application 1 determines whether the shared storage space of the terminal device stores the package of the applet c, and if so, executes 603; otherwise, 604 is performed.
In this embodiment, a shared storage space is set in the terminal device, and the shared storage space opens read-write permission for each host application in the host federation. The host applications in the host alliance all store the downloaded applet file package in the shared storage space to share in the host alliance range.
In this step, it is also determined whether the shared storage space stores the package of the applet c on the one hand, and whether the stored package of the applet c meets the version requirement of the host application 1 on the other hand, if both are met, 603 is executed, otherwise 604 is executed. Typically the host application 1 considers the version requirements to be met if the version required is lower than or equal to the version of the applet c already stored.
In 603, the host application 1 reads the file package of the applet c from the shared storage space, starts the applet c, and ends the start process.
At 604, the host application 1 downloads the package of the applet c from the corresponding server and stores the package in the shared storage space of the terminal device.
For the host application 1, the higher version of the package of the applet c needs to be downloaded due to the version, and the existing lower version of the package of the applet c in the shared storage space may be retained or deleted.
The form of the shared memory space is not limited in the present invention, and for example, SDCard may be used, and other forms of shared memory space may also be used.
At 605, the host application 1 starts applet c using the downloaded package.
Fig. 7 illustrates a block diagram of an exemplary computer system 012 suitable for use to implement an embodiment of the invention. The computer system 012 shown in fig. 7 is only an example, and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in fig. 7, the computer system 012 is represented in the form of a general purpose computing device. The components of computer system 012 may include, but are not limited to: one or more processors or processing units 016, a system memory 028, and a bus 018 that couples various system components including the system memory 028 and the processing unit 016.
Bus 018 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The computer system 012 typically includes a variety of computer system readable media. These media may be any available media that may be accessed by computer system 012 and includes both volatile and nonvolatile media, removable and non-removable media.
System memory 028 can include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)030 and/or cache memory 032. The computer system 012 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 034 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 7, commonly referred to as a "hard drive"). Although not shown in FIG. 7, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be connected to bus 018 via one or more data media interfaces. System memory 028 can include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the present invention.
Program/utility 040 having a set (at least one) of program modules 042 may be stored, for example, in system memory 028, such program modules 042 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 042 generally perform the functions and/or methodologies of embodiments of the present invention as described herein.
The computer system 012 may also communicate with one or more external devices 014 (e.g., keyboard, pointing device, display 024, etc.), hi the present invention, the computer system 012 communicates with an external radar device, and may also communicate with one or more devices that enable a user to interact with the computer system 012, and/or with any devices (e.g., network card, modem, etc.) that enable the computer system 012 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 022. Also, the computer system 012 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet) via the network adapter 020. As shown, the network adapter 020 communicates with the other modules of the computer system 012 via bus 018. It should be appreciated that although not shown in fig. 7, other hardware and/or software modules may be used in conjunction with the computer system 012, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 016 executes programs stored in the system memory 028, thereby executing various functional applications and data processing, such as implementing the method flow provided by the embodiment of the present invention.
The computer program described above may be provided in a computer storage medium encoded with a computer program that, when executed by one or more computers, causes the one or more computers to perform the method flows and/or apparatus operations shown in the above-described embodiments of the invention. For example, the method flows provided by the embodiments of the invention are executed by one or more processors described above.
With the development of time and technology, the meaning of media is more and more extensive, and the propagation path of computer programs is not limited to tangible media any more, and can also be downloaded from a network directly and the like. Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. 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 (a non-exhaustive list) of the computer readable storage medium would include the following: 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 context of this document, 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.
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 any of a variety of 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, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (15)

1.一种启动小程序的方法,由终端设备的宿主应用执行,其特征在于,该方法包括:1. A method for starting an applet, executed by a host application of a terminal device, characterized in that the method comprises: 获取到触发小程序启动的事件;Get the event that triggers the start of the applet; 确认所述终端设备中本宿主应用和其他宿主应用是否存储有所述小程序的文件包;Confirm whether the host application and other host applications in the terminal device store the file package of the applet; 如果是,则利用所述小程序的文件包启动所述小程序;If yes, then use the file package of the applet to start the applet; 否则,从服务器端下载并存储所述小程序的文件包以启动所述小程序,设置所述小程序的文件包的存储位置其他宿主应用也可读。Otherwise, the file package of the applet is downloaded and stored from the server to start the applet, and the storage location of the file package of the applet is set to be readable by other host applications. 2.根据权利要求1所述的方法,其特征在于,确认所述终端设备中本宿主应用和其他宿主应用是否存储有所述小程序的文件包,包括:确认所述终端设备中与本宿主应用属于同一宿主联盟的各宿主应用,判断确定出的所述各宿主应用是否存储有所述小程序的文件包;2. The method according to claim 1, wherein confirming whether the host application and other host applications in the terminal device store the file package of the applet comprises: confirming that the terminal device is compatible with the host application. Applying each host application belonging to the same host alliance, and judging whether the determined host application stores the file package of the applet; 设置所述小程序的文件包的存储位置其他宿主应用也可读,包括:设置所述小程序的文件包的存储位置对于与本宿主应用属于同一宿主联盟的各宿主应用可读;Setting the storage location of the file package of the applet to be readable by other host applications, including: setting the storage location of the file package of the applet to be readable by each host application belonging to the same host alliance with the host application; 其中,同一宿主联盟中各宿主应用采用相同的小程序标准。Among them, each host application in the same host alliance adopts the same applet standard. 3.根据权利要求2所述的方法,其特征在于,该方法还包括:3. The method according to claim 2, wherein the method further comprises: 从服务器端同步与本宿主应用属于同一宿主联盟的各宿主应用的信息,并确定所述终端设备已经安装的所述宿主联盟的宿主应用信息。Synchronize the information of each host application belonging to the same host alliance with the host application from the server side, and determine the host application information of the host alliance that has been installed on the terminal device. 4.根据权利要求1所述的方法,其特征在于,确认所述终端设备中本宿主应用和其他宿主应用是否存储有所述小程序的文件包,包括:4. The method according to claim 1, wherein confirming whether the host application and other host applications in the terminal device store the file package of the applet, comprising: 判断所述终端设备中是否存在本宿主应用和其他宿主应用存储有所述小程序的文件包且该小程序的文件包符合本宿主应用的版本要求。It is judged whether there is a file package of the applet stored in the host application and other host applications in the terminal device, and the file package of the applet meets the version requirements of the host application. 5.根据权利要求1所述的方法,其特征在于,在所述从服务器端下载并存储所述小程序的文件包之后,该方法还包括:5. The method according to claim 1, wherein after downloading and storing the file package of the applet from the server, the method further comprises: 将本宿主应用存储小程序的文件包的状况上报至服务器端,以便所述终端设备的其他宿主应用从服务器端获取。The status of the file package of the applet stored in the host application is reported to the server side, so that other host applications of the terminal device can obtain from the server side. 6.根据权利要求5所述的方法,其特征在于,该方法还包括:6. The method according to claim 5, wherein the method further comprises: 宿主应用启动后,从服务器端获取所述终端设备中各宿主应用存储小程序的文件包的状况,并存储于本宿主应用的私有数据库;After the host application is started, obtain from the server the status of the file package of each host application storing the applet in the terminal device, and store it in the private database of the host application; 查询所述私有数据库以执行所述确认所述终端设备中是否存在宿主应用存储有所述小程序的文件包的步骤。The private database is queried to perform the step of confirming whether there is a file package of the applet stored in the host application in the terminal device. 7.根据权利要求1所述的方法,其特征在于,在所述从服务器端下载并存储所述小程序的文件包之后,该方法还包括:7. The method according to claim 1, wherein after downloading and storing the file package of the applet from the server, the method further comprises: 将本宿主应用存储所述小程序的文件包的状况同步至所述终端设备中的共享数据库,以便所述终端设备的其他宿主应用从所述共享数据库获取。Synchronizing the state of the file package of the applet stored by the host application to the shared database in the terminal device, so that other host applications of the terminal device can obtain from the shared database. 8.根据权利要求5或7所述的方法,其特征在于,所述小程序的文件包的存储位置为本宿主应用的私有目录下。8. The method according to claim 5 or 7, wherein the storage location of the file package of the applet is under a private directory of the host application. 9.根据权利要求8所述的方法,其特征在于,确认所述终端设备中本宿主应用和其他宿主应用是否存储有所述小程序的文件包,包括:9. The method according to claim 8, wherein confirming whether the host application and other host applications in the terminal device store the file package of the applet, comprising: 先确认本宿主应用的私有目录下是否存在所述小程序的文件包;First confirm whether the file package of the applet exists in the private directory of the host application; 如果不存在,再判断所述终端设备是否存在其他宿主应用存储有所述小程序的文件包,如果是,则从存储有所述小程序的文件包的其他宿主应用的私有目录下读取所述小程序的文件包。If it does not exist, then judge whether the terminal device has other host applications that store the file package of the applet, and if so, read the file package from the private directory of the other host application that stores the file package of the applet. The file package of the applet. 10.根据权利要求1所述的方法,其特征在于,确认所述终端设备中本宿主应用和其他宿主应用是否存储有所述小程序的文件包,包括:判断所述终端设备的共享存储空间是否存储有所述小程序的文件包;10. The method according to claim 1, wherein confirming whether the host application and other host applications in the terminal device store the file package of the applet comprises: judging the shared storage space of the terminal device Whether the file package of the applet is stored; 所述从服务器端下载并存储所述小程序的文件包,包括:从服务器端下载所述小程序的文件包并存储于所述终端设备的共享存储空间。The downloading and storing the file package of the applet from the server includes: downloading the file package of the applet from the server and storing it in the shared storage space of the terminal device. 11.一种启动小程序的方法,由宿主应用对应的服务器端执行,其特征在于,该方法包括:11. A method for starting an applet, executed by a server side corresponding to a host application, characterized in that the method comprises: 接收所述服务器端对应宿主应用上报的所述服务器端对应宿主应用存储小程序的文件包的状况;以及,从其他宿主应用的服务器端同步其他宿主应用存储小程序的文件包的状况;Receive the status of the file package of the applet stored by the server corresponding to the host application reported by the server side corresponding to the host application; and synchronize the status of the file package of the applet stored by other host applications from the server side of other host applications; 对同一终端设备中各宿主应用存储小程序的文件包的状况进行整合;Integrate the status of the file packages of the applet stored by each host application in the same terminal device; 向所述服务器端对应宿主应用同步该服务器端对应宿主应用所在终端设备中各宿主应用存储小程序的文件包的状况,以供所述服务器端对应宿主应用启动小程序使用。Synchronizing the file package status of each host application storing the applet in the terminal device where the server corresponds to the host application is synchronized with the server corresponding to the host application, so as to be used by the server to start the applet corresponding to the host application. 12.根据权利要求11所述的方法,其特征在于,该方法还包括:12. The method of claim 11, further comprising: 向所述服务器端对应宿主应用同步与所述服务器端对应宿主应用属于同一宿主联盟的各宿主应用的信息,其中,同一宿主联盟中各宿主应用采用相同的小程序标准。The information of each host application belonging to the same host alliance as the server-side corresponding host application is synchronized with the server-side corresponding host application, wherein each host application in the same host alliance adopts the same applet standard. 13.根据权利要求11所述的方法,其特征在于,所述对同一终端设备中各宿主应用存储小程序的文件包的状况进行整合包括:13. The method according to claim 11, wherein the integrating the status of the file packages of the mini-programs stored by each host application in the same terminal device comprises: 将本服务器端存储的宿主应用存储小程序的文件包的状况与从其他宿主应用的服务器端同步来的各宿主应用存储小程序的文件包的状况进行针对同一终端设备的合并和去重。The status of the host application storage applet file package stored on the server side and the file package status of each host application storage applet file synchronized from the server side of other host applications are merged and deduplicated for the same terminal device. 14.一种启动小程序的设备,其特征在于,所述设备包括:14. A device for starting an applet, wherein the device comprises: 一个或多个处理器;one or more processors; 存储装置,用于存储一个或多个程序,storage means for storing one or more programs, 当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-13中任一所述的方法。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-13. 15.一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-13中任一所述的方法。15. A storage medium containing computer-executable instructions, when executed by a computer processor, for performing the method of any of claims 1-13.
CN201910676162.XA 2019-07-25 2019-07-25 A method, device and computer storage medium for starting applet Active CN110389935B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910676162.XA CN110389935B (en) 2019-07-25 2019-07-25 A method, device and computer storage medium for starting applet
PCT/CN2020/104097 WO2021013242A1 (en) 2019-07-25 2020-07-24 Method for starting mini program, device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910676162.XA CN110389935B (en) 2019-07-25 2019-07-25 A method, device and computer storage medium for starting applet

Publications (2)

Publication Number Publication Date
CN110389935A CN110389935A (en) 2019-10-29
CN110389935B true CN110389935B (en) 2021-04-16

Family

ID=68287376

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910676162.XA Active CN110389935B (en) 2019-07-25 2019-07-25 A method, device and computer storage medium for starting applet

Country Status (2)

Country Link
CN (1) CN110389935B (en)
WO (1) WO2021013242A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110389935B (en) * 2019-07-25 2021-04-16 上海连尚网络科技有限公司 A method, device and computer storage medium for starting applet
CN110908738B (en) 2019-11-29 2021-03-23 百度在线网络技术(北京)有限公司 Method and device for running small program
CN111475142B (en) * 2020-04-03 2023-04-28 支付宝(杭州)信息技术有限公司 Method, device and equipment for generating small program file package
US11593082B2 (en) * 2020-04-10 2023-02-28 Apple Inc. Registered applications for electronic devices
CN113703857A (en) 2020-05-08 2021-11-26 腾讯科技(深圳)有限公司 Method and device for starting application and computer readable storage medium
CN111767069B (en) * 2020-06-30 2024-03-15 北京百度网讯科技有限公司 Mini program processing methods, servers, equipment and storage media
CN113220367B (en) * 2021-05-12 2024-09-13 北京百度网讯科技有限公司 Mini-program operation method, device, electronic device, and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108595220A (en) * 2018-04-25 2018-09-28 上海掌门科技有限公司 Processing method, equipment and the computer readable storage medium of application component
CN109710333A (en) * 2018-12-28 2019-05-03 上海掌门科技有限公司 Processing method, equipment and the computer readable storage medium of boarding application
CN109933442A (en) * 2019-03-04 2019-06-25 上海连尚网络科技有限公司 Communication method, device and computer storage medium between applet platforms

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7484095B2 (en) * 2003-01-16 2009-01-27 Sun Microsystems, Inc. System for communicating program data between a first device and a second device
CN101729671A (en) * 2009-12-31 2010-06-09 宇龙计算机通信科技(深圳)有限公司 Method for managing backup file, terminal thereof and system thereof
CN104868939A (en) * 2015-06-04 2015-08-26 广东欧珀移动通信有限公司 A Bluetooth-based inter-terminal synchronization method and device
CN110389935B (en) * 2019-07-25 2021-04-16 上海连尚网络科技有限公司 A method, device and computer storage medium for starting applet

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108595220A (en) * 2018-04-25 2018-09-28 上海掌门科技有限公司 Processing method, equipment and the computer readable storage medium of application component
CN109710333A (en) * 2018-12-28 2019-05-03 上海掌门科技有限公司 Processing method, equipment and the computer readable storage medium of boarding application
CN109933442A (en) * 2019-03-04 2019-06-25 上海连尚网络科技有限公司 Communication method, device and computer storage medium between applet platforms

Also Published As

Publication number Publication date
CN110389935A (en) 2019-10-29
WO2021013242A1 (en) 2021-01-28

Similar Documents

Publication Publication Date Title
CN110389935B (en) A method, device and computer storage medium for starting applet
CN110389936B (en) A method, device and computer storage medium for starting applet
CN110377369B (en) Method, device and computer storage medium for running small program
CN110113407B (en) Applet state synchronization method, device and computer storage medium
KR101138491B1 (en) Synchronizat10n methods and systems
KR101212858B1 (en) Synchronizati0n methods and systems
CN110083399B (en) Mini program running method, computer device and storage medium
CN114385091B (en) Method and device for realizing network disk drive character, network disk and storage medium
CN113407165B (en) SDK generation and self-upgrade method, device, readable medium and equipment
CN109597640B (en) Account management method, device, equipment and medium for application program
CN111079125A (en) Method and device for calling third-party library dynamic lifting authority by application program
WO2020143555A1 (en) Method and device used for displaying information
CN109697034B (en) Data writing method and device, electronic equipment and storage medium
CN119166555A (en) Method, device, equipment and storage medium for obtaining device information of access device
CN112835632B (en) A terminal capability calling method, device and computer storage medium
CN114328097A (en) A file monitoring method, device, electronic device and storage medium
CN117093147A (en) Data migration method, device, server and storage medium based on data storage
CN117331576A (en) Application pre-download method, device, computer and storage medium
CN115309415A (en) Application software installation method, device and system and electronic equipment
CN113220371A (en) SDK access method, device, medium and electronic equipment
CN119697171B (en) File download methods, devices, equipment, and storage media
CN111679917B (en) Resource access processing method, device, server and storage medium
CN112732269B (en) Access method and device applied to physical address of AVS2 hardware encoder
CN113778387B (en) Method and device for generating code
CN119441144A (en) Data writing method, device, equipment, storage medium and product

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 200120 2, building 979, Yun Han Road, mud town, Pudong New Area, Shanghai

Patentee after: Shanghai Lianshang Network Technology Group Co.,Ltd.

Country or region after: China

Address before: 200120 2, building 979, Yun Han Road, mud town, Pudong New Area, Shanghai

Patentee before: SHANGHAI LIANSHANG NETWORK TECHNOLOGY Co.,Ltd.

Country or region before: China