Multi-dimensional distributed task scheduling method and device, equipment and storage medium

By receiving configuration information from tasks in multiple programming languages ​​to generate scheduling schemes and triggering fault tolerance mechanisms when task execution is abnormal, the unified scheduling problem of tasks in different programming languages ​​is solved, improving the stability and resource utilization of the system.

CN118963974AInactive Publication Date: 2024-11-15XIAMEN SHEQU INFORMATION TECH CO LTD

Patent Information

Application Number
CN202411449052.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2024-11-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional task scheduling systems struggle to handle large-scale data processing, real-time computing, and complex machine learning model training tasks due to issues such as inconsistent scheduling across different programming languages, insufficient fault tolerance, and limited monitoring methods.

Method used

By receiving configuration information for tasks in various programming languages, a preliminary task scheduling scheme is generated. Based on resource usage and execution information, monitoring is performed to trigger a fault tolerance mechanism, reallocate task resources, or transfer them to other healthy nodes, thereby achieving unified scheduling and fault tolerance management for tasks in different programming languages.

Benefits of technology

It enables unified scheduling of tasks in different programming languages, improves system stability and resource utilization, and ensures task continuity and execution efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118963974A_ABST
    Figure CN118963974A_ABST
Patent Text Reader

Abstract

The invention provides a multi-dimensional distributed task scheduling method, device and equipment and a storage medium, and the method comprises the steps: receiving a plurality of programming language tasks submitted by a user, and obtaining related configuration information based on the plurality of programming language tasks; the configuration information comprises execution logic, resource requirements, dependency relationships, log levels and priority information of the tasks; analyzing the resource demand of each task based on the task configuration information, and classifying the tasks according to priorities and dependency relationships to generate a preliminary task scheduling scheme; distributing the tasks to corresponding execution engine cluster nodes according to the preliminary task scheduling scheme, monitoring resource use information of the execution engine nodes at the same time, and monitoring execution information of the tasks; and when it is judged and monitored that task execution is abnormal according to the resource use information and the execution information, a fault-tolerant mechanism is triggered, task resources are redistributed or the tasks are transferred to other healthy nodes, and the problem that unified scheduling cannot be carried out when different programming language tasks are faced is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of task scheduling technology, and in particular to a method, device, equipment and storage medium for multi-dimensional distributed task scheduling. Background Art

[0002] With the rapid development of Internet and Internet of Things technologies, the amount of data has shown an exponential growth, especially in the fields of big data, artificial intelligence and machine learning. Traditional task scheduling systems are difficult to cope with large-scale data processing, real-time computing, and complex machine learning model training tasks. Existing distributed task scheduling systems are often plagued by programming language limitations, insufficient fault tolerance, and single monitoring methods when dealing with complex scenarios such as real-time collection, cleaning, real-time computing tasks of big data, and large-scale machine learning model training. For example, tasks in different programming languages ​​(such as Flink, Spark, TensorFlow, Python, etc.) cannot be uniformly scheduled, the fault tolerance mechanism cannot cope with the failure of tasks in different programming languages, and the monitoring system cannot provide real-time feedback on task status and resource usage.

[0003] In view of this, this application is filed. Summary of the invention

[0004] The present invention discloses a method, device, equipment and storage medium for multi-dimensional distributed task scheduling, aiming to solve the problem that tasks in different programming languages ​​cannot be uniformly scheduled.

[0005] A first embodiment of the present invention provides a method for multi-dimensional distributed task scheduling, including: Receiving multiple programming language tasks submitted by a user, and acquiring relevant configuration information based on the multiple programming language tasks, wherein the configuration information includes execution logic, resource requirements, dependencies, log levels, and priority information of the tasks; Analyzing resource requirements of each task based on the task configuration information, and classifying the tasks according to priority and dependency, and generating a preliminary task scheduling plan; Allocating tasks to corresponding execution engine cluster nodes according to the preliminary task scheduling scheme, while monitoring resource usage information of the execution engine nodes and listening to execution information of the tasks; When abnormal task execution is detected based on the resource usage information and execution information, a fault tolerance mechanism is triggered to reallocate task resources or transfer the task to other healthy nodes.

