A plug-in determining method and device, electronic equipment and storage medium

By reading the plugin description information to determine the plugin's target function, the problems of low plugin invocation efficiency and poor scalability are solved, enabling efficient and secure plugin invocation and expansion.

CN114217873BActive Publication Date: 2026-01-20DOUYIN VISION CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111542574.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2026-01-20
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

In existing technologies, plugins are inefficient to invoke and have poor scalability. In particular, they require repeated loading and unloading when determining whether a plugin has the target function, resulting in low efficiency and poor security.

Method used

By reading the plugin description information, it can be determined whether the plugin has the target function without loading and parsing the plugin. The function description, version information and ID in the plugin description information are used in combination with memory mapping technology to improve efficiency, and the loading priority is set by setting the plugin description information to ensure scalability.

Benefits of technology

It improves the efficiency of plugin invocation, reduces the number of loading and unloading operations, ensures the security of plugin invocation, and guarantees the extensibility of plugins.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114217873B_ABST
    Figure CN114217873B_ABST
Patent Text Reader

Abstract

The present disclosure provides a plug-in determination method and device, electronic equipment, readable storage medium and computer program product, and relates to the field of operating systems. The method comprises: traversing a pre-configured plug-in storage directory to obtain at least one to-be-detected plug-in, the to-be-detected plug-in being a pre-configured plug-in with a specific function; reading plug-in description information carried in the to-be-detected plug-in, and determining a target plug-in with a target function in the at least one to-be-detected plug-in based on the plug-in description information, the plug-in description information being information pre-configured in the to-be-detected plug-in and used at least to describe the specific function. When determining the specific function of the to-be-detected plug-in, the method does not need to load and parse the to-be-detected plug-in completely, but can determine the specific function of the to-be-detected plug-in by reading the plug-in description information, and then determine whether the to-be-detected plug-in is the target plug-in. Thus, the efficiency of determining the specific function of the to-be-detected plug-in is improved, and the calling efficiency of the plug-in is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer, in particular to a plug-in determination method and device, electronic equipment, readable storage medium and computer program product. BACKGROUND

[0002] A plug-in is a program written according to a certain specification of application program interface, which runs under the operating system specified by the program and is used to realize various specific functions. Therefore, the plug-in plays a crucial role in the operating system. SUMMARY

[0003] The present disclosure provides a plug-in determination method, device, electronic equipment, readable storage medium and computer program product to improve the calling efficiency of the plug-in and ensure the scalability of the plug-in.

[0004] According to an aspect of the present disclosure, a plug-in determination method is provided, which comprises:

[0005] Traversing a pre-configured plug-in storage directory to obtain at least one to-be-detected plug-in, the to-be-detected plug-in being a pre-configured plug-in having a specific function;

[0006] Reading plug-in description information carried in the to-be-detected plug-in, and determining a target plug-in having a target function in the at least one to-be-detected plug-in based on the plug-in description information, the plug-in description information being information pre-configured in the to-be-detected plug-in and at least used to describe the specific function.

[0007] According to a second aspect of the present disclosure, a plug-in determination device is provided, which comprises:

[0008] A to-be-detected plug-in determination unit configured to traverse a pre-configured plug-in storage directory to obtain at least one to-be-detected plug-in, the to-be-detected plug-in being a pre-configured plug-in having a specific function;

[0009] A target plug-in determination unit configured to read plug-in description information carried in the to-be-detected plug-in, and determine a target plug-in having a target function in the at least one to-be-detected plug-in based on the plug-in description information, the plug-in description information being information pre-configured in the to-be-detected plug-in and at least used to describe the specific function.

[0010] According to another aspect of the present disclosure, an electronic equipment is provided, which comprises:

[0011] At least one processor; and

[0012] A memory in communication connection with the at least one processor; wherein

[0013] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the methods in any embodiment of this disclosure.

[0014] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing a computer to perform the methods of any embodiment of this disclosure.

[0015] According to another aspect of this disclosure, a computer program product is provided, including a computer program / instructions, characterized in that the computer program / instructions, when executed by a processor, implement the methods in any embodiment of this disclosure.

