Task scheduling method and device, computer equipment, storage medium and program product
By obtaining scheduling request information in the virtual machine task scheduler, determining task categories and priorities, and matching suitable servers, the scheduling accuracy problems of resource heterogeneity and task diversity in multi-cloud environments are solved, and efficient task scheduling is achieved.
Patent Information
- Application Number
- CN202411701401.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-07
AI Technical Summary
The existing virtual machine scheduling methods are difficult to effectively deal with resource heterogeneity and task diversity in multi-cloud environments, resulting in low scheduling accuracy.
Provide a task scheduling method, by obtaining task attribute information and scheduling attribute information in the scheduling request, determining task categories and priorities, matching suitable scheduling servers, and processing tasks according to priority levels.
The orderly processing is achieved based on task diversity and demand heterogeneity, and the scheduling accuracy of scheduling tasks is improved.
Smart Images

Figure CN119576478A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a task scheduling method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] With the rapid development of information technology, different cloud environments have their own resource characteristics and performance indicators, and different virtual machine tasks also have different resource requirements. How to efficiently and intelligently schedule these heterogeneous tasks to the virtual machine that is most suitable for their execution has become the key to improving the overall system performance and response speed.
[0003] Typically, existing virtual machine scheduling methods tend to focus on a single cloud environment or homogeneous tasks, and are unable to effectively cope with resource heterogeneity and task diversity in a multi-cloud environment, which results in low scheduling accuracy for virtual machines. Summary of the invention
[0004] Based on this, it is necessary to provide a task scheduling method, device, computer equipment, computer-readable storage medium and computer program product that can improve scheduling accuracy in response to the above technical problems.
[0005] In a first aspect, the present application provides a task scheduling method. The method includes: obtaining a scheduling request from an interactive environment, the scheduling request including task attribute information and scheduling attribute information of each of a plurality of scheduling tasks; determining the target task category to which each of the scheduling tasks belongs according to the scheduling attribute information; determining the scheduling priority of each scheduling task based on the target task category and task attribute information of each scheduling task; determining a scheduling server matching each scheduling task from a plurality of server clusters in the interactive environment based on the scheduling attribute information of each scheduling task; and calling the scheduling server corresponding to the scheduling task to process the scheduling task according to the scheduling priority of each scheduling task.
[0006] In one embodiment, the scheduling attribute information includes: an identifier of the reason for scheduling the scheduling task; based on the scheduling attribute information, determining the target task category to which each scheduling task belongs, including: determining the target task category to which each scheduling task belongs based on the matching result between the identifier of the reason for scheduling each scheduling task and a first preset identifier and a second preset identifier; the target task category includes a first task category corresponding to the first preset identifier, and a second task category corresponding to the second preset identifier; the first task category represents that the scheduling task is a newly added task, and the second task category represents that the scheduling task is a migration task.
[0007] In one embodiment, the scheduling priority of each scheduling task is determined based on the target task category and task attribute information of each scheduling task, including: for each scheduling task, based on the mapping relationship between the task category and the priority strategy, obtaining scheduling parameters from the priority strategy that matches the target task category to which the scheduling task belongs, and extracting scheduling data that matches the scheduling parameters from the task attribute information of the scheduling task; determining the scheduling score of each scheduling task based on the scheduling data corresponding to each scheduling task; determining the scheduling priority of each scheduling task based on the scheduling score of each scheduling task; wherein, the smaller the scheduling score, the higher the scheduling priority.
[0008] In one embodiment, the method also includes: when the target task category of the scheduling task is the first task category, determining the task application time and the remaining time of the task deadline of the scheduling task as scheduling data extracted from the task attribute information of the scheduling task; when the target task category of the scheduling task is the second task category, determining the task application time, the remaining time of the task deadline and the task completion degree of the scheduling task as scheduling data extracted from the task attribute information of the scheduling task; based on the scheduling data corresponding to each scheduling task, determining the scheduling score of each scheduling task, including: for the scheduling task whose target task category is the first task category, based on the task application time of the scheduling task and the first weight coefficient, and the remaining time of the task deadline and the second weight coefficient, obtaining the scheduling score of the scheduling task; for the scheduling task whose target task category is the second task category, based on the task application time of the scheduling task and the third weight coefficient, the remaining time of the task deadline and the fourth weight coefficient, and the task completion degree and the fifth weight coefficient, determining the scheduling score of the scheduling task.
[0009] In one embodiment, a scheduling score of a scheduling task is obtained based on a task application time and a first weight coefficient, as well as a task deadline remaining time and a second weight coefficient of the scheduling task, including: for each scheduling task whose target task category is the first task category, based on the task application time of each scheduling task, determining a minimum task application time and a maximum task application time, and based on the task deadline remaining time of each scheduling task, determining a minimum task deadline remaining time and a maximum task deadline remaining time; based on the minimum task application time and the maximum task application time, scaling the task application time of the scheduling task to obtain the scaled task application time; based on the minimum task deadline remaining time and the maximum task deadline remaining time, scaling the task deadline remaining time of the scheduling task to obtain the scaled task deadline remaining time; performing weighted summation of the scaled task application time and the first weight coefficient, as well as the scaled task deadline remaining time and the second weight coefficient corresponding to the scheduling task to obtain the scheduling score of the scheduling task.
[0010] In one embodiment, the scheduling attribute information includes the server type requested for use when the scheduling task is executed, and the computing resources required for the scheduling task; based on the scheduling attribute information of each scheduling task, determining a scheduling server that matches each scheduling task from multiple server clusters in an interactive environment, including: for each scheduling task, based on the server type requested for use when the scheduling task is executed, determining multiple candidate servers that match the server type corresponding to the scheduling task from multiple server clusters in the interactive environment; obtaining available resource information of each candidate server; based on the matching result of the computing resources required for the scheduling task and the available resource information of each candidate server, determining a scheduling server that matches the scheduling task from each candidate server.
[0011] In a second aspect, the present application provides a task scheduling device, which includes: an information acquisition module, which is used to obtain a scheduling request from an interactive environment, the scheduling request including task attribute information and scheduling attribute information of each of a plurality of scheduling tasks; a determination module, which is used to determine, based on the scheduling attribute information, a target task category to which each scheduling task belongs; a processing module, which is used to determine the scheduling priority of each scheduling task based on the target task category and task attribute information of each scheduling task; a selection module, which is used to determine, from a plurality of server clusters in the interactive environment, a scheduling server that matches each scheduling task based on the scheduling attribute information of each scheduling task; and a calling module, which is used to call the scheduling server corresponding to the scheduling task to process the scheduling task according to the scheduling priority of each scheduling task.
[0012] The above-mentioned task scheduling method and device obtain a scheduling request from an interactive environment, where the scheduling request includes task attribute information and scheduling attribute information of each of the multiple scheduling tasks, and determines the target task category to which each scheduling task belongs based on the scheduling attribute information, and determines the scheduling priority of each scheduling task based on the target task category and task attribute information of each scheduling task, and determines the scheduling server matching each scheduling task from multiple server clusters in the interactive environment based on the scheduling attribute information of each scheduling task, and calls the scheduling server corresponding to the scheduling task to process the scheduling task according to the scheduling priority of each scheduling task, thereby realizing orderly processing of the scheduling tasks based on the task diversity and demand heterogeneity of the scheduling tasks, thereby improving the scheduling accuracy of the scheduling tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A flowchart of a task scheduling method in one embodiment;
[0014] Figure 2 A schematic diagram of the interaction environment corresponding to a virtual machine task scheduler in one embodiment;
[0015] Figure 3A schematic diagram of a process for determining the scheduling priority of each scheduling task based on the target task category and task attribute information of each scheduling task in an embodiment;
[0016] Figure 4 A schematic diagram of a process for determining a scheduling score of each scheduling task based on scheduling data corresponding to each scheduling task in an embodiment;
[0017] Figure 5 A flowchart of determining a scheduling server matching each scheduling task from multiple server clusters in an interactive environment based on scheduling attribute information of each scheduling task in an embodiment;
[0018] Figure 6 is a structural block diagram of a virtual machine task scheduler in one embodiment;
[0019] Figure 7 is a flowchart of a task scheduling method in another embodiment;
[0020] Figure 8 is a structural block diagram of a task scheduling device in one embodiment;
[0021] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0023] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations; and the acquisition, storage, processing, transmission, etc. of data must comply with relevant laws and regulations.
[0024] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0025] In one embodiment, Figure 1 As shown, a task scheduling method is provided, which is described by taking the method applied to a virtual machine task scheduler as an example, and includes the following steps:
[0026] S102, obtaining a scheduling request from the interactive environment, where the scheduling request includes task attribute information and scheduling attribute information of each of a plurality of scheduling tasks.
[0027] In this embodiment, the virtual machine task scheduler may include a scheduling task collection unit, and the scheduling task collection unit is used to receive a scheduling request from the interactive environment. In some embodiments, the scheduling task collection unit may receive a scheduling request from the interactive environment in each scheduling cycle. The scheduling cycle represents the cycle of the virtual machine task scheduler processing the scheduling task.
[0028] The interactive environment refers to an environment formed by the virtual machine task scheduler and the request sender of the scheduling request. The interactive environment can have various forms. For example, the request sender of the scheduling request includes a server cluster in a multi-cloud environment and / or a cloud user outside the server cluster.
[0029] When the request sender of the scheduling request includes a server cluster in a multi-cloud environment, the virtual machine task scheduler can receive the scheduling request from the server cluster in the multi-cloud environment, and the number of server clusters is not limited. The multi-cloud environment refers to an environment based on a public cloud, a private cloud, or a combination of a public cloud and a private cloud, and the number of public clouds and private clouds is not limited. For example, an enterprise can achieve optimal business deployment and cost control by combining multiple resources such as public cloud, private cloud, and edge computing.
[0030] When the request sender of the scheduling request includes a cloud user outside the server cluster, the virtual machine task scheduler may receive the scheduling request from a request terminal corresponding to the cloud user.
[0031] Among them, the scheduling task can be in various forms. For example, the scheduling task can refer to a newly added task, such as a task submitted by a cloud user outside the server cluster that needs to be scheduled for processing. For example, the scheduling task can refer to a task that has been processed but not completed in the server cluster.
[0032] Taking the scheduling request from cloud users and server clusters in multiple environments as an example, the server clusters in multiple environments can be clusters provided by different cloud service providers or clusters provided by the same cloud service provider. The servers in the server cluster can belong to the same computer room, and the locations of computer rooms corresponding to different server clusters can be the same or different. There is no limit on the number of server clusters under a cloud service provider.
[0033] For each server in the server cluster, in some cases, the virtual machine (VM) deployed in the server can be called to process tasks, so the tasks processed on the virtual machine can be called VM tasks or VM scheduling tasks. Among them, different server clusters provided by different cloud service providers can be interconnected through backbone network switches, which also provides a network basis for scheduling VM tasks between different physical server clusters of different cloud service providers.
[0034] like Figure 2 As shown, a schematic diagram of the interaction environment corresponding to the virtual machine task scheduler is provided. Among them, the multiple environments may include a first server cluster and a second server cluster provided by cloud service provider A, and a third server cluster and a fourth server cluster provided by cloud service provider B.
[0035] exist Figure 2 In the embodiment, the virtual machine task scheduling server can receive a scheduling request from at least one server in the first server cluster, and at the same time, the virtual machine task scheduling server can receive a scheduling request from a request terminal corresponding to a cloud user outside the server cluster, thereby obtaining task attribute information and scheduling attribute information of each of the multiple scheduling tasks. Furthermore, the virtual machine task scheduling server can determine a server from the second server cluster to the fourth server cluster for processing the scheduling task corresponding to the first server cluster, and the virtual machine task scheduling server can determine a server from the first server cluster to the fourth server cluster for processing the scheduling task corresponding to the request terminal.
[0036] In some cases, for a scheduling task from a server cluster, a source server in the server cluster corresponding to the scheduling task is determined, that is, the source server is the server in the server cluster that sends the scheduling request. Thus, for other servers in the server cluster except the source server, other servers can also be called to process the scheduling task if other servers are available ( Figure 2 That is, the scheduling task can be processed by other servers in the same server cluster.
[0037] The task attribute information of the scheduling task refers to the parameters related to the scheduling task, and the task attribute information may include the task name, task description, and task completion degree, etc. The scheduling application time refers to the time when the scheduling task application is processed; the task description refers to a brief description of the task, which is used to understand the function and purpose of the task.
[0038] The scheduling attribute information of a scheduling task refers to parameters related to the task scheduling process. The scheduling attribute information may include the scheduling application time of the scheduling task, the computing resources required for the scheduling task to be executed, and the server type requested to be used when the scheduling task is executed.
[0039] For example, when a scheduling task refers to a task that has been processed but not completed and needs to be reallocated to a task processing node, if the server type representation server that processed the scheduling task before allocation is a general computing server, then after allocation, the scheduling task can be processed by a general computing server.
[0040] S104: Determine the target task category to which each scheduled task belongs according to the scheduling attribute information.
[0041] In this embodiment, the virtual machine task scheduler may further include a classification unit, which is used to determine the target task category to which each scheduled task belongs according to the scheduling attribute information. The target task category represents the task type of the scheduled task, and the task type of the scheduled task may be in various forms.
[0042] In some embodiments, the target task category may represent that the scheduled task is not processed, that is, the scheduled task is a newly added task that needs to be scheduled and processed, such as a scheduled task submitted by a cloud user.
[0043] In some embodiments, the target task category may represent that the scheduled task has been processed but not completed. For example, the scheduled task may refer to a task that needs to be migrated due to a server failure in a server cluster, that is, the scheduled task is a passive migration task; for example, the scheduled task may refer to a task that needs to be migrated because the computing resources of the server in the server cluster cannot meet the task requirements, or due to factors such as disaster recovery and delay, that is, the scheduled task is an active migration task.
[0044] There is no limitation on the implementation method of determining the target task category to which each scheduling task belongs according to the scheduling attribute information, and the following is an example of possible implementation methods.
[0045] In one embodiment, the scheduling attribute information of each scheduling task can be input into a category classification model, and the output result of the category classification model is determined as the target task category of each scheduling task. The category classification model can be trained based on the scheduling attribute information of each task and the task category of each task.
[0046] In one embodiment, the scheduling attribute information includes a scheduling reason identifier of the scheduling task, and the scheduling reason identifier is used to identify the scheduling reason of the scheduling task, and the scheduling reason can be in various forms. For example, the scheduling reason corresponding to the scheduling reason identifier indicates that the scheduling task is a newly added task, or the scheduling reason indicates that the server processing the scheduling task is faulty, or the scheduling reason indicates that the computing resources of the server processing the scheduling task cannot meet the task requirements of the scheduling task, etc. Further, based on the scheduling reason identifier of each scheduling task, the target task category of each scheduling task can be determined.
[0047] Specifically, according to the scheduling attribute information, the target task category to which each scheduling task belongs is determined, including: based on the matching result between the scheduling reason identifier of each scheduling task and the first preset identifier and the second preset identifier, the target task category to which each scheduling task belongs is determined. Among them, the target task category includes a first task category corresponding to the first preset identifier and a second task category corresponding to the second preset identifier; the first task category indicates that the scheduling task is a newly added task, and the second task category indicates that the scheduling task is a migration task, and the migration task may include an active migration task or a passive migration task, etc.
[0048] S106: Determine the scheduling priority of each scheduling task based on the target task category and task attribute information of each scheduling task.
[0049] In this embodiment, the virtual machine task scheduler may further include a scheduling priority calculation unit, which is used to determine the scheduling priority of each scheduled task based on the target task category and task attribute information of each scheduled task. The scheduling priority of a scheduled task refers to the priority level assigned to the scheduled task when it is executed, which determines the execution order of the scheduled tasks.
[0050] There is no limitation on the implementation method of determining the scheduling priority of each scheduling task based on the target task category and task attribute information of each scheduling task. The following is an example of possible methods.
[0051] In one embodiment, the task attribute information of the scheduled task includes the task completion degree and the task identifier. The task identifier corresponds to the identifier of the scheduling reason. That is, the target task category of each scheduled task can be determined based on the task identifier of each scheduled task.
[0052] Furthermore, the task completion degree of each scheduling task can be ranked to determine the top M scheduling tasks with the highest task completion degree; for the M scheduling tasks, the scheduling priority of the scheduling tasks whose target task category is the first task category is determined as the first level, and the scheduling priority of the scheduling tasks whose target task category is the second task category is determined as the second level; for the scheduling tasks other than the M scheduling tasks in each scheduling task, the scheduling priority of the scheduling task is determined as the third level. Among them, the scheduling priorities corresponding to the first level, the second level and the third level are gradually reduced.
[0053] S108, based on the scheduling attribute information of each scheduling task, determining a scheduling server matching each scheduling task from a plurality of server clusters in the interactive environment.
[0054] In this embodiment, the virtual machine task scheduler may further include a scheduling strategy generating unit, which is used to determine a scheduling server matching each scheduling task from multiple server clusters in the interactive environment based on scheduling attribute information of each scheduling task.
[0055] There is no limitation on the implementation method of determining the scheduling server matching each scheduling task from multiple server clusters in the interactive environment based on the scheduling attribute information of each scheduling task, and the following is an example of possible implementation methods.
[0056] In one embodiment, the scheduling attribute information may include the computing resources required for the execution of the scheduling task. For each scheduling task, multiple first servers whose processing status is unprocessed can be determined from multiple server clusters; the computing resources of the multiple first servers are obtained, and a second server is determined from the multiple first servers, and the computing resources of the second server are greater than the computing resources required for the execution of the scheduling task.
[0057] Further, when the number of second servers is one, the second server is determined as the scheduling server that matches the scheduling task; when the number of second servers is multiple, a randomly selected second server can be determined as the scheduling server that matches the scheduling task; or, among the multiple second servers, the second server with the lowest task processing failure rate is determined as the scheduling server that matches the scheduling task; or, among the multiple second servers, the second server with the longest time interval from the last task processing is determined as the scheduling server that matches the scheduling task.
[0058] S110, according to the scheduling priority of each scheduling task, calling the scheduling server corresponding to the scheduling task to process the scheduling task.
[0059] In this embodiment, the virtual machine scheduling task may further include a scheduling task execution unit, and the scheduling task execution unit is used to call a scheduling server corresponding to the scheduling task to process the scheduling task according to the scheduling priority of each scheduling task.
[0060] In some cases, the scheduling policy generation unit can generate a scheduling policy for each scheduling task based on the scheduling priority of each scheduling task and the scheduling server matching each scheduling task, and send a policy execution instruction corresponding to the scheduling policy of each scheduling task to the scheduling task execution unit, so that the scheduling task execution unit calls the scheduling server corresponding to the scheduling task to process the scheduling task based on the scheduling priority of each scheduling task based on the policy execution instructions.
[0061] based on Figure 1The content shown is obtained by obtaining a scheduling request from an interactive environment, the scheduling request includes task attribute information and scheduling attribute information of each scheduling task, and according to the scheduling attribute information, the target task category to which each scheduling task belongs is determined, and based on the target task category and task attribute information of each scheduling task, the scheduling priority of each scheduling task is determined, and based on the scheduling attribute information of each scheduling task, a scheduling server matching each scheduling task is determined from multiple server clusters in the interactive environment, and according to the scheduling priority of each scheduling task, the scheduling server corresponding to the scheduling task is called to process the scheduling task, thereby, based on the task diversity and demand heterogeneity of the scheduling task, orderly processing of the scheduling tasks can be achieved, and the scheduling accuracy of the scheduling tasks can be improved.
[0062] Combination Figure 1 It should be noted that the task scheduling method provided by the present application can be used for the processing of scheduled tasks by a virtual machine task scheduler within a scheduling cycle. If there are scheduled tasks that cannot be scheduled in the current scheduling cycle, the unscheduled scheduled tasks will be added to the next scheduling cycle for continued scheduling to ensure that the scheduled tasks can be successfully scheduled. Specifically:
[0063] In one embodiment, in the current scheduling cycle, based on the scheduling attribute information of the scheduling task, when there is no scheduling server matching the scheduling task in multiple server clusters, the scheduling task is determined as an unscheduled scheduling task, and the unscheduled scheduling task is added to the next scheduling cycle of the current scheduling cycle for scheduling processing. In some cases, the unscheduled scheduling task can be added to the unschedulable list, so that when the next scheduling cycle is reached, the scheduling task in the unschedulable list is added to the scheduling task list in the next scheduling cycle.
[0064] Furthermore, in one embodiment, when the number of scheduling cycles added by the unscheduled scheduling task exceeds the preset number, error information for the unscheduled scheduling task is output for cloud server operation and maintenance personnel to view and handle. For example, assuming that there are 60 scheduling cycles in 1 hour, if the scheduling task cannot be scheduled 60 times in 1 hour, error information for the scheduling task is output.
[0065] It should be understood that if it is determined that a scheduled task cannot be scheduled within the current scheduling cycle, it may be that the scheduling server corresponding to the scheduling task is occupied by other scheduling tasks. Therefore, the cycle period can be set to timely determine whether the scheduling server corresponding to the scheduling task is available. Specifically:
[0066] In one embodiment, for unscheduled scheduling tasks, it is determined whether the scheduling server corresponding to the scheduling task is occupied every cycle period; if it is not occupied, the scheduling server corresponding to the scheduling task is called to process the scheduling task. For example, the cycle period can be 30 seconds, 1 minute or other values.
[0067] There is no limitation on the method for determining whether the scheduling server corresponding to the unscheduled scheduling task is occupied. For example, it can be determined whether the scheduling server corresponding to the unscheduled scheduling task is occupied based on the available resource information of the scheduling server corresponding to the unscheduled scheduling task, etc.
[0068] In one embodiment, the implementation method of determining the scheduling priority of each scheduling task (ie, S106) based on the target task category and task attribute information of each scheduling task can be as follows: Figure 3 As shown, the following steps are included:
[0069] S302, for each scheduling task, based on the mapping relationship between the task category and the priority strategy, obtain scheduling parameters from the priority strategy that matches the target task category to which the scheduling task belongs, and extract scheduling data that matches the scheduling parameters from the task attribute information of the scheduling task.
[0070] Among them, the priority strategy includes parameters related to determining the scheduling priority. Therefore, based on the target task category of the scheduling task, the parameters related to the scheduling task priority for determining the scheduling task can be obtained from the priority strategy corresponding to the target task category.
[0071] The form of the scheduling parameters is not limited. For example, when the target task category is the first task category, the scheduling parameters may include a time parameter, and the scheduling data may include the task deadline remaining time, that is, the task deadline remaining time matching the time parameter may be extracted from the task attribute information of the scheduled task. For example, when the target task category is the second task category, the scheduling parameters include a task completion parameter, and the scheduling data may include a task completion degree, that is, the task completion degree matching the task completion parameter may be extracted from the task attribute information of the scheduled task.
[0072] S304: Determine a scheduling score for each scheduling task based on the scheduling data corresponding to each scheduling task.
[0073] There is no limitation on the implementation method of determining the scheduling score of each scheduling task based on the scheduling data corresponding to each scheduling task. The following is an example of possible implementation methods.
[0074] In some embodiments, when the scheduling data includes the task deadline remaining time, for each scheduled task, the scheduling score of the scheduled task is determined based on the mapping relationship between the task deadline remaining time and the scheduling score, and the task deadline remaining time of the scheduled task. The task deadline remaining time is positively correlated with the scheduling score.
[0075] In some embodiments, when the scheduling data includes task completion, for each scheduled task, the scheduling score of the scheduled task is determined based on the mapping relationship between the task completion and the scheduling score and the task completion of the scheduled task, wherein the task completion and the scheduling score are negatively correlated.
[0076] S306, determining the scheduling priority of each scheduling task based on the scheduling score of each scheduling task; wherein, the smaller the scheduling score, the higher the scheduling priority.
[0077] based on Figure 3 As shown in the content, by adopting different priority strategies for scheduling tasks of different task categories and determining corresponding scheduling priorities, the scheduling flexibility and adaptability of scheduling tasks can be improved.
[0078] In one embodiment, Figure 4 As shown, a method for determining the scheduling score of each scheduling task (ie, S304) based on the scheduling data corresponding to each scheduling task is provided, which may include the following steps:
[0079] S402, when the target task category of the scheduled task is the first task category, the task application time and the task deadline remaining time of the scheduled task are determined as the scheduling data extracted from the task attribute information of the scheduled task.
[0080] The task application time of the scheduling task refers to the time when the scheduling task requests scheduling processing, and the task deadline remaining time of the scheduling task refers to the time when the task processing result of the scheduling task is required to be fed back.
[0081] S404, when the target task category of the scheduled task is the second task category, the task application time, the task deadline remaining time and the task completion degree of the scheduled task are determined as the scheduling data extracted from the task attribute information of the scheduled task.
[0082] S406, for the scheduling task whose target task category is the first task category, obtaining a scheduling score of the scheduling task based on the task application time and the first weight coefficient, and the task deadline remaining time and the second weight coefficient.
[0083] Among them, for the scheduling task whose target task category is the first task category, there is no limit to the implementation method of obtaining the scheduling score of the scheduling task based on the task application time and the first weight coefficient, as well as the task deadline remaining time and the second weight coefficient. The following is an illustration of several of the methods.
[0084] In some embodiments, the scheduling score of the scheduling task is determined as the sum of a first product between the task application time of the scheduling task and the first weight coefficient and a second product between the task deadline remaining time of the scheduling task and the second weight coefficient.
[0085] for example, represents the scheduling score of the i-th scheduling task, represents the task application time of the i-th scheduled task, The remaining time of the task deadline of the i-th scheduled task, represents the first weight coefficient, represents the second weight coefficient, then .in, , , and Other parameters can also be set.
[0086] In some embodiments, the scheduling score of the scheduling task may also be determined in the following manner, specifically:
[0087] S1, for each scheduled task whose target task category is the first task category, determine the minimum task application time and the maximum task application time based on the task application time of each scheduled task, and determine the minimum task deadline remaining time and the maximum task deadline remaining time based on the task deadline remaining time of each scheduled task.
[0088] S2, based on the minimum task application time and the maximum task application time, scaling the task application time of the scheduled task to obtain the scaled task application time.
[0089] Specifically, determine a first difference between the task application time of the scheduled task and the minimum task application time, and a second difference between the maximum task application time and the minimum task application time; and determine the ratio of the first difference to the second difference as the scaled task application time.
[0090] for example, Indicates the scaled task application time, Indicates the minimum task application time, represents the maximum task application time, A represents the task application time of the scheduled task, then .
[0091] S3, scaling the task deadline remaining time of the scheduled task based on the minimum task deadline remaining time and the maximum task deadline remaining time to obtain the scaled task deadline remaining time.
[0092] Among them, based on the minimum task deadline remaining time and the maximum task deadline remaining time, the task deadline remaining time of the scheduled task is scaled to obtain the scaled task deadline remaining time. The implementation method can refer to the content adaptation description of S2 and will not be repeated here.
[0093] S4, performing weighted summation on the scaled task application time and the first weight coefficient corresponding to the scheduled task, and the scaled task deadline remaining time and the second weight coefficient, to obtain a scheduling score for the scheduled task.
[0094] Specifically, the sum of the third product between the scaled task application time and the first weight coefficient corresponding to the scheduled task and the fourth product between the scaled task deadline remaining time and the second weight coefficient is determined as the scheduling score of the scheduled task.
[0095] For example, assuming the scheduling cycle is 1 minute, the scheduling tasks collected within 1 minute include the scheduling tasks and scheduling tasks , scheduling tasks Task application time and the remaining time until the task is due 0.4 minutes and 30 minutes respectively, scheduling tasks Task application time and the remaining time until the task is due By counting the task application time and task deadline remaining time of each scheduled task within 1 minute, it is determined that the maximum task application time is 0.4 minutes, the minimum task application time is 0.8 minutes, the maximum task deadline remaining time is 20 minutes, and the minimum task deadline remaining time is 30 minutes.
[0096] Assumptions , , then for the scheduling task , scaled task application time , the remaining time of the task deadline after scaling , then the scheduling score ; For scheduling tasks , scaled task application time , the remaining time of the task deadline after scaling , then the scheduling score , then schedule the task The scheduling priority is lower than the scheduling task The scheduling priority of
[0097] Based on the contents of S1 to S4, by scaling the task application time and the task deadline remaining time of the scheduled task to [0,1], the processing efficiency and accuracy can be improved when determining the scheduling score of the scheduled task based on the scaled task application time and the scaled task deadline remaining time.
[0098] S408, for the scheduling task whose target task category is the second task category, determine the scheduling score of the scheduling task based on the task application time and the third weight coefficient, the task deadline remaining time and the fourth weight coefficient, and the task completion degree and the fifth weight coefficient.
[0099] Among them, for the scheduling task whose target task category is the second task category, there is no limitation on the implementation method of determining the scheduling score of the scheduling task based on the task application time and the third weight coefficient, the task deadline remaining time and the fourth weight coefficient, and the task completion degree and the fifth weight coefficient. The following is an example of the technical method.
[0100] In some embodiments, the sum of the fifth product between the task application time of the scheduled task and the third weight coefficient, the sixth product between the task deadline remaining time of the scheduled task and the fourth weight coefficient, and the seventh product between the task completion degree of the scheduled task and the fifth weight coefficient is determined as the scheduling score of the scheduled task.
[0101] For example, taking the scheduling task as the passive migration task in the second task category, represents the i-th scheduled task, represents the task application time of the i-th scheduled task, The remaining time of the task deadline of the i-th scheduled task, represents the task completion degree of the i-th scheduled task, represents the third weight coefficient, represents the fourth weight coefficient, represents the fifth weight coefficient, then .
[0102] When the scheduled task is an active migration task in the second task category, the third weight coefficient corresponding to the active migration task is , the fourth weight coefficient and the fifth weight coefficient , , , .for example, , , , , , The above parameters may also have other settings, which are not limited in this embodiment.
[0103] In some embodiments, the scheduling score of the scheduled task is determined based on the task application time and the third weight coefficient, the task deadline remaining time and the fourth weight coefficient, and the task completion degree and the fifth weight coefficient of the scheduled task. Please refer to the content adaptation description of S1-S4 and will not be repeated here.
[0104] based on Figure 4 The content shown can be used to obtain the scheduling score of the scheduling task, and then based on the scheduling attribute information of each scheduling task, determine the scheduling server matching each scheduling task from multiple server clusters, and call the scheduling server corresponding to the scheduling task to process the scheduling task according to the scheduling priority of each scheduling task. In this way, based on the heterogeneity of the requirements of the scheduling tasks, the orderly processing of the scheduling tasks can be achieved, thereby improving the scheduling accuracy of the scheduling tasks.
[0105] In one embodiment, the scheduling attribute information includes the server type requested to be used when the scheduling task is executed, and the computing resources required for the scheduling task. Based on the scheduling attribute information of each scheduling task, the implementation method of determining the scheduling server matching each scheduling task from multiple server clusters in the interactive environment (i.e., S108) can be as follows: Figure 5 As shown, the following steps are included:
[0106] S502 , for each scheduling task, based on the server type requested to be used when the scheduling task is executed, determine multiple candidate servers that match the server type corresponding to the scheduling task from multiple server clusters in the interactive environment.
[0107] In this embodiment, the virtual machine task scheduler includes a classification unit, which is also used to determine multiple candidate servers that match the server type corresponding to the scheduling task from multiple server clusters in the interactive environment based on the server type requested to be used when the scheduling task is executed.
[0108] In some embodiments, the server type requested for use when scheduling task execution indicates that the architecture of the server is a standard x86 architecture, the server is a general-purpose computing server, and the server is equipped with a CPU. In some cases, when VM tasks that require balanced computing, memory, and storage resources, such as web servers, lightweight applications, and development and testing environments, this type of server can be called to process tasks.
[0109] In some embodiments, the server type requested for use when scheduling task execution indicates that the architecture of the server is an x86 architecture, and the server is a general computing enhanced server, and the server is equipped with a CPU. In some cases, when VM tasks that require enhanced CPU performance and higher computing power are required, such as medium-sized databases and medium-to-high-load website services, this type of server can be called to process tasks.
[0110] In some embodiments, the server type requested for scheduling task execution indicates that the server architecture is Advanced RISC Machine (ARM) or x86 architecture, and the server is a domestic server with a CPU. In some cases, when facing VM tasks that require domestic general computing resources, in order to meet the requirements of domestic substitution, this type of server can be called to process the task.
[0111] In some embodiments, the server type requested for scheduling task execution indicates that the server is a memory-optimized server. In some cases, when VM tasks are targeted at memory-intensive applications, such as large databases, in-memory databases, and big data analysis, which provide a large amount of random access memory (RAM) resources, calling this type of server can ensure fast data processing and caching, improving performance in data-intensive scenarios.
[0112] In some embodiments, the server type requested for use when scheduling task execution indicates that the server is a network-enhanced server. In some cases, when VM tasks for demanding network-intensive applications, such as high-traffic websites, real-time communications, and game servers, calling this type of server can ensure high speed and stability of data transmission.
[0113] In some embodiments, the server type requested for scheduling task execution indicates that the server is equipped with a GPU. In some cases, this type of server can be called for VM tasks that require large-scale parallel computing, model training and reasoning, machine learning and deep learning applications, such as production-style large model training, graphics and video rendering, etc.
[0114] In some embodiments, the server type requested for use when scheduling task execution indicates that the server is a domestic server and is equipped with a GPU. In some cases, when VM tasks require domestic artificial intelligence training and reasoning resources, in order to meet the requirements of domestic substitution, this type of server can be called to process the task.
[0115] In some embodiments, the server type requested for use when scheduling task execution indicates that the server is composed of an FPGA cluster. In some cases, when VM tasks that require field programmable gate arrays are performed, such as accelerated computing and signal processing tasks, in order to achieve hardware acceleration and adapt to customized logic circuit requirements, this type of server can be called to process the task.
[0116] S504: Obtain available resource information of each candidate server.
[0117] The virtual machine task scheduler may further include a scheduling strategy generating unit and a server monitoring unit.
[0118] The server monitoring unit is used to continuously monitor the available resource information of each server in the plurality of server clusters at a predetermined time interval, and send the monitoring data to the scheduling strategy generating unit.
[0119] The scheduling strategy generation unit is used to obtain multiple candidate servers matching the server type corresponding to the scheduling task from the classification unit, determine the available resource information of each candidate server based on the monitoring data sent by the server monitoring unit, and obtain the scheduling priority of each scheduling task from the scheduling priority calculation unit.
[0120] The available resource information includes, but is not limited to, the server's central processing unit (CPU), graphics processing unit (GPU), field programmable gate array (FPGA) resource utilization, memory utilization, storage space utilization, electricity price of the computer room where the server is located, network bandwidth utilization, etc.
[0121] S506: Based on the matching result of the computing resources required for the scheduling task and the available resource information of each candidate server, determine a scheduling server matching the scheduling task from each candidate server.
[0122] In this embodiment, the scheduling strategy generation unit is also used to determine the scheduling server that matches the scheduling task from each candidate server based on the matching result of the computing resources required for the scheduling task and the available resource information of each candidate server. Further, based on the scheduling priority of each scheduling task obtained from the scheduling priority calculation unit and the scheduling server that matches each scheduling task, the scheduling strategy of each scheduling task is generated, and the strategy execution instruction corresponding to the scheduling strategy of each scheduling task is sent to the scheduling task execution unit. Thus, based on the strategy execution instruction corresponding to the scheduling strategy of each scheduling task, the scheduling task execution unit calls the scheduling server corresponding to the scheduling task to process the scheduling task.
[0123] The computing resources required for the scheduling task refer to the various hardware and software resources required to effectively execute and complete the scheduling task. The computing resources required for the scheduling task are not limited to any form. For example, the computing resources required for the scheduling task include the memory, storage space, network bandwidth, etc. required for the scheduling task.
[0124] There is no limitation on the method for determining the matching result between the computing resources required for the scheduling task and the available resource information of each candidate server, and several of the methods are described below by way of example.
[0125] In one embodiment, the computing resources required for the scheduling task include the memory and storage space required for the scheduling task, and the available resource information of the candidate server includes the memory occupancy rate and the storage space occupancy rate. For each candidate server, the remaining memory and the remaining storage space of the candidate server can be determined based on the memory occupancy rate and the storage space occupancy rate of the candidate server, respectively; when the memory required for the scheduling task is less than the remaining memory of the candidate server, and the storage space required for the scheduling task is less than the remaining storage space of the candidate server, the candidate server is determined to be a scheduling server that matches the scheduling task.
[0126] In one embodiment, the computing resources required for the scheduling task include the network bandwidth required for the scheduling task, and the available resource information of the candidate server includes the network bandwidth occupancy rate. Based on the network bandwidth provided by the multiple candidate servers, a reference server with the same network bandwidth required for the scheduling task can be determined from the multiple candidate servers; when the network bandwidth occupancy rate of the reference server is less than or equal to the occupancy rate threshold, the reference server is determined as the scheduling server that matches the scheduling task.
[0127] In the case of determining a scheduling server that matches a scheduling task, based on the number of scheduling servers, different methods may be used to determine the called scheduling server, specifically:
[0128] In some cases, when the number of scheduling servers matching the scheduling task is one, the scheduling server may be directly called to process the scheduling task.
[0129] In some cases, when there are multiple scheduling servers matching a scheduling task, a scheduling server can be randomly called to process the scheduling task, or the scheduling server with the lowest scheduling task processing failure rate can process the scheduling task. Other forms can also be used to determine the called scheduling server.
[0130] based on Figure 5The content shown can determine the scheduling server that matches each scheduling task, so that, according to the scheduling priority of each scheduling task, the scheduling server corresponding to the scheduling task is called to process the scheduling task. Therefore, based on the task diversity and demand heterogeneity of the scheduling tasks, the scheduling tasks can be processed in an orderly manner, thereby improving the scheduling accuracy of the scheduling tasks.
[0131] Combining the above content, such as Figure 6 As shown, a structure diagram of a virtual machine task scheduler is provided. The virtual machine task scheduler 600 includes: a scheduling task collection unit, a classification unit, a scheduling priority calculation unit, a scheduling strategy generation unit and a scheduling task execution unit.
[0132] The scheduling task collection unit is used to collect scheduling requests from the server cluster in the multi-cloud environment, and to collect scheduling requests from cloud users outside the server cluster, so as to obtain task attribute information and scheduling attribute information of each of the multiple scheduling tasks. The scheduling attribute information includes the scheduling reason identifier of the scheduling task, the server type requested to be used when the scheduling task is executed, and the computing resources required for the scheduling task. The task attribute information includes the task application time, the remaining time of the task deadline, and the task completion degree. When the scheduling task refers to a task requested by a cloud user, the task completion degree is 0.
[0133] The classification unit is used to determine the target task category to which each scheduled task belongs according to the matching result between the scheduling reason identifier of each scheduled task and the first preset identifier and the second preset identifier. The target task category includes a first task category corresponding to the first preset identifier and a second task category corresponding to the second preset identifier; the first task category indicates that the scheduled task is a newly added task (i.e., a task requested by a cloud user), and the second task category indicates that the scheduled task is a migration task, and the migration task includes an active migration task and a passive migration task.
[0134] The classification unit is further used to determine, based on the server type requested to be used when each scheduling task is executed, multiple candidate servers matching the server type corresponding to each scheduling task from multiple server clusters in the interactive environment.
[0135] A scheduling priority calculation unit is used to obtain scheduling parameters from a priority strategy that matches the target task category to which the scheduling task belongs based on the mapping relationship between the task category and the priority strategy, and to extract scheduling data that matches the scheduling parameters from the task attribute information of the scheduling task, and to determine the scheduling score of each scheduling task based on the scheduling data corresponding to each scheduling task, and then determine the scheduling priority of each scheduling task based on the scheduling score of each scheduling task; wherein, the smaller the scheduling score, the higher the scheduling priority.
[0136] Among them, when the target task category of the scheduling task is the first task category, the task application time and the remaining time before the task deadline of the scheduling task are determined as the scheduling data extracted from the task attribute information of the scheduling task; when the target task category of the scheduling task is the second task category, the task application time, the remaining time before the task deadline and the task completion degree of the scheduling task are determined as the scheduling data extracted from the task attribute information of the scheduling task.
[0137] The server monitoring unit is used to continuously monitor the available resource information of each server in the plurality of server clusters at a predetermined time interval, and send the monitoring data to the scheduling strategy generation unit. For example, the time interval may be 10 seconds or other values.
[0138] The scheduling strategy generation unit is used to obtain multiple candidate servers matching the server type corresponding to the scheduling task from the classification unit, so as to determine the available resource information of each candidate server based on the monitoring data sent by the server monitoring unit. The scheduling measurement generation unit is also used to determine the scheduling server matching the scheduling task from each candidate server based on the matching result of the computing resources required for the scheduling task and the available resource information of each candidate server, and to generate the scheduling strategy of each scheduling task based on the scheduling priority of each scheduling task obtained from the scheduling priority calculation unit and the scheduling server matching each scheduling task, and to send the strategy execution instruction corresponding to the scheduling strategy of each scheduling task to the scheduling task execution unit.
[0139] In some cases, when a scheduling server matching each scheduling task is determined, the scheduling strategy generation unit is further configured to update the current status of the scheduling server corresponding to each scheduling task to the server monitoring unit.
[0140] The scheduling task execution unit is used to call the scheduling server corresponding to the scheduling task to process the scheduling task based on the policy execution instruction corresponding to the scheduling policy of each scheduling task. In some cases, the actions corresponding to the policy execution instruction include but are not limited to starting a new virtual machine, migrating an existing virtual machine, adjusting resource allocation, etc. At the same time, the execution process is monitored to ensure that the task is completed as planned, and the execution status or log may be fed back to form a closed-loop control.
[0141] based on Figure 6 In one embodiment, the content shown is as follows Figure 7 As shown, a task scheduling method is provided, taking the method applied to a virtual machine task scheduler as an example, comprising the following steps:
[0142] S702, obtaining a scheduling request from the interactive environment, where the scheduling request includes task attribute information and scheduling attribute information of each of a plurality of scheduling tasks.
[0143] Among them, the virtual machine task scheduling server can receive a scheduling request from at least one server in the first server cluster. At the same time, the virtual machine task scheduling server can receive a scheduling request from a request terminal corresponding to a cloud user outside the server cluster, thereby obtaining task attribute information and scheduling attribute information of each of multiple scheduling tasks.
[0144] The scheduling attribute information includes: the scheduling reason identifier of the scheduling task, the server type requested to be used when the scheduling task is executed, and the computing resources required for the scheduling task.
[0145] S704: Determine the target task category to which each of the scheduled tasks belongs based on the matching result between the scheduling reason identifier of each of the scheduled tasks and the first preset identifier and the second preset identifier.
[0146] Among them, the target task category includes a first task category corresponding to the first preset identifier and a second task category corresponding to the second preset identifier; the first task category represents that the scheduled task is a new task, and the second task category represents that the scheduled task is a migration task, and the migration task includes an active migration task and a passive migration task.
[0147] S706, for a scheduling task whose target task category is a first task category, obtaining a scheduling score of the scheduling task based on the task application time and the first weight coefficient, and the task deadline remaining time and the second weight coefficient.
[0148] S708, for the scheduling task whose target task category is the second task category, determine the scheduling score of the scheduling task based on the task application time and the third weight coefficient, the task deadline remaining time and the fourth weight coefficient, and the task completion degree and the fifth weight coefficient.
[0149] S710, determining the scheduling priority of each scheduling task based on the scheduling score of each scheduling task; wherein the smaller the scheduling score, the higher the scheduling priority.
[0150] S712 , for each scheduling task, based on the server type requested to be used when the scheduling task is executed, determine multiple candidate servers that match the server type corresponding to the scheduling task from multiple server clusters in the interactive environment.
[0151] S714: Obtain available resource information of each candidate server.
[0152] S716, based on the matching result of the computing resources required for the scheduling task and the available resource information of each candidate server, determine a scheduling server matching the scheduling task from each candidate server.
[0153] S718, according to the scheduling priority of each scheduling task, call the scheduling server corresponding to the scheduling task to process the scheduling task.
[0154] Among them, the specific content of S702 to S718 can be adapted to the description of the above content and will not be repeated here.
[0155] based on Figure 7 The content shown, on the one hand, this application can accurately identify the resource demand heterogeneity of virtual machine tasks in a distributed multi-cloud environment, and according to the scheduling priority of each scheduling task, a scheduling strategy for each scheduling task can be formulated to improve the resource utilization efficiency of the cloud data center, ensure the service quality of the cloud service provider and reduce operating costs. On the other hand, this application divides the scheduling tasks into three types according to the different types of task generation. The first type is the VM scheduling request added by the cloud user. Such requests are all new tasks and do not involve the migration and cutting of the source virtual machine tasks; the second type is the migration task of the faulty VM in the cloud environment. Such tasks are passive migration tasks, that is, the task must be migrated to a new server because of the server failure to ensure the smooth progress of the task; the third type is the active migration task of the running VM. Such tasks are generally because the existing resources cannot meet the task requirements or the resource pool needs to be actively switched due to disaster recovery, delay and other factors. On the other hand, based on the three types of scheduling tasks of user new requests, cluster fault errors, and active requests for migration in the cluster, the scheduling servers of each scheduling task can be subdivided into various types of servers described in S502 according to the differences in resources required for different application scenarios. Moreover, this application considers the task application time of each scheduling task, the remaining time of the task deadline (the time left for the task to return the result), and the task completion progress, and prioritizes the scheduling order of each scheduling task, which can improve the scheduling flexibility and adaptability of the scheduling tasks.
[0156] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0157] Based on the same inventive concept, the embodiment of the present application also provides a task scheduling device for implementing the task scheduling method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more task scheduling device embodiments provided below can refer to the limitations on the task scheduling method above, and will not be repeated here.
[0158] In one embodiment, Figure 8 As shown, a task scheduling device is provided, including: an information acquisition module 802, a determination module 804, a processing module 806, a selection module 808 and a calling module 810, wherein: the information acquisition module 802 is used to obtain a scheduling request from an interactive environment, the scheduling request includes task attribute information and scheduling attribute information of each of a plurality of scheduling tasks; the determination module 804 is used to determine the target task category to which each scheduling task belongs according to the scheduling attribute information; the processing module 806 is used to determine the scheduling priority of each scheduling task based on the target task category and task attribute information of each scheduling task; the selection module 808 is used to determine a scheduling server matching each scheduling task from a plurality of server clusters in the interactive environment based on the scheduling attribute information of each scheduling task; and the calling module 810 is used to call the scheduling server corresponding to the scheduling task to process the scheduling task according to the scheduling priority of each scheduling task.
[0159] In one embodiment, the scheduling attribute information includes: an identifier of the reason for scheduling the scheduling task; the determination module 804 is also used to: determine the target task category to which each scheduling task belongs based on the matching result between the identifier of the reason for scheduling each scheduling task and the first preset identifier and the second preset identifier; the target task category includes a first task category corresponding to the first preset identifier, and a second task category corresponding to the second preset identifier; the first task category represents that the scheduling task is a newly added task, and the second task category represents that the scheduling task is a migration task.
[0160] In one embodiment, the processing module 806 is also used to: for each scheduling task, based on the mapping relationship between the task category and the priority strategy, obtain scheduling parameters from the priority strategy that matches the target task category to which the scheduling task belongs, and extract scheduling data that matches the scheduling parameters from the task attribute information of the scheduling task; determine the scheduling score of each scheduling task based on the scheduling data corresponding to each scheduling task; determine the scheduling priority of each scheduling task based on the scheduling score of each scheduling task; wherein, the smaller the scheduling score, the higher the scheduling priority.
[0161] In one embodiment, the processing module 806 is also used to: when the target task category of the scheduling task is the first task category, determine the task application time and the remaining time of the task deadline of the scheduling task as the scheduling data extracted from the task attribute information of the scheduling task; when the target task category of the scheduling task is the second task category, determine the task application time, the remaining time of the task deadline and the task completion degree of the scheduling task as the scheduling data extracted from the task attribute information of the scheduling task; for the scheduling task whose target task category is the first task category, obtain the scheduling score of the scheduling task based on the task application time of the scheduling task and the first weight coefficient, as well as the remaining time of the task deadline and the second weight coefficient; for the scheduling task whose target task category is the second task category, determine the scheduling score of the scheduling task based on the task application time of the scheduling task and the third weight coefficient, the remaining time of the task deadline and the fourth weight coefficient, as well as the task completion degree and the fifth weight coefficient.
[0162] In one embodiment, the processing module 806 is also used to: for each scheduled task whose target task category is the first task category, determine the minimum task application time and the maximum task application time based on the task application time of each scheduled task, and determine the minimum task deadline remaining time and the maximum task deadline remaining time based on the task deadline remaining time of each scheduled task; scale the task application time of the scheduled task based on the minimum task application time and the maximum task application time to obtain the scaled task application time; scale the task deadline remaining time of the scheduled task based on the minimum task deadline remaining time and the maximum task deadline remaining time to obtain the scaled task deadline remaining time; perform weighted summation of the scaled task application time and the first weight coefficient corresponding to the scheduled task, as well as the scaled task deadline remaining time and the second weight coefficient to obtain a scheduling score for the scheduled task.
[0163] In one embodiment, the scheduling attribute information includes the server type requested to be used when the scheduling task is executed, and the computing resources required for the scheduling task; the selection module 808 is also used to: for each scheduling task, based on the server type requested to be used when the scheduling task is executed, determine multiple candidate servers that match the server type corresponding to the scheduling task from multiple server clusters in the interactive environment; obtain available resource information of each candidate server; based on the matching result of the computing resources required for the scheduling task and the available resource information of each candidate server, determine the scheduling server that matches the scheduling task from each candidate server.
[0164] Each module in the above task scheduling device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0165] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as task attribute information and scheduling attribute information of each scheduling task. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a task scheduling method is implemented.
[0166] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0167] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0168] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0169] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0170] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0171] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0172] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0173] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A task scheduling method, characterized in that: The method comprises: Obtaining a scheduling request from an interactive environment, wherein the scheduling request includes task attribute information and scheduling attribute information of each of a plurality of scheduling tasks; Determine the target task category to which each of the scheduled tasks belongs according to the scheduling attribute information; Determining the scheduling priority of each of the scheduled tasks based on the target task category and task attribute information of each of the scheduled tasks; Based on the scheduling attribute information of each of the scheduling tasks, determining a scheduling server matching each of the scheduling tasks from a plurality of server clusters in the interactive environment; According to the scheduling priority of each scheduling task, the scheduling server corresponding to the scheduling task is called to process the scheduling task.
2. The method according to claim 1, characterized in that The scheduling attribute information includes: an identifier of a reason for scheduling the scheduling task; and determining, based on the scheduling attribute information, a target task category to which each of the scheduling tasks belongs, includes: Determine the target task category to which each of the scheduling tasks belongs based on the matching result between the scheduling reason identifier of each of the scheduling tasks and the first preset identifier and the second preset identifier; The target task category includes a first task category corresponding to the first preset identifier and a second task category corresponding to the second preset identifier; the first task category indicates that the scheduled task is a newly added task, and the second task category indicates that the scheduled task is a migration task.
3. The method according to claim 1 or 2, characterized in that: The determining the scheduling priority of each of the scheduled tasks based on the target task category and task attribute information of each of the scheduled tasks includes: For each of the scheduling tasks, based on the mapping relationship between the task category and the priority strategy, a scheduling parameter is obtained from the priority strategy that matches the target task category to which the scheduling task belongs, and scheduling data matching the scheduling parameter is extracted from the task attribute information of the scheduling task; Determine a scheduling score for each of the scheduling tasks based on the scheduling data corresponding to each of the scheduling tasks; Based on the scheduling score of each of the scheduling tasks, the scheduling priority of each of the scheduling tasks is determined; wherein, the smaller the scheduling score is, the higher the scheduling priority is.
4. The method according to claim 3, characterized in that The method further comprises: When the target task category of the scheduled task is the first task category, determining the task application time and the task deadline remaining time of the scheduled task as the scheduling data extracted from the task attribute information of the scheduled task; When the target task category of the scheduled task is the second task category, determining the task application time, task deadline remaining time and task completion degree of the scheduled task as the scheduling data extracted from the task attribute information of the scheduled task; The determining, based on the scheduling data corresponding to each of the scheduling tasks, a scheduling score of each of the scheduling tasks comprises: For the scheduling task whose target task category is the first task category, obtaining a scheduling score for the scheduling task based on the task application time and the first weight coefficient, and the task deadline remaining time and the second weight coefficient of the scheduling task; For the scheduling task whose target task category is the second task category, the scheduling score of the scheduling task is determined based on the task application time and the third weight coefficient, the task deadline remaining time and the fourth weight coefficient, and the task completion degree and the fifth weight coefficient.
5. The method according to claim 4, characterized in that The step of obtaining a scheduling score of the scheduling task based on the task application time and the first weight coefficient, and the task deadline remaining time and the second weight coefficient of the scheduling task includes: For each scheduled task whose target task category is the first task category, determine a minimum task application time and a maximum task application time based on the task application time of each scheduled task, and determine a minimum task deadline remaining time and a maximum task deadline remaining time based on the task deadline remaining time of each scheduled task; Based on the minimum task application time and the maximum task application time, scaling the task application time of the scheduled task to obtain the scaled task application time; Based on the minimum task deadline remaining time and the maximum task deadline remaining time, scaling the task deadline remaining time of the scheduled task to obtain the scaled task deadline remaining time; The scaled task application time and the first weight coefficient corresponding to the scheduled task, and the scaled task deadline remaining time and the second weight coefficient are weighted summed to obtain a scheduling score for the scheduled task.
6. The method according to claim 1, characterized in that The scheduling attribute information includes the server type requested to be used when the scheduling task is executed, and the computing resources required for the scheduling task; The step of determining a scheduling server matching each of the scheduling tasks from a plurality of server clusters in the interactive environment based on the scheduling attribute information of each of the scheduling tasks includes: For each of the scheduling tasks, based on the server type requested to be used when the scheduling task is executed, determining multiple candidate servers matching the server type corresponding to the scheduling task from multiple server clusters in the interactive environment; Obtaining available resource information of each of the candidate servers; Based on the matching result of the computing resources required by the scheduling task and the available resource information of each of the candidate servers, a scheduling server matching the scheduling task is determined from each of the candidate servers.
7. A task scheduling device, characterized in that: The device comprises: An information acquisition module, used to acquire a scheduling request from an interactive environment, wherein the scheduling request includes task attribute information and scheduling attribute information of each of a plurality of scheduling tasks; A determination module, used to determine the target task category to which each of the scheduled tasks belongs according to the scheduling attribute information; A processing module, used to determine the scheduling priority of each of the scheduled tasks based on the target task category and task attribute information of each of the scheduled tasks; A selection module, configured to determine a scheduling server matching each of the scheduling tasks from a plurality of server clusters in the interactive environment based on the scheduling attribute information of each of the scheduling tasks; The calling module is used to call the scheduling server corresponding to the scheduling task to process the scheduling task according to the scheduling priority of each scheduling task.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.