[0006] Preferably, the preliminary task scheduling scheme can uniformly schedule tasks in multiple programming languages, wherein the programming languages ​​include Flink, Spark, TensorFlow, Python and Shell, and the task types include real-time tasks, offline tasks, and script tasks.

[0007] Preferably, the preliminary task scheduling scheme is configured to be optimized based on real-time load information of the execution engine cluster nodes, wherein the load information includes CPU usage, memory usage, disk I / O, network traffic and task queue length.

[0008] Preferably, when task execution abnormality is detected based on the resource usage information and execution information, a fault tolerance mechanism is triggered to reallocate task resources or transfer the task to other healthy nodes, specifically: When a node in the engine cluster is detected to have a fault, the node is removed from the engine cluster, the tasks of the faulty node are automatically transferred to other healthy nodes, and when a node is detected to have a high resource load, new tasks are prevented from being assigned to the node; and, When a real-time computing task or scheduled offline task fails to run, the task is retried or its intermediate state data is saved based on the preset number of retries and the failed retry interval. When it is restored, the calculation is restored based on the calculation position of the intermediate state data.

[0009] Preferably, the execution logic is a function or class of task execution logic; The resource requirements include the amount of CPU and memory resources required for task execution, whether the task can be executed concurrently, and the number of concurrent executions; The log level is the log record level during task execution.

[0010] Preferably, the resource usage information of the monitoring execution engine node and the execution information of the monitoring task are specifically: Flink SQL is used to read multi-dimensional monitoring information data in Kafka in real time, and the multi-dimensional monitoring information data is cleaned in real time and stored in the Elasticsearch database. The Elasticsearch database is queried once every preset period of time to achieve engine node status monitoring, engine cluster resource monitoring, task queue monitoring, task status monitoring, task blocking monitoring, data delay monitoring, and real-time task and offline task dependency monitoring.

[0011] A second embodiment of the present invention provides a multi-dimensional distributed task scheduling device, including: A task receiving unit, used to receive multiple programming language tasks submitted by users, and obtain relevant configuration information based on the multiple programming language tasks, wherein the configuration information includes the execution logic, resource requirements, dependencies, log levels, and priority information of the tasks; A scheduling scheme generating unit, configured to analyze the resource requirements of each task based on the task configuration information, and to classify the tasks according to their priorities and dependencies, and to generate a preliminary task scheduling scheme; A task allocation unit, configured to allocate tasks to corresponding execution engine cluster nodes according to the preliminary task scheduling scheme, monitor resource usage information of the execution engine nodes, and monitor execution information of the tasks; The fault-tolerant unit is used to trigger a fault-tolerant mechanism, reallocate task resources or transfer tasks to other healthy nodes when abnormal task execution is detected based on the resource usage information and execution information.

[0012] A third embodiment of the present invention provides a device for multi-dimensional distributed task scheduling, including a memory and a processor, wherein a computer program is stored in the memory, and the computer program can be executed by the processor to implement a method for multi-dimensional distributed task scheduling as described in any one of the above items.

[0013] The fourth embodiment of the present invention provides a computer-readable storage medium, characterized in that a computer program is stored therein, and the computer program can be executed by a processor of a device where the computer-readable storage medium is located to implement a method for multi-dimensional distributed task scheduling as described in any one of the above items.

[0014] A method, apparatus, device and storage medium for multi-dimensional distributed task scheduling provided by the present invention receives multiple programming language tasks submitted by users, and obtains relevant configuration information based on the multiple programming language tasks, wherein the configuration information includes the execution logic, resource requirements, dependencies, log levels, and priority information of the tasks; then, the resource requirements of each task are analyzed based on the task configuration information, and the tasks are classified according to priority and dependency to generate a preliminary task scheduling plan; then, according to the preliminary task scheduling plan, the tasks are assigned to corresponding execution engine cluster nodes, and the resource usage information of the execution engine nodes is monitored, and the execution information of the tasks is listened to; finally, when the task execution is abnormally monitored according to the resource usage information and the execution information, the fault tolerance mechanism is triggered to reallocate the task resources or transfer the task to other healthy nodes, thereby solving the problem of being unable to uniformly schedule tasks in different programming languages. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1It is a flowchart of a method for multi-dimensional distributed task scheduling provided by the first embodiment of the present invention; Figure 2 It is a module diagram of a multi-dimensional distributed task scheduling device provided by the second embodiment of the present invention. DETAILED DESCRIPTION

