Task processing method, device and system, computer equipment, storage medium and computer program product

By predicting the future resource state of the resource scheduler in the resource manager and optimizing the task processing order, the problem of low resource utilization in traditional technologies is solved, and more efficient resource utilization is achieved.

CN119806765APending Publication Date: 2025-04-11CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +2
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411741455.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When the resources of the computing power network are limited, the traditional first-in-first-out task processing method leads to a low resource utilization rate and resources are prone to idle state.

Method used

By applying a task processing method in the resource manager, using the resource usage information of the preset time period sent by the resource scheduler, predict the resource status of the future time period, and determine the target task scheduling result based on the resource status, the task information of the current pending task in the first cache queue, and the queue information of the second cache queue, thereby optimizing the task processing order.

Benefits of technology

This improves resource utilization, avoids the occurrence of resource idle state, and ensures that tasks can be processed in an order that is more in line with the actual resource status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806765A_ABST
    Figure CN119806765A_ABST
Patent Text Reader

Abstract

The invention relates to a task processing method, device and system, computer equipment, a storage medium and a computer program product. The method comprises the steps of predicting a resource state of a resource scheduler in a future time period according to resource use information of a preset time period sent by the resource scheduler; determining a target task scheduling result according to the resource state, task information of a current to-be-processed task in a first cache queue in the resource scheduler and queue information of a second cache queue in the resource scheduler; the current to-be-processed task represents a head task in the to-be-processed tasks stored in the first cache queue; the target task scheduling result represents a task scheduling result of the first cache queue and / or the second cache queue; and sending the target task scheduling result to a resource scheduler, so that the resource scheduler performs corresponding task processing according to the target task scheduling result. By adopting the method, the resource utilization rate can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a task processing method, apparatus, system, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] At present, given the limited resources of the computing network, it is crucial to efficiently process computing tasks.

[0003] In traditional technology, the first-in-first-out method is generally used in the process of processing computing tasks; however, this method only considers the order in which tasks arrive, which can easily lead to idle resources, resulting in low resource utilization. Summary of the invention

[0004] Based on this, it is necessary to provide a task processing method, apparatus, system, computer equipment, computer-readable storage medium and computer program product that can improve resource utilization in response to the above technical problems.

[0005] In a first aspect, the present application provides a task processing method, which is applied to a resource manager, comprising:

[0006] Predicting the resource status of the resource scheduler in a future time period according to the resource usage information of the preset time period sent by the resource scheduler;

[0007] Determine a target task scheduling result according to the resource state, task information of a current task to be processed in the first cache queue in the resource scheduler, and queue information of a second cache queue in the resource scheduler; the current task to be processed represents a head task among the tasks to be processed stored in the first cache queue; the target task scheduling result represents a task scheduling result of the first cache queue and / or the second cache queue;

[0008] The target task scheduling result is sent to the resource scheduler, so that the resource scheduler performs corresponding task processing according to the target task scheduling result.

[0009] In one of the embodiments, determining the target task scheduling result according to the resource state, the task information of the current to-be-processed task in the first cache queue in the resource scheduler, and the queue information of the second cache queue in the resource scheduler includes:

[0010] Extracting the task type of the current task to be processed from the task information of the current task to be processed in the first cache queue in the resource scheduler;

[0011] The target task scheduling result is determined according to the resource state, the task type of the current task to be processed, and the queue information of the second cache queue in the resource scheduler.

[0012] In one of the embodiments, determining the target task scheduling result according to the resource state, the task type of the current task to be processed, and the queue information of the second cache queue in the resource scheduler includes:

[0013] When the queue information is empty, obtaining a first corresponding relationship between a resource state, a first task type, and a task scheduling result;

[0014] The first corresponding relationship is queried to obtain a first task scheduling result corresponding to the resource status and the task type of the current task to be processed as the target task scheduling result.

[0015] In one of the embodiments, determining the target task scheduling result according to the resource state, the task type of the current task to be processed, and the queue information of the second cache queue in the resource scheduler includes:

[0016] When the queue information is not empty, obtaining the task type of the head task in the second cache queue, and obtaining a second corresponding relationship between the resource state, the first task type, the second task type and the task scheduling result;

[0017] The second corresponding relationship is queried to obtain a second task scheduling result corresponding to the resource status, the task type of the current task to be processed, and the task type of the head task in the second cache queue as the target task scheduling result.

[0018] In one of the embodiments, before determining the target task scheduling result according to the resource state, the task information of the current to-be-processed task in the first cache queue in the resource scheduler, and the queue information of the second cache queue in the resource scheduler, the method further includes:

[0019] Receiving tasks to be processed and task information of the tasks to be processed sent by the terminal;

[0020] Determining the storage order of the tasks to be processed in the first cache queue according to the task information of the tasks to be processed;

[0021] The to-be-processed tasks are stored in the first cache queue according to the storage order.

[0022] In one embodiment, after sending the target task scheduling result to the resource scheduler so that the resource scheduler performs corresponding task processing according to the target task scheduling result, the method further includes:

[0023] Receiving a task processing result corresponding to the target task scheduling result sent by the resource scheduler;

[0024] The task processing result is sent to a target platform associated with the resource manager, so that the target platform displays the task processing result.

[0025] In a second aspect, the present application provides a task processing method, which is applied to a resource scheduler, comprising:

[0026] The resource usage information of a preset time period is sent to the resource manager, so that the resource manager predicts the resource status of the resource scheduler in the future time period according to the resource usage information, and determines the target task scheduling result according to the resource status, the task information of the current pending task in the first cache queue in the resource scheduler, and the queue information of the second cache queue in the resource scheduler; the current pending task represents the head task among the pending tasks stored in the first cache queue; the target task scheduling result represents the task scheduling result of the first cache queue and / or the second cache queue;

[0027] According to the target task scheduling result returned by the resource manager, corresponding task processing is performed.

[0028] In one embodiment, before sending the resource usage information of the preset time period to the resource manager, the method further includes:

[0029] Obtaining resource usage information of the resource scheduler in a historical time period;

[0030] Predicting resource usage information of the resource scheduler in the future time period based on the resource usage information of the resource scheduler in the historical time period;

[0031] The resource usage information of the preset time period is obtained according to the resource usage information of the resource scheduler in the historical time period and the resource usage information in the future time period.

[0032] In a third aspect, the present application further provides a task processing device, applied to a resource manager, comprising:

[0033] A state prediction module, used to predict the resource state of the resource scheduler in a future time period according to the resource usage information of the preset time period sent by the resource scheduler;

[0034] A result determination module is used to determine a target task scheduling result according to the resource state, task information of a current task to be processed in a first cache queue in the resource scheduler, and queue information of a second cache queue in the resource scheduler; the current task to be processed represents a head task among the tasks to be processed stored in the first cache queue; the target task scheduling result represents a task scheduling result of the first cache queue and / or the second cache queue;