[0016] The technology disclosed herein can identify a target plugin whose specific function includes the target function by reading plugin description information carried in the plugin to be tested. Therefore, when determining the specific function of a plugin to be tested, it is not necessary to load and parse the plugin completely; instead, the specific function of the plugin to be tested can be determined simply by reading the plugin description information carried in the plugin to be tested, thereby determining whether the plugin to be tested is the target plugin. This improves the efficiency of determining the specific function of a plugin to be tested, and consequently improves the efficiency of plugin invocation.

[0017] In addition, in the technology disclosed herein, since the plugin to be tested is a pre-configured plugin with specific functions, the plugin is ensured to have better scalability.

[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0019] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0020] Figure 1 A flowchart illustrating a method for determining a plug-in in an embodiment of this disclosure;

[0021] Figure 2 A flowchart illustrating a method for determining a first type of plug-in as provided in an embodiment of this disclosure;

[0022] Figure 3 A flowchart illustrating another method for determining a plug-in provided in an embodiment of this disclosure;

[0023] Figure 4 This is a schematic diagram of a plug-in determining device provided in an embodiment of the present disclosure;

[0024] Figure 5 This is a schematic diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0025] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0026] In the embodiments of this disclosure, the operating system supporting the plugin can be various GNU / Linux distributions, such as Ubuntu, Debian, Red Hat, etc.; it can also be the Android operating system, covering Android OS (Operating System) released by Google, as well as AOSP (Android Open Source Project) and various derivative systems based on AOSP, such as MIUI, EMUI, OneUI, etc.; or it can be other common operating systems.

[0027] Plugins are typically implemented in two ways: the first is to integrate multiple functions into one plugin; the second is to configure different plugins for different functions.

[0028] For the first type of plugin implementation, if a plugin needs to be called to achieve a specific target function, it must first be determined whether the plugin contains that target function. In this case, the plugin needs to be loaded into the program and parsed to obtain its functionality, thus further determining whether the plugin possesses the target function. This results in time-consuming confirmation of the target plugin, leading to low plugin invocation efficiency. Furthermore, combining multiple functions into a single plugin also results in poor plugin extensibility.

[0029] For the second implementation of plugins, if a specific function needs to be achieved by calling a plugin, it's necessary to detect the target plugin with that function among different plugins. That is, determining whether a target plugin with the desired function exists among multiple plugins. In this case, related technologies often require loading all plugins currently being tested and calling relevant interfaces to obtain the specific function of each plugin, thus determining whether it possesses the target function. Furthermore, if the current plugin is not the target plugin, it needs to be uninstalled.

[0030] While the second implementation of the plugin ensures high scalability, it requires loading and unloading multiple plugins during the target plugin identification process. This leads to time-consuming target plugin confirmation and consequently, low plugin invocation efficiency. Furthermore, repeated loading and unloading of plugins also compromises the security of plugin invocation.

[0031] To address the issue of low plugin invocation efficiency while simultaneously ensuring high plugin scalability, this disclosure provides a method for determining plugins. Please refer to [link / reference needed] for details. Figure 1 , Figure 1 This is a flowchart illustrating a method for determining a plugin according to an embodiment of this disclosure. The method for determining a plugin includes the following steps:

[0032] Step S101: Traverse the pre-configured plugin storage directory to obtain at least one plugin to be tested. The plugin to be tested is a pre-configured plugin with a specific function.

[0033] Step S102: Read the plugin description information carried in the plugin to be tested, and based on the plugin description information, determine the target plugin with the target function in at least one plugin to be tested. The plugin description information is information pre-configured in the plugin to be tested that is used to describe a specific function.

[0034] The plugin determination method in this embodiment can identify a target plugin whose specific function includes the target function by reading plugin description information carried in the plugin to be detected, among at least one plugin to be detected. Therefore, when determining the specific function of a plugin to be detected, it is not necessary to load and parse the plugin completely; instead, the specific function of the plugin to be detected can be determined simply by reading the plugin description information carried in the plugin to be detected, thereby determining whether the plugin to be detected is the target plugin. This improves the efficiency of determining the specific function of a plugin to be detected, and consequently improves the efficiency of plugin invocation.

[0035] The specific implementation method for obtaining the specific function of a plugin under test using plugin description information can be as follows: read and parse the plugin description information in the plugin under test to obtain the specific function described in the plugin description information, thereby determining the specific function of the plugin under test. Furthermore, to reduce the amount of data copying required for reading information, memory mapping can be further employed to read the plugin description information in the plugin under test.