[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0017] In order to better understand the technical solution of the present invention, the embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0018] It should be clear that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0020] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0021] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0022] The "first\second" mentioned in the embodiments is only to distinguish similar objects, and does not represent a specific order for the objects. It is understandable that the "first\second" can be interchanged with the specific order or sequence where permitted. It should be understood that the objects distinguished by "first\second" can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than those illustrated or described herein.

[0023] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0024] The present invention discloses a method, device, equipment and storage medium for multi-dimensional distributed task scheduling, aiming to solve the problem that tasks in different programming languages ​​cannot be uniformly scheduled.

[0025] See also Figure 1 The first embodiment of the present invention provides a method for multi-dimensional distributed task scheduling, which can be executed by a multi-dimensional distributed task scheduling device (hereinafter referred to as a scheduling device), and in particular, executed by one or more processors in the scheduling device to implement at least the following steps: S101, receiving multiple programming language tasks submitted by a user, and acquiring relevant configuration information based on the multiple programming language tasks, wherein the configuration information includes the execution logic, resource requirements, dependencies, log levels, and priority information of the tasks; In this embodiment, the scheduling device can be a terminal with data processing capabilities such as a server, workstation, desktop computer, etc., which can manage and monitor the multi-dimensional execution engine cluster nodes, and can issue alarms through DingTalk, Feishu, email, phone, and text messages. The auxiliary device can be installed with the corresponding operating system and application software, and the functions required by this embodiment can be implemented through the combination of the operating system and application software.

[0026] It should be noted that, in this embodiment, the scheduling device receives tasks in multiple programming languages ​​submitted by users. These tasks may include codes written in different programming languages, such as Flink, Spark, TensorFlow, Python, and Shell. When a user submits a task, the scheduling device will automatically parse the source code of the task and extract relevant configuration information from it. Among them, the configuration information may include the execution logic of the task, which describes the specific operations and processes that the task needs to perform; resource requirements, which indicate the CPU and memory required for task execution and whether concurrent execution is supported; dependencies, which list the interdependencies between tasks to ensure that tasks are executed in the correct order; log level, which sets the level of detail of logging during task execution for subsequent debugging and analysis; priority information, which defines the execution priority of tasks, so that the scheduling system can reasonably allocate the execution order when resources are limited.

[0027] S102, analyzing the resource requirements of each task based on the task configuration information, and classifying the tasks according to priority and dependency, and generating a preliminary task scheduling plan; In this embodiment, the scheduling device performs a detailed analysis of the resource requirements of each task based on the task configuration information submitted by the user. By parsing the execution logic, resource requirements, dependencies and priority information of the task, the scheduling device can determine the specific computing resources required for each task, including CPU, memory and storage. Specifically, the analysis process of the scheduling device can evaluate the complexity and required resources of each task based on an intelligent algorithm model. The algorithm model can comprehensively consider multiple factors such as the code structure, execution logic, and scale of data input and output of the task, and accurately evaluate the resource requirements during task execution. For example, for big data processing tasks, the scheduling device will not only analyze the amount of data involved in the task, but also evaluate the concurrency required during the task processing process to determine the specific requirements of CPU, memory and storage. In addition, the scheduling device will also combine historical execution data, that is, by reviewing the historical records of similar tasks, to understand the actual resource consumption of these tasks during previous executions, thereby further optimizing the accuracy of resource prediction.

[0028] After completing the resource demand analysis, the scheduling device will classify each task according to its priority and dependency. Tasks with high priority will be marked as being executed first, and the dependency will ensure that the predecessor task is completed before the successor task. Finally, the scheduling device generates a preliminary task scheduling plan based on the analysis results.

