CN110704035A - Plug-in type software architecture system and implementation method thereof - Google Patents

Plug-in type software architecture system and implementation method thereof Download PDF

Info

Publication number
CN110704035A
CN110704035A CN201910992341.4A CN201910992341A CN110704035A CN 110704035 A CN110704035 A CN 110704035A CN 201910992341 A CN201910992341 A CN 201910992341A CN 110704035 A CN110704035 A CN 110704035A
Authority
CN
China
Prior art keywords
module
plug
name
management unit
class
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
CN201910992341.4A
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.)
Beijing Shaini Science And Technology Development Co Ltd
Original Assignee
Beijing Shaini Science And Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Shaini Science And Technology Development Co Ltd filed Critical Beijing Shaini Science And Technology Development Co Ltd
Priority to CN201910992341.4A priority Critical patent/CN110704035A/en
Publication of CN110704035A publication Critical patent/CN110704035A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • 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

Abstract

The invention discloses a group plug-in type software architecture system and an implementation method thereof, wherein the architecture system comprises a plug-in base class, a plug-in subclass, a module base class, a module subclass, a module table, a plug-in table and a module management unit program; the module management unit program is used for loading all the group plug-ins according to the module table and the plug-in table. According to the invention, a plurality of module subclasses with similar or related functions are combined into one plug-in subclass to form a group plug-in, so that the number of plug-ins can be reduced, and management of the plug-ins is facilitated; the module table and the plug-in table are set, and the combination of the modules can be managed conveniently and quickly through a module table mechanism, so that a customized function and a module combination modification scheme can be provided for a user conveniently and quickly.

Description

