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

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

Info

Publication number
CN117149304A
CN117149304A CN202311129701.0A CN202311129701A CN117149304A CN 117149304 A CN117149304 A CN 117149304A CN 202311129701 A CN202311129701 A CN 202311129701A CN 117149304 A CN117149304 A CN 117149304A
Authority
CN
China
Prior art keywords
plug
loaded
ins
sequence
loading
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
CN202311129701.0A
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.)
Anhui Manyin Technology Co ltd
Original Assignee
Anhui Manyin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui Manyin Technology Co ltd filed Critical Anhui Manyin Technology Co ltd
Priority to CN202311129701.0A priority Critical patent/CN117149304A/en
Publication of CN117149304A publication Critical patent/CN117149304A/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/30Creation or generation of source code
    • G06F8/36Software reuse

Landscapes

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

Abstract

The application provides a method, a device, equipment and a medium for managing plug-ins, wherein the method for managing the plug-ins comprises the following steps: in response to system start-up, establishing a directed acyclic graph based on the dependency relationship between each plug-in to be loaded and all but one of the plug-ins to be loaded of the system; performing topological sorting on the directed acyclic graph to obtain the sequence of the dependency relationship; and loading all the plug-ins to be loaded in sequence based on the sequence of the dependency relationship. The scheme disclosed by the application not only keeps the independence of a single plug-in the plug-in loading process, but also ensures the global logic relationship among all plug-ins of the system, and can cope with the scene that a plurality of plug-ins are required to analyze.

Description