[0029] S103, assigning tasks to corresponding execution engine cluster nodes according to the preliminary task scheduling scheme, while monitoring resource usage information of the execution engine nodes and listening to execution information of the tasks; Specifically, in this embodiment, the monitoring process can be: reading the multi-dimensional monitoring information data in Kafka in real time through Flink SQL, and storing the multi-dimensional monitoring information data in the Elasticsearch database after real-time cleaning, querying the Elasticsearch database once every preset time to achieve engine node status monitoring, engine cluster resource monitoring, task queue monitoring, task status monitoring, task blocking monitoring, data delay monitoring, and real-time task and offline task dependency monitoring; In this embodiment, the data collection process may include: (1) collecting resource usage of the execution engine cluster, including multi-dimensional data such as CPU usage, memory usage, disk I / O, and disk capacity, and reporting it to Kafka in real time; (2) reporting the heartbeat data of the execution engine cluster nodes to Kafka in real time; (3) reporting the number of task queues of the execution engine cluster to Kafka in real time, including information about tasks waiting to be executed, tasks being submitted, tasks being executed, and tasks that failed to be submitted; (4) reporting the running status of real-time streaming tasks, offline scheduled tasks, and script tasks to Kafka in real time; (5) reporting the data input and output rate of each computing node of each task in real-time streaming tasks, offline scheduled tasks, and script tasks to Kafka; (6) reporting the processing performance data and blocking value data of each computing node of each task in real-time streaming tasks, offline scheduled tasks, and script tasks to Kafka; (7) reporting the resource usage of real-time streaming tasks, offline scheduled tasks, and script tasks during their running to Kafka, including multi-dimensional information such as CPU, memory, concurrency, disk IO, and task execution time; Among them, the execution engine node status monitoring includes: by registering the execution engine cluster and node, querying the Elasticsearch database data every n seconds; when it is found that the execution engine node has not reported the heartbeat for m consecutive times, the multi-dimensional distributed scheduling system removes it from the execution engine cluster and stops submitting new tasks to the node; Execution engine cluster resource monitoring includes: querying Elasticsearch database data through registered execution engine cluster node conditions; monitoring the CPU, disk, and memory information of the execution engine cluster, and issuing an alarm when the utilization rate exceeds 85%; when the resource utilization rate exceeds 90%, stop allocating new tasks to the cluster; based on the monitoring results, issue early warnings to optimize or expand the execution engine nodes; Task queue monitoring includes: real-time query of Elasticsearch database data through task queue name conditions; monitoring the number of tasks waiting to be executed and task submission failures; and alarming when the number of tasks waiting to be executed exceeds the configured threshold or task submission fails. Task status monitoring includes: querying Elasticsearch database data to display the task application list, including running status, completion time, and number of failures; monitoring the task status at the configured monitoring time interval (default 2 minutes); issuing an alarm when a task failure is found, and retrying the task according to the configured number of retries and retry interval; Task blocking monitoring includes: querying Elasticsearch database data by task name and the last 30 seconds; issuing an alarm when the task blocking degree exceeds the configured threshold (65%); deciding whether to restart the task based on the configuration, or taking measures such as optimizing task processing logic and adjusting resources; Data delay monitoring includes: configuring data delay alarms for tasks with high real-time data requirements; scheduling devices to push automatically generated flow data to tasks at a default interval of 1 second; monitoring the end-to-end delay of data during task flow, and generating an alarm when it exceeds the configured threshold (default 1 second); Task resource usage monitoring and dynamic adjustment include: monitoring the CPU, memory, and concurrent resource usage during task operation; calculating CPU usage and memory usage, and counting the average usage over the past 5 minutes; dynamically adjusting task resources based on whether to adjust during off-peak periods / adjust rules for any time period; dynamically adjusting memory and concurrency resources and issuing alarms when resource usage exceeds the configured threshold; dynamically increasing or decreasing resource allocation based on task resource usage to ensure task stability, execution efficiency, and data timeliness, while avoiding resource waste; Dependency monitoring of real-time tasks and offline tasks includes: automatically generating an offline script when an offline task depends on real-time task data; monitoring whether the real-time task landing data is completed, and scheduling the offline task only after completion; and issuing an alarm when the real-time task is delayed or there is no data, resulting in the offline task not being executed.

