Task scheduling methods, devices, data processing units, program products, media

By using the data processing unit to schedule tasks based on the deviation and trend data of hardware resources, the problem of insufficient matching between task allocation and actual operation in the server cluster is solved, and more efficient task allocation and scheduling is achieved.

CN120762868BActive Publication Date: 2025-11-14LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511278209.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-09
Publication Date
2025-11-14
Estimated Expiration
2045-09-09

AI Technical Summary

Technical Problem

In existing technologies, the task scheduling effect within a server cluster does not match the actual server operation and is difficult to match the trend of server load changes.

Method used

The data processing unit determines the target server object for task allocation based on the deviation and trend data between the server object's hardware resource usage and the target usage, ensuring that the hardware resource usage is close to the target usage, and taking into account the actual operation of the server object.

Benefits of technology

This improves the matching effect between task allocation and the actual operation of server objects, thereby increasing the efficiency and accuracy of task scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120762868B_ABST
    Figure CN120762868B_ABST
Patent Text Reader

Abstract

This invention discloses a task scheduling method, apparatus, data processing unit, program product, and medium, relating to the field of server technology. In this method, the data processing unit can determine the first and second usage amounts of hardware resources by a server object at historically specified times and at the time the task is issued, respectively. It also determines the expected usage amount by using the second usage amount and the hardware resource requirements of the task to be assigned, and determines the first and second deviation amounts between the first and second usage amounts and the target hardware resource usage amount. Subsequently, deviation trend data can be determined based on the first and second deviation amounts, and target server objects can be assigned to the task to be processed based on the second deviation amount and the deviation trend data. This allows for the determination of allocation priorities by comprehensively considering the deviation amounts and deviation trends at various times, thereby improving task scheduling efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of server technology, and in particular to task scheduling methods, apparatus, data processing units, program products, and media. Background Technology

[0002] With the emergence of computationally intensive tasks such as machine learning and simulation, how to schedule server clusters to efficiently execute computational tasks has become an urgent technical problem to be solved.

[0003] In related technologies, task scheduling within a cluster is generally performed by the server processor, and the scheduling effect does not match the actual server operation. Summary of the Invention

[0004] This invention provides a task scheduling method, apparatus, data processing unit, program product, and medium. The data processing unit can allocate target server objects to tasks to be processed based on the deviation and deviation trend data between the hardware resource usage of a server object and the target usage of that hardware resource. This ensures that the hardware resource usage of the target server object is close to the target usage and that the task allocation is closer to the actual operation of the server object.

[0005] To address the aforementioned technical problems, this invention provides a task scheduling method applied to a data processing unit, the method comprising:

[0006] Receive tasks to be processed and determine the hardware resource requirements of the tasks to be processed;

[0007] For at least two server objects in the server cluster, determine the first and second usages of hardware resources for the server objects at a first time and a second time, respectively. Use the second usage and the demand to determine the expected usage. Also determine the first and second deviations between the target usage of hardware resources and the first usage and the expected usage, respectively. Wherein, the first time is a historically specified time and the second time is the time when the task is issued.

[0008] The first and second deviation values ​​are used to determine the deviation trend data, and the second deviation value and the deviation trend data are used to determine the allocation priority of server objects.

[0009] The target server object for executing the task to be processed is determined based on the allocation priority of each server object, and the task to be processed is then sent to the target server object.

[0010] The present invention also provides a task scheduling device applied to a data processing unit, the device comprising:

[0011] The task receiving module is used to receive tasks to be processed and determine the hardware resource requirements of the tasks to be processed.

[0012] The resource usage determination module is used to determine, for at least two server objects in the server cluster, the first usage and the second usage of hardware resources of the server objects at a first time and a second time, respectively, to determine the expected usage using the second usage and the demand, and to determine the first deviation and the second deviation between the target usage of hardware resources and the first usage and the expected usage, respectively; wherein, the first time is a historically specified time, and the second time is the time when the task is issued.

[0013] The allocation priority determination module is used to determine the deviation trend data using the first deviation amount and the second deviation amount, and to determine the allocation priority of the server object using the second deviation amount and the deviation trend data.

[0014] The task allocation module is used to determine the target server object for executing the task to be processed based on the allocation priority of each server object, and to distribute the task to the target server object.

[0015] The present invention also provides a data processing unit, comprising:

[0016] Memory, used to store computer programs;

[0017] A processor is used to implement the task scheduling method described above when executing computer programs.

[0018] The present invention also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the above-described task scheduling method.

[0019] The present invention also provides a non-volatile computer-readable storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the above-described task scheduling method.

[0020] The beneficial effects of this invention are as follows: Firstly, the data processing unit can perform scheduling. Furthermore, upon receiving a task to be processed, the data processing unit can determine the hardware resource requirements of the task. Then, for at least two server objects in the server cluster, it can determine the first and second usage amounts of hardware resources for each server object at a first and second time, respectively. Using the second usage amount and the required amount, it determines the expected usage amount and determines the first and second deviation amounts between the target usage amount of hardware resources and the first and expected usage amounts, respectively. That is, the deviation between the server object's first usage of hardware resources and the target usage amount, and the deviation between the server object's expected usage of hardware resources and the target usage amount if the task to be processed is subsequently sent to that server object. Then, the data processing unit can use the first and second deviation amounts to determine deviation trend data, and use the second deviation amount and deviation trend data to determine the allocation priority of the server objects. Finally, based on the allocation priority of each server object, it determines the target server object to execute the task to be processed and sends the task to the target server object. As can be seen, the data processing unit can schedule tasks based on the target usage of hardware resources, ensuring that the target server object's use of hardware resources is close to the target usage after the task is issued. In addition, when scheduling tasks, the data processing unit can consider the first and second deviations between the server object's use of hardware resources and the target usage, and can determine the allocation priority of the server object based on the second deviation and deviation trend data. Priority determination can be carried out by comprehensively considering the deviation and deviation trend, which can improve the matching effect between task allocation and the actual operation of the server object, thereby improving the task scheduling effect.

[0021] The present invention also provides a task scheduling device, a data processing unit, a program product, and a medium, which have the above-mentioned beneficial effects. Attached Figure Description

[0022] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a structural block diagram of a first task scheduling system provided in an embodiment of the present invention;

[0024] Figure 2 This is a structural block diagram of a second task scheduling system provided in an embodiment of the present invention;

[0025] Figure 3A flowchart of a task scheduling method provided in an embodiment of the present invention;

