Resource allocation method, device, equipment and storage medium based on intelligent computing cluster
By determining the average historical task processing time and task allocation rate of the task queue in the intelligent computing cluster, establishing a target constraint function and calculating the allocation weight of the service node, optimizing task scheduling and resource allocation, the problems of high energy consumption and insufficient resource utilization of the intelligent computing cluster are solved, and delay reduction and full resource utilization are achieved.
Patent Information
- Application Number
- CN202411926301.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-25
AI Technical Summary
When performing large-scale computing tasks and continuously high-load operation, the energy consumption of smart computing clusters is significantly higher than that of traditional computing devices, resulting in increased pressure on energy use and environmental protection. At the same time, existing scheduling strategies may lead to task delays and insufficient resource utilization.
A resource allocation method based on intelligent computing cluster is proposed. By determining the average historical task processing time and task allocation rate of each task queue, a target constraint function is established, the target service node allocation weight is calculated, and a subset of server nodes is allocated to each task queue according to the weight, and task scheduling and resource allocation are optimized.
While reducing system delays, make full use of system resources, improve resource utilization and system stability, reduce unnecessary energy consumption, and ensure the long-term and effective operation of smart computing clusters.
Smart Images

Figure CN119537027B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of resource scheduling, and in particular to a resource allocation method, device, equipment and storage medium based on an intelligent computing cluster. Background Art
[0002] An intelligent computing cluster is a computing resource and architecture that combines high-performance computing capabilities and intelligent technologies (such as artificial intelligence, big data analysis, etc.). It is built using advanced artificial intelligence processors, including graphics processors, neural network processors, etc., and can efficiently handle complex artificial intelligence tasks and large-scale data computing needs. However, due to the execution of large-scale computing tasks and continuous high-load operation, the energy consumption level of intelligent computing clusters is significantly higher than that of traditional computing devices. This high energy consumption characteristic puts tremendous pressure on energy use and environmental protection. Therefore, it is necessary to reasonably allocate the resources of the intelligent computing cluster to reduce unnecessary energy consumption and ensure that the intelligent computing cluster can operate effectively in the long term.
[0003] In related technologies, tasks are usually processed in the order in which they arrive at the intelligent computing cluster. Although this approach reduces management complexity and makes system management more direct and easy to operate, this scheduling strategy may have some limitations. On the one hand, this scheduling strategy may cause some tasks to wait for a long time, especially for tasks that are sensitive to response time, which will cause task delays; on the other hand, this scheduling strategy lacks optimization of specific task characteristics, resulting in inability to fully utilize system resources. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a resource allocation method, device, equipment and storage medium based on an intelligent computing cluster, which can fully utilize system resources while reducing system latency.
[0005] To achieve the above objectives, a first aspect of an embodiment of the present application proposes a resource allocation method based on an intelligent computing cluster, the method comprising:
[0006] For multiple task queues processed by the intelligent computing service node cluster, determine the average processing time of historical tasks associated with each task queue and the task allocation rate of each task queue;
[0007] Each task queue corresponds to a target constraint function, and each target constraint function is used to limit the functional relationship between the average processing time variable, the task allocation rate variable, and the total number of service nodes variable and the service node allocation weight variable of the current task queue under the condition that the task delay processing ratio threshold corresponding to the current task queue is met;
[0008] Determine the total number of target service nodes in the intelligent computing service node cluster, and calculate the target constraint function of each task queue according to the average processing time corresponding to each task queue, the task allocation rate and the total number of target service nodes to obtain the target service node allocation weight corresponding to each task queue;
[0009] Assign weights to each task queue according to the target service node, and assign a corresponding subset of server nodes to each task queue;
[0010] Acquire multiple tasks to be processed, and determine a task queue corresponding to each task to be processed according to a maximum task delay threshold of each task to be processed;
[0011] Through each subset of server nodes, the pending tasks in the corresponding task queue are processed.
[0012] Accordingly, a second aspect of an embodiment of the present application proposes a resource allocation device based on an intelligent computing cluster, the device comprising:
[0013] A determination module is used to determine the average processing time of historical tasks associated with each task queue and the task allocation rate of each task queue for multiple task queues processed by the intelligent computing service node cluster; wherein each task queue corresponds to a target constraint function, and each target constraint function is used to limit the functional relationship between the average processing time variable, the task allocation rate variable and the total number of service nodes variable, and the service node allocation weight variable of the current task queue under the condition that the task delay processing ratio threshold corresponding to the current task queue is satisfied;
[0014] A calculation module is used to determine the total number of target service nodes in the intelligent computing service node cluster, and calculate the target constraint function of each task queue according to the average processing time corresponding to each task queue, the task allocation rate and the total number of target service nodes to obtain the target service node allocation weight corresponding to each task queue;
[0015] An allocation module is used to allocate weights according to the target service nodes of each task queue and allocate a corresponding subset of server nodes to each task queue;
[0016] An acquisition module, used for acquiring a plurality of tasks to be processed, and determining a task queue corresponding to each task to be processed according to a maximum task delay threshold of each task to be processed;
[0017] The processing module is used to process the pending tasks in the corresponding task queue through each server node subset.
[0018] In some implementations, the resource allocation device based on the intelligent computing cluster further includes a conversion module, which is used to:
[0019] Obtaining the initial constraint function corresponding to each task queue;
[0020] The initial constraint function is used to define a functional relationship between a first ratio of target pending tasks with a relative delay rate variable greater than a relative delay rate threshold to the total number of tasks among a plurality of pending tasks managed by the current task queue and a task delay processing ratio threshold corresponding to the current task queue; the relative delay rate variable is obtained by the ratio between the waiting time variable of each pending task in the current task queue and the task running time variable of each pending task in the corresponding target service node;
[0021] The initial constraint function is converted into a target constraint function through a preset queuing theory model.
[0022] In some implementations, the conversion module is further configured to:
[0023] Inputting the total amount of the target service nodes into the target constraint function corresponding to each task queue to obtain a first target constraint function;
[0024] Obtain a preset load balancing expression, and input the average processing time corresponding to each task queue, the task allocation rate, and the total number of target service nodes into the load balancing expression to obtain a target load balancing expression;
[0025] The first objective constraint function and the target load balancing expression are calculated to obtain the target service node allocation weight corresponding to each task queue.
[0026] In some implementations, the resource allocation device based on the intelligent computing cluster further includes a construction module for:
[0027] Obtaining a task allocation rate variable, an average duration variable, and a load balancing variable corresponding to each task queue, and obtaining a service demand sub-expression according to the task allocation rate variable, the average duration variable, and the load balancing variable;
[0028] Determine a first product according to the product of the service node total quantity variable, the load balancing variable and the service node allocation weight variable;
[0029] Obtaining a service supply sub-expression according to the sum of the first product and the task allocation rate variable;
[0030] A preset load balancing expression is established based on the service demand sub-expression and the service supply sub-expression.
[0031] In some embodiments, the allocation module is further used to:
[0032] Obtain the total power consumption upper limit of the intelligent computing service node cluster, the total number of server nodes included in the intelligent computing service node cluster, and the operating power and no-load power of each server node;
[0033] Based on the total power consumption upper limit, the total number of nodes, the operating power and the no-load power, determine a first number of server nodes running in the intelligent computing service node cluster in the same time period;
[0034] Determine a product of the target service node allocation weight corresponding to each task queue and the first number, and determine a second number of server nodes for processing each task queue;
[0035] According to the second number corresponding to each task queue, a corresponding subset of server nodes is allocated to each task queue.
[0036] In some implementations, the resource allocation device based on the intelligent computing cluster further includes an adjustment module, which is used to:
[0037] Obtaining the sum of the weights of multiple target service nodes corresponding to the multiple task queues;
[0038] Obtaining a preset reference value, and comparing the preset reference value with the sum of the weights allocated to the multiple target service nodes to obtain a comparison result;
[0039] When the comparison result indicates that the sum of the weights allocated to the multiple target service nodes is greater than the preset reference value, the total power consumption upper limit of the intelligent computing service node cluster is adjusted.
[0040] In some implementations, the resource allocation device based on the intelligent computing cluster further includes a redetermining module, which is used to:
[0041] When the total power consumption upper limit of the intelligent computing service node cluster changes, the target service node allocation weight corresponding to each task queue is re-determined;
[0042] Alternatively, when the target constraint function of at least one task queue changes, the target service node allocation weight corresponding to the at least one task queue is re-determined.
[0043] Correspondingly, the third aspect of the embodiments of the present application proposes a computer device, which includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it implements the resource allocation method based on the intelligent computing cluster as described in any one of the embodiments of the first aspect of the present application.
[0044] Correspondingly, the fourth aspect of the embodiments of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the resource allocation method based on the intelligent computing cluster as described in any one of the embodiments of the first aspect of the present application.
[0045] The embodiment of the present application determines the average processing time of historical tasks associated with each task queue and the task allocation rate of each task queue by processing multiple task queues for the intelligent computing service node cluster; wherein each task queue corresponds to a target constraint function, and each target constraint function is used to limit the average processing time variable, the task allocation rate variable and the service node total variable under the task delay processing ratio threshold corresponding to the current task queue, and the functional relationship between the service node allocation weight variable of the current task queue; determine the total amount of target service nodes in the intelligent computing service node cluster, and calculate the target constraint function of each task queue according to the average processing time, the task allocation rate and the target service node total amount corresponding to each task queue, and obtain the target service node allocation weight corresponding to each task queue; according to the target service node allocation weight of each task queue, allocate the corresponding server node subset for each task queue; obtain multiple pending tasks, and determine the corresponding task queue allocated for each pending task according to the maximum task delay threshold of each pending task; through each server node subset, process the pending tasks in the corresponding task queue. In this way, according to the target constraint function corresponding to different task queues, the task type processed for each task queue can be customized to ensure that the pending tasks are processed in accordance with their characteristics, effectively reducing the overall delay. On this basis, by analyzing the average processing time and task allocation rate of each task queue, predicting the resource requirements of each task queue, ensuring that high-weight queues obtain necessary resources, ensuring that critical tasks can be processed in a timely manner, and reducing delays while making full use of system resources. In addition, by allocating pending tasks to corresponding task queues according to their maximum task delay thresholds, it can be ensured that when processing pending tasks, the duration quality requirements of pending tasks can be met, while optimizing resource usage. In summary, this application can make full use of system resources while reducing task delays. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a schematic diagram of the architecture of a resource allocation system based on an intelligent computing cluster provided in an embodiment of the present application;
[0047] Figure 2 is a flow chart of a resource allocation method based on an intelligent computing cluster provided in an embodiment of the present application;
[0048] Figure 3 It is a functional module diagram of a resource allocation device based on an intelligent computing cluster provided in an embodiment of the present application;
[0049] Figure 4 It is a schematic diagram of the hardware structure of the computer device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0053] An intelligent computing cluster is a computing resource and architecture that combines high-performance computing capabilities and intelligent technologies (such as artificial intelligence, big data analysis, etc.). It is built using advanced artificial intelligence processors, including graphics processors, neural network processors, etc., and can efficiently handle complex artificial intelligence tasks and large-scale data computing needs. However, due to the execution of large-scale computing tasks and continuous high-load operation, the energy consumption level of intelligent computing clusters is significantly higher than that of traditional computing devices. This high energy consumption characteristic puts tremendous pressure on energy use and environmental protection. Therefore, it is necessary to reasonably allocate the resources of the intelligent computing cluster to reduce unnecessary energy consumption and ensure that the intelligent computing cluster can operate effectively in the long term.
[0054] In related technologies, tasks are usually processed in the order in which they arrive at the intelligent computing cluster. Although this approach reduces management complexity and makes system management more direct and easy to operate, this scheduling strategy may have some limitations. On the one hand, this scheduling strategy may cause some tasks to wait for a long time, especially for tasks that are sensitive to response time, which will cause task delays; on the other hand, this scheduling strategy lacks optimization of specific task characteristics, resulting in inability to fully utilize system resources.
[0055] Based on this, the embodiments of the present application provide a resource allocation method, apparatus, device and storage medium based on an intelligent computing cluster, which can fully utilize system resources while reducing system latency.
[0056] The resource allocation method, apparatus, device and storage medium based on intelligent computing cluster provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the resource allocation system based on intelligent computing cluster in the embodiments of the present application is described.
[0057] Please refer to Figure 1 In some implementations, an embodiment of the present application provides a resource allocation system based on an intelligent computing cluster, including a unified scheduler, multiple task queues, and multiple server node subsets.
[0058] In some implementations, the pending tasks may be initiated by a terminal user or an application. The terminal user may be an individual user, an enterprise user, or other system user, who submits the pending tasks through various terminal devices (such as computers, mobile phones, etc.).
[0059] Exemplarily, the unified scheduler can be installed on a computer device, which can be a management node of a server, data center or cloud platform, and is responsible for collecting and managing resource information of all intelligent computing service node clusters (hereinafter referred to as intelligent computing clusters), including the load, available resources, geographic location, unit power consumption and unit carbon consumption of computing nodes. After receiving the pending tasks, the unified scheduler can parse the task information and determine the task queue corresponding to each pending task according to the maximum task delay threshold of each pending task. Each task corresponds to a different objective constraint function, that is, to a different service quality requirement, and processes the pending tasks in the corresponding task queue through each server node subset.
[0060] Through the above system architecture and this design, the intelligent computing service node cluster can achieve efficient task scheduling and power consumption optimization, while ensuring that the service quality requirements of different task queues are met. The flexibility and adaptability of this resource allocation method enable the intelligent computing cluster to maintain service reliability and optimize energy consumption when facing complex task environments.
[0061] The resource allocation method based on the intelligent computing cluster in the embodiment of the present application can be illustrated by the following embodiment.
[0062] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first. Moreover, the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or separate consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or separate consent, the necessary user-related data for enabling the normal operation of the embodiment of the present application will be obtained.
[0063] In the embodiment of the present application, the resource allocation device based on the intelligent computing cluster will be described from the perspective of the resource allocation device based on the intelligent computing cluster, and the resource allocation device based on the intelligent computing cluster can be specifically integrated in a computer device. Figure 2 , Figure 2 The flowchart of the steps of the resource allocation method based on the intelligent computing cluster provided in the embodiment of the present application is as follows:
[0064] Step 101, for multiple task queues processed by the intelligent computing service node cluster, determine the average processing time of historical tasks associated with each task queue and the task allocation rate of each task queue;
[0065] In some embodiments, in order to better understand and quantify the specific needs and service quality requirements of each task queue, the average processing time and task allocation rate of historical tasks can be analyzed to more accurately grasp the processing characteristics of tasks managed by each task queue and formulate a more reasonable scheduling strategy for each task queue.
[0066] Among them, each task queue corresponds to a target constraint function, and each target constraint function is used to limit the functional relationship between the average processing time variable, the task allocation rate variable and the total number of service nodes variable, and the service node allocation weight variable of the current task queue while satisfying the task delay processing ratio threshold corresponding to the current task queue.
[0067] The intelligent computing service node cluster can be a group of high-performance computing nodes, which are connected together through a network to provide powerful computing capabilities for processing complex artificial intelligence tasks and large-scale data computing needs. Each intelligent computing service node in the intelligent computing service node cluster can be equipped with advanced processors, such as graphics processing units (GPUs), neural network processors (NPUs), etc.
[0068] The task queue may be a queue in the intelligent computing service node cluster for storing tasks to be processed. Each task queue contains tasks with similar characteristics, such as the same task type, similar processing requirements, or the same quality of service requirements.
[0069] The historical tasks may be tasks that have been completed. By analyzing the data of the historical tasks, statistical information about the task processing time and resource usage can be extracted to optimize the resource allocation to the task queue in the future.
[0070] The average processing time may be the average processing time of all historical tasks in each task queue, and is an important indicator for evaluating task processing efficiency.
[0071] The task allocation rate is also called the task arrival rate, which can be the frequency of task arrival in the task queue per unit time. The task allocation rate is an indicator to measure the number of tasks entering the task queue per unit time, and is used to evaluate the activity and resource requirements of the task queue.
[0072] Among them, the objective constraint function can be a mathematical function associated with each task queue, which is used to describe and limit the functional relationship between the average processing time of the task queue, the task allocation rate, and the total number of service nodes and the service node allocation weight under the condition of meeting specific service quality requirements (such as the task delay processing ratio threshold).
[0073] The task delay processing ratio threshold may be a preset threshold used to limit the percentage of tasks whose relative delay rate exceeds the relative delay rate threshold when processing pending tasks in the task queue through a subset of server nodes of the task queue. The task delay processing ratio threshold may control excessive delays that may occur in the task queue and exceed the range of the task queue.
[0074] The average processing time variable may be a variable in the objective constraint function, which represents the average processing time of historical tasks in the corresponding task queue.
[0075] Among them, the task allocation rate variable is also the task arrival rate variable, which is a variable in the objective constraint function.
[0076] Among them, the total number of service nodes variable can be a variable in the objective constraint function, which is used to represent the total number of all available server nodes in the current intelligent computing service node cluster.
[0077] Among them, the service node allocation weight variable can be a variable in the objective constraint function, indicating the importance of a task queue in resource allocation. The service node allocation weight variable determines the number of server nodes that the corresponding task queue can obtain in the intelligent computing service node cluster, thereby optimizing resource allocation and task scheduling.
[0078] Exemplarily, the historical task data of each task queue can be collected from the log system of the intelligent computing service node cluster. The historical task data may include task identification, task submission time, task start processing time, task completion time, server node identifier to which the task is assigned, and the like.
[0079] Specifically, for each historical task in the task queue, its processing time can be calculated, that is, the task completion time minus the task start processing time, and the processing time of all tasks is added up and divided by the total number of tasks to get the average processing time of the task queue. For example, if task queue A has three tasks in the history, namely T1, T2, and T3, if the processing time of T1 is 5 seconds, the processing time of T2 is 10 seconds, and the processing time of T3 is 10 seconds, then the average processing time is (5+10+10) / 3=8.33 seconds.
[0080] Specifically, you can obtain the submission time of each historical task in the task queue, select an appropriate time interval (such as 1 minute, 1 hour, etc.), count the number of tasks submitted within this time interval, and divide the number of tasks by the length of the time interval to get the task arrival rate. For example, within 1 hour, there are 6 tasks submitted, so the task arrival rate is 6 / 3600 seconds = 0.00167 tasks / second.
[0081] In some implementations, in order to meet the needs of different task queues and optimize resource allocation, different task queues may be set to correspond to different service quality requirements, that is, to correspond to different objective constraint functions. Further, since factors such as the average processing time, task allocation amount, and total number of service nodes of the task queue in the process of processing historical tasks are related to the efficiency of task execution and the rationality of resource use, the objective constraint function may be set for each task queue based on the average processing time, task allocation rate, and current total number of service nodes associated with each task queue, so as to optimize resource allocation and task scheduling as much as possible.
[0082] Through detailed task queue analysis and the establishment of target constraint functions, refined management and optimized scheduling of multiple task queues in the intelligent computing cluster are achieved, thereby ensuring service quality while controlling power consumption, improving resource utilization efficiency and system reliability, and enhancing user satisfaction and experience.
[0083] In some implementations, in order to convert the initial constraint function (quality of service constraint function) into a form that is easy to calculate so as to facilitate its application in the resource allocation process, the original probability-based quality of service constraint function (i.e., the initial constraint function) can be converted into an exponential constraint condition (i.e., the target constraint function) through a queuing theory model to simplify the calculation process and make resource allocation easier to implement and optimize. For example, the target constraint function of each task queue can be determined in the following way:
[0084] (A.1) Obtain the initial constraint function corresponding to each task queue;
[0085] The initial constraint function is used to define the functional relationship between the first ratio of the number of target pending tasks with a relative delay rate variable greater than the relative delay rate threshold in the total number of tasks among the multiple pending tasks managed by the current task queue and the task delay processing ratio threshold corresponding to the current task queue; the relative delay rate variable is obtained by the ratio between the waiting time variable of each pending task in the current task queue and the task running time variable of each pending task in the corresponding target service node;
[0086] (A.2) Through the preset queuing theory model, the initial constraint function is converted into the target constraint function.
[0087] The initial constraint function may be a service quality constraint function corresponding to each task queue, which is used to describe the task delay situation in the task queue.
[0088] The relative delay rate variable can be obtained by the ratio of the waiting time variable of each pending task in the current task queue to the task running time variable of each pending task in the corresponding target service node, that is, , where Q can be a relative delay rate variable, Can be a waiting time variable, Can be a task runtime variable.
[0089] The relative delay rate threshold may be a set threshold used to determine whether a task belongs to a delay category recognized by the system.
[0090] The target to-be-processed task may be a to-be-processed task whose relative delay rate exceeds a predetermined threshold.
[0091] The total number of tasks may be the total number of all pending tasks in the current task queue.
[0092] The first ratio may be the ratio of the target tasks to be processed whose relative delay rate variable is greater than the relative delay rate threshold to the total number of tasks.
[0093] The waiting time variable may be the time that the pending task waits to be processed in the current task queue.
[0094] The task running time variable may be the time required for the task to be processed to actually run on the corresponding target service node.
[0095] Among them, the queuing theory model can be a mathematical model used to transform the initial constraint function into a target constraint function so as to more accurately control the delay and resource allocation of tasks.
[0096] In some implementations, the initial constraint function is of the form:
[0097] ;
[0098] in, Can be a relative delay rate variable, It can be a relative delay rate threshold, It can be the task delay processing ratio threshold, The value of can be set according to the actual situation, for example, It can be 1%, 5%, 10%, etc.
[0099] By defining the initial constraint function (quality of service constraint) in a probabilistic form, the value of δ can be flexibly adjusted according to different application scenarios and task characteristics to meet different quality of service requirements. For example, for a task queue with high quality of service requirements, the value of δ can be reduced, and for a task queue with low quality of service requirements, the value of δ can be increased. In some embodiments, in order to perform targeted processing on different pending tasks, the value of δ can be adjusted according to specific needs, so that pending tasks with different quality of service requirements can be allocated to queues with corresponding processing capabilities, so as to effectively reduce task delays and make full use of system resources.
[0100] Furthermore, the relative delay rate variable It can be calculated by the following formula:
[0101] ;
[0102] in, Can be a waiting time variable, Can be a task runtime variable.
[0103] For example, in order to more accurately calculate the amount of resources that should be allocated to each task queue, thereby optimizing the resource allocation of the entire intelligent computing service node cluster, the service quality requirements in the initial constraint function can be converted into parameter restrictions in the queuing theory model to obtain the target constraint function.
[0104] In some implementations, the objective constraint function is of the form:
[0105] ;
[0106] in, It can be the relative delay rate distribution coefficient of task queue j, ,in, represents the task allocation rate variable, It can be the relative delay rate threshold of task queue j, N can be the total number of service nodes variable, can be the load balancing variable (i.e., service rate) of task queue j, It can be the target service node allocation weight of task queue j, It can be the task delay processing ratio threshold of task queue j.
[0107] In some implementations, it can be assumed that the task arrival time and the load balancing variable follow an exponential distribution. Since the exponential distribution has no memory, the calculation process can be simplified. Further, a queuing theory model (such as M / M / 1 or M / M / c) can be used. According to the assumptions of the queuing theory model, the first ratio (i.e., the delay probability) of the target tasks to be processed in the queue whose relative delay rate variable is greater than the relative delay rate threshold is calculated. For example, for the M / M / 1 model, the first ratio can be expressed as , by considering the relative delay rate distribution coefficient (that is, traffic intensity), the initial constraint function can be transformed into the target constraint function:
[0108] ;
[0109] By converting the initial constraint function into the target constraint function, we can ensure that under given resource and service quality requirements, the first ratio (that is, the delay probability) of task queue j will not exceed the predetermined task delay processing ratio threshold, so as to dynamically adjust resource allocation to meet the service quality requirements of different task queues, while optimizing the performance of the entire intelligent computing cluster and improving resource utilization.
[0110] In some implementations, in order to enable the intelligent computing service node cluster to manage its resources more effectively to meet the service quality requirements of different task queues, a preset load balancing expression can be established and jointly solved with the objective constraint function to maintain the stability of the system, balance the loads between different task queues, avoid overloading of some queues and insufficient resources of other queues, and ensure that the system can still operate normally under high load. For example, the preset load balancing expression can be constructed in the following way:
[0111] (B.1) Obtain the task allocation rate variable, average duration variable and load balancing variable corresponding to each task queue, and obtain the service demand sub-expression based on the task allocation rate variable, average duration variable and load balancing variable;
[0112] (B.2) determining a first product according to the product of the service node total quantity variable, the load balancing variable and the service node allocation weight variable;
[0113] (B.3) Based on the sum of the first product and the task allocation rate variable, the service supply sub-expression is obtained;
[0114] (B.4) Based on the service demand sub-expression and the service supply sub-expression, establish a preset load balancing expression.
[0115] Among them, the load balancing variable, also known as the service rate or resource consumption rate, represents the workload of the task queue that each server node can complete per unit time, and is used to measure service efficiency.
[0116] The service demand sub-expression may be an expression calculated based on a task allocation rate variable, an average duration variable, and a load balancing variable, and is used to quantify the demand of each task queue for service resources.
[0117] The first product may be the product of the service node total variable, the load balancing variable and the service node allocation weight variable, which represents the number of server nodes that each task queue can theoretically obtain after considering load balancing and weight.
[0118] The service supply sub-expression can be used to describe the total amount of services that the system can provide to the current task queue, which helps to ensure that the system can meet the service requirements of the corresponding task queue.
[0119] The preset load balancing expression may be an expression calculated based on a combination of a service demand sub-expression and a service supply sub-expression.
[0120] In some implementations, the preset load balancing expression may be in the following form:
[0121] ;
[0122] in, It can be the task allocation rate variable of task queue j, It can be the average duration variable of task queue j, It can be the load balancing variable of task queue j, The total number of service nodes variable, It can be the target service node allocation weight of task queue j.
[0123] Furthermore, Indicates that load balancing variables are taken into account After that, the effective task allocation rate of the corresponding task queue takes into account the average time that the tasks to be processed are in the task queue. It represents the task allocation rate and load balancing variable that the system can handle after the subset of server nodes assigned to task queue j.
[0124] By solving the load balancing expression, the optimal load balancing variable (service rate) for each task queue can be found, which helps ensure that the system can more reasonably allocate service nodes to effectively utilize resources while meeting service quality requirements.
[0125] Step 102, determine the total number of target service nodes in the intelligent computing service node cluster, and calculate the target constraint function of each task queue according to the average processing time, task allocation rate and total number of target service nodes corresponding to each task queue, and obtain the target service node allocation weight corresponding to each task queue.
[0126] In some implementations, in order to ensure that resources in the intelligent computing cluster are optimally allocated, the target service node allocation weight corresponding to each task queue may be calculated to balance the load of each server node and improve resource utilization.
[0127] Among them, the target service node allocation weight can be the weight value used when allocating server nodes to each task queue in the intelligent computing service node cluster.
[0128] Exemplarily, the average processing time, task allocation rate and total number of target service nodes can be substituted into the objective constraint function and the preset load balancing expression to obtain a first objective constraint function and a target load balancing expression with updated variables, and the first objective constraint function and the target load balancing expression can be combined to solve the load balancing variables and the service node allocation weight variables to obtain the load balancing value and the target service node allocation weight.
[0129] By calculating the target service node allocation weight corresponding to each task queue, it is convenient to subsequently allocate a corresponding subset of server nodes to each task queue, ensuring that resource allocation meets both task requirements and power consumption constraints.
[0130] In some implementations, in order to optimize resource allocation and improve system stability and reliability, the objective constraint function may be solved by obtaining the average processing time, task allocation rate, and total number of target service nodes to obtain the target service node allocation weight to ensure the rationality and effectiveness of resource allocation. For example, step 102 may include:
[0131] (102.1) Inputting the total number of target service nodes into the target constraint function corresponding to each task queue to obtain a first target constraint function;
[0132] (102.2) Obtain a preset load balancing expression, and input the average processing time, task allocation rate, and total number of target service nodes corresponding to each task queue into the load balancing expression to obtain a target load balancing expression;
[0133] (102.3) Calculate the first objective constraint function and the target load balancing expression to obtain the target service node allocation weight corresponding to each task queue.
[0134] The first objective constraint function may be a mathematical expression defined according to the service quality requirements of each task queue. After the total number of target service nodes is input into the objective constraint function, the first objective constraint function may be obtained.
[0135] The target load balancing expression may correspond to a mathematical model. After the average processing time, the task allocation rate and the total number of target service nodes are input into the load balancing expression, the target load balancing expression may be obtained.
[0136] In some implementations, the objective constraint function may be as follows:
[0137] ;
[0138] It is understandable that since the meaning of each symbol has been introduced above, it will not be repeated here. The formula can be It can also be calculated by other methods. The task allocation rate corresponding to each task queue (such as ) and the total number of target service nodes (such as 10) are input into the objective constraint function, the first objective constraint function can be obtained:
[0139] ; (1)
[0140] Among them, each task queue , They are all known quantities and can be calculated through artificial setting or other methods.
[0141] In some implementations, the preset load balancing expression may be in the following form:
[0142] ;
[0143] It is understandable that since the meaning of each symbol has been introduced above, it is not repeated here. After inputting the average processing time (such as 1 second), task allocation rate (such as 0.1) and the total number of target service nodes (such as 10) into the preset load balancing expression, the target load balancing expression can be obtained as follows:
[0144] ; (2)
[0145] By combining equation (1) and equation (2), the corresponding target service node allocation weight can be obtained. Specifically, by combining the first objective constraint function and the target load balancing expression, the load balancing value corresponding to the current task queue can be calculated: Assign weights to target service nodes The lower bound of :
[0146] .
[0147] Through the above methods, the intelligent computing service node cluster can optimize resource allocation, reduce energy consumption, and improve system stability and reliability while meeting service quality requirements.
[0148] Step 103 , allocating a weight according to the target service node of each task queue, and allocating a corresponding server node subset to each task queue.
[0149] In some implementations, in order to ensure the accuracy and efficiency of resource allocation, weights can be allocated by the target service nodes of each task queue to calculate the number of service nodes that each task queue should obtain, so as to meet the specific requirements of different task queues for service quality and improve the stability and reliability of the system.
[0150] Among them, the server node subset can be a group of server nodes allocated to each task queue according to the target service node allocation weight of the task queue. Each task queue corresponds to a group of server node subsets, and the server node subset only processes the pending tasks in the corresponding assigned task queue.
[0151] Specifically, the total number of server nodes that can be run in the current time period may be multiplied by the target service node allocation weight corresponding to each task queue to obtain the number of target service nodes allocated to each task queue.
[0152] For example, if there are 100 operational server nodes in the intelligent computing service node cluster. After calculating the target service node allocation weight of each task queue, for example, task queue A processes time-sensitive tasks, which may correspond to a higher target service node allocation weight, such as the target service node allocation weight of task queue A is 0.5, the target service node allocation weight of task queue B is 0.2, and the target service node allocation weight of task queue C is 0.1. Then, the number of server nodes in the server node subset of task queue A is 100*0.4=40, the number of server nodes in the server node subset of task queue B is 100*0.2=20, and the number of server nodes in the server node subset of task queue C is 100*0.1=10.
[0153] Through the above methods, the intelligent computing service node cluster can ensure that while meeting the service quality requirements, it optimizes resource allocation, reduces energy consumption, and improves system stability and reliability.
[0154] In some implementations, in order to improve the stability and fault tolerance of the system, for example, when some servers fail, unloaded servers can quickly take over tasks to ensure service continuity, or ensure that sufficient resources are available during high-load periods, some servers can be placed in an unloaded state to balance power consumption, thermal management, and resource allocation to ensure system stability and efficiency. Exemplarily, step 103 may include:
[0155] (103.1) Obtain the total power consumption upper limit of the intelligent computing service node cluster, the total number of multiple server nodes included in the intelligent computing service node cluster, and the operating power and no-load power of each server node;
[0156] (103.2) Determine a first number of server nodes running in the intelligent computing service node cluster in the same time period based on the total power consumption upper limit, the total number of nodes, the operating power, and the no-load power;
[0157] (103.3) determining the product of the target service node allocation weight corresponding to each task queue and the first number, and determining a second number of server nodes for processing each task queue;
[0158] (103.4) Allocate a corresponding subset of server nodes to each task queue according to the second quantity corresponding to each task queue.
[0159] The upper limit of the total power consumption may be the maximum total power consumption allowed by the intelligent computing service node cluster.
[0160] Among them, the total number of nodes can be the total number of all server nodes in the intelligent computing service node cluster.
[0161] The operating power may be the operating power of a single server node in an operating state.
[0162] The no-load power may be the no-load power of a single server node in a no-load state.
[0163] The first number may be the maximum number of server nodes that can be run in the cluster while satisfying power consumption restriction conditions.
[0164] The second number may be the number of server nodes actually allocated to each task queue according to the target service node allocation weight corresponding to each task queue.
[0165] In some implementations, the calculation formula for the first number of server nodes running in the intelligent computing service node cluster in the same time period is as follows:
[0166]
[0167] Among them, P is the total power consumption upper limit of the system, N is the total number of server nodes in the intelligent computing service node cluster, is the operating power of a single server node in the running state, It is the no-load power of a single server node in no-load state.
[0168] The above formula calculates the maximum number of server nodes that can be run without exceeding the total power consumption limit by balancing the power consumption of running server nodes and idle server nodes. Greater than the power it consumes when idle , can be , determine the remaining power consumption budget of the intelligent computing service node cluster when all server nodes are in idle state, so as to allocate the power consumption budget to the server nodes that will be activated to run tasks, thereby improving resource utilization and user satisfaction.
[0169] Furthermore, by dividing the remaining power consumption budget of the intelligent computing service node cluster by the additional power consumed by each running node relative to the idle node , we can get the number n of server nodes that can be activated without exceeding the upper limit of total power consumption.
[0170] For example, for an intelligent computing service node cluster, there are N=9000 server nodes, the operating power of each server node is 3000W, and the no-load power is 1400W. When the total power consumption limit is 20000kW, the first number of server nodes running in the same time period is calculated by the above formula to be 4625.
[0171] Through the above methods, the intelligent computing service node cluster can optimize resource allocation and improve energy efficiency while ensuring that the total power consumption limit is not exceeded, ensuring that key tasks are processed in a timely manner, thereby improving overall performance and user satisfaction.
[0172] Step 104 , obtaining a plurality of tasks to be processed, and determining a task queue corresponding to each task to be processed according to a maximum task delay threshold of each task to be processed.
[0173] In some embodiments, in order to ensure that resource allocation is optimized and energy consumption is reduced while meeting service quality requirements, each pending task can be assigned to a task queue with appropriate resources and service capabilities based on the maximum delay threshold of the pending task, so as to ensure that each pending task can be completed within an acceptable time frame, thereby meeting the service quality requirements of different pending tasks and improving the stability and reliability of the system.
[0174] The maximum task delay threshold may be the maximum delay time that the task can tolerate without affecting the quality of task completion. The maximum task delay threshold may be set according to actual conditions. For example, for real-time processing tasks, the maximum delay threshold may be very small, while for batch processing tasks, the maximum task delay threshold may be relatively large.
[0175] For example, if there is a smart computing service node cluster responsible for processing different types of AI tasks, including image recognition, speech processing, and data analysis, these tasks have different tolerances for delays, so their maximum task delay thresholds are also different. For example, the maximum delay threshold for image recognition tasks is 200 milliseconds (ms), the maximum delay threshold for speech processing tasks is 500 milliseconds, and the maximum delay threshold for data analysis tasks is 1000 milliseconds.
[0176] Furthermore, if the intelligent computing service node cluster corresponds to queue 1, queue 2 and queue 3. The service quality requirement of queue 1 is the highest, queue 2 is the second, and queue 3 is the lowest, then the image recognition task can be assigned to queue 1, the voice processing task can be assigned to queue 2, the data analysis task can be assigned to queue 3, and so on.
[0177] In some implementations, each pending task can be assigned to a corresponding task queue according to the service quality requirement of each pending task. For example, assuming there are three task queues, each corresponding to a different service quality requirement, in queue A, the relative delay rate threshold is 0.5, and the task delay processing ratio threshold is 1%; in queue B, the relative delay rate threshold is 0.7, and the task delay processing ratio threshold is 7%; in queue C, the relative delay rate threshold is 0.9, and the task delay processing ratio threshold is 10%.
[0178] For example, if there are the following tasks to be processed, the relative delay rate set for task 1 is 0.5, so it can be assigned to queue A; the relative delay rate set for task 2 is 0.6, so it can be assigned to queue B; the relative delay rate set for task 3 is 0.8, so it can be assigned to queue C.
[0179] Through the above method, each task is assigned to a task queue that can meet its service quality requirements. In this way, the intelligent computing service node cluster can more effectively manage the service quality requirements of different tasks, optimize resource allocation, improve system performance, reduce energy consumption, and ensure that key tasks are processed in a timely manner.
[0180] Step 105 , processing the pending tasks in the corresponding task queue through each subset of server nodes.
[0181] In some implementations, in order to ensure efficient execution of tasks while optimizing resource utilization, the pending tasks in each task queue may be assigned to a subset of server nodes in the task queue for processing, thereby improving the overall performance and reliability of the system.
[0182] Exemplarily, after assigning a corresponding subset of server nodes to each task queue, a scheduling algorithm can be used to assign pending tasks in the task queue to the corresponding server nodes. The scheduling algorithm can ensure that tasks can be executed efficiently based on a variety of factors, such as task priority, current server load, task type, etc.
[0183] Assume that there is a task queue Q1, which includes tasks A, B, and C. The server node subsets corresponding to Q1 include server node 1 and server node 2. Then, according to the preset priority, task A can be assigned to server node 1, and task B can be assigned to server node 2. After waiting for either server node 1 or server node 2 to complete execution, task C can be processed by the idle server node. Alternatively, if server node 1 or server node 2 has spare resources to process task C when processing the corresponding tasks, task C can be processed at the same time.
[0184] Furthermore, the task priority can be a priority set according to the task type. For example, the image recognition task is set to the first priority (highest priority), the speech processing task is set to the second priority, the data analysis task is set to the third priority, and so on. There is no restriction on the specific priority setting method.
[0185] The embodiment of the present application determines the average processing time of historical tasks associated with each task queue and the task allocation rate of each task queue by processing multiple task queues for the intelligent computing service node cluster; wherein each task queue corresponds to a target constraint function, and each target constraint function is used to limit the average processing time variable, the task allocation rate variable and the service node total variable under the task delay processing ratio threshold corresponding to the current task queue, and the functional relationship between the service node allocation weight variable of the current task queue; determine the total amount of target service nodes in the intelligent computing service node cluster, and calculate the target constraint function of each task queue according to the average processing time, the task allocation rate and the target service node total amount corresponding to each task queue, and obtain the target service node allocation weight corresponding to each task queue; according to the target service node allocation weight of each task queue, allocate the corresponding server node subset for each task queue; obtain multiple pending tasks, and determine the corresponding task queue allocated for each pending task according to the maximum task delay threshold of each pending task; through each server node subset, process the pending tasks in the corresponding task queue. In this way, according to the target constraint function corresponding to different task queues, the task type processed for each task queue can be customized to ensure that the pending tasks are processed in accordance with their characteristics, effectively reducing the overall delay. On this basis, by analyzing the average processing time and task allocation rate of each task queue, predicting the resource requirements of each task queue, ensuring that high-weight queues obtain necessary resources, ensuring that critical tasks can be processed in a timely manner, and reducing delays while making full use of system resources. In addition, by allocating pending tasks to corresponding task queues according to their maximum task delay thresholds, it can be ensured that when processing pending tasks, the duration quality requirements of pending tasks can be met, while optimizing resource usage. In summary, this application can make full use of system resources while reducing task delays.
[0186] In some implementations, in order to ensure efficient use of system resources, the target service node allocation weight of each task queue can be set between 0 and 1, and the sum of the multiple target service node allocation weights corresponding to all task queues is 1. When the sum of the multiple target service node allocation weights is greater than 1, the total power consumption upper limit of the intelligent computing service node cluster can be adjusted to improve the stability and reliability of the system. For example, the resource allocation method based on the intelligent computing cluster can also include:
[0187] (C.1) Obtain the sum of the weights of multiple target service nodes corresponding to multiple task queues;
[0188] (C.2) obtaining a preset benchmark value, and comparing the preset benchmark value with the sum of the weights allocated to the multiple target service nodes to obtain a comparison result;
[0189] (C.3) When the comparison result indicates that the sum of the weights allocated to multiple target service nodes is greater than a preset reference value, the total power consumption upper limit of the intelligent computing service node cluster is adjusted.
[0190] The sum of the target service node allocation weights of multiple queue weights may be the sum of the target service node allocation weights of all task queues. Each task queue corresponds to a target service node allocation weight, and the sum of the target service node allocation weights of multiple queue weights may be used to reflect the overall situation of current resource allocation.
[0191] The preset reference value may be a pre-set value used to determine whether the current resource allocation is reasonable. The preset reference value may be set to 1 or a value within 1.
[0192] The comparison result may be the result of comparing the sum of the weights allocated to the multiple target service nodes with a preset reference value, that is, the sum of the weights allocated to the multiple target service nodes is greater than, less than, or equal to the preset reference value.
[0193] Exemplarily, if there are three task queues, among which the target service node allocation weight corresponding to task queue 1 is 0.4, the target service node allocation weight corresponding to task queue 2 is 0.5, and the target service node allocation weight corresponding to task queue 1 is 0.2, then the sum of the multiple target service node allocation weights is 1.1, which is greater than the preset benchmark value 1. Therefore, it is necessary to adjust the total power consumption upper limit of the intelligent computing service node cluster so that the first number of server nodes running in the same time period increases.
[0194] In some implementations, sensors, management software and other tools can be used to detect each server node in the system, obtain the current actual power consumption data, and observe the power consumption change trend within a preset time period to understand the peak and valley values of power consumption and the change pattern of power consumption over time. Furthermore, a new power consumption upper limit can be determined based on the power supply capacity of the data center and the maximum load of the cooling system.
[0195] Alternatively, the technician may adjust the total power consumption upper limit by himself, for example, by inputting a new power consumption upper limit value through the configuration management interface.
[0196] For example, assume that the current total power consumption limit is 1000W, and the actual power consumption of the current system reaches 950W through detection, and the total weight of the task queue has exceeded the preset reference value 1. At this time, the power consumption trend can be analyzed. If the peak power consumption reaches 980W and the valley value is 800W in the past week, the system power supply capacity is 1500W, the maximum load of the cooling system is 1200W, and the redundancy is 10%, considering the above factors, the new total power consumption limit can be set to 1200W×(1-0.1)=1080W.
[0197] In some embodiments, when the comparison result indicates that the sum of the weights allocated to the multiple target service nodes is greater than the preset reference value, the weights allocated to the multiple target service nodes may also be adjusted, for example, by reducing the weights allocated to the multiple target service nodes in equal proportion until the sum of the weights allocated to the multiple target service nodes is less than the preset reference value.
[0198] In some embodiments, it can be ensured that the sum of the weights allocated to multiple target service nodes does not exceed the preset reference value, and is as close to the preset reference value as possible. For example, when the sum of the weights allocated to multiple target service nodes is greater than the preset reference value, the target service node allocation weights of each task queue can be adjusted according to the priority and importance of the task queue; or the target service node allocation weights of each task queue can be dynamically adjusted according to the load and resource requirements of the current task queue; or the weights can be evenly distributed among all task queues to ensure that each task queue can obtain reasonable resources.
[0199] For example, when the sum of the weights allocated to multiple target service nodes is greater than the preset reference value, assuming there are three task queues, if task queue 1 is a high priority task queue, and task queues 2 and 3 are low priority queues, then the target service node allocation weight of task queue 1 may not be adjusted, and the target service node allocation weights of task queues 2 and 3 may be reduced. Similarly, when the sum of the weights allocated to multiple target service nodes is less than the preset reference value, the target service node allocation weights of task queues 2 and 3 may be kept unchanged, while the target service node allocation weight of task queue 1 may be increased, while ensuring that the sum of the weights allocated to multiple target service nodes does not exceed the preset reference value.
[0200] Exemplarily, when the sum of the target service node allocation weights is greater than a preset benchmark value, assuming that the load of task queue 1 is higher and the loads of task queue 2 and task queue 3 are lower in the current state, then the target service node allocation weight of task queue 1 can be kept unchanged, and the target service node allocation weights of task queue 2 and task queue 3 can be reduced.
[0201] Through the above methods, we can effectively prevent system overload, ensure reasonable allocation of resources, improve system stability and energy efficiency, and optimize task processing performance to meet service needs under high load conditions.
[0202] In some implementations, in order to accurately control the allocation of service nodes, when the total power consumption upper limit changes or the target constraint function of at least one task queue changes, the weights can be redistributed to balance the loads between the task queues, so as to ensure that resource allocation and system performance are optimized while meeting the service quality requirements. For example, the resource allocation method based on the intelligent computing cluster can also include:
[0203] When the total power consumption limit of the intelligent computing service node cluster changes, the target service node allocation weight corresponding to each task queue is re-determined;
[0204] Alternatively, when the target constraint function of at least one task queue changes, the target service node allocation weight corresponding to the at least one task queue is re-determined.
[0205] In some implementations, the power consumption limit of the intelligent computing service node cluster may change due to external factors (such as energy price fluctuations, environmental changes, etc.) or internal policy adjustments. In this case, redetermining the service node allocation weights can ensure that the system continues to operate efficiently under the new total power consumption limit. When the total power consumption limit changes, reallocating weights can rebalance the load between queues to ensure the rational use of resources.
[0206] In some implementations, the objective constraint function of a task queue may change due to changes in task characteristics (such as task type, priority, processing requirements, etc.). When there is a change in the objective constraint function of a task queue pair, the target node allocation weight of the task queue can be recalculated to ensure that the system can adapt to these changes and maintain the quality of service. For example, if the objective constraint function of a task queue becomes more stringent, more resources may be required to meet the quality of service requirements. At this time, the task queue (or the weight of all task queues) is reallocated to ensure that the quality of service requirements of each task queue are met, reducing the risk of user dissatisfaction and service interruption.
[0207] It can be understood that the embodiment of determining the target service node allocation weight corresponding to each task queue has been described above and will not be described in detail here.
[0208] Through the above methods, the flexibility and adaptability of the system can be improved, and resource management and overall performance can be optimized.
[0209] See also Figure 3 The embodiment of the present application further provides a resource allocation device based on an intelligent computing cluster, which can implement the above-mentioned resource allocation method based on an intelligent computing cluster. The resource allocation device based on an intelligent computing cluster includes:
[0210] Determination module 31, for determining the average processing time of historical tasks associated with each task queue and the task allocation rate of each task queue for multiple task queues processed by the intelligent computing service node cluster; wherein each task queue corresponds to a target constraint function, and each target constraint function is used to limit the functional relationship between the average processing time variable, the task allocation rate variable and the total number of service nodes variable, and the service node allocation weight variable of the current task queue under the condition that the task delay processing ratio threshold corresponding to the current task queue is satisfied;
[0211] The calculation module 32 is used to determine the total number of target service nodes in the intelligent computing service node cluster, and calculate the target constraint function of each task queue according to the average processing time, task allocation rate and total number of target service nodes corresponding to each task queue to obtain the target service node allocation weight corresponding to each task queue;
[0212] An allocation module 33, configured to allocate a weight according to a target service node of each task queue and allocate a corresponding server node subset to each task queue;
[0213] An acquisition module 34 is used to acquire a plurality of tasks to be processed, and determine a task queue corresponding to each task to be processed according to a maximum task delay threshold of each task to be processed;
[0214] The processing module 35 is used to process the pending tasks in the corresponding task queue through each server node subset.
[0215] The specific implementation of the resource allocation device based on the intelligent computing cluster is basically the same as the specific implementation of the resource allocation method based on the intelligent computing cluster, and will not be repeated here. On the premise of meeting the requirements of the embodiment of the present application, the resource allocation device based on the intelligent computing cluster can also be provided with other functional modules to implement the resource allocation method based on the intelligent computing cluster in the above embodiment.
[0216] The embodiment of the present application also provides a computer device, the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the resource allocation method based on the intelligent computing cluster when executing the computer program. The computer device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0217] See also Figure 4 , Figure 4 The hardware structure of a computer device according to another embodiment is shown, and the computer device includes:
[0218] The processor 41 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0219] The memory 42 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 42 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 42, and the processor 41 calls and executes the resource allocation method based on the intelligent computing cluster in the embodiment of this application;
[0220] Input / output interface 43, used to implement information input and output;
[0221] The communication interface 44 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0222] A bus 45 that transmits information between the various components of the device (e.g., the processor 41, the memory 42, the input / output interface 43, and the communication interface 44);
[0223] The processor 41 , the memory 42 , the input / output interface 43 and the communication interface 44 are connected to each other in communication within the device via a bus 45 .
[0224] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the resource allocation method based on the intelligent computing cluster is implemented.
[0225] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0226] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0227] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0228] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0229] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0230] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0231] It should be understood that in the present application, "at least one (item)" and "several" refer to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0232] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0233] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0234] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0235] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, a node, or a network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0236] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A resource allocation method based on intelligent computing cluster, characterized in that: The method comprises: For multiple task queues processed by the intelligent computing service node cluster, determine the average processing time of historical tasks associated with each task queue and the task allocation rate of each task queue; Each task queue corresponds to a target constraint function, and each target constraint function is used to limit the functional relationship between the average processing time variable, the task allocation rate variable, and the total number of service nodes variable and the service node allocation weight variable of the current task queue under the condition that the task delay processing ratio threshold corresponding to the current task queue is met; The target constraint function of each task queue is determined by: obtaining an initial constraint function corresponding to each task queue; wherein the initial constraint function is used to define a functional relationship between a first ratio of target tasks to be processed whose relative delay rate variable is greater than a relative delay rate threshold in a plurality of tasks to be processed managed by the current task queue and a task delay processing ratio threshold corresponding to the current task queue; the relative delay rate variable is obtained by the ratio between the waiting time variable of each task to be processed in the current task queue and the task running time variable of each task to be processed in the corresponding target service node; the initial constraint function is converted into a target constraint function through a preset queuing theory model; Determine the total number of target service nodes in the intelligent computing service node cluster, and calculate the target constraint function of each task queue according to the average processing time corresponding to each task queue, the task allocation rate and the total number of target service nodes to obtain the target service node allocation weight corresponding to each task queue; Assign weights to each task queue according to the target service node, and assign a corresponding subset of server nodes to each task queue; Acquire multiple tasks to be processed, and determine a task queue corresponding to each task to be processed according to a maximum task delay threshold of each task to be processed; Through each subset of server nodes, the pending tasks in the corresponding task queue are processed.
2. The resource allocation method based on intelligent computing cluster according to claim 1, characterized in that: The target constraint function of each task queue is calculated according to the average processing time corresponding to each task queue, the task allocation rate and the total number of target service nodes to obtain the target service node allocation weight corresponding to each task queue, including: Inputting the total amount of the target service nodes into the target constraint function corresponding to each task queue to obtain a first target constraint function; Obtain a preset load balancing expression, and input the average processing time corresponding to each task queue, the task allocation rate, and the total number of target service nodes into the load balancing expression to obtain a target load balancing expression; The first objective constraint function and the target load balancing expression are calculated to obtain the target service node allocation weight corresponding to each task queue.
3. The resource allocation method based on intelligent computing cluster according to claim 2 is characterized in that: The preset load balancing expression is constructed in the following way: Obtaining a task allocation rate variable, an average duration variable, and a load balancing variable corresponding to each task queue, and obtaining a service demand sub-expression according to the task allocation rate variable, the average duration variable, and the load balancing variable; Determine a first product according to the product of the service node total quantity variable, the load balancing variable and the service node allocation weight variable; Obtaining a service supply sub-expression according to the sum of the first product and the task allocation rate variable; A preset load balancing expression is established based on the service demand sub-expression and the service supply sub-expression.
4. The resource allocation method based on intelligent computing cluster according to claim 1, characterized in that: The step of allocating a weight according to the target service node of each task queue and allocating a corresponding subset of server nodes to each task queue includes: Obtain the total power consumption upper limit of the intelligent computing service node cluster, the total number of server nodes included in the intelligent computing service node cluster, and the operating power and no-load power of each server node; Based on the total power consumption upper limit, the total number of nodes, the operating power and the no-load power, determine a first number of server nodes running in the intelligent computing service node cluster in the same time period; Determine a product of the target service node allocation weight corresponding to each task queue and the first number, and determine a second number of server nodes for processing each task queue; According to the second number corresponding to each task queue, a corresponding subset of server nodes is allocated to each task queue.
5. The resource allocation method based on intelligent computing cluster according to claim 1, characterized in that: The method further comprises: Obtaining the sum of the weights of multiple target service nodes corresponding to the multiple task queues; Obtaining a preset reference value, and comparing the preset reference value with the sum of the weights allocated to the multiple target service nodes to obtain a comparison result; When the comparison result indicates that the sum of the weights allocated to the multiple target service nodes is greater than the preset reference value, the total power consumption upper limit of the intelligent computing service node cluster is adjusted.
6. The resource allocation method based on intelligent computing cluster according to claim 1, characterized in that: The method further comprises: When the total power consumption upper limit of the intelligent computing service node cluster changes, the target service node allocation weight corresponding to each task queue is re-determined; Alternatively, when the target constraint function of at least one task queue changes, the target service node allocation weight corresponding to the at least one task queue is re-determined.
7. A resource allocation device based on intelligent computing cluster, characterized in that: The device comprises: A determination module is used to determine the average processing time of historical tasks associated with each task queue and the task allocation rate of each task queue for multiple task queues processed by the intelligent computing service node cluster; wherein each task queue corresponds to a target constraint function, and each target constraint function is used to limit the functional relationship between the average processing time variable, the task allocation rate variable and the total number of service nodes variable, and the service node allocation weight variable of the current task queue under the task delay processing ratio threshold corresponding to the current task queue; wherein the target constraint function of each task queue is determined in the following manner: obtaining the initial constraint function corresponding to each task queue; wherein the initial constraint function is used to limit the functional relationship between the first proportion of the total number of target tasks with a relative delay rate variable greater than the relative delay rate threshold among the multiple pending tasks managed by the current task queue and the task delay processing ratio threshold corresponding to the current task queue; the relative delay rate variable is obtained by the ratio between the waiting time variable of each pending task in the current task queue and the task running time variable of each pending task at the corresponding target service node; the initial constraint function is converted into a target constraint function through a preset queuing theory model; A calculation module is used to determine the total number of target service nodes in the intelligent computing service node cluster, and calculate the target constraint function of each task queue according to the average processing time corresponding to each task queue, the task allocation rate and the total number of target service nodes to obtain the target service node allocation weight corresponding to each task queue; An allocation module is used to allocate weights according to the target service nodes of each task queue and allocate a corresponding subset of server nodes to each task queue; An acquisition module, used for acquiring a plurality of pending tasks, and determining a task queue corresponding to each pending task according to a maximum task delay threshold of each pending task; The processing module is used to process the pending tasks in the corresponding task queue through each server node subset.
8. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the resource allocation method based on the intelligent computing cluster as described in any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the resource allocation method based on an intelligent computing cluster as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Task scheduling method, electronic equipment and storage medium
CN117215735A
KR20210094639A