[0035] The result sending module is used to send the target task scheduling result to the resource scheduler, so that the resource scheduler performs corresponding task processing according to the target task scheduling result.

[0036] In a fourth aspect, the present application further provides a task processing device, applied to a resource scheduler, comprising:

[0037] An information sending module, used to send resource usage information of a preset time period to a resource manager, so that the resource manager predicts the resource status of the resource scheduler in a future time period according to the resource usage information, and determines a target task scheduling result according to the resource status, task information of a current task to be processed in a first cache queue in the resource scheduler, and queue information of a second cache queue in the resource scheduler; the current task to be processed represents a head task among the tasks to be processed stored in the first cache queue; the target task scheduling result represents a task scheduling result of the first cache queue and / or the second cache queue;

[0038] The task processing module is used to perform corresponding task processing according to the target task scheduling result returned by the resource manager.

[0039] In a fifth aspect, the present application further provides a task processing system, the system comprising: a resource manager and a resource scheduler;

[0040] The resource scheduler is used to send resource usage information of a preset time period to the resource manager;

[0041] The resource manager is used to predict the resource status of the resource scheduler in a future time period according to the resource usage information, determine the target task scheduling result according to the resource status, the task information of the current pending task in the first cache queue in the resource scheduler, and the queue information of the second cache queue in the resource scheduler, and send the target task scheduling result to the resource scheduler; the current pending task represents the head task among the pending tasks stored in the first cache queue; the target task scheduling result represents the task scheduling result of the first cache queue and / or the second cache queue;

[0042] The resource scheduler is further used to perform corresponding task processing according to the target task scheduling result.

[0043] In a sixth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0044] Predicting the resource status of the resource scheduler in a future time period according to the resource usage information of the preset time period sent by the resource scheduler;

[0045] Determine a target task scheduling result according to the resource state, task information of a current task to be processed in the first cache queue in the resource scheduler, and queue information of a second cache queue in the resource scheduler; the current task to be processed represents a head task among the tasks to be processed stored in the first cache queue; the target task scheduling result represents a task scheduling result of the first cache queue and / or the second cache queue;

[0046] The target task scheduling result is sent to the resource scheduler, so that the resource scheduler performs corresponding task processing according to the target task scheduling result.

[0047] In a seventh aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0048] Predicting the resource status of the resource scheduler in a future time period according to the resource usage information of the preset time period sent by the resource scheduler;

[0049] Determine a target task scheduling result according to the resource state, task information of a current task to be processed in the first cache queue in the resource scheduler, and queue information of a second cache queue in the resource scheduler; the current task to be processed represents a head task among the tasks to be processed stored in the first cache queue; the target task scheduling result represents a task scheduling result of the first cache queue and / or the second cache queue;

[0050] The target task scheduling result is sent to the resource scheduler, so that the resource scheduler performs corresponding task processing according to the target task scheduling result.

[0051] In an eighth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0052] Predicting the resource status of the resource scheduler in a future time period according to the resource usage information of the preset time period sent by the resource scheduler;

[0053] Determine a target task scheduling result according to the resource state, task information of a current task to be processed in the first cache queue in the resource scheduler, and queue information of a second cache queue in the resource scheduler; the current task to be processed represents a head task among the tasks to be processed stored in the first cache queue; the target task scheduling result represents a task scheduling result of the first cache queue and / or the second cache queue;

[0054] The target task scheduling result is sent to the resource scheduler, so that the resource scheduler performs corresponding task processing according to the target task scheduling result.

[0055] The above-mentioned task processing method, device, system, computer equipment, storage medium and computer program product first predict the resource status of the resource scheduler in the future time period based on the resource usage information of the preset time period sent by the resource scheduler, and then use the head task among the pending tasks stored in the first cache queue as the current pending task in the first cache queue in the resource scheduler. Then, based on the resource status, task information of the current pending task and queue information of the second cache queue in the resource scheduler, determine the target task scheduling result. Finally, send the target task scheduling result to the resource scheduler, so that the resource scheduler performs corresponding task processing according to the target task scheduling result. In this way, in the process of processing computing tasks, the resource status of the resource scheduler in the future time period obtained by comprehensive prediction, the task information of the current pending tasks in the first cache queue in the resource scheduler, and the queue information of the second cache queue can accurately determine the target task scheduling result corresponding to the cache queue, so that the tasks in the cache queue can be processed in an order that is more in line with the actual resource status, which is conducive to making full use of the resources in the resource scheduler, thereby improving resource utilization; moreover, this method avoids the defect that the traditional technology uses a first-in-first-out method that only considers the order of arrival of tasks, which easily leads to idle resources and thus leads to low resource utilization, thereby further improving resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0057] Figure 1 An application environment diagram of a task processing method in an embodiment;

[0058] Figure 2 is a flowchart of a task processing method in one embodiment;

[0059] Figure 3 A flowchart of the steps of determining a target task scheduling result in one embodiment;

[0060] Figure 4 A flowchart of the steps of determining a target task scheduling result in another embodiment;

[0061] Figure 5 is a flowchart of a task processing method in another embodiment;

[0062] Figure 6 is a flowchart of a task processing method in yet another embodiment;

[0063] Figure 7 A schematic diagram of a flow chart of an idle time resource scheduling method based on optimizing FIFO in one embodiment;

[0064] Figure 8 A schematic diagram of an idle time resource scheduling system architecture based on optimized FIFO in one embodiment;

[0065] Fig. 9 is a structural block diagram of a task processing device in one embodiment;

[0066] Fig.10 is a structural block diagram of a task processing device in another embodiment;

[0067] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

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

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

[0070] In traditional technology, FIFO (First In First Out) queues are generally used to process computing tasks. The FIFO queue adopts the FIFO strategy, that is, scheduling and processing tasks in the order in which they arrive; however, under the FIFO strategy, if the resources required for the task, such as CPU (Central Processing Unit) time, memory, etc., are not evenly distributed, or the execution time of the task varies greatly, then the resources may be idle. For example, if a long task arrives and is processed first, it may occupy resources for a long time, causing the subsequent short tasks to idle resources while waiting (although these resources are busy for the long task currently being executed, from the perspective of overall system resource utilization, other unused resources are idle), resulting in low resource utilization. Therefore, the present application provides a task processing method that can solve the problem of low resource utilization and achieve the effect of improving resource utilization.

[0071] The task processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown in FIG. 1 , the resource scheduler 102 communicates with the resource manager 104 via a network. Specifically, refer to Figure 1 , the resource scheduler 102 sends the resource usage information of the preset time period to the resource manager 104; the resource manager 104 predicts the resource status of the resource scheduler 102 in the future time period based on the resource usage information, determines the target task scheduling result based on the resource status, the task information of the current pending task in the first cache queue in the resource scheduler 102, and the queue information of the second cache queue in the resource scheduler 102, and sends the target task scheduling result to the resource scheduler 102; the current pending task represents the head task among the pending tasks stored in the first cache queue; the target task scheduling result represents the task scheduling result of the first cache queue and / or the second cache queue; the resource scheduler 102 performs corresponding task processing according to the target task scheduling result. Among them, the resource scheduler 102 refers to a server for performing task processing according to the task scheduling result; the resource manager 104 refers to a server for generating task scheduling results; both the resource scheduler 102 and the resource manager 104 can be implemented with an independent server or a server cluster composed of multiple servers.