Plug-in type software architecture system and implementation method thereof
Technical Field
The invention relates to the technical field of software construction and design, in particular to a plug-in type software architecture system and an implementation method thereof.
Background
The existing plug-in software architecture can meet the requirement that different functions are split into different plug-ins under the condition that the number of functional modules is not large. However, when the number of functional modules is extremely large, the traditional plug-in architecture has its disadvantages, and each functional module is split into one plug-in, which results in the number of plug-ins being the same as that of functional modules, resulting in a very large number of plug-in libraries, and managing a large number of plug-ins is a troublesome and laborious task.
Secondly, when the plug-in developed software is provided to the user, conventionally, some functional modules that need to be provided to the user are packaged into a program and then delivered to the user. Therefore, if a certain functional module needs to be added or removed from the user, the combined plug-ins must be packaged again to generate a new software, and the new software replaces the original software, so that careless implementation is easy, and the implementation is also troublesome.
How to manage a large number of functional module plug-ins, how to conveniently and quickly combine different plug-ins for different users and deploy and operate, and how to conveniently modify the combination subsequently becomes a problem which needs to be solved urgently.
Disclosure of Invention
The invention aims to provide a plug-in type software architecture system and an implementation method thereof, which are used for solving the problems of troublesome plug-in combination and complex plug-in management in the existing plug-in type software design.
In order to achieve the above object, the technical solution of the present invention is:
a group plug-in type software architecture system comprises a plug-in base class, a plug-in subclass, a module base class, a module subclass, a module table, a plug-in table and a module management unit program; the module management unit program is used for loading all the group plug-ins according to the module table and the plug-in table.
Further, the module table includes a module name, a class name of the module, a json character string of the module initialization parameter, and a plug-in name where the module is located.
Further, the plug-in table contains a plug-in name and a plug-in library file.
Furthermore, the plug-in base class defines an abstract common interface function ModeBase createMode (hash < string > parameter), parameters of the interface function are module class names and parameters required to be used when a module is created, and a return result is a pointer of a module subclass instance object.
Further, the common interface function ModeBase × createMode is implemented as follows:
Figure BDA0002237529340000021
further, the module base class defines a building function, and the building function defines a hash structure parameter ModeBase (hash < string > parameter) into which an initialization parameter is introduced.
The invention also discloses a method for realizing the group plug-in type architecture system, which comprises the following steps: combining a plurality of module subclasses with similar or related functions into a plug-in subclass to form a group plug-in; inputting module information into the module table and the plug-in table; and the module management unit program loads the group plug-in according to the module table and the plug-in table.
Further, the specific method for loading group plug-ins by the module management unit program according to the module table and the plug-in table is as follows:
the module management unit program obtains all data from the module table, searches whether the plug-in with the name exists from a local specific path according to the plug-in name of the module, if so, downloads the plug-in library from a plug-in library file in the plug-in table according to the plug-in name, loads the plug-in library, converts the json character string of the module initialization parameter into a hash initialization parameter, calls a common interface function ModBase createMode of the plug-in, transmits the class name of the module and the converted hash initialization parameter as function parameters, creates an instance object of the class according to the class name and the hash initialization parameter of the module, converts the pointer of the object into a pointer of a ModeBase type, then stores the module name and the pointer of the ModeBase type into a table container of the module management unit program, and when the module needs to be created next time, the module management unit program firstly checks whether the module name exists in the table container, if the module exists, the module is not newly built, and when a program needs to operate a certain module, the pointer of the module is found in the table container of the module through the module name, and the common interface of the module is called.
The invention has the beneficial effects that: according to the invention, a plurality of module subclasses with similar or related functions are combined into one plug-in subclass to form a group plug-in, so that the number of plug-ins can be reduced, and management of the plug-ins is facilitated; the invention sets the module table and the plug-in table in the group plug-in type framework, and can conveniently manage the combination of the modules through the module table mechanism, thereby conveniently and quickly realizing the purposes of providing the customized function for the user and modifying the module combination scheme.
Drawings
FIG. 1 is a block diagram of an architecture system according to embodiment 1 of the present invention;
FIG. 2 is a simplified flow chart of a method for implementing the architecture system according to embodiment 2 of the present invention;
FIG. 3 is a logic diagram of the group plug-in loading according to embodiment 2 of the present invention;
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments disclosed herein are intended to be within the scope of the present invention.
Example 1
A group plug-in type software architecture system comprises a plug-in base class, a plug-in subclass, a module base class, a module subclass, a module table, a plug-in table and a module management unit program; the module management unit program is used for loading all the group plug-ins according to the module table and the plug-in table.
A plurality of module subclasses with similar or related functions are combined into one plugin subclass to form a group of plugins, so that the quantity of the plugins can be reduced, and the management of the plugins is facilitated; the invention sets the module table and the plug-in table in the group plug-in type framework, and can conveniently manage the combination of the modules through the module table mechanism, thereby conveniently and quickly realizing the purposes of providing the customized function for the user and modifying the module combination scheme.
In this embodiment, the module table includes a module name, a class name of the module, a json string of module initialization parameters, and a plug-in name where the module is located; the plug-in table comprises a plug-in name and a plug-in library file; the plug-in base class defines an abstract common interface function ModeBase createMode (hash < string > parameter), the parameters of the interface function are module class names and parameters needed when the module is created, and the returned result is a pointer of a module subclass instance object; the module base class is defined with a construction function, and the construction function is defined with a hash structure parameter ModeBase (hash < string > parameter) which is introduced with an initialization parameter.
In this embodiment, the common interface function ModeBase × createMode is implemented as follows:
Figure BDA0002237529340000041
Figure BDA0002237529340000051
example 2
A method for realizing a group plug-in software architecture system comprises the following steps:
a plug-in base class PluginBase is declared to provide a common plug-in interface.
A function module base class ModeBase is declared and is used for realizing specific service logic and providing some common service interfaces.
An abstract common interface function ModeBase createMode (string model) is defined in the plug-in base class, parameters of the function are module class names and parameters needed when the module is created, and a return result is a pointer of a ModeBase instance object.
A hash structure parameter ModeBase (hash < string > parameter) is defined in the building function of the module base class ModeBase, and is used for introducing initialization parameters so as to facilitate some initializations which need to be executed before or inside the building function.
Some module subclasses are defined for implementing different business logic.
Defining plug-in subclasses, collecting a group of module subclasses with similar or related functions into one plug-in subclass, packaging into a plug-in library file, realizing common interface function ModBase createMode of the plug-in subclass again, and creating and returning a class instance object corresponding to the module class name according to the parameter module class name. The plug-in module group idea is to pack a series of function modules related to functions into a group plug-in module, which is equivalent to adding a secondary directory, thereby reducing the number of plug-ins and facilitating project management. The ModeBase × createMode function is specifically implemented as follows:
ModeBase*createMode(string modeClass,hash<string,string>parameter)
{
if(modeClass==classNameO)
{
return new classNameO(parameter);
}
else if(modeClass==className1)
{
return new className1(parameter);
}
}。
creating a module table in a database, wherein the table comprises four basic fields: the name of the module, the class name of the module, the json character string of the module initialization parameter and the name of the plug-in where the module is located.
Filling the packed plug-in library name into the plug-in name field of the module in the module table, filling the module sub-class name contained in the plug-in into the class name field of the module in the table in sequence, naming the function modules respectively according to the service description, and filling into the module name field.
Creating a plug-in table in a database, wherein the table comprises two fields: plug-in name, plug-in library file.
And filling the packaged plug-in library name into a plug-in name field in a plug-in table, and storing the plug-in library file into a plug-in library file field.
And the module management unit program reads the data of the module table and loads the group plug-in according to the data of the module table. The module management unit program obtains all data from the module table of the database, and transmits each data in the module table to the module management unit program one by one, the module management unit program searches whether the plug-in with the name exists from the local specific path according to the plug-in name of the module, if yes, downloads the plug-in library from the plug-in library file in the plug-in table according to the plug-in name, then loads the plug-in library, converts the json character string of the module initialization parameter into the hash initialization parameter, calls the common interface function ModeBaseCreateMode of the plug-in, and transmits the class name of the module and the converted hash initialization parameter as function parameters, the common interface function ModeBaseCreateMode creates an instance object of the class according to the class name and the hash initialization parameter of the module, and converts the pointer of the object into a pointer of the ModeBasetype to return, at this time, the module management unit program only needs to introduce the definition of the base class of the plug-in, the specific implementation of the plug-in is not required to be known, as all operations on the module are a common interface implementation that calls the base class of the module. And then storing the module name and the pointer of the ModeBase type into a table container of the module management unit program, when a module needs to be created next time, checking whether the module name exists in the table container by the module management unit program, if so, not newly building a module, and when the program needs to operate a certain module, finding the pointer of the module in the table container of the module through the module name and calling a common interface of the module.
When a large number of new functional modules are developed subsequently and need to be delivered to a user, a series of modules are combined into a group plug-in according to similarity or correlation of module functions, and the new group plug-in and the new module are added into a module table in a database. Because all programs in the local area network are connected with the database, a new plug-in is easily found to be added into the module table, and the module management unit program only needs to download the plug-in from the database to the local and load and refresh the plug-in. This allows for the rapid addition of new functional modules to all programs in the lan.
When a certain functional module needs to be deleted, the module is only needed to be deleted in the module table, the program in the local area network finds that the module is deleted, and the module management unit program is started to remove the module from the program.
When the combination mode of the function modules needs to be modified, the contents in the module table are modified.
Through a module table mechanism, the combination of the functional modules of all programs in the whole local area network is conveniently managed, so that a customized function and a module combination modification scheme are conveniently provided for a user.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, but rather as the intention of all modifications, equivalents, improvements, and equivalents falling within the spirit and scope of the invention.

