CN114579216A - Applet capacity using method, device and equipment - Google Patents

Applet capacity using method, device and equipment Download PDF

Info

Publication number
CN114579216A
CN114579216A CN202210240521.9A CN202210240521A CN114579216A CN 114579216 A CN114579216 A CN 114579216A CN 202210240521 A CN202210240521 A CN 202210240521A CN 114579216 A CN114579216 A CN 114579216A
Authority
CN
China
Prior art keywords
app
capability
applet
package
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210240521.9A
Other languages
Chinese (zh)
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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202210240521.9A priority Critical patent/CN114579216A/en
Publication of CN114579216A publication Critical patent/CN114579216A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Landscapes

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

Abstract

The embodiment of the specification discloses a method, a device and equipment for using applet capacity. The scheme comprises the following steps: responding to an operation that an applet in a first APP requests to call a preset capability, and determining that a capability packet corresponding to the preset capability is not downloaded on a system; the first APP requests a designated server to download the capability package, and stores the downloaded capability package to a designated sharing path in the system; the applet in the first APP executes calling on the preset capability by dynamically loading the capability package; and when the applet 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.

Description

Applet capacity using method, device and equipment
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method, an apparatus, and a device for using applet capabilities.
Background
In order to reduce the memory and operating pressure of the terminal device, many APP manufacturers have designed lighter applets. The small programs can depend on various large APPs downloaded by the terminal equipment, and various capabilities of the small programs are realized.
However, the more the applet has, the larger the corresponding capability package is, and the capability packages with the larger data amount are all integrated on the APP installation package, so that when the system installs the APP, the APP installation package with the larger data amount needs to be downloaded, and great pressure is brought to the operation and the memory of the system. If the applet capability package is not integrated on the APP installation package, the applet on the APP needs to be downloaded once when the applet function is called once in the use process, the downloading is likely to be slow due to network reasons and is also likely to fail, so that the success rate of downloading the applet capability package is reduced, and the applet capability cannot be used.
Based on this, a more efficient method of using the small program capacity is needed.
Disclosure of Invention
One or more embodiments of the present specification provide an applet capacity using method, apparatus, device and storage medium, to solve the following technical problems: there is a need for a more efficient method of using the capabilities of applets.
To solve the above technical problem, one or more embodiments of the present specification are implemented as follows:
one or more embodiments of the present specification provide a method for using applet capability, which is applied to a system in which a first APP and a second APP are installed, and includes:
responding to an operation that an applet in the first APP requests to call a preset capability, and determining that a capability package corresponding to the preset capability is not downloaded on the system;
the first APP requests a designated server to download the capability package, and stores the downloaded capability package to a designated sharing path in the system;
the applet in the first APP executes calling on the preset capability through dynamically loading the capability package;
and when the applet 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.
One or more embodiments of the present specification provide an applet capacity using apparatus, including:
the determining module is used for responding to an operation that an applet in a first APP requests to call a preset capability, and determining that a capability package corresponding to the preset capability is not downloaded on a system;
the first APP requests a designated server to download the capability package, and stores the downloaded capability package to a designated sharing path in the system;
the execution module is used for executing calling of the preset capability by dynamically loading the capability package by the small program in the first APP;
and the execution module dynamically loads the capability package through the shared path by the second APP when the applet in the second APP requests to call the preset capability, and executes the call of the preset capability.
One or more embodiments of the present specification provide an applet capacity usage device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
responding to an operation that an applet in a first APP requests to call a preset capability, and determining that a capability package corresponding to the preset capability is not downloaded on a system;
the first APP requests a designated server to download the capability package, and stores the downloaded capability package to a designated sharing path in the system;
the applet in the first APP executes calling on the preset capability through dynamically loading the capability package;
and when the applet 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.
One or more embodiments of the present specification provide a non-transitory computer storage medium storing computer-executable instructions configured to:
responding to an operation that an applet in a first APP requests to call a preset capability, and determining that a capability package corresponding to the preset capability is not downloaded on a system;
the first APP requests a designated server to download the capability package, and stores the downloaded capability package to a designated sharing path in the system;
the applet in the first APP executes calling on the preset capability through dynamically loading the capability package;
and when the applet 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.
At least one technical scheme adopted by one or more embodiments of the specification can achieve the following beneficial effects: when the applet on the first APP calls the preset capability, on a system installed by the first APP, under the condition that the capability package corresponding to the preset capability is determined not to be downloaded, the first APP downloads the capability package to the specified server, the specified server can be a manufacturer server corresponding to the applet, therefore, the applet capability designed by other manufacturers is realized by the first APP, and the applet capability is widely popularized and applied. Moreover, the first APP stores the downloaded capability package to a sharing path appointed by the system, so that when the applet on the second APP on the system calls the preset capability, the second APP can directly load the capability package through the sharing path, the applet capability package is shared with the first APP, the capability package does not need to be downloaded again, the possibility of downloading failure of the applet capability package is avoided, the success rate of downloading the applet capability package is improved, and efficient use of the applet capability is realized. Moreover, when the system downloads and installs the first APP and the second APP, the first APP and the second APP are downloaded to integrate the installation package of the specified content, and the specified content is determined by the applet SDK and is smaller than the data volume of the applet SDK, so that the size of the system for downloading the APP installation package is reduced on the premise that the first APP and the second APP can use the applet, and the memory and the operating pressure of the system are reduced. In addition, after the system is provided with the third APP and the third APP gives authorization to the first APP, when the applet on the first APP calls the preset capability, the applet in the third APP can be directly called to execute the calling of the applet capability without downloading the capability package, so that the possibility of failure in downloading the capability package is further avoided; meanwhile, if the first APP downloads part of the capability packages, the system can carry out lightweight processing on the first APP, the data volume of the first APP is reduced, and the pressure of system memory and operation is reduced on the premise of ensuring normal use of the small program.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the description below are only some embodiments described in the present specification, and for those skilled in the art, other drawings may be obtained according to these drawings without creative efforts.
FIG. 1 is a flow diagram illustrating a method for using applet capabilities in accordance with one or more embodiments of the present disclosure;
FIG. 2 is a schematic diagram of an applet capacity usage method in an application scenario according to one or more embodiments of the present disclosure;
FIG. 3 is a schematic diagram of an applet capability using apparatus according to one or more embodiments of the present disclosure;
fig. 4 is a schematic structural diagram of an applet capability using device according to one or more embodiments of the present disclosure.
Detailed Description
The embodiment of the specification provides a small program capacity using method, a small program capacity using device and a storage medium.
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present application.
Fig. 1 is a flowchart illustrating a method for using applet capabilities according to one or more embodiments of the present disclosure. The method can be applied to different business fields, such as the field of internet financial business, the field of electric business, the field of instant messaging business, the field of game business, the field of official business and the like. The process can be executed by computing equipment in the corresponding field (such as an intelligent customer service server or an intelligent mobile terminal corresponding to the payment service, and the like), and certain input parameters or intermediate results in the process allow manual intervention and adjustment to help improve the accuracy.
The process in fig. 1 may include the following steps:
s102: and responding to the operation that the applet in the first APP requests to call the preset capability, and determining that the capability package corresponding to the preset capability is not downloaded on the system.
The applet capacity using method provided in the embodiment of the present specification is mainly applied to an operating system of a mobile terminal, such as an IOS system, an android system, and the system is provided with a first APP and a second APP.
Further, the applet in the embodiment of the present specification is registered on the first APP, so that the user can use the capability of the applet in the first APP. For example, a short video software a is installed on an android phone, and a map navigation applet is registered in the short video software a, so that a user can directly use a navigation function of the map navigation applet in the short video software a.
Specifically, the applet in the first APP has several functions, and when a user needs to use one of the functions, the applet is triggered to call the preset capability, where the triggering may be that the user clicks a function button, for example, an android phone user clicks a map navigation applet, and after entering a home page of the map navigation applet, the navigation function button is clicked, that is, the map navigation applet is triggered to call the navigation capability. In response to the applet invoking the predetermined capability, the system first determines that the capability package corresponding to the predetermined capability is not downloaded. It should be noted that each capability that the applet can implement needs to be supported by a capability package, that is, each function of the applet has a corresponding capability package, and under the condition that the capability package exists in the system, the applet installed in the first APP on the system can implement the preset function.
Further, in the embodiment of the present specification, it is determined that, on a system, a capability package corresponding to a preset capability has not been downloaded, and the method may be implemented mainly in the following two ways: and in the first mode, a specified shared path on the system is accessed, and whether a capability packet corresponding to the preset capability exists or not is checked under the shared path. And secondly, accessing the server and inquiring the download record of the capability package corresponding to the preset capability.
In the implementation process of the second mode, the first APP accesses the server corresponding to the first APP, the server corresponding to the first APP interacts with the server corresponding to the applet manufacturer, the download record of the capability package corresponding to the preset function of the applet is obtained, and then the download record is informed to the first APP.
S104: and the first APP requests a specified server to download the capability package, and stores the downloaded capability package to a specified shared path in the system.
After determining that the capability package corresponding to the preset function does not exist on the system, the first APP requests a designated server to download the capability package, where the designated server may be a server corresponding to an applet manufacturer, and the server stores the capability package corresponding to all functions of the applet. After receiving the download request of the first APP, the designated server queries whether the first APP has the qualification for downloading the capability package, for example, whether the first APP obtains the authorization of an applet manufacturer, or whether an applet frame exists in the first APP, and if so, the capability package corresponding to the preset function is allowed to be downloaded to the first APP.
Further, after the first APP downloads the capability package corresponding to the preset function, the capability package is stored in 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 with the applet described above.
S106: and the small program in the first APP executes the calling of the preset capability through dynamically loading the capability package.
After the first APP downloads the capability package corresponding to the preset function, the capability package exists on the system, at the moment, the small program in the first APP can be loaded in a dynamic loading mode, and then the preset function is called.
In this embodiment of the present specification, the dynamic loading manner means that all capability packages corresponding to all functions in an applet are not all downloaded to a system at one time, but a capability package corresponding to an invoked capability is selected for downloading based on the invoked capability. That is, what ability is called by the applet in the first APP, and the first APP requests the designated server to download the capability package corresponding to what ability, so as to avoid the technical problem that the first APP installation package is too large. For example, the map navigation applet on the short video software a has a taxi taking function and a navigation function, when the user installs the short video software a, only the whole frame of the map navigation applet is installed, but the taxi taking capability package and the navigation capability package of the map navigation applet are not installed, when the user uses the taxi taking function of the map navigation applet, only the taxi taking capability package is downloaded, and the navigation capability package is not downloaded.
S108: and when the applet 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.
If the applet is also installed in the second APP on the system, when the applet in the second APP calls the preset function, the second APP can directly access the shared path of the system to load the capability package corresponding to the downloaded preset function of the first APP, and the capability package does not need to be downloaded again, and the applet preset function is directly called.
Based on the process of fig. 1, some specific embodiments and embodiments of the process are also provided in the present specification, and the description is continued below.
In one or more embodiments of the present specification, before using the applet capability on the first APP, the first APP is installed on the system first, and if the installation package of the first APP integrated with the applet all-capability package is downloaded, not only great download pressure is brought to the system, but also the success rate of installation package downloading cannot be ensured. In order to avoid the above problems and reduce the memory and operating pressure of the system, in the embodiment of the present specification, the specified content determined by the applet Software Development Kit (SDK) is integrated on the installation package of the first APP, and the system completes the installation of the first APP with the applet by downloading and executing the installation package integrated with the specified content. It should be noted that the applet SDK is used to provide various capabilities including the preset capability described above for the applet.
Further, the designated server in this embodiment of the specification is a server corresponding to a third APP, the third APP and the applet belong to the same manufacturer, and the third APP is an original APP registered by the applet. The specified server can provide the applet SDK, and the data volume of the specified content determined by the applet SDK is smaller than the original data volume of the applet SDK, so that the technical problem that an installation package is too large when the system installs the first APP is solved. In the embodiments of the present specification, the above-mentioned specified content may be an overall framework of the applet, and does not include any capability package. The overall framework is used to indicate all capabilities the applet has, making the user aware of the functions the applet has. Or may be an integrated content that contains at least part of the capability package and the applet framework. At least some of the capability packages contained herein may be capability packages corresponding to a certain capability that is most commonly used by the applet, such as a map capability package corresponding to a map function in a map navigation applet.
Furthermore, after the system completes the installation work of the first APP, based on the specified content integrated on the first APP installation package, the user can see the applet in the first APP and can interact with the applet, the capability of the applet is seen by clicking the applet icon to enter the applet interface, the function button corresponding to the capability of the applet can be clicked, and if the user clicks the function button corresponding to a certain applet capability, the applet is triggered to call the function.
In one or more embodiments of the present description, to implement the sharing of the applet capability package between the second APP and the first APP, it is necessary to satisfy that the applet in the first APP is the same applet as the applet in the second APP. Similarly, before the second APP makes the applet preset function call, the system also needs to perform an installation operation of the second APP. In order to avoid that the system downloads the installation package of the second APP with an excessively large data amount, the system may first obtain the installation package of the second APP integrated with the specified content, it should be noted that, because the applet in the second APP is the same applet as the applet in the first APP, the specified content integrated on the second APP installation package is the same as or similar to the specified content integrated on the first APP installation package, and both are contents at least including an entire framework of the applet, which is not described herein again in this specification.
Further, the system executes the installation package of the second APP integrated with the specified content, and the installation of the second APP is completed. And within the second APP, the applet is also in a state visible and interactive to the user.
Through on the installation package of first APP and second APP, the appointed content that the integration is relevant with the applet has reduced the data volume of first APP and second APP installation package under the calling prerequisite that guarantees that the user can realize the applet function in first APP and second APP, has solved the too big technical problem of installation package that the system met when installing first APP and second APP.
In one or more embodiments of the present specification, when the applet capability package is designed and developed, multiple versions exist, and if the applet capability package existing on the shared path of the system is not a version-compatible capability package, the applet in the first APP or the applet in the second APP cannot use the existing capability package of the system when the applet in the first APP or the applet in the second APP calls a preset function. Therefore, in order to satisfy that all APPs with applets can use the applet capability package existing on the shared path, it is required that the applet capability package existing 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 is not downloaded, if the first APP is in a mode of accessing the shared path, it is determined that the capability package of the compatible version is not downloaded by the first APP.
Further, because the first APP is the APP which uses the applet preset function for the first time on the system, the applet capability package does not exist on the system at this time, and the problem of judging whether the applet capability package version is compatible or not is not involved. When the applet on the second APP uses the preset function again, the applet capability package downloaded by the first APP already exists on the shared path of the system, and at this time, the second APP needs to determine whether the version of the downloaded capability package is compatible, that is, whether the downloaded capability package can be used on the shared path of the system. Therefore, if the applet in the second APP needs to call the preset function, the second APP is used as the APP which does not call the applet preset function for the first time, whether the capability package corresponding to the preset function is downloaded is determined through the shared path, if yes, whether the version of the downloaded capability package on the shared path is compatible is continuously determined, namely, the second APP determines whether the capability package downloaded by the first APP can be used, if the version is compatible, the capability package is dynamically loaded, the preset function of the applet is called, and if the version is incompatible, the capability package with the compatible version is downloaded to the specified server.
In one or more embodiments of the present specification, after the second APP requests the designated server to download the applet capability package corresponding to the preset function, the downloaded applet capability package is stored in a shared path of the system, so that the downloaded capability package can be used by other APPs with applets on the system.
Further, if two or more applet capability packages corresponding to the preset function exist on the shared path of the system, when the applet on the APP calls the preset function, the problem that the applet capability packages are called wrongly and the preset function is called unsuccessfully occurs. In order to avoid the problem, after the second APP stores the version-compatible applet capability packages to the shared path, the system deletes the other applet capability packages corresponding to the preset function, and only one version-compatible applet capability package stored newly is reserved, so that sharing of the applet capability packages is achieved, and the sharing success rate of the applet capability packages is guaranteed.
In one or more embodiments of the present specification, the third APP is used as an original registered APP of the applet, and an applet SDK is integrated on an installation package of the third APP, that is, a capability package corresponding to all functions of the applet is integrated on the installation package of the third APP. If the third APP is also installed on the system, all capability packages of the applet will exist on the system at this time, and then, when the applet in the first APP or the second APP calls the preset function again, the capability package does not need to be downloaded again, but can be directly realized by the third APP.
Specifically, when the applet on the first APP calls the preset function, it is determined that the capability package corresponding to the preset function is not downloaded, and the applet is checked whether the capability package exists or not by accessing the shared path, determining that the capability package is not downloaded, and accessing other paths of the system. Under the condition that the system is provided with the third APP, the first APP finds that the applet capability package corresponding to the preset function exists on the system when accessing other paths of the system. At this moment, if the first APP wants to use the capability package in the current path, it needs to determine whether the first APP has a use qualification, that is, the first APP determines whether the first APP obtains the authorization of the third APP, and if so, the first APP can realize the preset function of the applet by calling the applet capability package in the current path.
Furthermore, the first APP has the calling qualification of the applet capability package on the current path, but the calling of the applet capability package on the current path by the first APP brings a large operating pressure to the system, increases the operating memory of the system, and cannot guarantee the calling success rate of the applet capability package at the same time. And calling the applet capability packet under the current path by the applet in the third APP to execute the calling of the preset function. The operating pressure of the system is reduced, the success rate of calling the applet capability package is guaranteed, meanwhile, no matter which function is called by the applet in the first APP, the applet in the third APP can be called to realize the efficient use of the applet capability, the fact that the first APP downloads the applet capability package is avoided, and the download success rate of the applet capability package is improved.
In one or more embodiments of the present specification, in a case where the third APP is installed in the system, in order to reduce operation and memory pressure of the system, if the third APP detects that a partial capability package of the applet SDK has been loaded in the first APP, the first APP is subjected to light weighting processing. Specifically, at least part of the loaded capability package in the first APP is deleted, or the loaded part of the capability package in the first APP is subjected to slimming processing, and part of the data volume of the capability package is deleted. Through carrying out lightweight processing to first APP, reduce first APP's data volume, and then alleviate the operation and the memory pressure of system.
Further, carry out lightweight processing with partial ability package in the first APP, nevertheless guarantee that the applet in the first APP still is in the visible and interactive state of user to realize carrying out the invocation of applet function in first APP, increase the popularization and the range of application of applet.
In one or more embodiments of the present specification, the calling mode in which the applet in the first APP or the applet in the second APP calls the preset function includes any one or more of a jsapi calling mode and a component calling mode. This is because the applet capability package in this embodiment is a compressed package of native codes and resources that provides a set of applet jsapi capabilities or component capabilities, and the calling method of the applet preset function corresponds to the applet capability package.
In one or more embodiments of the present description, in order to avoid that the first APP or the second APP requests to download the applet capability package, a success rate of loading the applet capability package is improved, a fourth APP may be installed on the system, where the fourth APP is an APP corresponding to the applet on the first APP and the second APP, and when the applet in the first APP calls the preset capability, a storage path corresponding to the installation package of the fourth APP is directly accessed, the applet capability package corresponding to the preset function is loaded, and the calling of the applet preset function is executed. Similarly, when the applet in the second APP calls the preset function, the applet capability package corresponding to the installation package of the fourth APP may be loaded by directly accessing the storage path corresponding to the installation package of the fourth APP, and the preset function is called. No matter what applet function is called by the first APP and the second APP, the applet capability package does not need to be downloaded, and the loading can be directly carried out on the system.
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 applet, but only download the installation packages of the first APP and the second APP, and solve the problem that the installation package is too large in the APP downloading process. In the process that the user uses the fourth APP, whether the user needs to load the applet corresponding to the fourth APP is inquired through a popup window form, the user is allowed to select the APP (the first APP or the second APP) for loading the applet, and the applet is loaded in the first APP or the second APP based on the selection of the user, so that the user can use the function of the applet in the first APP or the second APP. It should be noted that, in the foregoing process, the fourth APP authorizes the first APP or the second APP, so as to allow an applet in the first APP or the second APP to access an installation package of the fourth APP in a use process, and support execution of a preset function. And, after obtaining the fourth APP authorization, the first APP or the second APP presents the overall framework of the applet within the first APP or the second APP.
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 three APPs are installed in the system, when a user uses the short video software A or the short video software B, the map navigation applet is selected to be installed on the short video software A or the short video software B according to the popup prompt, the installed map navigation applet is only an overall framework of the applet at the moment, and the overall framework of the applet is provided by a map navigation software installation package. Therefore, when the user needs to use the map navigation software, the user can directly use the map navigation applet on the short video software A or the short video software B without opening the map navigation software. In addition, when the user needs to use the taxi taking function of the map navigation applet, the short video software A is not required to request to download the taxi taking capability package, the installation package of the map navigation software is directly accessed, the corresponding capability package is called, and the taxi taking function is realized.
In the above example, the map navigation software only occupies some system memories, and does not bring extra operating pressure to the system, because the map navigation software does not need to be opened when the user calls the map navigation applet function on the short video software a or the short video software B, the system does not need to allocate operating resources to the map navigation software, and only needs to access the installation package of the map navigation software. In the process, the successful calling of the map navigation applet function is supported by the map navigation software installation package, and the short video software A or the short video software B is not required to additionally request to download the applet capability package.
From the foregoing description, it is more intuitive that the scheme is more specifically described in one application scenario in conjunction with fig. 2. In this application scenario, the preset function called by the applet is a map function (assumed to be a function calling the electronic map).
Fig. 2 is a schematic diagram of an applet capacity using method in an application scenario, provided in one or more embodiments of the present specification.
As shown in FIG. 2, the applet calls the map capability in a jsapi or component manner. The system judges whether the map capability package corresponding to the map capability is downloaded, if so, the system continuously judges whether the versions are compatible, and dynamically loads the map capability package to execute the call of the map function under the condition that the map capability package is downloaded and the versions are compatible.
Further, if the fact that the map capability package of the applet is not downloaded is determined in the system, downloading of the map capability package of a compatible version is requested from a specified server, and the downloaded map capability package and package information of the map capability package are stored in the shared path, so that calling of the applet in other APPs is facilitated. And after the map capability packet is stored in the shared path, dynamically loading the map capability packet and executing the calling of the applet map function.
Based on the same idea, one or more embodiments of the present specification further provide apparatuses and devices corresponding to the above-described method, as shown in fig. 3 and fig. 4.
Fig. 3 is a schematic structural diagram of an applet capacity utilization apparatus provided in one or more embodiments of the present specification, the apparatus including:
the determining module 302 is configured to determine that, on a system, a capability package corresponding to a preset capability has not been downloaded in response to an operation of an applet in a first APP requesting to invoke the preset capability;
a downloading module 304, where the first APP requests a specific server to download the capability package, and stores the downloaded capability package to a specified shared path in the system;
the execution module 306, the applet in the first APP executes the calling of the preset capability by dynamically loading the capability package;
the execution module 306 dynamically loads the capability package through the shared path when an applet in the second APP requests to call the preset capability, and executes the call of the preset capability.
Optionally, the designated server belongs to a server of a third APP, and the designated server can provide an SDK corresponding to the applet, where the SDK is used to provide multiple capabilities including the preset capability;
the device further comprises:
an obtaining module 308, configured to obtain an installation package of the first APP into which specified content is integrated, where the specified content is determined according to the SDK and data size is smaller than the SDK, and the specified content at least does not include a capability package corresponding to the preset capability;
an installation module 310 that installs the first APP by executing the installation package such that the applet is visible and interactive to a user within the first APP on the system.
Optionally, the applet within the first APP and the applet within the second APP are the same applet;
the obtaining module 308 obtains an installation package of the second APP integrated with the specified content;
the installation module 310, by executing the installation package, installs the second APP such that the applet is visible and interactive to the user within the second APP on the system.
Optionally, the determining that the capability package corresponding to the preset capability is not downloaded on the system specifically includes:
determining that a version-compatible capability package corresponding to the preset capability is not downloaded on the system;
the second APP dynamically loads the capability package through the shared path, and the method specifically includes:
the second APP judges whether the capability package is downloaded or not through the shared path;
if the capability package is downloaded, judging whether the downloaded capability package is compatible in version;
and if the versions are compatible, dynamically loading the capability package, otherwise, downloading and dynamically loading the capability package with the compatible versions from the specified server.
Optionally, the apparatus further comprises:
a storage module 312, where the second APP stores the version-compatible capability package onto the shared path.
Optionally, the system has the third APP installed thereon;
if it is determined that the capability package corresponding to the preset capability is not downloaded on the shared path in the system, the apparatus further includes:
a determining module 314, where the first APP determines whether the authorization of the third APP has been obtained;
if yes, the applet in the third APP is called, the service state of the applet in the first APP is synchronized to the called applet, and calling of the preset capability is executed through the called applet.
Optionally, the apparatus further comprises:
a detection module 316, where the third APP detects whether at least part of a capability package contained in the SDK has been loaded in the first APP;
if yes, performing capability package lightening processing on the first APP according to the at least part of capability package, and enabling the applet to be still in a visible and interactive state for a user in the first APP after the lightening processing.
Optionally, the calling mode includes any one or more of a jsapi calling mode and a component calling mode.
Fig. 4 is a schematic structural diagram of an applet capacity utilization apparatus provided in one or more embodiments of the present specification, where the apparatus includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to cause the at least one processor to:
responding to an operation that an applet in a first APP requests to call a preset capability, and determining that a capability package corresponding to the preset capability is not downloaded on a system;
the first APP requests a designated server to download the capability package, and stores the downloaded capability package to a designated sharing path in the system;
the applet in the first APP executes calling on the preset capability through dynamically loading the capability package;
and when the applet 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.
Based on the same idea, one or more embodiments of the present specification further provide a non-volatile computer storage medium corresponding to the above method, and storing computer-executable instructions configured to:
responding to an operation that an applet in a first APP requests to call a preset capability, and determining that a capability package corresponding to the preset capability is not downloaded on a system;
the first APP requests a designated server to download the capability package, and stores the downloaded capability package to a designated sharing path in the system;
the applet in the first APP executes calling on the preset capability through dynamically loading the capability package;
and when the small 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.
In the 90's of the 20 th century, improvements to a technology could clearly distinguish between improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements to process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, 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 which include, but are not limited to, the following microcontrollers: the ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, 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.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, the present specification embodiments may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the device, and the nonvolatile computer storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above description is merely one or more embodiments of the present disclosure and is not intended to limit the present disclosure. Various modifications and alterations to one or more embodiments of the present description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of one or more embodiments of the present specification should be included in the scope of the claims of the present specification.