[0036] Furthermore, in the embodiments of this disclosure, since the plugin to be detected is a pre-configured plugin with specific functions, better scalability of the plugin is ensured. And since there is no need to repeatedly load and unload the plugin, the security of plugin calls is also guaranteed.

[0037] In the embodiments disclosed herein, no specific limitations are made on the function, type, or file type of the plugin. Common plugins include: browser extension plugins, search plugins, testing plugins, advertising plugins, banking plugins, desktop plugins, and other plugins used to perform certain intentional operations.

[0038] The so-called plugin description information refers to the information carried in the plugin to be tested that describes at least a specific function.

[0039] A specific function refers to a specific function that can be achieved through a plugin; a target function refers to a function that meets preset functional requirements. A target plugin with a target function refers to a target plugin that possesses specific functions, including the target function.

[0040] Even within the same type of plugin, there are multiple sub-categories based on their specific functions. Taking browser plugins as an example, common browser plugins include: translation plugins for language translation, ad-blocking plugins for ad blocking, and download plugins for file downloading.

[0041] Of course, different plugins can also have the same specific function. That is, the same function can be achieved through different plugins. Specifically, multiple different image plugins can be used to parse JPEG (Joint Photographic Experts Group) format images. For example, in practical applications, the initial plugin is continuously optimized and upgraded, resulting in multiple versions of different plugins with specific functions. Specifically, there's the initial version of the plugin (plugin version 1.0), the second version (plugin version 2.0) resulting from optimizing and upgrading the initial version, and the third version (plugin version 3.0) resulting from further optimizing and upgrading the second version.

[0042] In the embodiments of this disclosure, the so-called plugin description information can be used not only to describe the plugin's functions, but also to describe the plugin's version information, plugin name, and plugin ID (Identity Document) pre-configured for the plugin.

[0043] Plugin descriptions are typically imported during the pre-configuration of the plugin to be tested. Because JSON (JavaScript Object Notation) is easy for humans to read and write, and also easy for machines to parse and generate, plugin descriptions are usually in JSON format. Of course, other data formats besides JSON can also be used.

[0044] The so-called plugin storage directory is the storage directory configured for storing plugins in the preset storage space.

[0045] In order to achieve accurate and comprehensive detection of the plugins to be detected, thereby increasing the probability of detecting the target plugins, the implementation method of determining at least one plugin to be detected in the embodiments of this disclosure includes: first, determining a pre-configured plugin storage directory; then, traversing the plugin storage directory and taking the plugins stored in the plugin storage directory as plugins to be detected.

[0046] To improve the detection efficiency of target plugins and thus further improve the plugin invocation efficiency, the embodiments of this disclosure may employ the following steps to determine the target plugin, as detailed in the following references. Figure 2 , Figure 2 This is a flowchart illustrating a method for determining a first type of plug-in, as provided in an embodiment of this disclosure. The specific steps of this method are as follows:

[0047] Step S201: Based on the plugin description information, sequentially check whether the plugins to be tested have the target function.

[0048] Step S202: If the plugin to be tested is found to have the target function, the plugin to be tested with the target function is identified as the target plugin.

[0049] Step S203: If no plugin with the target function is detected after traversing at least one plugin to be tested, it is determined that the target plugin does not exist among at least one plugin to be tested.

[0050] In other words, all plugins to be tested are tested sequentially in order. Once a plugin with the target function is detected, further testing of the remaining plugins is stopped, and the plugin with the target function is identified as the target plugin.

[0051] If no plugin with the target function is detected, the remaining plugins need to be tested sequentially. If no plugin with the target function is detected after testing all the plugins, it is determined that at least one plugin does not contain the target plugin.

[0052] Since at least one plugin to be tested may contain multiple plugins with the target function. For example, there may be different versions of an initial plugin with the target function that have been optimized and upgraded; or there may be different plugins of different types but all with the target function. In this case, in order to ensure that the optimal performance of different plugins in implementing the same specific function is distinguished, different loading priorities can be set for different plugins in advance based on their performance when implementing the same specific function, and the loading priority of the corresponding plugin can be described by the plugin description information.

[0053] Loading priority refers to the degree to which plugins implementing a specific function are loaded first. Taking a plugin description in JSON format as an example, when the plugin description also describes the loading priority of the plugin being tested, the plugin description information would look like this:

[0054] "type": "image Decode", / / Change the plugin type to image decoding;