Claims (8)

1. A group plug-in type software architecture system is characterized by comprising a plug-in base class, a plug-in subclass, a module base class, a module subclass, a module table, a plug-in table and a module management unit program; the module management unit program is used for loading all the group plug-ins according to the module table and the plug-in table.
2. The system according to claim 1, wherein the module table comprises a module name, a class name of the module, a json string of module initialization parameters, and a plug-in name of the module.
3. The system according to claim 1, wherein the plug-in table comprises a plug-in name and a plug-in library file.
4. The system according to claim 1, wherein the plug-in base class defines an abstract common interface function model base createmomode (hash < string > parameter), the parameters of the interface function are module class name and parameters needed to create the module, and the returned result is a pointer of a module sub-class instance object.
5. The system according to claim 4, wherein the common interface function ModeBase createMode is implemented as follows:
Figure FDA0002237529330000011
Figure FDA0002237529330000021
6. the system of claim 1, wherein the module base class defines a build function, and wherein the build function defines a hash structure parameter ModeBase (hash < string > parameter) that carries initialization parameters in.
7. The method of implementing a plug-in software architecture system as claimed in claim 1, comprising the steps of: combining a plurality of module subclasses with similar or related functions into a plug-in subclass to form a group plug-in; inputting module information into the module table and the plug-in table; and the module management unit program loads the group plug-in according to the module table and the plug-in table.
8. The method for implementing a group plug-in software architecture system of claim 7, wherein the specific method for the module management unit program to load the group plug-in according to the module table and the plug-in table is as follows: the module management unit program obtains all data from the module table, searches whether the plug-in with the name exists from a local specific path according to the plug-in name of the module, if so, downloads the plug-in library from a plug-in library file in the plug-in table according to the plug-in name, loads the plug-in library, converts the json character string of the module initialization parameter into a hash initialization parameter, calls a common interface function ModBase createMode of the plug-in, transmits the class name of the module and the converted hash initialization parameter as function parameters, creates an instance object of the class according to the class name and the hash initialization parameter of the module, converts the pointer of the object into a pointer of a ModeBase type, then stores the module name and the pointer of the ModeBase type into a table container of the module management unit program, and when the module needs to be created next time, the module management unit program firstly checks whether the module name exists in the table container, if the module exists, the module is not newly built, and when a program needs to operate a certain module, the pointer of the module is found in the table container of the module through the module name, and the common interface of the module is called.
CN201910992341.4A 2019-10-17 2019-10-17 Plug-in type software architecture system and implementation method thereof Pending CN110704035A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910992341.4A CN110704035A (en) 2019-10-17 2019-10-17 Plug-in type software architecture system and implementation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910992341.4A CN110704035A (en) 2019-10-17 2019-10-17 Plug-in type software architecture system and implementation method thereof

