Resource scheduling method and device, equipment, storage medium and product

By constructing CPU and GPU computing power containers and matrices, the resource status is accurately reflected, enabling flexible resource scheduling. This solves the problem of uneven CPU and GPU resource utilization and improves the overall utilization rate of the computing power system and the execution efficiency of computing tasks.

CN122309071APending Publication Date: 2026-06-30CHINA MOBILE GROUP JIANGSU +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILE GROUP JIANGSU
Filing Date
2026-03-30
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

The existing resource scheduling strategies of computing centers result in an imbalance between CPU and GPU resource usage, reducing resource utilization and the execution efficiency of computing tasks.

Method used

By acquiring the resource information of CPU and GPU in the computing power scheduling system, CPU computing power containers and GPU computing power containers are constructed, and they are divided into different regions according to computing power characteristics to generate CPU and GPU computing power matrices. Idle and busy computing power sides are determined, and resource scheduling is performed using a preset instruction conversion mechanism to avoid the migration of computing tasks.

Benefits of technology

It achieves efficient integration and flexible scheduling of CPU and GPU resources, improves resource utilization, enhances the execution efficiency of computing tasks, and avoids efficiency losses caused by resource migration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122309071A_ABST
    Figure CN122309071A_ABST
Patent Text Reader

Abstract

This invention discloses a resource scheduling method, apparatus, device, storage medium, and product. The method includes: acquiring resource information of CPU and GPU in a computing power scheduling system, and constructing corresponding computing power containers for CPU and GPU respectively; dividing CPU computing power units into different regions of the CPU computing power container based on their computing power characteristics to obtain target CPU computing power containers; similarly processing GPU computing power units to obtain target GPU computing power containers; further, converting the target containers into corresponding computing power matrices, determining idle and busy computing power sides based on the computing power matrices, and identifying the transferable computing power units of the idle computing power sides; and using a preset instruction conversion mechanism to convert the transferable computing power units into the computing power type of the busy side, thereby achieving resource scheduling. This invention can efficiently schedule CPU and GPU resources, reduce the amount of data synchronization between different computing power nodes, and improve the overall performance of the computing power system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of resource scheduling technology, and in particular to resource scheduling methods, apparatus, equipment, storage media and products. Background Technology

[0002] Currently, computing centers often employ the following scheduling strategy when processing computing tasks: based on the resource requirements of the computing task and the resource availability of the computing nodes, the computing task is assigned to a matching computing node. If a computing node experiences resource shortages during the execution of the computing task, the computing task needs to be migrated to another computing node.

[0003] However, different types of computing tasks have different requirements for computing resources. For example, some computing tasks require more central processing unit (CPU) resources, while others require more graphics processing unit (GPU) resources. Migrating computing tasks using the above scheduling strategy will lead to an imbalance in the use of CPU and GPU resources on computing nodes, reducing resource utilization. Furthermore, the migration process reduces the execution efficiency of computing tasks. Therefore, a more efficient resource scheduling method is urgently needed. Summary of the Invention

[0004] This invention provides a resource scheduling method, apparatus, device, storage medium, and product to solve the problems of uneven computing resource occupancy caused by existing scheduling strategies and low execution efficiency caused by task migration.

[0005] According to one aspect of the present invention, a resource scheduling method is provided, comprising: The resource information of the central processing unit (CPU) and graphics processing unit (GPU) in the computing power scheduling system is obtained, and CPU computing power containers and GPU computing power containers are constructed respectively based on the resource information; wherein, the computing power container includes several computing power units; Based on the computing power characteristics of the CPU computing power units in the CPU computing power container, the CPU computing power units in the CPU computing power container are divided into different regions in the CPU computing power container to obtain a target CPU computing power container; based on the computing power characteristics of the GPU computing power units in the GPU computing power container, the GPU computing power units in the GPU computing power container are divided into different regions in the GPU computing power container to obtain a target GPU computing power container; wherein, the computing power characteristics are used to characterize the computing power value and continuity of the computing power units; The target CPU computing power container and the target GPU computing power container are respectively converted into corresponding CPU computing power matrix and GPU computing power matrix; Based on the CPU computing power matrix and the GPU computing power matrix, the idle computing power side and the busy computing power side in the CPU and the GPU are determined respectively, as well as the transferable computing power units of the idle computing power side. Then, using a preset instruction conversion mechanism, the transferable computing power units are converted into the computing power type of the busy computing power side to complete resource scheduling.

[0006] According to another aspect of the present invention, a resource scheduling apparatus is provided, comprising: The computing power container construction module is used to obtain the resource information of the central processing unit (CPU) and the graphics processing unit (GPU) in the computing power scheduling system, and to construct CPU computing power containers and GPU computing power containers respectively based on the resource information; wherein, the computing power container includes several computing power units; The region partitioning module is used to divide the CPU computing power units in the CPU computing power container into different regions in the CPU computing power container according to the computing power characteristics of the CPU computing power units in the CPU computing power container, so as to obtain a target CPU computing power container; and to divide the GPU computing power units in the GPU computing power container into different regions in the GPU computing power container according to the computing power characteristics of the GPU computing power units in the GPU computing power container, so as to obtain a target GPU computing power container; wherein, the computing power characteristics are used to characterize the computing power value and continuity of the computing power units; The computing power matrix determination module is used to convert the target CPU computing power container and the target GPU computing power container into corresponding CPU computing power matrices and GPU computing power matrices, respectively. The resource scheduling module is used to determine the idle computing power side and the busy computing power side in the CPU and the GPU respectively, as well as the transferable computing power unit of the idle computing power side, according to the CPU computing power matrix and the GPU computing power matrix, and to convert the transferable computing power unit into the computing power type of the busy computing power side using a preset instruction conversion mechanism, so as to complete resource scheduling.