Claims (17)

1. An applet capacity using method applied to a system installed with a first APP and a second APP, the method comprising:
responding to an operation that an applet in the first APP requests to call a preset capability, and determining that a capability packet corresponding to the preset capability is not downloaded on the system;
the first APP requests a designated server to download the capability package, and stores the downloaded capability package to a designated sharing path in the system;
the applet in the first APP executes calling on the preset capability through dynamically loading the capability package;
and when the applet 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.
2. The method of claim 1, wherein the designated server belongs to a server of a third APP, and the designated server is capable of providing an SDK corresponding to the applet, and the SDK is used for providing a plurality of capabilities including the preset capability;
before the operation of responding to the applet in the first APP to request the calling of the preset capability, the method further comprises:
acquiring an installation package of the first APP integrated with specified content, wherein the specified content is determined according to the SDK, the data volume is smaller 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 such that the applet is in a visible and interactive state to a user within the first APP on the system.
3. The method of claim 2, said applet within said first APP and said applet within said second APP being the same applet;
before the applet in the second APP requests to call the preset capability, the method further includes:
acquiring an installation package of the second APP integrated with the specified content;
installing the second APP by executing the installation package such that the applet is in a visible and interactive state to a user within the second APP on the system.
4. The method according to claim 1, wherein the determining that the capability package corresponding to the preset capability has not been downloaded on the system comprises:
determining that a version-compatible capability package corresponding to the preset capability has not been downloaded on the system;
the second APP dynamically loads the capability package through the shared path, and the method specifically includes:
the second APP judges whether the capability package is downloaded or not through the shared path;
if the capability package is downloaded, judging whether the version of the downloaded capability package is compatible;
and if the versions are compatible, dynamically loading the capability package, otherwise, downloading and dynamically loading the capability package with the compatible versions from the specified server.
5. The method of claim 4, after downloading the version-compatible capability package from the specified server, the method further comprising:
the second APP stores the version-compatible capability package onto the shared path.
6. The method of claim 2, said system having said third APP installed thereon;
if it is determined that the capability package corresponding to the preset capability is not downloaded on the shared path in the system, the method further includes:
the first APP judges whether the authorization of the third APP is obtained or not;
if yes, the applet in the third APP is called, the service state of the applet in the first APP is synchronized to the called applet, and calling of the preset capability is executed through the called applet.
7. The method of claim 6, further comprising:
the third APP detects whether at least part of a capability package contained in the SDK is loaded in the first APP;
if yes, performing capability package lightening processing on the first APP according to the at least part of capability package, and enabling the applet to be still in a visible and interactive state for a user in the first APP after the lightening processing.
8. The method of any one of claims 1 to 7, wherein the calling mode comprises any one or more of a jsapi calling mode and a component calling mode.
9. An applet capability usage apparatus comprising:
the determining module is used for responding to an operation that an applet in a first APP requests to call a preset capability, and determining that a capability package corresponding to the preset capability is not downloaded on a system;
the first APP requests a designated server to download the capability package, and stores the downloaded capability package to a designated sharing path in the system;
the executive module is used for executing the calling of the preset capability by dynamically loading the capability package by the applet in the first APP;
and the execution module dynamically loads the capability package through the shared path when the applet in the second APP requests to call the preset capability, and executes the call of the preset capability.
10. The apparatus of claim 9, wherein the designated server belongs to a server of a third APP, and the designated server is capable of providing an SDK corresponding to the applet, the SDK being used to provide a plurality of capabilities including the preset capability;
the device further comprises:
the obtaining module is used for obtaining an installation package of the first APP integrated with specified content, the specified content is determined according to the SDK, the data volume is smaller than the SDK, and the specified content at least does not include a capability package corresponding to the preset capability;
an installation module that installs the first APP by executing the installation package such that the applet is in a visible and interactive state to a user within the first APP on the system.
11. The apparatus of claim 10, said applet within said first APP and said applet within said second APP being the same applet;
the acquisition module acquires an installation package of the second APP integrated with the specified content;
the installation module, by executing the installation package, installs the second APP such that the applet is in a visible and interactive state to a user within the second APP on the system.
12. The apparatus according to claim 9, wherein the determining that the capability package corresponding to the preset capability has not been downloaded on the system includes:
determining that a version-compatible capability package corresponding to the preset capability has not been downloaded on the system;
the second APP dynamically loads the capability package through the shared path, and the method specifically includes:
the second APP judges whether the capability package is downloaded through the shared path;
if the capability package is downloaded, judging whether the downloaded capability package is compatible in version;
if the versions are compatible, the capability package is dynamically loaded, otherwise, the capability package with the compatible versions is downloaded from the specified server and dynamically loaded.
13. The apparatus of claim 12, further comprising:
and the second APP stores the version-compatible capability package to the shared path.
14. The apparatus of claim 10, said system having said third APP installed thereon;
if it is determined that the capability package corresponding to the preset capability is not downloaded on the shared path in the system, the apparatus further includes:
a judging module, wherein the first APP judges whether the authorization of the third APP is obtained;
if yes, the applet in the third APP is called, the service state of the applet in the first APP is synchronized to the called applet, and calling of the preset capability is executed through the called applet.
15. The apparatus of claim 14, further comprising:
a detection module, configured to detect whether at least part of a capability package included in the SDK has been loaded in the first APP;
if yes, performing capability package lightening processing on the first APP according to the at least part of capability package, and enabling the applet to be still in a visible and interactive state for a user in the first APP after the lightening processing.
16. The device according to any one of claims 9 to 15, wherein the calling mode comprises any one or more of a jsapi calling mode and a component calling mode.
17. An applet capability using apparatus comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
responding to an operation that an applet in a first APP requests to call a preset capability, and determining that a capability package corresponding to the preset capability is not downloaded on a system;
the first APP requests a designated server to download the capability package, and stores the downloaded capability package to a designated sharing path in the system;
the applet in the first APP executes calling on the preset capability through dynamically loading the capability package;
and when the applet 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.
CN202210240521.9A 2022-03-10 2022-03-10 Applet capacity using method, device and equipment Pending CN114579216A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210240521.9A CN114579216A (en) 2022-03-10 2022-03-10 Applet capacity using method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210240521.9A CN114579216A (en) 2022-03-10 2022-03-10 Applet capacity using method, device and equipment

