A computing cluster task scheduling and load balancing method based on decision tree within time window

By using the decision tree method within the time window in the computing cluster, combined with Telegraf and CART regression trees, the efficiency of task scheduling and load balancing is achieved, the problem of low resource utilization and task completion efficiency in the computing cluster is solved, and the cluster status is adjusted in real time to optimize resource allocation.

CN118245227BActive Publication Date: 2024-08-30CHINA DATACOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410627799.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2024-08-30
Estimated Expiration
2044-05-21

AI Technical Summary

Technical Problem

In computing clusters, how to effectively perform task scheduling and load balancing to ensure full utilization of resources and rapid completion of tasks is an urgent problem that needs to be solved.

Method used

A computing cluster task scheduling and load balancing method based on a decision tree within a time window is adopted. The status of working nodes is collected through Telegraf and stored in the Redis database. Top-n machines with idleness within the time window are generated. CART regression trees are used to predict resource load conditions. , and perform sorting and polling selection to ensure that tasks are assigned to appropriate nodes.

Benefits of technology

It achieves efficient cluster load balancing and task scheduling, real-time adjustment of cluster status through time window mechanism, avoids error accumulation and excessive polling in machine learning algorithms, and takes into account actual business status and resource consumption assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118245227B
    Figure CN118245227B
Patent Text Reader

Abstract

The present application provides a method for task scheduling and load balancing of a computing cluster based on a decision tree within a time window, which belongs to the field of artificial intelligence technology. The method includes: determining the target time interval of the target collection moment in the computing cluster, and based on the time interval, collecting the status of the working node and storing it in the Redis database; generating multiple time windows based on multiple target time intervals, and each target time interval corresponds to a time window; determining the target machine, and the target machine is the machine with the top n idleness in the cache database taken out from the cluster control host; using the CART regression tree to predict the resource load of each target collection moment in the time window, and sorting according to the resource load; polling based on the target machine to select the target collection moment for calculation, and re-sorting based on the target machine result using Redis. The present application also provides a computing cluster task scheduling and load balancing device and related devices based on a decision tree within a time window.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a computing cluster task scheduling and load balancing method based on a decision tree within a time window. Background Art

[0002] With the rapid development of information technology, computing clusters have become an important tool for processing large-scale data and high-performance computing tasks. In computing clusters, task scheduling and load balancing are interrelated and mutually influential processes. The results of task scheduling will directly affect the effect of load balancing, and the implementation of load balancing will also have feedback on the task scheduling strategy. In task scheduling, there are many factors to consider, such as the type, size, dependency of tasks, as well as the performance and load of nodes. Reasonable task scheduling strategies can significantly improve the overall performance and efficiency of the cluster.

[0003] However, in a cluster environment, how to effectively schedule tasks and balance loads to ensure full utilization of resources and rapid completion of tasks has become an urgent problem to be solved. Summary of the invention

[0004] The embodiment of the present application provides a computing cluster task scheduling and load balancing method and related devices based on a decision tree within a time window to improve the above-mentioned problems.

[0005] In order to achieve the above objectives, this application adopts the following technical solutions:

[0006] In a first aspect, an embodiment of the present application proposes a computing cluster task scheduling and load balancing method based on a decision tree within a time window, the method comprising:

[0007] Determine the target time interval of the target collection time in the computing cluster, and based on the time interval, collect the status of the working nodes and store them in the Redis database;

[0008] Generate multiple time windows based on multiple target time intervals, each target interval corresponds to one time window;

[0009] Determine a target machine, where the target machine is a machine with top-n idleness in the cache database taken from the cluster control host;

[0010] Using the CART regression tree prediction task to predict the resource load of each target acquisition moment within the time window, and sorting according to the resource load;

[0011] Polling is performed based on the target machine to select and calculate the target collection time, and Redis is used to re-sort the results based on the target machine.

[0012] In conjunction with the first aspect, in some implementations, determining a target time interval of a target collection moment in a computing cluster, and collecting and storing the status of a working node in a Redis database based on the time interval includes:

[0013] The cluster log status is collected through the Telegraf component, wherein the collected log status is a semi-structured text;

[0014] Regular expressions are used to extract the semi-structured text.

[0015] In combination with the first aspect, in some embodiments, the method further includes:

[0016] The characters in the computing cluster are quantified, and the indicators of the quantification processing are computing complexity and storage complexity.

[0017] In combination with the first aspect, in some implementations, using a CART regression tree to predict the resource load of each target acquisition moment within the time window, and sorting according to the resource load, includes:

[0018] Traverse j and use the heuristic method to select the jth variable and its value s as the segmentation variable and segmentation point, define the region, and satisfy:

[0019] ;

[0020] To find the optimal j-th segmentation variable and segmentation point s, we need to solve the problem and satisfy the following conditions:

[0021] ;

[0022] .

[0023] In combination with the first aspect, in some implementations, using a CART regression tree to predict the resource load of each target acquisition moment within the time window, and sorting according to the resource load, includes:

[0024] Set k=0, T= , ;

[0025] Calculate the internal nodes t from bottom to top , and satisfy:

[0026]

[0027]

[0028]

[0029] in, is any subtree of T, and g(t),α, Express the number of words with t as the root node, is the prediction error on the training data, Indicates the actual value, Expression subtree The predicted output of

[0030] right The internal node t is pruned, and when t is a leaf node, its class is determined by majority voting to obtain a tree T;

[0031] Let k=k+1, , ,like A tree that is not composed of a root node and two leaf nodes will Candidate set ;

[0032] The cross-validation method is used to select the candidate set of subtrees. Select the best subtree .

[0033] In combination with the first aspect, in some implementations, using a CART regression tree to predict the resource load of each target acquisition moment within the time window, and sorting according to the resource load, includes:

[0034] The comprehensive idleness The target machines with higher priority are prioritized, and the dynamic indicator data X of the kth target machine in Redis is mathematically symbolized as , the static indicator data Y is symbolized as ( ), and satisfy:

[0035] ;

[0036] in, is the idleness of the target machine k.

[0037] In a second aspect, an embodiment of the present application proposes a computing cluster task scheduling and load balancing computing device, which is configured as follows:

[0038] Determine the target time interval of the target collection time in the computing cluster, and based on the time interval, collect the status of the working nodes and store them in the Redis database;

[0039] Generate multiple time windows based on multiple target time intervals, each target interval corresponds to one time window;

[0040] Determine a target machine, where the target machine is a machine with top-n idleness in the cache database taken from the cluster control host;

[0041] Using the CART regression tree prediction task to predict the resource load of each target acquisition moment within the time window, and sorting according to the resource load;

[0042] Polling is performed based on the target machine to select and calculate the target collection time, and Redis is used to re-sort the results based on the target machine.

[0043] In conjunction with the second aspect, in some embodiments, the apparatus is configured to:

[0044] Determine the target time interval of the target collection time in the computing cluster, and based on the time interval, collect the status of the working nodes and store them in the Redis database, including:

[0045] The cluster log status is collected through the Telegraf component, wherein the collected log status is a semi-structured text;

[0046] Regular expressions are used to extract the semi-structured text.

[0047] In conjunction with the second aspect, in some embodiments, the apparatus is configured to:

[0048] The characters in the computing cluster are quantified, and the indicators of the quantification processing are computing complexity and storage complexity.

[0049] In conjunction with the second aspect, in some embodiments, the apparatus is configured to:

[0050] Using the CART regression tree prediction task to predict the resource load of each target acquisition moment within the time window, and sorting according to the resource load, including:

[0051] Traverse j and use the heuristic method to select the jth variable and its value s as the segmentation variable and segmentation point, define the region, and satisfy:

[0052] ;

[0053] To find the optimal j-th segmentation variable and segmentation point s, we need to solve the problem and satisfy the following conditions:

[0054] ;

[0055] .

[0056] In conjunction with the second aspect, in some embodiments, the apparatus is configured to:

[0057] Using the CART regression tree prediction task to predict the resource load of each target acquisition moment within the time window, and sorting according to the resource load, including:

[0058] Set k=0, T= , ;

[0059] Calculate the internal nodes t from bottom to top , and satisfy:

[0060]

[0061]

[0062]

[0063] in, is any subtree of T, and g(t),α, Express the number of words with t as the root node, is the prediction error on the training data, Indicates the actual value, Expression subtree The predicted output of

[0064] right The internal node t is pruned, and when t is a leaf node, its class is determined by majority voting to obtain a tree T;

[0065] Let k=k+1, , ,like A tree that is not composed of a root node and two leaf nodes will Candidate set ;

[0066] The cross-validation method is used to select the candidate set of subtrees. Select the best subtree .

[0067] In conjunction with the second aspect, in some embodiments, the apparatus is configured to:

[0068] Using the CART regression tree prediction task to predict the resource load of each target acquisition moment within the time window, and sorting according to the resource load, including:

[0069] The comprehensive idleness The target machines with higher priority are prioritized, and the dynamic indicator data X of the kth target machine in Redis is mathematically symbolized as , the static indicator data Y is symbolized as ( ), and satisfy:

[0070] ;

[0071] in, is the idleness of the target machine k.

[0072] A third aspect of an embodiment of the present invention provides an electronic device, the electronic device comprising:

[0073] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method proposed in the first aspect of the embodiment of the present invention.

[0074] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method provided in the first aspect of the embodiment of the present invention.

[0075] In summary, the above method and device have the following technical effects:

[0076] The present application proposes a method for scheduling and load balancing computing cluster tasks based on decision trees in a time window. The method mainly uses Telegraf (log collection tool) to collect the status of working nodes in a specified time interval and store them in a Redis database. The time in the specified time interval becomes a time window. The top-n idle machines in the cache database (Redis) are taken out from the cluster control host. The CART regression tree prediction task is used to evaluate the resource load of the nodes in the window. After sorting, the top-n are selected for polling to select computing working nodes, and the top-n candidate results are returned and re-sorted in Redis, so that the tasks are assigned to the appropriate nodes to ensure the load balancing of the cluster and the efficiency of task scheduling. Compared with the computing cluster scheduling algorithm and load balancing algorithm using machine learning or deep learning, this product also has a laboratory state, but we have taken into account the actual business state and the problem of evaluating the resource consumption of computer tasks in reality. Through the model evaluation prediction in the time window, the machine state in the cache database is updated through the timed state collection of the machines in the cluster, and the cluster errors caused by model adjustment are adjusted in real time through the time window mechanism. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] Figure 1 A flowchart of a computing cluster task scheduling and load balancing method based on a decision tree within a time window proposed in an embodiment of the present application.

[0078] Figure 2 A schematic diagram of the algorithm flow involved in a computing cluster task scheduling and load balancing method based on a decision tree within a time window proposed in an embodiment of the present application.

[0079] Figure 3 A schematic diagram of the execution steps of a computing cluster task scheduling and load balancing computing system proposed in an embodiment of the present application.

[0080] Figure 4 A schematic diagram of the structure of a computing cluster task scheduling and load balancing computing system proposed in an embodiment of the present application. DETAILED DESCRIPTION

[0081] 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 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.

[0082] Embodiment 1

[0083] This application proposes a computing cluster task scheduling and load balancing method based on a decision tree within a time window. Figure 1 , including the following steps:

[0084] S101: Determine a target time interval for a target collection moment in a computing cluster, and based on the time interval, collect the status of the working nodes and store them in a Redis database.

[0085] Specifically, as an implementation method, first, the cluster log status can be collected through the Telegraf component, wherein the collected log status is a semi-structured text, and then the semi-structured text is extracted using a regular expression. Prior to this, the characters in the computing cluster can also be quantified, and the indicators of the quantification processing are computational complexity and storage complexity. Parameters are obtained through measurement and other means to provide benchmark data for decision tree model training and prediction.