[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the resource scheduling method according to any embodiment of the present invention.

[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the resource scheduling method described in any embodiment of the present invention.

[0009] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the resource scheduling method described in any embodiment of the present invention.

[0010] The technical solution of this invention involves acquiring resource information of the central processing unit (CPU) and graphics processing unit (GPU) in a computing power scheduling system, and constructing CPU computing power containers and GPU computing power containers based on the resource information. Each computing power container includes several computing power units. Then, based on the computing power characteristics of the CPU computing power units in the CPU computing power container, the CPU computing power units are divided into different regions within the CPU computing power container to obtain a target CPU computing power container. Similarly, based on the computing power characteristics of the GPU computing power units in the GPU computing power container, the GPU computing power units are divided into different regions within the GPU computing power container to obtain a target GPU computing power container. The computing power characteristics characterize the computing power value and continuity of the computing power units. These steps achieve efficient integration of CPU and GPU resources, and by dividing the CPU and GPU computing power units according to their computing power values ​​and continuity, the target CPU computing power container is obtained. The computing power container and the target GPU computing power container can accurately reflect the current computing power status of CPU and GPU resources, thus providing guidance for matching computing power resources to various computing tasks in the future. By converting the target CPU computing power container and the target GPU computing power container into corresponding CPU computing power matrices and GPU computing power matrices, respectively, the distribution of computing power can be presented more accurately. Based on the CPU computing power matrix and the GPU computing power matrix, the idle computing power side and the busy computing power side in the CPU and GPU, as well as the transferable computing power units of the idle computing power side, can be quickly and accurately determined, improving the efficiency of resource analysis. Furthermore, by using a preset instruction conversion mechanism, the transferable computing power units are converted into the computing power type of the busy computing power side, realizing flexible resource scheduling, solving the problem of uneven CPU and GPU resource occupancy, improving the overall resource utilization rate of the computing power system, and avoiding the migration of computing tasks between different computing power nodes, thereby improving the execution efficiency of computing tasks.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

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

[0013] Figure 1 This is a flowchart of a resource scheduling method provided in Embodiment 1 of the present invention; Figure 2 This is a flowchart of a resource scheduling method provided in Embodiment 2 of the present invention. Figure 3 This is a schematic diagram of a computing power container provided according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a resource scheduling device according to Embodiment 3 of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device that implements the resource scheduling method of Embodiment 4 of the present invention. Detailed Implementation

[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0015] It should be noted that the terms "first," "second," and "target," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0016] Example 1 Figure 1This is a flowchart illustrating a resource scheduling method provided in Embodiment 1 of the present invention. This embodiment is applicable to the scheduling of computing resources in a computing power system. The method can be executed by a resource scheduling device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes: S101. Obtain the resource information of the central processing unit (CPU) and graphics processing unit (GPU) in the computing power scheduling system, and construct CPU computing power containers and GPU computing power containers respectively based on the resource information; wherein, the computing power container includes several computing power units.

[0017] In this embodiment, the computing power scheduling system can be a platform for managing and allocating various resources in the computing power system, such as a distributed cluster resource scheduling platform and a cloud resource scheduling platform. The computing power scheduling system can obtain various resources in the corresponding computing power system and the resource information corresponding to each resource, such as computing resources such as central processing unit (CPU) resources and graphics processing unit (GPU) resources, and the resource information corresponding to each computing resource. The resource information may include computing power information, such as the CPU computing power value corresponding to CPU resources and the GPU computing power value corresponding to GPU resources.

[0018] A computing power container can be a collection of resources. Specifically, a CPU computing power container can include several CPU computing power units. Each CPU computing power unit can be a pre-defined CPU computing power unit used to represent the minimum computing power. For example, each CPU core can be considered as a CPU computing power unit. Alternatively, CPU resources can be divided into multiple pseudo-CPU computing power units according to pre-defined CPU computing power units, with each pseudo-CPU computing power unit serving as a CPU computing power unit. Similarly, a GPU computing power container can include several GPU computing power units. Each GPU computing power unit can be a pre-defined GPU computing power unit used to represent the minimum computing power. For example, each stream processor can be considered as a GPU computing power unit. Alternatively, GPU resources can be divided into multiple pseudo-GPU computing power units according to pre-defined GPU computing power units, with each pseudo-GPU computing power unit serving as a GPU computing power unit.

[0019] For example, by reading the list of all hardware managed by the computing power scheduling system, the CPU computing power value corresponding to the CPU resources and the GPU computing power value corresponding to the GPU resources can be obtained; the CPU resources can be divided into several CPU computing power units based on the CPU computing power value, thereby forming a CPU computing power container; correspondingly, the GPU resources can be divided into several GPU computing power units based on the GPU computing power value, thereby forming a GPU computing power container.

[0020] S102. Based on the computing power characteristics of the CPU computing power units in the CPU computing power container, the CPU computing power units in the CPU computing power container are divided into different regions in the CPU computing power container to obtain the target CPU computing power container; based on the computing power characteristics of the GPU computing power units in the GPU computing power container, the GPU computing power units in the GPU computing power container are divided into different regions in the GPU computing power container to obtain the target GPU computing power container; wherein, the computing power characteristics are used to characterize the computing power value and continuity of the computing power units.

[0021] In this embodiment, the CPU computing power container may include different regions to store CPU computing power units with different computing power characteristics. The computing power characteristics of the CPU computing power units can be determined based on the computing power value corresponding to the CPU computing power unit and the continuity between each CPU computing power unit. The continuity can be determined based on the hardware topology relationship between the physical resources corresponding to each CPU computing power unit. For example, if the physical resources corresponding to two CPU computing power units belong to the same CPU processor, then these two CPU computing power units are continuous; otherwise, they are discontinuous. For example, based on the relationship between the computing power value of the CPU computing power unit and a first preset CPU computing power threshold, the CPU computing power units are divided. CPU computing power units with computing power values ​​greater than or equal to the first preset CPU computing power threshold are assigned to the same region of the CPU computing power container, and CPU computing power units with computing power values ​​less than the first preset CPU computing power threshold are assigned to another region of the CPU computing power container. For each region, the position of each CPU computing power unit can be further determined based on the continuity between the CPU computing power units, thereby obtaining the target CPU computing power container.

[0022] Correspondingly, the GPU computing power container can include different regions to store GPU computing power units with different computing power characteristics. The computing power characteristics of a GPU computing power unit can be determined based on its corresponding computing power value and the continuity between the GPU computing power units. Continuity can be determined based on the hardware topology relationship between the physical resources corresponding to each GPU computing power unit. For example, if the physical resources corresponding to two GPU computing power units belong to the same GPU processor, then these two GPU computing power units are continuous; otherwise, they are discontinuous. By dividing each GPU computing power unit in the GPU computing power container into corresponding regions according to its computing power characteristics, the target GPU computing power container is obtained. For example, based on the relationship between the computing power value of a GPU computing power unit and a first preset GPU computing power threshold, the GPU computing power units are divided. GPU computing power units with computing power values ​​greater than or equal to the first preset GPU computing power threshold are assigned to the same region of the GPU computing power container, while GPU computing power units with computing power values ​​less than the first preset GPU computing power threshold are assigned to another region of the GPU computing power container. For each region, the position of each GPU computing power unit can be further determined based on the continuity between the GPU computing power units, thereby obtaining the target GPU computing power container.

[0023] S103. Convert the target CPU computing power container and the target GPU computing power container into the corresponding CPU computing power matrix and GPU computing power matrix, respectively.

[0024] For example, the element values ​​in the CPU computing power matrix can be determined based on the occupancy status of the CPU computing power units in the target CPU computing power container. For instance, if the CPU computing power unit is not occupied, the element at the corresponding position in the CPU computing power matrix can be filled with 1; if the CPU computing power unit is occupied, the element at the corresponding position in the CPU computing power matrix can be filled with 0. Correspondingly, each element in the GPU computing power matrix is ​​filled according to the occupancy status of each GPU computing power unit in the GPU computing power container.

[0025] S104. Based on the CPU computing power matrix and the GPU computing power matrix, determine the idle computing power side and the busy computing power side in the CPU and GPU respectively, as well as the transferable computing power unit of the idle computing power side, and use the preset instruction conversion mechanism to convert the transferable computing power unit into the computing power type of the busy computing power side to complete resource scheduling.

[0026] In this embodiment, the idle and busy computing power sides of the CPU and GPU in the current computing power system can be determined based on the distribution of each element value in the CPU computing power matrix and GPU computing power matrix. For example, if the proportion of 0 values ​​in the CPU computing power matrix is ​​higher than the proportion of 0 values ​​in the GPU computing power matrix, then the CPU can be identified as the busy computing power side and the GPU as the idle computing power side. In order to alleviate the resource pressure on the busy computing power side, transferable computing power units can be selected from the target computing power containers corresponding to the idle computing power side, and a preset instruction conversion mechanism can be used to convert the transferable computing power units into the computing power type of the busy computing power side, thereby completing resource scheduling.

[0027] For example, if the CPU is an idle computing power source, then transferable computing power units can be selected from the target CPU computing power container according to their computing power values. For instance, to ensure the normal operation of the CPU, filtering conditions can be preset to select CPU computing power units with computing power values ​​less than a second preset CPU computing power threshold or that are discontinuous (which can be understood as fragmented CPU computing power units), and these units can be identified as transferable computing power units. Then, the GPU driver layer intercepts calls from upper-layer applications, such as calls to relevant application interfaces in the Compute Unified Device Architecture (CUDA) or Heterogeneous-Compute Interface for Portability (HIP), decomposing parallel computing tasks into CPU-executable instruction sequences, such as Single Instruction Multiple Data (SIMD) instruction sequences, and utilizing Open Multithreaded Programming Interface (Open Multithreaded Programming Interface). Multi-Processing (OpenMP) or thread pools can be used to achieve multi-core parallelism, while synchronizing the data in the video memory and the host memory through memory mapping, thereby enabling the CPU resources to complete the computing tasks that were originally performed by the GPU resources.

[0028] Correspondingly, if the GPU is an idle computing power source, then transferable computing power units can be selected from the target GPU computing power container according to their computing power values. For example, to ensure the normal operation of the GPU, corresponding filtering conditions can be preset to filter out GPU computing power units with computing power values ​​less than the second preset GPU computing power threshold or that are discontinuous (which can be understood as fragmented GPU computing power units), and these units can be identified as transferable computing power units. Then, the CPU instructions are rewritten into Parallel Thread Execution (PTX) or CUDA kernels by the relevant compiler, and the multi-threaded CPU tasks are reconstructed into GPU thread block networks by the relevant scheduler (e.g., TensorRT engine). The memory and video memory data streams are synchronized based on atomic operations through the Peripheral Component Interconnect Express (PCIe) standard, thereby enabling the GPU resources to complete the computing tasks that were originally executed by the CPU resources.

[0029] The above steps utilize a preset instruction conversion mechanism to convert the transferable computing power unit into the computing power type of the busy computing power party, realizing the mirror mapping of CPU resources and GPU resources. While ensuring data consistency, physical migration is avoided. This logical mapping-based alternative has a natural advantage in cross-regional deployment scenarios, and traditional data replication or migration solutions cannot match it in reducing synchronization overhead.

[0030] This embodiment provides a resource scheduling method. It acquires resource information of the CPU and GPU in a computing power scheduling system and constructs CPU computing power containers and GPU computing power containers based on this information. Each computing power container includes several computing power units. Then, based on the computing power characteristics of the CPU computing power units in the CPU computing power container, the CPU computing power units are divided into different regions within the CPU computing power container to obtain a target CPU computing power container. Similarly, based on the computing power characteristics of the GPU computing power units in the GPU computing power container, the GPU computing power units are divided into different regions within the GPU computing power container to obtain a target GPU computing power container. The computing power characteristics characterize the computing power value and continuity of the computing power units. These steps achieve efficient integration of CPU and GPU resources, and by dividing the CPU and GPU computing power units according to their computing power values ​​and continuity, the target CPU computing power container is obtained. The PU computing power container and the target GPU computing power container can accurately reflect the current computing power status of CPU and GPU resources, thus providing guidance for matching computing power resources to various computing tasks in the future. By converting the target CPU computing power container and the target GPU computing power container into corresponding CPU computing power matrices and GPU computing power matrices, respectively, the distribution of computing power can be presented more accurately. Based on the CPU computing power matrix and the GPU computing power matrix, the idle computing power side and the busy computing power side in the CPU and GPU, as well as the transferable computing power units of the idle computing power side, can be quickly and accurately determined, improving the efficiency of resource analysis. Furthermore, by using a preset instruction conversion mechanism, the transferable computing power units are converted into the computing power type of the busy computing power side, realizing flexible resource scheduling, solving the problem of uneven CPU and GPU resource occupancy, improving the overall resource utilization rate of the computing power system, and avoiding the migration of computing tasks between different computing power nodes, thereby improving the execution efficiency of computing tasks.

[0031] In some embodiments, the resource information includes computing power information and quantity information of CPU computing power units, and computing power information and quantity information of GPU computing power units; wherein, the step of constructing CPU computing power containers and GPU computing power containers according to the resource information includes the following steps A1 to A2: A1. Construct a CPU computing power container based on the computing power information and quantity information of the CPU computing power units; wherein, the width of the CPU computing power container is determined based on the computing power information of the CPU computing power units, a preset atomic quantity, and a first preset computing power allocation weight; the height of the CPU computing power container is determined based on the quantity information of the CPU computing power units; wherein, the preset atomic quantity is the computing power value corresponding to the smallest task slice used by the computing power scheduling system when dividing the computing task into time slices.

[0032] In this embodiment, the computing power information of a CPU computing power unit can be the CPU computing power value corresponding to that CPU computing power unit. A preset atomic quantity can be pre-set, serving as the smallest benchmark unit for task sharding and computing power allocation in the computing power scheduling system. All computing tasks' computing power allocation and time slice division are based on this preset atomic quantity and divided into integer multiples. To ensure a unified computing power measurement system, the value of the preset atomic quantity can remain unchanged when determining the width of the GPU computing power container. A first preset computing power allocation weight can be pre-set according to the performance requirements of the computing power system. It is used to balance the computing power supply capacity of the CPU computing power container with the system's reserved or redundant requirements, ensuring that the width of the CPU computing power container can both adapt to the computing power requirements of the computing tasks and avoid excessive consumption of hardware resources, which could lead to a decrease in system stability.

[0033] For each CPU computing power unit, the ratio of the CPU computing power value to the product of the preset atomic quantity and the first preset computing power allocation weight can be calculated to obtain the corresponding CPU row width value. The maximum value among the CPU row width values ​​is then used as the width value of the CPU computing power container. The calculation process is as follows: ; ; in, Representing the The CPU row width value corresponding to each CPU computing unit; Representing the The CPU computing power value corresponding to each CPU computing unit; This represents the first preset computing power allocation weight; Represents the preset atomic weight; It represents rounding up; This represents the width of the CPU computing power container. This represents the number of CPU computing units, and can be used as the height value of the CPU computing container; the container of the CPU computing container can be determined by the product of the width and height values ​​of the CPU computing container.

[0034] A2. Construct a GPU computing power container based on the computing power information and quantity information of the GPU computing power units; wherein, the width of the GPU computing power container is determined based on the computing power information of the GPU computing power units, the preset atomic quantity, and the second preset computing power allocation weight; the height of the GPU computing power container is determined based on the quantity information of the GPU computing power units.

[0035] Correspondingly, the computing power information of a GPU computing power unit can be the GPU computing power value corresponding to that GPU computing power unit. The second preset computing power allocation weight can be preset according to the performance requirements of the computing power system. It is used to balance the computing power supply capacity of the GPU computing power container with the system's reserved or redundant requirements, ensuring that the width of the GPU computing power container can both adapt to the computing power requirements of the computing tasks and avoid excessive occupation of hardware resources, which would lead to a decrease in system stability.

[0036] For each GPU computing power unit, the ratio of the GPU computing power value to the product of the preset atomic quantity and the second preset computing power allocation weight can be calculated to obtain the corresponding GPU row width value. The maximum value among the GPU row width values ​​is then used as the width value of the GPU computing power container. The calculation process is as follows: ; ; in, Representing the The GPU row width value corresponding to each GPU computing unit; Representing the The GPU computing power value corresponding to each GPU computing unit; This represents the second preset computing power allocation weight; Represents the preset atomic weight; It represents rounding up; The width value representing the GPU computing power container; This represents the number of GPU computing units and can be used as the height value of the GPU computing container. The container of the GPU computing container can be determined by the product of the width and height values ​​of the GPU computing container.

[0037] This invention implements the construction of CPU computing power containers and GPU computing power containers. By using a unified preset atomic quantity as the minimum computing power sharding benchmark, it achieves standardized management of heterogeneous resources of CPU and GPU, enabling different hardware computing power to adapt to task time slice division under the same computing power measurement system. By constructing computing power containers, it achieves fine-grained management of computing power units, and uses the width of the computing power container to represent the computing power of a single computing power unit, and uses the height of the computing power container to represent the number of computing power units, providing a foundation for the subsequent generation of computing power matrices for efficient scheduling of computing resources.

[0038] Example 2 Figure 2This is a flowchart of a resource scheduling method provided in Embodiment 2 of the present invention, which is a further refinement based on the above embodiments. In this embodiment, the computing power characteristics of the CPU computing power unit include the CPU computing power value of the CPU computing power unit; the computing power characteristics of the GPU computing power unit include single-column similarity and single-column length; the single-column similarity is the similarity between single-column GPU computing power units in the GPU computing power container; the single-column length is the column length of a single-column computing power unit in the GPU computing power container; the computing power container is divided into two triangular regions according to the diagonal. Figure 2 As shown, the method includes: S201. Obtain the resource information of the central processing unit (CPU) and graphics processing unit (GPU) in the computing power scheduling system, and construct CPU computing power containers and GPU computing power containers respectively based on the resource information; wherein, the computing power container includes several computing power units.

[0039] S202. CPU computing power units with CPU computing power values ​​greater than or equal to preset computing power values ​​are assigned to the first triangular region of the CPU computing power container, and CPU computing power units with CPU computing power values ​​less than preset computing power values ​​are assigned to the second triangular region of the CPU computing power container to obtain the target CPU computing power container.

[0040] An exemplary schematic diagram of the target CPU computing power container is shown below. Figure 3 The CPU container CV is shown in the figure. SP in the figure is a Streaming Processor (SP). SP is used in the figure to represent CPU computing power unit or GPU computing power unit. Figure 3 The triangular area to the left of the diagonal of the CPU container CV (which may include the SP area and the unused SP area) is the first triangular area of ​​the CPU computing power container. This area can store CPU computing power units capable of performing large-scale or long-term tasks. Figure 3 The triangular area to the right of the diagonal of the CPU container CV (which may include the area for discarding fragments and the area for replenishing fragments with new resources) is the second triangular area of ​​the CPU computing power container. This area can store CPU computing power units suitable for performing small-scale or short-term tasks.

[0041] Specifically, for the CPU computing power container, CPU computing power units with CPU computing power values ​​greater than or equal to a preset computing power value are assigned to the first triangular area of ​​the CPU computing power container, and CPU computing power units with CPU computing power values ​​less than the preset computing power value are assigned to the second triangular area of ​​the CPU computing power container. The preset computing power value can be set in advance, and it can be set according to the computing power value corresponding to the high-performance CPU computing power unit. The CPU computing power value can be determined according to the number of CPU instructions that the CPU computing power unit can execute within a preset time.

[0042] S203. GPU computing power units with a single column similarity greater than or equal to a preset similarity threshold and a single column length greater than or equal to a preset length threshold are assigned to the first triangular region of the GPU computing power container; GPU computing power units with a single column similarity less than a preset similarity threshold or a single column length less than a first preset length threshold are assigned to the second triangular region of the GPU computing power container to obtain the target GPU computing power container.

[0043] An exemplary schematic diagram of the target GPU computing power container is shown below. Figure 3 As shown in the GPU container GV, the triangular area on the left diagonal of the GPU container GV (which may include areas with used SPs and areas without used SPs) is the first triangular area of ​​the GPU computing power container. This area can store GPU computing power units capable of performing large-scale or long-term tasks. The triangular area on the right diagonal of the GPU container GV (which may include areas for discarding fragments and areas for replenishing fragments with new resources) is the second triangular area of ​​the GPU computing power container. This area can store GPU computing power units suitable for performing small-scale or short-term tasks.

[0044] Specifically, GPU computing power units with a single-column similarity greater than or equal to a preset similarity threshold and a single-column length greater than or equal to a preset length threshold are assigned to the first triangular region of the GPU computing power container; GPU computing power units with a single-column similarity less than a preset similarity threshold or a single-column length less than a first preset length threshold are assigned to the second triangular region of the GPU computing power container; wherein, single-column similarity refers to the similarity between GPU computing power units in a single column of the GPU computing power container, that is, the similarity between each SP in a single SP column, and the similarity can be determined according to the GPU manufacturing process and driver type; the preset similarity threshold can be preset in combination with the GPU hardware situation; single-column length refers to the column length of a single computing power unit in a single column of the GPU computing power container, that is, the single SP column length; the first preset length threshold can be determined according to the average column length of each GPU computing power unit, that is, the average single SP column length.

[0045] S204. Sort the CPU computing units in the first triangular region and the second triangular region of the target CPU computing power container according to the first preset rule, and determine the CPU computing power matrix based on the sorting result.

[0046] In this embodiment, the first preset rule can be determined based on at least one of the following: the computing power value of the CPU computing power unit in the target CPU computing power container, the occupancy status, and the continuity between CPU computing power units; by sorting the CPU computing power units in the first triangular region and the second triangular region in the target CPU computing power container according to the first preset rule, a corresponding CPU computing power matrix is ​​constructed based on the sorting result.

[0047] Optionally, this step includes: for the target CPU computing power container, determining the length of the first column of each CPU computing power unit based on the occupancy of each column of CPU computing power units; arranging the CPU computing power units in the first triangular region of the target CPU computing power container in reverse order according to the first column length, and arranging the CPU computing power units in the second triangular region of the target CPU computing power container in ascending order; and generating a CPU computing power matrix based on the sorting result and the width and height of the target CPU computing power container.

[0048] For example, for each column of CPU computing units in the target CPU computing power container, the number of currently unoccupied computing units is counted, and this number is used as the length of the first column. The length of the first column can represent the actual available computing power of the CPU computing units in that column. The dimensions of the CPU computing power matrix correspond to the width and height of the target CPU computing power container. For example, the width of each row in the target CPU computing power container is... Each row of the CPU computing power matrix Each element.

[0049] Specifically, for the first triangular region of the target CPU computing power container, the CPUs can be sorted according to the length of the single column SP within the region, following a sorting rule from largest to smallest. In each row, from left to right, 1 is filled in the CPU computing power matrix position corresponding to the unoccupied CPU computing power unit, and 0 is filled in the CPU computing power matrix position corresponding to the occupied CPU computing power unit. For the second triangular region of the target CPU computing power container, the CPUs can be sorted according to the length of the single column SP within the region, following a sorting rule from smallest to largest. In each row, from right to left, 1 is filled in the CPU computing power matrix position corresponding to the unoccupied CPU computing power unit, and 0 is filled in the CPU computing power matrix position corresponding to the occupied CPU computing power unit, thereby generating the CPU computing power matrix.

[0050] S205. Sort the GPU computing units in the first triangular region and the second triangular region of the target GPU computing power container according to the second preset rule, and determine the GPU computing power matrix based on the sorting result.

[0051] In this embodiment, the second preset rule can be determined based on at least one of the following: the computing power value of the GPU computing power unit in the target GPU computing power container, the occupancy status, and the continuity between the GPU computing power units; by sorting the GPU computing power units in the first triangular region and the second triangular region in the target GPU computing power container according to the second preset rule, a corresponding GPU computing power matrix is ​​constructed based on the sorting result.

[0052] Optionally, this step includes: for the target GPU computing power container, determining the second column length of each column of GPU computing power units based on the occupancy of each column of GPU computing power units; arranging the columns of GPU computing power units in the first triangular region of the target GPU computing power container in reverse order according to the second column length, and arranging the columns of GPU computing power units in the second triangular region of the target GPU computing power container in ascending order; and generating a GPU computing power matrix based on the sorting result and the width and height of the target GPU computing power container.

[0053] For example, for each column of GPU computing units in the target GPU computing power container, the number of currently unoccupied computing units is counted, and this number is used as the length of the second column. The length of the second column can represent the actual available computing power of the GPU computing units in that column. The dimensions of the GPU computing power matrix correspond to the width and height of the target GPU computing power container. For example, the width of each row in the target GPU computing power container is... Each row of the GPU computing power matrix Each element.

[0054] Specifically, for the first triangular region of the target GPU computing power container, the data can be sorted according to the length of the single column SP within the region, following a descending sorting rule. In each row, from left to right, 1 is filled in the GPU computing power matrix position corresponding to the unoccupied GPU computing power unit, and 0 is filled in the GPU computing power matrix position corresponding to the occupied GPU computing power unit. For the second triangular region of the target GPU computing power container, the data can be sorted according to the length of the single column SP within the region, following a descending sorting rule. In each row, from right to left, 1 is filled in the GPU computing power matrix position corresponding to the unoccupied GPU computing power unit, and 0 is filled in the GPU computing power matrix position corresponding to the occupied GPU computing power unit, thereby generating the GPU computing power matrix.

[0055] The above steps generate CPU and GPU computing power matrices, respectively, enabling a quantitative display of the actual available computing power of computing units. This provides a foundation for balancing CPU and GPU resources and allocating computing power to computing tasks. By centrally clustering the first triangular region of the target computing power container in reverse column order and the second triangular region in forward order, the computing power resources can present an orderly distribution at both ends and a balanced distribution in the middle, avoiding resource fragmentation. Furthermore, by mapping the target computing power container to a computing power matrix, a unified quantitative representation of computing and storage resources is achieved, which has irreplaceable value and wide application value in the context of integrated storage and computing.

[0056] S206. Based on the data distribution information of different triangular regions in the CPU computing power matrix and GPU computing power matrix, determine the idle computing power side and busy computing power side in the CPU and GPU, as well as the transferable computing power unit of the idle computing power side.

[0057] Specifically, based on the data distribution information of different triangular regions in the CPU computing power matrix and GPU computing power matrix, the idle computing power side and busy computing power side in the CPU and GPU, as well as the transferable computing power units of the idle computing power side, are determined respectively.

[0058] In this embodiment, the data distribution information can characterize the current computing power status, which may include information such as the number, location, and density of unoccupied and occupied computing power units, providing a data basis for subsequent computing power allocation or computing power balancing.

[0059] Optionally, based on the data distribution information of different triangular regions in the CPU computing power matrix and the GPU computing power matrix, the idle computing power side and the busy computing power side in the CPU and the GPU, as well as the transferable computing power units of the idle computing power side, are determined respectively, including the following steps B1 to B4: B1. Determine the CPU stress value based on the data distribution information of the first and second triangular regions in the CPU computing power matrix.

[0060] In this embodiment, the CPU stress value can be determined based on the data distribution information of the first and second triangular regions in the CPU computing power matrix and the CPU resource requirements of the computing task. The data distribution information of the first triangular region in the CPU computing power matrix can be determined based on the usage of CPU computing units (corresponding to SPs in this embodiment) within the first triangular region of the target CPU computing power container. The data distribution information of the second triangular region in the CPU computing power matrix can be determined based on the usage of CPU computing units within the second triangular region of the target CPU computing power container. The CPU resource requirements of the computing task can be determined based on the total number of SPs required by the computing task, which is generally an input / output intensive task.

[0061] Specifically, by reading the used SP information and unused SP information in the target CPU computing power container, the number of used SPs and unused SPs is counted, and the CPU stress value is calculated based on the number of used SPs and unused SPs.

[0062] For example, for the first triangular region in the target CPU computing power container, the product of a first preset coefficient (which can be preset and is used to adjust the computing power throughput) and the number of preset type SPs (which can be understood as SPs used for logical judgment or input / output operations) can be calculated. Then, the ratio of this product to the memory bandwidth is used to determine the length of the first SP column. SPs with a length greater than or equal to the length of the first SP column are selected from the first triangular region and allocated to the computing task. For the second triangular region in the target CPU computing power container, the product of the first preset coefficient and the number of occupied SPs can be calculated. Then, the sum of the memory bandwidth and the second preset coefficient (which can be preset and is used to flexibly adjust the memory bandwidth and reserve memory bandwidth for sudden input / output tasks in the computing power system) can be calculated. Then, the ratio of the product to the sum is used to determine the number of first SPs that the second triangular region can provide. SPs with the first number of first SPs are selected from the second triangular region and allocated to the computing task. Finally, the CPU pressure value is determined based on the ratio between the number of unallocated SPs and the number of allocated SPs.

[0063] B2. Determine the GPU stress value based on the data distribution information of the first and second triangular regions in the GPU computing power matrix.

[0064] Accordingly, the GPU stress value can be determined based on the data distribution information of the first and second triangular regions in the GPU computing power matrix and the GPU resource requirements of the computing task. The data distribution information of the first triangular region in the GPU computing power matrix can be determined based on the usage of GPU computing units (corresponding to SPs in this embodiment) within the first triangular region of the target GPU computing power container. The data distribution information of the second triangular region in the GPU computing power matrix can be determined based on the usage of GPU computing units within the second triangular region of the target GPU computing power container. The CPU resource requirements of the computing task can be determined based on the total number of SPs required by the computing task, which is generally a computationally intensive task.

[0065] Specifically, by reading the used SP information and unused SP information in the target GPU computing power container, the number of used SPs and unused SPs is counted, and the GPU stress value is calculated based on the number of used SPs and unused SPs.

[0066] For example, for the first triangular region in the target GPU computing power container, the first difference between the total number of SPs required by the task and the number of SPs of a preset type (which can be understood as the number of SPs used for logical judgment or input / output operations) can be calculated. Then, based on the ratio of the first difference to the computing power value of a single column of SPs, the length of a single column of second SPs can be determined. SPs with a length greater than or equal to the length of the second column of SPs can be selected from the first triangular region and allocated to the computing task. For the second triangular region in the target GPU computing power container, the number of second SPs that the second triangular region can provide can be determined based on the ratio of the total number of SPs required by the task to the minimum computing power value of the SPs in the second triangular region. SPs with the second number of second SPs can be selected from the second triangular region and allocated to the computing task. Finally, the GPU stress value can be determined based on the ratio between the number of unallocated SPs and the number of allocated SPs.

[0067] B3. Based on the relationship between the CPU stress value and the GPU stress value, determine the idle computing power side and the busy computing power side of the CPU and the GPU.

[0068] For example, if the CPU stress value is greater than or equal to the GPU stress value, the CPU is identified as the busy computing power side and the GPU is identified as the idle computing power side; correspondingly, if the CPU stress value is less than the GPU stress value, the GPU is identified as the busy computing power side and the CPU is identified as the idle computing power side.

[0069] B4. Select computing units that meet preset transfer conditions from the preset area in the target computing container corresponding to the idle computing power source, and determine the computing power units as transferable computing power units; wherein, the number of transferable computing power units is determined according to the difference between the CPU pressure value and the GPU pressure value; the preset transfer conditions are determined according to the length of the third column of the single-column computing power unit in the target computing power container and the required computing power value of the busy computing power source.

[0070] In this embodiment, the preset transfer conditions can be determined based on the length of the third column of a single column of computing power units in the target computing power container and the required computing power value of the busy computing power side. For example, if the CPU is an idle computing power side and the GPU is a busy computing power side, the preset transfer conditions can be determined based on the length of the third column of a single column of computing power units in the target CPU computing power container (which can be determined based on the number of unoccupied CPU computing power units) and the required computing power value of the GPU. Correspondingly, if the GPU is an idle computing power side and the CPU is a busy computing power side, the preset transfer conditions can be determined based on the length of the third column of a single column of computing power units in the target GPU computing power container (which can be determined based on the number of unoccupied GPU computing power units) and the required computing power value of the CPU.

[0071] The computing units in the preset area can serve as supplementary computing power for busy computing power providers. If the CPU is an idle computing power provider, the preset area corresponds to... Figure 3 In the CPU container CV's scrapped fragmentation area, the CPU can use the flow channel to send its scrapped fragments to the GPU's fragmentation and new resource replenishment area via the CPU output channel CO; if the GPU is an idle computing power source, the preset area corresponds to... Figure 3 In the GPU container GV's scrapping fragmentation area, the GPU can use the flow channel to transfer its scrapping fragments to the CPU's fragmentation and new resource replenishment area via the GPU output channel GO. The size of the flow channel during the transfer process can be determined based on the number of transferable computing power units, i.e., based on the difference between the CPU stress value and the GPU stress value. For example, the absolute value of the difference between the CPU stress value and the GPU stress value can be multiplied by a preset atomic quantity as the size of the flow channel, thereby achieving dynamic control of the flow channel.

[0072] Optionally, a transfer threshold can be set. When the difference between the CPU stress value and the GPU stress value is greater than or equal to the transfer threshold, the process is triggered to transfer the discarded fragments from the idle computing power side to the fragments and new resource replenishment area of ​​the busy computing power side through the output channel of the idle computing power side. This makes the resource replenishment process more reasonable, avoids frequent resource transfers due to small stress differences, reduces system scheduling overhead, and further improves the rationality of computing power scheduling and system operation stability.

[0073] The above steps can determine the resource allocation status in the computing power system based on the stress values ​​of the CPU and GPU, and determine the number of transferable computing power units by combining the difference between the CPU stress value and the GPU stress value. Then, the corresponding output channels are used to supplement the computing power of busy computing power units, thus realizing the dynamic balance between CPU computing power and GPU computing power.

[0074] S207. Based on the CPU computing power matrix and the GPU computing power matrix, determine the idle computing power side and the busy computing power side in the CPU and GPU respectively, as well as the transferable computing power unit of the idle computing power side, and use the preset instruction conversion mechanism to convert the transferable computing power unit into the computing power type of the busy computing power side to complete resource scheduling.

[0075] This invention divides CPU computing power units into corresponding triangular regions based on CPU computing power values, realizing the division of CPU computing power units according to computing power capabilities, which facilitates resource allocation according to the resource requirements of computing tasks. Based on single-column similarity and single-column length, GPU computing power units are divided into corresponding triangular regions, enabling GPU computing power units with similar performance and sufficient resources to be grouped into the same triangular region, improving parallel execution efficiency. For CPU and GPU computing power containers, a double-triangular structure is formed by diagonal division, and a matrix is ​​generated by sorting according to corresponding preset rules, allowing computing power resources to present a centralized and condensed distribution, ensuring the uniformity of resource characteristics within the region, and providing a foundation for achieving rapid resource migration and load balancing.

[0076] In some embodiments, the preset region exists in the second triangular region of the target computing power container; the preset region is used to store computing power units that meet preset fragmented computing power conditions selected from the first triangular region of the target computing power container during resource scheduling; the preset fragmented computing power conditions are determined based on the length of the fourth column of the single-column computing power unit in the target computing power container.

[0077] In this embodiment, the preset fragmented computing power condition can be that the length of the fourth column of a single column of computing power units in the target computing power container is less than a second preset length threshold; wherein, the length of the fourth column can be determined based on the number of unoccupied computing power units in the target computing power container corresponding to the idle computing power party.

[0078] For example, during resource scheduling, computing units whose fourth column length is less than a second preset length threshold (i.e., discarded fragments) are selected from the first triangular region of the target computing power container. These computing units are stored in a preset region so that the computing units in the preset region can be transferred to busy computing power locations in the future, thereby improving the utilization rate of resources in the computing power system.

[0079] Example 3 Figure 4 This is a schematic diagram of a resource scheduling device provided in Embodiment 3 of the present invention. Figure 4 As shown, the device includes: a computing power container construction module 401, a region partitioning module 402, a computing power matrix determination module 403, and a resource scheduling module 404.

[0080] The computing power container construction module is used to obtain the resource information of the central processing unit (CPU) and the graphics processing unit (GPU) in the computing power scheduling system, and to construct CPU computing power containers and GPU computing power containers respectively based on the resource information; wherein, the computing power container includes several computing power units; The region partitioning module is used to divide the CPU computing power units in the CPU computing power container into different regions in the CPU computing power container according to the computing power characteristics of the CPU computing power units in the CPU computing power container, so as to obtain a target CPU computing power container; and to divide the GPU computing power units in the GPU computing power container into different regions in the GPU computing power container according to the computing power characteristics of the GPU computing power units in the GPU computing power container, so as to obtain a target GPU computing power container; wherein, the computing power characteristics are used to characterize the computing power value and continuity of the computing power units; The computing power matrix determination module is used to convert the target CPU computing power container and the target GPU computing power container into corresponding CPU computing power matrices and GPU computing power matrices, respectively. The resource scheduling module is used to determine the idle computing power side and the busy computing power side in the CPU and the GPU respectively, as well as the transferable computing power unit of the idle computing power side, according to the CPU computing power matrix and the GPU computing power matrix, and to convert the transferable computing power unit into the computing power type of the busy computing power side using a preset instruction conversion mechanism, so as to complete resource scheduling.

[0081] This embodiment provides a resource scheduling device that acquires resource information of the central processing unit (CPU) and graphics processing unit (GPU) in a computing power scheduling system, and constructs CPU computing power containers and GPU computing power containers based on the resource information. Each computing power container includes several computing power units. Then, based on the computing power characteristics of the CPU computing power units in the CPU computing power container, the CPU computing power units are divided into different regions within the CPU computing power container to obtain a target CPU computing power container. Similarly, based on the computing power characteristics of the GPU computing power units in the GPU computing power container, the GPU computing power units are divided into different regions within the GPU computing power container to obtain a target GPU computing power container. The computing power characteristics characterize the computing power value and continuity of the computing power units. These steps achieve efficient integration of CPU and GPU resources, and by dividing the CPU and GPU computing power units according to their computing power values ​​and continuity, the target CPU computing power container is obtained. The PU computing power container and the target GPU computing power container can accurately reflect the current computing power status of CPU and GPU resources, thus providing guidance for matching computing power resources to various computing tasks in the future. By converting the target CPU computing power container and the target GPU computing power container into corresponding CPU computing power matrices and GPU computing power matrices, respectively, the distribution of computing power can be presented more accurately. Based on the CPU computing power matrix and the GPU computing power matrix, the idle computing power side and the busy computing power side in the CPU and GPU, as well as the transferable computing power units of the idle computing power side, can be quickly and accurately determined, improving the efficiency of resource analysis. Furthermore, by using a preset instruction conversion mechanism, the transferable computing power units are converted into the computing power type of the busy computing power side, realizing flexible resource scheduling, solving the problem of uneven CPU and GPU resource occupancy, improving the overall resource utilization rate of the computing power system, and avoiding the migration of computing tasks between different computing power nodes, thereby improving the execution efficiency of computing tasks.

[0082] Optionally, the resource information includes computing power information and quantity information of CPU computing power units, and computing power information and quantity information of GPU computing power units; the computing power container construction module includes: The resource information acquisition unit is used to acquire resource information of the central processing unit (CPU) and graphics processing unit (GPU) in the computing power scheduling system; A CPU computing power container construction unit is used to construct a CPU computing power container based on the computing power information and quantity information of CPU computing power units. The width of the CPU computing power container is determined based on the computing power information of the CPU computing power units, a preset atomic quantity, and a first preset computing power allocation weight. The height of the CPU computing power container is determined based on the quantity information of the CPU computing power units. The preset atomic quantity is the computing power value corresponding to the smallest task slice used by the computing power scheduling system when dividing computing tasks into time slices. A GPU computing power container construction unit is used to construct a GPU computing power container based on the computing power information and quantity information of GPU computing power units; wherein, the width of the GPU computing power container is determined based on the computing power information of the GPU computing power units, a preset atomic quantity, and a second preset computing power allocation weight; and the height of the GPU computing power container is determined based on the quantity information of the GPU computing power units.

[0083] Optionally, the computing power characteristics of the CPU computing power unit include the CPU computing power value of the CPU computing power unit; the computing power characteristics of the GPU computing power unit include single-column similarity and single-column length; the single-column similarity is the similarity between single-column GPU computing power units in the GPU computing power container; the single-column length is the column length of a single-column computing power unit in the GPU computing power container; the computing power container is divided into two triangular regions according to the diagonal; the region division module includes: The CPU region partitioning unit is used to partition CPU computing power units with CPU computing power values ​​greater than or equal to a preset computing power value into the first triangular region of the CPU computing power container, and to partition CPU computing power units with CPU computing power values ​​less than the preset computing power value into the second triangular region of the CPU computing power container, so as to obtain the target CPU computing power container. The GPU region partitioning unit is used to partition GPU computing power units with a single column similarity greater than or equal to a preset similarity threshold and a single column length greater than or equal to a preset length threshold into the first triangular region of the GPU computing power container; and to partition GPU computing power units with a single column similarity less than the preset similarity threshold or a single column length less than the first preset length threshold into the second triangular region of the GPU computing power container to obtain the target GPU computing power container. Optionally, the computing power matrix determination module includes: The CPU computing power matrix determination unit is used to sort the CPU computing power units in the first triangular region and the second triangular region of the target CPU computing power container according to the first preset rule, and determine the CPU computing power matrix based on the sorting result. The GPU computing power matrix determination unit is used to sort the GPU computing power units in the first triangular region and the second triangular region of the target GPU computing power container according to the second preset rule, and determine the GPU computing power matrix based on the sorting result. Optionally, the CPU computing power matrix determination unit includes: The first column length determination sub-unit is used to determine the length of the first column of each CPU computing power unit based on the occupancy of each column of CPU computing power units for the target CPU computing power container. The first arrangement subunit is used to arrange the CPU computing units in the first triangular region of the target CPU computing power container in reverse order according to the length of the first column, and to arrange the CPU computing units in the second triangular region of the target CPU computing power container in forward order. The CPU computing power matrix generation sub-unit is used to generate a CPU computing power matrix based on the sorting results and the width and height of the target CPU computing power container. Optionally, the GPU computing power matrix determination unit includes: The second column length determination sub-unit is used to determine the second column length of each GPU computing power unit based on the occupancy of each column of GPU computing power units for the target GPU computing power container. The second arrangement subunit is used to arrange the GPU computing units in the first triangular region of the target GPU computing power container in reverse order according to the length of the second column, and to arrange the GPU computing units in the second triangular region of the target GPU computing power container in forward order. The GPU computing power matrix generation sub-unit is used to generate a GPU computing power matrix based on the sorting results and the width and height of the target GPU computing power container. Optionally, the resource scheduling module is specifically used to: determine the idle computing power side and the busy computing power side in the CPU and the GPU respectively, as well as the transferable computing power unit of the idle computing power side, based on the data distribution information of different triangular regions in the CPU computing power matrix and the GPU computing power matrix, and use a preset instruction conversion mechanism to convert the transferable computing power unit into the computing power type of the busy computing power side, so as to complete the resource scheduling.

[0084] Optionally, the resource scheduling module includes: The CPU stress value determination unit is used to determine the CPU stress value based on the data distribution information of the first triangular region and the second triangular region in the CPU computing power matrix. The GPU stress value determination unit is used to determine the GPU stress value based on the data distribution information of the first triangular region and the second triangular region in the GPU computing power matrix. The stress value comparison unit is used to determine the idle computing power side and the busy computing power side of the CPU and the GPU based on the relationship between the CPU stress value and the GPU stress value. A computing power filtering unit is used to filter out computing power units that meet preset transfer conditions from a preset area in the target computing power container corresponding to the idle computing power source, and to determine the computing power units as transferable computing power units; wherein, the number of transferable computing power units is determined based on the difference between the CPU pressure value and the GPU pressure value; the preset transfer conditions are determined based on the length of the third column of a single column of computing power units in the target computing power container and the required computing power value of the busy computing power source.

[0085] Optionally, the preset region exists in the second triangular region of the target computing power container; the preset region is used to store computing power units that meet the preset fragmented computing power conditions selected from the first triangular region of the target computing power container during the resource scheduling process; the preset fragmented computing power conditions are determined according to the length of the fourth column of the single-column computing power unit in the target computing power container.

[0086] The resource scheduling device provided in the embodiments of the present invention can execute the resource scheduling method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0087] Example 4 Figure 5 A schematic diagram of an electronic device 500 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0088] like Figure 5 As shown, the electronic device 500 includes at least one processor 501 and a memory, such as a read-only memory (ROM) 502 and a random access memory (RAM) 503, communicatively connected to the at least one processor 501. The memory stores computer programs executable by the at least one processor. The processor 501 can perform various appropriate actions and processes based on the computer program stored in the ROM 502 or loaded into the RAM 503 from storage unit 508. The RAM 503 can also store various programs and data required for the operation of the electronic device 500. The processor 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0089] Multiple components in electronic device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of monitors, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows electronic device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0090] Processor 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 501 performs the various methods and processes described above, such as resource scheduling methods.

