CN113961263B - Applet distribution method, device, apparatus and storage medium - Google Patents

Applet distribution method, device, apparatus and storage medium Download PDF

Info

Publication number
CN113961263B
CN113961263B CN202110750633.4A CN202110750633A CN113961263B CN 113961263 B CN113961263 B CN 113961263B CN 202110750633 A CN202110750633 A CN 202110750633A CN 113961263 B CN113961263 B CN 113961263B
Authority
CN
China
Prior art keywords
applet
capability
host program
capability level
level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110750633.4A
Other languages
Chinese (zh)
Other versions
CN113961263A (en
Inventor
赵华淼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110750633.4A priority Critical patent/CN113961263B/en
Publication of CN113961263A publication Critical patent/CN113961263A/en
Application granted granted Critical
Publication of CN113961263B publication Critical patent/CN113961263B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure provides an applet distributing method, device, equipment and storage medium, and belongs to the technical field of computers, in particular to the technical fields of application platforms, applets and the like. The applet distribution method comprises the following steps: obtaining the capability level of an applet based on the operation capability of the applet; obtaining a capability level of a host program based on the operation capability supported by the host program, wherein the host program of a first capability level supports the operation of an applet of a second capability level, and the second capability level is lower than or equal to the first capability level; and determining a distribution result of the applet on the host program based on the capability level of the applet and the capability level of the host program. The present disclosure may improve the efficiency of applet distribution.

Description

Applet distribution method, device, apparatus and storage medium
Technical Field
The disclosure relates to the technical field of computers, in particular to the technical fields of application platforms, applets and the like, and particularly relates to an applet distributing method, device, equipment and storage medium.
Background
An applet is an application that can be used without downloading an installation, and a program that provides an application environment for the applet may be referred to as an applet host.
Different host programs integrate different software development kits (Software Develop Kit, SDKs) with different capabilities, resulting in different capabilities of the same applet running under different host programs. In order to distribute the appropriate applet on the host program, verification of the applet is required to verify whether the applet is distributed on the host program.
In the related art, a manual verification mode is generally adopted, and a proper applet is selected for a host program through manual verification.
Disclosure of Invention
The present disclosure provides an applet distribution method, apparatus, device and storage medium.
According to an aspect of the present disclosure, there is provided an applet distribution method including: obtaining the capability level of an applet based on the operation capability of the applet; obtaining a capability level of a host program based on the operation capability supported by the host program, wherein the host program of a first capability level supports the operation of an applet of a second capability level, and the second capability level is lower than or equal to the first capability level; and determining a distribution result of the applet on the host program based on the capability level of the applet and the capability level of the host program.
According to another aspect of the present disclosure, there is provided an applet distribution apparatus including: the first obtaining module is used for obtaining the capability level of the applet based on the running capability of the applet; a second obtaining module, configured to obtain a capability level of a host program based on a capability of operation supported by the host program, where the host program of a first capability level supports operation of an applet of a second capability level, and the second capability level is lower than or equal to the first capability level; and the first determining module is used for determining the distribution result of the applet on the host program based on the capability level of the applet and the capability level of the host program.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and 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 perform the method of any one of the above aspects.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method according to any one of the above aspects.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a method according to any of the above aspects.
According to the technical scheme, the efficiency of distributing the small programs can be improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure;
FIG. 2 is a schematic diagram according to a second embodiment of the present disclosure;
FIG. 3 is a schematic diagram according to a third embodiment of the present disclosure;
FIG. 4 is a schematic diagram according to a fourth embodiment of the present disclosure;
FIG. 5 is a schematic diagram according to a fifth embodiment of the present disclosure;
FIG. 6 is a schematic diagram according to a sixth embodiment of the present disclosure;
fig. 7 is a schematic diagram of an electronic device used to implement any of the applet distribution methods of embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the related art, a manual verification mode is adopted to determine whether the applet is distributed in a certain host program, so that the problem of poor efficiency exists.
In order to improve the distribution efficiency, the present disclosure provides the following embodiments.
Fig. 1 is a schematic diagram of a first embodiment of the present disclosure, where an applet distribution method includes:
101. the capability level of an applet is obtained based on the operating capabilities that the applet has.
102. And obtaining the capability level of the host program based on the operation capability supported by the host program, wherein the host program of the first capability level supports the operation of the applet of the second capability level, and the second capability level is lower than or equal to the first capability level.
103. And determining a distribution result of the applet on the host program based on the capability level of the applet and the capability level of the host program.
As shown in FIG. 2, the applet and host programs may be managed by a distribution platform. The distribution platform can obtain the source code of the applet, and obtain the running capability of the applet based on the source code, thereby obtaining the capability level of the applet; the distribution platform can detect the installation package (such as SDK) of the host program by means of a detection tool, such as a compatibility test tool (Compatibility Test Suite, CTS) tool, so as to obtain the operation capability supported by the host program and further obtain the capability level of the host program.
The execution body of the embodiment may be the distribution platform described above. The distribution platform may be located at a server, a central processing unit, a dedicated processing unit, etc.
An applet is an application that can be used without downloading an installation.
The host program is a program for providing an application environment for the applet, and may be at least one of an operating system, a server program, and an application program.
The distribution results may include: the applet is distributable (simply referred to as distributable) on the host program or the applet is not distributable (simply referred to as not distributable) on the host program. Thus, the distribution platform may determine whether an applet is distributable on the host program based on the applet's capability level and the host program's capability level.
Further, if the applet is plural, the distribution platform may correspond to each applet in the plural applets, determine a corresponding distribution result, and then form the distributable applet into a distributable applet set, and/or form the non-distributable applet into a non-distributable applet set, and then provide the distributable applet set, and/or the non-distributable applet set to the host program, for example, the distribution platform may provide a display interface for the host program, on which the above-mentioned distributable applet set may be displayed, and/or the non-distributable applet set may be displayed.
In this embodiment, by determining the distribution result of the applet on the host program based on the capability level of the applet and the capability level of the host program, the distribution efficiency can be improved relative to the manual verification method.
In some embodiments, the method may further comprise: and scanning the source code of the applet to obtain at least one operation capability included in the source code as the operation capability of the applet.
The source code is written by an applet developer, and when the applet developer writes the source code of the applet, the applet developer needs to write the applet based development framework which comprises an operation capability set comprising a plurality of operation capabilities. The applet developer can select at least one of the running capabilities in the set of running capabilities according to his own needs and write the selected running capability into the applet source code.
The running capability may also be referred to as a function possessed by the applet for the applet and as a function supported by the host program for the host program. For example, an applet having a live function, the live function is one of the running capabilities of the applet, and a host program, if it supports the live function, the live function is one of the running capabilities of the host program.
The running capability set in the development framework may be preconfigured with a plurality of running capabilities, and the running capabilities may be specifically application program interfaces (Application Programming Interface, APIs), for example, the running capability set includes the following APIs: an API for a base function, an API for a routing function, an API for a network function, an API for an interface function, an API for a data storage function, an API for an artificial intelligence function, and the like.
Each API may be further subdivided, for example, the APIs for basic functions may include: an API, callback, parameter, component, etc. for determining if the applet is available under the current version and current system; an API for listening for page absence events to be opened by the applet; an API for listening for applet foreground events, etc.
Since the applet developer needs to follow the development framework when encoding the source code of the applet, if an applet has a certain function, a corresponding API needs to be included in the source code, for example, API-1 is an API for monitoring the applet foreground event, and if the applet has the function, the API-1 is included in the source code. Therefore, by scanning the source code of the applet, the running capability of the API-1 or the like included in the source code is obtained as the running capability possessed by the applet.
By scanning the source code, the operating capabilities of the applet can be obtained.
In some embodiments, the obtaining the capability level of the applet based on the operating capability of the applet includes: and obtaining at least one capability level corresponding to the at least one operation capability respectively based on a corresponding relation between the preset operation capability and the capability level, and taking the highest capability level in the at least one capability level as the capability level of the applet.
The manager of the development framework may not only pre-configure the plurality of operational capabilities, but also pre-configure corresponding capability levels for each of the plurality of operational capabilities.
One operational capability has one capability level and multiple operational capabilities may have the same capability level or different capability levels.
The host program may support the running of applets having a capability level no higher than its own capability level.
For example, as shown in fig. 3, assuming that the set of operating capabilities includes N operating capabilities, denoted by capability-1, capability-2, respectively.
The capability level may be divided according to the own needs of the manager of the development framework, for example, the capability level may be divided into four capability levels, which are respectively represented by L1, L2, L3, and L4, where the capability level of L1 is the lowest and the capability level of L4 is the highest.
The manager of the development framework can define corresponding capability levels for the capability according to different characteristics of the running capability and meanings of the capability levels. For example, an API for a base function may define a capability level of L1, and some feature capabilities of the host program, such as bookshelf capabilities, may define a higher capability level, such as L3.
The meanings of L1 to L4 may be as follows:
l1: the applet is self-contained and does not need additional coordination of the host program. That is, the applet written in accordance with the development framework described above is defaults to have an L1 level. Thus, both the applet and the host program conforming to the development framework described above are defined as at least L1.
L2: the level corresponding to the capabilities of the underlying function is ensured. For example, if one host program is a search class host program and the basic function is a search function, the capability corresponding to the search function may be defined as L2.
L3: the feature capability refers to the capability of the host program itself, which is different from other host programs, and the host program can be implemented as needed. For example, a search class host program may further add a feature bookshelf function, where the corresponding capability of the bookshelf function may be defined as L3.
L4: the low frequency capability is the capability that the host program does not pursue to meet, and the host program can be implemented as needed.
Generally, the source code of the applet includes a plurality of operation capabilities, such as API-1, API-2, etc., and the API-1, API-2, etc. included in the source code can be obtained by scanning the source code; and then according to the corresponding relation between the preconfigured operation capability and the capability level, the capability level corresponding to each operation capability in the operation capability can be obtained, and then the highest capability level can be used as the capability level of the applet.
For example, after the source code of an applet is scanned, the running capabilities including API-1, API-2 and API-3 are obtained, and in the preset configuration corresponding relationship, it is assumed that API-1 corresponds to L1, API-2 corresponds to L2, API-3 corresponds to L1, and since the highest capability level of the three capability levels is L2, the capability level of the applet is determined to be L2.
The capability level of the applet can be simply, conveniently and quickly obtained based on the corresponding relation between the preset operation capability and the capability level, and the capability level of the applet is determined based on the highest capability level, so that the normal operation of the applet on the host program can be ensured.
In some embodiments, the scanning the source code of the applet includes: and when detecting that the applet issues a new version, scanning the source code of the applet with the new version.
For example, after a developer of the applet issues a new version, the platform where the applet is located may send a new version message to the distribution platform, and after the distribution platform receives the new version message, it indicates that the applet issues the new version, and then the source code of the applet with the new version may be scanned. Alternatively, the distribution platform may also periodically detect the platform on which the applet is located to detect whether the applet has released a new version.
By scanning the source code of the applet after detecting that the applet has released a new version, the capability level of the applet can be updated in time.
In some embodiments, the method further comprises: detecting an installation package of the host program to obtain at least one operation capability supported by the host program.
Wherein, the detection tool can be used for detecting the installation package of the host program, and the detection tool is a CTS tool, so that the operation capability supported by the host program is obtained.
By detecting the installation package of the host program, the operation capability supported by the host program can be obtained.
In some embodiments, the obtaining the capability level of the host program based on the running capability supported by the host program includes: if all the operation capabilities of the same capability level in the preset operation capability set are included in the at least one operation capability, taking the highest capability level in the same capability level as the capability level of the host
Instead of the applet determining the capability level of the applet based on the highest level, the host program determines the capability level of the host program based on all supported capabilities of the same level.
For example, the operational capabilities supported by a host program include: API-1, API-2, API-3, all of the L1 level of the preset set of operational capabilities includes: API-1, API-2, all the operating capabilities of the L2 level in the preset operating capability set include: API-3, since the host program supports all L1-level operation capability, and the host program also supports all L2-level operation capability, and since the L2 level is higher than the L1 level, the capability level of the host program is L2.
By determining the capability level of the host program based on whether all the operation capabilities of the same capability level are supported, the operation of the function of the corresponding capability level can be ensured, and the normal operation of the applet of the corresponding level can be further ensured.
In some embodiments, the detecting the installation package of the host program includes:
and detecting an installation package of the host program with the new version when the host program is detected to release the new version.
For example, after a developer of the host program issues a new version, a platform where the host program is located may send a new version message to the distribution platform, and after the distribution platform receives the new version message, it indicates that the host program issues the new version, and then an installation package of the host program of the new version may be detected. Alternatively, the distribution platform may also periodically detect the platform on which the host program is located, so as to detect whether the host program issues a new version.
By detecting the installation package of the host program after detecting that the host program issues a new version, the capability level of the host program can be updated in time.
In some embodiments, the determining, based on the capability level of the applet and the capability level of the host program, a distribution result of the applet on the host program includes:
and if the distribution strategy is a distribution strategy based on capability level control and the capability level of the applet is not higher than the capability level of the host program, determining that the distribution result is that the applet can be distributed on the host program.
Wherein, a distribution policy may be preset, and the distribution policy may include a distribution policy controlled based on the capability level. If the distribution policy adopts the distribution policy based on the capability level control, at this time, if the capability level of the applet X is L2, the capability level of the applet Y is L3, and the capability level of the host program is L2, the applet X may be distributed on the host program, and the applet Y may not be distributed on the host program.
In addition, if the distribution policy is a distribution policy based on capability level control, and the capability level of the applet is higher than the capability level of the host program, it is determined that the applet is not distributable on the host program as a result of the distribution.
By determining the applet having the capability level not higher than the capability level of the host program as distributable when the applet is distributed based on the capability level control, smooth running of the applet on the host program can be ensured.
In some embodiments, the method may further comprise:
if the distribution strategy is based on white list control, and the applet is located in a white list preset by the host program, determining that the distribution result is that the applet can be distributed on the host program.
The distribution policy may further include a distribution policy based on white list control, where the white list is preset by the host program, for example, the host program may preset identification information of an applet included in the white list, and if the identification information of a applet belongs to the white list, the applet may be determined to be distributable.
In addition, if the distribution policy is a distribution policy based on white list control, and the applet is not in the white list preset by the host program, determining that the distribution result is that the applet is not distributable on the host program.
Further, the distribution policy may further include a distribution policy based on capability level control and a distribution policy based on white list control, where if the capability level of a certain applet is not higher than the capability level of a host program, or the applet is located in the white list of the host program, it is determined that the applet is distributable on the host program.
In addition, the distribution policy may further include a distribution policy based on capability level control and a distribution policy based on white list control, where if a capability level of a certain applet is higher than a capability level of a host program and the applet is not in a white list of the host program, it is determined that the applet is not distributable on the host program.
When the distribution strategy based on the white list control is adopted, the small programs in the white list are distributed to the host program, the white list can be set according to the self needs of the host program, and the personalized needs of the host program are met.
Further, by setting a plurality of distribution strategies, flexibility can be improved.
Fig. 5 is a schematic diagram of a fifth embodiment of the present disclosure, where the present embodiment provides an applet distributing method, including:
501. and when the small program is detected to release a new version, scanning the source code of the small program of the new version to obtain at least one running capability included in the source code.
502. And obtaining at least one capability level corresponding to the at least one operation capability respectively based on a corresponding relation between the preset operation capability and the capability level, and taking the highest capability level in the at least one capability level as the capability level of the applet.
503. And detecting an installation package of the new version of the host program when the host program is detected to release the new version, so as to obtain at least one operation capability supported by the host program.
504. And if the at least one operation capability comprises all operation capabilities of the same capability level in the preset operation capability set, taking the highest capability level in the same capability level as the capability level of the host.
501-502 and 503-504 have no timing constraint relationship, and 501-502 can be executed first, and 503-504 can be executed later; alternatively, 503-504 may be performed first, followed by 501-502; alternatively, the execution 501-502, and 503-504 are synchronized.
505. Determining a distribution policy, if the distribution policy is a distribution policy based on capability level control, executing 506, if the distribution policy is a distribution policy based on white list control, executing 507, and if the distribution policy is a distribution policy based on capability level control and a distribution policy based on white list control, executing 508.
The distribution policy may be preset in the distribution platform, or may be set in the distribution platform by the host program.
506. And if the capability level of the applet is not higher than the capability level of the host program, determining that the applet can be distributed on the host program as a result of the distribution.
507. And if the applet is located in a preset white list of the host program, determining that the applet can be distributed on the host program as a distribution result.
508. And if the capability level of the applet is not higher than the capability level of the host program, or the applet is in a preset white list of the host program, determining that the applet can be distributed on the host program as the distribution result.
In this embodiment, after the applet and the host program issue new versions, the applet and the host program are processed accordingly to obtain corresponding capability levels, so that the capability levels of the applet and the host program can be updated in time, and the matching between the applet and the host program is ensured. By adopting various distribution strategies, a proper distribution strategy can be selected according to actual conditions, and flexibility is improved.
Fig. 6 is a schematic view of a sixth embodiment of the present disclosure, which provides an applet distributing apparatus. As shown in fig. 6, the apparatus 600 includes: a first obtaining module 601, a second obtaining module 602, and a first determining module 603.
The first obtaining module 601 is configured to obtain a capability level of an applet based on a running capability of the applet; the second obtaining module 602 is configured to obtain a capability level of a host program based on a capability of operation supported by the host program, where the host program of a first capability level supports operation of an applet of a second capability level, and the second capability level is lower than or equal to the first capability level; the first determining module 603 is configured to determine a distribution result of the applet on the host program based on the capability level of the applet and the capability level of the host program.
In some embodiments, the apparatus 600 further comprises: and the scanning module is used for scanning the source code of the applet so as to obtain at least one operation capability included in the source code as the operation capability of the applet.
In some embodiments, the first obtaining module 601 is specifically configured to: and obtaining at least one capability level corresponding to the at least one operation capability respectively based on a corresponding relation between the preset operation capability and the capability level, and taking the highest capability level in the at least one capability level as the capability level of the applet.
In some embodiments, the scanning module is specifically configured to: and when detecting that the applet issues a new version, scanning the source code of the applet with the new version.
In some embodiments, the apparatus 600 further comprises: and the detection module is used for detecting the installation package of the host program so as to obtain at least one operation capability supported by the host program.
In some embodiments, the second obtaining module 602 is specifically configured to: and if the at least one operation capability comprises all operation capabilities of the same capability level in the preset operation capability set, taking the highest capability level in the same capability level as the capability level of the host.
In some embodiments, the detection module is specifically configured to: and detecting an installation package of the host program with the new version when the host program is detected to release the new version.
In some embodiments, the first determining module 603 is specifically configured to: and if the distribution strategy is a distribution strategy based on capability level control and the capability level of the applet is lower than or equal to the capability level of the host program, determining that the distribution result is that the applet can be distributed on the host program.
In some embodiments, the apparatus 600 further comprises: and the second determining module is used for determining that the distribution result is that the applet can be distributed on the host program if the distribution strategy is the distribution strategy based on the white list control and the applet is positioned in the white list preset by the host program.
In this embodiment, by determining the distribution result of the applet on the host program based on the capability level of the applet and the capability level of the host program, the distribution efficiency can be improved relative to the manual verification method.
It is to be understood that in the embodiments of the disclosure, the same or similar content in different embodiments may be referred to each other.
It can be understood that "first", "second", etc. in the embodiments of the present disclosure are only used for distinguishing, and do not indicate the importance level, the time sequence, etc.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 7 illustrates a schematic block diagram of an example electronic device 700 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile apparatuses, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing apparatuses. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the electronic device 700 includes a computing unit 701 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 702 or a computer program loaded from a storage unit 707 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 may also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in the electronic device 700 are connected to the I/O interface 705, including: an input unit 707 such as a keyboard, a mouse, and the like; an output unit 706 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, an optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information/data with other devices through a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 701 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the respective methods and processes described above, such as an applet distribution method. For example, in some embodiments, the applet distribution method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 700 via the ROM 702 and/or the communication unit 709. When a computer program is loaded into RAM 703 and executed by computing unit 701, one or more steps of the applet distribution method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the applet distribution method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS") are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (16)

1. An applet distribution method comprising:
obtaining the capability level of an applet based on the operation capability of the applet;
obtaining a capability level of a host program based on the operation capability supported by the host program, wherein the host program of a first capability level supports the operation of an applet of a second capability level, and the second capability level is lower than or equal to the first capability level;
determining a distribution result of the applet on the host program based on the capability level of the applet and the capability level of the host program;
the method further comprises the steps of:
detecting an installation package of the host program to obtain at least one operation capability supported by the host program;
wherein the obtaining the capability level of the host program based on the operation capability supported by the host program includes:
if the at least one operation capability comprises all operation capabilities of the same capability level in the preset operation capability set, taking the highest capability level in the same capability level as the capability level of the host;
the operation capability of the applet is the function of the applet, and the operation capability of the host program is the function of the host program.
2. The method of claim 1, wherein the method further comprises:
and scanning the source code of the applet to obtain at least one operation capability included in the source code as the operation capability of the applet.
3. The method of claim 2, wherein the obtaining the capability level of the applet based on the operating capabilities the applet has comprises:
and obtaining at least one capability level corresponding to the at least one operation capability respectively based on a corresponding relation between the preset operation capability and the capability level, and taking the highest capability level in the at least one capability level as the capability level of the applet.
4. The method of claim 2, wherein the scanning the applet source code comprises:
and when detecting that the applet issues a new version, scanning the source code of the applet with the new version.
5. The method of claim 1, wherein the detecting the installation package of the host program comprises:
and detecting an installation package of the host program with the new version when the host program is detected to release the new version.
6. The method of any of claims 1-5, wherein the determining a distribution result of the applet on the host program based on the applet's capability level and the host program's capability level comprises:
and if the distribution strategy is a distribution strategy based on capability level control and the capability level of the applet is lower than or equal to the capability level of the host program, determining that the distribution result is that the applet can be distributed on the host program.
7. The method of any of claims 1-5, wherein the method further comprises:
if the distribution strategy is based on white list control, and the applet is located in a white list preset by the host program, determining that the distribution result is that the applet can be distributed on the host program.
8. An applet distribution apparatus comprising:
the first obtaining module is used for obtaining the capability level of the applet based on the running capability of the applet;
a second obtaining module, configured to obtain a capability level of a host program based on a capability of operation supported by the host program, where the host program of a first capability level supports operation of an applet of a second capability level, and the second capability level is lower than or equal to the first capability level;
a first determining module, configured to determine a distribution result of the applet on the host program based on the capability level of the applet and the capability level of the host program;
the apparatus further comprises:
the detection module is used for detecting the installation package of the host program so as to obtain at least one operation capability supported by the host program;
the second obtaining module is specifically configured to:
if the at least one operation capability comprises all operation capabilities of the same capability level in the preset operation capability set, taking the highest capability level in the same capability level as the capability level of the host;
the operation capability of the applet is the function of the applet, and the operation capability of the host program is the function of the host program.
9. The apparatus of claim 8, wherein the apparatus further comprises:
and the scanning module is used for scanning the source code of the applet so as to obtain at least one operation capability included in the source code as the operation capability of the applet.
10. The apparatus of claim 9, wherein the first obtaining module is specifically configured to:
and obtaining at least one capability level corresponding to the at least one operation capability respectively based on a corresponding relation between the preset operation capability and the capability level, and taking the highest capability level in the at least one capability level as the capability level of the applet.
11. The apparatus of claim 9, wherein the scanning module is specifically configured to:
and when detecting that the applet issues a new version, scanning the source code of the applet with the new version.
12. The device of claim 8, wherein the detection module is specifically configured to:
and detecting an installation package of the host program with the new version when the host program is detected to release the new version.
13. The apparatus of any one of claims 8-12, wherein the first determining module is specifically configured to:
and if the distribution strategy is a distribution strategy based on capability level control and the capability level of the applet is lower than or equal to the capability level of the host program, determining that the distribution result is that the applet can be distributed on the host program.
14. The apparatus of any of claims 8-12, wherein the apparatus further comprises:
and the second determining module is used for determining that the distribution result is that the applet can be distributed on the host program if the distribution strategy is the distribution strategy based on the white list control and the applet is positioned in the white list preset by the host program.
15. An electronic device, comprising:
at least one processor; and
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 perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-7.
CN202110750633.4A 2021-07-02 2021-07-02 Applet distribution method, device, apparatus and storage medium Active CN113961263B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110750633.4A CN113961263B (en) 2021-07-02 2021-07-02 Applet distribution method, device, apparatus and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110750633.4A CN113961263B (en) 2021-07-02 2021-07-02 Applet distribution method, device, apparatus and storage medium

Publications (2)

Publication Number Publication Date
CN113961263A CN113961263A (en) 2022-01-21
CN113961263B true CN113961263B (en) 2023-08-11

Family

ID=79460328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110750633.4A Active CN113961263B (en) 2021-07-02 2021-07-02 Applet distribution method, device, apparatus and storage medium

Country Status (1)

Country Link
CN (1) CN113961263B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020221189A1 (en) * 2019-04-30 2020-11-05 上海掌门科技有限公司 Method and device for managing hosting program
CN112905469A (en) * 2021-02-22 2021-06-04 北京百度网讯科技有限公司 Method and apparatus for detecting applet capability features

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020221189A1 (en) * 2019-04-30 2020-11-05 上海掌门科技有限公司 Method and device for managing hosting program
CN112905469A (en) * 2021-02-22 2021-06-04 北京百度网讯科技有限公司 Method and apparatus for detecting applet capability features

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
侯旭光 ; .提高工效的VBA编程.石家庄铁路职业技术学院学报.2007,(S1),全文. *

Also Published As

Publication number Publication date
CN113961263A (en) 2022-01-21

Similar Documents

Publication Publication Date Title
CN112597754B (en) Text error correction method, apparatus, electronic device and readable storage medium
CN108011949B (en) Method and apparatus for acquiring data
CN114389969B (en) Method and device for testing client, electronic equipment and storage medium
CN113220367B (en) Method and device for running applet, electronic equipment and storage medium
CN114816393A (en) Information generation method, device, equipment and storage medium
CN112988727A (en) Data annotation method, device, equipment, storage medium and computer program product
CN114417780B (en) State synchronization method and device, electronic equipment and storage medium
CN114374703A (en) Method, device and equipment for acquiring cloud mobile phone information and storage medium
CN113961263B (en) Applet distribution method, device, apparatus and storage medium
CN115481594B (en) Scoreboard implementation method, scoreboard, electronic equipment and storage medium
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN112966201B (en) Object processing method, device, electronic equipment and storage medium
CN114327577A (en) Code change determining method and device, electronic equipment and storage medium
CN115102948A (en) Automatic downloading method, device and equipment of map tiles and storage medium
CN114138358A (en) Application program starting optimization method, device, equipment and storage medium
CN114741286A (en) Data processing method and device, electronic equipment and storage medium
CN114386577A (en) Method, apparatus, and storage medium for executing deep learning model
CN114218166A (en) Data processing method and device, electronic equipment and readable storage medium
CN113535020A (en) Method, apparatus, device, medium and product for generating application icons
CN113468053A (en) Application system testing method and device
CN113220576B (en) Management method, device, equipment and storage medium of test environment
CN116302897B (en) Data set establishing method and device, electronic equipment and storage medium
CN114647578B (en) System testing method, device, equipment and storage medium
CN116302086A (en) Application processing method and device, electronic equipment and readable storage medium
CN113032040B (en) Method, apparatus, device, medium, and article for processing tasks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant