CN116755796A - Plug-in management method, device, medium and electronic equipment - Google Patents

Plug-in management method, device, medium and electronic equipment Download PDF

Info

Publication number
CN116755796A
CN116755796A CN202310715782.6A CN202310715782A CN116755796A CN 116755796 A CN116755796 A CN 116755796A CN 202310715782 A CN202310715782 A CN 202310715782A CN 116755796 A CN116755796 A CN 116755796A
Authority
CN
China
Prior art keywords
plug
compiled
programming language
host service
compiling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310715782.6A
Other languages
Chinese (zh)
Inventor
杜立博
柳泽镕
叶桐
唐家豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Douyin Vision Co Ltd
Original Assignee
Douyin Vision 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 Douyin Vision Co Ltd filed Critical Douyin Vision Co Ltd
Priority to CN202310715782.6A priority Critical patent/CN116755796A/en
Publication of CN116755796A publication Critical patent/CN116755796A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system

Abstract

The disclosure relates to a plug-in management method, a device, a medium and electronic equipment, belongs to the technical field of computers, and can reduce maintenance cost and release potential safety hazards of developers of host services. A method of plug-in management, comprising: respectively associating a plug-in to be loaded by a host service and a programming language version to be compiled by the host service with the host service; scanning the programming language version associated with the hosting service; compiling plug-ins associated with the host service with the scanned programming language version; and storing the compiled product obtained by compiling into a compiled product memory.

Description

Plug-in management method, device, medium and electronic equipment
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a plug-in management method, a device, a medium and electronic equipment.
Background
In the existing plug-in mechanism provided in go language, the plug-in may be dynamically loaded inside the hosting service process, and when loading is complete, the hosting service may call the plug-in with performance approximating native calls.
However, in order for the plug-in to be properly loaded into the hosting service, it is required that the version of go compiled for the hosting service be identical to the version of go compiled for the plug-in. If the two are not identical, a fault is reported when loading the plug-in.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a plug-in management method, including: respectively associating a plug-in to be loaded by a host service and a programming language version to be compiled by the host service with the host service; scanning the programming language version associated with the hosting service; compiling plug-ins associated with the host service with the scanned programming language version; and storing the compiled product obtained by compiling into a compiled product memory.
In a second aspect, the present disclosure provides a card managing apparatus, including: the management module is used for respectively associating plug-in to be loaded by the host service and programming language versions to be compiled of the host service with the host service; a scanning module for scanning the programming language version associated with the hosting service; the compiling module is used for compiling plug-ins associated with the host service by using the scanned programming language version; and the storage module is used for storing the compiled product obtained by compiling into a compiled product memory.
In a third aspect, the present disclosure provides a computer readable medium having stored thereon a computer program which, when executed by a processing device, implements the steps of the method of any of the first aspects of the disclosure.
In a fourth aspect, the present disclosure provides an electronic device comprising: a storage device having a computer program stored thereon; processing means for executing the computer program in the storage means to carry out the steps of the method according to any one of the first aspects of the present disclosure.
By adopting the technical scheme, the plug-in to be loaded by the host service and the programming language version to be compiled by the host service are respectively associated with the host service, the programming language version associated with the host service is scanned, the plug-in associated with the host service is compiled by the scanned programming language version, and the compiled product obtained by compiling is stored in the compiled product memory, so that when the plug-in needs to be loaded by the host service, the corresponding compiled product can be directly searched in the compiled product memory to be directly loaded, all the plug-ins do not need to be compiled once at the same time based on the programming language of the new version, and the maintenance cost and the release potential safety hazard of developers of the host service are greatly reduced.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale. In the drawings:
fig. 1 is a flow chart of a plug-in management method according to one embodiment of the present disclosure.
Fig. 2 is yet another flow chart of a method of plug-in management according to one embodiment of the present disclosure.
Fig. 3 is yet another flow chart of a method of plug-in management according to one embodiment of the present disclosure.
Fig. 4 is a schematic block diagram of a card management apparatus according to one embodiment of the present disclosure.
Fig. 5 shows a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
For example, in response to receiving an active request from a user, a prompt is sent to the user to explicitly prompt the user that the operation it is requesting to perform will require personal information to be obtained and used with the user. Thus, the user can autonomously select whether to provide personal information to software or hardware such as an electronic device, an application program, a server or a storage medium for executing the operation of the technical scheme of the present disclosure according to the prompt information.
As an alternative but non-limiting implementation, in response to receiving an active request from a user, the manner in which the prompt information is sent to the user may be, for example, a popup, in which the prompt information may be presented in a text manner. In addition, a selection control for the user to select to provide personal information to the electronic device in a 'consent' or 'disagreement' manner can be carried in the popup window.
It will be appreciated that the above-described notification and user authorization process is merely illustrative and not limiting of the implementations of the present disclosure, and that other ways of satisfying relevant legal regulations may be applied to the implementations of the present disclosure.
Meanwhile, it can be understood that the data (including but not limited to the data itself, the acquisition or the use of the data) related to the technical scheme should conform to the requirements of the corresponding laws and regulations and related regulations.
Fig. 1 is a flow chart of a plug-in management method according to one embodiment of the present disclosure. As shown in fig. 1, the card managing method includes the following steps S11 to S14.
In step S11, a plug-in to be loaded by the hosting service and a programming language version to be compiled by the hosting service are respectively associated with the hosting service.
A hosting service refers to a fully functional, independently executable program. The hosting service may load the plug-in at runtime, thereby invoking the functions defined within the plug-in.
The programming language may be, for example, go language, etc.
In some embodiments, the programming language version that the hosting service can support and the plug-in to be loaded by the hosting service may be obtained first, and then the hosting service may be associated with the programming language version that it can support and the plug-in to be loaded by the hosting service.
In step S12, the programming language version associated with the hosting service is scanned.
In step S13, plug-ins associated with the hosting service are compiled using the scanned programming language version.
In some embodiments, plug-ins associated with the hosting service may be compiled using a parallel compilation of software configuration management (Software Configuration Management, SCM). For example, if the hosting service is associated with programming language version 1 and programming language version 2, programming language version 1 and programming language version 2 may compile plug-ins associated with the hosting service in parallel.
In step S14, the compiled product obtained by compiling is stored in a compiled product memory.
The compilation product store may be a distribution center to facilitate access to compilation products by users to the distribution center.
In addition, in the compiled product memory, the compiled product may be named according to a corresponding programming language version number. Thus, the compiling product corresponding to the programming language version can be conveniently, quickly and accurately found in the follow-up process.
By adopting the technical scheme, the plug-in to be loaded by the host service and the programming language version to be compiled by the host service can be respectively associated with the host service, the programming language version associated with the host service is scanned, the plug-in associated with the host service is compiled by the scanned programming language version, and the compiled product obtained by compiling is stored in the compiled product memory, so that when the plug-in needs to be loaded by the host service, the corresponding compiled product can be directly searched in the compiled product memory to be directly loaded, and the method is very beneficial to the scene of updating the programming language version by the host service. In the related art, if the host service wants to update the version of the programming language, all the plugins need to be compiled once based on the programming language of the new version and updated at the same time, so that the function of the host service cannot be damaged, however, in the case of too many plugins, for example, in the case of hundreds or even more plugins, huge maintenance cost and potential safety hazard of issuing can be brought to developers of the host service, and even the host service cannot be updated. By means of the technical scheme, the corresponding compiling products are only required to be searched in the compiling product memory to be directly loaded, all plug-ins are not required to be compiled once based on the programming language of the new version, and maintenance cost and release potential safety hazards of developers of host services are greatly reduced.
In some embodiments, the plug-in management method according to an embodiment of the present disclosure may further include: when the host service is to load the first plug-in, determining a programming language version currently compiling the host service, searching a compiling product memory for a compiling product of the first plug-in compiled from the determined programming language version, and loading the searched corresponding compiling product in the host service. Since the plug-in to be loaded by the hosting service and the programming language version to be compiled by the hosting service have been associated with the hosting service in step S11, respectively, this ensures that the compilation product corresponding to the programming language version can be found accurately in the compilation product memory.
By adopting the technical scheme, when the plug-in needs to be loaded by the host service, the compiling product which is matched with the programming language version for compiling the host service at present is automatically searched in the compiling product memory, so that the plug-in can be loaded correctly, and errors can not be reported when the plug-in is loaded.
Fig. 2 is yet another flow chart of a method of plug-in management according to one embodiment of the present disclosure. The flow is applicable to scenarios where the hosting service is to update the programming language version.
As shown in fig. 2, in step S21, a programming language version to be updated is associated with the hosting service.
In step S22, the compiled products in the compiled products memory are scanned to determine whether a plug-in associated with the hosting service has a compiled product compiled from the version of the programming language to be updated.
In step S23, if the plug-in associated with the hosting service does not have a compiled product compiled from the version of the programming language to be updated in the compiled product memory, the plug-in is compiled from the version of the programming language to be updated and the compiled product is stored in the compiled product memory.
If a plug-in associated with the hosting service has a compiled product in the compiled product memory that is compiled from the version of the programming language to be updated, then the plug-in need not be compiled from the version of the programming language to be updated.
In addition, instead of scanning the compiled products in the compiled product memory in the context of the host service to update the programming language version, the compiled products in the compiled product memory may be periodically scanned to determine whether the respective plug-ins associated with the host service have the compiled products compiled from the programming language version associated with the host service in the compiled product memory, and if for a plug-in associated with the host service there are no compiled products compiled from a programming language version associated with the host service in the compiled product memory, the compilation of the plug-ins by the programming language version is automatically triggered and the compiled products are stored in the compiled product memory after the compilation is completed.
By adopting the technical scheme, the programming language version to be updated and the host service can be associated, the compiling products in the compiling product memory are scanned to determine whether the plugin associated with the host service has the compiling products compiled by the programming language version to be updated, if the plugin associated with the host service does not have the compiling products compiled by the programming language version to be updated in the compiling product memory, the plugin is compiled by the programming language version to be updated, and the compiling products obtained by compiling are stored in the compiling product memory, so that the automatic compiling of the plugin can be realized when the programming language version to be updated by the host service, the manual operation of a developer is not needed, the upgrading cost of the host service is greatly reduced, and the problem that the programming language version is difficult to upgrade or even can not be upgraded is solved. In addition, when the host service upgrades the programming language version, since all plug-ins have been compiled and released in the new version programming language, it is ensured that plug-ins can be successfully loaded into the host service.
In some embodiments, the compiling operations in fig. 1 and 2 may include: compiling the call of the plug-in to be loaded to the internal environment variable of the plug-in to be loaded, which is executed when the plug-in to be loaded is loaded by the host service, into: and acquiring and analyzing the self-defined environment variable, and analyzing the internal environment variable of the plug-in to be loaded if the analyzed environment variable does not meet the requirement of the plug-in to be loaded.
In the related art, since the hosting service and the plug-in run in the same process, an Operating System (OS) package is shared between the hosting service and the plug-in, which means that all the plug-ins share the same environment variable. If the logic such as independent authentication is to be realized in the plug-in depending on the environment variable, the logic cannot be realized in the mode of the original plug-in.
By means of the technical scheme, when the plug-in is compiled, the calling mode of the environment variable is modified, namely, the environment variable in the plug-in is not directly called as in the related technology, but the customized environment variable is modified to be called first, and if the customized environment variable can not meet the requirement of the plug-in, the environment variable in the plug-in is called. Through the modification of the environment variable calling mode, the environment information isolation of different plug-ins can be realized. For example, the plug-in real OS library may be replaced with a newly defined Mock OS library when the plug-in is compiled, wherein an interceptor is added to the Mock OS library, and the interceptor is used to filter all calls to the plug-in real OS library.
Fig. 3 is yet another flow chart of a method of plug-in management according to one embodiment of the present disclosure. The process is suitable for environment variable isolation processing when the host service loads the second plug-in.
As shown in fig. 3, first, injecting an environment variable of the hosting service into the second plugin as a customized environment variable, where the customized environment variable may be an environment variable beginning with a plugin name as a prefix; and then, when the second plug-in needs the environment variable, analyzing the environment variable of the host service, and if the analysis result based on the environment variable of the host service does not meet the requirement of the second plug-in, analyzing the environment variable inside the second plug-in. And if the analysis result of the environment variable based on the host service meets the requirement of the second plugin, using the analysis result as the environment variable of the second plugin.
For example, when the second plug-in attempts to acquire the environment variable, the interceptor will be preferentially matched with the environment variable set by the host (i.e. the foregoing customized environment variable), and if there is no match, the interceptor will attempt to acquire the environment variable in the real OS library of the second plug-in.
By adopting the technical scheme, when the plug-in to be loaded by the host service needs the environment variable, the environment variable of the host service is analyzed first, and if the analysis result of the environment variable based on the host service does not meet the requirement of the plug-in to be loaded, the environment variable in the plug-in to be loaded is analyzed, so that the environment information isolation of different plug-ins is realized on the basis of the host environment variable.
Fig. 4 is a schematic block diagram of a card management apparatus according to one embodiment of the present disclosure. As shown in fig. 4, the card managing apparatus includes: a management module 41, configured to associate a plug-in to be loaded by the hosting service and a programming language version to be compiled by the hosting service with the hosting service respectively; a scanning module 42 for scanning the programming language version associated with the hosting service; a compiling module 43, configured to compile plug-ins associated with the hosting service with the scanned programming language version; the storage module 44 is configured to store the compiled product obtained by compiling in a compiled product memory.
By adopting the technical scheme, the plug-in to be loaded by the host service and the programming language version to be compiled by the host service can be respectively associated with the host service, the programming language version associated with the host service is scanned, the plug-in associated with the host service is compiled by the scanned programming language version, and the compiled product obtained by compiling is stored in the compiled product memory, so that when the plug-in needs to be loaded by the host service, the corresponding compiled product can be directly searched in the compiled product memory to be directly loaded, and the method is very beneficial to the scene of updating the programming language version by the host service. In the related art, if the host service wants to update the version of the programming language, all the plugins need to be compiled once based on the programming language of the new version and updated at the same time, so that the function of the host service cannot be damaged, however, in the case of too many plugins, for example, in the case of hundreds or even more plugins, huge maintenance cost and potential safety hazard of issuing can be brought to developers of the host service, and even the host service cannot be updated. By means of the technical scheme, the corresponding compiling products are only required to be searched in the compiling product memory to be directly loaded, all plug-ins are not required to be compiled once based on the programming language of the new version, and maintenance cost and release potential safety hazards of developers of host services are greatly reduced.
Optionally, the plug-in management device further includes a loading module, configured to, when the hosting service is to load the first plug-in: determining a programming language version currently compiling the host service; searching the compiling product memory for a compiling product of the first plug-in compiled from the determined programming language version; and loading the searched corresponding compiled products in the host service.
Optionally, when the hosting service is to update the programming language version: the management module 41 is further configured to associate a programming language version to be updated with the host service; the scanning module 42 is further configured to scan the compiled products in the compiled products memory to determine whether a plug-in associated with the host service has a compiled product compiled from the version of the programming language to be updated; the compiling module 43 is further configured to compile a plug-in associated with the host service from the programming language version to be updated if the plug-in does not have a compiled product in the compiled product memory, and the storing module 44 is further configured to store the compiled product in the compiled product memory.
Optionally, the compiling module 43 performs compiling including: compiling a call of the plug-in to be loaded to the internal environment variable of the plug-in to be loaded, which is to be executed when the plug-in to be loaded is loaded by the host service, into: and acquiring and analyzing the self-defined environment variable, and analyzing the internal environment variable of the plug-in to be loaded if the analyzed environment variable does not meet the requirement of the plug-in to be loaded.
Optionally, the loading module is further configured to, when the hosting service loads the second plug-in: injecting the environment variable of the host service into the second plugin as the custom environment variable; and when the second plug-in needs the environment variable, analyzing the environment variable of the host service, and if the analysis result based on the environment variable of the host service does not meet the requirement of the second plug-in, analyzing the environment variable in the second plug-in.
Optionally, the loading module is further configured to: and if the analysis result based on the environment variable of the host service meets the requirement of the second plug-in, using the analysis result as the environment variable of the second plug-in.
Optionally, the storage module 44 is further configured to: and naming the compiled products according to the corresponding programming language version numbers in the compiled product memory.
There is also provided, in accordance with an embodiment of the present disclosure, a computer readable medium having stored thereon a computer program which, when executed by a processing device, implements the steps of any of the methods of the present disclosure.
There is also provided, in accordance with an embodiment of the present disclosure, an electronic device including: a storage device having a computer program stored thereon; processing means for executing the computer program in the storage means to carry out the steps of any of the methods of the present disclosure.
Referring now to fig. 5, a schematic diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 5, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having 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. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: respectively associating a plug-in to be loaded by a host service and a programming language version to be compiled by the host service with the host service; scanning the programming language version associated with the hosting service; compiling plug-ins associated with the host service with the scanned programming language version; and storing the compiled product obtained by compiling into a compiled product memory.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. Where the name of a module does not constitute a limitation on the module itself in some cases, for example, a scanning module may also be described as "a module for scanning the programming language version with which the hosting service is associated".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
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.
According to one or more embodiments of the present disclosure, example 1 provides a plug-in management method, including: respectively associating a plug-in to be loaded by a host service and a programming language version to be compiled by the host service with the host service; scanning the programming language version associated with the hosting service; compiling plug-ins associated with the host service with the scanned programming language version; and storing the compiled product obtained by compiling into a compiled product memory.
According to one or more embodiments of the present disclosure, example 2 provides the method of example 1, wherein the method further comprises: when the hosting service is to load a first plug-in,
determining a programming language version currently compiling the host service;
searching the compiling product memory for a compiling product of the first plug-in compiled from the determined programming language version;
and loading the searched corresponding compiled products in the host service.
According to one or more embodiments of the present disclosure, example 3 provides the method of example 1, wherein the method further comprises: when the hosting service is to update the programming language version,
associating a programming language version to be updated with the host service;
scanning the compiled products in the compiled products memory to determine whether a plug-in associated with the host service has a compiled product compiled from the version of the programming language to be updated;
if the plug-in associated with the host service does not have the compiled product compiled by the programming language version to be updated in the compiled product memory, the plug-in is compiled by the programming language version to be updated, and the compiled product is stored in the compiled product memory.
According to one or more embodiments of the present disclosure, example 4 provides the method of any one of examples 1 to 3, wherein the compiling comprises: compiling a call of the plug-in to be loaded to the internal environment variable of the plug-in to be loaded, which is to be executed when the plug-in to be loaded is loaded by the host service, into: and acquiring and analyzing the self-defined environment variable, and analyzing the internal environment variable of the plug-in to be loaded if the analyzed environment variable does not meet the requirement of the plug-in to be loaded.
Example 5 provides the method of example 4, according to one or more embodiments of the present disclosure, wherein the method further comprises: when the hosting service loads the second plug-in,
injecting the environment variable of the host service into the second plugin as the custom environment variable;
and when the second plug-in needs the environment variable, analyzing the environment variable of the host service, and if the analysis result based on the environment variable of the host service does not meet the requirement of the second plug-in, analyzing the environment variable in the second plug-in.
Example 6 provides the method of example 1, according to one or more embodiments of the present disclosure, wherein the method further comprises: and if the analysis result based on the environment variable of the host service meets the requirement of the second plug-in, using the analysis result as the environment variable of the second plug-in.
According to one or more embodiments of the present disclosure, example 7 provides the method of example 1, wherein the method further comprises: and naming the compiled products according to the corresponding programming language version numbers in the compiled product memory.
Example 8 provides a plug-in management apparatus according to one or more embodiments of the present disclosure, comprising: the management module is used for respectively associating plug-in to be loaded by the host service and programming language versions to be compiled of the host service with the host service; a scanning module for scanning the programming language version associated with the hosting service; the compiling module is used for compiling plug-ins associated with the host service by using the scanned programming language version; and the storage module is used for storing the compiled product obtained by compiling into a compiled product memory.
According to one or more embodiments of the present disclosure, example 9 provides a computer-readable medium having stored thereon a computer program which, when executed by a processing device, implements the steps of the method of any of examples 1-7.
In accordance with one or more embodiments of the present disclosure, example 10 provides an electronic device, comprising: a storage device having a computer program stored thereon; processing means for executing the computer program in the storage means to implement the steps of the method of any one of examples 1-7.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims. The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.

Claims (10)

1. A method for managing a card, comprising:
respectively associating a plug-in to be loaded by a host service and a programming language version to be compiled by the host service with the host service;
scanning the programming language version associated with the hosting service;
compiling plug-ins associated with the host service with the scanned programming language version;
and storing the compiled product obtained by compiling into a compiled product memory.
2. The method according to claim 1, wherein the method further comprises: when the hosting service is to load a first plug-in,
determining a programming language version currently compiling the host service;
searching the compiling product memory for a compiling product of the first plug-in compiled from the determined programming language version;
and loading the searched corresponding compiled products in the host service.
3. The method according to claim 1, wherein the method further comprises: when the hosting service is to update the programming language version,
associating a programming language version to be updated with the host service;
scanning the compiled products in the compiled products memory to determine whether a plug-in associated with the host service has a compiled product compiled from the version of the programming language to be updated;
if the plug-in associated with the host service does not have the compiled product compiled by the programming language version to be updated in the compiled product memory, the plug-in is compiled by the programming language version to be updated, and the compiled product is stored in the compiled product memory.
4. A method according to any one of claims 1 to 3, wherein said compiling comprises:
compiling a call of the plug-in to be loaded to the internal environment variable of the plug-in to be loaded, which is to be executed when the plug-in to be loaded is loaded by the host service, into: and acquiring and analyzing the self-defined environment variable, and analyzing the internal environment variable of the plug-in to be loaded if the analyzed environment variable does not meet the requirement of the plug-in to be loaded.
5. The method according to claim 4, wherein the method further comprises: when the hosting service loads the second plug-in,
injecting the environment variable of the host service into the second plugin as the custom environment variable;
and when the second plug-in needs the environment variable, analyzing the environment variable of the host service, and if the analysis result based on the environment variable of the host service does not meet the requirement of the second plug-in, analyzing the environment variable in the second plug-in.
6. The method according to claim 1, wherein the method further comprises: and if the analysis result based on the environment variable of the host service meets the requirement of the second plug-in, using the analysis result as the environment variable of the second plug-in.
7. The method according to claim 1, wherein the method further comprises: and naming the compiled products according to the corresponding programming language version numbers in the compiled product memory.
8. A card managing apparatus, comprising:
the management module is used for respectively associating plug-in to be loaded by the host service and programming language versions to be compiled of the host service with the host service;
a scanning module for scanning the programming language version associated with the hosting service;
the compiling module is used for compiling plug-ins associated with the host service by using the scanned programming language version;
and the storage module is used for storing the compiled product obtained by compiling into a compiled product memory.
9. A computer readable medium on which a computer program is stored, characterized in that the program, when being executed by a processing device, carries out the steps of the method according to any one of claims 1-7.
10. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing said computer program in said storage means to carry out the steps of the method according to any one of claims 1-7.
CN202310715782.6A 2023-06-15 2023-06-15 Plug-in management method, device, medium and electronic equipment Pending CN116755796A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310715782.6A CN116755796A (en) 2023-06-15 2023-06-15 Plug-in management method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310715782.6A CN116755796A (en) 2023-06-15 2023-06-15 Plug-in management method, device, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116755796A true CN116755796A (en) 2023-09-15

Family

ID=87947288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310715782.6A Pending CN116755796A (en) 2023-06-15 2023-06-15 Plug-in management method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116755796A (en)

Similar Documents

Publication Publication Date Title
CN111367516B (en) Application interface generation method and device and electronic equipment
CN110960855B (en) Communication protocol code updating method and device, electronic equipment and storage medium
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN111338944B (en) Remote Procedure Call (RPC) interface testing method, device, medium and equipment
CN111240766B (en) Application starting method and device, electronic equipment and computer readable storage medium
CN110221877B (en) Application program running method and device, electronic equipment and storage medium
US20240095022A1 (en) Hotfix method, apparatus, device and storage medium
CN111338666A (en) Method, device, medium and electronic equipment for realizing application program upgrading
CN112416303B (en) Software development kit hot repair method and device and electronic equipment
CN112306685B (en) Task isolation method, device, electronic equipment and computer readable medium
CN111400068B (en) Interface control method and device, readable medium and electronic equipment
CN116755796A (en) Plug-in management method, device, medium and electronic equipment
CN111625326B (en) Task pipeline execution method and device and electronic equipment
CN111538717B (en) Data processing method, device, electronic equipment and computer readable medium
CN111796865B (en) Byte code file modification method, device, terminal equipment and medium
CN109669679B (en) Service detection and processing method and device and electronic equipment
CN111367590A (en) Interrupt event processing method and device
CN116755795A (en) Plug-in management method, device, medium and electronic equipment
CN111367555B (en) Assertion method, assertion device, electronic equipment and computer readable medium
CN112559394B (en) System library access method and device and electronic equipment
CN111796802B (en) Function package generation method and device and electronic equipment
CN116594630A (en) File generation method, device, medium and electronic equipment
CN117093284A (en) Plug-in calling method, device, medium and electronic equipment
CN116263824A (en) Resource access method and device, storage medium and electronic equipment
CN117806739A (en) Method, device, medium and equipment for determining calling relation of cross-code warehouse

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