[0091] In some embodiments, the resource scheduling method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by processor 501, one or more steps of the resource scheduling method described above may be performed. Alternatively, in other embodiments, processor 501 may be configured to perform the resource scheduling method by any other suitable means (e.g., by means of firmware).

[0092] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0093] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0094] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0095] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0096] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0097] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0098] This disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the resource scheduling method provided in the above embodiments.

[0099] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0100] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A resource scheduling method, characterized in that, include: The resource information of the central processing unit (CPU) and graphics processing unit (GPU) in the computing power scheduling system is obtained, and CPU computing power containers and GPU computing power containers are constructed respectively based on the resource information; wherein, the computing power container includes several computing power units; Based on the computing power characteristics of the CPU computing power units in the CPU computing power container, the CPU computing power units in the CPU computing power container are divided into different regions in the CPU computing power container to obtain a target CPU computing power container; based on the computing power characteristics of the GPU computing power units in the GPU computing power container, the GPU computing power units in the GPU computing power container are divided into different regions in the GPU computing power container to obtain a target GPU computing power container; wherein, the computing power characteristics are used to characterize the computing power value and continuity of the computing power units; The target CPU computing power container and the target GPU computing power container are respectively converted into corresponding CPU computing power matrix and GPU computing power matrix; Based on the CPU computing power matrix and the GPU computing power matrix, the idle computing power side and the busy computing power side in the CPU and the GPU are determined respectively, as well as the transferable computing power units of the idle computing power side. Then, using a preset instruction conversion mechanism, the transferable computing power units are converted into the computing power type of the busy computing power side to complete resource scheduling.