[0072] In an exemplary embodiment, Figure 2 As shown, a task processing method is provided, which is applied to Figure 1 Taking the resource manager in as an example, in this embodiment, the method includes the following steps:

[0073] Step S201 : predicting the resource status of the resource scheduler in a future time period according to the resource usage information of the preset time period sent by the resource scheduler.

[0074] Among them, the resource scheduler is also called the transmission and computing resource collaborative manager, which is mainly used to coordinate the scheduling of idle transmission and computing resources according to the usage of transmission and computing resources and user computing resource requests, manage the transmission and computing resource schedulers, and reasonably allocate user data transmission and computing resources.

[0075] Among them, the preset time period refers to a pre-set time period, which may include the time period between a historical time point and a future time point, such as the past day to the future day, the past week to the future week, the past month to the future month, etc.

[0076] The resource usage information is used to indicate the resource usage of the resource scheduler, such as the CPU usage rate of the resource scheduler.

[0077] Among them, the resource scheduler includes a transmission resource scheduler and a computing resource scheduler.

[0078] Among them, the transmission resource scheduler is mainly used to obtain the real-time status of transmission resources, predict idle periods, and send the transmission plan for a certain period of time in the future to the resource scheduler, so that users can calculate the transmission scheduling of data.

[0079] Among them, the computing resource scheduler is mainly used to obtain the real-time status of computing resources, predict idle periods, and send the computing plan for a certain period of time in the future to the resource scheduler to facilitate the computing scheduling of user data.

[0080] The future time period may refer to the next day, the next week, the next month, etc.

[0081] Among them, the resource status is used to indicate the idle resource status of the resource scheduler, which is divided into idle and occupied. It should be noted that the resource status includes the transmission resource status and the computing resource status. It should be noted that before executing step S202, when the transmission resource status is idle, the resource scheduler first transmits the data required for the task of transmitting first and then calculating. If there is no task of transmitting first and then calculating, the data of the task of transmitting and calculating is transmitted. For example, if it is predicted that the transmission resources are idle in the middle of the night, the subsequent task can be transmitted to the computing server first, and then the task is executed when the computing resources are idle. Among them, the resource status in step S202 is the computing resource status.

[0082] Exemplarily, the resource manager establishes a network path with the resource scheduler, and receives resource usage information for a preset time period sent by the resource scheduler through the network path; then, the resource manager inputs the resource usage information for the preset time period sent by the resource scheduler into the resource status prediction model, and obtains the predicted resource status for the future time period of the predicted resource scheduler and the predicted probability corresponding to the predicted resource status through the resource status prediction model; then, the resource manager uses the predicted resource status with the largest corresponding prediction probability as the resource status for the future time period of the predicted resource scheduler.

[0083] Step S202, determine the target task scheduling result based on the resource status, the task information of the current pending task in the first cache queue in the resource scheduler, and the queue information of the second cache queue in the resource scheduler; the current pending task represents the head task among the pending tasks stored in the first cache queue; the target task scheduling result represents the task scheduling result of the first cache queue and / or the second cache queue.

[0084] The first cache queue refers to a FIFO queue.

[0085] The current task to be processed is used to represent the head task among the tasks to be processed stored in the first cache queue.

[0086] Among them, pending tasks refer to all tasks that need to be processed.

[0087] The head task refers to the task that needs to be processed currently.

[0088] Among them, the task information includes data volume, calculation method, priority and other information.

[0089] The second cache queue is a queue used to temporarily store tasks. It should be noted that the second cache queue is also called a temporary queue.

[0090] The queue information is used to indicate the queue status of the second cache queue, including whether it is empty or not empty.

[0091] The target task scheduling result is used to represent the task scheduling result of the first cache queue and / or the second cache queue, and may refer to the task scheduling result of the first cache queue or the second cache queue, or may refer to the task scheduling result of the first cache queue and the second cache queue.

[0092] Exemplarily, the resource manager uses the head task among the pending tasks stored in the first cache queue in the resource scheduler as the current pending task in the first cache queue in the resource scheduler; then, the resource manager obtains the task information of the current pending task in the first cache queue in the resource scheduler, and the queue information of the second cache queue in the resource scheduler, and determines the task scheduling result corresponding to the resource status, the task information of the current pending task and the queue information of the second cache queue according to the resource status, the task information of the current pending task in the first cache queue in the resource scheduler and the queue information of the second cache queue in the resource scheduler as the target task scheduling result.

[0093] Step S203: Send the target task scheduling result to the resource scheduler, so that the resource scheduler performs corresponding task processing according to the target task scheduling result.

[0094] Exemplarily, the resource manager sends the target task scheduling result to the resource scheduler through the network path between the resource manager and the resource scheduler; the resource scheduler receives the target task scheduling result sent by the resource manager, and performs corresponding task processing according to the target task scheduling result; for example, when the target task scheduling result is the task scheduling result of the first cache queue, the resource scheduler performs task processing on the head task in the first cache queue; when the target task scheduling result is the task scheduling result of the second cache queue, the resource scheduler performs task processing on the head task in the second cache queue; when the target task scheduling result is the task scheduling result of the first cache queue and the second cache queue, the resource scheduler performs task processing on the head tasks in the first cache queue and the second cache queue respectively.

[0095] In the above-mentioned task processing method, the resource status of the resource scheduler in the future time period is first predicted based on the resource usage information of the preset time period sent by the resource scheduler, and then the head task among the pending tasks stored in the first cache queue is used as the current pending task in the first cache queue in the resource scheduler. Then, based on the resource status, the task information of the current pending task and the queue information of the second cache queue in the resource scheduler, the target task scheduling result is determined. Finally, the target task scheduling result is sent to the resource scheduler, so that the resource scheduler performs corresponding task processing according to the target task scheduling result. In this way, in the process of processing computing tasks, the resource status of the resource scheduler in the future time period obtained by comprehensive prediction, the task information of the current pending tasks in the first cache queue in the resource scheduler, and the queue information of the second cache queue can accurately determine the target task scheduling result corresponding to the cache queue, so that the tasks in the cache queue can be processed in an order that is more in line with the actual resource status, which is conducive to making full use of the resources in the resource scheduler, thereby improving resource utilization; moreover, this method avoids the defect that the traditional technology uses a first-in-first-out method that only considers the order of arrival of tasks, which easily leads to idle resources and thus leads to low resource utilization, thereby further improving resource utilization.

