Search

CN-116136780-B - Unified expansion and management method for heterogeneous system

CN116136780BCN 116136780 BCN116136780 BCN 116136780BCN-116136780-B

Abstract

The invention discloses a unified expansion and management method of a heterogeneous system, which can directly solve the problem that the traditional plug-in combination cannot be renamed, and directly generates a form by passing through background data, thereby achieving the effect of twice the result with half effort. The method adopts microkernel and plug-in, and solves the problem that a plurality of plug-ins cannot be renamed and expanded under the same type by setting the priority of the plug-ins. The form generation method using form-create generates a form directly from the background data.

Inventors

  • Gai Lishan

Assignees

  • 上海埃林哲软件系统股份有限公司

Dates

Publication Date
20260508
Application Date
20230221

Claims (6)

  1. 1. A method for unified expansion and management of heterogeneous systems, comprising defining a plug-in flow, creating a workflow flow, and executing the workflow flow, wherein: Defining the plug-in flow includes: defining an abstract plug-in factory, wherein the abstract plug-in factory extracts various basic characteristics and attributes of plug-ins of the same type, and defines the extracted basic characteristics and attributes in a type plug-in interface or a base class; step 1-2, defining abstract channels on the basis of an abstract plug-in factory, wherein the abstract channels define abstract methods which are required to be realized by plug-ins under the same type of plug-ins, and define the realization flow inside a type plug-in interface; Step 1-3, the defined abstract plug-in factories and abstract channels are released outwards, and plug-ins of the same heterogeneous type are expanded by realizing the abstract plug-in factories and the abstract channels so as to perform unified management; creating a workflow process includes: Step 2-1, a plug-in manager at the back end of the heterogeneous system stores all plug-in contents into a memory by managing a defined abstract plug-in factory; step 2-2, when the front end of the heterogeneous system opens the task of creating the workflow, a corresponding form is generated first; Step 2-3, the front end of the heterogeneous system creates a workflow, selects types according to the needs of a user, submits the created workflow to the rear end, and the rear end generates a flow definition according to the received workflow and stores the flow definition in a database; executing the workflow process comprises: Step 3-1, after the master node of the heterogeneous system is started, starting a timing thread to inquire whether task scheduling to be executed exists, and if so, acquiring all information including workflow of executing tasks; step 3-2, the master node disassembles rules, tasks and execution sequences according to workflow definition according to workflow information of the executed tasks; step 3-3, the master node sends the task instance identification to be completed to the processing task node to be completed according to the task priority defined by the workflow and different working states of the processing task cluster node; step 3-4, starting a plugin manager at the rear end of the heterogeneous system when the whole processing task cluster node is started, and storing all plugins defined by an abstract plugin factory in a memory by the plugin manager; Step 3-5, the processing task cluster node starts a work management thread while starting a plug-in manager at the rear end of the heterogeneous system, the work management thread monitors task queue information in real time, if the execution task instance information is received from the task queue, detailed information of an execution task is obtained, and a task execution thread is created; step 3-6, the task execution thread starts to execute the task according to the task plug-in information and the executed task information, and sends the task execution status to the master node, and the whole plug-in life cycle is ended; In the step 1-1, the abstract plug-in factory is defined on the basis of PrioritySPI, all plug-in contents in the step 2-1 are stored in the memory in a PrioritySPI definition mode, and in the step 3-4, the plug-in manager stores all plug-ins defined by the abstract plug-in factory in the memory in a PrioritySPI definition mode; in step 1-3, the priority is defined by PrioritySPI interfaces to extend, and the priority of the same-name plugins is set to determine the execution sequence of the same-name plugins.
  2. 2. The unified extension and management method of heterogeneous system according to claim 1, wherein in step 2-1, the plug-in manager refers to managing the same type of plug-in management class, and the plug-ins include task plug-ins, data source plug-ins and alarm plug-ins.
  3. 3. The unified extension and management method of heterogeneous system according to claim 1, wherein in step 2-1, prioritySPI defines a new interface based on the original SPI implementation, the new interface inherits the larger interface and defines a method for setting priority, the method for setting priority is judged by comparing the size of priority, class of PrioritySPI interface sets own priority according to incoming priority, and PrioritySPI definition is implemented.
  4. 4. The method for unified expansion and management of heterogeneous systems according to claim 1, wherein in step 2-2, the form is generated by acquiring JSON plug-ins from the back end and generating corresponding forms through the JSON plug-ins.
  5. 5. The method for unified extension and management of heterogeneous systems according to claim 4, wherein in step 2-2, the form is generated by JSON plug-in form-create mode.
  6. 6. The method for unified extension and management of a heterogeneous system according to claim 1, wherein the selected type includes a task type, a data source type, or an alarm type in step 2-3.

