Resource allocation method, device, electronic device, storage medium and program product

Through a resource allocation method based on game theory, GPU resource allocation is dynamically adjusted, solving the resource allocation problem under dynamic task requirements, improving resource utilization and fairness, reducing performance bottlenecks, and optimizing system performance and user experience.

CN119938275BActive Publication Date: 2025-09-23MOORE THREADS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510038692.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-09-23
Estimated Expiration
2045-01-09

AI Technical Summary

Technical Problem

Existing GPU resource allocation schemes are difficult to achieve efficient and fair resource allocation under dynamic task demand changes, resulting in performance bottlenecks and resource waste.

Method used

A resource allocation method based on game theory is adopted to achieve adaptive resource allocation by determining the resource request amount and allocated resource amount of the tasks to be executed, calculating the utility function, and dynamically adjusting the resource allocation to optimize the priority between tasks.

Benefits of technology

It improves resource utilization and fairness, reduces the overall task execution delay, optimizes system performance and user experience, and reduces performance bottlenecks caused by resource competition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938275B_ABST
    Figure CN119938275B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a resource allocation method, apparatus, electronic device, storage medium, and program product. The method comprises: determining the resource request amount of each to-be-executed task in a set of to-be-executed tasks at time slot t, where t is an integer greater than or equal to 0; for any to-be-executed task, determining the utility function of the to-be-executed task at time slot t based on the resource request amount of the to-be-executed task at time slot t and the allocated resource amount of the to-be-executed task at time slot t; in response to the total amount of allocated resources at time slot t being less than the allocatable resource amount at time slot t, determining the to-be-executed task with the fastest utility increase among the to-be-executed tasks based on the utility functions of the to-be-executed tasks at time slot t, and updating the allocated resource amount of the to-be-executed task with the fastest utility increase at time slot t.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a resource allocation method, a resource allocation device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] GPU (Graphics Processing Unit) resource allocation is a crucial management process in computer systems. It involves properly allocating GPU computing resources, such as cores and video memory, to different tasks or processes. This is done to maximize resource utilization and ensure the system can efficiently execute various computing tasks.

[0003] Because the GPU has a high degree of parallel processing capabilities, it can handle a large number of tasks simultaneously, but this also means that there needs to be an effective mechanism to determine which tasks should receive how many resources. Reasonable resource allocation can optimize the overall performance of the system, ensuring that critical tasks can be completed in a timely manner while avoiding resource waste and overload. In addition, as task requirements change dynamically, dynamic resource allocation strategies can adapt to these changes and maintain the responsiveness and efficiency of the system. In a multi-tasking environment, fair resource allocation also helps prevent the performance of certain tasks from degrading due to insufficient resources, while also avoiding unfair resource occupation.

[0004] Therefore, GPU resource allocation is the basis for ensuring that computing tasks are executed efficiently and fairly, and is crucial to improving system performance and user experience. Summary of the Invention

[0005] The present disclosure provides a resource allocation technical solution.

[0006] According to one aspect of the present disclosure, a resource allocation method is provided, comprising:

[0007] Determine the resource request amount of each to-be-executed task in the to-be-executed task set in time slot t, where t is an integer greater than or equal to 0;

[0008] For any task to be executed, determine the utility function of the task to be executed in time slot t according to the resource request amount of the task to be executed in time slot t and the allocated resource amount of the task to be executed in time slot t;

[0009] In response to the total amount of allocated resources in time slot t being less than the amount of allocatable resources in time slot t, the task to be executed with the fastest increasing utility among the tasks to be executed is determined based on the utility functions of the tasks to be executed in time slot t, and the amount of allocated resources for the task to be executed with the fastest increasing utility in time slot t is updated.

[0010] In a possible implementation, the method further includes:

[0011] Determine the remaining delay constraint time of each of the tasks to be executed in time slot t;

[0012] For any task to be executed, an initial value of the amount of allocated resources for the task to be executed in time slot t is determined according to the remaining delay constraint time of the task to be executed in time slot t.

[0013] In a possible implementation, determining an initial value of the amount of allocated resources for the task to be executed in time slot t according to the remaining delay constraint time of the task to be executed in time slot t includes:

[0014] An initial value of the allocated resource amount of the task to be executed in time slot t is determined according to the resource request amount of the task to be executed in time slot t and the remaining delay constraint time of the task to be executed in time slot t.

[0015] In one possible implementation, determining an initial value of the amount of allocated resources for the task to be executed in time slot t based on the resource request amount of the task to be executed in time slot t and the remaining delay constraint time of the task to be executed in time slot t includes:

[0016] Determine the difference between the remaining delay constraint time of the task to be executed in time slot t and the data transmission time of the task to be executed in time slot t;

[0017] An initial value of the amount of allocated resources for the task to be executed in time slot t is determined according to the ratio of the resource request amount of the task to be executed in time slot t to the difference.

[0018] In a possible implementation, determining the resource request amount of each to-be-executed task in the to-be-executed task set in time slot t includes:

[0019] For any task to be executed, a utility estimation function of the task to be executed in time slot t is determined, and the utility estimation function of the task to be executed in time slot t is maximized to obtain the resource request amount of the task to be executed in time slot t.

[0020] In one possible implementation,

[0021] The step of determining, for any task to be executed, a utility estimation function of the task to be executed in time slot t, and maximizing the utility estimation function of the task to be executed in time slot t to obtain a resource request amount of the task to be executed in time slot t includes: for any task to be executed, in response to the task to be executed having no unfinished predecessor task, determining the utility estimation function of the task to be executed in time slot t, and maximizing the utility estimation function of the task to be executed in time slot t to obtain a resource request amount of the task to be executed in time slot t;

[0022] The method further includes: for any to-be-executed task, in response to the to-be-executed task having an unfinished predecessor task, determining the resource request amount of the to-be-executed task in time slot t to be 0.

[0023] In a possible implementation, determining the utility estimation function of the task to be executed in time slot t includes:

[0024] Determine an estimated amount of resource requested by the task to be executed in time slot t, and an estimated amount of resource allocated to the task to be executed in time slot t;

[0025] A utility estimation function of the task to be executed in time slot t is determined according to the estimated amount of resource request of the task to be executed in time slot t and the estimated amount of resource allocation of the task to be executed in time slot t.

[0026] In one possible implementation, determining the estimated resource request of the to-be-executed task in time slot t includes:

[0027] When t is equal to 0, the estimated amount of resource request of the task to be executed in time slot t is determined as a preset value;

[0028] or,

[0029] When t is greater than 0, the estimated resource request amount of the task to be executed in time slot t is determined according to the resource request amount of the task to be executed in time slot t-1.

[0030] In a possible implementation, the method further includes:

[0031] The unit pricing of the resource in time slot t is determined according to the estimated resource request amount of each task to be executed in time slot t.

[0032] In a possible implementation, determining the utility function of the task to be executed in time slot t based on the resource request amount of the task to be executed in time slot t and the allocated resource amount of the task to be executed in time slot t includes:

[0033] The utility function of the task to be executed in time slot t is determined based on the resource request amount of the task to be executed in time slot t, the allocated resource amount of the task to be executed in time slot t, the data transmission time of the task to be executed in time slot t, and the unit pricing of resources in time slot t.

[0034] In one possible implementation, determining the utility function of the task to be executed in time slot t based on the resource request amount of the task to be executed in time slot t, the allocated resource amount of the task to be executed in time slot t, the data transmission time of the task to be executed in time slot t, and the unit pricing of the resource in time slot t includes:

[0035] Determine a benefit function of the task to be executed in time slot t according to the resource request amount of the task to be executed in time slot t, the allocated resource amount of the task to be executed in time slot t, and the data transmission time of the task to be executed in time slot t;

[0036] Determining a cost function for the task to be executed in time slot t according to the resource request amount of the task to be executed in time slot t and the unit pricing of the resource in time slot t;