[0055] "decode Type": "JPEG", / / decoding type, JPEG format image;

[0056] "priority": 1, / / priority;

[0057] "id": "1234567890", / / The unique serial number of this plugin;

[0058] "description": "decode jpeg image".

[0059] To ensure that the selected target plugin is the preferred plugin for achieving the target function, and given that the plugin description information also describes the loading priority of the plugin under test, the specific implementation process is as follows: Figure 3 , Figure 3 This is a flowchart illustrating another method for determining a plugin provided in an embodiment of this disclosure. The specific steps of this method are as follows:

[0060] Step S301: Based on the plugin description information, sequentially check whether the plugins to be tested have the target function.

[0061] Step S302: If the plugin to be tested is found to have the target function, the plugin to be tested with the target function is identified as a candidate plugin.

[0062] Step S303: Based on the plugin description information, determine whether the candidate plugin needs to be checked for loading priority;

[0063] Step S304: If the candidate plugin does not need to be checked for loading priority, the candidate plugin is determined as the target plugin.

[0064] Step S305: If the candidate plugin needs to be checked for loading priority, traverse at least one of the remaining plugins to be tested to obtain other plugins to be tested that meet the target function.

[0065] Step S306: Identify the target plugin from the candidate plugins and other plugins to be detected.

[0066] Step S307: If no plugin with the target function is detected after traversing at least one plugin to be tested, it is determined that the target plugin does not exist among at least one plugin to be tested.

[0067] In the embodiments of this disclosure, for different versions of plugins resulting from continuous optimization and upgrades of the initial plugin, the priority of different versions of plugins can be determined according to the plugin version update order. Specifically, the newer the plugin version, the higher the loading priority of that version of the plugin. For example, for three different versions of the same plugin that implements JPEG image parsing: "JPEG Image Parsing Plugin Version 1.0", "JPEG Image Parsing Plugin Version 2.0", and "JPEG Image Parsing Plugin Version 3.0", when the target function is to implement JPEG image parsing, the loading priority of "JPEG Image Parsing Plugin Version 1.0", "JPEG Image Parsing Plugin Version 2.0", and "JPEG Image Parsing Plugin Version 3.0" increases sequentially.

[0068] For different plugins of different types but all with specific functions, the loading priorities of various plugins implementing the specified function can be pre-set based on their performance when implementing that function. For example, for multiple different plugins that implement JPEG image parsing: "JPEG Image Parsing Plugin 1", "JPEG Image Parsing Plugin 2", and "JPEG Image Parsing Plugin 3", the loading priorities of "JPEG Image Parsing Plugin 1", "JPEG Image Parsing Plugin 2", and "JPEG Image Parsing Plugin 3" can be pre-set to low, medium, and high, respectively.

[0069] In the embodiments of this disclosure, when determining a target plugin, the system first determines whether the plugin to be tested has the target function based on the functional description information in the plugin description information. If a plugin to be tested is found to have the target function, the detection of the remaining plugins to be tested is stopped, and the plugin to be tested with the target function is determined as a candidate plugin. Furthermore, the system further determines whether the plugin description information includes information describing the loading priority.

[0070] Specifically, the implementation of determining whether a candidate plugin needs to undergo loading priority verification based on plugin description information is as follows: determine whether the plugin description information of the candidate plugin includes information describing the loading priority; if so, determine that the candidate plugin needs to undergo loading priority verification; otherwise, determine that the candidate plugin does not need to undergo loading priority verification.

[0071] When the plugin description information of the candidate plugin includes information describing the loading priority, it is necessary to traverse at least one plugin to be tested to obtain at least one plugin to be tested that has all the target functions as candidate plugins, and then determine the target plugin from all candidate plugins.

[0072] In the embodiments of this disclosure, in order to ensure that the target plugin is the optimal plugin for implementing the target function, the plugin with the highest loading priority can be selected as the target plugin from at least one candidate plugin. The specific implementation process is as follows: First, obtain the loading priorities of the candidate plugins and other plugins to be tested; then, determine the plugin to be tested with the highest loading priority from among the candidate plugins and other plugins to be tested; finally, determine the plugin to be tested with the highest loading priority as the target plugin.

[0073] In the embodiments of this disclosure, a priority threshold can also be set for priority, and among candidate plugins and other plugins to be detected, the plugins to be detected whose loading priority reaches the priority threshold can be identified as target plugins.

