CN113238765B - Method, device, equipment and storage medium for distributing small program - Google Patents

Method, device, equipment and storage medium for distributing small program Download PDF

Info

Publication number
CN113238765B
CN113238765B CN202110553882.4A CN202110553882A CN113238765B CN 113238765 B CN113238765 B CN 113238765B CN 202110553882 A CN202110553882 A CN 202110553882A CN 113238765 B CN113238765 B CN 113238765B
Authority
CN
China
Prior art keywords
applet
target
score
distributable
function
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
CN202110553882.4A
Other languages
Chinese (zh)
Other versions
CN113238765A (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 CN202110553882.4A priority Critical patent/CN113238765B/en
Publication of CN113238765A publication Critical patent/CN113238765A/en
Application granted granted Critical
Publication of CN113238765B publication Critical patent/CN113238765B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The disclosure provides a distribution method, a distribution device, distribution equipment and a storage medium of an applet, and relates to the technical field of computers, in particular to the technical field of applets. The specific implementation scheme is as follows: determining at least two target functions required to be used by the target applet; determining distributable scores of the target applets according to the calling frequency of the at least two target functions in the target applets and the compatibility information of the host program on the at least two target functions; and determining the distribution type of the target applet in the host program according to the distributable score of the target applet. The method and the device can improve the distribution rate of the applets.

Description

Method, device, equipment and storage medium for distributing small program
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of applet distribution methods, apparatuses, devices, and storage media.
Background
The smart applet refers to a pure offline HTML5 (Hyper Text Markup Language, H5) application that can be used without downloading an installation. With the continuous development of applet ecology, more and more business applications have been turned into applet form bearers.
The execution of the applet depends on the runnable environment provided by the host program. In order to ensure the stability of the host program and the use experience of the user on the applet, it is necessary to determine whether the applet can normally run in the host program before the applet is distributed.
Disclosure of Invention
The present disclosure provides a distribution method, apparatus, device, and storage medium for applets.
According to an aspect of the present disclosure, there is provided a distribution method of an applet, including:
determining at least two target functions required to be used by the target applet;
determining distributable scores of the target applets according to the calling frequency of the at least two target functions in the target applets and the compatibility information of the host program on the at least two target functions;
and determining the distribution type of the target applet in the host program according to the distributable score of the target applet.
According to still another aspect of the present disclosure, there is provided an applet distributing apparatus including:
the target function module is used for determining at least two target functions required to be used by the target applet;
the distributable scoring module is used for determining distributable scores of the target applets according to the calling frequency of the at least two target functions in the target applets and the compatibility information of the host program on the at least two target functions;
and the distribution type module is used for determining the distribution type of the target applet in the host program according to the distributable score of the target applet.
According to still another aspect of the present disclosure, there is provided an electronic apparatus 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 distributing applets provided by any embodiments of the disclosure.
According to yet another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the distribution method of the applet provided by any embodiment of the present disclosure.
According to yet another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of distributing applets provided by any embodiments of the present disclosure.
According to the technology of the present disclosure, the distribution rate of the applet 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 of an applet distribution method provided in accordance with an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of another applet distribution method provided in accordance with an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of yet another applet distribution method provided in accordance with an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of yet another applet distribution method provided in accordance with an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of an applet distribution apparatus provided in accordance with an embodiment of the present disclosure;
fig. 6 is a block diagram of an electronic device for implementing the method of distributing applets according to an embodiment of the 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.
The following describes in detail the solution provided by the embodiments of the present disclosure with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of a method for distributing an applet, which is provided according to an embodiment of the present disclosure, and the embodiment of the present disclosure may be applicable to a case of determining whether the applet can be distributed in a host program. The method may be performed by an applet distribution device, which may be implemented in hardware and/or software, and may be configured in an electronic device. Referring to fig. 1, the method specifically includes the following:
s110, determining at least two target functions required to be used by the target applet;
s120, determining distributable scores of the target applets according to the calling frequency of the at least two target functions in the target applets and the compatibility information of the host program on the at least two target functions;
s130, determining the distribution type of the target applet in the host program according to the distributable score of the target applet.
In the disclosed embodiment, the target function refers to a functional module in the target applet that is available to the user. The target function is determined according to the service requirement of the target applet, and in the embodiment of the present application, the target function is not specifically limited, and for example, the target applet may include a login function, a two-dimensional code scanning function, a face recognition function, a multimedia playing function, and the like.
The calling frequency of the target function in the target applet refers to the using frequency of the user to the target function in the using process of the target applet, and the using frequency can be obtained by counting the user using records of the target applet. The host program's compatibility information for the target function may be compatible or incompatible, for example, in the case where the host environment supportable function version is lower than the target function version, it is determined that the host program is not compatible (or does not support) the target function.
In the disclosed embodiments, the distributable score of the target applet is used to characterize the degree of distributability of the target applet in the host program, that is, the higher the distributable score, the greater the distributable probability of the target applet. The distributable score of the target applet may be positively correlated with the number of target functions that the host program is compatible with, i.e., the greater the number of target functions that are compatible, the higher the distributable score of the target applet. In addition, the distributable score of the target applet may also be inversely related to the call frequency of the target function incompatible with the host program, i.e. for any incompatible target function, the higher the call frequency of the target function, the lower the distributable score of the target applet. Wherein the distribution type is distributable or non-distributable.
According to the call frequency of each target function in the target applet and the compatibility information of the host program on each target function, the distributable score of the target applet is determined, namely, the distributable score of the target applet is quantitatively determined through the call frequency and the compatibility information of the target function, the importance of different target functions on the target applet can be fully considered, and therefore the distributable applet quantity of the host program can be improved, namely, the distribution rate and recall rate of the applet are improved. However, in the conventional applet distribution technology, a cut applet distribution standard is adopted, so long as the applet has a function which is not supported by the host program, the host program cannot distribute the applet, so that the number of the applet which can be distributed by the host program is small, and the distribution rate and recall rate of the applet are low.
According to the technical scheme, the distributable degree of the target applet can be quantitatively represented through the distributable score, the importance of different target functions on the target applet can be fully considered, and the distribution rate and recall rate of the applet can be improved.
Fig. 2 is a schematic diagram of another applet distribution method provided in accordance with an embodiment of the present disclosure. This embodiment is an alternative to the embodiments described above. Referring to fig. 2, the method for distributing the applet provided in the present embodiment includes:
s210, determining at least two target functions required to be used by the target applet;
s220, determining a first score of the target applet according to the calling frequency of the at least two target functions in the target applet and the compatibility information of the host program on the at least two target functions;
s230, determining a second score of the target applet according to the calling frequency of at least two target functions in the target applet;
s240, taking the ratio of the first score to the second score as a distributable score of the target applet;
s250, determining the distribution type of the target applet in the host program according to the distributable score of the target applet.
In the embodiment of the disclosure, the influence degree of the calling frequency of the target function compatible with the host program on the first score is larger than the influence degree of the calling frequency of the target function incompatible with the host program on the first score; the second score is determined only by the call frequency of each target function, and is irrelevant to the compatibility information of the host program to the target function. The distributable score of the target applet is positively correlated with the first score and negatively correlated with the second score. The importance of different target functions is different through different influence degrees of the calling frequency of the compatible target functions and the calling frequency of the incompatible target functions on the first score, so that the distribution rate of the target applet can be improved on the premise of guaranteeing the use experience of a user on the target applet.
In an alternative embodiment, the first score for the objective applet is determined by the following formula:
wherein S is the first score of the target applet, n is the number of target functions in the target applet, c (i) is the call frequency of the ith target function, v (i) is the compatibility score of the host program on the ith target function; wherein, in the case that the host program is compatible with the ith target function, v (i) takes a value of a first numerical value; in the case that the host program is not compatible with the ith target function, the value of v (i) is a second value, and the second value is smaller than the first value. For example, the first value may be 1 and the second value may be 0.
And, the call frequency of each target function in the target applet can be summed to obtain a second score of the target applet. That is, the distributable score of the target applet can be obtained by the following formula:
where M is the distributable score of the target applet.
By introducing a compatibility score of a first value to the compatible target function, introducing a compatibility score of a second value to the incompatible target function, wherein the second value is smaller than the first value, the importance of the compatible target function to the distributable score is greater than that of the incompatible target function, and therefore the accuracy of the distributable score is further improved.
In an alternative embodiment, the determining the distribution type of the target applet in the host program according to the distributable score of the target applet includes: comparing the distributable score of the target applet with an applet score threshold; in the event that the distributable score of the target applet is less than the applet score threshold, determining that the type of distribution of the target applet in the host program is non-distributable. In addition, in the case where the distributable score of the target applet is equal to or greater than the applet score threshold, the distribution type of the target applet in the host program is determined to be distributable.
The applet score threshold value is predetermined, and may be an artificial experience value, or may be determined according to user experience and distributable scores of other applets.
In an alternative embodiment, before comparing the distributable score of the target applet with the applet score threshold, further comprising: taking a reference applet with the artificial experience score larger than the experience score threshold as an auxiliary applet; a distributable score of the secondary applet is determined and the applet score threshold is determined from the distributable score of the secondary applet.
The reference applet may be a relatively large user-used applet, for example, a commonly used applet that is 90% of the user-used applet may be used as the reference applet. And each reference applet is used as an applet to be tested for artificial experience.
And aiming at each reference applet, acquiring the artificial experience scores of different test users on the reference applet, and taking the average artificial experience score of different test users on the reference applet as the artificial experience score of the reference applet. For example, during the human experience of the reference applet, if the reference applet crashes and cannot be used, the human experience score of the reference applet may be 1; if part of the functions of the reference applet are not supported and have a large influence on the user use experience, the artificial experience score of the reference applet may be 2; if part of the functionality of the reference applet is not supported and has less impact on the user's use experience, the artificial experience score for the reference applet may be 3; if each function of the reference applet is normal, the artificial experience score of the reference applet may be 4. The method for determining the artificial experience score of the reference applet is not particularly limited.
The experience score threshold is a threshold that affects human experience, and may be set manually, for example, may be 3. And selecting at least two reference applets with the artificial experience score larger than the experience score threshold as auxiliary applets, wherein the at least two reference applets do not influence the use experience of the user. The distributable score of each secondary applet is determined separately and the lowest distributable score of each secondary applet may be taken as the applet score threshold. Note that, the distributable score determination manner of the auxiliary applet is the same as that of the target applet, and will not be described in detail here.
By respectively determining the artificial experience scores of the reference applets, taking the reference applet with the artificial experience score larger than the experience score threshold as an auxiliary applet and taking the lowest distributable score of the auxiliary applet as the applet score threshold, the user experience of the distributable target applet can be ensured.
According to the technical scheme, the influence degree of the calling frequency of the compatible target function on the first score is different from that of the incompatible target function; and the reference applet with the artificial experience score larger than the experience score threshold is used as the auxiliary applet, and the lowest distributable score of the auxiliary applet is used as the applet score threshold, so that the distribution rate of the target applet can be improved on the premise of ensuring the use experience of the user on the target applet.
Fig. 3 is a schematic diagram of yet another applet distribution method provided in accordance with an embodiment of the present disclosure. This embodiment is an alternative to the embodiments described above. Referring to fig. 3, the method for distributing the applet provided in the present embodiment includes:
s310, acquiring candidate functions usable by the target applet, and acquiring keywords of the candidate functions;
s320, acquiring a target applet code;
s330, if the target applet code comprises a keyword of any candidate function, the target applet needs to use the candidate function to obtain at least two target functions needed to be used by the target applet;
s340, determining distributable scores of the target applets according to the calling frequency of the at least two target functions in the target applets and the compatibility information of the host program on the at least two target functions;
s350, determining the distribution type of the target applet in the host program according to the distributable score of the target applet.
Specifically, a function dictionary for use by the target applet may be obtained, wherein the function dictionary includes a set of candidate functions that may be used. For each candidate function in the set of candidate functions, a keyword for the candidate function may be obtained, e.g., a log in may be a keyword for a log in function. And the source code package of the target applet can be analyzed to obtain the target applet code. If the target applet code includes a keyword of any candidate function, determining that the candidate function is the target function of the target applet. By combining the candidate function of the target applet and the target applet code, the accuracy of the target function actually used by the target applet can be improved, thereby further improving the accuracy of the distribution type of the target applet.
In an alternative embodiment, before the determining the distributable score of the target applet, the method further includes: acquiring a test case of a target function; and executing the test case of the target function based on the host program, and determining whether the host program is compatible with the target function according to an execution result.
Specifically, a test case of the target function may be obtained, and whether the host program is compatible with the target function may be determined based on the test case in which the host program (i.e., the host environment) executes the target function. The host environment is used for testing the target function to obtain the compatibility information of the host program on the target function, so that the accuracy of the compatibility information can be improved, and the accuracy of the distribution type of the target applet can be further improved.
According to the technical scheme, the key words of the candidate functions are matched with the target applet codes, so that at least two target functions required to be used by the target applet can be accurately obtained; by testing the target functions in the host environment, the accuracy of the host program to the compatible information of the at least two target functions can be improved, and the accuracy of the distribution type of the target applet can be further improved.
Fig. 4 is a schematic diagram of yet another applet distribution method provided in accordance with an embodiment of the present disclosure.
Referring to fig. 4, the embodiment specifically provides a method for distributing an applet, which may include:
s410, determining at least two target functions actually used by the target applet.
Specifically, a source code package of a target applet and a function dictionary used by the target applet are obtained, wherein the function dictionary comprises a candidate function complete set; analyzing a source code packet of the target applet to obtain a target applet code; according to the target applet code, at least two target functions actually used by the target applet are selected from the candidate function corpus. Specifically, for each candidate function, a keyword of the candidate function may be obtained, and if the candidate function keyword is in the applet code, the candidate function is determined to be the target function of the target applet; otherwise, it is determined that the candidate function is not the target function.
S420, determining compatibility information of the host program of the target applet for each target function.
Specifically, a test case of a target function can be obtained; based on the test case of the host program executing the target function, it is determined whether the host environment supports the target function.
S430, determining distributable scores of the target applets according to the calling frequency of the at least two target functions in the target applets and the compatibility information of the host program on the at least two target functions.
Specifically, the distributable score of the target applet may be determined by the following formula:
wherein M is the distributable score of the target applet, n is the number of target functions in the target applet, c (i) is the calling frequency of the ith target function, v (i) is the compatibility score of the host program to the ith target function; wherein, in the case that the host program is compatible with the ith target function, v (i) takes a value of a first numerical value; in the case that the host program is not compatible with the ith target function, the value of v (i) is a second value, and the second value is smaller than the first value. For example, the first value may be 1 and the second value may be 0.
S440, comparing the distributable score of the target applet with an applet score threshold value, and determining the distribution type of the target applet in the host program according to the comparison result.
Specifically, if the applet score is greater than the threshold value of the host environment, determining that the identification result of the target applet is distributable; if the applet score is smaller than the threshold value of the host environment, determining that the identification result of the target applet is non-distributable.
Wherein the applet score threshold may be determined by:
A. the applet that is relatively large in user usage may be used as a reference applet and a human experience score for the reference applet may be determined.
Specifically, the artificial experience scores of different test users on the reference applet can be obtained, and the average artificial experience score of different test users on the reference applet is used as the artificial experience score of the reference applet.
B. And taking the reference applet with the artificial experience score larger than the experience score threshold as the auxiliary applet.
C. The distributable score for each secondary applet is determined separately and the lowest distributable score is taken as the applet score threshold.
According to the technical scheme, the distributable score of the target applet is determined by combining the calling times of the target function when the target applet actually runs and the supporting condition of the host program on the target function; combining the manual verification scores of the applet test sets to obtain an applet score threshold; and determining whether the target applet can be distributed in the host program according to the applet score threshold value, and improving the distribution rate and recall rate of the target applet on the premise of ensuring the use experience of the user on the target applet.
Fig. 5 is a schematic diagram of an applet distributing apparatus according to an embodiment of the present disclosure, which is applicable to a case of determining whether an applet can be distributed in a host program. The device is configured in an electronic apparatus. Referring to fig. 5, the applet distributing apparatus 500 specifically includes the following:
a target function module 501, configured to determine at least two target functions that need to be used by the target applet;
a distributable score module 502, configured to determine a distributable score of the target applet according to the calling frequency of the at least two target functions in the target applet and the compatibility information of the host program to the at least two target functions;
a distribution type module 503, configured to determine a distribution type of the target applet in the host program according to the distributable score of the target applet.
In an alternative embodiment, the distributable scoring module 502 includes:
the first scoring unit is used for determining a first score of the target applet according to the calling frequency of the at least two target functions in the target applet and the compatibility information of the host program on the at least two target functions;
a second scoring unit, configured to determine a second score of the target applet according to the call frequency of at least two target functions in the target applet;
and a distributable scoring unit for taking the ratio of the first score to the second score as a distributable score of the target applet.
In an alternative embodiment, the first scoring unit is specifically configured to:
the first score for the objective applet is determined by the following formula:
wherein S is the first score of the target applet, n is the number of target functions in the target applet, c (i) is the call frequency of the ith target function, v (i) is the compatibility score of the host program on the ith target function; wherein, in the case that the host program is compatible with the ith target function, v (i) takes a value of a first numerical value; in the case that the host program is not compatible with the ith target function, the value of v (i) is a second value, and the second value is smaller than the first value.
In an alternative embodiment, the distribution type module 503 includes:
a comparison unit for comparing the distributable score of the target applet with an applet score threshold;
and the distribution type unit is used for determining that the distribution type of the target applet in the host program is non-distributable in the case that the distributable score of the target applet is smaller than the applet score threshold value.
In an alternative embodiment, the applet distribution apparatus 500 further includes an applet scoring threshold module comprising:
the reference applet unit is used for taking a reference applet with the artificial experience score larger than the experience score threshold as an auxiliary applet;
and the applet score threshold unit is used for determining the distributable score of the auxiliary applet and determining the applet score threshold according to the distributable score of the auxiliary applet.
In an alternative embodiment, the target function module 501 includes:
a candidate function unit, configured to obtain a candidate function usable by the target applet, and obtain a keyword of the candidate function;
the applet code unit is used for acquiring target applet codes;
and the target function unit is used for enabling the target applet to use any candidate function if the target applet code comprises the key word of the candidate function.
In an alternative embodiment, the applet distribution apparatus 500 further includes a compatibility information determination module, the compatibility information determination module including:
the test case unit is used for acquiring a test case of the target function;
and the compatibility information determining unit is used for executing the test case of the target function based on the host program and determining whether the host program is compatible with the target function according to the execution result.
According to the technical scheme, the distributable score of the target applet is determined by combining the calling times of the target function when the target applet actually runs and the supporting condition of the host program on the target function; combining the manual verification scores of the applet test sets to obtain an applet score threshold; the distributable score of the applet and the applet score threshold are compared to determine whether the target applet can be distributed in the host program, and the distribution rate and recall rate of the target applet can be improved on the premise of ensuring the use experience of the user on the target applet.
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. 6 illustrates an example electronic device that may be used to implement embodiments of the present disclosure
600. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. 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. 6, the apparatus 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 may also be stored. The computing unit 601, ROM602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Various components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing functions. Some examples of computing unit 601 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 executing machine learning model algorithms, a digital information processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the respective methods and processes described above, such as the distribution method of the applet. For example, in some embodiments, the method of distributing the applet may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM602 and/or the communication unit 609. When a computer program is loaded into RAM 603 and executed by computing unit 601, one or more steps of the applet distribution method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the distribution method of the applet 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), blockchain networks, 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 executing 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 are overcome.
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 (12)