Publications (1)

Publication Number Publication Date
CN114579216A true CN114579216A (en) 2022-06-03

Family

ID=81779627

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210240521.9A Pending CN114579216A (en) 2022-03-10 2022-03-10 Applet capacity using method, device and equipment

Country Status (1)

Country Link
CN (1) CN114579216A (en)

Similar Documents

Publication Publication Date Title
CN111835864B (en) Method and system for starting application
CN107092475B (en) Calling method and device of interactive control
CN107370775B (en) Method and system for starting application
CN108549562A (en) A kind of method and device of image load
CN109684573B (en) Target picture display method and device, storage medium and electronic equipment
US11397597B2 (en) Application processing method and apparatus
CN114547024A (en) SQL statement risk detection method, device, equipment and medium
CN111768303A (en) Transaction processing method, device, equipment and system
CN111861454B (en) Method and device for displaying unique identifier of digital object
CN108268261B (en) UI (user interface) customization method of intelligent terminal, storage medium and intelligent terminal
CN111949297B (en) Block chain intelligent contract upgrading method and device and electronic equipment
CN111459573B (en) Method and device for starting intelligent contract execution environment
CN111338655B (en) Installation package distribution method and system
CN110837446A (en) Equipment management method and device applied to embedded system, medium and embedded equipment
CN110502251B (en) Application installation method and device
CN113556260A (en) Flow monitoring method and device, storage medium and electronic equipment
CN111538667A (en) Page testing method and device
CN111078435A (en) Service processing method and device and electronic equipment
CN112579938B (en) Page loading method and device, storage medium and electronic equipment
CN114579216A (en) Applet capacity using method, device and equipment
CN116016227A (en) Micro-service system arrangement visualization method, device and medium based on Docker compound
CN116302049A (en) Configuration method, device and equipment of applet plug-in
CN112583733A (en) Interface traffic shaping method and device, storage medium and electronic equipment
CN111639931A (en) Service processing method and device
CN112925527B (en) Calling method, calling device, storage medium and electronic equipment

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