[0074] Furthermore, to improve the efficiency and accuracy of target plugin identification, in the embodiments of this disclosure, after identifying at least one plugin to be detected, a plugin list is generated for each plugin, recording the plugin ID, plugin name, and plugin detection order. Then, the plugins to be detected are sequentially checked according to the plugin detection order to determine whether they possess the target function.

[0075] In the embodiments of this disclosure, after identifying the target plugin among at least one plugin to be detected, the target plugin can be further loaded, and the target function can be executed based on the target plugin, thereby achieving the target function.

[0076] like Figure 4 As shown, embodiments of this disclosure provide a plug-in determining apparatus, including:

[0077] The plugin determination unit 401 is used to traverse the pre-configured plugin storage directory to obtain at least one plugin to be detected, which is a pre-configured plugin with a specific function.

[0078] The target plugin determination unit 402 is used to read the plugin description information carried in the plugin to be detected, and based on the plugin description information, determine the target plugin with the target function in at least one plugin to be detected. The plugin description information is information pre-configured in the plugin to be detected that is at least used to describe a specific function.

[0079] In another embodiment of this disclosure, the plug-in to be detected determination unit 401 may further include:

[0080] The storage directory determination sub-unit is used to determine the plugin storage directory;

[0081] The storage directory traversal sub-unit is used to traverse the plugin storage directory and identify the plugins stored in the plugin storage directory as plugins to be tested.

[0082] In another embodiment of this disclosure, the target plug-in determination unit 402 may further include:

[0083] The first functional requirement detection subunit is used to detect whether the plugins to be detected have the target function based on the plugin description information.

[0084] The first target determination subunit is used to determine the plug-in with the target function as the target plug-in when it is detected that the plug-in to be tested has the target function.

[0085] In another embodiment of this disclosure, the target plug-in determination unit 402 may further include:

[0086] The second functional requirement detection subunit is used to detect whether the plugin to be detected has the target function based on the plugin description information, when the plugin description information is also used to describe the loading priority of the plugin to be detected.

[0087] The candidate plugin determination subunit is used to determine the plugin with the target function as a candidate plugin when it is detected that the plugin to be tested has the target function.

[0088] The priority verification and determination subunit is used to determine whether candidate plugins need to undergo loading priority verification based on plugin description information.

[0089] The second target plugin determination subunit is used to determine the candidate plugin as the target plugin when the candidate plugin does not need to be checked for loading priority.

[0090] In another embodiment of this disclosure, the target plug-in determination unit 402 may further include:

[0091] The plugin to be tested traversal sub-unit is used to traverse untested plugins to obtain other plugins to be tested that have the target function when the candidate plugins need to be checked for loading priority.

[0092] The third target plugin determination subunit is used to determine the target plugin among candidate plugins and other plugins to be detected.

[0093] In another embodiment of this disclosure, the third target plugin determining subunit may further include:

[0094] Obtain the loading priority of candidate plugins and other plugins to be tested;

[0095] The fourth target plugin determination subunit is used to determine the highest loading priority plugin as the target plugin among candidate plugins and other plugins to be detected.

[0096] In another embodiment of this disclosure, the target plug-in determination unit 402 may further include:

[0097] The fifth target plugin determination subunit is used to determine that at least one target plugin does not exist if no target plugin with the target function is detected after traversing at least one target plugin.

[0098] In another embodiment of this disclosure, the apparatus may further include:

[0099] The target plugin loading unit is used to load the target plugin;

[0100] Function execution unit, used to execute target functions based on target plugins.

[0101] According to embodiments of this disclosure, this disclosure also provides an electronic device and a readable storage medium.

[0102] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0103] like Figure 5As shown, device 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 502 or a computer program loaded from storage unit 508 into random access memory (RAM) 503. RAM 503 may also store various programs and data required for the operation of device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.

[0104] Multiple components in device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of monitors, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0105] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose 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 501 performs the various methods and processes described above, such as the plug-in determination method. For example, in some embodiments, the plug-in determination method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the plug-in determination method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the plug-in determination method by any other suitable means (e.g., by means of firmware).