[0086] S102: Generate multiple time windows based on the multiple target time intervals, each target interval corresponds to one time window.

[0087] S103: Determine a target machine, where the target machine is a machine with the top n idleness in the cache database taken out from the cluster control host.

[0088] S104: Use the CART regression tree prediction task to predict the resource load situation of each target acquisition moment within the time window, and sort according to the resource load situation.

[0089] Specifically, the least squares regression tree generation (input: training data set D, output: regression tree, in the input space where the training data set is located, each area is recursively divided into 2 sub-areas, and the output value on each sub-area is determined to construct a binary decision tree:

[0090] As an implementation method, please also refer to Figure 2 First, traverse j and use the heuristic method to select the jth variable and its value s as the segmentation variable and segmentation point, define the region, and satisfy:

[0091] ; (1)

[0092] To find the optimal j-th segmentation variable and segmentation point s, we need to solve the problem and satisfy the following conditions:

[0093] ; (2)

[0094] . (2)

[0095] Continue to call steps (1) and (2) for the two sub-regions. Represents the size of the data set until the stopping condition is met: 1. The preset tree depth d is reached, 2. Or the number of samples in the node is less than the preset threshold.

[0096] At this point, the CART regression decision tree based on the least squares method has been generated, but the current decision tree may be overfitting, so a pruning strategy is introduced to simplify the decision tree by pruning the subtrees or leaf nodes in the generated decision tree and generating new leaf nodes based on the root node and parent node. (Input: Decision tree constructed by the CART algorithm, Output: Optimal decision tree ).

[0097] It can be understood that the decision tree model can calculate the matching degree and sort through different configurations of machines and different requirements of tasks, which is a global optimal strategy.

[0098] S105: Perform polling based on the target machine to select and calculate the target collection time, and re-sort based on the target machine result using Redis.

[0099] Set k=0, T= , ;

[0100] Calculate the internal nodes t from bottom to top , and satisfy:

[0101]

[0102]

[0103]

[0104] in, is any subtree of T, and g(t),α, Express the number of words with t as the root node, is the prediction error on the training data, Indicates the actual value, Expression subtree The predicted output of

[0105] right The internal node t is pruned, and when t is a leaf node, its class is determined by majority voting to obtain a tree T;

[0106] Let k=k+1, , ,like A tree that is not composed of a root node and two leaf nodes will Candidate set ;

[0107] The cross-validation method is used to select the candidate set of subtrees. Select the best subtree .

[0108] Through task quantization and the CART regression decision tree model built and trained in 2, the machine execution task can be predicted based on the selected parameters. Next, the computing tasks will be allocated and loaded onto the working nodes according to the prediction results.

[0109] Redis is a temporary memory-based cache database with hot spot high read and write functions. Therefore, Redis is used to store the static parameters of each working node in the cluster and the dynamic parameters within the time window. Redis generates a unique md5 code for the machine as a key-value pair, and the data carried by the machine is the value.

[0110] Specifically, sort the machines in Redis and calculate the comprehensive idleness. Higher priority machines are prioritized, idle The calculation will use the data in the following table to mathematically symbolize the dynamic indicator data X of the kth machine in Redis as , the static indicator data Y is symbolized as ( ), then, using the CART regression tree prediction task within the time window to predict the resource load of each target acquisition moment, and sorting according to the resource load, including:

[0111] The comprehensive idleness The target machines with higher priority are prioritized, and the dynamic indicator data X of the kth target machine in Redis is mathematically symbolized as , the static indicator data Y is symbolized as ( ), and satisfy:

[0112] ;

[0113] in, is the idleness of the target machine k.

[0114] The present application proposes a method for scheduling and load balancing computing cluster tasks based on decision trees in a time window. The method mainly uses Telegraf (log collection tool) to collect the status of working nodes in a specified time interval and store them in a Redis database. The time in the specified time interval becomes a time window. The top-n idle machines in the cache database (Redis) are taken out from the cluster control host. The CART regression tree prediction task is used to evaluate the resource load of the nodes in the window. After sorting, the top-n are selected for polling to select computing working nodes, and the top-n candidate results are returned and re-sorted in Redis, so that the tasks are assigned to the appropriate nodes to ensure the load balancing of the cluster and the efficiency of task scheduling. Compared with the computing cluster scheduling algorithm and load balancing algorithm using machine learning or deep learning, this product also has a laboratory state, but we have taken into account the actual business state and the problem of evaluating the resource consumption of computer tasks in reality. Through the model evaluation prediction in the time window, the machine state in the cache database is updated through the timed state collection of the machines in the cluster, and the cluster errors caused by model adjustment are adjusted in real time through the time window mechanism.

[0115] Embodiment 2

[0116] The present application embodiment proposes an execution step of a computing cluster task scheduling and load balancing computing system, see Figure 3 :

[0117] S110: Start the timer, Telegraf collects information from K machines in the cluster, synchronizes it to Redis, and calculates the machine idleness Sort.

[0118] S120: User submits task parameters Quantify the tasks.

[0119] S130: Select the top n idle machines in Redis.

[0120] S140: Predict the top n idle machines based on the constructed decision tree.

[0121] S150: Calculate and sort the idleness of the predicted data of the n candidate machines.

[0122] S160: Assign tasks to the sorted machines in order using a round-robin algorithm.

[0123] If at the time interval point, the following steps are also included:

[0124] S170: Telegraf collects information from K machines in the cluster, synchronizes it to Redis, and calculates the machine idleness Sort.

[0125] The execution steps of a computing cluster task scheduling and load balancing computing system proposed in the embodiment of the present application have the following technical effects:

[0126] 1. The decision tree algorithm is used to predict the matching degree of different nodes in the cluster for different tasks, achieving global optimal allocation.

[0127] 2. Collect machine information through Telegraf and update the actual situation of the machine in real time during the time window, avoiding error accumulation and excessive polling of the machine.

[0128] 3. Evaluate the tasks through the task quantification module to predict the possible IO, CPU, GPU and other resource usage of the tasks, and use these data to select the best load for the nodes in the cluster.

[0129] Based on the same inventive concept, the present application also proposes an embodiment of the present application that proposes a computing cluster task scheduling and load balancing computing device, which is configured as follows:

[0130] Determine the target time interval of the target collection time in the computing cluster, and based on the time interval, collect the status of the working nodes and store them in the Redis database;

[0131] Generate multiple time windows based on multiple target time intervals, each target interval corresponds to one time window;

[0132] Determine a target machine, where the target machine is a machine with top-n idleness in the cache database taken from the cluster control host;

[0133] Using the CART regression tree prediction task to predict the resource load of each target acquisition moment within the time window, and sorting according to the resource load;

[0134] Polling is performed based on the target machine to select and calculate the target collection time, and Redis is used to re-sort the results based on the target machine.

[0135] In some embodiments, the apparatus is configured to:

[0136] Determine the target time interval of the target collection time in the computing cluster, and based on the time interval, collect the status of the working nodes and store them in the Redis database, including:

[0137] The cluster log status is collected through the Telegraf component, wherein the collected log status is a semi-structured text;

[0138] Regular expressions are used to extract the semi-structured text.

[0139] In some embodiments, the apparatus is configured to:

[0140] The characters in the computing cluster are quantified, and the indicators of the quantification processing are computing complexity and storage complexity.

[0141] In some embodiments, the apparatus is configured to:

[0142] Using the CART regression tree prediction task to predict the resource load of each target acquisition moment within the time window, and sorting according to the resource load, including:

[0143] Traverse j and use the heuristic method to select the jth variable and its value s as the segmentation variable and segmentation point, define the region, and satisfy:

[0144] ;

[0145] To find the optimal j-th segmentation variable and segmentation point s, we need to solve the problem and satisfy the following conditions:

[0146] ;

[0147] .

[0148] In some embodiments, the apparatus is configured to:

[0149] Using the CART regression tree prediction task to predict the resource load of each target acquisition moment within the time window, and sorting according to the resource load, including:

[0150] Set k=0, T= , ;

[0151] Calculate the internal nodes t from bottom to top , and satisfy:

[0152]

[0153]

[0154]

[0155] in, is any subtree of T, and g(t),α, Express the number of words with t as the root node, is the prediction error on the training data, Indicates the actual value, Expression subtree The predicted output of

[0156] right The internal node t is pruned, and when t is a leaf node, its class is determined by majority voting to obtain a tree T;

[0157] Let k=k+1, , ,like A tree that is not composed of a root node and two leaf nodes will Candidate set ;

[0158] The cross-validation method is used to select the candidate set of subtrees. Select the best subtree .

[0159] In conjunction with the second aspect, in some embodiments, the apparatus is configured to:

[0160] Using the CART regression tree prediction task to predict the resource load of each target acquisition moment within the time window, and sorting according to the resource load, including:

[0161] The comprehensive idleness The target machines with higher priority are prioritized, and the dynamic indicator data X of the kth target machine in Redis is mathematically symbolized as , the static indicator data Y is symbolized as ( ), and satisfy:

[0162] ;

[0163] in, is the idleness of the target machine k.

[0164] The present application proposes a computing cluster task scheduling and load balancing computing device, which mainly uses Telegraf (log collection tool) to collect the status of the working node in the specified time interval and store it in the Redis database, and the time in the specified time interval becomes a time window. The top-n idle machines in the cache database (Redis) are taken out from the cluster control host, and the CART regression tree prediction task is used in the window to evaluate the resource load of the node, and the top-n are selected for polling and selecting the computing working node after sorting, and the top-n candidate results are returned and re-sorted in Redis, so that the tasks are assigned to the appropriate nodes to ensure the load balancing of the cluster and the efficiency of task scheduling. Compared with the computing cluster scheduling algorithm and load balancing algorithm using machine learning or deep learning, this product also has a laboratory state, but we have taken into account the actual business state and the problem of evaluating the resource consumption of computer tasks in reality, relying on model evaluation and prediction in the time window, and updating the machine state in the cache database through the timed state collection of the machines in the cluster, and adjusting the cluster errors caused by model adjustment in real time through the time window mechanism.

[0165] Embodiment 3

[0166] This application proposes a computing cluster task scheduling and load balancing computing system, please refer to Figure 4 The main structure of the system is deployed in the host node (MasterNode): cache database, user task quantification module, decision tree calculation module, idleness sorting calculation module. The main performance impact of the system is the user task quantification module and the decision tree calculation module. Under this patent, based on the multi-process capability of modern computers, multiple computing processes are started through the multi-process module to achieve computing parallelism, and a certain compression is achieved in performance. The key technology of this patent lies in the constructed decision tree model and task quantification model.

[0167] The present application proposes a computing cluster task scheduling and load balancing computing system, which mainly uses Telegraf (log collection tool) to collect the status of the working node in the specified time interval and store it in the Redis database, and the time in the specified time interval becomes a time window. The top-n idle machines in the cache database (Redis) are taken out from the cluster control host, and the CART regression tree prediction task is used in the window to evaluate the resource load of the node, and the top-n are selected for polling and selecting the computing working node after sorting, and the top-n candidate results are returned and re-sorted in Redis, so that the tasks are assigned to the appropriate nodes to ensure the load balancing of the cluster and the efficiency of task scheduling. Compared with the computing cluster scheduling algorithm and load balancing algorithm using machine learning or deep learning, this product also has a laboratory state, but we have taken into account the actual business state and the problem of evaluating the resource consumption of computer tasks in reality, relying on model evaluation and prediction in the time window, and updating the machine state in the cache database through the timed state collection of the machines in the cluster, and adjusting the cluster errors caused by model adjustment in real time through the time window mechanism.

[0168] Based on the same inventive concept, an embodiment of the present application further proposes an electronic device, the electronic device comprising:

[0169] At least one processor; and a memory in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the computing cluster task scheduling and load balancing computing method of the embodiment of the present application.

[0170] The electronic device proposed in this application mainly uses Telegraf (log collection tool) to collect the status of the working node in a specified time interval and store it in the Redis database, and the time in the specified time interval becomes a time window. The top-n idle machines in the cache database (Redis) are taken out from the cluster control host, and the CART regression tree prediction task is used in the window to evaluate the resource load of the node, and the top-n are selected for polling and selecting the computing working node after sorting, and the top-n candidate results are returned and re-sorted in Redis, so that the tasks are assigned to the appropriate nodes to ensure the load balancing of the cluster and the efficiency of task scheduling. Compared with the computing cluster scheduling algorithm and load balancing algorithm using machine learning or deep learning, this product also has a laboratory state, but we have taken into account the actual business state and the problem of evaluating the resource consumption of computer tasks in reality, relying on model evaluation and prediction in the time window, and updating the machine state in the cache database through the timed state collection of the machines in the cluster, and adjusting the cluster errors caused by model adjustment in real time through the time window mechanism.

[0171] In addition, to achieve the above-mentioned purpose, an embodiment of the present application further proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the computing cluster task scheduling and load balancing calculation method of the embodiment of the present application.

[0172] The computer-readable storage medium proposed in this application mainly uses Telegraf (log collection tool) to store the state of the collection work node in the Redis database within a specified time interval, and the time within the specified time interval becomes a time window. The top-n idle machines in the cache database (Redis) are taken out from the cluster control host, and the CART regression tree prediction task is used to evaluate the resource load of the node in the window. After sorting, the top-n are selected for polling to select the calculation work node, and the top-n candidate results are returned and re-sorted in Redis, so that the task is assigned to the appropriate node to ensure the load balancing of the cluster and the efficiency of task scheduling. Compared with the computing cluster scheduling algorithm and load balancing algorithm using machine learning or deep learning, this product also has a laboratory state, but we have taken into account the actual business state and the problem of evaluating the resource consumption of computer tasks in reality. Through the model evaluation prediction within the time window, the machine state in the cache database is updated through the timed state collection of the machines in the cluster, and the cluster errors caused by model adjustment are adjusted in real time through the time window mechanism.

[0173] The following is a detailed introduction to the various components of electronic equipment:

[0174] The processor is the control center of the electronic device, which can be a processor or a general term for multiple processing elements. For example, the processor is one or more central processing units (CPUs), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (FPGAs).

[0175] Optionally, the processor can perform various functions of the electronic device by running or executing a software program stored in the memory, and calling data stored in the memory.

[0176] The memory is used to store the software program for executing the solution of the present invention, and the execution is controlled by the processor. The specific implementation method can refer to the above method embodiment, which will not be repeated here.

[0177] Optionally, the memory may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may be integrated with the processor, or may exist independently and be coupled to the processor through an interface circuit of the electronic device, which is not specifically limited in the embodiments of the present invention.

[0178] A transceiver is used to communicate with a network device or a terminal device.

[0179] Optionally, the transceiver may include a receiver and a transmitter, wherein the receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.

[0180] Optionally, the transceiver may be integrated with the processor, or may exist independently and be coupled to the processor via an interface circuit of the router, which is not specifically limited in the embodiment of the present invention.

[0181] In addition, the technical effects of the electronic device can refer to the technical effects of the data transmission method described in the above method embodiment, and will not be repeated here.

[0182] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0183] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0184] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0185] It should be understood that the term "and / or" 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. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0186] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0187] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0188] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