[0026] Figure 4 This is a structural block diagram of a third task scheduling system provided in an embodiment of the present invention;

[0027] Figure 5 This is a structural block diagram of a task scheduling device provided in an embodiment of the present invention;

[0028] Figure 6 This is a structural block diagram of a data processing unit provided in an embodiment of the present invention. Detailed Implementation

[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.

[0030] It should be noted that, in the description of this invention, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0031] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0032] With the emergence of computationally intensive tasks such as machine learning and simulation, how to efficiently schedule server clusters to execute computational tasks has become a pressing technical problem. In related technologies, task scheduling within the cluster is generally performed by the server processors, and the scheduling effect is poorly matched with the actual server operation, for example, it is difficult to match the server's load variation trend. In view of this, to address the technical problem of how to improve the task scheduling effect of server clusters, this invention provides a task scheduling method. This method allows a data processing unit to allocate target server objects to tasks based on the deviation and deviation trend data between the hardware resource usage of a server object and the target usage of that hardware resource. This ensures that the hardware resource usage of the target server object is close to the target usage and that task allocation more closely reflects the actual operation of the server object.

[0033] To facilitate understanding, the system environment applicable to this embodiment will first be introduced. Please refer to... Figure 1 , Figure 1 This is a structural block diagram of a first task scheduling system provided in an embodiment of the present invention. The system may include at least two server nodes 2, each server node 2 being an independent server device, and they can collectively form a server cluster. In addition, each server node 2 has an attached data processing unit 1 (DPU), which has computing capabilities and can offload some computing tasks from the processor of the server node 2 to the data processing unit 1. The server node 2 and the data processing unit 1 can be connected via a bus structure (such as PCIe bus, Peripheral Component Interconnect express, high-speed serial computer expansion bus standard, etc.). Figure 1 (The winning bidder) communicates with each other. Additionally, data processing units 1 can also establish connections, such as through network ports or cables, to achieve network communication.

[0034] It should be noted that the task scheduling method provided in this embodiment can be executed by one data processing unit 1. Alternatively, to improve scheduling efficiency and avoid single points of failure, this task scheduling method can also be executed jointly by at least two data processing units 1, such as by all data processing units 1 in a server cluster. In this case, multiple data processing units 1 can form a data processing unit cluster, jointly performing internal task scheduling for the server cluster.

[0035] Furthermore, the concept of a server object will appear later in this embodiment. This server object is a virtual scheduling object that can be used by the data processing unit 1 for task scheduling. This server object can correspond to either server node 2 or a virtual server within server node 2. For example, server node 2 can be configured with multiple processors and multiple network interface cards (NICs). Since a single processor and a single NIC can meet the data processing and data transmission requirements, a virtual server can be created based on a single processor and a single NIC. In this case, multiple virtual servers can be created within a single server node 2, thus corresponding to multiple server objects. For easier understanding, please refer to... Figure 2 , Figure 2 The diagram shows the structure of a second task scheduling system provided in this embodiment of the invention. It illustrates that each server node 2 can correspond to multiple server objects 21, and the data processing unit 1 will perform task scheduling based on the server objects 21.

[0036] Based on the above system architecture description, the task scheduling method provided in this embodiment will be described below. Please refer to... Figure 3 , Figure 3A flowchart illustrating a task scheduling method provided in an embodiment of the present invention. This method is applied to a data processing unit and may include:

[0037] S101. Receive the task to be processed and determine the hardware resource requirements of the task to be processed.

[0038] In this embodiment, the data processing unit serves as the entry point for receiving tasks to be processed, responsible for providing task scheduling services to the server cluster. The data processing unit can first set up a main scheduling function (scheduler) and a task queue. The main scheduling function is responsible for receiving tasks sent from outside, determining the hardware resource requirements (such as processor resources, storage resources, network resources, bandwidth resources, etc.) of the server object for each task, and adding the task to the task queue sequentially. Additionally, the data processing unit can also set up a task scheduling thread (scheduler_thread) to perform task scheduling. After writing a task to be processed into the task queue, the main scheduling function can use a semaphore (task_semaphore) to notify the scheduling thread to retrieve the task from the queue. Furthermore, a mutex lock can be set up in the task queue. The main scheduling function can lock the mutex lock, write a task to be processed into the task queue, and then unlock the mutex lock. Similarly, the scheduling thread can lock the mutex lock, retrieve a task from the task queue, and then unlock the mutex lock.

[0039] It should be noted that this embodiment does not limit how to determine the hardware resource requirements of the task to be processed. For example, a requirement prediction can be performed. Based on the task type / task content of the task to be processed, the first requirement of the task for hardware resources at a specified historical time can be determined, and then the hardware resource requirements of the task to be processed can be predicted based on the first requirement of the task for hardware resources.

[0040] In one implementation, determining the hardware resource requirements of the task to be processed may include:

[0041] Step 11: Based on the first hardware resource requirement of the task to be processed at a specified historical time, predict the second hardware resource requirement of the task to be processed.

[0042] Furthermore, considering that predicting hardware resource requirements will consume a significant amount of hardware resources from the data processing unit, when the remaining hardware resources of the data processing unit are insufficient (e.g., only 10% of the hardware resources remain), the required quantities can be randomly generated for the tasks to be processed. That is, when the hardware resource usage of the data processing unit itself reaches a preset threshold, the required quantities can be randomly generated for the tasks to be processed; conversely, the required quantities can be predicted for the tasks to be processed.

[0043] In another embodiment, the method may further include:

[0044] Step 21: Determine whether your hardware resource usage has reached the preset threshold; if it has, proceed to step 22; if it has not, proceed to step 23.

[0045] Step 22: Randomly generate the required quantity for the tasks to be processed.

[0046] Step 23: Proceed to the step of predicting the hardware resource requirements of the task to be processed based on the first hardware resource requirements of the task at a specified historical time.

[0047] S102. For at least two server objects in the server cluster, determine the first and second usages of hardware resources of the server objects at the first and second time points respectively, determine the expected usage using the second usage and the demand, and determine the first and second deviations between the target usage of hardware resources and the first and expected usages respectively; wherein, the first time point is a historically specified time point, and the second time point is the task issuance time point.