2. The resource scheduling method according to claim 1, characterized in that, The resource information includes the computing power and quantity information of CPU computing units, as well as the computing power and quantity information of GPU computing units. The step of constructing CPU computing power containers and GPU computing power containers based on the resource information includes: A CPU computing power container is constructed based on the computing power information and quantity information of the CPU computing power units; wherein, the width of the CPU computing power container is determined based on the computing power information of the CPU computing power units, a preset atomic quantity, and a first preset computing power allocation weight; the height of the CPU computing power container is determined based on the quantity information of the CPU computing power units; wherein, the preset atomic quantity is the computing power value corresponding to the smallest task slice used by the computing power scheduling system when dividing the computing task into time slices; A GPU computing power container is constructed based on the computing power information and quantity information of the GPU computing power units; wherein, the width of the GPU computing power container is determined based on the computing power information of the GPU computing power units, the preset atomic quantity, and the second preset computing power allocation weight; the height of the GPU computing power container is determined based on the quantity information of the GPU computing power units.

3. The resource scheduling method according to claim 1, characterized in that, The computing power characteristics of the CPU computing power unit include the CPU computing power value of the CPU computing power unit; the computing power characteristics of the GPU computing power unit include single-column similarity and single-column length; the single-column similarity is the similarity between single-column GPU computing power units in the GPU computing power container; the single-column length is the column length of a single-column computing power unit in the GPU computing power container; the computing power container is divided into two triangular regions according to the diagonal; The step of dividing the CPU computing power units in the CPU computing power container into different regions within the CPU computing power container based on their computing power characteristics includes: CPU computing power units with CPU computing power values ​​greater than or equal to a preset computing power value are assigned to the first triangular region of the CPU computing power container, and CPU computing power units with CPU computing power values ​​less than the preset computing power value are assigned to the second triangular region of the CPU computing power container. Specifically, based on the computing power characteristics of the GPU computing power units within the GPU computing power container, the GPU computing power units in the GPU computing power container are divided into different regions within the GPU computing power container, including: GPU computing power units with a single column similarity greater than or equal to a preset similarity threshold and a single column length greater than or equal to a preset length threshold are assigned to the first triangular region of the GPU computing power container; GPU computing power units with a single column similarity less than a preset similarity threshold or a single column length less than a first preset length threshold are assigned to the second triangular region of the GPU computing power container. The step of converting the target CPU computing power container and the target GPU computing power container into corresponding CPU computing power matrices and GPU computing power matrices, respectively, includes: The CPU computing units in the first triangular region and the second triangular region of the target CPU computing power container are sorted according to the first preset rule, and the CPU computing power matrix is ​​determined according to the sorting result. The GPU computing units in the first and second triangular regions of the target GPU computing power container are sorted according to the second preset rule, and the GPU computing power matrix is ​​determined based on the sorting result.