1. A method of distributing applets, comprising:
determining at least two target functions required to be used by the target applet;
determining a first score of the target applet according to the calling frequency of the at least two target functions in the target applet and the compatibility information of the host program on the at least two target functions;
determining a second score of the target applet according to the calling frequency of the at least two target functions in the target applet;
-taking the ratio of the first score to the second score as a distributable score of the objective applet;
determining the distribution type of the target applet in the host program according to the distributable score of the target applet;
wherein a first score for the targeted applet is determined by the following formula:
S=;
wherein S is the first score of the target applet, n is the number of target functions in the target applet, c (i) is the call frequency of the ith target function,a compatibility score for the host program for the ith target function; wherein, in case the host program is compatible with the ith target function, the +.>The value is a first value; in case the host program is not compatible with the ith target function,/i>The value is a second value, and the second value is smaller than the first value.
2. The method of claim 1, wherein the determining the distribution type of the target applet in the host program according to the distributable score of the target applet comprises:
comparing the distributable score of the target applet to an applet score threshold;
and determining that the distribution type of the target applet in the host program is non-distributable in the case that the distributable score of the target applet is smaller than the applet score threshold.
3. The method of claim 2, prior to said comparing the distributable score of the target applet to an applet score threshold, further comprising:
taking a reference applet with the artificial experience score larger than the experience score threshold as an auxiliary applet;
a distributable score of the secondary applet is determined and the applet score threshold is determined from the distributable score of the secondary applet.
4. The method of claim 1, wherein the determining at least two target functions that the target applet needs to use comprises:
acquiring candidate functions usable by a target applet, and acquiring keywords of the candidate functions;
acquiring a target applet code;
if the target applet code includes keywords for any of the candidate functions, the target applet needs to use the candidate function.
5. The method of claim 1, further comprising, prior to the determining the distributable score of the target applet:
acquiring a test case of a target function;
and executing the test case of the target function based on the host program, and determining whether the host program is compatible with the target function according to an execution result.
6. An applet distribution apparatus comprising:
the target function module is used for determining at least two target functions required to be used by the target applet;
a distributable scoring module comprising: a first scoring unit, a second scoring unit, and a distributable scoring unit;
the first scoring unit is used for determining a first score of the target applet according to the calling frequency of the at least two target functions in the target applet and the compatibility information of the host program on the at least two target functions;
the second scoring unit is used for determining a second score of the target applet according to the calling frequency of the at least two target functions in the target applet;
the distributable scoring unit is used for taking the ratio of the first score to the second score as the distributable score of the target applet;
a distribution type module, configured to determine a distribution type of the target applet in the host program according to the distributable score of the target applet;
the first scoring unit is specifically configured to:
determining a first score for the targeted applet by the following formula:
S=;
wherein S is the first score of the target applet, n is the number of target functions in the target applet, c (i) is the call frequency of the ith target function,a compatibility score for the host program for the ith target function; wherein, in case the host program is compatible with the ith target function, the +.>The value is a first value; in case the host program is not compatible with the ith target function,/i>The value is a second value, and the second value is smaller than the first value.
7. The apparatus of claim 6, wherein the distribution type module comprises:
a comparison unit for comparing the distributable score of the target applet with an applet score threshold;
and the distribution type unit is used for determining that the distribution type of the target applet in the host program is non-distributable in the case that the distributable score of the target applet is smaller than the applet score threshold value.
8. The apparatus of claim 7, further comprising an applet scoring threshold module, the applet scoring threshold module comprising:
the reference applet unit is used for taking a reference applet with the artificial experience score larger than the experience score threshold as an auxiliary applet;
and the applet score threshold unit is used for determining the distributable score of the auxiliary applet and determining the applet score threshold according to the distributable score of the auxiliary applet.
9. The apparatus of claim 6, wherein the target function module comprises:
a candidate function unit, configured to acquire a candidate function usable by a target applet, and acquire a keyword of the candidate function;
the applet code unit is used for acquiring target applet codes;
and the target function unit is used for enabling the target applet to use the candidate function if the target applet code comprises any keyword of the candidate function.
10. The apparatus of claim 6, further comprising a compatibility information determination module, the compatibility information determination module comprising:
the test case unit is used for acquiring a test case of the target function;
and the compatibility information determining unit is used for executing the test case of the target function based on the host program and determining whether the host program is compatible with the target function according to an execution result.
11. 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-5.
12. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-5.
CN202110553882.4A 2021-05-20 2021-05-20 Method, device, equipment and storage medium for distributing small program Active CN113238765B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110553882.4A CN113238765B (en) 2021-05-20 2021-05-20 Method, device, equipment and storage medium for distributing small program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110553882.4A CN113238765B (en) 2021-05-20 2021-05-20 Method, device, equipment and storage medium for distributing small program