[0030] S104, when it is determined that the task execution is abnormal according to the resource usage information and the execution information, a fault tolerance mechanism is triggered to reallocate task resources or transfer the task to other healthy nodes.

[0031] Specifically, in this embodiment, each execution engine node will regularly report heartbeat signals, and the system determines the availability of the cluster by receiving these heartbeat signals. If the system detects that the heartbeat signal of a node is abnormal or not reported in time, it will determine that the node may have a fault.

[0032] When an execution engine instance fails, the scheduling device will automatically remove the failed node from the cluster and transfer the tasks it is executing to other healthy nodes. The scheduling device will dynamically adjust the task allocation strategy according to the current node health status to ensure that tasks can continue to be executed on other nodes, thereby maintaining service continuity. At the same time, if the scheduling device monitors that the resource load of a node is high (for example, the CPU or memory usage is too high), the system will suspend the allocation of new tasks to the node to avoid further increasing the load on the node and ensure that tasks can run smoothly within the cluster.

[0033] For real-time computing tasks and scheduled offline tasks, the scheduling device is configured with a blocking restart mechanism. When a task is blocked due to insufficient resources or other reasons, the scheduling device will automatically reallocate resources and restart the task to ensure the timeliness of data processing. During the task restart process, the scheduling device will adjust resource allocation according to the priority and dependency of the task to ensure that critical tasks can be resumed first.

[0034] During the task execution process, if the scheduling device monitors that the task status has failed, the scheduling device will automatically retry according to the preset retry strategy. The retry strategy includes the number of retries and the retry interval. The administrator can configure these parameters according to the needs of different tasks. For scheduled offline tasks and real-time computing tasks, the scheduling device will reasonably set the number of retries to ensure that there is no waste of resources due to frequent retries. At the same time, the system supports the interval setting of failed retries. Especially for tasks with late data generation, extending the retry interval can effectively reduce the number of task failures and avoid unnecessary system pressure.

[0035] In addition, for scheduled offline tasks and real-time stream computing tasks, the scheduling device is configured with a mechanism to save intermediate state data. During task execution, the system will store the intermediate state data of the task in the HDFS file system so that it can be quickly restored when the task fails. When the task is restored, the system will resume the calculation based on the latest intermediate state data to ensure that the task can continue from the last interruption point to avoid data loss or calculation errors. For batch tasks and real-time stream computing tasks, the scheduling device will record their execution status and calculation location, and use this information to restore the task when it is restored, to ensure data accuracy and task continuity.

[0036] In a possible implementation of the present invention, the preliminary task scheduling scheme can uniformly schedule tasks in multiple programming languages, where the programming languages ​​include Flink, Spark, TensorFlow, Python and Shell, and the task types include real-time tasks, offline tasks, and script tasks.

[0037] The scheduling device parses and manages tasks in each language through a standardized interface. No matter which programming language the task is written in, it can be converted into a schedulable task unit to ensure unified management and execution during task scheduling; Specifically, the scheduling device can first identify and classify tasks in different programming languages ​​according to their characteristics. For real-time tasks, such as Flink or Spark tasks, the scheduling device will monitor the processing status of the data stream in real time to ensure that these tasks can be quickly scheduled and executed at the moment the data arrives. For offline tasks, especially TensorFlow or Spark tasks involving batch data processing, the scheduling device will schedule them during off-peak hours to ensure that the impact of tasks on system resources is minimized while meeting data processing needs. For script tasks such as Python and Shell, the scheduling device will include them in the scheduling queue based on the complexity of the task and the execution time window to ensure that these lightweight tasks can be executed in a timely manner without affecting the overall performance of the system.

[0038] Based on the scheduling mechanism, regardless of the programming language and type of the task, the scheduling device can effectively coordinate the execution order and resource allocation of various tasks. It solves the scheduling problems caused by the diversity of programming languages ​​in the past, allowing real-time tasks, offline tasks and script tasks to run efficiently and collaboratively under the same framework, improving the stability and resource utilization of the entire distributed system.