4. The resource scheduling method according to claim 3, characterized in that, The step of sorting the CPU computing units in the first triangular region and the second triangular region of the target CPU computing power container according to the first preset rule, and determining the CPU computing power matrix based on the sorting result, includes: For the target CPU computing power container, the length of the first column of each CPU computing power unit is determined based on the occupancy of each column of CPU computing power units; The CPU computing units in each column of the first triangular region of the target CPU computing power container are arranged in reverse order according to the length of the first column, and the CPU computing units in each column of the second triangular region of the target CPU computing power container are arranged in forward order. Based on the sorting results and the width and height of the target CPU computing power container, a CPU computing power matrix is ​​generated; The step of sorting the GPU computing units in the first triangular region and the second triangular region of the target GPU computing power container according to the second preset rule, and determining the GPU computing power matrix based on the sorting result, includes: For the target GPU computing power container, the length of the second column of each GPU computing power unit is determined based on the occupancy of each column of GPU computing power units; The GPU computing units in each column of the first triangular region of the target GPU computing power container are arranged in reverse order according to the length of the second column, and the GPU computing units in each column of the second triangular region of the target GPU computing power container are arranged in forward order. Based on the sorting results and the width and height of the target GPU computing power container, a GPU computing power matrix is ​​generated; The step of determining the idle computing power side and the busy computing power side in the CPU and the GPU, respectively, and the transferable computing power units of the idle computing power side, based on the CPU computing power matrix and the GPU computing power matrix, includes: Based on the data distribution information of different triangular regions in the CPU computing power matrix and the GPU computing power matrix, the idle computing power side and the busy computing power side in the CPU and the GPU, as well as the transferable computing power unit of the idle computing power side, are determined respectively.

