A method, device and equipment for using mini program capabilities

By setting a shared path on the system and optimizing the installation package content, the system pressure problem caused by the large amount of data of the applet capability package is solved, and the download success rate and efficient use of the applet are improved.

CN114579216BActive Publication Date: 2025-09-05ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210240521.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-10
Publication Date
2025-09-05
Estimated Expiration
2042-03-10

AI Technical Summary

Technical Problem

In the prior art, the large amount of data of the mini program capability package leads to system download pressure and memory burden, and the download failure rate is high, affecting the efficient use of mini programs.

Method used

By setting a shared path on the system, the first APP downloads the mini-program capability package and stores it, and the second APP directly loads the capability package on the shared path to avoid repeated downloads, and optimizes the installation package content in combination with the mini-program SDK to reduce the amount of data.

Benefits of technology

It improves the download success rate of mini program capability packages, reduces the system's memory and operation pressure, and realizes the efficient use and wide application of mini program capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114579216B_ABST
    Figure CN114579216B_ABST
Patent Text Reader

Abstract

The embodiments of this specification disclose a method, apparatus, and device for using mini-program capabilities. The scheme includes: in response to a mini-program in a first APP requesting to call a preset capability, determining that a capability package corresponding to the preset capability has not been downloaded on the system; the first APP requests a designated server to download the capability package, and stores the downloaded capability package on a shared path designated in the system; the mini-program in the first APP dynamically loads the capability package to call the preset capability; when the mini-program in the second APP requests to call the preset capability, the second APP dynamically loads the capability package through the shared path to call the preset capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of Internet technology, and in particular to a method, device, and equipment for using mini-program capabilities. Background Art

[0002] To reduce the memory and operating pressure on terminal devices, many app manufacturers have designed lightweight applets. These applets can be used alongside existing apps on the terminal device, realizing the various capabilities inherent in the applets themselves.

[0003] However, the more capabilities a mini-program possesses, the larger its corresponding capability package. These large capability packages are all integrated into the app installation package, requiring the system to download a larger app installation package when installing the app, placing significant pressure on system operation and memory. If the mini-program capability package is not integrated into the app installation package, the mini-program on the app will need to download the capability package every time a mini-program function is called during use. Due to network issues, the download may not only be slow, but may also fail. This reduces the success rate of the mini-program capability package download and prevents the mini-program capabilities from being used.

[0004] Based on this, a more efficient way to use mini program capabilities is needed. Summary of the Invention

[0005] One or more embodiments of this specification provide a method, apparatus, device, and storage medium for using mini-program capabilities to solve the following technical problem: a more efficient method for using mini-program capabilities is needed.

[0006] To solve the above technical problems, one or more embodiments of this specification are implemented as follows:

[0007] One or more embodiments of this specification provide a method for using mini-program capabilities, which is applied to a system where a first app and a second app are installed, including:

[0008] In response to a request by a mini-program within the first APP to invoke a preset capability, determining that a capability package corresponding to the preset capability has not been downloaded on the system;

[0009] The first APP requests the designated server to download the capability package, and stores the downloaded capability package in a shared path designated in the system;

[0010] The mini program in the first APP executes the call of the preset capability by dynamically loading the capability package;

[0011] When the mini program in the second APP requests to call the preset capability, the second APP dynamically loads the capability package through the shared path and executes the call to the preset capability.

[0012] One or more embodiments of this specification provide a device for utilizing mini-program capabilities, including:

[0013] a determination module, in response to a request by a mini-program within the first APP to invoke a preset capability, determining that a capability package corresponding to the preset capability has not been downloaded on the system;

[0014] A download module, in which the first APP requests the designated server to download the capability package, and stores the downloaded capability package in a shared path designated in the system;

[0015] An execution module, wherein the mini program in the first APP executes the call of the preset capability by dynamically loading the capability package;

[0016] The execution module, when the mini program in the second APP requests to call the preset capability, the second APP dynamically loads the capability package through the shared path and executes the call of the preset capability.

[0017] One or more embodiments of this specification provide a device for utilizing mini-program capabilities, including:

[0018] at least one processor; and,

[0019] a memory communicatively connected to the at least one processor; wherein,

[0020] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0021] In response to a request by a mini-program within the first app to invoke a preset capability, determining that a capability package corresponding to the preset capability has not been downloaded on the system;

[0022] The first APP requests the designated server to download the capability package, and stores the downloaded capability package in a shared path designated in the system;

[0023] The mini program in the first APP executes the call of the preset capability by dynamically loading the capability package;

[0024] When the mini program in the second APP requests to call the preset capability, the second APP dynamically loads the capability package through the shared path and executes the call to the preset capability.

[0025] One or more embodiments of this specification provide a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to:

[0026] In response to a request by a mini-program within the first app to invoke a preset capability, determining that a capability package corresponding to the preset capability has not been downloaded on the system;

[0027] The first APP requests the designated server to download the capability package, and stores the downloaded capability package in a shared path designated in the system;

[0028] The mini program in the first APP executes the call of the preset capability by dynamically loading the capability package;

[0029] When the mini program in the second APP requests to call the preset capability, the second APP dynamically loads the capability package through the shared path and executes the call to the preset capability.

[0030] At least one of the above technical solutions adopted in one or more embodiments of this specification can achieve the following beneficial effects: when the mini-program on the first APP calls the preset capability, on the system where the first APP is installed, if it is determined that the capability package corresponding to the preset capability has not been downloaded, the first APP will go to the designated server to download the capability package. The designated server here can be the manufacturer server corresponding to the mini-program. In this way, the first APP can use the mini-program capability designed by other manufacturers, and the mini-program capability has also been widely promoted and applied. Furthermore, the first APP stores the downloaded capability package on the shared path specified by the system, so that when the mini-program on the second APP on the system calls the preset capability, the second APP can directly load the capability package through the shared path, thereby sharing the mini-program capability package with the first APP without having to download the capability package again, avoiding the possibility of failure in downloading the mini-program capability package, improving the success rate of downloading the mini-program capability package, and thus realizing the efficient use of the mini-program capability. Moreover, when the system downloads and installs the first and second APPs, what is downloaded are installation packages that integrate the specified content of the first and second APPs, and the specified content is determined by the mini-program SDK and is smaller than the data volume of the mini-program SDK. This reduces the size of the APP installation package downloaded by the system, and reduces the system's memory and operating pressure, while ensuring that the first and second APPs can use the mini-programs. In addition, after the system has installed a third APP and the third APP has authorized the first APP, the mini-program on the first APP does not need to download the capability package when calling the preset capability. Instead, it can directly call up the mini-program in the third APP and execute the call of the mini-program capability, further avoiding the possibility of failure to download the capability package. At the same time, if the first APP has downloaded part of the capability package, the system can perform lightweight processing on the first APP, reducing the data volume of the first APP, and reducing the system's memory and operating pressure while ensuring the normal use of the mini-program. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0032] Figure 1 A flowchart illustrating a method for using mini-program capabilities provided in one or more embodiments of this specification;

[0033] Figure 2 A schematic diagram of a method for using mini-program capabilities in an application scenario provided for one or more embodiments of this specification;

[0034] Figure 3 A schematic diagram of the structure of a device for utilizing mini-program capabilities provided in one or more embodiments of this specification;

[0035] Figure 4 A schematic diagram of the structure of a device that uses mini-program capabilities provided in one or more embodiments of this specification. DETAILED DESCRIPTION

[0036] The embodiments of this specification provide a method, apparatus, device, and storage medium for using mini-program capabilities.

[0037] In order to help those skilled in the art better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0038] Figure 1 A flowchart of a method for using mini-program capabilities provided in one or more embodiments of this specification. This method can be applied to different business areas, such as internet finance, e-commerce, instant messaging, gaming, and official business. The process can be executed by computing devices in the corresponding field (e.g., intelligent customer service servers or intelligent mobile terminals corresponding to payment services). Certain input parameters or intermediate results in the process allow for manual intervention and adjustment to help improve accuracy.

[0039] Figure 1 The process in may include the following steps:

[0040] S102: In response to a request by a mini-program in a first APP to call a preset capability, it is determined that a capability package corresponding to the preset capability has not been downloaded on the system.

[0041] The method for using the mini-program capabilities provided in the embodiments of this specification is mainly used on the operating system of a mobile terminal, such as the IOS system, Android system, etc., and the first APP and the second APP are installed on the system.

[0042] Furthermore, in the embodiments of this specification, the mini-program is hosted on the first app, allowing users to access the mini-program's capabilities within the first app. For example, if short video app A is installed on an Android phone and a map navigation mini-program is hosted within short video app A, the user can directly access the navigation functionality of the map navigation mini-program within short video app A.

[0043] Specifically, the mini-program in the first APP has several functions. When the user needs to use one of the functions, the mini-program is triggered to call the preset capability. The trigger here can be the user clicking the function button. For example, an Android phone user clicks on the map navigation mini-program, enters the homepage of the map navigation mini-program, and clicks the navigation function button, which triggers the map navigation mini-program to call the navigation capability. In response to the above operation of the mini-program calling the preset capability, the system will first determine that the capability package corresponding to the preset capability has not been downloaded in the system. It should be noted that each capability that the mini-program can achieve requires a capability package to support it, that is, each function of the mini-program has a corresponding capability package. Under the condition that the capability package exists in the system, the mini-program in the first APP installed on the system can achieve the preset function.