[0039] In one possible implementation of the present invention, the preliminary task scheduling scheme is configured to be optimized based on real-time load information of the execution engine cluster nodes, wherein the load information includes CPU utilization, memory utilization, disk I / O, network traffic, and task queue length.

[0040] It should be noted that when a task is submitted, the scheduling device will first allocate resources according to the current load of each node. For example, if the CPU or memory usage of a node is low, the system will prioritize allocating tasks to that node to make full use of its idle resources. At the same time, the system will continue to track the length of the node's task queue to avoid task backlogs. If it is found that the length of a node's task queue is long or a task execution time is too long, the system will determine that the node may be overloaded, and then adjust the strategy to allocate new tasks to other nodes with lighter loads.

[0041] In addition to real-time monitoring, the system also uses load information for predictive scheduling. For example, by analyzing historical load data, the system can predict in advance the high load that certain nodes may face in the future, so as to make task scheduling adjustments in advance to prevent performance bottlenecks in the system during peak periods. The system also monitors disk I / O and network traffic intelligently. If a node has frequent disk read and write operations, or the network bandwidth is close to saturation, the system will reduce the number of tasks assigned to the node to prevent task execution from being affected by resource bottlenecks.

[0042] See also Figure 2The second embodiment of the present invention provides a multi-dimensional distributed task scheduling device, including: The task receiving unit 201 is used to receive multiple programming language tasks submitted by users, and obtain relevant configuration information based on the multiple programming language tasks, wherein the configuration information includes the execution logic, resource requirements, dependencies, log levels, and priority information of the tasks; A scheduling scheme generating unit 202 is used to analyze the resource requirements of each task based on the task configuration information, and classify the tasks according to the priority and dependency relationship to generate a preliminary task scheduling scheme; The task allocation unit 203 is used to allocate tasks to corresponding execution engine cluster nodes according to the preliminary task scheduling scheme, monitor resource usage information of the execution engine nodes, and listen to execution information of tasks; The fault-tolerant unit 204 is used to trigger a fault-tolerant mechanism to reallocate task resources or transfer tasks to other healthy nodes when abnormal task execution is detected based on the resource usage information and execution information.

[0043] A third embodiment of the present invention provides a device for multi-dimensional distributed task scheduling, including a memory and a processor, wherein a computer program is stored in the memory, and the computer program can be executed by the processor to implement a method for multi-dimensional distributed task scheduling as described in any one of the above items.

[0044] The fourth embodiment of the present invention provides a computer-readable storage medium, characterized in that a computer program is stored therein, and the computer program can be executed by a processor of a device where the computer-readable storage medium is located to implement a method for multi-dimensional distributed task scheduling as described in any one of the above items.

[0045] Exemplarily, the computer program described in the third and fourth embodiments of the present invention may be divided into one or more modules, and the one or more modules are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the device for implementing a multi-dimensional distributed task scheduling. For example, the device described in the second embodiment of the present invention.

[0046] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the method for multi-dimensional distributed task scheduling, and uses various interfaces and lines to connect the various parts of the method for implementing multi-dimensional distributed task scheduling.

[0047] The memory can be used to store the computer program and / or module, and the processor realizes various functions of a multi-dimensional distributed task scheduling method by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, a text conversion function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, text message data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0048] Wherein, if the implemented module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0049] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0050] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for multi-dimensional distributed task scheduling, characterized in that: include: Receiving multiple programming language tasks submitted by a user, and acquiring relevant configuration information based on the multiple programming language tasks, wherein the configuration information includes execution logic, resource requirements, dependencies, log levels, and priority information of the tasks; Analyzing resource requirements of each task based on the task configuration information, and classifying the tasks according to priority and dependency, and generating a preliminary task scheduling plan; Allocating tasks to corresponding execution engine cluster nodes according to the preliminary task scheduling scheme, while monitoring resource usage information of the execution engine nodes and listening to execution information of the tasks; When abnormal task execution is detected based on the resource usage information and execution information, a fault tolerance mechanism is triggered to reallocate task resources or transfer the task to other healthy nodes.

