Image processing unit resource scheduling method and device, equipment, medium and product
By acquiring the resource requirement parameters and task priority of the tasks to be processed, the image processing unit resources are dynamically scheduled, which solves the problems of resource contention and task blocking, and improves the task processing efficiency in financial business scenarios.
Patent Information
- Application Number
- CN202511664365.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-02-13
AI Technical Summary
In the financial sector, resource competition and task blocking occur during the deployment and scheduling of image processing unit resources, resulting in low task processing efficiency. This is especially true when high-frequency trading or financial data processing demands large computational resources. Therefore, how to achieve a reasonable allocation of image processing unit resources has become an urgent problem to be solved.
By obtaining the resource requirement parameters of the task to be processed, it is determined whether there are any idle resources in the current image processing unit resource pool. If there are, resources are allocated according to the requirement parameters; if not, resources are allocated according to resource utilization and task priority to ensure dynamic scheduling and reasonable allocation of the image processing unit.
It enables flexible scheduling of image processing unit resources, improving task processing efficiency, especially in high-frequency trading or financial business scenarios, thereby increasing the utilization of computing resources and task processing speed.
Smart Images

Figure CN121523830A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of financial technology, and in particular to an image processing unit resource scheduling method, device, equipment, medium and product. BACKGROUND
[0002] As an important hardware of high-performance computing, the graphics processing unit (GPU) plays an important role in more and more scenarios. For example, in the process of high-frequency trading or financial related business data processing in the bank business scenario, a large amount of computing resources need to be consumed. Therefore, in the financial field scenario, the graphics processing unit can execute a large number of parallel computing tasks, thereby improving the speed and efficiency of transaction processing.
[0003] However, in the process of graphics processing unit deployment and scheduling, the resources are usually released after a task is completed and then the next task is deployed, and the phenomena of resource competition and task blocking are common. In the scenario with large amount of task processing, how to realize the dynamic scheduling of graphics processing unit resources to realize the reasonable allocation of graphics processing unit resources and improve the task processing efficiency has become a problem to be solved at present. SUMMARY
[0004] The present application provides an image processing unit resource scheduling method, device, equipment, medium and product to realize the dynamic scheduling of graphics processing unit resources, realize the reasonable allocation of graphics processing unit resources, and improve the task processing efficiency.
[0005] According to an aspect of the present application, an image processing unit resource scheduling method is provided, which comprises:
[0006] Obtaining at least one to-be-processed task, and determining resource demand index parameters of each to-be-processed task;
[0007] If there is at least one idle graphics processing unit resource in the current graphics processing unit resource pool, then according to the resource demand index parameters of each to-be-processed task, the demand resource quantity of idle graphics processing unit resources required for processing each to-be-processed task is determined;
[0008] According to the demand resource quantity, it is determined whether the current resource quantity corresponding to the idle graphics processing unit resource meets a preset resource quantity judgment condition;
[0009] If yes, then the target graphics processing unit resource corresponding to each to-be-processed task is selected from each idle graphics processing unit resource, and the target graphics processing unit resource is scheduled to execute the corresponding to-be-processed task.
[0010] According to another aspect of the present application, there is provided an image processing unit resource scheduling apparatus, the apparatus comprising:
[0011] a task obtaining module configured to obtain at least one task to be processed, and determine resource demand index parameters of each of the tasks to be processed;
[0012] a resource quantity determining module configured to, if there is at least one idle image processing unit resource in a current image processing unit resource pool, determine, according to the resource demand index parameters of each of the tasks to be processed, a demand resource quantity of idle image processing unit resources required for processing each of the tasks to be processed;
[0013] a condition determining module configured to determine, according to the demand resource quantity, whether a current resource quantity corresponding to the idle image processing unit resources satisfies a preset resource quantity determining condition;
[0014] a resource scheduling module configured to, if it is determined that the current resource quantity corresponding to the idle image processing unit resources satisfies the preset resource quantity determining condition, select, from each of the idle image processing unit resources, a target image processing unit resource corresponding to each of the tasks to be processed respectively, and schedule the target image processing unit resources to execute corresponding tasks to be processed.
[0015] According to another aspect of the present application, there is provided an electronic device, the electronic device comprising:
[0016] at least one processor; and
[0017] a memory connected to the at least one processor in communication; wherein
[0018] the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the image processing unit resource scheduling method according to any one of the embodiments of the present application.
[0019] According to another aspect of the present application, there is provided a computer readable storage medium storing computer instructions for enabling a processor to implement the image processing unit resource scheduling method according to any one of the embodiments of the present application when executed by the processor.
[0020] According to another aspect of the present application, there is provided a computer program product comprising a computer program for enabling a processor to implement the image processing unit resource scheduling method according to any one of the embodiments of the present application when executed by the processor.
[0021] The technical scheme of the embodiment of the present application acquires at least one to-be-processed task, determines resource demand index parameters of each to-be-processed task, if there is at least one idle image processing unit resource in the current image processing unit resource pool, determines the required resource quantity of idle image processing unit resources required for processing each to-be-processed task according to the resource demand index parameters of each to-be-processed task, determines whether the current resource quantity corresponding to the idle image processing unit resources meets the preset resource quantity judgment condition according to the required resource quantity, if yes, selects target image processing unit resources corresponding to each to-be-processed task from each idle image processing unit resource, and schedules the target image processing unit resources to execute the corresponding to-be-processed task. The above technical scheme realizes dynamic scheduling of the image processing unit, fully considers the resource demand index parameters of the to-be-processed task in the resource scheduling process of the image processing unit, and considers whether the idle image processing unit can meet the task processing demand of the to-be-processed task when it is determined that there is an idle image processing unit, realizes reasonable scheduling and distribution of the resources of the image processing unit in the scheduling process, improves the resource scheduling flexibility of the image processing unit, and thus improves the task processing efficiency.
[0022] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0024] Figure 1 is a flow chart of an image processing unit resource scheduling method provided by the first embodiment of the present application;
[0025] Figure 2 is a flow chart of an image processing unit resource scheduling method provided by the second embodiment of the present application;
[0026] Figure 3 is a structural schematic diagram of an image processing unit resource scheduling device provided by the third embodiment of the present application;
[0027] Figure 4 is a structural schematic diagram of an electronic device for implementing the image processing unit resource scheduling method of the present application. DETAILED DESCRIPTION
[0028] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative work should belong to the protection scope of the present application.
[0029] It should be noted that the terms "first", "second" and the like in the description and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0030] Embodiment one
[0031] Figure 1 A flowchart of an image processing unit resource scheduling method provided by the first embodiment of the present application. The present embodiment can be applied to the dynamic scheduling of image processing unit resources in scenarios such as bank business activities with a large number of task processing requirements. The method can be executed by an image processing unit resource scheduling device, which can be realized in the form of hardware and / or software, and can be configured in an electronic device. As shown in the figure, the method comprises: Figure 1
[0032] S110, obtaining at least one to-be-processed task and determining resource demand index parameters of each to-be-processed task.
[0033] S120, if there is at least one idle image processing unit resource in the current image processing unit resource pool, determining the required resource quantity of the idle image processing unit resource required for processing each to-be-processed task according to the resource demand index parameters of each to-be-processed task.
[0034] S130, determining whether the current resource quantity corresponding to the idle image processing unit resource meets the preset resource quantity judgment condition according to the required resource quantity.
[0035] S140. If so, select the target image processing unit resources corresponding to each task to be processed from each idle image processing unit resource, and schedule the target image processing unit resources to execute the corresponding task to be processed.
[0036] The tasks to be processed can be those that require scheduling graphics processing units (GPUs) for processing, such as model training tasks, model inference tasks, and data processing tasks. For example, in a banking scenario, the tasks to be processed could be batch transaction processing tasks or transaction anomaly detection model training tasks.
[0037] Among them, resource requirement parameters can be the performance parameters of the image processing units required to execute the task to be processed. For example, resource requirement parameters can include video memory usage, computational intensity, I / O (Input / Output) requirements, and memory bandwidth.
[0038] For example, for any task to be processed, the resource requirement index parameters can be determined according to the task type of the task to be processed. For example, if the task to be processed is a model training task, the performance index parameters of the image processing unit that performs the model training task in the historical time period can be obtained, and the performance index parameters can be determined as the resource requirement index parameters for processing the task to be processed.
[0039] Furthermore, to improve the accuracy of determining the resource requirement index parameters of the tasks to be processed, in an optional embodiment, determining the resource requirement index parameters of each task to be processed includes: obtaining the task description information of each task to be processed and determining the task type of each task to be processed; and determining the resource requirement index parameters of each task to be processed based on the task type and task description information.
[0040] The task description information may include the task processing volume, the computing resources required, the storage resources required, and the estimated execution time. Task types may include model training tasks, model inference tasks, and data processing tasks. Model training tasks may further include full parameter tuning subtypes and parameter fine-tuning subtypes; model inference tasks may include low-parameter model inference, medium-parameter model inference, and high-parameter model inference.
[0041] Based on the task type and task description information of the task to be processed, the resource requirement index parameters of the task to be processed are determined. For example, historical execution tasks with the same task type as the task to be processed and a similarity of more than 90% with the task description information of the task to be processed can be obtained from a historical time period, and the performance index parameters of the image processing unit that executed the historical execution tasks can be obtained. The average value of the performance index parameters corresponding to the historical execution tasks can be used as the resource requirement index parameters of the task to be processed.
[0042] Furthermore, to improve the efficiency of determining the resource requirement parameters of the task to be processed, a pre-trained parameter prediction model can be used to predict the resource requirement parameters of the task to be processed.
[0043] Specifically, the training method for the indicator parameter prediction model is as follows: Historical execution tasks within a historical time period are acquired, along with their historical task types and descriptions. The performance indicator parameters of the image processing units executing these historical tasks are used to label the historical tasks as samples, serving as the standard resource requirement indicator parameters for each historical task. The historical execution tasks, their corresponding historical task types, and descriptions are then used as training samples. These training samples and their corresponding standard resource requirement indicator parameters are input into a pre-built network model to obtain the predicted resource requirement indicator parameters output by the network model. Based on the standard and predicted resource requirement indicator parameters from the training samples, the network model is trained to obtain the completed indicator parameter prediction model. For example, the network model could be a convolutional neural network model.
[0044] The above technical solution obtains the task description information of each task to be processed, determines the task type of each task to be processed, and determines the resource requirement index parameters of each task to be processed based on the task type and task description information. In the process of determining the resource requirement index parameters, the task type and task description information of the task to be processed are comprehensively considered, and the resource requirement index parameters of the task to be processed are evaluated and predicted from multiple dimensions, thereby improving the accuracy of determining the resource requirement index parameters of the task to be processed.
[0045] The current image processing unit resource pool contains several image processing unit resources deployed for parallel processing of the same or different tasks. Idle image processing unit resources can be image processing units that are not currently performing any tasks, and their resource utilization is zero.
[0046] If at least one idle image processing unit (IPU) resource exists in the current image processing unit resource pool, the required number of idle IPU resources for processing each task can be determined based on the resource requirement parameters of each task. For example, for any task that is a model training task, the resource requirement parameters are M computing resources, N memory requirements, and P GPU memory usage. If an idle IPU resource supports M computing resources, N memory requirements, and P GPU memory usage, then that idle IPU resource is sufficient to execute the task. It should be noted that the same task can be executed by at least one IPU, and the same IPU can also execute at least one task.
[0047] Therefore, based on the resource requirement parameters of each task to be processed, the required number of idle image processing units can be determined. It should be noted that since different image processing units have different models and corresponding performance parameters, the determination of the required resource quantity can be made by comprehensively considering the performance parameters of each idle image processing unit and combining them with the resource requirement parameters of each task to be processed. The required resource quantity is the number of idle image processing units.
[0048] For example, if the required number of idle image processing units is 3, and the number of image processing units required to execute each task is much greater than 3, for example, 10, then the current number of resources corresponding to the idle image processing unit resources does not meet the preset resource quantity judgment condition; if the number of image processing units required to execute each task is less than 3, for example, 2, then the current number of resources corresponding to the idle image processing unit resources meets the preset resource quantity judgment condition.
[0049] If the current number of idle image processing unit resources meets the preset resource quantity judgment condition, then the target image processing unit resources corresponding to each task to be processed are selected from the idle image processing unit resources. The target image processing unit resource is the image processing unit used to process the corresponding task to be processed. The target image processing unit resource is then scheduled to execute the corresponding task to be processed. It should be noted that there can be multiple target image unit resources required to execute one task to be processed. For example, the target image unit resources required to execute task a are resources M and N. Furthermore, the target image processing unit resources required to execute several tasks to be processed may be the same, i.e., one target image processing unit resource processes several tasks to be processed. For example, the target image unit resource required to execute tasks b, c, and d is resource Q.
[0050] The technical solution of this invention obtains at least one task to be processed, determines the resource requirement parameters of each task, and if there is at least one idle image processing unit resource in the current image processing unit resource pool, then, based on the resource requirement parameters of each task, determines the required number of idle image processing unit resources needed to process each task. Based on the required number of resources, it determines whether the current number of idle image processing unit resources meets a preset resource quantity judgment condition. If so, it selects the target image processing unit resource corresponding to each task from the idle image processing unit resources and schedules the target image processing unit resource to execute the corresponding task. This technical solution achieves dynamic scheduling of image processing units. By fully considering the resource requirement parameters of the tasks to be processed during the resource scheduling process, and considering whether the idle image processing units can meet the task processing requirements when they are determined to exist, it achieves reasonable resource allocation and scheduling of image processing units during the scheduling process, improving the resource scheduling flexibility of image processing units and thus improving task processing efficiency.
[0051] Example 2
[0052] Figure 2 This is a flowchart of an image processing unit resource scheduling method provided in Embodiment 2 of the present invention. This embodiment is an optimization and improvement based on the above technical solutions.
[0053] Furthermore, after the step "determine the resource requirement index parameters of each task to be processed", the following step is added: "If there are no idle image processing unit resources in the current image processing unit resource pool, then determine whether there is at least one allocable image processing unit resource in the current image processing unit resource pool based on the resource utilization rate of each image processing unit resource in the current image processing unit resource pool; if so, then allocate allocable image processing unit resources to each task to be processed based on the image processing unit performance index parameters of each allocable image processing unit resource and the resource requirement index parameters of each task to be processed." This improves the resource scheduling method for tasks to be processed when there are no idle image processing unit resources in the current image processing unit resource pool.
[0054] It should be noted that for parts not described in detail in the embodiments of the present invention, please refer to the descriptions in other embodiments. For example... Figure 2 As shown, the method includes the following specific steps:
[0055] S210. Obtain at least one task to be processed and determine the resource requirement parameters for each task to be processed.
[0056] S220. Determine whether there is at least one idle image processing unit resource in the current image processing unit resource pool. If yes, execute S230-S250; otherwise, execute S260-S270.
[0057] S230. Based on the resource requirement parameters of each task to be processed, determine the required number of idle image processing unit resources needed to process each task to be processed.
[0058] S240. Based on the required resource quantity, determine whether the current resource quantity corresponding to the idle image processing unit resource meets the preset resource quantity judgment condition.
[0059] S250. If so, select the target image processing unit resources corresponding to each task to be processed from each idle image processing unit resource, and schedule the target image processing unit resources to execute the corresponding task to be processed.
[0060] S260. Based on the resource utilization rate of each image processing unit resource in the current image processing unit resource pool, determine whether there is at least one allocatable image processing unit resource in the current image processing unit resource pool.
[0061] S270. If so, then based on the image processing unit performance index parameters of each allocable image processing unit resource and the resource requirement index parameters of each task to be processed, allocate allocable image processing unit resources for each task to be processed.
[0062] If there are no idle image processing unit resources in the current image processing unit resource pool, the resource utilization rate of each image processing unit resource in the current image processing unit resource pool is obtained. For any image processing unit resource in the current image processing unit resource pool, if the resource utilization rate of the image processing unit resource is less than a preset resource utilization rate threshold, then the image processing unit resource can be determined as an allocable image processing unit resource. The resource utilization rate threshold can be preset by relevant technical personnel according to actual needs; for example, the resource utilization rate threshold can be set to 60%. It should be noted that the lower the resource utilization rate of an image processing unit, the less fully the resources of that image processing unit are being utilized.
[0063] Based on the resource utilization rate of each image processing unit resource, if it is determined that there is at least one allocatable image processing unit resource in the current image processing unit resource pool, then according to the image processing unit performance index parameters of each allocatable image processing unit resource and the resource requirement index parameters of each task to be processed, the allocatable image processing unit resource is allocated to each task to be processed.
[0064] Specifically, since there are currently executing tasks among the allocable image processing unit resources, and executing these tasks consumes certain resources, the performance metrics of the image processing unit are the remaining performance metrics, which may include remaining computational load, remaining memory utilization, and remaining video memory usage. For any task's resource requirement metrics, it is determined whether there exists an allocable image processing unit whose remaining performance metrics can support those requirements. For example, if task A requires 200KB of video memory, and an allocable image processing unit M has 300KB of remaining video memory, allowing task A to be executed on that unit, then task A is scheduled to run on allocable image processing unit M.
[0065] This embodiment's technical solution determines whether there is at least one allocatable image processing unit resource in the current image processing unit resource pool when there are no idle image processing unit resources in the current image processing unit resource pool, based on the resource utilization rate of each image processing unit resource in the current image processing unit resource pool. If so, the allocatable image processing unit resource is allocated to each task to be processed based on the image processing unit performance index parameters of each allocatable image processing unit resource and the resource requirement index parameters of each task to be processed. This achieves reasonable allocation and scheduling of resources for image processing units with available resources, and fully utilizes the resources of allocatable image processing units with remaining resources when there are no idle image processing units, further improving the flexibility of resource allocation and thus further improving task processing efficiency.
[0066] Furthermore, this embodiment also provides a method for resource coordination and allocation for high-priority or high-urgency tasks when no allocable image processing unit resources are available. In an optional embodiment, the specific resource coordination and allocation method is as follows:
[0067] Step a1: If it is determined that there are no allocatable image processing unit resources in the current image processing unit resource pool, then obtain the task execution information of the currently executing tasks of each image processing unit resource in the current image processing unit resource pool.
[0068] The task execution information for the currently executing task may include the task execution volume, remaining execution time, task priority, and resource consumption. The task execution volume refers to the amount of data that has been completed by the task. The remaining execution time is the remaining time required to complete the task.
[0069] Step a2: Obtain the task priority of each pending task, and determine the target task to be executed based on the task priority of each pending task.
[0070] It's important to note that task priority is used to characterize the urgency of a task. For example, in a banking transaction scenario, tasks requiring rapid response, such as transfer confirmation, have higher urgency and therefore higher priority. Different tasks have different priorities. For instance, task priorities range from 1 to 10, with level 1 indicating higher urgency and level 10 indicating lower urgency.
[0071] For any pending task, if its priority reaches a set priority threshold, then the pending task is designated as the target task for execution. The priority threshold can be preset according to actual needs; for example, it can be set to level 4. If the priority of pending task A is level 2, which is greater than the preset priority threshold of level 4, then pending task A is designated as the target task for execution.
[0072] Step a3: Based on the resource requirement parameters of the target execution task and the task execution information of the current execution task of each image processing unit, determine the tasks to be suspended in each currently executing task.
[0073] For example, based on the resource requirement parameters of the target execution task, matching image processing unit resources that match the resource requirement parameters can be selected from the currently executing tasks of each image processing unit resource. The number of matching image processing unit resources can be at least one. Based on the task execution information of the currently executing tasks in each matching image processing unit resource, the tasks to be suspended are determined.
[0074] Among them, tasks to be suspended can be tasks that need to be paused. Specifically, tasks to be suspended can be determined based on the task execution volume, remaining execution time, and task priority in the task execution information. For example, currently executing tasks with a large execution volume, short remaining execution time, low priority, and / or low resource consumption can be identified as tasks to be suspended.
[0075] Step a4: Control the image processing unit resources to which the pending task belongs to suspend the execution of the pending task.
[0076] Specifically, the image processing unit to which the task to be suspended is controlled will temporarily suspend the execution of the task to be suspended.
[0077] Step a5: Control the image processing unit resources of the task to be suspended to execute to execute the target task.
[0078] Specifically, the image processing unit to which the suspended task belongs is controlled to execute the target task, and the suspended task is resumed after the target task is completed.
[0079] The above-described embodiment's technical solution, when no allocable image processing unit resources are available, determines the target execution task based on the task priority of each pending task, identifies pending execution tasks among the currently executing tasks based on the resource requirement parameters of the target execution task and the task execution information of the currently executing tasks of each image processing unit resource, suspends the execution of pending execution tasks, and controls the image processing unit resources to which the pending execution tasks belong to execute the target execution task. This achieves reasonable resource allocation of image processing units for pending tasks with higher urgency by reasonably suspending tasks being processed by image processing units and prioritizing the execution of pending tasks when no available image processing unit resources are available. Furthermore, by dynamically controlling the start and stop of image processing unit tasks to automatically prioritize the execution of pending tasks with higher urgency, the solution improves the reasonable scheduling and allocation of image processing unit resources, enhances the flexibility and reliability of image processing unit resource configuration, and increases the processing efficiency of tasks with higher urgency.
[0080] To further improve the full utilization of resources in idle image processing units, in one optional embodiment, after determining the resource requirement parameters for each task to be processed, the method further includes:
[0081] Step b1: Based on the resource requirement parameters of each pending task, determine whether there is a task matching pair in each pending task request; a task matching pair includes two matching execution tasks that meet the preset task matching conditions.
[0082] Specifically, based on the resource requirement parameters of each task to be processed, the similarity between the tasks is determined, which can be done through pre-calculation of similarity. The similarity between the tasks is then obtained. If the similarity shows a negative correlation, it can be considered that the two tasks with negative similarity have complementary resources, and these two tasks with complementary resources are identified as matched execution tasks. Task matching pairs, including the matched execution tasks, are then generated.
[0083] Step b2: If a task matching pair exists and there is at least one idle image processing unit resource in the current image processing unit resource pool, then based on the memory requirement in the resource requirement parameters of each matching task and the memory capacity of the image processing unit resource, determine whether there is a target idle image processing unit resource in each idle image processing unit resource.
[0084] Specifically, if the sum of the video memory requirements in the resource requirement parameters of each matching task is greater than the video memory capacity of each idle image processing unit (IPU) resource, then it is determined that there is no usable target idle IPU resource among the idle IPU resources. If there are idle IPU resources among the idle IPU resources whose sum of the video memory requirements in the resource requirement parameters of each matching task is not greater than the video memory capacity of the IPU, then it is determined that there is a usable target idle IPU resource among the idle IPU resources, and the idle IPU resource whose sum of the video memory requirements in the resource requirement parameters of each matching task is not greater than the video memory capacity of the IPU is taken as the target idle IPU resource.
[0085] Step b3: If it is determined that there is a target idle image processing unit resource among the idle image processing unit resources, then the target image processing unit resource is scheduled to process each matching execution task.
[0086] The above-described embodiment's technical solution determines whether there is a matching execution task that meets preset task matching conditions among the requests of each task to be processed based on the resource requirement index parameters of each task to be processed. If such a matching execution task exists and there is at least one idle image processing unit resource in the current image processing unit resource pool, then based on the video memory requirement in the resource requirement index parameters of each matching task and the video memory capacity of each idle image processing unit resource, the matching execution task is scheduled and executed when it is determined that there is a target image processing unit resource. Since there is complementarity between the two matching tasks, that is, one matching execution task requires less resources and the other matching execution task requires more resources, it is just right for an idle image processing unit to execute the two tasks at the same time, thereby making full use of the idle image processing unit resources and improving the processing efficiency of the matching execution task.
[0087] To further ensure the normal execution of the image processing units and the balanced allocation of resources during execution, real-time monitoring of the image processing units can be implemented. In one optional embodiment, the resource monitoring of each image processing unit currently executing a task in the image processing unit resource pool, thereby controlling the start and stop of the currently executing task, is achieved as follows:
[0088] Step c1: Monitor the image processing unit utilization, task execution time, and video memory usage of each image processing unit resource currently executing a task in the current image processing unit resource pool.
[0089] Among them, the image processing unit utilization rate represents the resource utilization rate of the image processing unit; the task execution time represents the execution time of the task currently being executed in the corresponding image processing unit.
[0090] Step c2: Based on the image processing unit utilization rate, task execution time, and video memory usage rate of each image processing unit resource, determine whether there are any image processing unit resources that need to be adjusted.
[0091] If the resource utilization rate of the image processing unit reaches a preset utilization rate threshold or the video memory usage reaches a preset usage rate threshold, and the task execution time exceeds a preset time threshold, then the image processing unit resource is determined to be an image processing unit resource to be adjusted.
[0092] Step c3: If yes, then based on the image processing unit utilization rate, task execution time, and video memory usage rate of the image processing unit resources to be adjusted, control the start and stop of the currently executing task in the image processing unit resources to be adjusted.
[0093] If the execution time of the task in the image processing unit whose resources need adjustment is not close to the task completion time, and the resource utilization rate of the image processing unit exceeds 10%~20% of the resource utilization threshold, and the video memory usage rate exceeds 10%~20% of the usage threshold, then the currently executing task in the image processing unit whose resources need adjustment is stopped. If the resource utilization rate of the image processing unit does not exceed 10%~20% of the resource utilization threshold, and the video memory usage rate does not exceed 10%~20% of the usage threshold, then the currently executing task is restarted.
[0094] The above technical solution monitors the image processing unit utilization, task execution time, and video memory usage of each image processing unit resource currently executing tasks in the current image processing unit resource pool. Based on these parameters, it determines whether there are any image processing unit resources that need adjustment. If so, it controls the start and stop of currently executing tasks in the image processing unit resources to be adjusted, based on their respective utilization, execution time, and video memory usage. This achieves real-time monitoring of running image processing units, maintains their normal operation, ensures load balancing, and improves operational security.
[0095] Example 3
[0096] Figure 3 This is a schematic diagram of the structure of an image processing unit resource scheduling device provided in Embodiment 3 of the present invention. The image processing unit resource scheduling device provided in this embodiment of the present invention is applicable to situations where there are large task processing demands in scenarios such as banking operations, for dynamic resource scheduling of image processing units. This image processing unit resource scheduling device can be implemented in hardware and / or software, such as... Figure 3As shown, the device includes: a task acquisition module 301, a resource quantity determination module 302, a condition judgment module 303, and a resource scheduling module 304. Among them,
[0097] The pending task acquisition module 301 is used to acquire at least one pending task and determine the resource requirement index parameters of each pending task.
[0098] The resource quantity determination module 302 is used to determine the required number of idle image processing unit resources needed to process each of the tasks to be processed, based on the resource requirement index parameters of each task to be processed, if there is at least one idle image processing unit resource in the current image processing unit resource pool.
[0099] The condition judgment module 303 is used to determine whether the current resource quantity corresponding to the idle image processing unit resource meets the preset resource quantity judgment condition based on the required resource quantity.
[0100] The resource scheduling module 304 is used to select the target image processing unit resources corresponding to each task to be processed from the idle image processing unit resources if it is determined that the current number of resources corresponding to the idle image processing unit resources meets the preset resource quantity judgment conditions, and schedule the target image processing unit resources to execute the corresponding task to be processed.
[0101] The technical solution of this invention obtains at least one task to be processed, determines the resource requirement parameters of each task, and if there is at least one idle image processing unit resource in the current image processing unit resource pool, then, based on the resource requirement parameters of each task, determines the required number of idle image processing unit resources needed to process each task. Based on the required number of resources, it determines whether the current number of idle image processing unit resources meets a preset resource quantity judgment condition. If so, it selects the target image processing unit resource corresponding to each task from the idle image processing unit resources and schedules the target image processing unit resource to execute the corresponding task. This technical solution achieves dynamic scheduling of image processing units. By fully considering the resource requirement parameters of the tasks to be processed during the resource scheduling process, and considering whether the idle image processing units can meet the task processing requirements when they are determined to exist, it achieves reasonable resource allocation and scheduling of image processing units during the scheduling process, improving the resource scheduling flexibility of image processing units and thus improving task processing efficiency.
[0102] Optionally, the device further includes:
[0103] The allocable resource determination module is used to determine whether there is at least one allocable image processing unit resource in the current image processing unit resource pool if there is no idle image processing unit resource in the current image processing unit resource pool, based on the resource utilization rate of each image processing unit resource in the current image processing unit resource pool.
[0104] An allocatable resource allocation module is used to allocate at least one allocatable image processing unit resource to each of the tasks to be processed based on the image processing unit performance index parameters of each allocatable image processing unit resource and the resource requirement index parameters of each task to be processed if it is determined that there is at least one allocatable image processing unit resource in the current image processing unit resource pool.
[0105] Optionally, the device further includes:
[0106] The task execution information acquisition module is used to acquire the task execution information of the currently executing tasks of each image processing unit resource in the current image processing unit resource pool if it is determined that there are no allocable image processing unit resources in the current image processing unit resource pool.
[0107] The target execution task determination module is used to obtain the task priority of each of the tasks to be processed, and determine the target execution task based on the task priority of each of the tasks to be processed;
[0108] The pending task determination module is used to determine the pending tasks in each of the currently executing tasks based on the resource requirement index parameters of the target execution task and the task execution information of the currently executing tasks of each of the image processing unit resources.
[0109] The pending task pause module is used to control the image processing unit resources to which the pending task belongs to pause the execution of the pending task.
[0110] The target task execution module is used to control the image processing unit resources to which the pending execution task belongs to execute the target execution task.
[0111] Optionally, the pending task acquisition module 301 is specifically used for:
[0112] Obtain the task description information of each of the tasks to be processed, and determine the task type of each of the tasks to be processed;
[0113] Based on the task type and the task description information, determine the resource requirement parameters for each task to be processed.
[0114] Optionally, the device further includes:
[0115] The task matching pair determination module is used to determine whether there is a task matching pair in each of the task requests after the resource requirement index parameters of each task to be processed are determined; the task matching pair includes two matching execution tasks that meet preset task matching conditions.
[0116] The target idle resource judgment module is used to determine whether there is a target idle image processing unit resource among the idle image processing unit resources if there is a task matching pair and there is at least one idle image processing unit resource in the current image processing unit resource pool, based on the video memory requirement in the resource requirement index parameters of each matching task and the video memory capacity of each idle image processing unit resource.
[0117] The matching task execution module is used to schedule the target image processing unit resource to process each of the matching execution tasks if it is determined that there is a target idle image processing unit resource among the idle image processing unit resources.
[0118] Optionally, the device further includes:
[0119] The image processing unit monitoring module is used to monitor the image processing unit utilization rate, task execution time, and video memory usage rate of each image processing unit resource currently executing a task in the current image processing unit resource pool.
[0120] The resource to be adjusted determination module is used to determine whether there are any image processing unit resources to be adjusted based on the image processing unit utilization rate, task execution time, and video memory usage rate of each image processing unit resource.
[0121] The task start / stop control module is used to control the start / stop of the currently executing task in the image processing unit resource to be adjusted, based on the image processing unit utilization rate, task execution time, and video memory usage rate of the image processing unit resource to be adjusted, if it is determined that there is an image processing unit resource to be adjusted.
[0122] The image processing unit resource scheduling device provided in the embodiments of the present invention can execute the image processing unit resource scheduling method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0123] Example 4
[0124] Figure 4A schematic diagram of an electronic device 40 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.
[0125] like Figure 4 As shown, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 or a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded from storage unit 48 into the RAM 43. The RAM 43 may also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0126] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0127] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (graphics processing unit), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as the image processing unit resource scheduling method.
[0128] In some embodiments, the image processing unit resource scheduling method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the image processing unit resource scheduling method described above may be performed. Alternatively, in other embodiments, processor 41 may be configured to execute the image processing unit resource scheduling method by any other suitable means (e.g., by means of firmware).
[0129] 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.
[0130] 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.
[0131] 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.
[0132] 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).
[0133] 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.
[0134] 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.
[0135] 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.
[0136] 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 method for scheduling image processing unit resources, characterized in that, include: Obtain at least one task to be processed, and determine the resource requirement parameters for each task to be processed; If there is at least one idle image processing unit resource in the current image processing unit resource pool, then the required number of idle image processing unit resources needed to process each task is determined according to the resource requirement index parameters of each task to be processed. Based on the required resource quantity, determine whether the current resource quantity corresponding to the idle image processing unit resource meets the preset resource quantity judgment condition; If so, then select the target image processing unit resources corresponding to each task to be processed from the idle image processing unit resources, and schedule the target image processing unit resources to execute the corresponding task to be processed.
2. The method according to claim 1, characterized in that, The method further includes: If there are no idle image processing unit resources in the current image processing unit resource pool, then based on the resource utilization rate of each image processing unit resource in the current image processing unit resource pool, it is determined whether there is at least one allocatable image processing unit resource in the current image processing unit resource pool. If so, then based on the image processing unit performance index parameters of each of the allocatable image processing unit resources and the resource requirement index parameters of each of the tasks to be processed, the allocatable image processing unit resources are allocated to each of the tasks to be processed.
3. The method according to claim 2, characterized in that, The method further includes: If it is determined that there are no allocatable image processing unit resources in the current image processing unit resource pool, then the task execution information of the currently executing tasks of each image processing unit resource in the current image processing unit resource pool is obtained; Obtain the task priority of each of the tasks to be processed, and determine the target task to be executed based on the task priority of each of the tasks to be processed; Based on the resource requirement parameters of the target execution task, and the task execution information of the current execution task of each image processing unit resource, determine the execution tasks to be suspended in each of the current execution tasks; Control the image processing unit resources to suspend the execution of the pending task; Control the image processing unit resources to which the pending execution task belongs to execute the target execution task.
4. The method according to claim 1, characterized in that, The determination of the resource requirement parameters for each of the tasks to be processed includes: Obtain the task description information of each of the tasks to be processed, and determine the task type of each of the tasks to be processed; Based on the task type and the task description information, determine the resource requirement parameters for each task to be processed.
5. The method according to claim 1, characterized in that, After determining the resource requirement parameters for each of the tasks to be processed, the method further includes: Based on the resource requirement parameters of each pending task, determine whether there is a task matching pair in each pending task request; the task matching pair includes two matching execution tasks that meet the preset task matching conditions. If a task matching pair exists, and there is at least one idle image processing unit resource in the current image processing unit resource pool, then based on the video memory requirement in the resource requirement index parameters of each matching task and the video memory capacity of each idle image processing unit resource, it is determined whether there is a target idle image processing unit resource in each idle image processing unit resource. If so, the target image processing unit resources are scheduled to process each of the matching execution tasks.
6. The method according to claim 1, characterized in that, The method further includes: Monitor the image processing unit utilization rate, task execution time, and video memory usage rate of each image processing unit resource currently executing a task in the current image processing unit resource pool; Based on the image processing unit utilization rate, task execution time, and video memory usage rate of each image processing unit resource, determine whether there are any image processing unit resources that need to be adjusted. If so, then based on the image processing unit utilization rate, task execution time, and video memory usage rate of the image processing unit resources to be adjusted, the start and stop of the currently executing task in the image processing unit resources to be adjusted are controlled.
7. An image processing unit resource scheduling device, characterized in that, include: The pending task acquisition module is used to acquire at least one pending task and determine the resource requirement index parameters of each pending task. The resource quantity determination module is used to determine the required number of idle image processing unit resources needed to process each of the tasks to be processed, based on the resource requirement index parameters of each task to be processed, if there is at least one idle image processing unit resource in the current image processing unit resource pool. The condition judgment module is used to determine whether the current resource quantity corresponding to the idle image processing unit resource meets the preset resource quantity judgment condition based on the required resource quantity. The resource scheduling module is used to select the target image processing unit resources corresponding to each task to be processed from the idle image processing unit resources if the current number of resources corresponding to the idle image processing unit resources meets the preset resource quantity judgment condition, and schedule the target image processing unit resources to execute the corresponding task to be processed.
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 image processing unit 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 are used to cause a processor to implement the image processing unit resource scheduling method according to any one of claims 1-6 when executed.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the image processing unit resource scheduling method according to any one of claims 1-6.