[0096] In an exemplary embodiment, Figure 3 As shown, the above step S202 determines the target task scheduling result according to the resource status, the task information of the current to-be-processed task in the first cache queue in the resource scheduler, and the queue information of the second cache queue in the resource scheduler, and specifically includes the following steps:

[0097] Step S301: extracting the task type of the current task to be processed from the task information of the current task to be processed in the first cache queue in the resource scheduler.

[0098] Step S302: determining a target task scheduling result according to the resource status, the task type of the current task to be processed, and the queue information of the second cache queue in the resource scheduler.

[0099] The task type is also called the calculation method, which includes calculation while transmitting and calculation before transmitting.

[0100] Exemplarily, the resource manager preprocesses the task information of the current task to be processed in the first cache queue in the resource scheduler to obtain the preprocessed task information; then, the resource manager extracts the task type in the preprocessed task information as the task type of the current task to be processed; then, the resource manager determines the task scheduling result corresponding to the resource status, the task type of the current task to be processed and the queue information of the second cache queue in the resource scheduler based on the resource status, the task type of the current task to be processed and the queue information of the second cache queue in the resource scheduler as the target task scheduling result.

[0101] In this embodiment, the target task scheduling result is determined by extracting the task type of the current task to be processed and combining the resource status and the queue information of the second cache queue, so that accurate resource allocation can be performed according to the characteristics of different task types and actual resource conditions, thereby avoiding allocating too many resources to tasks that do not require so many resources, effectively preventing resource waste.

[0102] In an exemplary embodiment, the above step S302 determines the target task scheduling result based on the resource status, the task type of the current task to be processed and the queue information of the second cache queue in the resource scheduler, and specifically includes the following contents: when the queue information is empty, obtain the first correspondence between the resource status, the first task type and the task scheduling result; query the first correspondence to obtain the first task scheduling result corresponding to the resource status and the task type of the current task to be processed as the target task scheduling result.

[0103] The first task type refers to the task type corresponding to the current to-be-processed task in the first cache queue in the resource scheduler.

[0104] The first corresponding relationship is used to represent the corresponding relationship between the resource state, the first task type and the task scheduling result.

[0105] The first task scheduling result is used to represent the task scheduling result corresponding to the resource status and the task type of the current task to be processed.

[0106] Exemplarily, when the queue information is empty, the resource manager obtains the correspondence between the resource status, the first task type and the task scheduling result as the first correspondence; then, the resource manager queries the first correspondence according to the resource status and the task type of the current task to be processed, obtains the first task scheduling result corresponding to the resource status and the task type of the current task to be processed, and uses the first task scheduling result as the target task scheduling result.

[0107] For example, see Figure 4, when the temporary queue is empty, the resource manager judges the resource status and the task type of the current pending task; when the resource status is idle and the task type of the current pending task is transfer before calculation, the first task scheduling result is to move the current pending task to the temporary queue; when the resource status is occupied and the task type of the current pending task is transfer and calculation, the first task scheduling result is to move the current pending task to the temporary queue; when the resource status is idle and the task type of the current pending task is transfer and calculation, the first task scheduling result is to execute the current pending task in the FIFO queue; when the resource status is occupied and the task type of the current pending task is transfer before calculation, the first task scheduling result is to execute the current pending task in the FIFO queue.

[0108] In this embodiment, when the queue information is empty, the first correspondence between the resource status, the first task type and the task scheduling result is directly obtained, and the target task scheduling result is obtained by querying accordingly, so that the scheduling plan for the current task to be processed can be quickly determined, which is conducive to improving the efficiency of task processing.

[0109] In an exemplary embodiment, the above step S302 determines the target task scheduling result based on the resource status, the task type of the current task to be processed and the queue information of the second cache queue in the resource scheduler, and specifically includes the following contents: when the queue information is not empty, obtain the task type of the head task in the second cache queue, and obtain the second correspondence between the resource status, the first task type, the second task type and the task scheduling result; query the second correspondence to obtain the second task scheduling result corresponding to the resource status, the task type of the current task to be processed and the task type of the head task in the second cache queue as the target task scheduling result.

[0110] The second task type refers to the task type of the head task in the second cache queue.

[0111] The second corresponding relationship is used to represent the corresponding relationship between the resource state, the first task type, the second task type and the task scheduling result.

[0112] The second task scheduling result is used to represent the task scheduling result corresponding to the resource state, the task type of the current task to be processed, and the task type of the head task in the second cache queue.

[0113] Exemplarily, when the queue information is not empty, the resource manager obtains the task type of the head task in the second cache queue; then, the resource manager obtains the correspondence between the resource status, the first task type, the second task type and the task scheduling result as the second correspondence; then, the resource manager queries the second correspondence according to the resource status, the task type of the current task to be processed and the task type of the head task in the second cache queue, and obtains the second task scheduling result corresponding to the resource status, the task type of the current task to be processed and the task type of the head task in the second cache queue as the target task scheduling result.

[0114] For example, see Figure 4 , when the temporary queue is not empty, the resource manager judges the resource status, the task type of the current task to be processed, and the task type of the head task in the second cache queue; when the resource status is idle, and there is transfer and calculation in the task type of the current task to be processed and the task type of the head task in the second cache queue, the second task scheduling result is to give priority to the head task of the FIFO queue and the temporary queue that transfers and calculates; when the resource status is idle, and there is no transfer and calculation in the task type of the current task to be processed and the task type of the head task in the second cache queue, the second task scheduling result is to give priority to the head task of the temporary queue; when the resource status is occupied, and there is transfer before calculation in the task type of the current task to be processed and the task type of the head task in the second cache queue, the second task scheduling result is to give priority to the head task of the FIFO queue and the temporary queue that transfers before calculation; when the resource status is occupied, and there is no transfer before calculation in the task type of the current task to be processed and the task type of the head task in the second cache queue, the second task scheduling result is to give priority to the head task of the temporary queue.

[0115] In this embodiment, when the queue information is not empty, through this multi-factor consideration approach, limited resources can be reasonably allocated to different types of tasks according to actual conditions, thereby achieving more accurate resource and task adaptation, thereby avoiding resource waste or obstruction of task processing due to insufficient resources.

[0116] In an exemplary embodiment, the above-mentioned step S202, before determining the target task scheduling result according to the resource status, the task information of the current pending tasks in the first cache queue in the resource scheduler, and the queue information of the second cache queue in the resource scheduler, specifically includes the following contents: receiving the pending tasks sent by the terminal and the task information of the pending tasks; determining the storage order of the pending tasks in the first cache queue according to the task information of the pending tasks; and storing the pending tasks in the first cache queue according to the storage order.

[0117] The storage order refers to the cache order of the tasks to be processed in the first cache queue.