[0048] In this embodiment, the task issuance time is the moment when the task to be processed is issued, and the historical specified time is the specified time before the task issuance. The data processing unit can set corresponding target usage for the hardware resources used by the server object. For example, a first target usage can be set for the processor, a second target usage for memory, and a third target usage for network bandwidth. This target usage can be lower than the total amount of hardware resources, for example, the target usage is 80% of the total amount of hardware resources. The purpose of setting the target usage is to control the server object's use of hardware resources to maintain it at around the target usage, which on the one hand ensures that hardware resources are fully utilized, and on the other hand avoids excessive overall load pressure on the server cluster.

[0049] Furthermore, to ensure that task scheduling more closely reflects the actual operation of server objects, the scheduling thread in the data processing unit needs to analyze the hardware resource usage trends of each server object at the first and second time points, and focus on analyzing the deviation trends between the hardware resource usage and the target usage of each server object. The first time point can be a historically specified time, and the second time point can be the time when the task is issued (i.e., the current time). Therefore, for each server object in the server cluster, the data processing unit can obtain its first and second hardware resource usages at the first and second time points. Subsequently, the data processing unit can determine when to issue the task to the server object at the second time point. The expected hardware resource usage of this server object can be calculated by summing the second usage with the previously determined hardware resource requirement of the task to be processed. Finally, after obtaining the first and expected usages, the data processing unit can determine the first and second deviations between the target hardware resource usage and the first and expected usages, respectively. The deviations are calculated as follows:

[0050] Deviation = Target usage - Actual usage;

[0051] The actual usage is either the first usage or the second usage. It's clear that if the actual usage is less than the target usage, the deviation is positive. If the actual usage is greater than the target usage, the deviation is negative. Understandably, a positive deviation indicates that the server object has remaining hardware resources and can be assigned tasks; the larger the deviation, the more suitable it is for task assignment. A negative deviation indicates that the server object's hardware resource usage has exceeded the target usage, and assigning tasks to it may result in insufficient remaining hardware resources, making it unsuitable for task assignment; the smaller the deviation, the less suitable it is for task assignment. Therefore, after obtaining the first and second deviations, the deviation trend data can be determined in the next step.

[0052] It should be noted that this embodiment does not limit the data processing unit to determine the first usage value of the server object in how many first moments. For example, it can be for all first moments from the start time of the server object to the second moment, or it can be for the first moment in a preset time period before the second moment.

[0053] Furthermore, a server object can correspond to either a server node or a virtual server within a server node. To effectively improve resource utilization within a server node and enhance task scheduling, this embodiment can create corresponding server objects based on each network interface card (NIC) and processor within the server object, mapping the hardware resource usage values ​​of each NIC and processor to the corresponding server object. Therefore, before task scheduling, the main scheduling function of the data processing unit can determine the number of server objects based on the number of server nodes, NICs, and processors, and create server objects accordingly, enabling the scheduling thread to perform task scheduling.

[0054] In one embodiment, the method may further include:

[0055] Step 31: Obtain the number of server nodes in the server cluster, and obtain the number of network cards and processors in the server nodes.

[0056] Step 32: Determine the number of server objects using the number of server nodes, network cards, and processors, and create server objects based on the number of server objects, so as to form server objects using each network card device and each processor.

[0057] S103. Use the first deviation and the second deviation to determine the deviation trend data, and use the second deviation and the deviation trend data to determine the allocation priority of the server object.

[0058] In this embodiment, the data processing unit in the data processing unit can use the first deviation amount and the second deviation amount to determine the deviation trend data, and then use the second deviation amount and the deviation trend data to determine the allocation priority of the server object. Of course, if it has been determined in the previous step that the expected usage of hardware resources by the server object exceeds the total amount of hardware resources, then it is obviously impossible to allocate tasks to the server object. Therefore, before executing step S103, server objects whose expected usage does not exceed the total amount of hardware resources can be selected as candidate server objects, and step S103 is only executed for the candidate server objects.

[0059] In one implementation, before determining the deviation trend data using the first deviation and the second deviation, the method may further include:

[0060] Step 41: In the server objects, select those whose expected usage does not exceed the total amount of hardware resources as candidate server objects.

[0061] Step 42: For candidate server objects, proceed to the step of determining deviation trend data using the first deviation and the second deviation, and determining the allocation priority of server objects using the second deviation and the deviation trend data.

[0062] Of course, when selecting candidate server objects, the concurrency of the candidate server objects (i.e. the number of tasks executed at the same time) can also be considered, and only server objects with a concurrency of less than the preset number and an expected usage that does not exceed the total amount of hardware resources can be selected as candidate server objects.

[0063] Furthermore, the deviation trend data first needs to indicate the cumulative deviation of the server object in the first moment, such as whether the overall deviation from the target value is large or small. In this embodiment, the deviation amounts from multiple moments can be accumulated to obtain the cumulative deviation. It should be noted that the calculation of the cumulative deviation requires at least the second deviation amount at the second moment and the first deviation amount preceding the second moment. Of course, it can further use the first deviation amount from each first moment within a preset time period before the second moment, and even the first deviation amounts from the server object's startup moment to the second moment. To avoid excessive accumulation and reduce the reliability of the cumulative deviation, the cumulative deviation can be calculated using the second deviation amount at the second moment and the first deviation amount from each first moment within a preset time period before the second moment. It should be noted that this embodiment does not limit the length of the preset time period and can be set according to actual application requirements.

[0064] Furthermore, the deviation trend data also needs to indicate the fluctuation of the deviation at the second time point, such as whether the rate of change is large or small. In this embodiment, the first and second deviation values ​​can be used to determine the rate of change of the server object's deviation over at least two time points. Therefore, this embodiment can use the cumulative deviation and the rate of change of deviation as deviation trend data.

[0065] In one implementation, determining deviation trend data using a first deviation and a second deviation, and determining the allocation priority of server objects using the second deviation and the deviation trend data, may include:

[0066] Step 51: Using the first and second deviations, determine the cumulative deviation and deviation change rate of the server object at at least two time points.

[0067] Step 52: Determine the allocation priority of each server object using the second deviation, cumulative deviation, and deviation change rate.

[0068] In one specific implementation, determining the cumulative deviation and rate of change of deviation of the server object at at least two time points using a first deviation and a second deviation may include:

[0069] Step 61: Determine the cumulative deviation using the second deviation, the first deviation at the first moment in the preset time period before the second moment, and the time interval.

[0070] Step 62: Determine the rate of change of deviation using the second deviation, the first deviation of the previous first time step, and the time interval.

[0071] Specifically, the cumulative deviation can be expressed as:

[0072] ;