[0037] According to the benefit function of the task to be executed in time slot t and the cost function of the task to be executed in time slot t, the utility function of the task to be executed in time slot t is determined, wherein the utility function of the task to be executed in time slot t is positively correlated with the benefit function of the task to be executed in time slot t, and the utility function of the task to be executed in time slot t is negatively correlated with the cost function of the task to be executed in time slot t.

[0038] In a possible implementation, the data transmission time of the task to be executed in time slot t is determined according to the amount of data to be transmitted by the task to be executed in time slot t and the uplink transmission rate of the data transmission link of the task to be executed in time slot t.

[0039] In a possible implementation, updating the amount of allocated resources of the to-be-executed task with the fastest utility increase in time slot t includes:

[0040] The amount of resources allocated to the task with the fastest utility increase in time slot t is increased by one resource unit.

[0041] In one possible implementation, the resources include computing resources and / or storage resources.

[0042] In a possible implementation, the computing resources include GPU computing resources, and the storage resources include video memory.

[0043] According to one aspect of the present disclosure, a resource allocation device is provided, comprising:

[0044] A first determining module is configured to determine a resource request amount of each to-be-executed task in a to-be-executed task set in a time slot t, where t is an integer greater than or equal to 0;

[0045] a second determining module, configured to determine, for any task to be executed, a utility function of the task to be executed in time slot t according to the resource request amount of the task to be executed in time slot t and the allocated resource amount of the task to be executed in time slot t;

[0046] An updating module is configured to determine, in response to the total amount of allocated resources in time slot t being less than the amount of allocatable resources in time slot t, the task to be executed with the fastest increase in utility among the tasks to be executed based on the utility functions of the tasks to be executed in time slot t, and to update the amount of allocated resources in time slot t for the task to be executed with the fastest increase in utility.

[0047] In a possible implementation, the apparatus further includes:

[0048] A third determining module is used to determine the remaining delay constraint time of each task to be executed in time slot t;

[0049] The fourth determining module is configured to determine, for any task to be executed, an initial value of the amount of allocated resources for the task to be executed in time slot t according to the remaining delay constraint time of the task to be executed in time slot t.

[0050] In a possible implementation, the fourth determining module is configured to:

[0051] An initial value of the allocated resource amount of the task to be executed in time slot t is determined according to the resource request amount of the task to be executed in time slot t and the remaining delay constraint time of the task to be executed in time slot t.

[0052] In a possible implementation, the fourth determining module is configured to:

[0053] Determine the difference between the remaining delay constraint time of the task to be executed in time slot t and the data transmission time of the task to be executed in time slot t;

[0054] An initial value of the amount of allocated resources for the task to be executed in time slot t is determined according to the ratio of the resource request amount of the task to be executed in time slot t to the difference.

[0055] In a possible implementation, the first determining module is configured to:

[0056] For any task to be executed, a utility estimation function of the task to be executed in time slot t is determined, and the utility estimation function of the task to be executed in time slot t is maximized to obtain the resource request amount of the task to be executed in time slot t.

[0057] In one possible implementation,

[0058] The first determining module is configured to: for any to-be-executed task, in response to the to-be-executed task having no uncompleted predecessor task, determine a utility estimation function of the to-be-executed task in time slot t, and maximize the utility estimation function of the to-be-executed task in time slot t to obtain a resource request amount of the to-be-executed task in time slot t;

[0059] The apparatus further includes: a fifth determining module configured to determine, for any task to be executed, in response to the existence of an unfinished predecessor task for the task to be executed, a resource request amount of the task to be executed in time slot t as 0.

[0060] In a possible implementation, the first determining module is configured to:

[0061] Determine an estimated amount of resource requested by the task to be executed in time slot t, and an estimated amount of resource allocated to the task to be executed in time slot t;

[0062] A utility estimation function of the task to be executed in time slot t is determined according to the estimated amount of resource request of the task to be executed in time slot t and the estimated amount of resource allocation of the task to be executed in time slot t.

[0063] In a possible implementation, the first determining module is configured to:

[0064] When t is equal to 0, the estimated amount of resource request of the task to be executed in time slot t is determined as a preset value;

[0065] or,

[0066] When t is greater than 0, the estimated resource request amount of the task to be executed in time slot t is determined according to the resource request amount of the task to be executed in time slot t-1.

[0067] In a possible implementation, the apparatus further includes:

[0068] The sixth determining module is configured to determine the unit pricing of resources in time slot t according to the estimated resource requests of the tasks to be executed in time slot t.

[0069] In a possible implementation, the second determining module is configured to:

[0070] The utility function of the task to be executed in time slot t is determined based on the resource request amount of the task to be executed in time slot t, the allocated resource amount of the task to be executed in time slot t, the data transmission time of the task to be executed in time slot t, and the unit pricing of resources in time slot t.

[0071] In a possible implementation, the second determining module is configured to:

[0072] Determine a benefit function of the task to be executed in time slot t according to the resource request amount of the task to be executed in time slot t, the allocated resource amount of the task to be executed in time slot t, and the data transmission time of the task to be executed in time slot t;

[0073] Determining a cost function for the task to be executed in time slot t according to the resource request amount of the task to be executed in time slot t and the unit pricing of the resource in time slot t;

[0074] According to the benefit function of the task to be executed in time slot t and the cost function of the task to be executed in time slot t, the utility function of the task to be executed in time slot t is determined, wherein the utility function of the task to be executed in time slot t is positively correlated with the benefit function of the task to be executed in time slot t, and the utility function of the task to be executed in time slot t is negatively correlated with the cost function of the task to be executed in time slot t.

[0075] In a possible implementation, the data transmission time of the task to be executed in time slot t is determined according to the amount of data to be transmitted by the task to be executed in time slot t and the uplink transmission rate of the data transmission link of the task to be executed in time slot t.

[0076] In a possible implementation, the update module is configured to:

[0077] The amount of resources allocated to the task with the fastest utility increase in time slot t is increased by one resource unit.

[0078] In one possible implementation, the resources include computing resources and / or storage resources.

[0079] In a possible implementation, the computing resources include GPU computing resources, and the storage resources include video memory.

[0080] According to one aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; a memory for storing executable instructions; wherein the one or more processors are configured to call the executable instructions stored in the memory to execute the above method.

[0081] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above method is implemented.

[0082] According to one aspect of the present disclosure, a computer program product is provided, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in an electronic device, a processor in the electronic device executes the above method.

[0083] In an embodiment of the present disclosure, by determining the resource request amount of each to-be-executed task in a set of to-be-executed tasks at time slot t, where t is an integer greater than or equal to 0, for any to-be-executed task, according to the resource request amount of the to-be-executed task at time slot t and the allocated resource amount of the to-be-executed task at time slot t, the utility function of the to-be-executed task at time slot t is determined; in response to the total amount of allocated resources at time slot t being less than the allocable resource amount at time slot t, according to the utility function of each to-be-executed task at time slot t, the to-be-executed task with the fastest utility increase among the to-be-executed tasks is determined. The system performs tasks and updates the amount of resources allocated to the task with the fastest utility increase in time slot t. A GPU resource allocation method based on game theory is proposed, which abstracts GPU task and resource management into a game system. It can identify dynamically changing resource requirements in a multi-tasking environment, realize automatic priority comparison between tasks, and adjust allocated resources to respond to real-time changes in task requirements in an adaptive manner, reduce the overall execution delay of tasks, achieve better balance and optimization in terms of resource utilization, fairness and scheduling overhead, and reduce performance bottlenecks caused by resource competition.

[0084] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.

[0085] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] The accompanying drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to explain the technical solutions of the present disclosure.

[0087] Figure 1 A flowchart of a resource allocation method provided by an embodiment of the present disclosure is shown.

[0088] Figure 2 A schematic diagram illustrating the dependency relationship between tasks in the resource allocation method provided by an embodiment of the present disclosure.

[0089] Figure 3 A block diagram of a resource allocation device provided by an embodiment of the present disclosure is shown.