Claims

1. A computing cluster task scheduling and load balancing method based on a decision tree within a time window, characterized in that: The method comprises: Determine the target time interval of the target collection time in the computing cluster, and based on the time interval, collect the status of the working nodes and store them in the Redis database; generating a plurality of time windows based on the plurality of target time intervals, each of the target time intervals corresponding to one time window; Determine a target machine, where the target machine is a machine with top-n idleness in the cache database taken from the cluster control host; Using the CART regression tree prediction task to predict the resource load of each target acquisition moment within the time window, and sorting according to the resource load; Traverse j and use the heuristic method to select the jth segmentation variable and its value s as the segmentation variable and segmentation point, define the region, and satisfy: ; To find the optimal j-th segmentation variable and segmentation point s, we need to solve the problem and satisfy the following conditions: ; ; Polling is performed based on the target machine to select and calculate the target collection time, and Redis is used to re-sort the results based on the target machine.

2. According to claim 1, a computing cluster task scheduling and load balancing method based on a decision tree within a time window is characterized in that: Determine the target time interval of the target collection time in the computing cluster, and based on the time interval, collect the status of the working nodes and store them in the Redis database, including: The cluster log status is collected through the Telegraf component, wherein the collected log status is a semi-structured text; Regular expressions are used to extract the semi-structured text.

