Methods, apparatus and systems for modular extension and integration at arbitrary granularity
By using a modular extension and integration method with arbitrary granularity, the system is divided into multiple modules and initialized and registered, which solves the problem of insufficient scalability of existing modular systems, realizes the transparency and independence of modules, and improves the system's scalability and the replaceability of modules.
Patent Information
- Application Number
- CN201910614014.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-09
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2039-07-09
AI Technical Summary
Existing modular systems have shortcomings in terms of scalability, replaceability, and reusability, and the high coupling between modules results in limited system scalability.
A modular extension and integration method with arbitrary granularity is adopted. By assigning extension points and extension point IDs, the module is divided into multiple independent modules. A general configuration table of modules is established through extension contracts and descriptions. The extension registration manager is used to initialize and register the modules, thereby achieving the transparency and independence of the modules.
It improves the system's scalability, reduces the coupling between modules, increases the replaceability and reusability of modules, ensures that problems in a single module do not affect system security, and provides a foundation for independent development and testing.
Smart Images

Figure CN112286583B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software and hardware systems, and more specifically, to a method, apparatus, and system for modular expansion and integration at arbitrary granularity. Background Technology
[0002] Modular technology has been around for many years. For example, seismic exploration data processing systems are a very typical modular system. They consist of a series of algorithm modules. These modules must conform to certain specifications in order to be used in the data system. Among them, the specifications for data storage, retrieval and transmission are very important.
[0003] As production practices have deepened, systems in various industries have successively placed greater demands on system scalability. These systems have begun to gradually increase scalability, but their implementation technologies either lack generality and cannot be extended to other systems, or are too simple to be easily expanded. For example:
[0004] 1) Lack of module transparency: During system development, it is necessary to know which module a certain function belongs to. This lack of true decoupling is very common.
[0005] 2) The protocols for interoperability between modules are not user-defined. This approach typically involves developers providing several fixed protocols that other modules must adhere to. The problem with this is that the system's scalability is usually very limited. This modular approach lacks generality, is often too deeply tied to specific business domains, and lacks replaceability and reusability.
[0006] 3) The granularity of modules is fixed at a few levels. This modular approach has limited scalability and applicability. Summary of the Invention
[0007] The main objective of this invention is to provide a method, apparatus, and system for modular expansion and integration at arbitrary granularity, so as to improve the system's scalability, reduce the coupling between system modules, and increase the replaceability, reusability, and applicability of system modules.
[0008] To achieve the above objectives, embodiments of the present invention provide a method for modular extension and integration at arbitrary granularity, comprising:
[0009] Divide one or more systems into multiple modules according to preset rules;
[0010] Perform the following processing on any two modules from a set of modules:
[0011] Assign one or more extension points and their corresponding extension point IDs to the module being extended;
[0012] Receive one or more extension contracts corresponding to each extension point ID from the extended module;
[0013] Send one or more extension contracts corresponding to each extension point ID to the extension module;
[0014] Receive an extension description from the extension module that corresponds one-to-one with the extension contract;
[0015] Establish a master module configuration table based on the extended module and the extended module;
[0016] Load the extended modules and extension modules according to the overall module configuration table, and initialize each module;
[0017] Register one or more extension point IDs for each module and one or more extension descriptions for each extension point ID in the extension registration manager;
[0018] Receive the preset extension point ID from the extended module;
[0019] Retrieve the extension description corresponding to the preset extension point ID from the extension registration manager;
[0020] Send the extension description corresponding to the preset extension point ID to the module being extended.
[0021] This invention also provides a method for modular extension and integration at arbitrary granularity, comprising:
[0022] Receive one or more expansion points from a management device for modular expansion and integration of arbitrary granularity, and an expansion point ID corresponding to each expansion point;
[0023] Generate one or more extension contracts corresponding to each extension point ID;
[0024] Send one or more extension contracts corresponding to each extension point ID to the management device for modular extension and integration of arbitrary granularity;
[0025] Send a preset extension point ID to a management device for modular expansion and integration of arbitrary granularity;
[0026] Receives extension descriptions corresponding to preset extension point IDs from management devices for modular extensions and integrations of arbitrary granularity;
[0027] The corresponding functionality is obtained from the extension module based on the extension description.
[0028] This invention also provides a method for modular extension and integration at arbitrary granularity, comprising:
[0029] Receive one or more extension contracts corresponding to each extension point ID from the management device for modular extensions and integrations of arbitrary granularity;
[0030] Generate extended descriptions that correspond one-to-one with the extended contracts;
[0031] Send extended descriptions to modular extensions and integrated management devices of arbitrary granularity.
[0032] This invention also provides a device for modular expansion and integration at arbitrary granularity, applicable to a management device for modular expansion and integration at arbitrary granularity, comprising:
[0033] A partitioning unit is used to divide one or more systems into multiple modules according to preset rules;
[0034] The allocation unit is used to allocate one or more expansion points and the expansion point ID corresponding to each expansion point to the expanded module.
[0035] The first receiving unit is configured to receive one or more extension contracts corresponding to each extension point ID from the extended module; receive extension descriptions corresponding one-to-one with the extension contracts from the extended module; and receive preset extension point IDs from the extended module.
[0036] The first sending unit is used to send one or more extension contracts corresponding to each extension point ID to the extension module; and to send an extension description corresponding to a preset extension point ID to the extended module.
[0037] The master configuration table unit is used to create a master configuration table for modules based on the extended modules and the extended modules.
[0038] The initialization unit is used to load the extended modules and extended modules according to the overall module configuration table, and to initialize each module.
[0039] The registration unit is used to register one or more extension point IDs corresponding to each module and one or more extension descriptions corresponding to each extension point ID in the extension registration manager;
[0040] The acquisition unit is used to retrieve the extension description corresponding to the preset extension point ID from the extension registration manager.
[0041] This invention also provides a modular extension and integration device with arbitrary granularity, applied to the extended module, comprising:
[0042] The second receiving unit is used to receive one or more extension points and extension point IDs corresponding to each extension point from the modular extension and integration management device of arbitrary granularity; and to receive extension descriptions corresponding to preset extension point IDs from the modular extension and integration management device of arbitrary granularity.
[0043] An extended contract unit is used to generate one or more extended contracts corresponding to each extended point ID.
[0044] The second sending unit is used to send one or more extension contracts corresponding to each extension point ID to the modular extension and integration management device of arbitrary granularity; and to send a preset extension point ID to the modular extension and integration management device of arbitrary granularity.
[0045] Functional units are used to obtain the corresponding functions from the extension modules based on the extension description.
[0046] This invention also provides a modular expansion and integration device with arbitrary granularity, applied to an expansion module, comprising:
[0047] The third receiving unit is used to receive one or more extension contracts corresponding to each extension point ID from the management device for modular extension and integration of arbitrary granularity;
[0048] An extended description unit is used to generate an extended description that corresponds one-to-one with the extended contract.
[0049] The third transmitting unit is used to transmit management devices for modular extensions and integrations with extended descriptions at arbitrary granularity.
[0050] This invention also provides a system for modular extension and integration at arbitrary granularity, comprising:
[0051] The above-described device for modular expansion and integration of management devices at arbitrary granularity;
[0052] The device described above is applied to modular expansion and integration at any granularity of the extended module;
[0053] The device described above is for modular expansion and integration of expansion modules at any granularity.
[0054] The modular expansion and integration method, apparatus and system of arbitrary granularity of the present invention can divide an independent system into multiple modules according to various business needs, and can automatically integrate and merge the divided modules into a new organic whole, which improves the system's scalability, reduces the coupling between system modules, increases the replaceability, reusability and applicability of system modules, and ensures that problems in a single module will not affect the system's security, providing a basis for the separate production, development and testing of independent sub-modules. Attached Figure Description
[0055] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0056] Figure 1 This is a flowchart of a method for modular extension and integration at arbitrary granularity (from a management device for modular extension and integration at arbitrary granularity) in one embodiment of the present invention.
[0057] Figure 2 This is a flowchart of a method for modular extension and integration at arbitrary granularity (from a management device for modular extension and integration at arbitrary granularity) in another embodiment of the present invention.
[0058] Figure 3 It is a diagram showing multiple modules linked together;
[0059] Figure 4 This is a flowchart of a method for modular extension and integration of arbitrary granularity (from the perspective of the extended module) in one embodiment of the present invention;
[0060] Figure 5 This is a flowchart of a method for modular extension and integration of arbitrary granularity (from the perspective of extension modules) in one embodiment of the present invention;
[0061] Figure 6 This is a structural block diagram of a modular extension and integration device for arbitrary granularity applied to a management device for modular extension and integration in an embodiment of the present invention.
[0062] Figure 7 This is a structural block diagram of a device for modular expansion and integration of any granularity applied to the expanded module in an embodiment of the present invention;
[0063] Figure 8 This is a structural block diagram of a device for modular expansion and integration of any granularity applied to an extension module, as described in an embodiment of the present invention.
[0064] Figure 9 This is a structural block diagram of a system for modular extension and integration of arbitrary granularity in an embodiment of the present invention. Detailed Implementation
[0065] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0066] Those skilled in the art will recognize that embodiments of the present invention can be implemented as a system, apparatus, device, method, or computer program product. Therefore, this disclosure can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0067] Given that existing technologies do not achieve true decoupling, lack replaceability and reusability, and have limited scalability and applicability, embodiments of the present invention provide a method for modular expansion and integration at arbitrary granularity to improve the system's scalability, reduce the coupling between system modules, and increase the replaceability, reusability, and applicability of system modules. The present invention will be described in detail below with reference to the accompanying drawings.
[0068] Figure 1 This is a flowchart of a method for modular extension and integration at arbitrary granularity (from a management device for modular extension and integration at arbitrary granularity) according to an embodiment of the present invention. Figure 1 As shown, methods for modular extension and integration at arbitrary granularity include:
[0069] S101: Divide one or more systems into multiple modules according to preset rules.
[0070] In practice, the functions can be reasonably decomposed into multiple modules at any required granularity according to the distribution of business.
[0071] Perform the following processing on any two modules from a set of modules:
[0072] S102: Assign one or more extension points and their corresponding extension point IDs to the module being extended.
[0073] The module being extended is the main module that is being extended.
[0074] S103: Receive one or more extension contracts corresponding to each extension point ID of the extended module.
[0075] S104: Send one or more extension contracts corresponding to each extension point ID to the extension module.
[0076] In this context, the extension module is a subordinate module that acts as a plugin for the extended module.
[0077] S105: Receive the extension description from the extension module that corresponds one-to-one with the extension contract.
[0078] S106: Create a master module configuration table based on the extended module and the extended module.
[0079] S107: Load the extended modules and extended modules according to the module master configuration table, and initialize each module.
[0080] S108: Register one or more extension point IDs corresponding to each module and one or more extension descriptions corresponding to each extension point ID in the extension registration manager.
[0081] S109: Receive the preset extension point ID from the extended module.
[0082] S110: Retrieve the extension description corresponding to the preset extension point ID from the extension registration manager.
[0083] S111: Send the extension description corresponding to the preset extension point ID to the extended module.
[0084] Figure 1 The implementation entity of the method for modular extension and integration at arbitrary granularity shown can be a device for modular extension and integration at arbitrary granularity applied to a management device for modular extension and integration at arbitrary granularity. Figure 1 As shown in the flowchart, the modular expansion and integration method of arbitrary granularity in this embodiment of the invention (from the perspective of the management device for modular expansion and integration of arbitrary granularity) divides one or more systems into multiple modules according to preset rules, and performs the following processing on any two modules: First, it assigns one or more expansion points and expansion point IDs corresponding to each expansion point to the expanded module; it receives and sends one or more expansion contracts corresponding to each expansion point ID from the expanded module to the expansion module; then it receives the expansion description corresponding to each expansion contract from the expansion module; next, it establishes a module master configuration table according to the expanded module and the expansion module, and then performs the module master configuration... The system loads the extended module and the extending module, initializes each module, and then registers one or more extension point IDs and one or more extension descriptions corresponding to each extension point ID in the extension registration manager. It receives the preset extension point ID from the extended module and finally retrieves and sends the preset extension point ID from the extension registration manager to the extended module. This improves the system's scalability, reduces the coupling between system modules, and increases the replaceability, reusability, and applicability of system modules. It ensures that problems in a single module will not affect the system's security and provides a foundation for the separate production, development, and testing of independent sub-modules.
[0085] In one embodiment, after executing S110, the method further includes: when there are multiple extension descriptions corresponding to the preset extension point ID, filtering the extension descriptions according to the preset filtering rules, and sending the filtered extension descriptions to the extended module.
[0086] Figure 2 This is a flowchart of a method for modular extension and integration at arbitrary granularity (from a management device for modular extension and integration at arbitrary granularity) in another embodiment of the present invention. Figure 2 As shown, methods for modular extension and integration at arbitrary granularity also include:
[0087] S201: Register one or more extension contracts corresponding to each extension point ID in the extension registration manager.
[0088] S202: Retrieve the extension contract corresponding to the preset extension point ID from the extension registration manager.
[0089] S203: Determine whether the extension contract corresponding to the preset extension point ID corresponds one-to-one with the extension description corresponding to the preset extension point ID.
[0090] S204: When the extension contract corresponding to the preset extension point ID and the extension description corresponding to the preset extension point ID correspond one-to-one, send the extension description corresponding to the preset extension point ID to the extended module.
[0091] The steps described above can prevent incorrect extension descriptions from being sent to the extended module.
[0092] The specific process of the method for modular expansion and integration at arbitrary granularity (from the perspective of a management device for modular expansion and integration at arbitrary granularity) is as follows:
[0093] 1. Divide one or more systems into multiple modules according to preset rules.
[0094] In practical implementation, the system needs to be divided into modules based on the functional allocation of each part, and the functional boundaries of each module need to be defined. Taking a seismic exploration data interpretation system as an example, it can be decomposed into a conventional interpretation subsystem, a 3D visualization interpretation subsystem, a seismic forward and inverse modeling subsystem, and a well logging interpretation subsystem, etc. These subsystems can be further decomposed according to business rules. For example, the well logging interpretation subsystem can be further subdivided into a well logging data display scene module, on which various interactive editing modules can be attached, and new well logging data display modules can be extended. In particular, it can support the development and attachment of third-party modules. A subsystem can be defined as a module, or even the entire system can be a large module, or it can be decomposed into several sufficiently small modules.
[0095] 2. For any two modules among multiple modules, perform the following processing: Assign one or more extension points and corresponding extension point IDs to the extended module; receive one or more extension contracts corresponding to each extension point ID from the extended module; send one or more extension contracts corresponding to each extension point ID to the extended module; and receive the extension description corresponding to each extension contract from the extended module.
[0096] In this system, the module being extended is the main module, and the extension modules are the subordinate modules that act as plugins to the extended module. The main module being extended requires extension points to implement the extension, and each extension point must have a unique identifier (ID) and an extension contract. If an extension module, acting as a plugin, wants to extend the functionality of the extended module, it must adhere to this contract in order to link the extension module and the extended module.
[0097] Extended contracts are typically described using XML-formatted nodes, for example:
[0098] <extension-point id="EXTP_ToggleWindow"
[0099] index-property-name=""
[0100] file="itogglewindow.h"
[0101] inertface="MainFrame::IToggleWindow">
[0102] <EXT_ToggleWindow
[0103] extension-point="EXTP_ToggleWindow"
[0104] id=""
[0105] class=""
[0106] icon=""
[0107] label=""
[0108] single-inst="true"
[0109] hide-only=""
[0110] can-create-empty=""
[0111] accept-data=""
[0112] single-data=""
[0113] ribbon-pages="" / >
[0114] <EXT_ToggleWindow>
[0115]
[0116] A module can have multiple extension contracts, each of which can be extended by other modules. The content of the contract is entirely determined by the extended module, without any other restrictions, making the extended module highly extensible. If the extended module also needs executable extension capabilities, it can specify the interface type by providing the `interface` attribute and requesting the value of the `class` attribute from the extending module. Furthermore, the extended module can define executable extension capabilities in other ways, such as by adding the `python` attribute, allowing other modules to implement executable extensions using Python commands. How the extended module ultimately extends the functionality of other modules depends entirely on the content of the extension contract.
[0117] Similarly, if an extension module wants to extend the functionality of the extended module, that is, if it wants to link to the extended module, the extension module must also provide its own extension description, using XML-formatted nodes, for example:
[0118] <EXT_ToggleWindow
[0119] extension-point="EXTP_ToggleWindow"
[0120] id="ToggleWindow.well"
[0121] class="MyWindow"
[0122] icon="abc.png"
[0123] label="my window"
[0124] single-inst="true"
[0125] hide-only="yes"
[0126] can-create-empty="false"
[0127] accept-data=""
[0128] single-data=""
[0129] ribbon-pages="">
[0130] <EXT_ToggleWindow>
[0131] Extension modules must comply with the extension contract given by the extended module. Therefore, the extension description of an extension module cannot be arbitrarily determined by the extension module, but is defined according to the description of the extension contract given by the extended module. Its content must be configured according to the extension contract. The extension description of the extension module must specify the extension point ID (extension-point = "EXTP_ToggleWindow"), which indicates which extension point in the extended module the extension module is extending.
[0132] An extension point can be linked to one or more extension descriptions (extensions, where an extension description is part of an extension), and an extension description can only be linked to one extension point. A module typically has more than one extension point; it can have multiple extension points and multiple extension contracts corresponding to those points. Furthermore, a module can usually extend multiple other modules, so it may also have multiple extension descriptions. At its smallest granularity, a module has only one extension contract or extension description. With extension contracts and extension descriptions, links between multiple modules are naturally established, and ultimately all modules are linked together, automatically forming a unified system. Figure 3 This is a diagram illustrating multiple modules linked together. For example... Figure 3 As shown, each module can be both an extended module (the extended main module) and an extension module (a subordinate module that is a plugin of another extended module).
[0133] 3. Establish a master module configuration table based on the extended module and the extended module, load the extended module and the extended module according to the master module configuration table, and initialize each module.
[0134] 4. Register one or more extension point IDs corresponding to each module and one or more extension descriptions corresponding to each extension point ID in the extension registration manager.
[0135] After registration, the system will automatically form an organic whole according to the linking relationships between modules in the extension registration manager. After system integration, the various modules can extend and use functions through common services, link points and links, etc., and achieve module transparency. That is to say, when using the functions provided by other modules, there is no need to care which module the function comes from, nor do you need to know when the module can be loaded, which greatly reduces the coupling between modules.
[0136] 5. Receive the preset extension point ID from the extended module, obtain the extension description corresponding to the preset extension point ID from the extension registration manager, and send the extension description corresponding to the preset extension point ID to the extended module.
[0137] When there are multiple extension descriptions corresponding to a preset extension point ID, the extension descriptions can be filtered according to preset filtering rules, and the filtered extension descriptions can be sent to the extended module. For example, the latest version of the extension description can be selected from multiple extension descriptions.
[0138] In summary, the method for modular expansion and integration at arbitrary granularity in this invention (from the perspective of a management device for modular expansion and integration at arbitrary granularity) divides one or more systems into multiple modules according to preset rules, and performs the following processing on any two modules: First, it assigns one or more expansion points and corresponding expansion point IDs to the expanded module; it receives and sends one or more expansion contracts corresponding to each expansion point ID from the expanded module to the expansion module; then it receives the expansion description corresponding to each expansion contract from the expansion module; next, it establishes a module master configuration table based on the expanded module and the expansion module, and loads the module according to the module master configuration table. The system establishes both the extended module and the extending module, initializes each module, and then registers one or more extension point IDs and one or more extension descriptions corresponding to each extension point ID in the extension registration manager. It receives preset extension point IDs from the extended module and finally retrieves and sends the preset extension point IDs from the extension registration manager to the extended module. This improves the system's scalability, reduces the coupling between system modules, and increases the replaceability, reusability, and applicability of system modules. It ensures that problems in a single module will not affect the system's security and provides a foundation for the independent production, development, and testing of individual sub-modules.
[0139] Figure 4 This is a flowchart of a method for modular extension and integration of arbitrary granularity (from the perspective of the extended module) in one embodiment of the present invention. Figure 4 As shown, methods for modular extension and integration at arbitrary granularity include:
[0140] S301: Receive one or more extension points from a modular extension and integration management device of arbitrary granularity, and an extension point ID corresponding to each extension point.
[0141] S302: Generate one or more extension contracts corresponding to each extension point ID.
[0142] S303: Send one or more extension contracts corresponding to each extension point ID to the management device for modular extensions and integrations of arbitrary granularity.
[0143] S304: Send a preset extension point ID to a management device for modular expansion and integration of arbitrary granularity.
[0144] S305: Receives an extension description corresponding to a preset extension point ID from a management device for modular extensions and integrations of arbitrary granularity.
[0145] S306: Obtain the corresponding function from the extension module according to the extension description.
[0146] Figure 4 The implementation entity of the method for modular extension and integration at arbitrary granularity shown can be a device applied to the modular extension and integration of the extended module at arbitrary granularity. Figure 4 As shown in the flowchart, the modular extension and integration method of arbitrary granularity in this embodiment of the invention (from the perspective of the extended module) first receives one or more extension points and corresponding extension point IDs from the management device of modular extension and integration of arbitrary granularity. Then, it generates one or more extension contracts corresponding to each extension point ID, sends one or more extension contracts corresponding to each extension point ID to the management device of modular extension and integration of arbitrary granularity, sends preset extension point IDs to the management device of modular extension and integration of arbitrary granularity, and finally receives the extension description corresponding to the preset extension point ID from the management device of modular extension and integration of arbitrary granularity. Based on the extension description, it obtains the corresponding function from the extension module, which improves the system's scalability, reduces the coupling between system modules, increases the replaceability, reusability, and applicability of system modules, and ensures that problems in a single module will not affect the system's security. This provides a basis for the separate production, development, and testing of independent sub-modules.
[0147] Figure 5 This is a flowchart of a method for modular extension and integration of arbitrary granularity (from the perspective of extension modules) in one embodiment of the present invention. Figure 5 As shown, methods for modular extension and integration at arbitrary granularity include:
[0148] S401: Receive one or more extension contracts corresponding to each extension point ID from the management device for modular extensions and integrations of arbitrary granularity.
[0149] S402: Generate an extended description that corresponds one-to-one with the extended contract.
[0150] S403: Send extended descriptions to management devices for modular extensions and integrations of arbitrary granularity.
[0151] Figure 5 The implementation entity of the method for modular extension and integration at arbitrary granularity shown can be a device applied to modular extension and integration at arbitrary granularity of the extension module. Figure 5As shown in the process, the modular extension and integration method of arbitrary granularity in this embodiment of the invention (from the perspective of the extension module) first receives one or more extension contracts corresponding to each extension point ID from the management device of modular extension and integration of arbitrary granularity, then generates an extension description that corresponds one-to-one with the extension contract, and then sends the extension description to the management device of modular extension and integration of arbitrary granularity. This improves the system's scalability, reduces the coupling between system modules, increases the replaceability, reusability, and applicability of system modules, and ensures that problems in a single module will not affect the system's security. It also provides a basis for the separate production, development, and testing of independent sub-modules.
[0152] Based on the same inventive concept, embodiments of the present invention also provide an apparatus for modular expansion and integration at arbitrary granularity. Since the principle by which this apparatus solves the problem is similar to that of the method for modular expansion and integration at arbitrary granularity (from the perspective of a management device for modular expansion and integration at arbitrary granularity), the implementation of this apparatus can be referred to the implementation of the method, and repeated details will not be elaborated further.
[0153] Figure 6 This is a structural block diagram of a modular expansion and integration management device applied to arbitrary granularity in an embodiment of the present invention. For example... Figure 6 As shown, the device for modular expansion and integration of management devices at arbitrary granularity includes:
[0154] A partitioning unit is used to divide one or more systems into multiple modules according to preset rules;
[0155] The allocation unit is used to allocate one or more expansion points and the expansion point ID corresponding to each expansion point to the expanded module.
[0156] The first receiving unit is configured to receive one or more extension contracts corresponding to each extension point ID from the extended module; receive extension descriptions corresponding one-to-one with the extension contracts from the extended module; and receive preset extension point IDs from the extended module.
[0157] The first sending unit is used to send one or more extension contracts corresponding to each extension point ID to the extension module; and to send an extension description corresponding to a preset extension point ID to the extended module.
[0158] The master configuration table unit is used to create a master configuration table for modules based on the extended modules and the extended modules.
[0159] The initialization unit is used to load the extended modules and extended modules according to the overall module configuration table, and to initialize each module.
[0160] The registration unit is used to register one or more extension point IDs corresponding to each module and one or more extension descriptions corresponding to each extension point ID in the extension registration manager;
[0161] The acquisition unit is used to retrieve the extension description corresponding to the preset extension point ID from the extension registration manager.
[0162] In one embodiment, it further includes:
[0163] The filtering unit is used to filter the extended descriptions according to the preset filtering rules when there are multiple extended descriptions corresponding to the preset extended point ID.
[0164] The first sending unit is specifically used to send the filtered extended description to the extended module.
[0165] In one embodiment, the registration unit is further configured to: register one or more extension contracts corresponding to each extension point ID in the extension registration manager;
[0166] The acquisition unit is also used to: obtain the extension contract corresponding to the preset extension point ID from the extension registration manager;
[0167] The device for modular expansion and integration at arbitrary granularity further includes: a judgment unit, used to determine whether the expansion contract corresponding to the preset expansion point ID corresponds one-to-one with the expansion description corresponding to the preset expansion point ID;
[0168] The first sending unit is also used to: when the extension contract corresponding to the preset extension point ID and the extension description corresponding to the preset extension point ID correspond one-to-one, send the extension description corresponding to the preset extension point ID to the extended module.
[0169] In summary, the arbitrary-granularity modular expansion and integration device of this invention (from the perspective of an arbitrary-granularity modular expansion and integration management device) divides one or more systems into multiple modules according to preset rules, and performs the following processing on any two modules: first, it allocates one or more expansion points and corresponding expansion point IDs to the expanded module; it receives and sends one or more expansion contracts corresponding to each expansion point ID from the expanded module to the expansion module; then, it receives the expansion description corresponding to each expansion contract from the expansion module; next, it establishes a module master configuration table based on the expanded module and the expansion module, and loads the module according to the module master configuration table. The system establishes both the extended module and the extending module, initializes each module, and then registers one or more extension point IDs and one or more extension descriptions corresponding to each extension point ID in the extension registration manager. It receives preset extension point IDs from the extended module and finally retrieves and sends the preset extension point IDs from the extension registration manager to the extended module. This improves the system's scalability, reduces the coupling between system modules, and increases the replaceability, reusability, and applicability of system modules. It ensures that problems in a single module will not affect the system's security and provides a foundation for the independent production, development, and testing of individual sub-modules.
[0170] Based on the same inventive concept, embodiments of the present invention also provide an apparatus for modular expansion and integration at arbitrary granularity. Since the principle by which this apparatus solves the problem is similar to the method for modular expansion and integration at arbitrary granularity (from the perspective of the expanded module), the implementation of this apparatus can be referred to the implementation of the method, and repeated details will not be elaborated further.
[0171] Figure 7 This is a structural block diagram of a device for modular expansion and integration of any granularity applied to the expanded module, as described in an embodiment of the present invention. Figure 7 As shown, the apparatus for modular expansion and integration at any granularity of the extended module includes:
[0172] The second receiving unit is used to receive one or more extension points and extension point IDs corresponding to each extension point from the modular extension and integration management device of arbitrary granularity; and to receive extension descriptions corresponding to preset extension point IDs from the modular extension and integration management device of arbitrary granularity.
[0173] An extended contract unit is used to generate one or more extended contracts corresponding to each extended point ID.
[0174] The second sending unit is used to send one or more extension contracts corresponding to each extension point ID to the modular extension and integration management device of arbitrary granularity; and to send a preset extension point ID to the modular extension and integration management device of arbitrary granularity.
[0175] Functional units are used to obtain the corresponding functions from the extension modules based on the extension description.
[0176] In summary, the arbitrary-granularity modular extension and integration device (from the perspective of the extended module) of this invention first receives one or more extension points and corresponding extension point IDs from the arbitrary-granularity modular extension and integration management device. Then, it generates one or more extension contracts corresponding to each extension point ID, sends one or more extension contracts corresponding to each extension point ID to the arbitrary-granularity modular extension and integration management device, sends preset extension point IDs to the arbitrary-granularity modular extension and integration management device, and finally receives the extension description corresponding to the preset extension point ID from the arbitrary-granularity modular extension and integration management device. Based on the extension description, it retrieves the corresponding function from the extension module. This improves the system's scalability, reduces the coupling between system modules, increases the replaceability, reusability, and applicability of system modules, and ensures that problems in a single module do not affect system security. It also provides a basis for the separate production, development, and testing of independent sub-modules.
[0177] Based on the same inventive concept, embodiments of the present invention also provide a device for modular expansion and integration at arbitrary granularity. Since the principle by which this device solves the problem is similar to the method for modular expansion and integration at arbitrary granularity (from the perspective of the expansion module), the implementation of this device can be referred to the implementation of the method, and repeated details will not be elaborated further.
[0178] Figure 8 This is a structural block diagram of a device for modular expansion and integration of extension modules at any granularity, as described in an embodiment of the present invention. For example... Figure 8 As shown, the device for modular expansion and integration at any granularity of the expansion module includes:
[0179] The third receiving unit is used to receive one or more extension contracts corresponding to each extension point ID from the management device for modular extension and integration of arbitrary granularity;
[0180] An extended description unit is used to generate an extended description that corresponds one-to-one with the extended contract.
[0181] The third transmitting unit is used to transmit management devices for modular extensions and integrations with extended descriptions at arbitrary granularity.
[0182] The arbitrary granularity modular extension and integration device (from the perspective of the extension module) of this invention first receives one or more extension contracts corresponding to each extension point ID from the arbitrary granularity modular extension and integration management device, then generates an extension description that corresponds one-to-one with the extension contract, and then sends the extension description to the arbitrary granularity modular extension and integration management device. This improves the system's scalability, reduces the coupling between system modules, and increases the replaceability, reusability, and applicability of system modules. It ensures that problems in a single module will not affect the system's security and provides a basis for the separate production, development, and testing of independent sub-modules.
[0183] Based on the same inventive concept, embodiments of the present invention also provide a system for modular expansion and integration at arbitrary granularity. Figure 9 This is a structural block diagram of a system for modular expansion and integration at any granularity in an embodiment of the present invention. For example... Figure 9 As shown, the system for modular expansion and integration of arbitrary granularity includes, as described above, a management device for modular expansion and integration of arbitrary granularity; a device for modular expansion and integration of arbitrary granularity applied to the module being expanded; and a device for modular expansion and integration of arbitrary granularity applied to the module being expanded.
[0184] The specific process of modular expansion and integration of systems with arbitrary granularity is as follows:
[0185] 1. A modular expansion and integration management device with arbitrary granularity divides one or more systems into multiple modules according to preset rules, and performs the following processing on any two modules: assigns one or more expansion points and expansion point IDs corresponding to each expansion point to the expanded module.
[0186] 2. The extended module receives one or more extension points and one extension point ID corresponding to each extension point from the modular extension and integration management device of arbitrary granularity, generates and sends one or more extension contracts corresponding to each extension point ID to the modular extension and integration management device of arbitrary granularity.
[0187] 3. The modular expansion and integration management device with arbitrary granularity receives one or more expansion contracts corresponding to each expansion point ID from the expanded module, and sends one or more expansion contracts corresponding to each expansion point ID to the expansion module.
[0188] 4. The extension module receives one or more extension contracts corresponding to each extension point ID from the modular extension and integration management device of arbitrary granularity, generates and sends an extension description corresponding one-to-one with the extension contract to the modular extension and integration management device of arbitrary granularity.
[0189] 5. A modular extension and integration management device with arbitrary granularity receives extension descriptions from extension modules that correspond one-to-one with the extension contracts.
[0190] 6. The management device for modular expansion and integration at arbitrary granularity establishes a master module configuration table based on the expanded module and the expansion module, loads the expanded module and the expansion module according to the master module configuration table, and initializes each module. The management device for modular expansion and integration at arbitrary granularity also registers one or more expansion point IDs corresponding to each module and one or more expansion descriptions corresponding to each expansion point ID in the expansion registration manager.
[0191] 7. The extended module sends a preset extension point ID to a modular extension and integration management device of arbitrary granularity.
[0192] 8. The modular extension and integration management device with arbitrary granularity receives the preset extension point ID from the extended module, obtains and sends the extension description corresponding to the preset extension point ID to the extended module from the extension registration manager.
[0193] 9. The extended module receives the extension description corresponding to the preset extension point ID from the modular extension and integration management device of arbitrary granularity, and obtains the corresponding function from the extended module according to the extension description.
[0194] For example, when an extended module wants the functionality of another extended module, it sends the extension point ID corresponding to that functionality to the modular extension and integration management device of arbitrary granularity. The management device then retrieves the extension description of the extended module based on the extension point ID to obtain the functionality corresponding to that description. This functionality could be resources provided by the extended module, computing services offered by the extended module, or other business functions, etc.
[0195] The modular expansion and integration system of arbitrary granularity in this invention can divide an independent system into multiple modules according to various business needs, and can automatically integrate and merge the divided modules into a new organic whole. This improves the system's scalability, reduces the coupling between system modules, and increases the replaceability, reusability, and applicability of system modules. It ensures that problems in a single module will not affect the system's security, and provides a basis for the separate production, development, and testing of independent sub-modules.
[0196] In summary, the modular extension and integration system with arbitrary granularity provided by the embodiments of the present invention has the following beneficial effects:
[0197] 1. Supports arbitrary module granularity. For any system, it supports multiple modularization methods: full modularization or a main module + flat module approach.
[0198] 2. The extension contracts of modules have been extended (no longer just including APIs) and have precise descriptions; this makes the extension capabilities virtually unlimited.
[0199] 3. Diverse modules. The meaning of "module" has been broadened; as long as it follows the extension contract and extension description, it can be integrated into the system.
[0200] 4. The functions of each module can be used interchangeably, making the modules themselves transparent, and developers do not need to care about where the modules are located.
[0201] 5. The system achieves scalability, reusability, and replaceability. Based on this invention, if the existing system functionality is insufficient to complete certain business tasks, system developers or experienced third-party users can develop their own modules and add them to the system. These modules automatically integrate with the original system modules into a cohesive whole—this is scalability. If any module encounters a problem, it will not affect the entire system; simply replacing or modifying that module allows for rapid system reuse. Problematic modules can also be discarded, and the system generally still functions—this is reusability and replaceability. During production, the system can be broken down into a suitable number of modules based on team size, with each team responsible for one module. After module development is complete, some modules can be merged as needed. Merging modules is very easy as long as coupling between parts is minimized during development.
[0202] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for modular extension and integration with arbitrary granularity, characterized in that, include: Divide one or more systems into multiple modules according to preset rules; Perform the following processing on any two modules among the plurality of modules: Assign one or more extension points and an extension point ID corresponding to each extension point to the module being extended; Receive one or more extension contracts corresponding to each extension point ID from the extended module; Send one or more extension contracts corresponding to each extension point ID to the extension module; Receive an extension description from the extension module that corresponds one-to-one with the extension contract; Establish a module master configuration table based on the extended module and the extended module; Load the extended modules and extended modules according to the overall module configuration table, and initialize each module; Register one or more extension point IDs for each module and one or more extension descriptions for each extension point ID in the extension registration manager; Receive a preset expansion point ID from the expanded module; Obtain the extension description corresponding to the preset extension point ID from the extension registration manager; Send the extension description corresponding to the preset extension point ID to the extended module; The step of dividing one or more systems into multiple modules according to preset rules includes: decomposing them into multiple modules at arbitrary granularity based on the distribution of services and functions; After obtaining the extension description corresponding to the preset extension point ID from the extension registration manager, the method further includes: when there are multiple extension descriptions corresponding to the preset extension point ID, filtering the extension descriptions according to preset filtering rules; and sending the filtered extension descriptions to the extended module. The method further includes: registering one or more extension contracts corresponding to each extension point ID in the extension registration manager; obtaining the extension contract corresponding to the preset extension point ID from the extension registration manager; determining whether the extension contract corresponding to the preset extension point ID corresponds one-to-one with the extension description corresponding to the preset extension point ID; and when the extension contract corresponding to the preset extension point ID corresponds one-to-one with the extension description corresponding to the preset extension point ID, sending the extension description corresponding to the preset extension point ID to the extended module. The extended module has executable extension capabilities, specifying the interface type through the `interface` attribute, while the extending module provides the value of the `class` attribute. When an extending module links with an extended module, an extension description is provided through XML-formatted nodes. An extension point can be linked by one or more extension descriptions, and each module can be either an extended module or an extending module. After registration, integration is performed according to the link relationships between modules in the extension registration manager. After integration, the various modules extend and use each other's functions through common services, link points, and links to achieve module transparency.
2. A method for modular extension and integration with arbitrary granularity, characterized in that, include: Receive one or more extension points from the management device for modular extension and integration of arbitrary granularity, and an extension point ID corresponding to each extension point; Generate one or more extension contracts corresponding to each extension point ID; Send one or more extension contracts corresponding to each extension point ID to the management device for modular extension and integration of arbitrary granularity; Send a preset extension point ID to the management device for modular extension and integration of arbitrary granularity; Receive the extension description corresponding to the preset extension point ID from the management device for modular extension and integration of arbitrary granularity; The corresponding functions are obtained from the extension modules according to the extended description; After receiving the extension description corresponding to the preset extension point ID from the management device for modular extension and integration of arbitrary granularity, the method further includes: when there are multiple extension descriptions corresponding to the preset extension point ID, filtering the extension descriptions according to preset filtering rules; and sending the filtered extension descriptions to the extended module. The method further includes: registering one or more extension contracts corresponding to each extension point ID in the extension registration manager; obtaining the extension contract corresponding to the preset extension point ID from the extension registration manager; determining whether the extension contract corresponding to the preset extension point ID corresponds one-to-one with the extension description corresponding to the preset extension point ID; and when the extension contract corresponding to the preset extension point ID corresponds one-to-one with the extension description corresponding to the preset extension point ID, sending the extension description corresponding to the preset extension point ID to the extended module. The extended module has executable extension capabilities, specifying the interface type through the `interface` attribute, while the extending module provides the value of the `class` attribute. When an extending module links with an extended module, an extension description is provided through XML-formatted nodes. An extension point can be linked by one or more extension descriptions, and each module can be either an extended module or an extending module. After registration, integration is performed according to the link relationships between modules in the extension registration manager. After integration, the various modules extend and use each other's functions through common services, link points, and links to achieve module transparency.
3. A method for modular extension and integration with arbitrary granularity, characterized in that, include: Receive one or more extension contracts corresponding to each extension point ID from the management device for modular extensions and integration of arbitrary granularity; Generate extended descriptions that correspond one-to-one with the extended contracts; Send the extended description to the management device for modular extensions and integrations of arbitrary granularity; The method further includes: when there are multiple extension descriptions corresponding to a preset extension point ID, filtering the extension descriptions according to a preset filtering rule; sending the filtered extension descriptions to the module being extended; registering one or more extension contracts corresponding to each extension point ID in the extension registration manager; obtaining the extension contract corresponding to the preset extension point ID from the extension registration manager; determining whether the extension contract corresponding to the preset extension point ID corresponds one-to-one with the extension description corresponding to the preset extension point ID; when the extension contract corresponding to the preset extension point ID corresponds one-to-one with the extension description corresponding to the preset extension point ID, sending the extension description corresponding to the preset extension point ID to the module being extended. The extended module has executable extension capabilities, specifying the interface type through the `interface` attribute, while the extending module provides the value of the `class` attribute. When an extending module links with an extended module, an extension description is provided through XML-formatted nodes. An extension point can be linked by one or more extension descriptions, and each module can be either an extended module or an extending module. After registration, integration is performed according to the link relationships between modules in the extension registration manager. After integration, the various modules extend and use each other's functions through common services, link points, and links to achieve module transparency.
4. A device for modular expansion and integration at arbitrary granularity, applied to a management device for modular expansion and integration at arbitrary granularity, characterized in that, include: A partitioning unit is used to divide one or more systems into multiple modules according to preset rules; An allocation unit is used to allocate one or more expansion points and expansion point IDs corresponding to each expansion point to the module being expanded. The first receiving unit is configured to receive one or more extension contracts corresponding to each extension point ID of the extended module. Receive an extension description from the extension module that corresponds one-to-one with the extension contract; receive a preset extension point ID from the extended module; The first sending unit is used to send one or more extension contracts corresponding to each extension point ID to the extension module; Send the extension description corresponding to the preset extension point ID to the extended module; The total configuration table unit is used to establish a total module configuration table based on the extended module and the extended module; An initialization unit is used to load the extended modules and extended modules according to the module master configuration table, and to initialize each module. The registration unit is used to register one or more extension point IDs corresponding to each module and one or more extension descriptions corresponding to each extension point ID in the extension registration manager; The acquisition unit is used to obtain the extension description corresponding to the preset extension point ID from the extension registration manager; The partitioning unit is also used to decompose the business into multiple modules at any granularity according to the distribution and function of the business; The device further includes: A filtering unit is used to filter the extended descriptions according to a preset filtering rule when there are multiple extended descriptions corresponding to the preset extended point ID. The first sending unit is specifically used to: send the filtered extended description to the extended module; The registration unit is also used to: register one or more extension contracts corresponding to each extension point ID in the extension registration manager; The acquisition unit is further configured to: obtain the extension contract corresponding to the preset extension point ID from the extension registration manager; The device for modular expansion and integration at arbitrary granularity further includes: a judgment unit, used to determine whether the expansion contract corresponding to the preset expansion point ID corresponds one-to-one with the expansion description corresponding to the preset expansion point ID; The first sending unit is further configured to: when the extension contract corresponding to the preset extension point ID and the extension description corresponding to the preset extension point ID correspond one-to-one, send the extension description corresponding to the preset extension point ID to the extended module; The extended module has executable extension capabilities, specifying the interface type through the `interface` attribute, while the extending module provides the value of the `class` attribute. When an extending module links with an extended module, an extension description is provided through XML-formatted nodes. An extension point can be linked by one or more extension descriptions, and each module can be either an extended module or an extending module. After registration, integration is performed according to the link relationships between modules in the extension registration manager. After integration, the various modules extend and use each other's functions through common services, link points, and links to achieve module transparency.
5. A modular expansion and integration device with arbitrary granularity, applied to the module being expanded, characterized in that, include: The second receiving unit is used to receive one or more extension points from the management device for modular extension and integration of arbitrary granularity, and the extension point ID corresponding to each extension point; Receive an extension description corresponding to a preset extension point ID from the management device for modular extension and integration of arbitrary granularity; An extended contract unit is used to generate one or more extended contracts corresponding to each extended point ID. The second sending unit is used to send one or more extension contracts corresponding to each extension point ID to the management device for modular extension and integration of arbitrary granularity; Send a preset extension point ID to the management device for modular extension and integration of arbitrary granularity; A functional unit is used to obtain the corresponding function from the extension module according to the extension description; The second sending unit is also configured to, when there are multiple extension descriptions corresponding to the preset extension point ID, filter the extension descriptions according to preset filtering rules; send the filtered extension descriptions to the extended module; and register one or more extension contracts corresponding to each extension point ID in the extension registration manager; Obtain the extension contract corresponding to the preset extension point ID from the extension registration manager; determine whether the extension contract corresponding to the preset extension point ID corresponds one-to-one with the extension description corresponding to the preset extension point ID; when the extension contract corresponding to the preset extension point ID corresponds one-to-one with the extension description corresponding to the preset extension point ID, send the extension description corresponding to the preset extension point ID to the extended module; The extended module has executable extension capabilities, specifying the interface type through the `interface` attribute, while the extending module provides the value of the `class` attribute. When an extending module links with an extended module, an extension description is provided through XML-formatted nodes. An extension point can be linked by one or more extension descriptions, and each module can be either an extended module or an extending module. After registration, integration is performed according to the link relationships between modules in the extension registration manager. After integration, the various modules extend and use each other's functions through common services, link points, and links to achieve module transparency.
6. A modular expansion and integration device with arbitrary granularity, applied to expansion modules, characterized in that, include: The third receiving unit is used to receive one or more extension contracts corresponding to each extension point ID from the management device for modular extension and integration of arbitrary granularity; An extended description unit is used to generate an extended description that corresponds one-to-one with the extended contract; The third sending unit is used to send the extended description to the management device for modular extension and integration of arbitrary granularity; The third sending unit is also used to filter the extension descriptions according to a preset filtering rule when there are multiple extension descriptions corresponding to the preset extension point ID; send the filtered extension descriptions to the extended module; and register one or more extension contracts corresponding to each extension point ID in the extension registration manager. Obtain the extension contract corresponding to the preset extension point ID from the extension registration manager; determine whether the extension contract corresponding to the preset extension point ID corresponds one-to-one with the extension description corresponding to the preset extension point ID; when the extension contract corresponding to the preset extension point ID corresponds one-to-one with the extension description corresponding to the preset extension point ID, send the extension description corresponding to the preset extension point ID to the extended module; The extended module has executable extension capabilities, specifying the interface type through the `interface` attribute, while the extending module provides the value of the `class` attribute. When an extending module links with an extended module, an extension description is provided through XML-formatted nodes. An extension point can be linked by one or more extension descriptions, and each module can be either an extended module or an extending module. After registration, integration is performed according to the link relationships between modules in the extension registration manager. After integration, the various modules extend and use each other's functions through common services, link points, and links to achieve module transparency.
7. A modular extension and integration system with arbitrary granularity, characterized in that, include: The arbitrary-granularity modular expansion and integration device of claim 4; The apparatus of claim 5 for modular expansion and integration of arbitrary granularity applied to the extended module; The apparatus of claim 6 for modular expansion and integration of arbitrary granularity applied to an extension module.
Citation Information
Patent Citations
Method and device for calling software module
CN101295250A