[0118] Exemplarily, the resource manager receives the pending tasks and task information of the pending tasks sent by the terminal through the network path between the terminal; then, the resource manager extracts the data volume and priority of the pending tasks from the task information of the pending tasks; then, the resource manager queries the correspondence between the data volume, priority and storage order according to the data volume and priority of the pending tasks, and obtains the storage order corresponding to the data volume and priority of the pending tasks as the storage order of the pending tasks in the first cache queue; then, the resource manager stores the pending tasks in the first cache queue according to the storage order.

[0119] For example, when the priority corresponding to the pending task is priority processing, the pending task is placed at the front position in the first cache queue; if there are corresponding pending tasks with the same priority, they are sorted from small to large according to the data volume of the pending tasks to obtain the storage order of the pending tasks in the first cache queue.

[0120] In this embodiment, by determining the storage order of the tasks to be processed in the first cache queue according to their task information and storing the tasks in the order, the first cache queue can be constructed in advance, thereby providing a data basis for subsequent target task scheduling results.

[0121] In an exemplary embodiment, the above step S203, after sending the target task scheduling result to the resource scheduler so that the resource scheduler performs corresponding task processing according to the target task scheduling result, specifically includes the following contents: receiving the task processing result corresponding to the target task scheduling result sent by the resource scheduler; sending the task processing result to the target platform associated with the resource manager so that the target platform displays the task processing result.

[0122] Among them, the task processing result is used to indicate the execution status corresponding to the target task scheduling result, such as the transmission completion rate, whether the calculation is completed, etc.

[0123] The target platform refers to the CPN (Computing Power Network) computing power trading platform. It should be noted that the resource scheduler is deployed in the CPN computing power trading platform.

[0124] Exemplarily, the resource manager receives the task processing results corresponding to the target task scheduling results sent by the resource scheduler through the network path between the resource manager and the resource scheduler; then, the resource manager extracts the key task processing results from the task processing results; then, the resource manager sends the key task processing results to the CPN computing power trading platform associated with the resource manager, so that the CPN computing power trading platform displays the key task processing results.

[0125] In this embodiment, by quickly and accurately sending the task processing results to the target platform for display, the relevant personnel or systems can obtain the latest task processing status in the first time, avoiding problems such as decision-making delays or poor user experience due to delayed information transmission, thereby enabling decisions to be based on the latest and most accurate business data, which is conducive to improving the scientificity and rationality of decisions.

[0126] In an exemplary embodiment, Figure 5 As shown, the present application also provides another task processing method, which is applied to Figure 1 The resource scheduler in the example is used to illustrate the following:

[0127] Step S501, sending the resource usage information of the preset time period to the resource manager, so that the resource manager predicts the resource status of the resource scheduler in the future time period based on the resource usage information, and determines the target task scheduling result according to the resource status, the task information of the current pending task in the first cache queue in the resource scheduler, and the queue information of the second cache queue in the resource scheduler; the current pending task represents the head task among the pending tasks stored in the first cache queue; the target task scheduling result represents the task scheduling result of the first cache queue and / or the second cache queue.

[0128] Step S502: Perform corresponding task processing according to the target task scheduling result returned by the resource manager.

[0129] Exemplarily, the resource scheduler obtains resource usage information for a preset time period, and sends the resource usage information for the preset time period to the resource manager; then, the resource manager inputs the resource usage information for the preset time period sent by the resource scheduler into the resource state prediction model, and obtains the predicted resource state for the future time period of the predicted resource scheduler and the predicted probability corresponding to the predicted resource state through the resource state prediction model; then, the resource manager uses the predicted resource state with the largest corresponding predicted probability as the resource state for the future time period of the predicted resource scheduler; then, the resource manager uses the head task among the pending tasks stored in the first cache queue in the resource scheduler as the current pending task in the first cache queue in the resource scheduler; then, the resource manager obtains the task information of the current pending task in the first cache queue in the resource scheduler, and the queue information of the second cache queue in the resource scheduler, and according to the resource state, the first cache queue in the resource scheduler, The task information of the current task to be processed and the queue information of the second cache queue in the resource scheduler are used to determine the task scheduling result corresponding to the resource status, the task information of the current task to be processed and the queue information of the second cache queue as the target task scheduling result, and the target task scheduling result is sent to the resource scheduler; then, the resource scheduler receives the target task scheduling result sent by the resource manager, and performs corresponding task processing according to the target task scheduling result; for example, when the target task scheduling result is the task scheduling result of the first cache queue, the resource scheduler performs task processing on the head task in the first cache queue; when the target task scheduling result is the task scheduling result of the second cache queue, the resource scheduler performs task processing on the head task in the second cache queue; when the target task scheduling result is the task scheduling result of the first cache queue and the second cache queue, the resource scheduler performs task processing on the head tasks in the first cache queue and the second cache queue respectively.

[0130] It should be noted that, for specific limitations of the above steps, reference may be made to the relevant embodiments of steps S201 to S203, which will not be described in detail here.

[0131] In this embodiment, in the process of processing computing tasks, the resource status of the resource scheduler in the future time period obtained by comprehensive prediction, the task information of the current task to be processed in the first cache queue in the resource scheduler, and the queue information of the second cache queue can accurately determine the target task scheduling result corresponding to the cache queue, so that the tasks in the cache queue can be processed in an order that is more in line with the actual resource status, which is conducive to making full use of the resources in the resource scheduler, thereby improving resource utilization; moreover, this method avoids the defect that the traditional technology adopts the first-in-first-out method to only consider the order of arrival of tasks, which easily leads to idle resources and thus leads to low resource utilization, thereby further improving resource utilization.

[0132] In an exemplary embodiment, the above-mentioned step S501, before sending the resource usage information of the preset time period to the resource manager, specifically includes the following contents: obtaining the resource usage information of the resource scheduler in the historical time period; predicting the resource usage information of the resource scheduler in the future time period based on the resource usage information of the resource scheduler in the historical time period; obtaining the resource usage information of the preset time period based on the resource usage information of the resource scheduler in the historical time period and the resource usage information in the future time period.

[0133] Herein, the historical time period may refer to the past day, the past week, the past month, etc.

[0134] Exemplarily, the resource scheduler obtains the resource usage information of the resource scheduler in the historical time period from the database; then, the resource scheduler inputs the resource usage information of the resource scheduler in the historical time period into the resource usage information prediction model, and predicts the resource usage information of the resource scheduler in the future time period through the resource usage information prediction model; then, the resource scheduler obtains the resource usage information of the resource scheduler in the current time period, and combines the resource usage information of the resource scheduler in the current time period, the resource usage information in the historical time period, and the resource usage information in the future time period to obtain the resource usage information of the preset time period.

[0135] It should be noted that the resource usage information prediction model refers to a network model that can predict the resource usage information of the resource scheduler in the future time period, such as the ARIMA (AutoRegressive Integrated Moving AverageModel) model, the hidden Markov model, etc.

[0136] In this embodiment, by obtaining resource usage information for historical time periods and using it to predict resource usage information for future time periods, and then obtaining resource usage information for preset time periods, a comprehensive and accurate resource usage trend reference can be provided for the task scheduling process of the resource manager, providing a data basis for subsequent processes.