[0044] Furthermore, in the embodiments of this specification, determining that a capability package corresponding to a preset capability has not been downloaded on the system can be primarily accomplished in the following two ways: Method 1: Accessing a designated shared path on the system to check whether a capability package corresponding to the preset capability exists under the shared path. Method 2: Accessing a server to query the download history of the capability package corresponding to the preset capability.

[0045] During the implementation of method 2, the first APP accesses the server corresponding to the first APP, and the server corresponding to the first APP interacts with the server corresponding to the mini-program manufacturer to obtain the download record of the capability package corresponding to the preset function of the mini-program, and then informs the first APP of the download record.

[0046] S104: The first APP requests a designated server to download the capability package, and stores the downloaded capability package in a shared path designated in the system.

[0047] After determining that the capability package corresponding to the preset function does not exist on the system, the first app requests the designated server to download the aforementioned capability package. The designated server here can be the server corresponding to the mini-program manufacturer, which stores the capability packages corresponding to all the mini-program functions. After receiving the download request from the first app, the designated server queries whether the first app is eligible to download the capability package, for example, whether the first app has obtained authorization from the mini-program manufacturer, or whether there is a mini-program framework within the first app. If so, the capability package corresponding to the preset function is allowed to be downloaded to the first app.

[0048] Furthermore, after the first APP downloads the capability package corresponding to the preset function, it stores the capability package on a shared path specified by the system. The shared path here can be accessed not only by the first APP, but also by other APPs on the system that have the above-mentioned mini-programs.

[0049] S106: The mini program in the first APP executes the call of the preset capability by dynamically loading the capability package.

[0050] After the first APP downloads the capability package corresponding to the preset function, the capability package exists on the system. At this time, the mini program in the first APP can load the above capability package through dynamic loading to realize the call of the preset function.

[0051] In the embodiments of this specification, the dynamic loading method means that all capability packages corresponding to all functions within the mini-program are not downloaded to the system at once, but based on the called capability, the capability package corresponding to the called capability is selected for download. That is, the first APP will request the designated server to download the capability package corresponding to the capability called by the mini-program in the first APP, thereby avoiding the technical problem of the first APP installation package being too large. For example, the map navigation mini-program on the short video software A has a taxi function and a navigation function. When the user installs the short video software A, he only installs the overall framework of the map navigation mini-program, but does not install the taxi capability package and navigation capability package of the map navigation mini-program. When the user uses the taxi function of the map navigation mini-program, he only downloads the taxi capability package, and does not download the navigation capability package.

[0052] S108: When the mini program in the second APP requests to call the preset capability, the second APP dynamically loads the capability package through the shared path and executes the call to the preset capability.

[0053] If a mini program is also installed in the second APP on the system, when the mini program in the second APP calls the preset function, the second APP can directly access the system's shared path to load the capability package corresponding to the preset function that the first APP has downloaded, without having to download the capability package again. It can directly execute the call of the mini program's preset function.

[0054] based on Figure 1 This specification also provides some specific implementation plans and extension plans of the method, which will be described below.

[0055] In one or more embodiments of this specification, before using the mini-program capabilities on the first APP, the first APP will first be installed on the system. If the installation package of the first APP that integrates all the capability packages of the mini-program is downloaded, it will not only bring greater download pressure to the system, but also cannot guarantee the success rate of downloading the installation package. In order to avoid the above problems and to reduce the memory and operation pressure of the system, in the embodiments of this specification, the specified content determined by the mini-program software development kit (Software Development Kit, SDK) is integrated into the installation package of the first APP. The system completes the installation of the first APP with the mini-program by downloading and executing the above-mentioned installation package that integrates the specified content. It should be noted that the mini-program SDK is used to provide mini-programs with a variety of capabilities including the above-mentioned preset capabilities.

[0056] Furthermore, the designated server in the embodiment of this specification is the server corresponding to the third APP, the third APP and the mini program belong to the same manufacturer, and the third APP is the original APP hosted by the mini program. The designated server can provide the above-mentioned mini program SDK, and the data volume of the designated content determined by the mini program SDK is less than the original data volume of the mini program SDK, thereby solving the technical problem that the installation package is too large when the system installs the first APP. In the embodiment of this specification, the above-mentioned designated content can be the overall framework of the mini program, which does not include any capability package. The overall framework is used to indicate all the capabilities of the mini program, so that users can know the functions of the mini program. It can also be integrated content that includes at least part of the capability package and the mini program framework. At least part of the capability package included here can be a capability package corresponding to a capability that is most commonly used by the mini program, such as the map capability package corresponding to the map function in the map navigation mini program.