Publications (2)

Publication Number Publication Date
CN113238765A CN113238765A (en) 2021-08-10
CN113238765B true CN113238765B (en) 2024-04-02

Family

ID=77138011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110553882.4A Active CN113238765B (en) 2021-05-20 2021-05-20 Method, device, equipment and storage medium for distributing small program

Country Status (1)

Country Link
CN (1) CN113238765B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306887A (en) * 2020-11-12 2021-02-02 广州方硅信息技术有限公司 Program test distribution method and corresponding device, equipment and medium
CN112433788A (en) * 2020-11-23 2021-03-02 百度在线网络技术(北京)有限公司 Applet running method and device, electronic equipment and storage medium
WO2021088909A1 (en) * 2019-11-06 2021-05-14 第四范式(北京)技术有限公司 Method and system for assisting operator development
CN112817869A (en) * 2021-02-25 2021-05-18 网易(杭州)网络有限公司 Test method, test device, test medium, and electronic apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7171485B2 (en) * 2001-10-17 2007-01-30 Velcero Broadband Applications, Llc Broadband network system configured to transport audio or video at the transport layer, and associated method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021088909A1 (en) * 2019-11-06 2021-05-14 第四范式(北京)技术有限公司 Method and system for assisting operator development
CN112306887A (en) * 2020-11-12 2021-02-02 广州方硅信息技术有限公司 Program test distribution method and corresponding device, equipment and medium
CN112433788A (en) * 2020-11-23 2021-03-02 百度在线网络技术(北京)有限公司 Applet running method and device, electronic equipment and storage medium
CN112817869A (en) * 2021-02-25 2021-05-18 网易(杭州)网络有限公司 Test method, test device, test medium, and electronic apparatus

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
宫承波 ; 王玉风 ; .立足小需求,做足轻应用:微信小程序无缝连接走向探析.新闻论坛.2017,(06),全文. *