Plug-in management method, device, equipment and medium
Technical Field
The present application relates to the field of software technologies, and in particular, to a method, an apparatus, a device, and a medium for managing a plug-in.
Background
In a data analysis system, various functions are generally converted into corresponding function plug-ins, then integrated into the system as required, and data are analyzed and managed in a plug-in mode.
In the related technology of plug-in management, generally, the logic relations of function positioning, parameter transmission, output mode, operation sequence and the like of each plug-in are uniformly set, the plug-ins are loaded according to the uniformly set logic relations, obvious logic coupling is established, the independence of single plug-ins in the plug-in loading process is limited by the mode, and the flexibility is low; or the internal implementation and logic relation of the plug-ins are not managed, each functional plug-in unit is completely independent, the global logic relation among the plug-ins cannot be established in the mode, and the scene that a plurality of plug-ins are required to be analyzed in the plug-in loading process is difficult to meet.
Disclosure of Invention
In view of the above, the application provides a method, a device, equipment and a medium for managing plug-ins, which at least solves the problems that in the related technology of plug-in management, plug-ins are loaded according to a uniformly set logic relationship, obvious logic coupling is established, the independence of single plug-ins in the plug-in loading process is limited, and the flexibility is low; or the internal implementation and logic relation of the plug-ins are not managed, each functional plug-in is completely independent, the global logic relation among the plug-ins cannot be established, the scene requiring analysis of a plurality of plug-ins in the plug-in loading process is difficult to meet, and the problem of flexibility and independence of plug-in management cannot be achieved.
Based on the above objects, an aspect of an embodiment of the present application provides a method for plug-in management, including: in response to system start-up, establishing a directed acyclic graph based on the dependency relationship between each plug-in to be loaded and all but one of the plug-ins to be loaded of the system; performing topological sorting on the directed acyclic graph to obtain the sequence of the dependency relationship; and loading all the plug-ins to be loaded in sequence based on the sequence of the dependency relationship.
In some embodiments, the step of establishing the directed acyclic graph based on the dependencies between each plug-in to be loaded and all but itself plug-ins of the system in response to system startup includes: responding to system startup, and establishing a dependency relationship between each plug-in to be loaded and all plug-ins except for the plug-in itself in the system based on whether each plug-in to be loaded depends on shared data of all plug-ins except for the plug-in itself in all plug-ins to be loaded in the system; and establishing a directed acyclic graph based on the dependency relationship.
In some embodiments, the step of establishing the dependency relationship between each plug-in to be loaded and the plug-ins except for the plug-in itself in all plug-ins to be loaded based on whether each plug-in to be loaded depends on shared data of the plug-ins except for the plug-ins itself in all plug-ins to be loaded in the system includes: judging whether any plug-in to be loaded depends on shared data of a plurality of plug-ins except the plug-in to be loaded in the system; and responding to the shared data of a plurality of plug-ins except for the plug-ins to be loaded in the system, acquiring the mark values respectively corresponding to the plug-ins, binding the mark values respectively corresponding to the plug-ins to be loaded to the mark values of the plug-ins to be loaded, and obtaining the dependence and the depended relation between the plug-ins to be loaded and the plug-ins.
In some embodiments, the step of establishing the dependency relationship between each plug-in to be loaded and the plug-ins except for the plug-in itself in all plug-ins to be loaded based on whether each plug-in to be loaded depends on shared data of the plug-ins except for the plug-ins itself in all plug-ins to be loaded in the system further includes: and respectively carrying out the step of judging whether any plug-in to be loaded depends on shared data of a plurality of plug-ins except the plug-in to be loaded in the system one by one on all plug-ins to be loaded in the system to obtain the corresponding dependency relationship of all plug-ins to be loaded in the system.
In some embodiments, the step of sequentially loading all the plug-ins to be loaded based on the order of the dependency relationship includes: reverse ordering is carried out based on the sequence of the dependency relationship, so that the sequence of loading all the plug-ins to be loaded is obtained; and loading each plug-in to be loaded in turn according to the sequence of loading all the plug-in to be loaded.
In some embodiments, loading each card in turn according to the order in which all cards to be loaded are loaded includes: and according to the sequence of loading all the plug-ins to be loaded, private data of the plug-ins to be loaded currently and shared data of the plug-ins on which the plug-ins to be loaded currently depend in all the plug-ins to be loaded are sequentially loaded until all the data corresponding to all the plug-ins to be loaded are loaded into the system.
In some embodiments, the step of sequentially loading the private data of the current plug-in to be loaded and the shared data of the plug-ins that the current plug-in to be loaded depends on in the all plug-ins to be loaded according to the order of loading the all plug-ins to be loaded includes: acquiring a plurality of mark values bound with a plug-in to be loaded currently; and matching the plug-ins on which the current plug-ins to be loaded depend in all the plug-ins to be loaded based on the plurality of flag values in sequence according to the sequence of loading all the plug-ins to be loaded, and acquiring corresponding shared data.
In another aspect of the embodiment of the present application, there is also provided a device for managing a card, including: the system comprises a first module, a second module and a third module, wherein the first module is used for responding to the system start and establishing a directed acyclic graph based on the dependency relationship between each plug-in to be loaded and all plug-ins except the plug-in to be loaded of the system; the second module is used for carrying out topological sorting on the directed acyclic graph to obtain the sequence of the dependency relationship; and the third module is used for loading all the plug-ins to be loaded in sequence based on the sequence of the dependency relationship.
In some embodiments, the first module is further to: responding to system startup, and establishing a dependency relationship between each plug-in to be loaded and all plug-ins except for the plug-in itself in the system based on whether each plug-in to be loaded depends on shared data of all plug-ins except for the plug-in itself in all plug-ins to be loaded in the system; and establishing a directed acyclic graph based on the dependency relationship.
In some embodiments, the first module is further to: judging whether any plug-in to be loaded depends on shared data of a plurality of plug-ins except the plug-in to be loaded in the system; and responding to the shared data of a plurality of plug-ins except for the plug-ins to be loaded in the system, acquiring the mark values respectively corresponding to the plug-ins, binding the mark values respectively corresponding to the plug-ins to be loaded to the mark values of the plug-ins to be loaded, and obtaining the dependence and the depended relation between the plug-ins to be loaded and the plug-ins.
In some embodiments, the first module is further to: and respectively carrying out the step of judging whether any plug-in to be loaded depends on shared data of a plurality of plug-ins except the plug-in to be loaded in the system one by one on all plug-ins to be loaded in the system to obtain the corresponding dependency relationship of all plug-ins to be loaded in the system.
In some embodiments, the third module is further to: reverse ordering is carried out based on the sequence of the dependency relationship, so that the sequence of loading all the plug-ins to be loaded is obtained; and loading each plug-in to be loaded in turn according to the sequence of loading all the plug-in to be loaded.
In some embodiments, the third module is further to: and according to the sequence of loading all the plug-ins to be loaded, private data of the plug-ins to be loaded currently and shared data of the plug-ins on which the plug-ins to be loaded currently depend in all the plug-ins to be loaded are sequentially loaded until all the data corresponding to all the plug-ins to be loaded are loaded into the system.
In some embodiments, the third module is further to: acquiring a plurality of mark values bound with a plug-in to be loaded currently; and matching the plug-ins on which the current plug-ins to be loaded depend in all the plug-ins to be loaded based on the plurality of flag values in sequence according to the sequence of loading all the plug-ins to be loaded, and acquiring corresponding shared data.
In another aspect of the embodiment of the present application, there is also provided an electronic device including at least one processor; and a memory storing computer instructions executable on the processor, the instructions when executed by the processor performing the steps of the method described above.
In another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the method steps as described above.
The application has at least the following beneficial effects: the application provides a plug-in management method, which establishes a directed acyclic graph according to the dependency relationship between each plug-in and other plug-ins, obtains the sequence of the dependency relationship by topological ordering the directed acyclic graph, loads each plug-in turn based on the sequence of the dependency relationship, establishes a logic relationship only according to the dependency relationship among the plug-ins in a system, does not manage the implementation inside the plug-ins, not only maintains the independence of a single plug-in the plug-in loading process, but also ensures the global logic relationship among the plug-ins of the system, and can cope with the scene that a plurality of plug-ins need to be analyzed in the plug-in loading process.
Drawings
In order to more clearly illustrate the embodiments of the application or the solutions of the prior art, the drawings which are necessary for the description of the embodiments or the prior art will be briefly described, it being evident that the drawings in the following description are only some embodiments of the application and that other embodiments can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart illustrating a method for plug-in management according to an embodiment of the present application;
FIG. 2 is a schematic process diagram illustrating a method for managing plug-ins according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an apparatus for managing plug-ins according to an embodiment of the present application;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present application;
fig. 5 is a schematic diagram of a computer readable storage medium according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below. However, it is to be understood that the disclosed embodiments are merely examples and that other embodiments may take various alternative forms.
Furthermore, it should be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
One or more embodiments of the present application will be described below with reference to the accompanying drawings.
Based on the above objects, a first aspect of the embodiments of the present application proposes an embodiment of a method for plug-in management. Fig. 1 shows a flowchart of a method for managing a plug-in, where the method for managing a plug-in, as shown in fig. 1, includes:
s1, responding to system starting, and establishing a directed acyclic graph based on the dependency relationship between each plug-in to be loaded and all plug-ins except the plug-in to be loaded in the system;
s2, carrying out topological sorting on the directed acyclic graph to obtain the sequence of the dependency relationship;
s3, loading all plug-ins to be loaded in sequence based on the sequence of the dependency relationship.
According to several embodiments of the present application, in response to system start-up, the step of building a directed acyclic graph based on dependencies between each plug-in to be loaded and all but itself of the plug-ins to be loaded of the system comprises: responding to system starting, and establishing a dependency relationship between each plug-in to be loaded and the plug-ins except the plug-in itself in all the plug-ins to be loaded of the system based on whether each plug-in to be loaded depends on shared data of the plug-ins except the plug-ins in all the plug-ins to be loaded of the system; a directed acyclic graph is established based on the dependency relationships.
According to several embodiments of the present application, the step of establishing a dependency relationship between each plug-in to be loaded and a plug-in other than itself in all plug-ins to be loaded based on whether each plug-in to be loaded depends on shared data of the plug-ins other than itself in all plug-ins to be loaded of the system includes: judging whether any plug-in to be loaded depends on shared data of a plurality of plug-ins except the plug-in to be loaded in the system; and responding to the shared data of a plurality of plug-ins except the plug-ins to be loaded in all the plug-ins to be loaded of the plug-in dependency system to be confirmed, acquiring the mark values respectively corresponding to the plug-ins, binding the mark values respectively corresponding to the plug-ins to the mark values of the plug-ins to be loaded, and acquiring the dependency and the dependent relation between the plug-ins to be loaded and the plug-ins.
According to several embodiments of the present application, the step of establishing a dependency relationship between each plug-in to be loaded and a plug-in other than itself in all plug-ins to be loaded further includes, based on whether each plug-in to be loaded depends on shared data of the plug-ins other than itself in all plug-ins to be loaded of the system: and respectively judging whether any plug-in to be loaded depends on shared data of a plurality of plug-ins except the plug-in to be loaded in the system or not one by one to obtain the corresponding dependency relationship of all plug-ins to be loaded in the system.
According to several embodiments of the present application, the step of sequentially loading all the plug-ins to be loaded based on the order of the dependency relationship includes: reverse ordering is carried out based on the sequence of the dependency relationship, so that the sequence of loading all the plug-ins to be loaded is obtained; and loading each plug-in to be loaded in turn according to the sequence of loading all the plug-in to be loaded.
According to several embodiments of the present application, loading each card in turn according to the order in which all cards to be loaded are loaded includes: according to the sequence of loading all the plug-ins to be loaded, private data of the plug-ins to be loaded currently and shared data of the plug-ins on which the plug-ins to be loaded currently depend in all the plug-ins to be loaded are sequentially loaded until all the data corresponding to all the plug-ins to be loaded respectively are loaded into the system.
According to several embodiments of the present application, according to the order of loading all the plug-ins to be loaded, the steps of sequentially loading the private data of the current plug-in to be loaded and the shared data of the plug-ins on which the current plug-in to be loaded depends in all the plug-ins to be loaded include: acquiring a plurality of mark values bound with a plug-in to be loaded currently; and matching the plug-ins on which the current plug-ins to be loaded depend in all the plug-ins to be loaded based on a plurality of flag values in sequence according to the sequence of loading all the plug-ins to be loaded, and acquiring the corresponding shared data of the plug-ins.
In fig. 2, a process schematic diagram of a method for managing plug-ins provided in an embodiment of the present application is shown, in fig. 2, by taking a loading process of a functional plug-in a data analysis system as an example, a sequence arrangement mechanism of plug-ins is built in the data analysis system, where the plug-ins in the system include plug-in 1, plug-in 2, plug-in 3 and plug-in 4, corresponding to numbers 1, 2, 3 and 4, respectively, and dependency relationships of all the plug-ins in the system are obtained, as shown in fig. 1, the plug-in 1 depends on plug-in 2, the plug-in 2 depends on plug-in 3, the plug-in 4 depends on plug-in 3, a directed acyclic graph (Directed Acyclic Graph, DAG) of each plug-in and its corresponding dependency relationship is built, a topology ordering graph of the dependency relationships is obtained based on the directed acyclic graph, the topology ordering graph of the dependency relationships is obtained, the topology ordering of the dependency relationships is plug-in 1, plug-in 4, plug-in 2 and plug-in 3, the system loads and data analysis is performed on the topology ordering of the dependency relationships, and the system is based on the topology ordering of the dependency relationships, and the data of the plug-in the system, and the dependency degree is highest for the plug-in 3 when the plug-in 3 is started, the dependency degree depends degree of the plug-in, and the plug-in 2, the dependency is obtained, and the dependency degree depends on the dependency is sequentially.
Preferably, the necessary parameters of the identification values of the plugins can be added in the plugin registration interface of the system, so that each plugin in the system has a corresponding unique identification value ID (Identity Document, identity mark number) value, and further, the system uniformly distributes the ID values of all plugins, thereby avoiding the problem that a plurality of plugins conflict when using the same ID value. Each plug-in adds the ID value of the plug-in corresponding to the data on which the plug-in depends based on the dependency description interface provided by the system, calls the dependency description interface in a plug-in loading link, and loads other plug-ins automatically when the ID values of other plug-ins on which the current plug-in depends are obtained.
Preferably, shared data and an interface for acquiring the shared data are added in the system, and the shared data and the ID value of each plug-in are bound, and each plug-in can share the data to other plug-ins in the system or acquire the shared data from the other plug-ins in the system based on the interface.
Preferably, before the system operates, only the final function plugin in all plugins in the system is required to be configured, other plugins on which the plugins depend are not required to be configured, the plugins and the other plugins on which the plugins depend are automatically loaded after the configuration is completed, the load degree of system maintenance is reduced, and the loading of system functions can be minimized as required.
In a second aspect of the embodiment of the present application, a device for managing a card is provided, and fig. 3 shows a schematic diagram of a device for managing a card provided in the embodiment of the present application, as shown in fig. 3, including: a first module 011, configured to establish a directed acyclic graph based on a dependency relationship between each plug-in to be loaded and all but its own plug-ins in the system in response to system startup; a second module 012, configured to topologically sort the directed acyclic graph, to obtain an order of the dependency relationships; and a third module 013, configured to load all the plug-ins to be loaded sequentially based on the order of the dependency relationships.
According to several embodiments of the present application, the first module 011 is further configured to: responding to system starting, and establishing a dependency relationship between each plug-in to be loaded and the plug-ins except the plug-in itself in all the plug-ins to be loaded of the system based on whether each plug-in to be loaded depends on shared data of the plug-ins except the plug-ins in all the plug-ins to be loaded of the system; a directed acyclic graph is established based on the dependency relationships.
According to several embodiments of the present application, the first module 011 is further configured to: judging whether any plug-in to be loaded depends on shared data of a plurality of plug-ins except the plug-in to be loaded in the system; and responding to the shared data of a plurality of plug-ins except the plug-ins to be loaded in all the plug-ins to be loaded of the plug-in dependency system to be confirmed, acquiring the mark values respectively corresponding to the plug-ins, binding the mark values respectively corresponding to the plug-ins to the mark values of the plug-ins to be loaded, and acquiring the dependency and the dependent relation between the plug-ins to be loaded and the plug-ins.
According to several embodiments of the present application, the first module 011 is further configured to: and respectively judging whether any plug-in to be loaded depends on shared data of a plurality of plug-ins except the plug-in to be loaded in the system or not one by one to obtain the corresponding dependency relationship of all plug-ins to be loaded in the system.
According to several embodiments of the application, the third module 013 is further to: reverse ordering is carried out based on the sequence of the dependency relationship, so that the sequence of loading all the plug-ins to be loaded is obtained; and loading each plug-in to be loaded in turn according to the sequence of loading all the plug-in to be loaded.
According to several embodiments of the application, the third module 013 is further to: according to the sequence of loading all the plug-ins to be loaded, private data of the plug-ins to be loaded currently and shared data of the plug-ins on which the plug-ins to be loaded currently depend in all the plug-ins to be loaded are sequentially loaded until all the data corresponding to all the plug-ins to be loaded respectively are loaded into the system.
According to several embodiments of the application, the third module 013 is further to: acquiring a plurality of mark values bound with a plug-in to be loaded currently; and matching the plug-ins on which the current plug-ins to be loaded depend in all the plug-ins to be loaded based on a plurality of flag values in sequence according to the sequence of loading all the plug-ins to be loaded, and acquiring the corresponding shared data of the plug-ins.
In a third aspect of the embodiment of the present application, an electronic device is provided, and fig. 4 is a schematic diagram of an electronic device provided in the embodiment of the present application. As shown in fig. 4, an electronic device provided by an embodiment of the present application includes the following modules: at least one processor 021; and a memory 022, the memory 022 storing computer instructions 023 executable on the processor 021, the computer instructions 023 implementing the steps of the method as described above when executed by the processor 021.
The application also provides a computer readable storage medium. Fig. 5 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present application. As shown in fig. 5, the computer-readable storage medium 031 stores a computer program 032 which, when executed by a processor, performs the steps of the method as described above.
Finally, it should be noted that, as will be understood by those skilled in the art, implementing all or part of the above-described methods in the embodiments may be implemented by a computer program to instruct related hardware, and the program of the method for setting system parameters may be stored in a computer readable storage medium, where the program may include the flow of the embodiments of the methods described above when executed. The storage medium of the program may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (RAM), or the like. The computer program embodiments described above may achieve the same or similar effects as any of the method embodiments described above.
Furthermore, the method disclosed according to the embodiment of the present application may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. The above-described functions defined in the methods disclosed in the embodiments of the present application are performed when the computer program is executed by a processor.
Furthermore, the above-described method steps and system units may also be implemented using a controller and a computer-readable storage medium storing a computer program for causing the controller to implement the above-described steps or unit functions.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general purpose or special purpose computer or general purpose or special purpose processor. Further, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, D0L, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The foregoing embodiment of the present application has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the application, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the application, and many other variations of the different aspects of the embodiments of the application as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present application.

Claims (10)

1. A method of plug-in management, comprising:
in response to system start-up, establishing a directed acyclic graph based on the dependency relationship between each plug-in to be loaded and all but one of the plug-ins to be loaded of the system;
performing topological sorting on the directed acyclic graph to obtain the sequence of the dependency relationship;
and loading all the plug-ins to be loaded in sequence based on the sequence of the dependency relationship.
2. The method of claim 1, wherein the step of establishing a directed acyclic graph based on dependencies between each plug-in to be loaded and all but itself plug-ins of the system in response to system startup comprises:
responding to system startup, and establishing a dependency relationship between each plug-in to be loaded and all plug-ins except for the plug-in itself in the system based on whether each plug-in to be loaded depends on shared data of all plug-ins except for the plug-in itself in all plug-ins to be loaded in the system;
and establishing a directed acyclic graph based on the dependency relationship.
3. The method of claim 2, wherein the step of establishing the dependency relationship between each plug-in to be loaded and the plug-ins other than itself in all plug-ins to be loaded based on whether each plug-in to be loaded depends on shared data of the plug-ins other than itself in all plug-ins to be loaded in the system comprises:
judging whether any plug-in to be loaded depends on shared data of a plurality of plug-ins except the plug-in to be loaded in the system;
and responding to the shared data of a plurality of plug-ins except for the plug-ins to be loaded in the system, acquiring the mark values respectively corresponding to the plug-ins, binding the mark values respectively corresponding to the plug-ins to be loaded to the mark values of the plug-ins to be loaded, and obtaining the dependence and the depended relation between the plug-ins to be loaded and the plug-ins.
4. A method according to claim 3, wherein the step of establishing a dependency relationship between each plug-in to be loaded and a plug-in of all plug-ins to be loaded other than itself based on whether each plug-in to be loaded depends on shared data of the plug-ins of all plug-ins to be loaded of the system further comprises:
and respectively carrying out the step of judging whether any plug-in to be loaded depends on shared data of a plurality of plug-ins except the plug-in to be loaded in the system one by one on all plug-ins to be loaded in the system to obtain the corresponding dependency relationship of all plug-ins to be loaded in the system.
5. The method according to claim 1, wherein the step of sequentially loading all the plug-ins to be loaded based on the order of the dependencies comprises:
reverse ordering is carried out based on the sequence of the dependency relationship, so that the sequence of loading all the plug-ins to be loaded is obtained;
and loading each plug-in to be loaded in turn according to the sequence of loading all the plug-in to be loaded.
6. The method of claim 5, wherein loading each card in turn according to the order in which all cards to be loaded are loaded comprises:
and according to the sequence of loading all the plug-ins to be loaded, private data of the plug-ins to be loaded currently and shared data of the plug-ins on which the plug-ins to be loaded currently depend in all the plug-ins to be loaded are sequentially loaded until all the data corresponding to all the plug-ins to be loaded are loaded into the system.
7. The method according to claim 6, wherein the step of sequentially loading private data of a current plug-in to be loaded and shared data of plug-ins on which the current plug-in to be loaded depends in the all plug-ins to be loaded according to the order of loading the all plug-ins to be loaded includes:
acquiring a plurality of mark values bound with a plug-in to be loaded currently;
and matching the plug-ins on which the current plug-ins to be loaded depend in all the plug-ins to be loaded based on the plurality of flag values in sequence according to the sequence of loading all the plug-ins to be loaded, and acquiring corresponding shared data.
8. An apparatus for plug-in management, comprising:
the system comprises a first module, a second module and a third module, wherein the first module is used for responding to the system start and establishing a directed acyclic graph based on the dependency relationship between each plug-in to be loaded and all plug-ins except the plug-in to be loaded of the system;
the second module is used for carrying out topological sorting on the directed acyclic graph to obtain the sequence of the dependency relationship;
and the third module is used for loading all the plug-ins to be loaded in sequence based on the sequence of the dependency relationship.
9. An electronic device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method of any one of claims 1-7.
10. A computer readable storage medium storing a computer program which when executed by a processor performs the steps of the method of any one of claims 1-7.
CN202311129701.0A 2023-09-01 2023-09-01 Plug-in management method, device, equipment and medium Pending CN117149304A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311129701.0A CN117149304A (en) 2023-09-01 2023-09-01 Plug-in management method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311129701.0A CN117149304A (en) 2023-09-01 2023-09-01 Plug-in management method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117149304A true CN117149304A (en) 2023-12-01