5. The resource scheduling method according to claim 4, characterized in that, The step of determining the idle and busy computing power sides in the CPU and GPU, and the transferable computing power units of the idle computing power sides, based on the data distribution information of different triangular regions in the CPU computing power matrix and the GPU computing power matrix, includes: The CPU stress value is determined based on the data distribution information of the first and second triangular regions in the CPU computing power matrix. The GPU stress value is determined based on the data distribution information of the first and second triangular regions in the GPU computing power matrix. Based on the relationship between the CPU stress value and the GPU stress value, determine the idle computing power side and the busy computing power side of the CPU and the GPU; From the preset area in the target computing power container corresponding to the idle computing power source, computing power units that meet the preset transfer conditions are selected, and the computing power units are identified as transferable computing power units; wherein, the number of transferable computing power units is determined based on the difference between the CPU pressure value and the GPU pressure value; the preset transfer conditions are determined based on the length of the third column of a single column of computing power units in the target computing power container and the required computing power value of the busy computing power source.

6. The resource scheduling method according to claim 5, characterized in that, The preset region exists in the second triangular region of the target computing power container; the preset region is used to store computing power units that meet the preset fragmented computing power conditions selected from the first triangular region of the target computing power container during the resource scheduling process; the preset fragmented computing power conditions are determined according to the length of the fourth column of the single-column computing power unit in the target computing power container.