3. The method for task scheduling and load balancing of computing clusters based on decision trees within a time window according to claim 1, characterized in that: The method further comprises: The characters in the computing cluster are quantified, and the indicators of the quantification processing are computing complexity and storage complexity.

4. The method for task scheduling and load balancing of computing clusters based on decision trees within a time window according to claim 1, characterized in that: Using the CART regression tree prediction task to predict the resource load of each target acquisition moment within the time window, and sorting according to the resource load, including: Set k=0, T= ; Calculate the internal nodes t from bottom to top , and satisfy: ; ; ; in, is any subtree of T, Express the number of words with t as the root node, is the prediction error on the training data, Indicates the actual value, Expression subtree The predicted output of right The internal node t is pruned, and when t is a leaf node, its class is determined by majority voting to obtain a tree T; Let k=k+1, , ,like A tree that is not composed of a root node and two leaf nodes will Candidate set ; The cross-validation method is used to select the candidate set of subtrees. Select the best subtree .

5. The method for task scheduling and load balancing of computing clusters based on decision trees within a time window according to claim 1, characterized in that: Using the CART regression tree prediction task to predict the resource load of each target acquisition moment within the time window, and sorting according to the resource load, including: The comprehensive idleness The target machines with higher priority are prioritized, and the dynamic indicator data X of the kth target machine in Redis is mathematically symbolized as , the static indicator data Y is symbolized as ( ), and satisfy: ; in, is the idleness of the target machine k.

