A plug-in method and system for distributed job scheduling and execution
The plug-in method is used to manage and execute plug-ins, which solves the shortcomings of the existing distributed job scheduling system in the execution of customized business jobs, improves stability and flexibility, and meets complex and frequently changing business needs.
Patent Information
- Application Number
- CN202011382758.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-01
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2040-12-01
AI Technical Summary
The existing distributed job scheduling and execution system performs well in terms of stable and reliable operation and lightweight scheduling, but lacks support in the execution of customized business jobs, resulting in frequent changes in business requirements and frequent system upgrades, affecting system stability. and user experience.
Adopting a plug-in method, it provides plug-in configuration management, plug-in task configuration management, plug-in version management, plug-in cache management and task trigger execution management, allowing users to create, update and manage plug-ins, ensuring that the latest version of the plug-in is used to execute tasks and realize customized services Execution of the job.
It realizes the execution of customized business jobs, ensures the stability and flexibility of the distributed job scheduling and execution system, can easily cope with complex and frequently changing business requirements, and improves the reliability and user experience of the system.
Smart Images

Figure CN114579326B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distributed scheduling, and in particular to a distributed job scheduling and execution method plug-in method and system. Background Art
[0002] With the advancement of industrial informatization and intelligent development, more and more data are generated in the process of industrial production and enterprise management, and the value of this data is increasing. How to properly manage and utilize this data and turn it into a more valuable asset faces the following challenges:
[0003] 1. Data is distributed in isolated islands
[0004] The data generated during the industrial production process are distributed across various production bases, and the data generated by enterprise management are scattered across various isolated information systems, which brings great trouble to the proper management and utilization of these data assets.
[0005] 2. Data Diversification
[0006] Industrial production and enterprise management generate a variety of data types, including structured data, time series data, and unstructured data. In addition, the data content is also varied and not processed according to standards or specifications. This is also a huge challenge to the management and utilization of data assets.
[0007] It is obviously not feasible to directly manage and utilize the data of each information island in a unified manner. It is a more feasible method to collect the data of each island in a unified manner and enter the data lake. This process requires a job scheduling and execution system to support it. In addition, the diverse raw data entering the data lake is obviously not suitable for direct use and needs to be processed. This process also requires a job scheduling and execution system to support it. In the end, management and utilization based on the processed data will achieve twice the result with half the effort.
[0008] Combined with the scenarios described above, it can be seen that this job scheduling and execution system needs to schedule and execute at least a large number of data collection jobs from diverse data sources and a variety of complex business data processing jobs. Obviously, a job scheduling and execution system that meets the following functions is urgently needed:
[0009] 1. Distributed and linearly scalable;
[0010] 2. Stable and reliable operation;
[0011] 3. Lightweight scheduling and execution;
[0012] 4. Execution of customized business operations;
[0013] Existing distributed job scheduling and execution systems are relatively good in one or two aspects: stable and reliable operation, lightweight scheduling and execution, but rarely involved in the execution of customized business jobs. They usually provide more abundant task types for users to choose from in order to support more business scenarios. However, the reality is that business scenarios are far more than these task types. Once there is a new demand, new task types can only be developed in the job scheduling and execution system. After the development is completed, the new version is recompiled and released, and then launched to the production environment of the job scheduling and execution system.
[0014] In this way, even if the job scheduling and execution system can support rolling upgrades well, it is inevitable that the restart of some nodes during the upgrade process will cause job execution jitter and slower execution than usual, thus affecting other related businesses. To make matters worse, demand changes are very frequent, which leads to frequent upgrades and launches of the job scheduling and execution system. The entire experience is bound to be unfriendly.
[0015] For the above reasons, the existing job scheduling and execution systems cannot meet the needs, forcing us to explore more suitable distributed job scheduling and execution systems. Summary of the invention
[0016] In view of the defects in the prior art, the object of the present invention is to provide a plug-in method and system for distributed job scheduling and execution.
[0017] According to one aspect of the present invention, a method for distributed job scheduling and execution method plug-in is provided, comprising the following steps:
[0018] The plug-in configuration management step provides interaction with the user, including: creating plug-ins, uploading plug-in packages, deleting plug-ins, updating plug-in configurations, updating plug-in packages, and querying plug-in information;
[0019] Plugin task configuration management steps, manage interactive tasks with users, including: creating plugin tasks, deleting plugin tasks, updating plugin tasks, configuring plugin task triggering rules, and querying plugin task information;
[0020] The plug-in version management step manages the plug-in version. Once the user changes the configuration of the plug-in, a new plug-in version is generated;
[0021] Plugin cache management step: cache the plugin packages and plugin configurations on each execution node, and clean up the old version plugin cache;
[0022] Task triggering execution management steps, triggering task execution according to certain scheduling rules or manually, and the management of task execution process, including task submission, task start and task end;
[0023] The plugin task execution step references the plugin configured in the task when executing, and runs the user-configured task with the latest version of the plugin.
[0024] Preferably, in the plug-in configuration management step, the user creates a plug-in and uploads a plug-in program package through the plug-in configuration management step, and triggers the plug-in version management step to generate version-related information of the plug-in.
[0025] Preferably, in the plug-in configuration management step, when the business requirements change, the user updates the plug-in program package through the plug-in configuration management step, and then triggers the plug-in version management step to generate information related to the new version of the plug-in.
[0026] Preferably, in the plug-in task configuration management step, the user creates the task that needs to be run based on the specified plug-in, as well as the rules for triggering the task running and the parameters for the task running through the plug-in task configuration management step.
[0027] Preferably, in the task triggering execution management step, when the task triggering execution management step finds that the plug-in task configured by the user needs to be executed according to the user's triggering rules, it then applies for corresponding resources and finally submits a request to start the task. When the task is a plug-in type task, when submitting the request to start the task, it queries the plug-in management step and brings the current version information of the plug-in, the download address of the plug-in of this version and the configuration information of the plug-in of this version in the task execution context.
[0028] Preferably, in the plug-in task execution step, when the task is a plug-in type task, the plug-in task execution step will receive a request to start the plug-in task, and trigger the plug-in cache management step according to relevant information such as the plug-in version in the task execution context.
[0029] Preferably, in the plug-in cache management step, after receiving the request for caching the plug-in, the plug-in cache management step compares the version of the specified plug-in and the currently cached version of the plug-in. If the version has been cached, it is directly returned; if the version has not been cached, the latest plug-in is downloaded according to the download address of the plug-in of this version, and the plug-in package is decompressed, and then the current configuration information of the plug-in is written to the plug-in cache; finally, the cached plug-in is checked, and if it is a plug-in that will no longer be referenced, it is cleared to complete the release of storage space.
[0030] Preferably, in the plug-in task execution step, after the plug-in cache request is returned, the plug-in cached in the plug-in cache management step is referenced, and then the current task is executed through the plug-in, and the task is notified to trigger the execution management step, the task is completed, and the execution results and operation logs are attached.
[0031] Preferably, in the task triggering execution management step, after receiving the message of task execution completion, the task triggering execution management step updates the status of the task and ends the job or runs subsequent tasks in the job as needed.
[0032] According to another aspect of the present invention, a distributed job scheduling and execution system plug-in system is provided, comprising: a plug-in configuration management module, a plug-in task configuration management module, a plug-in version management module, a plug-in cache management module, a task trigger execution management module and a plug-in task execution module;
[0033] The plug-in configuration management module provides interaction with users, including: creating plug-ins, uploading plug-in packages, deleting plug-ins, updating plug-in configurations, updating plug-in packages, and querying plug-in information;
[0034] The plug-in task configuration management module manages interactive tasks with users, including: creating plug-in tasks, deleting plug-in tasks, updating plug-in tasks, configuring plug-in task triggering rules, and querying plug-in task information;
[0035] The plug-in version management module manages the plug-in version. Once the user changes the configuration of the plug-in, a new plug-in version is generated;
[0036] The plug-in cache management module caches plug-in packages and plug-in configurations on each execution node, and cleans up the cache of old plug-ins;
[0037] The task trigger execution management module triggers the execution of tasks according to certain scheduling rules or manually, and manages the task execution process, including task submission, task start and task end;
[0038] The plugin task execution module references the plugin configured in the task during execution and uses the latest version of the plugin to run the user-configured task.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] 1. The present invention has been implemented in the industrial Internet platform xIn3Plat;
[0041] 2. The present invention realizes the execution of customized business operations;
[0042] 2. The present invention has been used in multiple data governance projects. Under the premise of ensuring the stability and reliability of the distributed job scheduling and execution system, it has effectively solved the scenario where the distributed job scheduling and execution system can easily meet various complex and frequently changing business needs. The present invention can be applied in any future projects that use xIn3Plat. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0044] Figure 1 Run the main scene flowchart for the plugin task;
[0045] Figure 2 Create an interface for the plugin;
[0046] Figure 3 To update the plugin package interface;
[0047] Figure 4 Configuration interface for plugin tasks. DETAILED DESCRIPTION
[0048] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0049] In this embodiment, a distributed job scheduling and execution system plug-in system provided by the present invention is adopted, including: a plug-in configuration management module, a plug-in task configuration management module, a plug-in version management module, a plug-in cache management module, a task trigger execution management module and a plug-in task execution module; the main scenario flow chart of each module operation is as follows Figure 1 As shown;
[0050] The plug-in configuration management module provides interaction with users, including: creating plug-ins, uploading plug-in packages, deleting plug-ins, updating plug-in configurations, updating plug-in packages, and querying plug-in information;
[0051] The plug-in task configuration management module manages interactive tasks with users, including: creating plug-in tasks, deleting plug-in tasks, updating plug-in tasks, configuring plug-in task triggering rules, and querying plug-in task information;
[0052] The plug-in version management module manages the plug-in version. Once the user changes the configuration of the plug-in, a new plug-in version is generated;
[0053] The plug-in cache management module caches plug-in packages and plug-in configurations on each execution node, and cleans up the cache of old plug-ins;
[0054] The task trigger execution management module triggers the execution of tasks according to certain scheduling rules or manually, and manages the task execution process, including task submission, task start and task end;
[0055] The plugin task execution module references the plugin configured in the task during execution and uses the latest version of the plugin to run the user-configured task.
[0056] The specific implementation is as follows:
[0057] 1. In the plugin configuration management module, the RESTful interface is implemented, and a web management page is provided based on the RESTful interface. For an example of using the web management page to create a plugin, see Figure 2 ; For an example of using the web management page to update the plug-in package, see Figure 3 .
[0058] 2. In the plug-in task configuration management module, the RESTful interface is implemented, and a web management page is provided based on the RESTful interface. For an example of using the web management page to create a plug-in type task, see Figure 4 .
[0059] 3. In the plug-in version management module, an API interface is provided for use by the plug-in configuration management module and the task trigger execution management module to complete the recording of plug-in version related information and the query interface for the latest plug-in version related information.
[0060] 4. In the plug-in cache management module, an API interface is provided for use by the plug-in task execution module to complete the plug-in cache and return the cache location information.
[0061] 5. In the task trigger execution management module, a TCP communication mechanism is provided for the plug-in task execution module to notify when the plug-in task execution is completed.
[0062] 6. In the plug-in task execution module, a TCP communication mechanism is provided for the task trigger execution management module to trigger task execution.
[0063] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.
[0064] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A distributed job scheduling and execution method plug-in method, characterized in that: include: The plug-in configuration management step provides interaction with the user, including: creating plug-ins, uploading plug-in packages, deleting plug-ins, updating plug-in configurations, updating plug-in packages, and querying plug-in information; Plugin task configuration management steps, manage interactive tasks with users, including: creating plugin tasks, deleting plugin tasks, updating plugin tasks, configuring plugin task triggering rules, and querying plugin task information; The plug-in version management step manages the plug-in version. Once the user changes the configuration of the plug-in, a new plug-in version is generated; The plug-in cache management step is responsible for caching plug-in packages and plug-in configurations on each execution node, as well as cleaning up the cache of old plug-ins; Task triggering execution management steps, triggering task execution according to certain scheduling rules or manually, and the management of task execution process, including task submission, task start and task end; The plug-in task execution step references the plug-in configured in the task during execution and uses the latest version of the plug-in to run the user-configured task; In the task triggering execution management step, when the task triggering execution management step finds that the plug-in task configured by the user needs to be executed according to the user's triggering rule, then applies for corresponding resources, and finally submits a start task request, when the task is a plug-in type task, when submitting the start task request, the plug-in management step is queried, and the current version information of the plug-in, the download address of the plug-in of this version, and the configuration information of the plug-in of this version are brought into the task execution context; In the plug-in cache management step, after receiving the request for caching the plug-in, the plug-in cache management step compares the version of the specified plug-in with the currently cached version of the plug-in. If the version has been cached, it is directly returned; if the version has not been cached, the latest plug-in is downloaded according to the download address of the plug-in of the version, and the plug-in package is decompressed, and then the current configuration information of the plug-in is written to the plug-in cache; finally, the cached plug-in is checked, and if it is a plug-in that will no longer be referenced, it is cleared to complete the release of storage space; The task triggering execution management step triggers the plug-in task configuration management step to query the task and trigger rule information, the task triggering execution management step determines whether the task should be executed, if the judgment result is no, then the plug-in task configuration management step continues to be triggered to query the task and trigger rule information, if the judgment result is yes, then the task triggering execution management step applies for the resources required for task execution, the plug-in version management step queries the latest version of the plug-in and related information, the task triggering execution management step submits a task execution request, and the task execution request includes the plug-in version and related information; The plug-in task execution step obtains a task execution request, triggers the plug-in cache management step to determine whether the plug-in of this version is cached, if the judgment result is yes, the plug-in task execution step references the cached plug-in and uses the plug-in to execute the task, if the judgment result is no, the plug-in cache management step downloads and decompresses the plug-in, generates a plug-in configuration, the plug-in task execution step references the downloaded plug-in, and uses the plug-in to execute the task.
2. The plug-in method for distributed job scheduling and execution according to claim 1, characterized in that: In the plug-in configuration management step, the user creates a plug-in and uploads a plug-in program package through the plug-in configuration management step, and triggers the plug-in version management step to generate version-related information of the plug-in.
3. The plug-in method for distributed job scheduling and execution according to claim 1, characterized in that: In the plug-in configuration management step, when the business requirements change, the user updates the plug-in program package through the plug-in configuration management step, and then triggers the plug-in version management step to generate information related to the new version of the plug-in.
4. The plug-in method for distributed job scheduling and execution according to claim 1, characterized in that: In the plug-in task configuration management step, the user creates a task that needs to be run based on a specified plug-in, as well as a rule for triggering the task running and parameters for the task running through the plug-in task configuration management step.
5. The plug-in method for distributed job scheduling and execution according to claim 1, characterized in that: In the plug-in task execution step, when the task is a plug-in type task, the plug-in task execution step receives a request to start the plug-in task, and triggers the plug-in cache management step according to relevant information such as the plug-in version in the task execution context.
6. The plug-in method for distributed job scheduling and execution according to claim 1, characterized in that: In the plug-in task execution step, after the plug-in cache request returns, the plug-in cached in the plug-in cache management step is referenced, and then the current task is executed through the plug-in, and the task is notified to trigger the execution management step. The task is completed, and the execution results and operation logs are attached.
7. The plug-in method for distributed job scheduling and execution according to claim 1, characterized in that: In the task triggering execution management step, after receiving the message of task execution completion, the task triggering execution management step updates the status of the task and ends the job or runs subsequent tasks in the job as needed.
8. A distributed job scheduling and execution system plug-in system, characterized in that: include: Plugin configuration management module, plugin task configuration management module, plugin version management module, plugin cache management module, task trigger execution management module and plugin task execution module; The plug-in configuration management module provides interaction with users, including: creating plug-ins, uploading plug-in packages, deleting plug-ins, updating plug-in configurations, updating plug-in packages, and querying plug-in information; The plug-in task configuration management module manages interactive tasks with users, including: creating plug-in tasks, deleting plug-in tasks, updating plug-in tasks, configuring plug-in task triggering rules, and querying plug-in task information; The plug-in version management module manages the plug-in version. Once the user changes the configuration of the plug-in, a new plug-in version is generated; The plug-in cache management module caches plug-in packages and plug-in configurations on each execution node, and cleans up the cache of old plug-ins; The task trigger execution management module triggers the execution of tasks according to certain scheduling rules or manually, and manages the task execution process, including task submission, task start and task end; The plug-in task execution module references the plug-in configured in the task during execution and uses the latest version of the plug-in to run the user-configured task; In the task trigger execution management module, when the task trigger execution management step finds that the plug-in task configured by the user needs to be executed according to the user's trigger rule, then applies for the corresponding resources, and finally submits a start task request. When the task is a plug-in type task, when submitting the start task request, the plug-in management step is queried, and the current version information of the plug-in, the download address of the plug-in of this version, and the configuration information of the plug-in of this version are brought into the task execution context; In the plug-in cache management module, after receiving the request for caching the plug-in, the plug-in cache management step compares the version of the specified plug-in with the currently cached version of the plug-in. If the version has been cached, it is directly returned; if the version has not been cached, the latest plug-in is downloaded according to the download address of the plug-in of the version, and the plug-in package is decompressed, and then the current configuration information of the plug-in is written to the plug-in cache; finally, the cached plug-in is checked, and if it is a plug-in that will no longer be referenced, it is cleared to complete the release of storage space; The task triggering execution management module triggers the plug-in task configuration management module to query the task and triggering rule information. The task triggering execution management module determines whether the task should be executed. If the judgment result is no, the plug-in task configuration management module continues to be triggered to query the task and triggering rule information. If the judgment result is yes, the task triggering execution management module applies for the resources required for task execution. The plug-in version management module queries the latest version of the plug-in and related information. The task triggering execution management module submits a task execution request, and the task execution request includes the plug-in version and related information. The plug-in task execution module obtains a request to execute a task, triggers the plug-in cache management module to determine whether the plug-in of this version is cached, if the judgment result is yes, the plug-in task execution module references the cached plug-in and uses the plug-in to execute the task, if the judgment result is no, the plug-in cache management module downloads and decompresses the plug-in, generates a plug-in configuration, the plug-in task execution module references the downloaded plug-in, and uses the plug-in to execute the task.