[0137] In an exemplary embodiment, Figure 6 As shown, another task processing method is provided, which is applied to Figure 1 The resource manager in the example is used to illustrate the following steps:

[0138] Step S601: predicting the resource status of the resource scheduler in a future time period according to the resource usage information of the preset time period sent by the resource scheduler.

[0139] Step S602, receiving the pending tasks and task information of the pending tasks sent by the terminal; determining the storage order of the pending tasks in the first cache queue according to the task information of the pending tasks; and storing the pending tasks in the first cache queue according to the storage order.

[0140] Step S603: extracting the task type of the current task to be processed from the task information of the current task to be processed in the first cache queue in the resource scheduler; the current task to be processed represents the head task among the tasks to be processed stored in the first cache queue.

[0141] Step S604: when the queue information is empty, obtain a first corresponding relationship between the resource state, the first task type and the task scheduling result.

[0142] Step S605, query the first corresponding relationship, obtain the first task scheduling result corresponding to the resource status and the task type of the current task to be processed, as the target task scheduling result; the target task scheduling result represents the task scheduling result of the first cache queue and / or the second cache queue.

[0143] Step S606, when the queue information is not empty, obtain the task type of the head task in the second cache queue, and obtain the second corresponding relationship between the resource state, the first task type, the second task type and the task scheduling result.

[0144] Step S607, query the second corresponding relationship, and obtain the second task scheduling result corresponding to the resource status, the task type of the current task to be processed, and the task type of the head task in the second cache queue as the target task scheduling result; the target task scheduling result represents the task scheduling result of the first cache queue and / or the second cache queue.

[0145] Step S608: Send the target task scheduling result to the resource scheduler, so that the resource scheduler performs corresponding task processing according to the target task scheduling result.

[0146] In the above-mentioned task processing method, in the process of processing the computing task, the resource status of the resource scheduler in the future time period obtained by comprehensive prediction, the task information of the current task to be processed in the first cache queue in the resource scheduler, and the queue information of the second cache queue can accurately determine the target task scheduling result corresponding to the cache queue, so that the tasks in the cache queue can be processed in an order that is more in line with the actual resource status, which is conducive to making full use of the resources in the resource scheduler, thereby improving resource utilization; moreover, this method avoids the defect that the traditional technology adopts the first-in-first-out method that only considers the order of arrival of tasks, which easily leads to idle resources and thus leads to low resource utilization, thereby further improving resource utilization.

[0147] In an exemplary embodiment, in order to more clearly illustrate the task processing method provided by the embodiment of the present application, the task processing method is specifically described below with a specific embodiment. Figure 7 As shown, the present application also provides an idle time resource scheduling method based on optimized FIFO. In the process of processing computing tasks, the resource status of the resource scheduler in the future time period is predicted based on the resource usage information of the preset time period sent by the resource scheduler, and then the head task of the pending tasks stored in the first cache queue is used as the current pending task in the first cache queue in the resource scheduler. Then, according to the resource status, the task information of the current pending task and the queue information of the second cache queue in the resource scheduler, the target task scheduling result is determined. Finally, the target task scheduling result is sent to the resource scheduler, so that the resource scheduler performs corresponding task processing according to the target task scheduling result. Specifically including the following contents:

[0148] 1. Coordinated scheduling of idle transmission and computing resources in computing power network:

[0149] Users send computing tasks and data requests to the transmission computing resource collaborative manager through the computing power trading platform. The collaborative manager analyzes the data size and obtains the usage of transmission and computing resources in a certain period of time in the future through the transmission resource scheduler and computing resource scheduler. It also schedules data transmission and allocates computing tasks based on resource conditions. User task transmission computing scheduling includes the following five steps: Figure 7 shown.

[0150] (1) The transmission computing resource collaborative manager first analyzes the user request, including parameters such as data size, calculation method, priority, etc. Some parameters are used to optimize the FIFO algorithm. According to the algorithm scheduling results, it is added to the task queue.

[0151] (2) The transport / computing resource scheduler sends recent resource usage to the collaborative manager and makes a simple prediction of future resource usage.

[0152] (3) The collaborative manager predicts future resource idle time based on resource usage and schedules tasks in the task queue according to the idle resource situation.

[0153] (4) The task scheduling results are sent to the resource scheduler, which can execute tasks based on the task type (transmit and calculate at the same time, transmit first and then calculate).

[0154] (5) Through the collaborative manager module, the task execution results are displayed on the computing power trading platform, such as the transmission completion rate, whether the calculation is completed, etc.

[0155] 2. Optimize FIFO scheduling method:

[0156] This embodiment designs two cache queues, one for FIFO-based caching of user task requests, and the other for temporary storage of task requests. If the task currently to be executed requires transmission before calculation, and the computing resources are in an idle state, the task can be temporarily stored in the temporary cache area, and the task of transmission and calculation is executed first. When the computing resources are in an occupied state, the task of transmission before calculation is executed. The task scheduling principles are as follows:

[0157] (1) If the computing resources are idle and the temporary queue is not empty, the computing tasks that are performed while transmitting and calculating in the two queue head tasks will be executed first.

[0158] (2) If the computing resources are occupied and the temporary queue is not empty, the computing tasks that are transmitted first and then calculated in the two queue head tasks will be executed first.

[0159] (3) If the temporary queue is empty, the head task in the FIFO queue is transmitted first and then calculated, and the computing resources are idle, then the task is moved to the temporary queue.

[0160] (4) If the temporary queue is empty, the head task in the FIFO queue is a compute-while-transmitting task, and the computing resources are occupied, then the task is moved to the temporary queue.

[0161] (5) If the temporary queue is not empty and does not meet the requirements of (1) and (2) in the optimized FIFO scheduling method, the head task of the temporary queue is executed first.

[0162] (6) If the temporary queue is empty and does not meet the requirements of (3) and (4) in the optimized FIFO scheduling method, the head task of the FIFO queue is executed.

[0163] 3. The computing tasks submitted by the user are directly added to the FIFO queue, and then the tasks in the two queues are scheduled according to the above principles. The scheduling flow chart is as follows: Figure 4 shown.

[0164] 4. Idle time resource scheduling system architecture based on optimized FIFO, such as Figure 8 shown.

[0165] Transmission and computing resource collaborative manager: This module is the current core unit, responsible for collaboratively scheduling idle transmission and computing resources according to the usage of transmission and computing resources and user computing resource requests, managing transmission and computing resource schedulers, and reasonably allocating user data transmission and computing resources.

[0166] Transmission resource scheduler: obtains the real-time status of transmission resources, predicts idle periods, and sends the transmission plan for a certain period of time in the future to the collaborative manager to facilitate users to calculate data transmission scheduling.