6. A computing cluster task scheduling and load balancing computing device, characterized in that: The device is configured to: Determine the target time interval of the target collection time in the computing cluster, and based on the time interval, collect the status of the working nodes and store them in the Redis database; generating a plurality of time windows based on a plurality of the target time intervals, each target interval corresponding to a time window; Determine a target machine, where the target machine is a machine with top-n idleness in the cache database taken from the cluster control host; Using the CART regression tree prediction task to predict the resource load of each target acquisition moment within the time window, and sorting according to the resource load; Traverse j and use the heuristic method to select the jth variable and its value s as the segmentation variable and segmentation point, define the region, and satisfy: ; To find the optimal j-th segmentation variable and segmentation point s, we need to solve the problem and satisfy the following conditions: ; ; Polling is performed based on the target machine to select and calculate the target collection time, and Redis is used to re-sort the results based on the target machine.

7. A computing cluster task scheduling and load balancing computing device according to claim 6, characterized in that: The device is configured to: The cluster log status is collected through the Telegraf component, wherein the collected log status is a semi-structured text; Regular expressions are used to extract the semi-structured text.

8. An electronic device, characterized in that: include: at least one processor; And, a memory communicatively connected to at least one of the processors; wherein the memory stores instructions executable by at least one of the processors, and the instructions are executed by at least one of the processors so that at least one of the processors can execute a method for task scheduling and load balancing of a computing cluster based on a decision tree within a time window as described in any one of claims 1 to 5.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, a method for scheduling and balancing computing cluster tasks and loads based on a decision tree within a time window as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Task scheduling method and device

    CN105868222A

  • Intelligent resource optimization method of container cloud platform based on load prediction

    CN108829494A