[0090] Figure 4A block diagram of an electronic device 1900 provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0091] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.

[0092] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0093] The term "and / or" herein simply describes an association relationship between associated objects, indicating that three relationships can exist. For example, "A and / or B" can represent the existence of three situations: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" herein refers to any combination of at least two of any one or more of a plurality of items. For example, "at least one of A, B, and C" can represent any one or more elements selected from the set consisting of A, B, and C.

[0094] In addition, numerous specific details are provided in the following detailed description to better illustrate the present disclosure. Those skilled in the art will appreciate that the present disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main points of the present disclosure.

[0095] In related technologies, the following solutions are mainly used for GPU resource allocation: static allocation, multi-tenant sharing, virtualization, load balancing scheduling, capacity planning and reservation, task priority scheduling, and machine learning-based scheduling.

[0096] In the static allocation scheme, GPU resources are pre-allocated before tasks start. Each task uses a specific GPU or GPUs, and these resources are not adjusted during runtime. This scheme is simple to implement and manage, and tasks do not compete for resources, thus avoiding resource contention. However, it suffers from low resource utilization, prone to resource waste, and inflexibility, unable to cope with dynamic changes in task load.

[0097] In a multi-tenant sharing solution, multiple tasks or users are allowed to share the same GPU resources. Resource isolation and quota mechanisms ensure that each task or user has fair access to the GPU. This solution improves resource utilization and fully utilizes GPU resources. It is suitable for multi-user or multi-task environments and ensures fair resource allocation. However, it may lead to resource contention, affecting task performance, and requires complex resource isolation and management mechanisms.

[0098] In virtualization solutions, GPU virtualization technology is used to virtualize physical GPU resources into multiple virtual GPUs, allowing multiple tasks or virtual machines to use GPU resources simultaneously. This solution improves resource utilization, fully utilizes GPU resources, supports multi-tenant environments, and provides good isolation. However, it requires GPU virtualization support, which increases system complexity, and the virtualization overhead may affect performance.

[0099] In a load-balancing scheduling solution, tasks are dynamically assigned to GPUs with lower loads by monitoring the load of each GPU, ensuring balanced resource utilization and optimizing system performance. This solution can avoid resource waste, improve overall system performance, balance GPU resource utilization, and prevent overloading of certain GPUs. However, it requires real-time monitoring and scheduling decisions, increasing system overhead and complicating scheduling strategies, which can affect scheduling efficiency.

[0100] The capacity planning and reservation solution uses historical load data and forecasting models to plan and reserve GPU resources to meet future high-load demands. This solution proactively prevents resource bottlenecks, improves system reliability, and is suitable for high-load and mission-critical environments. However, forecasting models can be inaccurate, affecting planning effectiveness, and reserving resources can lead to resource waste.

[0101] In a task priority scheduling scheme, resources are allocated to high-priority tasks based on their importance and priority, ensuring that critical tasks are processed promptly. This scheme prioritizes critical tasks, improves system responsiveness, and flexibly adjusts resource allocation based on task importance. However, low-priority tasks may be delayed, resulting in unfairness and requiring complex priority management and scheduling mechanisms.

[0102] Machine learning-based scheduling solutions use machine learning algorithms to analyze historical data and current load conditions. This solution can optimize GPU resource allocation strategies, improving resource utilization and system performance. However, implementation is complex and requires a large amount of training data. Furthermore, the prediction model may be inaccurate, affecting scheduling effectiveness.

[0103] In summary, the GPU resource allocation schemes in related technologies each have their own advantages and disadvantages in terms of improving resource utilization, ensuring fairness, and optimizing system performance.

[0104] During GPU rendering or computing, different tasks (or different subtasks of the same task) vary significantly in their demand for GPU resources, the user's perception of task results, and the task's sensitivity to different performance metrics. For example, in game rendering, the real-time rendering requirements for different screen details vary, and users also differ in their attention to the overall picture and specific details. Therefore, properly scheduling GPU resources to meet dynamic task demands is key to improving system efficiency and user experience.

[0105] The present disclosure provides a GPU resource allocation method, which determines the resource request amount of each to-be-executed task in a set of to-be-executed tasks in time slot t, wherein t is an integer greater than or equal to 0. For any to-be-executed task, the utility function of the to-be-executed task in time slot t is determined based on the resource request amount of the to-be-executed task in time slot t and the allocated resource amount of the to-be-executed task in time slot t. In response to the total amount of allocated resources in time slot t being less than the allocable resource amount in time slot t, the utility increment of each to-be-executed task is determined based on the utility function of each to-be-executed task in time slot t. Add the fastest task to be executed and update the allocated resources of the task to be executed with the fastest utility increase in time slot t. Therefore, a GPU resource allocation method based on game theory is proposed, which abstracts GPU task and resource management into a game system. It can identify dynamically changing resource requirements in a multi-tasking environment, realize automatic priority comparison between tasks, and adjust allocated resources to respond to real-time changes in task requirements in an adaptive manner, reduce the overall execution delay of tasks, achieve better balance and optimization in terms of resource utilization, fairness and scheduling overhead, and reduce performance bottlenecks caused by resource competition.

[0106] The resource allocation method provided by the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.

[0107] Figure 1 A flow chart of the resource allocation method provided by an embodiment of the present disclosure is shown. In one possible implementation, the execution subject of the resource allocation method may be a resource allocation device. For example, the resource allocation method may be executed by a terminal device or a server or other electronic device. The terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device or a wearable device, etc. In some possible implementations, the resource allocation method may be implemented by a processor calling computer-readable instructions stored in a memory. As Figure 1 As shown, the resource allocation method includes steps S11 to S13.

[0108] In step S11 , the resource request amount of each to-be-executed task in the to-be-executed task set in time slot t is determined, where t is an integer greater than or equal to 0.

[0109] In step S12, for any task to be executed, the utility function of the task to be executed in time slot t is determined according to the resource request amount of the task to be executed in time slot t and the allocated resource amount of the task to be executed in time slot t.

[0110] In step S13, in response to the total amount of allocated resources in time slot t being less than the amount of allocatable resources in time slot t, the task to be executed with the fastest increasing utility among the tasks to be executed is determined based on the utility functions of the tasks to be executed in time slot t, and the amount of allocated resources for the task to be executed with the fastest increasing utility in time slot t is updated.

[0111] In the embodiment of the present disclosure, in a multi-tasking scenario, in order to formulate a GPU (Graphics Processing Unit) resource allocation strategy, it is necessary to consider the execution time of a single task to be executed and the overall latency of a set of tasks to be executed. The tasks to be executed can be tasks or subtasks that require resources. In one example, {A1, A2, ..., A M} represents a set of tasks to be executed, and can be implemented using A i represents the i-th task to be executed, wherein 1≤i≤M, and M represents the total number of tasks to be executed in the set of tasks to be executed. In the embodiment of the present disclosure, each task to be executed can be used as a game participant.

[0112] In one possible implementation, the resources include computing resources and / or storage resources.

[0113] Computing resources refer to the capabilities and hardware used to perform computing tasks. Computing resources can include processors (CPUs (Central Processing Units), GPUs, FPGAs (Field-Programmable Gate Arrays), etc.), computing cores, threads, and computing units.

[0114] Storage resources refer to the hardware and space used to store data. Storage resources can include random access memory (RAM), solid state drives (SSD), hard disk drives (HDD), cloud storage, and more.

[0115] As an example of this implementation, the computing resources include GPU computing resources, and the storage resources include video memory.

[0116] A GPU is a processor specifically designed for graphics and parallel computing. It has a large number of cores and can handle multiple computing tasks simultaneously, making it ideal for graphics rendering and high-performance computing (HPC). Video memory is GPU-specific memory used to store graphics data, textures, image buffers, and other information. The bandwidth and speed of video memory are typically higher than the system's main memory (RAM) because graphics processing requires rapid access and processing of large amounts of data.

[0117] In this example, the GPU can be regarded as a resource supplier, and each task to be executed can be regarded as a resource demander.

[0118] In the embodiment of the present disclosure, the resources to be allocated may be divided based on resource units, wherein the resource units may represent basic allocation units of resources.

[0119] In one possible implementation, the resources to be allocated can be divided based on the smallest schedulable granularity. In this implementation, the resource unit corresponds to the smallest amount of resources that can be scheduled. For example, for a GPU, a single GPU core can be used as a computing resource unit, and a fixed-size memory block can be used as a storage resource unit. In this way, the system can ensure flexibility and efficiency in resource allocation while avoiding resource waste, especially in scenarios where fine-grained control of resources is required to optimize performance. In one example, the resource unit can be express.

[0120] In another possible implementation, the resource unit can be larger than the minimum schedulable granularity. This implementation allows a wider range of resource combinations to be considered during resource allocation, thereby simplifying the complexity of resource management. For example, in the GPU resource allocation scenario, a group of GPU cores or a certain amount of video memory can be allocated as a larger resource unit, rather than a single core or a smaller video memory block. This approach is suitable for scenarios that do not require high resource allocation accuracy but require fast response and simplified management, such as in large-scale parallel processing tasks. It can reduce the computational overhead of resource allocation and improve resource allocation efficiency.

[0121] The disclosed embodiments aim to find a balance between the latency requirements of tasks to be executed and the limited resources. If each task to be executed attempts to maximize its own priority to obtain more resources, it may lead to resource waste. Therefore, in the disclosed embodiments, a game system can be constructed under the overall latency constraints of the set of tasks to be executed to ensure efficient resource utilization. Taking into account the latency tolerance of the tasks to be executed, the differences in resource consumption, and the resource competition, the game system can adopt a cooperative game model to ensure reasonable resource allocation and overall optimization.

[0122] In one example, a static game system G = {S1, ..., S M ; U1,…,U M}, where S i Represents the participant (i.e., the task to be performed) A i The resource request strategy of participant A i The resource request strategy is s i (s i ∈S i ), S=S1×…×S M The possible space of resource request strategy combinations for all participants, where × is the Cartesian product. i Represents participant A i The utility function (a mapping from the strategy space S to the real number set R, namely U i :S→R), mapping resource request strategy combinations to task utility values ​​to evaluate strategy effects. The resource request strategy includes the resource request amount.

[0123] To minimize the overall processing delay of the set of tasks to be executed, participant A i Develop resource request strategies i , the resource request strategy of other participants is s i ={s1,…,s i-1 ,s i+1 ,…,s M}, then the system response principle is Among them, s i ∈S i .

[0124] Under the Nash equilibrium condition, in, Represents participant A i That is, when the game system is in Nash equilibrium, each participant A i Cannot unilaterally change its resource request policy i Get higher utility U i Participant A i Optimal resource request strategy is the optimal resource request strategy combination for other participants The optimal response is expressed as The optimal resource request strategy combination for the set of tasks to be executed can be recorded as

[0125] In the embodiment of the present disclosure, the resource request amount of each task to be executed in the set of tasks to be executed at time slot t can be determined. The resource request amount of any task to be executed at time slot t can represent the amount of resources requested by the task to be executed at time slot t. The resource request amount of any task to be executed at time slot t can be greater than or equal to 0. In one example, l i (t) represents the task A to be executed i The amount of resource requested at time slot t.

[0126] In the embodiment of the present disclosure, for any task to be executed, the utility function of the task to be executed at time slot t can be determined based on the resource request amount of the task to be executed at time slot t and the allocated resource amount of the task to be executed at time slot t. The allocated resource amount of any task to be executed at time slot t can represent the amount of resources that the task to be executed has obtained at time slot t, that is, the amount of resources that have been allocated to the task to be executed at time slot t. In one example, task A to be executed i The amount of allocated resources in time slot t can be expressed as F i (t) indicates that as resource allocation proceeds, the number of tasks A to be executed i The amount of allocated resources F in time slot t i (t) may gradually increase or remain constant.

[0127] In an embodiment of the present disclosure, in response to the total amount of allocated resources in time slot t being less than the amount of allocatable resources in time slot t, the task to be executed with the fastest utility increase among the tasks to be executed can be determined based on the utility function of each task to be executed in time slot t, and the amount of allocated resources in time slot t for the task to be executed with the fastest utility increase can be updated. In one example, the total amount of allocated resources in time slot t can be represented by F′(t), and the amount of allocatable resources in time slot t can be represented by F S (t) represents. In the embodiment of the present disclosure, it is possible to respond to F′(t) <F S (t), continue to allocate resources for time slot t. That is, in the embodiment of the present disclosure, steps S12 and S13 can be repeated until the total amount of allocated resources F′(t) for time slot t is equal to the amount of allocable resources F S (t) (i.e., all the allocatable resources of time slot t have been allocated), or the amount of allocated resources of each task to be executed in time slot t has reached its resource request amount in time slot t.

[0128] In one possible implementation, for any pending task, the derivative of the utility function of the pending task at time slot t with respect to the amount of resources allocated to the pending task at time slot t can be calculated to obtain the utility change rate of the pending task at time slot t. The pending task with the largest utility change rate can be determined as the pending task with the fastest utility increase.

[0129] In a possible implementation, it is characterized in that the method also includes: determining the remaining delay constraint time of each task to be executed in time slot t; for any task to be executed, determining the initial value of the allocated resource amount of the task to be executed in time slot t based on the remaining delay constraint time of the task to be executed in time slot t.

[0130] In this implementation, for any task to be executed, the remaining delay constraint time of the task to be executed in time slot t can be determined based on the total delay constraint time of the task to be executed and the time elapsed from the start of execution of the task to be executed to time slot t-1. i The remaining delay constraint time in time slot t can be taken as tl i (t) indicates.

[0131] In this implementation, for any pending task, the initial value of the allocated resources for time slot t, i.e., the initial resource allocation for the pending task in time slot t, can be determined based on the remaining delay constraint of the pending task in time slot t. Tasks with shorter remaining delay constraints, i.e., tighter delay constraints, are given priority to receive more resources, thereby meeting their latency requirements.

[0132] This implementation enables more flexible and fair resource allocation strategies, while also taking into account task latency requirements and urgency. By allocating an initial amount of resources to each pending task that matches its remaining latency constraint, overall resource utilization can be optimized and performance losses due to task delays can be reduced. This implementation helps improve the responsiveness of critical tasks, ensuring that the system can efficiently execute various computing tasks while meeting latency requirements, thereby enhancing system performance and user experience.

[0133] As an example of this implementation method, determining the initial value of the allocated resource amount of the task to be executed in time slot t based on the remaining delay constraint time of the task to be executed in time slot t includes: determining the initial value of the allocated resource amount of the task to be executed in time slot t based on the resource request amount of the task to be executed in time slot t and the remaining delay constraint time of the task to be executed in time slot t.

[0134] In this example, for any task to be executed, the initial value of the allocated resource amount of the task to be executed in time slot t is positively correlated with the resource request amount of the task to be executed in time slot t, and negatively correlated with the remaining delay constraint time of the task to be executed in time slot t.

[0135] This example provides a dynamic resource allocation mechanism based on task urgency and resource requirements. This example more accurately matches actual task requirements with the system's resource capabilities, optimizing resource utilization and ensuring that critical tasks receive sufficient resources in a timely manner to meet their latency requirements. This approach allows the system to better balance resource competition among multiple tasks, improve task execution efficiency, and reduce latency, thereby enhancing overall system performance and user experience.

[0136] In one example, the method of determining the initial value of the allocated resource amount of the task to be executed in time slot t based on the resource request amount of the task to be executed in time slot t and the remaining delay constraint time of the task to be executed in time slot t includes: determining the difference between the remaining delay constraint time of the task to be executed in time slot t and the data transmission time of the task to be executed in time slot t; and determining the initial value of the allocated resource amount of the task to be executed in time slot t based on the ratio of the resource request amount of the task to be executed in time slot t to the difference.

[0137] In one example, the task A to be executed i The data transmission time in time slot t can be Indicates that the task A to be executed can be determined i The remaining delay constraint time tl in time slot t i (t) and the task to be executed A i Data transmission time in time slot t The difference, that is Task A to be executed i The initial value of the allocated resource amount at time slot t can be

[0138] This example provides a reasonable starting point for resource allocation for each task by accurately calculating its available processing time and resource requirements. This helps ensure that high-priority tasks receive sufficient resources to meet their tight deadlines, while also making overall resource allocation more fair and efficient. This allows the system to better respond to dynamic changes in tasks and improve the timeliness of task completion.

[0139] In one possible implementation, determining the resource request amount of each task to be executed in the set of tasks to be executed in time slot t includes: for any task to be executed, determining the utility estimation function of the task to be executed in time slot t, and maximizing the utility estimation function of the task to be executed in time slot t to obtain the resource request amount of the task to be executed in time slot t.

[0140] For any pending task, the utility estimation function of the pending task at time slot t may be a function for predicting and evaluating the utility of the pending task at time slot t. By maximizing the utility estimation function, the amount of resources required for each pending task to achieve maximum utility at time slot t may be determined.

[0141] This implementation guides resource allocation by quantifying the utility of each task, resulting in more efficient resource allocation. This helps ensure that critical tasks receive sufficient resources to meet their performance requirements while reducing the excessive resource usage of non-critical tasks. By optimizing resource requests, resource utilization is improved, task execution efficiency is enhanced, and overall system performance is enhanced, ensuring that critical tasks are prioritized and achieving better load balancing in a multi-tasking environment.

[0142] As an example of this implementation, the maximized utility estimation function can be solved in advance in an offline environment, and the resource request amount of each to-be-executed task in time slot t can be determined, thereby reducing online decision-making overhead.

[0143] As an example of this implementation, for any task to be executed, determining the utility estimation function of the task to be executed in time slot t, and maximizing the utility estimation function of the task to be executed in time slot t, to obtain the resource request amount of the task to be executed in time slot t, includes: for any task to be executed, in response to the fact that the task to be executed has no unfinished predecessor task, determining the utility estimation function of the task to be executed in time slot t, and maximizing the utility estimation function of the task to be executed in time slot t, to obtain the resource request amount of the task to be executed in time slot t; the method also includes: for any task to be executed, in response to the fact that the task to be executed has an unfinished predecessor task, determining the resource request amount of the task to be executed in time slot t to 0.

[0144] There may be dependencies between the tasks to be executed, that is, there may be constraints on the execution order of the tasks to be executed. Figure 2 A schematic diagram showing the dependency relationship between tasks in the resource allocation method provided by an embodiment of the present disclosure. Figure 2In the example shown, task numbered 2 depends on at least one task numbered 1, that is, task numbered 2 includes at least one predecessor task numbered 1; task numbered 3 depends on at least one task numbered 2, that is, task numbered 3 includes at least one predecessor task numbered 2; task numbered 4 depends on at least one task numbered 3, that is, task numbered 4 includes at least one predecessor task numbered 3.

[0145] By adopting this example, unlimited resource consumption can be limited, which helps to reasonably allocate resources and avoid waste.

[0146] As another example of this implementation, for any task to be executed, the utility function of the task to be executed in time slot t is determined based on the resource request amount of the task to be executed in time slot t and the allocated resource amount of the task to be executed in time slot t, including: for any task to be executed, in response to the fact that there is no unfinished predecessor task for the task to be executed, the utility function of the task to be executed in time slot t is determined based on the resource request amount of the task to be executed in time slot t and the allocated resource amount of the task to be executed in time slot t; the method also includes: for any task to be executed, in response to the fact that there is an unfinished predecessor task for the task to be executed, the value of the utility function of the task to be executed in time slot t is determined to be 0.

[0147] In other examples, for a task to be executed that has an unfinished predecessor task in time slot t, the value of the benefit function of the task to be executed can be determined to be 0, or the cost of the task to be executed can be determined to be infinite, etc., which is not limited here.

[0148] As an example of this implementation method, determining the utility estimation function of the task to be executed in time slot t includes: determining the resource request estimate of the task to be executed in time slot t, and the resource allocation estimate of the task to be executed in time slot t; determining the utility estimation function of the task to be executed in time slot t based on the resource request estimate of the task to be executed in time slot t, and the resource allocation estimate of the task to be executed in time slot t.

[0149] In one example, the task A to be executed i The estimated amount of resource request at time slot t can be expressed as l i (t) est Indicates that task A is to be executed i The resource allocation estimate at time slot t can be obtained using F i (t) est express.

[0150] In this example, the estimated amount of resource allocation for the task to be executed in time slot t is less than or equal to the estimated amount of resource request for the task to be executed in time slot t. The estimated amount of resource allocation for the task to be executed in time slot t can be determined according to a preset algorithm or can be determined randomly, which is not limited here.

[0151] The method for determining the utility estimation function is similar to the method for determining the utility function below, and will not be repeated here.

[0152] In one example, determining the estimated amount of resource requests for the task to be executed in time slot t includes: when t is equal to 0, determining the estimated amount of resource requests for the task to be executed in time slot t as a preset value; or, when t is greater than 0, determining the estimated amount of resource requests for the task to be executed in time slot t based on the amount of resource requests for the task to be executed in time slot t-1.

[0153] In this example, when t equals 0, i.e., in the first time slot, since there is no previous resource request data to refer to, the estimated resource request amount of the task to be executed can be determined as a preset value. When t is greater than 0, i.e., in subsequent time slots, since previous resource request data is available, the estimated resource request amount for the current time slot t can be determined based on the resource request amount of the task to be executed in the previous time slot t-1. This example can use historical data to predict the resource requirements of tasks, thereby more accurately allocating resources.

[0154] In one example, the method further includes: determining a unit price of resources in time slot t according to an estimated amount of resource requests of each to-be-executed task in time slot t.

[0155] In one example, the unit price of a resource in time slot t can be expressed as c(t), c(t) = x + y (∑ i l i (t) est ) θ . Where x and y are non-negative constants, θ ≥ 1, so c(t) is a convex function.

[0156] By adopting this example, dynamic pricing of resources can be achieved according to fluctuations in resource demand.

[0157] In one possible implementation, the utility function of the task to be executed in time slot t is determined based on the resource request amount of the task to be executed in time slot t and the allocated resource amount of the task to be executed in time slot t, including: determining the utility function of the task to be executed in time slot t based on the resource request amount of the task to be executed in time slot t, the allocated resource amount of the task to be executed in time slot t, the data transmission time of the task to be executed in time slot t and the unit pricing of resources in time slot t.

[0158] In one example, the task A to be executed i The data transmission time in time slot t can be T i (t) indicates.

[0159] In this implementation, the task A to be executed can be i The resource request amount l in time slot t i (t), Task A to be executed i The amount of allocated resources F in time slot t i (t), Task A to be executed i Data transmission time T in time slot t i (t) and the unit price c(t) of the resource in time slot t determine the task A to be executed i The utility function U at time slot t i (t). Among them, the task to be executed A i The utility function U at time slot t i (t) and the task to be executed A i The resource request amount l in time slot t i (t) positive correlation, task A to be executed i The utility function U at time slot t i (t) and the task to be executed A i The amount of allocated resources F in time slot t i (t) Negative correlation, task A to be executed i The utility function U at time slot t i (t) and the task to be executed A i Data transmission time T in time slot t i (t) Negative correlation, and task A is to be executed i The utility function U at time slot t i (t) is negatively correlated with the unit price c(t) of the resource in time slot t.

[0160] In this implementation, by comprehensively considering the resource request amount, allocated resource amount, data transmission time and resource unit pricing of the task to be executed in a specific time slot, the utility of the task can be evaluated more accurately, thereby achieving more refined resource allocation.