[0057] Furthermore, after the system completes the installation of the first APP, based on the specified content integrated in the first APP installation package, the user can see the mini program in the first APP and interact with the mini program. By clicking the mini program icon to enter the mini program interface, the user can see all the capabilities of the mini program. In addition, the function buttons corresponding to the mini program capabilities can also be clicked. If the user clicks the function button corresponding to a certain mini program capability, it will trigger the mini program to call the function.

[0058] In one or more embodiments of this specification, in order for the second APP and the first APP to share the mini-program capability package, it is necessary to satisfy that the mini-program in the first APP and the mini-program in the second APP are the same mini-program. Similarly, before the second APP calls the preset function of the mini-program, the system also needs to install the second APP. In order to avoid the system downloading the installation package of the second APP with too much data, the system will first obtain the installation package of the second APP that integrates the specified content. It should be noted that since the mini-program in the second APP is the same mini-program as the mini-program in the first APP, the specified content integrated in the second APP installation package is the same or similar to the specified content integrated in the first APP installation package, and both include at least the content of the overall framework of the mini-program. The embodiments of this specification will not be repeated here.

[0059] Furthermore, the system executes the installation package of the second APP that integrates the specified content, completing the installation of the second APP. In the second APP, the mini program is also in a state that is visible and interactive to the user.

[0060] By integrating designated content related to the mini-program into the installation packages of the first APP and the second APP, while ensuring that users can call the mini-program functions within the first APP and the second APP, the data volume of the installation packages of the first APP and the second APP is reduced, solving the technical problem of the system encountering too large installation packages when installing the first APP and the second APP.

[0061] In one or more embodiments of the present specification, there will be multiple versions of the mini-program capability package during design and development. If the mini-program capability package on the system's shared path is not a version-compatible capability package, then the mini-program in the first APP or the mini-program in the second APP will not be able to use the system's existing capability package when calling the preset function. Therefore, in order to ensure that all APPs with mini-programs can use the mini-program capability package on the shared path, it is required that the mini-program capability package on the shared path is a version-compatible capability package. Therefore, when the first APP determines that the capability package corresponding to the preset function has not been downloaded, if the first APP accesses the shared path, then the first APP determines that the compatible version of the capability package has not been downloaded.

[0062] Furthermore, because the first APP is the first APP on the system to use the preset function of the mini-program, there is no mini-program capability package on the system at this time, and there is no problem of determining whether the mini-program capability package version is compatible. When the mini-program on the second APP uses the preset function again, the mini-program capability package downloaded by the first APP already exists on the system's shared path. At this time, the second APP needs to determine whether the version of the downloaded capability package is compatible, that is, whether the capability package downloaded on the system's shared path can be used. Therefore, if the mini-program in the second APP needs to call the preset function, the second APP, as the non-first APP to call the preset function of the mini-program, will first determine whether the capability package corresponding to the preset function is downloaded through the shared path. If so, it will continue to determine whether the version of the capability package downloaded on the shared path is compatible, that is, the second APP determines whether it can use the capability package downloaded by the first APP. If the versions are compatible, the capability package is dynamically loaded to call the preset function of the mini-program. If the versions are incompatible, a capability package with a compatible version is downloaded from the designated server.

[0063] In one or more embodiments of the present specification, after the second APP requests the designated server to download the mini-program capability package corresponding to the preset function, the downloaded mini-program capability package is stored on the shared path of the system so that the downloaded capability package can be used by other APPs with mini-programs on the system.

[0064] Furthermore, if there are two or more mini-program capability packages corresponding to preset functions on the system's shared path, when the mini-program on the APP calls the preset function, an error will occur in calling the mini-program capability package and the preset function call will fail. To avoid this problem, after the second APP stores the mini-program capability package with a compatible version to the shared path, the system will delete the other mini-program capability packages corresponding to the preset function and only retain the most recently stored mini-program capability package with a compatible version. This not only enables the sharing of mini-program capability packages, but also ensures the success rate of mini-program capability package sharing.

[0065] In one or more embodiments of this specification, a third app serves as the original hosting app for a mini-program. The mini-program SDK is integrated into the third app's installation package, meaning that the capability packages corresponding to all mini-program functions are integrated into the third app's installation package. If the third app is also installed on the system, all the capability packages for the mini-program will be present on the system. Therefore, when the mini-program within the first or second app calls a preset function, it does not need to download the capability package again, but can be directly implemented through the third app.

[0066] Specifically, when the mini program on the first APP calls a preset function, it determines that the capability package corresponding to the preset function has not been downloaded. First, it determines that the capability package has not been downloaded by accessing the shared path, and second, it accesses other paths of the system to check whether the mini program capability package exists. When a third APP is installed in the system, when the first APP accesses other paths of the system, it will find that the mini program capability package corresponding to the preset function already exists on the system. At this time, if the first APP wants to use the capability package under the current path, it needs to determine whether it is eligible to use it, that is, the first APP determines whether it has obtained authorization from the third APP. If so, the first APP can implement the preset function of the mini program by calling the mini program capability package under the current path.