[0167] Computing resource scheduler: obtains the real-time status of computing resources, predicts idle periods, and sends computing plans for a certain period of time in the future to the collaborative manager to facilitate computing scheduling of user data.

[0168] Optimized FIFO scheduling algorithm: Programmable FIFO idle resource scheduling algorithm module can schedule resources according to task queue status, priority, etc.

[0169] Transmission / computation task queue: Use FIFO data structure to store tasks to be processed. New tasks are added from the end of the queue, and completed or being processed tasks are removed from the head of the queue.

[0170] In the above-mentioned embodiment, during the process of processing computing tasks, the resource status of the resource scheduler in the future time period obtained by comprehensive prediction, the task information of the current to-be-processed tasks in the first cache queue in the resource scheduler, and the queue information of the second cache queue can accurately determine the target task scheduling result corresponding to the cache queue, thereby enabling the tasks in the cache queue to be processed in an order that is more in line with the actual resource status, which is conducive to making full use of the resources in the resource scheduler, thereby improving resource utilization; moreover, this method avoids the defect that the traditional technology adopts the first-in-first-out method that only considers the order of arrival of tasks, which easily leads to the idle state of resources, thereby resulting in low resource utilization, and further improves resource utilization. At the same time, this embodiment proposes a method and system for scheduling idle resources based on optimized FIFO. The method first deploys a transmission computing resource collaborative manager module on the CPN computing power trading platform to analyze the use of transmission and computing resources in order to reasonably schedule user computing tasks; then, by designing an optimized FIFO scheduling algorithm, a temporary queue is used to cache computing tasks that cannot be executed immediately, thereby improving the overall utilization of computing power network resources; finally, a system architecture for optimizing FIFO idle resource scheduling is designed. The device solves the problem of simultaneous scheduling of transmission and computing resources, improves the overall utilization of computing power networks, reduces user costs, and provides users with more convenient computing power services. This method has a relatively broad application prospect and can be effectively applied in the field of task scheduling.

[0171] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned 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 does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can 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 to be 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.

[0172] Based on the same inventive concept, the embodiment of the present application also provides a task processing device for implementing the task processing 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 processing device embodiments provided below can refer to the limitations on the task processing method above, and will not be repeated here.

[0173] In an exemplary embodiment, Fig. 9As shown, a task processing device is provided, which is applied to a resource manager, including: a state prediction module 901, a result determination module 902 and a result sending module 903, wherein:

[0174] The state prediction module 901 is used to predict the resource state of the resource scheduler in a future time period according to the resource usage information of the preset time period sent by the resource scheduler.

[0175] The result determination module 902 is used to determine the target task scheduling result based on the resource status, the task information of the current pending task in the first cache queue in the resource scheduler, and the queue information of the second cache queue in the resource scheduler; the current pending task represents the head task among the pending tasks stored in the first cache queue; the target task scheduling result represents the task scheduling result of the first cache queue and / or the second cache queue.

[0176] The result sending module 903 is used to send the target task scheduling result to the resource scheduler, so that the resource scheduler performs corresponding task processing according to the target task scheduling result.

[0177] In an exemplary embodiment, the result determination module 902 is also used to extract the task type of the current task to be processed from the task information of the current task to be processed in the first cache queue in the resource scheduler; and determine the target task scheduling result based on the resource status, the task type of the current task to be processed and the queue information of the second cache queue in the resource scheduler.

[0178] In an exemplary embodiment, the result determination module 902 is also used to obtain a first correspondence between the resource status, the first task type and the task scheduling result when the queue information is empty; query the first correspondence to obtain a first task scheduling result corresponding to the resource status and the task type of the current task to be processed as the target task scheduling result.

[0179] In an exemplary embodiment, the result determination module 902 is also used to obtain the task type of the head task in the second cache queue and obtain the second correspondence between the resource status, the first task type, the second task type and the task scheduling result when the queue information is not empty; query the second correspondence to obtain the second task scheduling result corresponding to the resource status, the task type of the current task to be processed, and the task type of the head task in the second cache queue as the target task scheduling result.

[0180] In an exemplary embodiment, the task processing device also includes a task storage module, which is used to receive tasks to be processed and task information of the tasks to be processed sent by the terminal; determine the storage order of the tasks to be processed in the first cache queue according to the task information of the tasks to be processed; and store the tasks to be processed in the first cache queue according to the storage order.

[0181] In an exemplary embodiment, the task processing device also includes a result display module, which is used to receive the task processing result corresponding to the target task scheduling result sent by the resource scheduler; send the task processing result to the target platform associated with the resource manager, so that the target platform displays the task processing result.

[0182] Each module in the above task processing 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.

[0183] In an exemplary embodiment, Fig.10 As shown, another task processing device is provided, which is applied to a resource scheduler, including: an information sending module 1001 and a task processing module 1002, wherein:

[0184] The information sending module 1001 is used to send the resource usage information of the preset time period to the resource manager, so that the resource manager predicts the resource status of the resource scheduler in the future time period according to the resource usage information, and determines the target task scheduling result according to the resource status, the task information of the current pending task in the first cache queue in the resource scheduler, and the queue information of the second cache queue in the resource scheduler; the current pending task represents the head task among the pending tasks stored in the first cache queue; the target task scheduling result represents the task scheduling result of the first cache queue and / or the second cache queue;

[0185] The task processing module 1002 is used to perform corresponding task processing according to the target task scheduling result returned by the resource manager.

[0186] In an exemplary embodiment, the task processing device also includes an information determination module for obtaining resource usage information of the resource scheduler in a historical time period; predicting the resource usage information of the resource scheduler in a future time period based on the resource usage information of the resource scheduler in the historical time period; and obtaining the resource usage information of a preset time period based on the resource usage information of the resource scheduler in the historical time period and the resource usage information in the future time period.

[0187] Each module in the above task processing 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.

[0188] In an exemplary embodiment, referring to Figure 1 , provides a task processing system, the system comprising: a resource manager 104 and a resource scheduler 102;

[0189] The resource scheduler 102 is used to send the resource usage information of the preset time period to the resource manager 104;

[0190] The resource manager 104 is used to predict the resource state of the resource scheduler 102 in the future time period according to the resource usage information, determine the target task scheduling result according to the resource state, the task information of the current pending task in the first cache queue in the resource scheduler 102, and the queue information of the second cache queue in the resource scheduler 102, and send the target task scheduling result to the resource scheduler 102; the current pending task represents the head task among the pending tasks stored in the first cache queue; the target task scheduling result represents the task scheduling result of the first cache queue and / or the second cache queue;

[0191] The resource scheduler 102 is also used to perform corresponding task processing according to the target task scheduling result.