2. A method for multi-dimensional distributed task scheduling according to claim 1, characterized in that: The preliminary task scheduling scheme can uniformly schedule tasks in multiple programming languages, where the programming languages ​​include Flink, Spark, TensorFlow, Python and Shell, and the task types include real-time tasks, offline tasks, and script tasks.

3. The method for multi-dimensional distributed task scheduling according to claim 1, characterized in that: The preliminary task scheduling scheme is configured to be optimized based on real-time load information of the execution engine cluster nodes, wherein the load information includes CPU usage, memory usage, disk I / O, network traffic, and task queue length.

4. The method for multi-dimensional distributed task scheduling according to claim 1, characterized in that: When the task execution is abnormal according to the resource usage information and execution information, the fault tolerance mechanism is triggered to reallocate the task resources or transfer the task to other healthy nodes, specifically: When a node in the engine cluster is detected to have a fault, the node is removed from the engine cluster, and the tasks of the faulty node are automatically transferred to other healthy nodes. When a node is detected to have a high resource load, new tasks are prevented from being assigned to the node. as well as, When a real-time computing task or scheduled offline task fails to run, the task is retried or its intermediate state data is saved based on the preset number of retries and the failed retry interval. When it is restored, the calculation is restored based on the calculation position of the intermediate state data.

5. The method for multi-dimensional distributed task scheduling according to claim 1, characterized in that: The execution logic is a function or class of task execution logic; The resource requirements include the amount of CPU and memory resources required for task execution, whether the task can be executed concurrently, and the number of concurrent executions; The log level is the log record level during task execution.

6. The method for multi-dimensional distributed task scheduling according to claim 1, characterized in that: The monitoring execution engine node resource usage information and the monitoring task execution information are specifically: Use Flink SQL to read the multi-dimensional monitoring information data in Kafka in real time, clean the multi-dimensional monitoring information data in real time, and store it in the Elasticsearch database. The Elasticsearch database is queried at preset intervals to monitor engine node status, engine cluster resources, task queues, task status, task blocking, data delay, and real-time and offline task dependencies.

7. A multi-dimensional distributed task scheduling device, characterized in that: include: A task receiving unit, used to receive multiple programming language tasks submitted by users, and obtain relevant configuration information based on the multiple programming language tasks, wherein the configuration information includes the execution logic, resource requirements, dependencies, log levels, and priority information of the tasks; A scheduling scheme generating unit, configured to analyze the resource requirements of each task based on the task configuration information, and to classify the tasks according to their priorities and dependencies, and to generate a preliminary task scheduling scheme; A task allocation unit, configured to allocate tasks to corresponding execution engine cluster nodes according to the preliminary task scheduling scheme, monitor resource usage information of the execution engine nodes, and monitor execution information of the tasks; The fault-tolerant unit is used to trigger a fault-tolerant mechanism, reallocate task resources or transfer tasks to other healthy nodes when abnormal task execution is detected based on the resource usage information and execution information.

8. A multi-dimensional distributed task scheduling device, characterized in that: It includes a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement a multi-dimensional distributed task scheduling method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: A computer program is stored, and the computer program can be executed by a processor of the device where the computer-readable storage medium is located to implement a method for multi-dimensional distributed task scheduling as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Cross-language task scheduling method and device, equipment and readable storage medium

    CN112199184A

  • Task scheduling implementation method supporting multiple processes and multiple threads

    CN117290103A

  • Dynamic queue scheduling method and system

    CN118331708A

  • Task scheduling method and apparatus, device, storage medium, computer program product, and computer program

    WO2023024410A1

Cited By

  • Task scheduling method and device, electronic equipment, storage medium and product

    CN119201410A

  • Shell script task scheduling method and system in network-free state

    CN119576504A

  • Task execution method, computer equipment, storage medium and program product

    CN119718683A

  • Task scheduling and executing method and system

    CN120723385A

  • Multi-modal data processing method and device, equipment and medium

    CN121255403A