[0073] Among them, T s Let i represent the time interval (e.g., 10ms), i represent the i-th time, j represents the second time, and e(i) represents the deviation at the i-th time.

[0074] The rate of change of deviation can be expressed as:

[0075] ;

[0076] Where e(j) represents the second deviation, and e(j-1) represents the first deviation of the previous first time step at the second time step.

[0077] Furthermore, after obtaining the second deviation, cumulative deviation, and deviation change rate, the allocation priority of each server object can be determined using these parameters.

[0078] The second deviation indicates whether the server object has available hardware resources at the second moment. If the second deviation is positive, it means that the server object has remaining hardware resources and can be assigned tasks; the larger the deviation, the more suitable it is for task assignment. If the second deviation is negative, it means that the server object's hardware resource usage has exceeded the target usage, and further task assignment may lead to insufficient remaining hardware resources, making it unsuitable for task assignment; the smaller the deviation, the less suitable it is for task assignment.

[0079] The cumulative deviation indicates whether the server object is fully utilizing hardware resources at the first moment. If the cumulative deviation is positive, it means that the server object is not using the target amount of hardware resources at the first moment, indicating insufficient utilization of hardware resources. The larger the cumulative deviation, the more insufficient the utilization of hardware resources, making it suitable for task allocation. If the cumulative deviation is negative, it means that the server object is using the target amount of hardware resources at the first moment, indicating over-utilization of hardware resources. The smaller the cumulative deviation, the more over-utilization of hardware resources, making it unsuitable for task allocation.

[0080] The deviation change rate indicates the load change of the server object at the second time point. When the deviation change rate is positive, it indicates that the server load is decreasing; the larger the deviation change rate, the faster the load decreases, and the more suitable it is for task allocation. When the deviation change rate is negative, it indicates that the server load is increasing; the smaller the deviation change rate, the faster the load increases, and the less suitable it is for task allocation.

[0081] Therefore, based on the second deviation, the cumulative deviation, and the deviation change rate, this embodiment can comprehensively consider the remaining hardware resources of the server object at the second moment, the usage of hardware resources at the first moment, and the load change at the second moment, thereby more reliably determining the allocation priority.

[0082] It should be noted that this embodiment does not limit how the second deviation, cumulative deviation, and deviation change rate are used to determine the allocation priority of each server object. For example, the allocation priority can be obtained by simply summing the second deviation, cumulative deviation, and deviation change rate, or by weighted summing the second deviation, cumulative deviation, and deviation change rate. Considering that the remaining hardware resources of the server object at the second time, the usage of hardware resources at the first time, and the load change at the second time have different impacts on the allocation priority, this embodiment can adopt a weighted summation method to determine the allocation priority.

[0083] In one implementation, determining the allocation priority of each server object using a second deviation, a cumulative deviation, and a deviation change rate may include:

[0084] Step 71: Use the first parameter, the second parameter, and the third parameter to perform a weighted summation of the second deviation, the cumulative deviation, and the deviation change rate to obtain the allocation priority of the server object.

[0085] Specifically, the allocation priority can be expressed as:

[0086] ;

[0087] Where, k p k i k d These are the first parameter, the second parameter, and the third parameter, respectively.

[0088] Furthermore, to increase the likelihood of a server object being allocated when the second deviation is large, and to decrease the likelihood when the second deviation is small, this embodiment can also adjust the first, second, and third parameters based on the second deviation. Specifically, a preset parameter value adjustment relationship can be set, which records the mapping relationship between a preset second deviation range and a preset parameter adjustment amount. Then, the second deviation can be matched with the second deviation range to determine the parameter adjustment amount corresponding to the second deviation, and the first, second, and third parameters can be adjusted using this parameter adjustment amount.

[0089] In one embodiment, the method may further include:

[0090] Step 81: Match the parameter adjustment amount corresponding to the second deviation amount in the preset parameter value adjustment relationship, and use the parameter adjustment amount to adjust the first parameter, the second parameter, and the third parameter.

[0091] It should be noted that this embodiment does not limit the specific preset parameter value adjustment relationship, and can be set according to actual application needs. After parameter adjustment, the allocation priority can be expressed as:

[0092] ;

[0093] Where, k p (j), k i (j), k d (j) represents the first, second, and third parameters at time j, respectively, and is calculated using the following formulas:

[0094] ;

[0095] ;

[0096] ;

[0097] in, , , This represents the parameter adjustment amount at time j.

[0098] Furthermore, considering that the server object can use a variety of hardware resources and that each hardware resource has a different impact on task execution, the scheduling thread in the data processing unit can calculate the sub-priority corresponding to each hardware resource for the server object, and perform a weighted summation of each sub-priority according to the preset weight corresponding to each hardware resource to obtain the allocation priority of the server object. The calculation method of the sub-priority is the same as the calculation method of the allocation priority mentioned above.

[0099] In one implementation, determining the allocation priority of server objects using the second deviation amount and deviation trend data may include:

[0100] Step 91: For at least two types of hardware resources, determine the sub-priority corresponding to the hardware resources using the second deviation amount and deviation trend data corresponding to the hardware resources.

[0101] Step 92: Based on the preset weights corresponding to each hardware resource, perform a weighted summation of each sub-priority to obtain the allocation priority of the server object.

[0102] S104. Determine the target server object for executing the task to be processed based on the allocation priority of each server object, and send the task to be processed to the target server object.

[0103] Specifically, a higher allocation priority indicates that the server object may have more remaining hardware resources, less efficient use of hardware resources in the initial moment, or a greater drop in the server object's load, making it more suitable for task allocation. Therefore, the server object with the highest allocation priority can be used as the target server object.

[0104] In one implementation, determining the target server object for executing the task to be processed based on the allocation priority of each server object includes:

[0105] Step 1101: Select the server object with the highest allocation priority as the target server object.

[0106] Furthermore, after identifying the target server object, the scheduling thread in the data processing unit can distribute the tasks to be processed to the corresponding target server object. Subsequently, the data processing unit can update the resource usage and concurrency of the target server object, and can also record and predict the task response time and task completion time of the target server object, and wait for the next round of scheduling.

[0107] Furthermore, a task completion thread can be set in the data processing unit. This task completion thread can release the resources currently occupied by the scheduling thread after the scheduling thread completes a round of scheduling, so as to avoid excessive use of the data processing unit's resources.