[0161] As an example of this implementation, the utility function of the task to be executed in time slot t is determined based on the resource request amount of the task to be executed in time slot t, the allocated resource amount of the task to be executed in time slot t, the data transmission time of the task to be executed in time slot t, and the unit pricing of resources in time slot t, including: determining the benefit function of the task to be executed in time slot t based on the resource request amount of the task to be executed in time slot t, the allocated resource amount of the task to be executed in time slot t, and the data transmission time of the task to be executed in time slot t ; Determine the cost function of the task to be executed in time slot t based on the resource request amount of the task to be executed in time slot t and the unit pricing of resources in time slot t; Determine the utility function of the task to be executed in time slot t based on the benefit function of the task to be executed in time slot t and the cost function of the task to be executed in time slot t, wherein the utility function of the task to be executed in time slot t is positively correlated with the benefit function of the task to be executed in time slot t, and the utility function of the task to be executed in time slot t is negatively correlated with the cost function of the task to be executed in time slot t.

[0162] In this example, the benefit function and cost function can be constructed based on the Stackelberg Model to optimize the task competition strategy.

[0163] In this example, according to the task to be executed A i The resource request amount l in time slot t i (t), Task A to be executed i The amount of allocated resources F in time slot t i (t) and task A to be executed i Data transmission time T in time slot t i (t), determine the task A to be executed i The income function income at time slot t i (t). Among them, the task to be executed A i The income function income at time slot t i (t) and the task to be executed A i The resource request amount l in time slot t i (t) positive correlation, task A to be executed i The income function income at time slot t i (t) and the task to be executed A i The amount of allocated resources F in time slot t i (t) Negative correlation, task A to be executed i The income function income at time slot t i (t) and the task to be executed A i Data transmission time T in time slot t i(t) Negative correlation. For example, task A to be executed i The profit function at time slot t can be

[0164] In this example, according to the task to be executed A i The resource request amount l in time slot t i (t) and the unit price c(t) of the resource in time slot t, determine the task A to be executed i Cost function at time slot t. Among them, the task A to be executed i The cost function at time slot t is related to the task A to be executed i The resource request amount l in time slot t i (t) positive correlation, and task A is to be executed i The cost function at time slot t is positively correlated with the unit price c(t) of the resource at time slot t. For example, task A to be executed i The cost function at time slot t can be c i (t) = l i (t)c(t).

[0165] In this example, according to the task to be executed A i The profit function at time slot t is related to the task A to be executed i The difference in the cost function at time slot t determines the task A to be executed i The utility function at time slot t. That is, the task A to be executed i The utility function at time slot t can be U i (t) = income i (t)-c i (t).

[0166] This example helps optimize resource utilization and ensures that tasks can obtain appropriate resources based on their actual needs and cost-effectiveness, thereby improving the overall performance of the system and task execution efficiency while reducing unnecessary resource waste.

[0167] As an example of this implementation, the data transmission time of the task to be executed in time slot t is determined according to the amount of data to be transmitted by the task to be executed in time slot t and the uplink transmission rate of the data transmission link of the task to be executed in time slot t.

[0168] In this example, for any pending task, the data transmission time of the pending task in time slot t is positively correlated with the amount of data to be transmitted for the pending task in time slot t, and the data transmission time of the pending task in time slot t is negatively correlated with the uplink transmission rate of the data transmission link for the pending task in time slot t. When the pending task is executed by the GPU, the uplink transmission rate of the data transmission link for the pending task in time slot t can be less than or equal to the uplink transmission rate of the GPU in time slot t.

[0169] For example, task A to be executed i The amount of data to be transmitted in time slot t can be expressed as D i (t) indicates the task A to be executed i The uplink transmission rate of the data transmission link in time slot t can be R i (t) indicates the task A to be executed i The data transmission time in time slot t can be

[0170] In one possible implementation, the utility function of the pending task in time slot t can be adjusted based on the application scenario and the characteristics of the pending task. For example, when rendering an image, the utility function of the pending task related to the overall image rendering in time slot t can be increased to give it a higher priority in obtaining resources; while the utility function of the pending task related to the detailed texture of the image can be lowered in time slot t, thereby balancing rendering efficiency and resource consumption.

[0171] In one possible implementation, updating the amount of resources allocated to the to-be-executed task with the fastest increasing utility in time slot t includes increasing the amount of resources allocated to the to-be-executed task with the fastest increasing utility in time slot t by one resource unit. This implementation improves the flexibility and efficiency of resource allocation while avoiding resource waste, particularly in scenarios requiring precise resource control to optimize performance.

[0172] In one possible implementation, data related to resource allocation and task execution during past task execution can be collected and stored to provide a reference for future task allocation decisions. This historical data can include key information such as each task's resource request amount, allocated resources, task execution efficiency, completion time, and actual performance. This historical data helps the system quickly converge to the optimal resource allocation solution, effectively reducing resource consumption during online decision-making.

[0173] The following uses GPU resources as an example to prove that the above game system is applicable to resource allocation in multi-tasking scenarios, that is, the calculation process can converge. The proof process uses the Debreu-Fan-Glicksber theorem, that is, a game system G with M participants G = {S1,…,S M ; U1,…,U M}, if each participant A i The resource request strategy space S i is a compact convex set, the utility function U i is a continuous function and for participant A i Resource request strategies i is quasi-concave, then there is at least one Nash equilibrium in the game system G, and the uniqueness of the Nash equilibrium can be proved by compression mapping.

[0174] Resource request volume k Regardless of the communication link and device type, the existence of Nash equilibrium of the above game system is proved below.

[0175] Step 1: Prove the utility function U k About resource request volume k It is concave, and you need to observe U k Right k Find the properties after the second-order derivative. Define the number of chips, the number of boost cores, and the number of floating-point calculations that can be processed in a single clock cycle as N. c , N b And FLOPS, the theoretical peak computing power of this GPU device PR=N c ×N b ×FLOPS.

[0176] Then there is U k Expand as follows:

[0177]

[0178] U k About l k The result of finding the first-order derivative is:

[0179]

[0180] U k About l k The result of finding the second derivative is:

[0181]

[0182] Since y≥0,θ≥1, we get That is, function U k About l kis concave. Can get resource demander (ie participant) A k The optimal response function.

[0183] Step 2: A linear pricing function (corresponding to a linear inverse demand function) is a common assumption in oligopoly markets. The following proof is based on this assumption. Assuming a linear pricing function, that is, θ = 1, the marginal utility function at this time is the first-order optimal condition using a concave function, let

[0184]

[0185] The only feasible solution can be obtained, namely

[0186]

[0187] Step 3: Target is maxU k is a concave function, and constrains stDT∈DT1,…,DT k ,p n ≤p max is affine, so the goal is a convex problem and the optimal solution satisfies the Karush-Kuhn-Tucker condition, let Can get resource demander A k The optimal response function is

[0188]

[0189] in

[0190]

[0191] That is to say Take the minimum value of the actual computing time and the computing time when the computing power reaches the peak, where p n To complete the nth step of the task.

[0192] Step 4: From the above, we can know that function U k About l k is concave, and according to the Debreu-Fan-Glicksberg theorem, there is at least one Nash equilibrium. It is difficult to obtain the specific form of the optimal response function of resource demander k. Therefore, the strategies l of other resource demanders j on both sides of the equation are j Find the partial derivative, that is,

[0193]

[0194] Can be obtained

[0195]

[0196] Step 5: When the following conditions are met, resource demander A k The optimal response function is a compression mapping, and game theory has a unique Nash equilibrium solution.

[0197]

[0198] When θ=1, the first-order partial derivative of the optimal response function of resource demander k with respect to the strategy of other resource demanders j is because The optimal response function of resource demander k is a compression mapping, so there is a unique Nash equilibrium solution.

[0199] Step 6: The utility of each resource demander is affected by other resource demanders, so Represents resource demander A k The optimal strategy combination adopted by other resource demanders besides Resource Requester A k The optimal response strategy is

[0200]