Also Published As

Publication number Publication date
CN113238765A (en) 2021-08-10

Similar Documents

Publication Publication Date Title
CN113836314B (en) Knowledge graph construction method, device, equipment and storage medium
CN112528641A (en) Method and device for establishing information extraction model, electronic equipment and readable storage medium
CN114244795B (en) Information pushing method, device, equipment and medium
CN114116997A (en) Knowledge question answering method, knowledge question answering device, electronic equipment and storage medium
CN112989235A (en) Knowledge base-based internal link construction method, device, equipment and storage medium
CN113238765B (en) Method, device, equipment and storage medium for distributing small program
CN116204624A (en) Response method, response device, electronic equipment and storage medium
CN114444514B (en) Semantic matching model training method, semantic matching method and related device
CN113495841B (en) Compatibility detection method, device, equipment, storage medium and program product
CN113032251B (en) Method, device and storage medium for determining service quality of application program
CN113408280A (en) Negative example construction method, device, equipment and storage medium
CN114138358A (en) Application program starting optimization method, device, equipment and storage medium
CN116244740B (en) Log desensitization method and device, electronic equipment and storage medium
CN113239296B (en) Method, device, equipment and medium for displaying small program
CN112989797B (en) Model training and text expansion methods, devices, equipment and storage medium
CN113010721B (en) Picture auditing method and device, electronic equipment and storage medium
CN114490976B (en) Method, device, equipment and storage medium for generating dialogue abstract training data
CN116089459B (en) Data retrieval method, device, electronic equipment and storage medium
CN116069914B (en) Training data generation method, model training method and device
CN115391618A (en) Data identification method and device, electronic equipment and storage medium
CN114942979A (en) Short text problem matching method and device
CN114399333A (en) Method, device, equipment and storage medium for detecting medium information releasing effect
CN113947082A (en) Word segmentation processing method, device, equipment and storage medium
CN114328855A (en) Document query method and device, electronic equipment and readable storage medium
CN117743577A (en) Text classification method, device, electronic equipment and storage medium

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