CN107589970B - Plug-in calling method and device - Google Patents

Plug-in calling method and device Download PDF

Info

Publication number
CN107589970B
CN107589970B CN201610534559.1A CN201610534559A CN107589970B CN 107589970 B CN107589970 B CN 107589970B CN 201610534559 A CN201610534559 A CN 201610534559A CN 107589970 B CN107589970 B CN 107589970B
Authority
CN
China
Prior art keywords
plug
mode
calling
loading
function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610534559.1A
Other languages
Chinese (zh)
Other versions
CN107589970A (en
Inventor
吴茂林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Lan You Technology Co Ltd
Original Assignee
Shenzhen Lan You 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 Shenzhen Lan You Technology Co Ltd filed Critical Shenzhen Lan You Technology Co Ltd
Priority to CN201610534559.1A priority Critical patent/CN107589970B/en
Publication of CN107589970A publication Critical patent/CN107589970A/en
Application granted granted Critical
Publication of CN107589970B publication Critical patent/CN107589970B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a plug-in calling method and a plug-in calling device, which comprise the following steps: flattening the structural relationship between the set inserts; loading a plurality of plug-ins according to a fixed mode or a dynamic mode; registering the plug-in to adapt and call a corresponding plug-in function interface; and calling the corresponding plug-in function interface by adopting an observer mode and/or an adapter mode. The beneficial effects of the invention are as follows: the method and the device have the advantages of simple item starting, clear architecture and strong universality; no dependency exists among the plug-ins, and coupling is low; the functional plug-ins can be dynamically increased or decreased, and the development and maintenance workload does not need to be additionally increased; the plug-in function and performance can be more conveniently detected due to the fact that the function plug-in can be dynamically controlled.

Description

Plug-in calling method and device
Technical Field
The invention relates to the technical field of plug-in calling, in particular to a plug-in calling method and device.
Background
In the process of developing a large application program by C + +, the first difficult problem encountered by developers is the architecture of the application program. The development of large-scale application programs is often performed by a large number of developers, and each developer is responsible for developing a part of functional modules. When a module needs to use the class or function of another module, the opposite side library is usually loaded statically or dynamically, and then the opposite side interface is called to realize the function. This method usually needs to know the function, interface and parameter of the other side and rely on the library of the other side, and once the module of the other side is modified, the module needs to be regenerated to ensure the normal function. The architecture is often high in coupling and dependence degree, brings trouble to development of programmers, is not easy to newly add or modify functions, and is easy to cause relevance problems.
When a general company considers developing an application program, a high-level developer or architect designs the architecture and divides the modules before the project starts.
The general module division can not be separated from some base classes, public interfaces, bottom layer function modules, application layer function modules and the like. The application layer function module is usually used as a bottom layer function module, and the functions of the other application module (B) are used by the functions of the other application module (A). When these relationships exist, the solution is to use the function module (B) to export an interface, and the function module (a) obtains the interface of the function module (B), and calls the interface of the function module (B) by relying on the function module (B) to realize function call.
This solution is currently feasible, but the correlation is strong and the coupling degree and the dependency degree are high. The quality of the architecture of the application program is often greatly related to the level of an early engineering architect, and a relatively reasonable architecture can be designed only by the architect with a higher level, so that the development personnel can understand and develop functions conveniently. However, the larger the application program project is, the higher the engineering complexity is, the more the module is dependent on, the more the relationship is complicated, and the more the participating personnel are, the more difficult the later development and maintenance is.
Disclosure of Invention
The invention aims to solve the technical problems of high complexity, multiple module dependence, complex relationship, more participators and difficult later development and maintenance in the prior art, and provides a plug-in calling method and device.
The technical scheme adopted by the invention for solving the technical problems is as follows:
in one aspect, a plug-in calling method is constructed, comprising:
flattening the structural relationship between the set inserts;
loading a plurality of plug-ins according to a fixed mode or a dynamic mode;
registering the plug-in to adapt and call a corresponding plug-in function interface;
and calling the corresponding plug-in function interface by adopting an observer mode and/or an adapter mode.
In the plug-in calling method of the present invention, the step of flattening the structural relationship between the plug-ins includes the following substeps:
canceling the dependency relationship among the plug-ins;
setting a receiving and sending mode of the plug-in according to the function of the plug-in, wherein the receiving and sending mode comprises a plug-in receiving mode and a plug-in sending mode; the plug-in receiving mode calls a plug-in function interface according to the function of the plug-in; the plug-in sends a mode response to a call request to call the plug-in functional interface according to the function.
In the plug-in calling method of the present invention, the step of loading a plurality of plug-ins in a fixed mode or a dynamic mode includes the substeps of:
loading and standardizing a plurality of the plug-ins according to the fixed mode; or
Dynamically loading and standardizing a plurality of the plug-ins using a configuration file; or
Dynamically loading and standardizing a plurality of the plug-ins according to a plug-and-play style; wherein the step comprises the sub-steps of: storing a plurality of standardized plug-ins to a preset directory; detecting whether a plug-in is added or not at regular time when a thread is started; if the plug-in is added, loading the plug-in and judging whether the loading is successful; if the loading is successful, saving the record of successful loading; if it fails, a reload is attempted.
In the plug-in calling method of the present invention, the step of registering the plug-in to adapt to call a corresponding plug-in function interface includes the substeps of:
registering the plug-in according to the function of the plug-in; wherein the step comprises the sub-steps of: setting a security key; authenticating the plug-in according to the security key; if the authentication is passed, the registration is successful;
storing, by an interface route, the registered plug-in to enable adaptation invocation of the plug-in by the interface route;
and performing deregistration on the plug-in.
In the plug-in calling method of the present invention, the step of calling the corresponding plug-in function interface in the observer mode and/or the adapter mode includes the following substeps:
when the corresponding plug-in function interface is called by adopting the observer mode, matching an observer meeting preset conditions, and calling the function interface of the observer to call the corresponding plug-in function interface after the corresponding plug-in function interface is adapted;
when the adapter mode is adopted to call the corresponding plug-in functional interface, the adapter mode comprises a safe calling mode and a quick calling mode; the safe calling mode is to switch between threads to safely call; the quick calling mode is directly calling in the thread.
In another aspect, a plug-in calling apparatus is provided, including:
the structure flattening module is used for flattening the structural relationship among the plug-in units;
the plug-in loading module is used for loading a plurality of plug-ins according to a fixed mode or a dynamic mode;
the plug-in registration module is used for registering the plug-in to adapt to call a corresponding plug-in function interface;
and the interface calling module is used for calling the corresponding plug-in function interface by adopting an observer mode and/or an adapter mode.
In the plug-in calling device according to the present invention, the structure flattening module includes:
the relation canceling submodule is used for canceling the dependency relation between the plug-ins;
the mode setting submodule is used for setting a receiving and sending mode of the plug-in according to the function of the plug-in, and the receiving and sending mode comprises a plug-in receiving mode and a plug-in sending mode; the plug-in receiving mode calls a plug-in function interface according to the function of the plug-in; the plug-in sends a mode response to a call request to call the plug-in functional interface according to the function.
In the plug-in calling device of the present invention, the plug-in loading module includes:
a fixed mode loading submodule for loading and standardizing a plurality of the plug-ins according to the fixed mode;
the configuration file loading submodule is used for dynamically loading and standardizing a plurality of plug-ins by using a configuration file;
the plug-and-play loading submodule is used for dynamically loading and standardizing a plurality of plug-ins according to the plug-and-play mode; storing a plurality of standardized plug-ins to a preset directory; detecting whether a plug-in is added or not at regular time when a thread is started; if the plug-in is added, loading the plug-in and judging whether the loading is successful; if the loading is successful, saving the record of successful loading; if it fails, a reload is attempted.
In the plug-in calling device of the present invention, the plug-in registration module includes:
the plug-in registration submodule is used for registering the plug-in according to the function of the plug-in; wherein, setting a security key; authenticating the plug-in according to the security key; if the authentication is passed, the registration is successful;
the plug-in storage submodule is used for storing the registered plug-ins by the interface route so as to realize the adaptation calling of the interface route to the plug-ins;
and the plug-in unit anti-registration sub-module is used for performing anti-registration on the plug-in unit.
In the plug-in calling device of the present invention, the interface calling module includes:
the observer mode submodule is used for calling the corresponding plug-in functional interface by adopting the observer mode; after matching an observer meeting preset conditions and adapting to the corresponding plug-in function interface, calling the function interface of the observer to call the corresponding plug-in function interface;
the matcher pattern submodule is used for calling the corresponding plug-in functional interface by adopting the adapter pattern; the adapter mode comprises a safe calling mode and a quick calling mode; the safe calling mode is to switch between sub threads to safely call; the quick calling mode is directly calling in the thread.
The plug-in calling method and the plug-in calling device have the following beneficial effects: the method and the device have the advantages of simple item starting, clear architecture and strong universality; no dependency exists among the plug-ins, and coupling is low; the functional plug-ins can be dynamically increased or decreased, and the development and maintenance workload does not need to be additionally increased; the plug-in function and performance can be more conveniently detected due to the fact that the function plug-in can be dynamically controlled.
Drawings
FIG. 1 is a flow chart of a plug-in calling method provided by the present invention;
fig. 2 is a schematic diagram of a plug-in transceiving mode according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating plug-in invocation according to an embodiment of the present invention;
fig. 4 is a block diagram of a plug-in calling device according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a plug-in calling method and a plug-in calling device, and aims to design a development framework which is simple and convenient, has a clear structure and low coupling degree, and simultaneously construct a plug-in routing method which is independent of safety and controllable. The method and the device have the advantages of simple item starting, clear architecture and strong universality; no dependency exists among the plug-ins, and coupling is low; the functional plug-ins can be dynamically increased or decreased, and the development and maintenance workload does not need to be additionally increased; the plug-in function and performance can be more conveniently detected due to the fact that the function plug-in can be dynamically controlled.
Referring to fig. 1, fig. 1 is a flowchart of a plug-in calling method provided by the present invention, where the plug-in calling method includes the following steps S1-S4:
s1, flattening the structural relationship among the plug-in units; this step S1 includes the following sub-steps S11-S12:
s11, canceling the dependency relationship among the plug-ins; the step mainly realizes the flattening of the plug-in module structure and plug and play through an independent safe and controllable interface routing method.
S12, setting a transceiving mode of the plug-in according to the function of the plug-in, wherein the transceiving mode comprises a plug-in receiving mode and a plug-in sending mode; the plug-in receiving mode calls a plug-in function interface according to the function of the plug-in; the plug-in sends a mode response to a call request to call the plug-in functional interface according to the function. Referring to fig. 2, fig. 2 is a schematic diagram of a plug-in transceiving mode according to an embodiment of the present invention, where a host process is responsible for loading each plug-in and routing a plug-in function interface. The structural relationship between the plug-ins is flattened, and no dependency exists any more. The plug-in interface is divided into a plug-in receiving mode and a plug-in sending mode. The plug-in sending mode can call the function interface of any other plug-in, namely only the function interface is called by sending, regardless of which plug-in the function is completed by, namely the relation of 1- > N. The mode receiving interface, i.e. the plug-in provides the function interface to respond to all calls, i.e. no matter who calls, the plug-in realizes the corresponding function for the call, i.e. the relation of N- > 1.
S2, loading a plurality of plug-ins according to a fixed mode or a dynamic mode; this step S2 includes the following sub-steps S21-S23:
s21, loading and standardizing a plurality of plug-ins according to the fixed mode;
s22, dynamically loading and standardizing a plurality of plug-ins by using configuration files;
s23, dynamically loading and standardizing a plurality of plug-ins according to the plug-and-play mode; the step S23 includes the following substeps:
s231, storing the standardized plug-ins into a preset directory;
s232, detecting whether a plug-in is added or not at regular time when the thread is started; if the plug-in is added, loading the plug-in and judging whether the loading is successful; if successful, go to step S233; if the failure occurs, step S234 is executed.
S233, saving the record of successful loading;
and S234, attempting to load again.
The main process controls the loading of the plug-in, and the plug-in can be loaded according to the requirement of a project in a fixed mode or dynamically loaded in a configuration file control mode or dynamically loaded in a plug-and-play mode. The specific method for loading each plug-in is consistent, namely, a standard interface started by the plug-in is called for loading. I.e., between steps S21-S23, is a selection relationship, i.e., any of steps S21-S23 is performed according to actual needs.
S3, registering the plug-in to adapt and call a corresponding plug-in function interface; this step S3 includes the following sub-steps S31-S33:
s31, registering the plug-in according to the function of the plug-in; wherein the step S31 includes the following substeps S311-S312:
s311, setting a security key;
s312, authenticating the plug-in according to the security key; if the authentication is passed, the registration is successful; when the plug-in is loaded, the function to be received and the function to be sent are registered, so that the function can be conveniently called at any time when the real function is realized later. Whether the plug-in provides the functional interface or needs to call the functional interface of other plug-ins, the plug-ins need to be registered first. The registration standard interface provides a receive mode (to receive other plug-in calls) and a send mode (to call other plug-in functions) or a combination of both. The registration interface is added with a verification code, and the project can be provided with a safety key with corresponding complexity according to safety requirements. Authentication of the security key is controlled by interface routing in the host process. Only if the authentication is passed, the registration will be successful and the function will be valid.
S32, storing the registered plug-ins by the interface route to realize the adaptation call of the interface route to the plug-ins; interface routing is responsible for the preservation of registered interface data. When the plug-in calls the interface, the interface route is responsible for judging whether the calling party is authenticated or not, and then searching the corresponding functional plug-in to realize the adaptive calling of the functional interface of the corresponding plug-in.
And S33, performing deregistration on the plug-in. It is also feasible to register other function interfaces when a certain function within the plug-in is used, without using a de-registration. Or to deregister an interface when the life of the card is complete or when use of a functional interface is no longer required.
And S4, calling the corresponding plug-in function interface by adopting an observer mode and/or an adapter mode. This step S4 includes the following sub-steps S41-S42:
s41, when the corresponding plug-in function interface is called by adopting the observer mode, matching an observer meeting preset conditions, and after the corresponding plug-in function interface is adapted, calling the function interface of the observer to call the corresponding plug-in function interface; referring to fig. 3, when the interface router receives the interface call, all observers meeting the conditions are matched according to the conditions, and the functional interfaces of the observers are called after the interfaces are adapted, so that the purpose of calling the function of the object plug-in is achieved.
S42, when the adapter mode is adopted to call the corresponding plug-in function interface, the adapter mode comprises a safe calling mode and a quick calling mode; the safe calling mode is to switch between threads to safely call; the quick calling mode is directly calling in the thread. In fig. 3, the secure interface C (i.e. secure call mode) represents a thread secure call, which automatically switches threads, i.e. the caller can call in a child thread. The quick interface D (namely a quick calling mode) is used for directly calling, and the calling party ensures the thread safety by itself. The two interface standards are identical, and the division into two forms is only convenient for developers to develop functions.
Referring to fig. 4, the plug-in calling device 100 includes a structure flattening module 1, a plug-in loading module 2, a plug-in registration module 3, and an interface calling module 4.
The structure flattening module 1 is used for flattening the structural relationship among the plug-in units;
the plug-in loading module 2 is used for loading a plurality of plug-ins according to a fixed mode or a dynamic mode;
the plug-in registration module 3 is used for registering the plug-in to adapt to call a corresponding plug-in function interface;
the interface calling module 4 is used for calling the corresponding plug-in function interface by adopting an observer mode and/or an adapter mode.
Preferably, the structure flattening module 1 includes a relationship canceling sub-module and a mode setting sub-module.
The relation canceling submodule is used for canceling the dependency relation between the plug-ins;
the mode setting submodule is used for setting a receiving and sending mode of the plug-in according to the function of the plug-in, and the receiving and sending mode comprises a plug-in receiving mode and a plug-in sending mode; the plug-in receiving mode calls a plug-in function interface according to the function of the plug-in; the plug-in sends a mode response to a call request to call the plug-in functional interface according to the function.
Preferably, the plug-in loading module 2 includes a fixed mode loading submodule, a configuration file loading submodule, and a plug-and-play loading submodule.
The fixed mode loading submodule is used for loading and standardizing a plurality of plug-ins according to the fixed mode;
the configuration file loading submodule is used for dynamically loading and standardizing a plurality of plug-ins by using a configuration file;
the plug-and-play loading submodule is used for dynamically loading and standardizing a plurality of plug-ins according to the plug-and-play mode; storing a plurality of standardized plug-ins to a preset directory; detecting whether a plug-in is added or not at regular time when a thread is started; if the plug-in is added, loading the plug-in and judging whether the loading is successful; if the loading is successful, saving the record of successful loading; if it fails, a reload is attempted.
Preferably, the plug-in registration module 3 includes a plug-in registration sub-module, a plug-in storage sub-module, and a plug-in anti-registration sub-module.
The plug-in registration submodule is used for registering the plug-in according to the function of the plug-in; wherein, setting a security key; authenticating the plug-in according to the security key; if the authentication is passed, the registration is successful;
the plug-in storage submodule is used for storing the registered plug-ins by the interface route so as to realize the adaptation calling of the interface route to the plug-ins;
and the plug-in unit anti-registration sub-module is used for performing anti-registration on the plug-in unit.
Preferably, the interface calling module 4 includes an observer pattern sub-module and a matcher pattern sub-module.
The observer mode submodule is used for calling the corresponding plug-in functional interface by adopting the observer mode; after matching an observer meeting preset conditions and adapting to the corresponding plug-in function interface, calling the function interface of the observer to call the corresponding plug-in function interface;
the matcher pattern submodule is used for calling the corresponding plug-in functional interface by adopting the adapter pattern; the adapter mode comprises a safe calling mode and a quick calling mode; the safe calling mode is to switch between sub threads to safely call; the quick calling mode is directly calling in the thread.
Various operations of embodiments are provided herein. In one embodiment, the one or more operations described may constitute computer readable instructions stored on one or more computer readable media, which when executed by an electronic device, will cause the computing device to perform the operations described. The order in which some or all of the operations are described should not be construed as to imply that these operations are necessarily order dependent. Those skilled in the art will appreciate alternative orderings having the benefit of this description. Moreover, it should be understood that not all operations are necessarily present in each embodiment provided herein.
Also, as used herein, the word "preferred" is intended to serve as an example, instance, or illustration. Any aspect or design described herein as "preferred" is not necessarily to be construed as advantageous over other aspects or designs. Rather, use of the word "preferred" is intended to present concepts in a concrete fashion. The term "or" as used in this application is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless specified otherwise or clear from context, "X employs A or B" is intended to include either of the permutations as a matter of course. That is, if X employs A; b is used as X; or X employs both A and B, then "X employs A or B" is satisfied in any of the foregoing examples.
Also, although the disclosure has been shown and described with respect to one or an implementation, equivalent alterations and modifications will occur to others skilled in the art based upon a reading and understanding of this specification and the annexed drawings. The present disclosure includes all such modifications and alterations, and is limited only by the scope of the appended claims. In particular regard to the various functions performed by the above described components (e.g., elements, resources, etc.), the terms used to describe such components are intended to correspond, unless otherwise indicated, to any component which performs the specified function of the described component (e.g., that is functionally equivalent), even though not structurally equivalent to the disclosed structure which performs the function in the herein illustrated exemplary implementations of the disclosure. In addition, while a particular feature of the disclosure may have been disclosed with respect to only one of several implementations, such feature may be combined with one or other features of the other implementations as may be desired and advantageous for a given or particular application. Furthermore, to the extent that the terms "includes," has, "" contains, "or variants thereof are used in either the detailed description or the claims, such terms are intended to be inclusive in a manner similar to the term" comprising.
Each functional unit in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium. The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Each apparatus or system described above may perform the method in the corresponding method embodiment.
In summary, although the present invention has been described with reference to the preferred embodiments, the above-described preferred embodiments are not intended to limit the present invention, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, therefore, the scope of the present invention shall be determined by the appended claims.

Claims (2)

1. A plug-in invocation method, comprising:
flattening the structural relationship between the set inserts; the step of flattening the structural relationship between the placement inserts includes the sub-steps of: canceling the dependency relationship among the plug-ins; setting a receiving and sending mode of the plug-in according to the function of the plug-in, wherein the receiving and sending mode comprises a plug-in receiving mode and a plug-in sending mode; the plug-in receiving mode calls a plug-in function interface according to the function of the plug-in; the plug-in sends a mode response calling request to call the plug-in function interface according to the function;
loading a plurality of plug-ins according to a fixed mode or a dynamic mode; the step of loading a plurality of plug-ins in a fixed mode or a dynamic mode comprises the sub-steps of: loading and standardizing a plurality of the plug-ins according to the fixed mode; or dynamically loading and standardizing a plurality of the plug-ins by using a configuration file; or dynamically loading and standardizing a plurality of plug-ins according to a plug-and-play manner; wherein the step comprises the sub-steps of: storing a plurality of standardized plug-ins to a preset directory; detecting whether a plug-in is added or not at regular time when a thread is started; if the plug-in is added, loading the plug-in and judging whether the loading is successful; if the loading is successful, saving the record of successful loading; if the failure occurs, the loading is tried again;
registering the plug-in to adapt and call a corresponding plug-in function interface; the step of registering the plug-in to adapt to call a corresponding plug-in functional interface comprises the sub-steps of: registering the plug-in according to the function of the plug-in; wherein the step comprises the sub-steps of: setting a security key; authenticating the plug-in according to the security key; if the authentication is passed, the registration is successful; storing, by an interface route, the registered plug-in to enable adaptation invocation of the plug-in by the interface route; performing deregistration on the plug-in;
calling the corresponding plug-in function interface by adopting an observer mode and/or an adapter mode; the step of calling the corresponding plug-in function interface in the observer mode and/or the adapter mode comprises the following substeps: when the corresponding plug-in function interface is called by adopting the observer mode, matching an observer meeting preset conditions, and calling the function interface of the observer to call the corresponding plug-in function interface after the corresponding plug-in function interface is adapted; when the adapter mode is adopted to call the corresponding plug-in functional interface, the adapter mode comprises a safe calling mode and a quick calling mode; the safe calling mode is to switch between threads to safely call; the quick calling mode is directly calling in the thread.
2. A plug-in calling apparatus, comprising:
the structure flattening module is used for flattening the structural relationship among the plug-in units; the structure flattening module includes: the relation canceling submodule is used for canceling the dependency relation between the plug-ins; the mode setting submodule is used for setting a receiving and sending mode of the plug-in according to the function of the plug-in, and the receiving and sending mode comprises a plug-in receiving mode and a plug-in sending mode; the plug-in receiving mode calls a plug-in function interface according to the function of the plug-in; the plug-in sends a mode response calling request to call the plug-in function interface according to the function;
the plug-in loading module is used for loading a plurality of plug-ins according to a fixed mode or a dynamic mode; the plug-in loading module comprises: a fixed mode loading submodule for loading and standardizing a plurality of the plug-ins according to the fixed mode; the configuration file loading submodule is used for dynamically loading and standardizing a plurality of plug-ins by using a configuration file; the plug-and-play loading submodule is used for dynamically loading and standardizing a plurality of plug-ins according to the plug-and-play mode; storing a plurality of standardized plug-ins to a preset directory; detecting whether a plug-in is added or not at regular time when a thread is started; if the plug-in is added, loading the plug-in and judging whether the loading is successful; if the loading is successful, saving the record of successful loading; if the failure occurs, the loading is tried again;
the plug-in registration module is used for registering the plug-in to adapt to call a corresponding plug-in function interface; the plug-in registration module includes: the plug-in registration submodule is used for registering the plug-in according to the function of the plug-in; wherein, setting a security key; authenticating the plug-in according to the security key; if the authentication is passed, the registration is successful; the plug-in storage submodule is used for storing the registered plug-ins by the interface route so as to realize the adaptation calling of the interface route to the plug-ins; the plug-in unit anti-registration sub-module is used for performing anti-registration on the plug-in unit;
the interface calling module is used for calling the corresponding plug-in function interface by adopting an observer mode and/or an adapter mode; the interface calling module comprises: the observer mode submodule is used for calling the corresponding plug-in functional interface by adopting the observer mode; after matching an observer meeting preset conditions and adapting to the corresponding plug-in function interface, calling the function interface of the observer to call the corresponding plug-in function interface; the matcher pattern submodule is used for calling the corresponding plug-in functional interface by adopting the adapter pattern; the adapter mode comprises a safe calling mode and a quick calling mode; the safe calling mode is to switch between sub threads to safely call; the quick calling mode is directly calling in the thread.
CN201610534559.1A 2016-07-08 2016-07-08 Plug-in calling method and device Active CN107589970B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610534559.1A CN107589970B (en) 2016-07-08 2016-07-08 Plug-in calling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610534559.1A CN107589970B (en) 2016-07-08 2016-07-08 Plug-in calling method and device

Publications (2)

Publication Number Publication Date
CN107589970A CN107589970A (en) 2018-01-16
CN107589970B true CN107589970B (en) 2021-07-09

Family

ID=61045941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610534559.1A Active CN107589970B (en) 2016-07-08 2016-07-08 Plug-in calling method and device

Country Status (1)

Country Link
CN (1) CN107589970B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240758B (en) * 2018-07-25 2021-10-29 武汉精测电子集团股份有限公司 Method for supporting synchronous asynchronous unified call of plug-in interface and microkernel system
CN111736922B (en) * 2020-07-23 2020-11-13 平安国际智慧城市科技股份有限公司 Plug-in calling method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685220A (en) * 2012-04-28 2012-09-19 苏州阔地网络科技有限公司 Method and system for data interaction based on WEB page
CN103927163A (en) * 2014-03-06 2014-07-16 中国人民解放军装甲兵工程学院 Plugin frame processing device and plugin system
CN104462949A (en) * 2014-10-27 2015-03-25 中国建设银行股份有限公司 Method and device for calling plug-in

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150095469A1 (en) * 2013-09-30 2015-04-02 Electronics And Telecommunications Research Institute Identifier-based communication method using application program interface

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685220A (en) * 2012-04-28 2012-09-19 苏州阔地网络科技有限公司 Method and system for data interaction based on WEB page
CN103927163A (en) * 2014-03-06 2014-07-16 中国人民解放军装甲兵工程学院 Plugin frame processing device and plugin system
CN104462949A (en) * 2014-10-27 2015-03-25 中国建设银行股份有限公司 Method and device for calling plug-in

Also Published As

Publication number Publication date
CN107589970A (en) 2018-01-16

Similar Documents

Publication Publication Date Title
CN108810006B (en) Resource access method, device, equipment and storage medium
CN110096857B (en) Authority management method, device, equipment and medium for block chain system
US20230110179A1 (en) System Function Invoking Method and Apparatus, and Terminal
CN103617380B (en) Application program authority dynamic control method and system
CN110310205B (en) Block chain data monitoring method, device, equipment and medium
WO2019179026A1 (en) Electronic device, method for automatically generating cluster access domain name, and storage medium
US9734311B1 (en) Secure authentication of firmware configuration updates
US20130262426A1 (en) Method and apparatus for accessing database and database application system
CN104869175A (en) Cross-platform account resource sharing implementation method, device and system
US8448175B2 (en) Deadlock detection in a parallel program
US10049029B1 (en) Networked multi-interface host debugger
EP2924947B1 (en) Method and apparatus for controlling access
CN110138767B (en) Transaction request processing method, device, equipment and storage medium
US20150026658A1 (en) Systems, Methods and Media for Dynamic Creation and Update of Activation Context for Component Object Model
CN109104491A (en) A kind of micro services call method, device, server and storage medium
US10447924B2 (en) Camera usage notification
CN101763593A (en) Method and device for realizing audit log of system
CN107589970B (en) Plug-in calling method and device
CN114237498A (en) Snapshot generation method and system for cloud native storage data volume
CN112579307A (en) Physical lock resource allocation detection method and device and electronic equipment
CN116502259A (en) Database management method and device based on tenant ID and computer readable medium
CN106919812B (en) Application process authority management method and device
CN117098221A (en) Platform assembly registration method based on SRTF standard
WO2015184902A1 (en) Concurrent processing method for intelligent split-screen and corresponding intelligent terminal
CN109150815B (en) Resource processing method, device and machine readable medium

Legal Events

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