[0201] When the conditions are met

[0202]

[0203] The optimal strategy combination for all resource demanders The Nash equilibrium solution of the game.

[0204] It is understood that the above-mentioned various method embodiments mentioned in this disclosure can be combined with each other to form combined embodiments without violating the principle logic. Due to space limitations, this disclosure will not go into details. It is understood by those skilled in the art that in the above-mentioned methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.

[0205] In addition, the present disclosure also provides a resource allocation device, an electronic device, a computer-readable storage medium, and a computer program product, all of which can be used to implement any resource allocation method provided by the present disclosure. The corresponding technical solutions and technical effects can be found in the corresponding records in the method section and will not be repeated here.

[0206] Figure 3 FIG. 1 is a block diagram of a resource allocation device provided by an embodiment of the present disclosure. Figure 3 As shown, the resource allocation device includes:

[0207] A first determining module 31 is configured to determine a resource request amount of each to-be-executed task in a to-be-executed task set in a time slot t, where t is an integer greater than or equal to 0;

[0208] A second determining module 32 is configured to determine, for any task to be executed, a utility function of the task to be executed in time slot t according to the resource request amount of the task to be executed in time slot t and the allocated resource amount of the task to be executed in time slot t;

[0209] The updating module 33 is used to determine the task to be executed with the fastest increase in utility among the tasks to be executed in response to the total amount of allocated resources in time slot t being less than the amount of allocatable resources in time slot t, based on the utility functions of the tasks to be executed in time slot t, and update the amount of allocated resources for the task to be executed with the fastest increase in utility in time slot t.

[0210] In a possible implementation, the apparatus further includes:

[0211] A third determining module is used to determine the remaining delay constraint time of each task to be executed in time slot t;

[0212] The fourth determining module is configured to determine, for any task to be executed, an initial value of the amount of allocated resources for the task to be executed in time slot t according to the remaining delay constraint time of the task to be executed in time slot t.

[0213] In a possible implementation, the fourth determining module is configured to:

[0214] An initial value of the allocated resource amount of the task to be executed in time slot t is determined according to the resource request amount of the task to be executed in time slot t and the remaining delay constraint time of the task to be executed in time slot t.

[0215] In a possible implementation, the fourth determining module is configured to:

[0216] Determine the difference between the remaining delay constraint time of the task to be executed in time slot t and the data transmission time of the task to be executed in time slot t;

[0217] An initial value of the amount of allocated resources for the task to be executed in time slot t is determined according to the ratio of the resource request amount of the task to be executed in time slot t to the difference.

[0218] In a possible implementation, the first determining module 31 is configured to:

[0219] For any task to be executed, a utility estimation function of the task to be executed in time slot t is determined, and the utility estimation function of the task to be executed in time slot t is maximized to obtain the resource request amount of the task to be executed in time slot t.

[0220] In one possible implementation,

[0221] The first determining module 31 is configured to: for any to-be-executed task, in response to the to-be-executed task having no unfinished predecessor task, determine a utility estimation function of the to-be-executed task in time slot t, and maximize the utility estimation function of the to-be-executed task in time slot t to obtain a resource request amount of the to-be-executed task in time slot t;

[0222] The apparatus further includes: a fifth determining module configured to determine, for any task to be executed, in response to the existence of an unfinished predecessor task for the task to be executed, a resource request amount of the task to be executed in time slot t as 0.

[0223] In a possible implementation, the first determining module 31 is configured to:

[0224] Determine an estimated amount of resource requested by the task to be executed in time slot t, and an estimated amount of resource allocated to the task to be executed in time slot t;

[0225] A utility estimation function of the task to be executed in time slot t is determined according to the estimated amount of resource request of the task to be executed in time slot t and the estimated amount of resource allocation of the task to be executed in time slot t.

[0226] In a possible implementation, the first determining module 31 is configured to:

[0227] When t is equal to 0, the estimated amount of resource request of the task to be executed in time slot t is determined as a preset value;

[0228] or,

[0229] When t is greater than 0, the estimated resource request amount of the task to be executed in time slot t is determined according to the resource request amount of the task to be executed in time slot t-1.

[0230] In a possible implementation, the apparatus further includes:

[0231] The sixth determining module is configured to determine the unit pricing of resources in time slot t according to the estimated resource requests of the tasks to be executed in time slot t.

[0232] In a possible implementation, the second determining module 32 is configured to:

[0233] The utility function of the task to be executed in time slot t is determined based on the resource request amount of the task to be executed in time slot t, the allocated resource amount of the task to be executed in time slot t, the data transmission time of the task to be executed in time slot t, and the unit pricing of resources in time slot t.

[0234] In a possible implementation, the second determining module 32 is configured to:

[0235] Determine a benefit function of the task to be executed in time slot t according to the resource request amount of the task to be executed in time slot t, the allocated resource amount of the task to be executed in time slot t, and the data transmission time of the task to be executed in time slot t;

[0236] Determining a cost function for the task to be executed in time slot t according to the resource request amount of the task to be executed in time slot t and the unit pricing of the resource in time slot t;

[0237] According to the benefit function of the task to be executed in time slot t and the cost function of the task to be executed in time slot t, the utility function of the task to be executed in time slot t is determined, wherein the utility function of the task to be executed in time slot t is positively correlated with the benefit function of the task to be executed in time slot t, and the utility function of the task to be executed in time slot t is negatively correlated with the cost function of the task to be executed in time slot t.

[0238] In a possible implementation, the data transmission time of the task to be executed in time slot t is determined according to the amount of data to be transmitted by the task to be executed in time slot t and the uplink transmission rate of the data transmission link of the task to be executed in time slot t.

[0239] In a possible implementation, the updating module 33 is configured to:

[0240] The amount of resources allocated to the task with the fastest utility increase in time slot t is increased by one resource unit.

[0241] In one possible implementation, the resources include computing resources and / or storage resources.

[0242] In a possible implementation, the computing resources include GPU computing resources, and the storage resources include video memory.

[0243] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. Its specific implementation and technical effects can refer to the description of the above method embodiments. For the sake of brevity, they will not be repeated here.

[0244] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the above method. The computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium.

[0245] The embodiment of the present disclosure further provides a computer program, comprising a computer-readable code. When the computer-readable code is executed in an electronic device, a processor in the electronic device executes the above method.

[0246] An embodiment of the present disclosure further provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in an electronic device, a processor in the electronic device executes the above method.

[0247] An embodiment of the present disclosure also provides an electronic device, comprising: one or more processors; a memory for storing executable instructions; wherein the one or more processors are configured to call the executable instructions stored in the memory to execute the above method.

[0248] The electronic device may be provided as a terminal, a server, or other forms of devices.

[0249] Figure 4 FIG1 shows a block diagram of an electronic device 1900 provided by an embodiment of the present disclosure. For example, the electronic device 1900 can be provided as a server or a terminal. Figure 4 The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute the instructions to perform the above-described method.

[0250] The electronic device 1900 may further include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958 (I / O interface). The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as a Microsoft Server operating system (Windows Server 2003). TM ), a graphical user interface operating system launched by Apple (MacOS X TM ), a multi-user, multi-process computer operating system (Unix TM ), a free and open source Unix-like operating system (Linux TM ), an open-source Unix-like operating system (FreeBSD TM ) or similar.

[0251] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.

[0252] The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0253] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.

[0254] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.

[0255] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, and conventional procedural programming languages ​​such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions. The electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0256] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0257] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0258] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0259] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the prescribed function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0260] The computer program product may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0261] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced with each other and will not be repeated herein for the sake of brevity.

[0262] If the technical solutions of the embodiments of the present disclosure involve personal information, the products applying the technical solutions of the embodiments of the present disclosure have clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solutions of the embodiments of the present disclosure involve sensitive personal information, the products applying the technical solutions of the embodiments of the present disclosure have obtained the individual's separate consent before processing the sensitive personal information, and at the same time meet the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that they agree to the collection of their personal information; or on the personal information processing device, when the personal information processing rules are notified by obvious signs / information, the individual's authorization is obtained through pop-up information or by asking the individual to upload their personal information. The personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.