[0192] In the above-mentioned task processing system, in the process of processing computing tasks, the resource status of the resource scheduler in the future time period obtained by comprehensive prediction, the task information of the current task to be processed in the first cache queue in the resource scheduler, and the queue information of the second cache queue can accurately determine the target task scheduling result corresponding to the cache queue, so that the tasks in the cache queue can be processed in an order that is more in line with the actual resource status, which is conducive to making full use of the resources in the resource scheduler, thereby improving resource utilization; moreover, this method avoids the defect that the traditional technology adopts the first-in-first-out method that only considers the order of arrival of tasks, which easily leads to idle resources and thus leads to low resource utilization, thereby further improving resource utilization.

[0193] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.11As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. 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 resource usage information and resource status. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication 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 processing method is implemented.

[0194] Those skilled in the art will understand that Fig.11 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.

[0195] In an exemplary 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-mentioned method embodiments when executing the computer program.

[0196] In an exemplary 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.

[0197] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

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

[0199] The technical features of the above embodiments may be combined arbitrarily. 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.

[0200] 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 processing method, characterized in that: Applied to a resource manager, the method comprises: Predicting the resource status of the resource scheduler in a future time period according to the resource usage information of the preset time period sent by the resource scheduler; Determine a target task scheduling result according to the resource state, task information of a current task to be processed in the first cache queue in the resource scheduler, and queue information of a second cache queue in the resource scheduler; the current task to be processed represents a head task among the tasks to be processed stored in the first cache queue; the target task scheduling result represents a task scheduling result of the first cache queue and / or the second cache queue; The target task scheduling result is sent to the resource scheduler, so that the resource scheduler performs corresponding task processing according to the target task scheduling result.

2. The method according to claim 1, characterized in that: The determining the target task scheduling result according to the resource state, the task information of the current to-be-processed task in the first cache queue in the resource scheduler, and the queue information of the second cache queue in the resource scheduler includes: Extracting the task type of the current task to be processed from the task information of the current task to be processed in the first cache queue in the resource scheduler; The target task scheduling result is determined according to the resource state, the task type of the current task to be processed, and the queue information of the second cache queue in the resource scheduler.

3. The method according to claim 2, characterized in that The determining the target task scheduling result according to the resource state, the task type of the current task to be processed, and the queue information of the second cache queue in the resource scheduler includes: When the queue information is empty, obtaining a first corresponding relationship between a resource state, a first task type, and a task scheduling result; The first corresponding relationship is queried to obtain a first task scheduling result corresponding to the resource status and the task type of the current task to be processed as the target task scheduling result.

4. The method according to claim 2, characterized in that: The determining the target task scheduling result according to the resource state, the task type of the current task to be processed, and the queue information of the second cache queue in the resource scheduler includes: When the queue information is not empty, obtaining the task type of the head task in the second cache queue, and obtaining a second corresponding relationship between the resource state, the first task type, the second task type and the task scheduling result; The second corresponding relationship is queried to obtain a second task scheduling result corresponding to the resource status, the task type of the current task to be processed, and the task type of the head task in the second cache queue as the target task scheduling result.

5. The method according to claim 1, characterized in that Before determining the target task scheduling result according to the resource state, the task information of the current to-be-processed task in the first cache queue in the resource scheduler, and the queue information of the second cache queue in the resource scheduler, the method further includes: Receiving tasks to be processed and task information of the tasks to be processed sent by the terminal; Determining the storage order of the tasks to be processed in the first cache queue according to the task information of the tasks to be processed; The to-be-processed tasks are stored in the first cache queue according to the storage order.

6. The method according to any one of claims 1 to 5, after sending the target task scheduling result to the resource scheduler so that the resource scheduler performs corresponding task processing according to the target task scheduling result, further comprising: Receiving a task processing result corresponding to the target task scheduling result sent by the resource scheduler; The task processing result is sent to a target platform associated with the resource manager, so that the target platform displays the task processing result.

7. A task processing method, characterized in that: Applied to a resource scheduler, the method comprises: The resource usage information of a preset time period is sent to the resource manager, so that the resource manager predicts the resource status of the resource scheduler in the future time period according to the resource usage information, and determines the target task scheduling result according to the resource status, the task information of the current pending task in the first cache queue in the resource scheduler, and the queue information of the second cache queue in the resource scheduler; the current pending task represents the head task among the pending tasks stored in the first cache queue; the target task scheduling result represents the task scheduling result of the first cache queue and / or the second cache queue; According to the target task scheduling result returned by the resource manager, corresponding task processing is performed.

8. The method according to claim 7, characterized in that Before sending the resource usage information of the preset time period to the resource manager, the method further includes: Obtaining resource usage information of the resource scheduler in a historical time period; Predicting resource usage information of the resource scheduler in the future time period based on the resource usage information of the resource scheduler in the historical time period; The resource usage information of the preset time period is obtained according to the resource usage information of the resource scheduler in the historical time period and the resource usage information in the future time period.

9. A task processing device, characterized in that: Applied to a resource manager, the device comprises: A state prediction module, used to predict the resource state of the resource scheduler in a future time period according to the resource usage information of the preset time period sent by the resource scheduler; A result determination module is used to determine a target task scheduling result according to the resource state, task information of a current task to be processed in a first cache queue in the resource scheduler, and queue information of a second cache queue in the resource scheduler; the current task to be processed represents a head task among the tasks to be processed stored in the first cache queue; the target task scheduling result represents a task scheduling result of the first cache queue and / or the second cache queue; The result sending module is used to send the target task scheduling result to the resource scheduler, so that the resource scheduler performs corresponding task processing according to the target task scheduling result.

10. A task processing device, characterized in that: Applied to a resource scheduler, the device comprises: An information sending module, used to send resource usage information of a preset time period to a resource manager, so that the resource manager predicts the resource status of the resource scheduler in a future time period according to the resource usage information, and determines a target task scheduling result according to the resource status, task information of a current task to be processed in a first cache queue in the resource scheduler, and queue information of a second cache queue in the resource scheduler; the current task to be processed represents a head task among the tasks to be processed stored in the first cache queue; the target task scheduling result represents a task scheduling result of the first cache queue and / or the second cache queue; The task processing module is used to perform corresponding task processing according to the target task scheduling result returned by the resource manager.

11. A task processing system, characterized in that: The system includes: a resource manager and a resource scheduler; The resource scheduler is used to send resource usage information of a preset time period to the resource manager; The resource manager is used to predict the resource status of the resource scheduler in a future time period according to the resource usage information, determine the target task scheduling result according to the resource status, the task information of the current pending task in the first cache queue in the resource scheduler, and the queue information of the second cache queue in the resource scheduler, and send the target task scheduling result to the resource scheduler; the current pending task represents the head task among the pending tasks stored in the first cache queue; the target task scheduling result represents the task scheduling result of the first cache queue and / or the second cache queue; The resource scheduler is further used to perform corresponding task processing according to the target task scheduling result.

12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

13. 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 8 are implemented.

14. 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 8 are implemented.

Citation Information

Patent Citations

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

    CN112269650A

  • Device and method for scheduling task

    JP1999024946A

  • Workload scheduling using queues with different priorities

    US20240118920A1