[0108] Furthermore, since steps S102-S103 consume significant hardware resources of the data processing unit for computation, this can easily lead to a waste of hardware resources when the overall load on the server cluster is not high. Therefore, to improve the targeting of scheduling, the scheduling thread of the data processing unit only executes steps S102-S104 when it determines that the usage of any hardware resource by any server object has reached a preset threshold. If it is determined that the usage of any hardware resource by any server object has not reached the preset threshold, the scheduling thread of the data processing unit can distribute the task to be processed to a server object with idle hardware resources.

[0109] In one implementation, before determining the hardware resource requirements of the task to be processed, the process may further include:

[0110] Step 1201: When it is determined that the usage of any hardware resource by any server object reaches a preset threshold, proceed to the step of determining the hardware resource requirements of the task to be processed.

[0111] Step 1202: When it is determined that the usage of any hardware resource by any server object has not reached the preset threshold, the task to be processed is sent to the server object with idle hardware resources.

[0112] It should be noted that this embodiment does not limit the specific value of the preset threshold, which can be set according to actual application needs. For example, the preset threshold can be the target usage amount, or it can be lower than the target usage amount.

[0113] Based on the above embodiments, the present invention can first be scheduled by a data processing unit. Furthermore, upon receiving a task to be processed, the data processing unit can determine the hardware resource requirements of the task. Then, for at least two server objects in the server cluster, it can determine the first and second usage amounts of hardware resources for each server object at a first and second time, respectively, where the first time is a historically specified time and the second time is the task issuance time. It also uses the second usage amount and the required amount to determine the expected usage amount, and determines the first and second deviation amounts between the target usage amount of hardware resources and the first and expected usage amounts, respectively. That is, the deviation between the server object's first usage of hardware resources and the target usage amount, and the deviation between the server object's expected usage of hardware resources and the target usage amount if the task to be processed is issued to that server object in the second case. Subsequently, the data processing unit can use the first and second deviation amounts to determine deviation trend data, and use the second deviation amount and deviation trend data to determine the allocation priority of the server objects. Then, based on the allocation priority of each server object, it determines the target server object to execute the task to be processed, and issues the task to the target server object. As can be seen, the data processing unit can schedule tasks based on the target usage of hardware resources, ensuring that the target server object's use of hardware resources is close to the target usage after the task is issued. In addition, when scheduling tasks, the data processing unit can consider the first and second deviations between the server object's use of hardware resources and the target usage, and can determine the allocation priority of the server object based on the second deviation and deviation trend data. Priority determination can be carried out by comprehensively considering the deviation and deviation trend, which can improve the matching effect between task allocation and the actual operation of the server object, thereby improving the task scheduling effect.

[0114] Based on the above embodiments, this embodiment can also form a data processing unit cluster with at least two data processing units to jointly schedule the tasks to be processed to the target server object. The working process of the data processing units in the data processing unit cluster is described below.

[0115] In another embodiment, the method may further include:

[0116] S201. Receive the task to be processed and determine the hardware resource requirements of the task to be processed.

[0117] S202. For at least two server objects in the server node to which it belongs, determine the first usage and second usage of hardware resources of the server objects at the first time and the second time respectively. Use the second usage and the demand to determine the expected usage. Determine the first deviation and second deviation between the target usage of hardware resources and the first usage and the expected usage respectively. Wherein, the first time is the historically specified time and the second time is the time when the task is issued.

[0118] S203. Use the first deviation and the second deviation to determine the deviation trend data, and use the second deviation and the deviation trend data to determine the initial allocation priority of the server objects in the server node to which it belongs.

[0119] Unlike the above embodiments, in steps S202 to S203, the data processing unit will only perform priority calculation on the server objects in its own server node to obtain the initial priority of the server objects in its own server node.

[0120] S204. Establish the correspondence between server objects and initial allocation priorities, and write the correspondence into shared memory.

[0121] S205. Read the correspondences written by itself and other data processing units from the shared memory, and sort the server objects in each correspondence according to the initial allocation priority in each correspondence.

[0122] S206. Determine the target server object for executing the pending task based on the sorting results.

[0123] In steps S204-S206, each data processing unit synchronizes the initial allocation priority of each server object in each server node to each data processing unit based on a data synchronization mechanism, so that each data processing unit can determine the most suitable target server object for task allocation. Specifically, the data processing unit can establish a correspondence between server objects and initial allocation priorities and write the correspondence into shared memory, which is shared by all data processing units. Subsequently, after all data processing units have completed writing, each data processing unit can read the correspondence written by itself and other data processing units from the shared memory, and sort the server objects in each correspondence according to the initial allocation priority in each correspondence, thereby completing the determination of the target allocation priority.

[0124] It should be noted that the aforementioned shared memory can be an independent shared memory device, accessible by each data processing unit. Alternatively, the shared memory can be logical shared memory, formed jointly by the memory spaces of all data processing units. Specifically, each data processing unit has a shared memory region within its memory area, and these shared memory regions can form the aforementioned shared memory. Simultaneously, network connections can be established between data processing units. In this case, the write, synchronization, and read processes for the shared memory can be as follows: 1. The data processing unit writes a pre-established mapping relationship to its own shared memory region; 2. The data processing unit exchanges data in its shared memory region with other data processing units via the network, writing the mapping relationship from its own shared memory region to the shared memory regions of other data processing units, and vice versa; 3. After completing the exchange, the data processing unit reads the full mapping relationship from its own shared memory region to determine the target allocation priority.

[0125] Based on this, a shared memory area is set up in the memory area of ​​each data processing unit; writing the corresponding relationship into the shared memory can include:

[0126] Step 1301: Write the corresponding relationship into its own shared memory area.

[0127] Step 1302: Exchange data in the shared memory area with other data processing units via the network, so as to write the corresponding relationship in its own shared memory area into the shared memory area of ​​other data processing units, and write the corresponding relationship in the shared memory area of ​​other data processing units into its own shared memory area.

[0128] Please refer to Figure 4 , Figure 4 This is a structural block diagram of a third task scheduling system provided in an embodiment of the present invention. As can be seen, each data processing unit 1 may include memory 113, and memory 113 has a shared memory region 1131. Data processing units 1 can synchronize allocation priorities by exchanging data in the shared memory region 1131.

[0129] It should be noted that this embodiment does not limit the data exchange method. For example, a data processing unit can submit data in the shared memory area to a main data processing unit, which then distributes the data to all data processing units. Alternatively, data processing units can exchange data in the shared memory area pairwise. For instance, a ring topology can be pre-built between data processing units, allowing each unit to send its own data to an adjacent data processing unit and receive data from another adjacent data processing unit, thus achieving synchronization. To achieve decentralization, data processing units can exchange data in the shared memory area pairwise to achieve shared memory synchronization.

[0130] S207. Determine whether the target server object is located on its own server node; if yes, proceed to S208; if no, proceed to step S209.

[0131] S208. Send the task to be processed to the target server object.

[0132] S209, Ignore pending tasks.

[0133] In steps S207 to S209, the data processing unit can determine whether the target server object is located on its own server node. If it is located on its own server node, the task can be sent; otherwise, the task to be processed can be ignored, thereby enabling the task to be sent from the nearest node.

[0134] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0135] Please refer to Figure 5 , Figure 5 This is a structural block diagram of a task scheduling device provided in an embodiment of the present invention. The device is applied to a data processing unit and may include:

[0136] The task receiving module 501 is used to receive tasks to be processed and determine the hardware resource requirements of the tasks to be processed.

[0137] The resource usage determination module 502 is used to determine, for at least two server objects in the server cluster, the first usage and the second usage of hardware resources of the server objects at a first time and a second time, respectively, determine the expected usage using the second usage and the demand, and determine the first deviation and the second deviation between the target usage of hardware resources and the first usage and the expected usage, respectively, wherein the first time is a historically specified time and the second time is the time when the task is issued.

[0138] The allocation priority determination module 503 is used to determine the deviation trend data using the first deviation amount and the second deviation amount, and to determine the allocation priority of the server object using the second deviation amount and the deviation trend data.

[0139] The task allocation module 504 is used to determine the target server object for executing the task to be processed based on the allocation priority of each server object, and to distribute the task to be processed to the target server object.

[0140] Optionally, the priority determination module 503 may include:

[0141] The deviation trend data determination submodule is used to determine the cumulative deviation and deviation change rate of the server object at at least two time points using the first deviation and the second deviation.

[0142] The allocation priority determination submodule is used to determine the allocation priority of each server object using the second deviation, cumulative deviation, and deviation change rate.

[0143] Optionally, the deviation trend data determination submodule includes:

[0144] The cumulative deviation calculation unit is used to determine the cumulative deviation using the second deviation, the first deviation in the first time period before the second time period, and the time interval.

[0145] The deviation change rate calculation unit is used to determine the deviation change rate using the second deviation amount, the first deviation amount of the previous first time point of the second time point, and the time interval.

[0146] Optionally, assigning priority to determine submodules may include:

[0147] The allocation priority determination unit is used to perform a weighted summation of the second deviation, the cumulative deviation, and the deviation change rate using the first parameter, the second parameter, and the third parameter, respectively, to obtain the allocation priority of the server object.

[0148] Optionally, the priority allocation determination submodule may also include:

[0149] The parameter adjustment unit is used to match the parameter adjustment amount corresponding to the second deviation amount in the preset parameter value adjustment relationship, and to adjust the first parameter, the second parameter, and the third parameter using the parameter adjustment amount.

[0150] Optionally, the priority determination module 503 includes:

[0151] The sub-priority determination submodule is used to determine the sub-priority of hardware resources for at least two types of hardware resources by using the second deviation amount and deviation trend data corresponding to the hardware resources.

[0152] The sub-priority weighting submodule is used to perform a weighted summation of each sub-priority based on the preset weights corresponding to each hardware resource, so as to obtain the allocation priority of the server object.

[0153] Optionally, the task assignment module 504 can be used for:

[0154] The server object with the highest allocation priority will be selected as the target server object.

[0155] Optionally, the device may further include:

[0156] The candidate server object filtering module is used to select server objects whose expected usage does not exceed the total amount of hardware resources as candidate server objects.

[0157] The allocation priority determination module 503 can be used to determine the allocation priority of a server object by using a first deviation amount and a second deviation amount to determine deviation trend data, and using the second deviation amount and the deviation trend data to determine the allocation priority of the server object.

[0158] Optionally, the task receiving module 501 can be used to: when it is determined that the usage of any hardware resource by any server object reaches a preset threshold, proceed to the step of determining the hardware resource requirement of the task to be processed.

[0159] The device may also include:

[0160] The general scheduling module is used to distribute tasks to server objects with idle hardware resources when it is determined that the usage of any hardware resource by any server object has not reached a preset threshold.

[0161] Optionally, the device may further include:

[0162] The quantity acquisition module is used to obtain the number of server nodes in the server cluster, and the number of network cards and processors in the server nodes;

[0163] The server object creation module is used to determine the number of server objects based on the number of server nodes, network cards, and processors, and to create server objects based on the number of server objects, so as to form server objects using each network card device and each processor.

[0164] Optionally, the task receiving module 501 may include:

[0165] The demand prediction submodule is used to predict the hardware resource requirements of the task to be processed based on the first hardware resource requirements of the task at a specified historical time.

[0166] Optionally, the task receiving module 501 may include:

[0167] The judgment module is used to determine whether the user's hardware resource usage has reached a preset threshold.

[0168] The random demand generation submodule is used to randomly generate the demand for the task to be processed if the condition is met.

[0169] The demand prediction submodule is used to predict the hardware resource demand of the task to be processed based on the first demand for hardware resources of the task to be processed at a specified historical time if no.

[0170] Optionally, at least two data processing units form a data processing unit cluster to jointly schedule the tasks to be processed to the target server object.

[0171] Optionally, the resource usage determination module 502 can be used for:

[0172] For at least two server objects in its own server node, determine the first and second usages of hardware resources of the server objects at the first and second time points, respectively. Use the second usage and demand to determine the expected usage, and determine the first and second deviations between the target usage of hardware resources and the first and expected usage, respectively.

[0173] Priority allocation determination module 503 may include:

[0174] The initial allocation priority determination submodule is used to determine the deviation trend data using the first deviation and the second deviation, and to determine the initial allocation priority of the server objects in its own server node using the second deviation and the deviation trend data.

[0175] The shared memory write submodule is used to establish the correspondence between server objects and initial allocation priorities, and write the correspondence into shared memory;

[0176] Task assignment module 504 may include:

[0177] The shared memory read submodule is used to read the correspondences written by itself and other data processing units from the shared memory, and sort the server objects in each correspondence according to the initial allocation priority in each correspondence.

[0178] The target server object determination submodule is used to determine the target server object for executing the task to be processed based on the sorting results.

[0179] Optionally, the task allocation module 504 may include:

[0180] The task distribution submodule is used to determine whether the target server object is located on the server node to which it belongs; if so, the task to be processed is distributed to the target server object; otherwise, the task to be processed is ignored.

[0181] Optionally, a shared memory area is provided in the memory area of ​​each data processing unit;

[0182] The shared memory write submodule may include:

[0183] The local memory write unit is used to write the corresponding relationship into its own shared memory area;

[0184] The switching unit is used to exchange data in the shared memory area with other data processing units via the network, so as to write the corresponding relationship in its own shared memory area into the shared memory area of ​​other data processing units, and to write the corresponding relationship in the shared memory area of ​​other data processing units into its own shared memory area.

[0185] For a description of the features in the embodiment corresponding to the task allocation device, please refer to the relevant description in the embodiment corresponding to the task allocation method, which will not be repeated here.

[0186] This embodiment also provides a data processing unit, which may include:

[0187] Memory, used to store computer programs;

[0188] A processor is used to implement the task scheduling method described above when executing computer programs.

[0189] Please refer to Figure 6 , Figure 6 This is a structural block diagram of a data processing unit provided in an embodiment of the present invention. The data processing unit 1 may include:

[0190] Processor module 11;

[0191] Programmable logic device module 12 is connected to network port 14 and bus interface 13. Network port 14 can be used to connect to external devices and other data processing units 1, and bus interface 13 can be used to connect to server nodes. A network transmission module (not shown) can be configured in programmable logic device module 12. This network transmission module supports TCP and RDMA (RoCEv2) (remote direct memory access) protocols to achieve data transmission functionality.

[0192] The processor module 11 and the programmable logic device module 12 can be used together to execute the above-described task scheduling method. For example, the programmable logic device module 12 can receive tasks to be processed from external devices via network port 14 and pass the tasks to be processed to the processor module 11. The processor module 11 can perform the following: determine the hardware resource requirements of the tasks to be processed; for at least two server objects in the server cluster, determine the first and second usages of hardware resources of the server objects at a first time and a second time, respectively, determine the expected usage using the second usage and the required usage, and determine the first and second deviations between the target usage of hardware resources and the first usage and the expected usage, respectively; wherein the first time is a historically specified time and the second time is the task issuance time; determine the deviation trend data using the first and second deviations, and determine the allocation priority of the server objects using the second deviation and the deviation trend data; determine the target server object for executing the tasks to be processed according to the allocation priority of each server object. Subsequently, the processor module 11 can send the tasks to be processed and the target server object information to the programmable logic device 12, and the programmable logic device 12 can send the tasks to be processed to the target server objects in the server nodes via the bus interface 13.

[0193] Specifically, the processor module 11 may include a processor 111, an accelerator 112, and memory 113. The processor 111 and accelerator 112 can jointly execute the steps required by the processor module 11. Simultaneously, the accelerator 112 can perform some computational tasks on behalf of the processor 111, such as calculating expected usage, first deviation, second deviation, and deviation trend data. The memory 113 may be configured with a shared memory region 1131. The programmable logic device 12 may include a programmable logic device 121 (such as an FPGA, Field Programmable Gate Array). The programmable logic device 121 can be connected to the processor 111 via a bus structure (such as a PCIe bus), and the programmable logic device 121 can also be connected to the network port 14 and the bus interface 13.

[0194] It is worth noting that when multiple data processing units 1 form a data processing unit cluster and jointly execute task scheduling, the interaction process between the processor module 11 and the programmable logic device module 12 can be as follows:

[0195] 1. The programmable logic device module 12 receives the task to be processed from the external device via the network and transmits it to the memory 113 of the processor module 11.

[0196] 2. The processor module 11 retrieves the task to be processed from the memory 113, determines the initial allocation priority of the server object in the server node, establishes the correspondence between the server object and the initial allocation priority, and writes the correspondence into the shared memory area 1131 in the memory 113.

[0197] 3. The processor module 11 controls the programmable logic device module 12 to send the correspondence in the shared memory area 1131 to other data processing units 1 through the network port 14, and controls the programmable logic device module 12 to write the correspondence sent by other data processing units 1 through the network port 14 into the shared memory area 1131.

[0198] 4. The processor module 11 reads the correspondence written by itself and other data processing units 1 from the shared memory area 1131, and sorts the server objects in each correspondence according to the initial allocation priority in each correspondence.

[0199] 5. The processor module 11 determines the target server object to be processed based on the sorting result. If the target server object is the server object to which it belongs, the processor module 11 sends the task to be processed to the programmable logic device module 12, and the programmable logic device module 12 sends the task to be processed to the server node through the bus interface 13.

[0200] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described task scheduling method embodiments at runtime.

[0201] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0202] Embodiments of the present invention also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described task scheduling method embodiments.

[0203] Embodiments of the present invention also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described task scheduling method embodiments.

[0204] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0205] The above provides a detailed description of the task scheduling method, apparatus, data processing unit, program product, and medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the present invention.

Claims

1. A task scheduling method, characterized in that, Applied to a data processing unit, the method includes: Receive the task to be processed and determine the hardware resource requirements of the task to be processed; For at least two server objects in a server cluster, determine the first and second usages of hardware resources by the server objects at a first time and a second time, respectively. Use the second usage and the demand to determine the expected usage. Also determine the first and second deviations between the target usage of the hardware resources and the first usage and the expected usage, respectively. Wherein, the first time is a historically specified time, and the second time is the task issuance time. The first deviation and the second deviation are used to determine deviation trend data, and the second deviation and the deviation trend data are used to determine the allocation priority of the server object; The target server object for executing the task to be processed is determined according to the allocation priority of each of the server objects, and the task to be processed is sent to the target server object; Determining deviation trend data using the first deviation and the second deviation, and determining the allocation priority of the server object using the second deviation and the deviation trend data, includes: The cumulative deviation is determined using the second deviation, the first deviation at the first moment in the preset time period before the second moment, and the time interval. The deviation rate of change is determined using the second deviation, the first deviation of the previous first time point, and the time interval. The allocation priority of each server object is determined using the second deviation, the cumulative deviation, and the deviation change rate.

2. The task scheduling method according to claim 1, characterized in that, Determining the allocation priority of each server object using the second deviation, the cumulative deviation, and the deviation change rate includes: The allocation priority of the server object is obtained by weighted summing of the second deviation, the cumulative deviation, and the deviation change rate using the first parameter, the second parameter, and the third parameter, respectively.