[0067] Furthermore, the first APP has the qualification to call the mini-program capability package on the current path, but the first APP calling the mini-program capability package on the current path will bring greater operating pressure to the system, increase the system's operating memory, and cannot guarantee the success rate of the mini-program capability package call. At this time, the first APP can synchronize the business status of its own mini-program to the mini-program in the third APP by calling the mini-program in the third APP, for example, informing the mini-program in the third APP of the function currently called by the mini-program. The mini-program in the third APP will then call the mini-program capability package under the current path and execute the call of the preset function. This reduces the operating pressure of the system and ensures the success rate of the mini-program capability package call. At the same time, through the above method, no matter which function the mini-program in the first APP calls, it can be implemented by calling the mini-program in the third APP, realizing the efficient use of the mini-program capability, and avoiding the first APP to download the mini-program capability package again, thereby improving the download success rate of the mini-program capability package.

[0068] In one or more embodiments of this specification, when a third APP is installed in the system, in order to reduce the operation and memory pressure of the system, if the third APP detects that part of the capability package of the mini program SDK has been loaded in the first APP, the first APP is lightweighted. Specifically, at least part of the capability package loaded in the first APP is deleted, or part of the capability package loaded in the first APP is slimmed down and part of the data volume of the capability package is deleted. By lightweighting the first APP, the data volume of the first APP is reduced, thereby reducing the operation and memory pressure of the system.

[0069] Furthermore, some capability packages within the first APP are lightweighted, but it is necessary to ensure that the mini-programs within the first APP are still visible and interactive to users, so as to enable the calling of mini-program functions within the first APP and increase the promotion and application scope of the mini-programs.

[0070] In one or more embodiments of this specification, the method for calling a preset function of a mini-program within a first app or a mini-program within a second app includes any one or more of a JSAPI calling method and a component calling method. This is because the mini-program capability package in the embodiments of this specification is a compressed package that provides a set of native code and resources for the mini-program JSAPI capabilities or component capabilities, and the method for calling the mini-program preset function corresponds to the mini-program capability package.

[0071] In one or more embodiments of the present specification, in order to avoid the first APP or the second APP requesting to download the mini-program capability package and to improve the success rate of loading the mini-program capability package, a fourth APP can be installed on the system. The fourth APP is the APP corresponding to the mini-program on the first APP and the second APP. When the mini-program in the first APP calls the preset capability, it directly accesses the storage path corresponding to the installation package of the fourth APP, loads the mini-program capability package corresponding to the preset function, and executes the call of the preset function of the mini-program. Similarly, when the mini-program in the second APP calls the preset function, it can also directly access the storage path corresponding to the installation package of the fourth APP, load the mini-program capability package corresponding to the preset function, and execute the call of the preset function. In this way, no matter which mini-program function the first APP and the second APP call, there is no need to download the mini-program capability package, and it can be directly loaded on the system.

[0072] In addition, in this embodiment, when the first APP and the second APP are installed, the installation package obtained by the system may not integrate any content related to the mini-program, but only download the installation packages of the first APP and the second APP, solving the problem of the installation package being too large during the APP download process. In the process of the user using the fourth APP, a pop-up window is used to ask the user whether the mini-program corresponding to the fourth APP needs to be loaded, and the user is allowed to select the APP (first APP or second APP) to load the mini-program. Based on the user's choice, the mini-program is loaded in the first APP or the second APP, so that the user can use the functions of the mini-program in the first APP or the second APP. It should be noted that in the above process, the fourth APP authorizes the first APP or the second APP to allow the mini-program in the first APP or the second APP to access the installation package of the fourth APP during use, supporting the execution of preset functions. In addition, after obtaining the authorization of the fourth APP, the first APP or the second APP presents the overall framework of the mini-program in the first APP or the second APP.

[0073] For example, the first APP is short video software A, the second APP is short video software B, and the fourth APP is map navigation software. After the system installs the above three APPs, when the user uses short video software A or short video software B, he chooses to install the map navigation applet on short video software A or short video software B according to the pop-up prompt. At this time, the installed map navigation applet is only the overall framework of the applet, and the overall framework of the applet here is provided by the map navigation software installation package. In this way, when the user needs to use the map navigation software, he can directly use the map navigation applet on short video software A or short video software B without having to open the map navigation software. In addition, when the user needs to use the taxi function of the map navigation applet, there is no need for short video software A to request to download the taxi capability package, but to directly access the installation package of the map navigation software and call the corresponding capability package to realize the taxi function.