Family

ID=88907581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311129701.0A Pending CN117149304A (en) 2023-09-01 2023-09-01 Plug-in management method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117149304A (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050131927A1 (en) * 2003-12-11 2005-06-16 Ulf Fildebrandt Data dependency visualization
CN1968154A (en) * 2006-09-15 2007-05-23 华为技术有限公司 System and method for service expansion using plug
US20140081901A1 (en) * 2009-04-24 2014-03-20 Netapp, Inc. Sharing modeling data between plug-in applications
US9223683B1 (en) * 2012-05-03 2015-12-29 Google Inc. Tool to analyze dependency injection object graphs for common error patterns
CN106502757A (en) * 2016-12-27 2017-03-15 北京恒华伟业科技股份有限公司 A kind of plug-in management method and device
CN108475360A (en) * 2015-12-31 2018-08-31 微软技术许可有限责任公司 Distributed Calculation relies on management system
CN110308999A (en) * 2018-03-20 2019-10-08 Tcl集团股份有限公司 Method, storage medium and the mobile terminal for relying on packet are dynamically shared between a kind of application
CN110402431A (en) * 2017-03-23 2019-11-01 亚马逊科技公司 Event driven scheduling is carried out using directed acyclic graph
CN114281320A (en) * 2020-12-24 2022-04-05 深圳支流科技有限公司 Plug-in arrangement method and system in API gateway
CN114761941A (en) * 2019-12-04 2022-07-15 甲骨文国际公司 Inferring package and intra-module dependencies
CN115082247A (en) * 2022-08-19 2022-09-20 建信金融科技有限责任公司 System production method, device, equipment, medium and product based on label library
US11520605B1 (en) * 2022-05-25 2022-12-06 Kong Inc. Dynamically reordering plugin execution order at an API gateway of a microservices application
CN116302156A (en) * 2022-12-13 2023-06-23 成都安思科技有限公司 Plug-in association scheduling method based on topological sorting

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050131927A1 (en) * 2003-12-11 2005-06-16 Ulf Fildebrandt Data dependency visualization
CN1968154A (en) * 2006-09-15 2007-05-23 华为技术有限公司 System and method for service expansion using plug
US20140081901A1 (en) * 2009-04-24 2014-03-20 Netapp, Inc. Sharing modeling data between plug-in applications
US9223683B1 (en) * 2012-05-03 2015-12-29 Google Inc. Tool to analyze dependency injection object graphs for common error patterns
CN108475360A (en) * 2015-12-31 2018-08-31 微软技术许可有限责任公司 Distributed Calculation relies on management system
CN106502757A (en) * 2016-12-27 2017-03-15 北京恒华伟业科技股份有限公司 A kind of plug-in management method and device
CN110402431A (en) * 2017-03-23 2019-11-01 亚马逊科技公司 Event driven scheduling is carried out using directed acyclic graph
CN110308999A (en) * 2018-03-20 2019-10-08 Tcl集团股份有限公司 Method, storage medium and the mobile terminal for relying on packet are dynamically shared between a kind of application
CN114761941A (en) * 2019-12-04 2022-07-15 甲骨文国际公司 Inferring package and intra-module dependencies
CN114281320A (en) * 2020-12-24 2022-04-05 深圳支流科技有限公司 Plug-in arrangement method and system in API gateway
US11520605B1 (en) * 2022-05-25 2022-12-06 Kong Inc. Dynamically reordering plugin execution order at an API gateway of a microservices application
CN115082247A (en) * 2022-08-19 2022-09-20 建信金融科技有限责任公司 System production method, device, equipment, medium and product based on label library
CN116302156A (en) * 2022-12-13 2023-06-23 成都安思科技有限公司 Plug-in association scheduling method based on topological sorting

Similar Documents

Publication Publication Date Title
CN113498594B (en) Control method and device of smart home system, electronic equipment and storage medium
CN110535776B (en) Gateway current limiting method, device, gateway, system and storage medium
CN111654399B (en) Networking method, device, equipment and storage medium based on SD-WAN
CN111400407A (en) Data synchronization method and device, storage medium and electronic device
CN110880091A (en) Micro-service flow processing method and device
CN107395385A (en) Method for upgrading software and device
CN111367560A (en) Method, system, equipment and medium for expanding server function
CN111832273A (en) Method and device for determining destination message, storage medium and electronic device
CN116954685B (en) Gray scale rolling upgrading method, system, equipment and medium for low-code application system
CN117149304A (en) Plug-in management method, device, equipment and medium
CN108536541B (en) Process engine object processing method and device
CN114741066B (en) Block chain application generation method and system
CN108667659B (en) Method and system for searching loop node in network topological graph
CN111586081B (en) Internet of things implementation method based on object model
CN112766486A (en) Searching method of neural network structure, terminal, server and readable storage medium
CN112418796A (en) Sub-process node activation method and device, electronic equipment and storage medium
US20210110053A1 (en) Exclusive control system and exclusive control method
CN112416383A (en) Hot updating method and device for golang program and computer equipment
CN111240833B (en) Resource migration method and device
CN112165519B (en) Synchronous node realization method and system for synchronizing data according to needs
CN117857223B (en) Method, device, equipment and medium for realizing black-and-white list based on FTTR master-slave management
CN116185443A (en) Service updating method, device, terminal and storage medium
CN108712497B (en) Application mode sharing method, device and system
CN114328449A (en) Data transmission method and device, storage medium and electronic device
CN108664259B (en) Method and terminal for installing application

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