3. The task scheduling method according to claim 2, characterized in that, Also includes: In the preset parameter value adjustment relationship, match the parameter adjustment amount corresponding to the second deviation amount, and use the parameter adjustment amount to adjust the first parameter, the second parameter, and the third parameter.

4. The task scheduling method according to claim 1, characterized in that, Determining the allocation priority of the server object using the second deviation amount and the deviation trend data includes: For at least two types of hardware resources, the sub-priority corresponding to the hardware resources is determined using the second deviation amount and deviation trend data corresponding to the hardware resources. Based on the preset weights corresponding to each hardware resource, the sub-priorities are weighted and summed to obtain the allocation priority of the server object.

5. The task scheduling method according to claim 4, characterized in that, The target server object for executing the task to be processed is determined based on the allocation priority of each of the server objects, including: The server object with the highest allocation priority is selected as the target server object.

6. The task scheduling method according to claim 1, characterized in that, Before determining the deviation trend data using the first deviation and the second deviation, the method further includes: Among the server objects, those whose expected usage does not exceed the total amount of hardware resources are selected as candidate server objects. For the candidate server object, proceed to the step of determining deviation trend data using the first deviation amount and the second deviation amount, and determining the allocation priority of the server object using the second deviation amount and the deviation trend data.

7. The task scheduling method according to claim 1, characterized in that, Before determining the hardware resource requirements of the task to be processed, the process also includes: When it is determined that the usage of any hardware resource by any server object reaches a preset threshold, the step of determining the hardware resource requirement of the task to be processed is initiated. When it is determined that the usage of any hardware resource by any server object has not reached the preset threshold, the task to be processed is sent to a server object with idle hardware resources.

8. The task scheduling method according to claim 1, characterized in that, Also includes: Obtain the number of server nodes in the server cluster, and obtain the number of network interface cards and processors in each server node; The number of server objects is determined by the number of server nodes, the number of network interface cards (NICs), and the number of processors, and the server objects are created according to the number of server objects, so as to form the server objects using each NIC and each processor.

9. The task scheduling method according to claim 1, characterized in that, Determining the hardware resource requirements of the task to be processed includes: Based on the initial hardware resource requirements of the task to be processed at a specified historical time, predict the hardware resource requirements of the task to be processed.

10. The task scheduling method according to claim 9, characterized in that, Also includes: Determine whether your hardware resource usage has reached a preset threshold; If so, then the required quantity will be randomly generated for the task to be processed; If not, proceed to the step of predicting the hardware resource requirements of the task to be processed based on the first hardware resource requirements of the task to be processed at a specified historical time.

11. The task scheduling method according to any one of claims 1 to 10, characterized in that, At least two data processing units form a data processing unit cluster, which together schedules the task to be processed to the target server object.

12. The task scheduling method according to claim 11, characterized in that, For at least two server objects in a server cluster, determine the first and second usages of hardware resources by the server objects at a first time and a second time, respectively. Utilize the second usage and the demand to determine the expected usage. Also determine the first and second deviations between the target usage of the hardware resources and the first usage and the expected usage, respectively. This includes: For at least two server objects in its own server node, determine the first and second usages of hardware resources of the server objects at a first time and a second time, respectively. Use the second usage and the demand to determine the expected usage, and determine the first and second deviations between the target usage of the hardware resources and the first usage and the expected usage, respectively. The step of determining deviation trend data using the first deviation and the second deviation, and determining the allocation priority of the server object using the second deviation and the deviation trend data, includes: The deviation trend data is determined using the first deviation and the second deviation, and the initial allocation priority of the server objects in the server node to which it belongs is determined using the second deviation and the deviation trend data. Establish the correspondence between the server object and the initial allocation priority, and write the correspondence into shared memory; The target server object for executing the task to be processed is determined based on the allocation priority of each of the server objects, including: Read the correspondences written by itself and other data processing units from the shared memory, and sort the server objects in each correspondence according to the initial allocation priority in each correspondence; The target server object for executing the task to be processed is determined based on the sorting results.

13. The task scheduling method according to claim 12, characterized in that, Sending the task to be processed to the target server object includes: Determine whether the target server object is located on its own server node; If so, the task to be processed is sent to the target server object; If not, then ignore the task to be processed.

14. The task scheduling method according to claim 12, characterized in that, Each of the data processing units has a shared memory area in its memory region; Writing the correspondence into shared memory includes: Write the correspondence into its own shared memory area; The system exchanges data in the shared memory region with other data processing units via a network, so as to write the correspondence in its own shared memory region into the shared memory region of other data processing units, and to write the correspondence in the shared memory region of other data processing units into its own shared memory region.

15. A task scheduling device, characterized in that, Applied to a data processing unit, the device includes: The task receiving module is used to receive tasks to be processed and determine the hardware resource requirements of the tasks to be processed. The resource usage determination module is used to determine, for at least two server objects in a server cluster, the first usage and the second usage of hardware resources by the server objects at a first time and a second time, respectively; to determine the expected usage using the second usage and the demand; and to determine the first deviation and the second deviation between the target usage of the hardware resources and the first usage and the expected usage, respectively; wherein, the first time is a historically specified time, and the second time is the task issuance time. The allocation priority determination module is used to determine deviation trend data using the first deviation amount and the second deviation amount, and to determine the allocation priority of the server object using the second deviation amount and the deviation trend data; The task allocation module is used to determine the target server object for executing the task to be processed according to the allocation priority of each server object, and to send the task to be processed to the target server object. The allocation priority determination module includes: The cumulative deviation calculation unit is used to determine the cumulative deviation using the second deviation, the first deviation at the first moment in the preset time period before the second moment, and the time interval. The deviation change rate calculation unit is used to determine the deviation change rate using the second deviation amount, the first deviation amount of the previous first time moment of the second time moment, and the time interval; The allocation priority determination submodule is used to determine the allocation priority of each server object using the second deviation, the cumulative deviation, and the deviation change rate.

16. A data processing unit, characterized in that, include: Memory, used to store computer programs; A processor for implementing the task scheduling method as described in any one of claims 1 to 14 when executing the computer program.

17. A computer program product comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the task scheduling method as described in any one of claims 1 to 14.

18. A non-volatile computer-readable storage medium, characterized in that, The non-volatile computer-readable storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement the task scheduling method as described in any one of claims 1 to 14.

Citation Information

Patent Citations

  • Intelligent server management method and system in edge computing environment

    CN119576594A

  • Resource scheduling method of server and electronic equipment

    CN120256114A