[0074] In the above example, the map navigation software only takes up some system memory and does not impose additional operating pressure on the system. This is because when a user calls the map navigation mini-program function on short video software A or short video software B, they do not need to open the map navigation software, and the system does not need to allocate operating resources to the map navigation software. They only need to access the map navigation software installation package. In this process, the successful call of the map navigation mini-program function is supported by the map navigation software installation package, and there is no need for short video software A or short video software B to request to download the mini-program capability package.

[0075] According to the previous description, more intuitively, combined with Figure 2 The solution is described in more detail in an application scenario. In this application scenario, the preset function called by the mini program is a map function (assuming that it is a function of calling an electronic map).

[0076] Figure 2 A schematic diagram of a method for using mini-program capabilities in an application scenario provided for one or more embodiments of this specification.

[0077] like Figure 2 As shown, the mini program calls the map capability through the JSAPI or component method. The system determines whether the map capability package corresponding to the map capability has been downloaded. If so, it continues to determine whether the versions are compatible. If the map capability package has been downloaded and the versions are compatible, it dynamically loads the map capability package and executes the map function call.

[0078] Furthermore, if the system determines that the mini-program's map capability package has not been downloaded, it will request a compatible version of the map capability package from a designated server and store the downloaded map capability package and its package information in a shared directory for easy access by mini-programs in other apps. After storing the package in the shared directory, the map capability package is dynamically loaded to invoke the mini-program's map function.

[0079] Based on the same idea, one or more embodiments of this specification also provide devices and apparatuses corresponding to the above methods, such as Figure 3 、 Figure 4 shown.

[0080] Figure 3 A schematic diagram of a device for utilizing mini-program capabilities provided in one or more embodiments of this specification, the device comprising:

[0081] Determining module 302, in response to a request by a mini-program within the first app to invoke a preset capability, determining that a capability package corresponding to the preset capability has not been downloaded on the system;

[0082] Download module 304, the first APP requests the designated server to download the capability package, and stores the downloaded capability package in a designated shared path in the system;

[0083] Execution module 306: The mini program in the first APP dynamically loads the capability package to execute the call of the preset capability;

[0084] The execution module 306, when the mini program in the second APP requests to call the preset capability, the second APP dynamically loads the capability package through the shared path and executes the call of the preset capability.

[0085] Optionally, the designated server belongs to a server of a third APP, and the designated server can provide an SDK corresponding to the mini program, where the SDK is used to provide multiple capabilities including the preset capabilities;

[0086] The device further comprises:

[0087] An acquisition module 308 acquires an installation package of the first APP that integrates specified content, where the specified content is determined according to the SDK and has a smaller data size than the SDK, and the specified content at least does not include a capability package corresponding to the preset capability;

[0088] The installation module 310 installs the first APP by executing the installation package, so that the mini program is visible and interactive to the user within the first APP on the system.

[0089] Optionally, the mini program in the first APP and the mini program in the second APP are the same mini program;

[0090] The acquisition module 308 acquires the installation package of the second APP that integrates the specified content;

[0091] The installation module 310 installs the second APP by executing the installation package, so that the mini program is visible and interactive to the user within the second APP on the system.

[0092] Optionally, the determining that a capability package corresponding to the preset capability has not been downloaded on the system specifically includes:

[0093] Determining that a capability package with a compatible version corresponding to the preset capability has not been downloaded on the system;

[0094] The second APP dynamically loads the capability package through the shared path, specifically including:

[0095] The second APP determines whether the capability package has been downloaded through the shared path;

[0096] If it has been downloaded, determining whether the downloaded capability package is compatible with the version;

[0097] If the versions are compatible, the capability package is dynamically loaded; otherwise, the capability package with the compatible version is downloaded from the designated server and dynamically loaded.

[0098] Optionally, the device further comprises:

[0099] The storage module 312 stores the second APP in the shared path.

[0100] Optionally, the third APP is installed on the system;

[0101] If it is determined that the capability package corresponding to the preset capability has not been downloaded on the shared path in the system, the apparatus further includes:

[0102] Determination module 314, the first APP determines whether it has obtained authorization from the third APP;

[0103] If so, the mini program in the third APP is invoked, and the business status of the mini program in the first APP is synchronized to the invoked mini program, and the call to the preset capability is executed through the invoked mini program.

[0104] Optionally, the device further comprises:

[0105] Detection module 316, the third APP detects whether at least part of the capability package included in the SDK has been loaded into the first APP;

[0106] If so, the capability package of the first APP is lightweighted according to at least part of the capability package, and the mini program is still visible and interactive to the user in the first APP after lightweight processing.

[0107] Optionally, the calling method includes any one or more of a jsapi calling method and a component calling method.

[0108] Figure 4 A schematic diagram of a device for utilizing mini-program capabilities provided in one or more embodiments of this specification, the device comprising:

[0109] at least one processor; and,

[0110] a memory communicatively connected to the at least one processor; wherein,

[0111] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0112] In response to a request by a mini-program within the first app to invoke a preset capability, determining that a capability package corresponding to the preset capability has not been downloaded on the system;

[0113] The first APP requests the designated server to download the capability package, and stores the downloaded capability package in a shared path designated in the system;

[0114] The mini program in the first APP executes the call of the preset capability by dynamically loading the capability package;

[0115] When the mini program in the second APP requests to call the preset capability, the second APP dynamically loads the capability package through the shared path and executes the call to the preset capability.

[0116] Based on the same idea, one or more embodiments of this specification further provide a non-volatile computer storage medium corresponding to the above method, storing computer-executable instructions, wherein the computer-executable instructions are configured to:

[0117] In response to a request by a mini-program within the first app to invoke a preset capability, determining that a capability package corresponding to the preset capability has not been downloaded on the system;

[0118] The first APP requests the designated server to download the capability package, and stores the downloaded capability package in a shared path designated in the system;

[0119] The mini program in the first APP executes the call of the preset capability by dynamically loading the capability package;

[0120] When the mini program in the second APP requests to call the preset capability, the second APP dynamically loads the capability package through the shared path and executes the call to the preset capability.

[0121] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD through their own programming, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages ​​and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.

[0122] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the means for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the means for implementing various functions can be considered as both a software module implementing the method and a structure within the hardware component.

[0123] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0124] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0125] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0126] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0127] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0129] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0130] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0131] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0132] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0133] This specification may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.

[0134] The various embodiments in this specification are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the device, apparatus, and non-volatile computer storage medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simplified. For relevant details, refer to the descriptions of the method embodiments.

[0135] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0136] The foregoing description is merely one or more embodiments of this specification and is not intended to limit this specification. It will be apparent to those skilled in the art that various modifications and variations may be made to one or more embodiments of this specification. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of one or more embodiments of this specification are intended to be within the scope of the claims of this specification.

Claims

1. A method for using mini-program capabilities, applied to a system where a first app and a second app are installed, the method comprising: In response to a request by a mini-program within the first APP to invoke a preset capability, determining that a capability package corresponding to the preset capability has not been downloaded on the system; The first APP requests the designated server to download the capability package, and stores the downloaded capability package in a shared path designated in the system; The mini program in the first APP executes the call of the preset capability by dynamically loading the capability package; When the mini program in the second APP requests to call the preset capability, the second APP dynamically loads the capability package through the shared path and executes the call of the preset capability; The designated server belongs to the server of the third APP, and the designated server can provide the SDK corresponding to the mini program, and the SDK is used to provide multiple capabilities including the preset capabilities; Before responding to the mini-program request within the first APP to call the preset capability, the method further includes: Obtaining an installation package of the first APP that integrates specified content, where the specified content is determined according to the SDK and has a smaller data volume than the SDK, and the specified content at least does not include a capability package corresponding to the preset capability; Installing the first APP by executing the installation package so that the mini-program is visible and interactive to the user within the first APP on the system; The third APP is installed on the system; If it is determined that the capability package corresponding to the preset capability has not been downloaded on the shared path in the system, the method further includes: The first APP determines whether it has obtained authorization from the third APP; If so, waving up the mini program in the third APP, synchronizing the service status of the mini program in the first APP to the waving mini program, and executing the call of the preset capability through the waving mini program; The method further comprises: The third APP detects whether at least part of the capability package included in the SDK has been loaded into the first APP; If so, the capability package of the first APP is lightweighted according to at least part of the capability package, and the mini program is still visible and interactive to the user in the first APP after lightweight processing.

2. The method according to claim 1, wherein the mini-program in the first app and the mini-program in the second app are the same mini-program; Before the mini program in the second APP requests to call the preset capability, the method further includes: Obtaining an installation package of the second APP that integrates the specified content; The second APP is installed by executing the installation package, so that within the second APP on the system, the mini program is visible and interactive to the user.

3. The method according to claim 1, wherein determining that the capability package corresponding to the preset capability has not been downloaded on the system specifically comprises: Determining that a capability package with a compatible version corresponding to the preset capability has not been downloaded on the system; The second APP dynamically loads the capability package through the shared path, specifically including: The second APP determines whether the capability package has been downloaded through the shared path; If it has been downloaded, determining whether the downloaded capability package is compatible with the version; If the versions are compatible, the capability package is dynamically loaded; otherwise, the capability package with the compatible version is downloaded from the designated server and dynamically loaded.

4. The method according to claim 3, after downloading the version-compatible capability package from the designated server, the method further comprises: The second APP stores the version-compatible capability package on the shared path.