[0106] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0107] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This 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 when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0108] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0109] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0110] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0111] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0112] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0113] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for determining a plug-in, characterized in that, include: Traverse the pre-configured plugin storage directory to obtain at least one plugin to be detected, wherein the plugin to be detected is a pre-configured plugin with a specific function; Read the plugin description information carried in the plugin to be detected, and based on the plugin description information, determine the target plugin with the target function in at least one of the plugins to be detected. The plugin description information is information pre-configured in the plugin to be detected that is at least used to describe the specific function. The plugin description information is also used to describe the loading priority of the plugin. For different plugins of different types but with the same specific function, the loading priority is set in advance for the different plugins based on their performance when implementing the same function. For different versions of plugins generated by optimizing and upgrading the same initial plugin, the loading priority is set in advance for the different versions of plugins based on their version update order. When the plugin description information is also used to describe the loading priority of the plugin to be detected, determining the target plugin with the target function among at least one of the plugins to be detected includes: If the plugin to be tested is found to have the target function, the plugin to be tested with the target function is identified as a candidate plugin; If the plugin description information of the candidate plugin includes information describing the loading priority, at least one of the plugins to be detected is traversed to obtain other plugins to be detected that have the target function. The target plugin is determined from the candidate plugins and other plugins to be detected.

2. The method according to claim 1, characterized in that, The steps for determining the plugin to be detected include: Determine the plugin storage directory; Traverse the plugin storage directory and identify the plugins stored in the plugin storage directory as the plugins to be detected.

3. The method according to claim 1, characterized in that, The step of identifying a target plugin with the target function among at least one of the plugins to be detected includes: Based on the plugin description information, the plugins to be tested are sequentially checked to see if they have the target function; If the plugin to be tested is found to have the target function, the plugin to be tested that has the target function is identified as the target plugin.

4. The method according to claim 1, characterized in that, The step of determining the target plugin with the target function among at least one of the plugins to be detected further includes: If the description information of the candidate plugin does not include information describing the loading priority, the candidate plugin is determined as the target plugin.

5. The method according to claim 4, characterized in that, The step of determining the target plugin from the candidate plugins and other plugins to be detected includes: Obtain the loading priorities of the candidate plugins and other plugins to be detected; Among the candidate plugins and other plugins to be detected, the plugin with the highest loading priority is determined as the target plugin.

6. The method according to claim 1 or 3, characterized in that, The step of determining the target plugin with the target function among at least one of the plugins to be detected further includes: If, after traversing at least one of the plugins to be detected, no plugin with the target function is detected, it is determined that the target plugin does not exist among at least one of the plugins to be detected.

7. The method according to any one of claims 3-5, characterized in that, The method further includes: Load the target plugin; Based on the target plugin, execute the target function.

8. A device for determining a plug-in, characterized in that, include: The plugin to be detected determination unit is used to traverse a pre-configured plugin storage directory to obtain at least one plugin to be detected, wherein the plugin to be detected is a pre-configured plugin with a specific function; The target plugin determination unit is used to read the plugin description information carried in the plugin to be detected, and based on the plugin description information, determine the target plugin with the target function among at least one of the plugins to be detected. The plugin description information is information pre-configured in the plugin to be detected to describe at least the specific function. The plugin description information is also used to describe the loading priority of the plugin. For different plugins of different types but with the same specific function, the loading priority is pre-set for the different plugins according to the performance of the different plugins when implementing the same function. For different version plugins generated by optimizing and upgrading the same initial plugin, the loading priority is pre-set for the different version plugins according to the version update order of the different version plugins. The target plugin determination unit includes: The second functional requirement detection subunit is used to detect whether the plugin to be detected has the target function based on the plugin description information, when the plugin description information is also used to describe the loading priority of the plugin to be detected. The candidate plugin determination subunit is used to determine the plugin to be tested that has the target function as a candidate plugin when it is detected that the plugin to be tested has the target function. The plugin traversal subunit is used to traverse at least one of the plugins to be detected, when the plugin description information of the candidate plugins includes information describing the loading priority, to obtain other plugins to be detected that have the target function. The third target plugin determination subunit is used to determine the target plugin from the candidate plugins and other plugins to be detected.

9. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; characterized in that the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method described in any one of claims 1 to 7.

11. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for loading application program plugins

    CN102662703A

  • Activity configuration method and device thereof, readable medium and electronic equipment

    CN111190657A

  • Plug-in updating method, device and system

    CN112698858A

  • Dynamically loaded plug-ins to provide an integrated graphical user interface

    US9146757B1