[0263] While various embodiments of the present disclosure have been described above, the above descriptions are illustrative, non-exhaustive, and not intended to be limiting of the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A resource allocation method, characterized in that: include: Determine the resource request amount of each to-be-executed task in the to-be-executed task set in time slot t, where t is an integer greater than or equal to 0; For any task to be executed, determine a utility function of the task to be executed in time slot t according to the resource request amount of the task to be executed in time slot t and the allocated resource amount of the task to be executed in time slot t, wherein the utility function is positively correlated with the resource request amount and negatively correlated with the allocated resource amount; In response to the total amount of allocated resources in time slot t being less than the amount of allocatable resources in time slot t, the task to be executed with the fastest increase in utility among the tasks to be executed is determined based on the utility functions of the tasks to be executed in time slot t, and the amount of allocated resources in time slot t for the task to be executed with the fastest increase in utility is updated, wherein the task to be executed with the fastest increase in utility includes the task to be executed with the largest rate of change in utility, and the rate of change in utility is the derivative of the utility function of the task to be executed in time slot t with respect to the amount of allocated resources.

2. The method according to claim 1, characterized in that The method further comprises: Determine the remaining delay constraint time of each of the tasks to be executed in time slot t; For any task to be executed, an initial value of the amount of allocated resources for the task to be executed in time slot t is determined according to the remaining delay constraint time of the task to be executed in time slot t.

3. The method according to claim 2, characterized in that The determining, based on the remaining delay constraint time of the task to be executed in the time slot t, an initial value of the amount of allocated resources for the task to be executed in the time slot t, includes: An initial value of the allocated resource amount of the task to be executed in time slot t is determined according to the resource request amount of the task to be executed in time slot t and the remaining delay constraint time of the task to be executed in time slot t.

4. The method according to claim 3, characterized in that Determining an initial value of the amount of allocated resources for the task to be executed in time slot t according to the amount of resource requested by the task to be executed in time slot t and the remaining delay constraint time of the task to be executed in time slot t includes: Determine the difference between the remaining delay constraint time of the task to be executed in time slot t and the data transmission time of the task to be executed in time slot t; An initial value of the amount of allocated resources for the task to be executed in time slot t is determined according to the ratio of the resource request amount of the task to be executed in time slot t to the difference.

5. The method according to claim 1, wherein Determining the resource request amount of each to-be-executed task in the to-be-executed task set in time slot t includes: For any task to be executed, a utility estimation function of the task to be executed in time slot t is determined, and the utility estimation function of the task to be executed in time slot t is maximized to obtain the resource request amount of the task to be executed in time slot t.

6. The method according to claim 5, characterized in that The step of determining, for any task to be executed, a utility estimation function of the task to be executed in time slot t, and maximizing the utility estimation function of the task to be executed in time slot t to obtain a resource request amount of the task to be executed in time slot t includes: for any task to be executed, in response to the task to be executed having no unfinished predecessor task, determining the utility estimation function of the task to be executed in time slot t, and maximizing the utility estimation function of the task to be executed in time slot t to obtain a resource request amount of the task to be executed in time slot t; The method further includes: for any to-be-executed task, in response to the to-be-executed task having an unfinished predecessor task, determining the resource request amount of the to-be-executed task in time slot t to be 0.

7. The method according to claim 5, characterized in that Determining the utility estimation function of the task to be executed in time slot t includes: Determine an estimated amount of resource requested by the task to be executed in time slot t, and an estimated amount of resource allocated to the task to be executed in time slot t; A utility estimation function of the task to be executed in time slot t is determined according to the estimated amount of resource request of the task to be executed in time slot t and the estimated amount of resource allocation of the task to be executed in time slot t.

8. The method according to claim 7, characterized in that Determining the estimated amount of resource requests of the task to be executed in time slot t includes: When t is equal to 0, the estimated amount of resource request of the task to be executed in time slot t is determined as a preset value; or, When t is greater than 0, the estimated resource request amount of the task to be executed in time slot t is determined according to the resource request amount of the task to be executed in time slot t-1.

9. The method according to claim 7, characterized in that The method further comprises: The unit pricing of the resource in time slot t is determined according to the estimated resource request amount of each task to be executed in time slot t.

10. The method according to claim 1, characterized in that Determining the utility function of the task to be executed in time slot t according to the resource request amount of the task to be executed in time slot t and the allocated resource amount of the task to be executed in time slot t includes: The utility function of the task to be executed in time slot t is determined based on the resource request amount of the task to be executed in time slot t, the allocated resource amount of the task to be executed in time slot t, the data transmission time of the task to be executed in time slot t, and the unit pricing of resources in time slot t.

11. The method according to claim 10, characterized in that Determining the utility function of the task to be executed in time slot t according to the resource request amount of the task to be executed in time slot t, the allocated resource amount of the task to be executed in time slot t, the data transmission time of the task to be executed in time slot t, and the unit pricing of the resource in time slot t includes: Determine a benefit function of the task to be executed in time slot t according to the resource request amount of the task to be executed in time slot t, the allocated resource amount of the task to be executed in time slot t, and the data transmission time of the task to be executed in time slot t; Determining a cost function for the task to be executed in time slot t according to the resource request amount of the task to be executed in time slot t and the unit pricing of the resource in time slot t; According to the benefit function of the task to be executed in time slot t and the cost function of the task to be executed in time slot t, the utility function of the task to be executed in time slot t is determined, wherein the utility function of the task to be executed in time slot t is positively correlated with the benefit function of the task to be executed in time slot t, and the utility function of the task to be executed in time slot t is negatively correlated with the cost function of the task to be executed in time slot t.

12. The method according to claim 10, characterized in that The data transmission time of the task to be executed in time slot t is determined according to the amount of data to be transmitted of the task to be executed in time slot t and the uplink transmission rate of the data transmission link of the task to be executed in time slot t.

13. The method according to claim 1, wherein The updating of the amount of allocated resources of the to-be-executed task with the fastest utility increase in time slot t includes: The amount of resources allocated to the task with the fastest utility increase in time slot t is increased by one resource unit.

14. The method according to claim 1, wherein Resources include computing resources and / or storage resources.

15. The method according to claim 14, characterized in that The computing resources include GPU computing resources, and the storage resources include video memory.

16. A resource allocation device, characterized in that: include: A first determining module is configured to determine a resource request amount of each to-be-executed task in a to-be-executed task set in a time slot t, where t is an integer greater than or equal to 0; a second determining module, configured to determine, for any to-be-executed task, a utility function of the to-be-executed task in time slot t based on a resource request amount of the to-be-executed task in time slot t and an allocated resource amount of the to-be-executed task in time slot t, wherein the utility function is positively correlated with the resource request amount and negatively correlated with the allocated resource amount; An updating module is configured to determine, in response to the total amount of allocated resources in time slot t being less than the amount of allocatable resources in time slot t, a task to be executed with the fastest increase in utility among the tasks to be executed based on the utility functions of the tasks to be executed in time slot t, and to update the amount of allocated resources in time slot t for the task to be executed with the fastest increase in utility, wherein the task to be executed with the fastest increase in utility includes the task to be executed with the largest rate of change in utility, and the rate of change in utility is the derivative of the utility function of the task to be executed in time slot t with respect to the amount of allocated resources.

17. An electronic device, characterized in that: include: one or more processors; a memory for storing executable instructions; The one or more processors are configured to call the executable instructions stored in the memory to execute the method according to any one of claims 1 to 15.

18. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 15 is implemented.

19. A computer program product comprising computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, characterized in that: When the computer-readable code is executed in an electronic device, a processor in the electronic device executes the method according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • Method for scheduling and distributing resources in communication system and scheduler

    CN101841915A

  • Vehicle edge network dependency perception task unloading method based on game theory

    CN118509918A