Description

Unified expansion and management method for heterogeneous system Technical Field The invention relates to a heterogeneous system technology, in particular to a method for uniformly expanding and managing a heterogeneous system. Background When the system faces multiple plugins of the same type, the existing processing mode is to introduce the plugins into the memory in sequence by adopting an SPI (Service Provider interface, a service providing interface, that is, an interface for providing a certain service to a service developer or a service manufacturer, and then provide the running result of the plugins to the front end, which leads to that if the name of a subsequent component is the same as that of the preceding component already introduced into the memory, the subsequent component cannot be introduced into the memory. In addition, the front end can only write various forms in a hard decoding mode according to the required tasks. In detail, the following disadvantages are caused by the technical implementation of SPI: 1. not loaded on demand, all implementations need to be traversed and instantiated before the desired implementation can be found in the loop. If some implementation classes are not wanted, or some classes are time consuming to instantiate, they are also loaded and instantiated, which is wasteful. 2. The manner of acquiring a certain implementation class is not flexible enough, and can only be acquired through Iterator modes, and the corresponding implementation class cannot be acquired according to a certain parameter (the Spring BeanFactory, applicationContext is advanced). 3. Instances of multiple concurrent multithreading using ServiceLoader classes are not secure. Disclosure of Invention The following presents a simplified summary of one or more aspects in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later. The invention aims to solve the problems and provides a unified expansion and management method of a heterogeneous system, which can directly solve the problem that the traditional plug-in combination cannot be renamed and directly generate a form through background data to achieve the effect of twice the result with little effort. The invention discloses a unified expansion and management method of a heterogeneous system, which comprises the steps of defining a plug-in flow, creating a workflow flow and executing the workflow flow, wherein: Defining the plug-in flow includes: defining an abstract plug-in factory, wherein the abstract plug-in factory extracts various basic characteristics and attributes of plug-ins of the same type, and defines the extracted basic characteristics and attributes in a type plug-in interface or a base class; step 1-2, defining abstract channels on the basis of an abstract plug-in factory, wherein the abstract channels define abstract methods which are required to be realized by plug-ins under the same type of plug-ins, and define the realization flow inside a type plug-in interface; Step 1-3, the defined abstract plug-in factories and abstract channels are released outwards, and plug-ins of the same heterogeneous type are expanded by realizing the abstract plug-in factories and the abstract channels so as to perform unified management; creating a workflow process includes: Step 2-1, a plug-in manager at the back end of the heterogeneous system stores all plug-in contents into a memory by managing a defined abstract plug-in factory; step 2-2, when the front end of the heterogeneous system opens the task of creating the workflow, a corresponding form is generated first; Step 2-3, the front end of the heterogeneous system creates a workflow, selects types according to the needs of a user, submits the created workflow to the rear end, and the rear end generates a flow definition according to the received workflow and stores the flow definition in a database; executing the workflow process comprises: Step 3-1, after the master node of the heterogeneous system is started, starting a timing thread to inquire whether task scheduling to be executed exists, and if so, acquiring all information including workflow of executing tasks; step 3-2, the master node disassembles rules, tasks and execution sequences according to workflow definition according to workflow information of the executed tasks; step 3-3, the master node sends the task instance identification to be completed to the processing task node to be completed according to the task priority defined by the workflow and different working states of the processing task cluster node; step 3-4, starting a plugin manager at the rear end of the heterogeneous