Publications (1)

Publication Number Publication Date
CN110704035A true CN110704035A (en) 2020-01-17

Family

ID=69201665

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910992341.4A Pending CN110704035A (en) 2019-10-17 2019-10-17 Plug-in type software architecture system and implementation method thereof

Country Status (1)

Country Link
CN (1) CN110704035A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928609A (en) * 2020-01-20 2020-03-27 武汉斗鱼鱼乐网络科技有限公司 Method, device and medium for marking equipment and computer equipment
CN111427581A (en) * 2020-03-26 2020-07-17 山东浪潮通软信息科技有限公司 Method, device, equipment and medium for realizing type multi-inheritance
CN112559083A (en) * 2020-12-24 2021-03-26 成都新希望金融信息有限公司 Function plug-in execution method and device, electronic equipment and storage medium
CN114942796A (en) * 2022-05-05 2022-08-26 北京达佳互联信息技术有限公司 Plug-in compiling and calling method, device, equipment and storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06266538A (en) * 1993-03-17 1994-09-22 Hitachi Ltd Module group management system
CN1968154A (en) * 2006-09-15 2007-05-23 华为技术有限公司 System and method for service expansion using plug
CN102073520A (en) * 2010-12-30 2011-05-25 中国民航信息网络股份有限公司 Dynamic management system and method for C++ application program version
US20110185340A1 (en) * 2010-01-27 2011-07-28 Oracle International Corporation Software modeling framework
US20120159145A1 (en) * 2010-12-17 2012-06-21 Oracle International Corporation Plug-in system for software applications
CN104346144A (en) * 2013-07-26 2015-02-11 南京中兴力维软件有限公司 Eclipse RCP (rich client platform) extension point configuration method and device
CN104657142A (en) * 2015-02-12 2015-05-27 中国科学院计算机网络信息中心 CCFD (China Computational Fluid Dynamics) system based on OSGi (Open Service Gateway Initiative) technology
CN107911401A (en) * 2017-08-04 2018-04-13 上海壹账通金融科技有限公司 Application plug-in expansion function methods and application server
CN108170485A (en) * 2016-12-05 2018-06-15 腾讯科技(深圳)有限公司 A kind of plug-in loading method, device and mobile terminal
CN108920135A (en) * 2018-06-27 2018-11-30 杭州贝店科技有限公司 A kind of customized business generating method, device, computer equipment and storage medium
CN109284165A (en) * 2018-10-30 2019-01-29 武汉斗鱼网络科技有限公司 Client skin change method, device, equipment and computer readable storage medium
CN109828796A (en) * 2019-01-17 2019-05-31 武汉精立电子技术有限公司 A kind of plug-in unit call method and device based on microkernel architecture
CN109977670A (en) * 2019-03-12 2019-07-05 福建天晴数码有限公司 Android application safety monitoring method, storage medium based on plug-in unit load
CN110673844A (en) * 2019-09-26 2020-01-10 苏州中科全象智能科技有限公司 Image processing software development method and system

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06266538A (en) * 1993-03-17 1994-09-22 Hitachi Ltd Module group management system
CN1968154A (en) * 2006-09-15 2007-05-23 华为技术有限公司 System and method for service expansion using plug
US20110185340A1 (en) * 2010-01-27 2011-07-28 Oracle International Corporation Software modeling framework
US20120159145A1 (en) * 2010-12-17 2012-06-21 Oracle International Corporation Plug-in system for software applications
CN102073520A (en) * 2010-12-30 2011-05-25 中国民航信息网络股份有限公司 Dynamic management system and method for C++ application program version
CN104346144A (en) * 2013-07-26 2015-02-11 南京中兴力维软件有限公司 Eclipse RCP (rich client platform) extension point configuration method and device
CN104657142A (en) * 2015-02-12 2015-05-27 中国科学院计算机网络信息中心 CCFD (China Computational Fluid Dynamics) system based on OSGi (Open Service Gateway Initiative) technology
CN108170485A (en) * 2016-12-05 2018-06-15 腾讯科技(深圳)有限公司 A kind of plug-in loading method, device and mobile terminal
CN107911401A (en) * 2017-08-04 2018-04-13 上海壹账通金融科技有限公司 Application plug-in expansion function methods and application server
CN108920135A (en) * 2018-06-27 2018-11-30 杭州贝店科技有限公司 A kind of customized business generating method, device, computer equipment and storage medium
CN109284165A (en) * 2018-10-30 2019-01-29 武汉斗鱼网络科技有限公司 Client skin change method, device, equipment and computer readable storage medium
CN109828796A (en) * 2019-01-17 2019-05-31 武汉精立电子技术有限公司 A kind of plug-in unit call method and device based on microkernel architecture
CN109977670A (en) * 2019-03-12 2019-07-05 福建天晴数码有限公司 Android application safety monitoring method, storage medium based on plug-in unit load
CN110673844A (en) * 2019-09-26 2020-01-10 苏州中科全象智能科技有限公司 Image processing software development method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WEIXIN_34413065: "SharpDevelop代码分析", pages 1 - 6, Retrieved from the Internet <URL:https://blog.csdn.net/weixin_34413065/article/details/94466346> *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928609A (en) * 2020-01-20 2020-03-27 武汉斗鱼鱼乐网络科技有限公司 Method, device and medium for marking equipment and computer equipment
CN111427581A (en) * 2020-03-26 2020-07-17 山东浪潮通软信息科技有限公司 Method, device, equipment and medium for realizing type multi-inheritance
CN111427581B (en) * 2020-03-26 2023-02-21 山东浪潮通软信息科技有限公司 Method, device, equipment and medium for realizing type multi-inheritance
CN112559083A (en) * 2020-12-24 2021-03-26 成都新希望金融信息有限公司 Function plug-in execution method and device, electronic equipment and storage medium
CN112559083B (en) * 2020-12-24 2023-08-04 成都新希望金融信息有限公司 Function plug-in execution method, device, electronic equipment and storage medium
CN114942796A (en) * 2022-05-05 2022-08-26 北京达佳互联信息技术有限公司 Plug-in compiling and calling method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110704035A (en) Plug-in type software architecture system and implementation method thereof
US10795660B1 (en) Live code updates
CN109951315B (en) Method and system for mapping YANG model to internal model
CN105224466B (en) A kind of integration test method and system based on Docker
US20080147698A1 (en) Data schemata in programming language contracts
CN110912724B (en) Parameter-driven automatic service arrangement method and device
CN109783071B (en) Drools rule engine-based government rule design method and system
US20150363195A1 (en) Software package management
CN106569880B (en) Method and system for dynamically sharing resources between Android applications
CN111736913B (en) Class loading method and device
US20210055941A1 (en) Type-constrained operations for plug-in types
CN112769706A (en) Componentized routing method and system
CN114995807A (en) Configuration method and system of front-end multi-project framework
CN110955415B (en) Method for projecting multi-platform service adaptation
CN114816170A (en) Rule scheme generation method, device, medium and electronic equipment
CN116243923A (en) Applet processing method and device and electronic equipment
CN115269040B (en) Tenant business application expanding method, device and system
US8484614B2 (en) Fast late binding of object methods
CN116414774A (en) File migration method, device, equipment and storage medium
CN102184105A (en) Data processing method based on modularity and data center system
CN110007937B (en) System updating method and system
CN114995834A (en) Artificial intelligence application deployment environment construction method and device
CN114064213A (en) Kubernets container environment-based rapid arranging service method and system
CN111078548A (en) Test case analysis method and device, storage medium and verification platform
CN115827140B (en) Method, device, equipment and storage medium for generating visual large screen

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