5. The method according to any one of claims 1 to 4, wherein the calling method includes any one or more of a jsapi calling method and a component calling method.

6. A device for using mini-program capabilities, comprising: a determination module, in response to a request by a mini-program within the first APP to invoke a preset capability, determining that a capability package corresponding to the preset capability has not been downloaded on the system; A download module, in which the first APP requests the designated server to download the capability package, and stores the downloaded capability package in a shared path designated in the system; An execution module, wherein the mini program in the first APP executes the call of the preset capability by dynamically loading the capability package; The execution module is configured to dynamically load the capability package through the shared path and execute the call of the preset capability when the mini program in the second APP requests to call the preset capability; The designated server belongs to the server of the third APP, and the designated server can provide the SDK corresponding to the mini program, and the SDK is used to provide multiple capabilities including the preset capabilities; The device further comprises: an acquisition module, configured to acquire an installation package of the first APP that integrates specified content, wherein the specified content is determined according to the SDK and has a smaller data volume than the SDK, and the specified content at least does not include a capability package corresponding to the preset capability; An installation module, which installs the first APP by executing the installation package, so that the mini program is visible and interactive to the user within the first APP on the system; The third APP is installed on the system; If it is determined that the capability package corresponding to the preset capability has not been downloaded on the shared path in the system, the apparatus further includes: A judgment module, wherein the first APP judges whether it has obtained authorization from the third APP; If so, waving up the mini program in the third APP, synchronizing the service status of the mini program in the first APP to the waving mini program, and executing the call of the preset capability through the waving mini program; Also includes: A detection module, wherein the third APP detects whether at least part of the capability package included in the SDK has been loaded into the first APP; If so, the capability package of the first APP is lightweighted according to at least part of the capability package, and the mini program is still visible and interactive to the user in the first APP after lightweight processing.

7. The device of claim 6, wherein the mini-program in the first APP and the mini-program in the second APP are the same mini-program; The acquisition module acquires the installation package of the second APP that integrates the specified content; The installation module installs the second APP by executing the installation package, so that the mini program is visible and interactive to the user within the second APP on the system.

8. The apparatus of claim 6, wherein determining that the capability package corresponding to the preset capability has not been downloaded on the system specifically comprises: Determining that a capability package with a compatible version corresponding to the preset capability has not been downloaded on the system; The second APP dynamically loads the capability package through the shared path, specifically including: The second APP determines whether the capability package has been downloaded through the shared path; If it has been downloaded, determining whether the downloaded capability package is compatible with the version; If the versions are compatible, the capability package is dynamically loaded; otherwise, the capability package with the compatible version is downloaded from the designated server and dynamically loaded.

9. The apparatus of claim 8, further comprising: The storage module stores the version-compatible capability package on the shared path.

10. The device according to any one of claims 6 to 9, wherein the calling method comprises any one or more of a jsapi calling method and a component calling method.

11. A device for utilizing mini-program capabilities, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: In response to a request by a mini-program within the first app to invoke a preset capability, determining that a capability package corresponding to the preset capability has not been downloaded on the system; The first APP requests the designated server to download the capability package, and stores the downloaded capability package in a shared path designated in the system; The mini program in the first APP executes the call of the preset capability by dynamically loading the capability package; When the mini program in the second APP requests to call the preset capability, the second APP dynamically loads the capability package through the shared path and executes the call of the preset capability; The designated server belongs to the server of the third APP, and the designated server can provide the SDK corresponding to the mini program, and the SDK is used to provide multiple capabilities including the preset capabilities; Before the operation of calling the preset capability in response to the mini-program request in the first APP, the method further includes: Obtaining an installation package of the first APP that integrates specified content, where the specified content is determined according to the SDK and has a smaller data volume than the SDK, and the specified content at least does not include a capability package corresponding to the preset capability; Installing the first APP by executing the installation package so that the mini-program is visible and interactive to the user within the first APP on the system; The third APP is installed on the system; If it is determined that the capability package corresponding to the preset capability has not been downloaded on the shared path in the system, the method further includes: The first APP determines whether it has obtained authorization from the third APP; If so, waving up the mini program in the third APP, synchronizing the service status of the mini program in the first APP to the waving mini program, and executing the call of the preset capability through the waving mini program; Also includes: The third APP detects whether at least part of the capability package included in the SDK has been loaded into the first APP; If so, the capability package of the first APP is lightweighted according to at least part of the capability package, and the mini program is still visible and interactive to the user in the first APP after lightweight processing.

Citation Information

Patent Citations

  • Plug-in configuration method and related equipment

    CN112286586A

  • Data processing method and device, and mobile terminal

    CN113168332A

  • Applet delivery method, device and apparatus

    CN113312055A

  • Method for realizing Java small-application plug board function

    CN1641569A