7. A resource scheduling device, characterized in that, include: The computing power container construction module is used to obtain the resource information of the central processing unit (CPU) and the graphics processing unit (GPU) in the computing power scheduling system, and to construct CPU computing power containers and GPU computing power containers respectively based on the resource information; wherein, the computing power container includes several computing power units; The region partitioning module is used to divide the CPU computing power units in the CPU computing power container into different regions in the CPU computing power container according to the computing power characteristics of the CPU computing power units in the CPU computing power container, so as to obtain a target CPU computing power container; and to divide the GPU computing power units in the GPU computing power container into different regions in the GPU computing power container according to the computing power characteristics of the GPU computing power units in the GPU computing power container, so as to obtain a target GPU computing power container; wherein, the computing power characteristics are used to characterize the computing power value and continuity of the computing power units; The computing power matrix determination module is used to convert the target CPU computing power container and the target GPU computing power container into corresponding CPU computing power matrices and GPU computing power matrices, respectively. The resource scheduling module is used to determine the idle computing power side and the busy computing power side in the CPU and the GPU respectively, as well as the transferable computing power unit of the idle computing power side, according to the CPU computing power matrix and the GPU computing power matrix, and to convert the transferable computing power unit into the computing power type of the busy computing power side using a preset instruction conversion mechanism, so as to complete resource scheduling.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the resource scheduling method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the resource scheduling method according to any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the resource scheduling method according to any one of claims 1-6.