Calculating power task scheduling method and device and related equipment
By generating a recommended node list and determining computing power nodes based on the lowest system latency condition, the problem of resource waste and insufficiency in computing power task scheduling is solved, and more efficient resource utilization is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD
- Filing Date
- 2026-01-21
- Publication Date
- 2026-05-15
AI Technical Summary
Existing computing task scheduling methods fail to fully consider the differences between computing tasks and system compatibility, resulting in resource waste or insufficiency and poor scheduling performance.
By acquiring the resource requirements of computing tasks, a recommended node list is generated, and matching computing nodes are selected and scheduled based on the preset condition of lowest system latency, thereby optimizing resource allocation.
It improves the scheduling efficiency of computing tasks, avoids resource shortages or waste, and enhances resource utilization.
Smart Images

Figure CN122044784A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computing power scheduling technology, specifically to a method, apparatus, and related equipment for scheduling computing power tasks. Background Technology
[0002] In the field of computing resource scheduling and allocation, related technologies mainly rely on static or simple rule-based scheduling strategies, allocating resources through preset rules or load balancing mechanisms. These resource scheduling methods typically only consider the inherent attributes of the computing tasks themselves, such as CPU utilization and memory usage, for task scheduling. However, these computing task scheduling schemes do not consider the differences between different computing tasks, nor the compatibility between different computing tasks and the system. Therefore, in the scheduling of computing tasks, there will be situations where computing tasks are scheduled to computing nodes that do not match the attributes of the computing tasks, resulting in wasted or insufficient computing node resources, thus leading to poor scheduling performance. Summary of the Invention
[0003] This application provides a method, apparatus, and related equipment for scheduling computing tasks, which solves the problem of poor scheduling effect of computing tasks in related technologies.
[0004] To solve the above problems, this application is implemented as follows:
[0005] In a first aspect, embodiments of this application provide a method for scheduling computing tasks, applied to a computing system, the method comprising:
[0006] Obtain the computing resource requirements information corresponding to the N computing power tasks to be processed, where N is a positive integer;
[0007] Based on the M first computing power nodes included in the computing power system, N recommended node lists are generated that match the N computing power resource demand information. Each recommended node list includes K first computing power nodes, where M is a positive integer greater than N and K is a positive integer less than M.
[0008] According to preset conditions, in the recommended node list, a second computing power node matching the corresponding computing power task is determined, resulting in N second computing power nodes. The second computing power node is a first computing power node in the corresponding recommended node list. The preset conditions include the lowest system latency of the computing power system.
[0009] The N computing tasks are scheduled to the N second computing nodes for processing.
[0010] Optionally, obtaining the N computing resource requirements corresponding to the N computing tasks to be processed includes:
[0011] Receive input computing power task requests, wherein the computing power task requests include the N computing power tasks;
[0012] Calculate the computational intensity corresponding to the target computing power task to obtain a first calculation result. The computational intensity is used to indicate the size of computing power resources required by the target computing power task. The target computing power task is any one of the N computing power tasks.
[0013] The latency sensitivity corresponding to the target computing power task is calculated to obtain a second calculation result, wherein the latency sensitivity is used to indicate the sensitivity of the target computing power task to response time;
[0014] Calculate the throughput requirement corresponding to the target computing power task to obtain a third calculation result. The throughput requirement is used to indicate the amount of data that the target computing power task needs to process per unit time during the task processing.
[0015] The computing resource requirement information corresponding to the target computing task is generated based on the first calculation result, the second calculation result, and the third calculation result.
[0016] Optionally, generating the computing resource requirement information corresponding to the target computing task based on the first calculation result, the second calculation result, and the third calculation result includes:
[0017] The first calculation result is converted into a first vector, the second calculation result is converted into a second vector, and the third calculation result is converted into a third vector;
[0018] The first vector, the second vector, and the third vector are normalized to obtain the processed first vector, the processed second vector, and the processed third vector. The normalization process is used to map the first vector, the second vector, and the third vector to the same feature space.
[0019] A target vector is generated based on the processed first vector, the processed second vector, and the processed third vector. The computing resource requirement information corresponding to the target computing task includes the target vector.
[0020] Optionally, the step of generating a list of N recommended nodes that match the N computing resource demand information based on the M first computing nodes included in the computing power system includes:
[0021] M status information corresponding to the M first computing power nodes are determined, and the status information is used to indicate the current available resource status of the corresponding first computing power node;
[0022] The M state information pieces are converted into vectors respectively to obtain M fourth vectors that correspond one-to-one with the M state information pieces;
[0023] Calculate the Euclidean distance between the target vector corresponding to the target computing power task and the M fourth vectors respectively to obtain M distance values;
[0024] From the M distance values, determine K target distance values, where the K target distance values are the K smallest distance values among the M distance values;
[0025] Generate a recommended node list corresponding to the target computing power task, wherein the recommended node list corresponding to the target computing power task includes K first computing nodes corresponding to the K target distance values.
[0026] Optionally, based on preset conditions, the step of determining a second computing power node matching the corresponding computing power task from the recommended node list to obtain N second computing power nodes includes:
[0027] Calculate the matching degree between the computing resource requirement information corresponding to the target computing task and the K status information corresponding to the K first computing nodes included in the recommended node list corresponding to the target computing task, and obtain the K matching degree.
[0028] Based on preset conditions, a target matching degree is determined among the K matching degrees, wherein the target matching degree is the matching degree that best meets the preset conditions among the K matching degrees;
[0029] The first computing power node corresponding to the target matching degree is determined as the second computing power node corresponding to the target computing power task.
[0030] Optionally, after scheduling the N computing tasks to the N second computing nodes and processing the N computing tasks, the method further includes:
[0031] The current system state and current resource state of the computing power system are obtained. The current system state is used to indicate the computing resource requirements, latency sensitivity, and load requirements of the computing power system for processing the N computing power tasks. The current resource state is used to indicate the processor resources, memory resources, and storage resources currently available in the computing power system.
[0032] Based on the set reward function, the current system state and the current resource state are updated respectively to obtain the target system state and the target resource state;
[0033] The computing power system is optimized based on the target system state and the target resource state.
[0034] Secondly, this application provides a scheduling device for computing power tasks, applied to a computing power system, the device comprising:
[0035] The acquisition module is used to acquire N computing resource requirement information corresponding to N computing power tasks to be processed, where N is a positive integer;
[0036] The generation module is used to generate N recommended node lists that match the N computing resource demand information based on the M first computing power nodes included in the computing power system. Each recommended node list includes K first computing power nodes, where M is a positive integer greater than N and K is a positive integer less than M.
[0037] The determination module is used to determine, according to preset conditions, a second computing power node matching the corresponding computing power task in the recommended node list, to obtain N second computing power nodes, wherein the second computing power node is a first computing power node in the corresponding recommended node list, and the preset conditions include the lowest system latency of the computing power system;
[0038] The processing module is used to schedule the N computing power tasks to the N second computing power nodes respectively, and to process the N computing power tasks.
[0039] Thirdly, this application also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method described in the first aspect above.
[0040] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in the first aspect above.
[0041] Fifthly, this application also provides a computer program product, including computer instructions that, when executed by a processor, implement the steps of the method described in the first aspect above.
[0042] This application provides a method, apparatus, and related equipment for scheduling computing power tasks, relating to the field of computing power scheduling technology. The method includes: acquiring N computing power resource demand information corresponding to N computing power tasks to be processed, where N is a positive integer; generating N recommended node lists matching the N computing power resource demand information based on M first computing power nodes included in the computing power system, each of the recommended node lists including K first computing power nodes, where M is a positive integer greater than N and K is a positive integer less than M; determining second computing power nodes matching the corresponding computing power tasks in the recommended node lists according to preset conditions, obtaining N second computing power nodes, where each second computing power node is one of the first computing power nodes in the corresponding recommended node list, the preset conditions including the lowest system latency of the computing power system; and scheduling the N computing power tasks to the N second computing power nodes respectively for processing. The technical solution of this application, when acquiring N computing power tasks to be processed, determines a recommended node list suitable for each computing power task from among M first computing power nodes based on the computing power resource requirement information corresponding to the N computing power tasks, and determines the second computing power node corresponding to each computing power task based on the constraint of the lowest system latency of the computing power system. Thus, the N computing power tasks are processed based on the N second computing power nodes. Therefore, in the process of processing computing power tasks, the attribute information of computing power tasks is fully considered, avoiding insufficient or wasted resources when computing power nodes process computing power tasks, and improving the scheduling effect of computing power tasks. Attached Figure Description
[0043] To more clearly illustrate the technical solution of this application, the drawings used in the description of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 A flowchart illustrating a method for scheduling computing tasks provided in an embodiment of this application;
[0045] Figure 2 This is a schematic diagram of the system structure provided in the embodiments of this application;
[0046] Figure 3 A schematic diagram of the structure of a computing task scheduling device provided in an embodiment of this application;
[0047] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0048] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0049] The terms "first," "second," etc., used in the embodiments of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices. Additionally, the use of "and / or" in this application indicates at least one of the connected objects, such as A and / or B and / or C, representing seven possibilities: including A alone, B alone, C alone, and the presence of both A and B, both B and C, both A and C, and the presence of A, B, and C.
[0050] See Figure 1 , Figure 1 This is a flowchart illustrating the scheduling method for computing tasks provided in an embodiment of this application. Figure 1 As shown, the scheduling method for computing power tasks is applied to a computing power system. The scheduling method for computing power tasks may include the following steps:
[0051] Step 101: Obtain the N computing resource requirements corresponding to the N computing tasks to be processed, where N is a positive integer.
[0052] In this embodiment, the computing power system deploys M first computing power nodes. After obtaining the task to be processed input by the user, it determines the N computing power tasks corresponding to the task to be processed, and then processes the N computing power tasks. It should be noted that in this embodiment, each first computing power node can only process one computing power task at a time. Therefore, it is necessary to schedule the N computing power tasks so that the N computing power tasks can be processed simultaneously.
[0053] After receiving N computing power tasks, it is necessary to obtain the computing power resource requirement information corresponding to each computing power task. The computing power resource requirement information may include the input and output data scale, the maximum acceptable latency, and the CPU and memory usage during the actual operation of the task, etc., which are not specifically limited in this embodiment.
[0054] Step 102: Based on the M first computing power nodes included in the computing power system, generate N recommended node lists that match the N computing power resource demand information. Each recommended node list includes K first computing power nodes, where M is a positive integer greater than N and K is a positive integer less than M.
[0055] In this embodiment, based on the computing resource requirement information corresponding to each computing task, a corresponding recommended node list is generated in the M first computing nodes included in the computing system. That is, the K first computing nodes that are most suitable for the corresponding computing task are found in the M first computing nodes, thereby obtaining N recommended node lists, and each recommended node list corresponds to a computing task.
[0056] It should be noted that in this embodiment, each recommended node list includes the same number of first computing power nodes, for example, it may include 10 first computing power nodes.
[0057] Step 103: According to preset conditions, determine the second computing power node that matches the corresponding computing power task in the recommended node list to obtain N second computing power nodes. The second computing power node is a first computing power node in the corresponding recommended node list. The preset conditions include the lowest system latency of the computing power system.
[0058] In this embodiment, based on preset conditions set by the system, a first computing power node that best matches the corresponding computing power task is determined from each recommended node list, and thus serves as the second computing power node to process the computing power task. The second computing power node is the first computing power node in the corresponding recommended node list that best matches the computing power task.
[0059] It should be noted that the preset condition in this embodiment is to minimize the system latency of the computing power system. Therefore, based on this preset condition, each push node list is filtered, and the second computing power node that best matches the corresponding computing power task is determined from the K first computing power nodes. In other embodiments, other preset conditions can be added, such as minimum computing power resource consumption, fastest processing time, etc., but no specific limitation is made in this embodiment.
[0060] Step 104: Schedule the N computing tasks to the N second computing nodes respectively, and process the N computing tasks.
[0061] In this embodiment, N computing tasks are scheduled to the corresponding N second computing nodes. The corresponding computing tasks are processed based on the second computing nodes. When a computing task is received, the computing resource requirements of the computing task are fully considered, thereby improving the resource utilization of the computing nodes.
[0062] The technical solution of this application, when acquiring N computing power tasks to be processed, determines a recommended node list suitable for each computing power task from among M first computing power nodes based on the computing power resource requirement information corresponding to the N computing power tasks, and determines the second computing power node corresponding to each computing power task based on the constraint of the lowest system latency of the computing power system. Thus, the N computing power tasks are processed based on the N second computing power nodes. Therefore, in the process of processing computing power tasks, the attribute information of computing power tasks is fully considered, avoiding insufficient or wasted resources when computing power nodes process computing power tasks, and improving the scheduling effect of computing power tasks.
[0063] In some feasible implementations, optionally, obtaining the N computing resource requirement information corresponding to the N computing power tasks to be processed includes:
[0064] Receive input computing power task requests, wherein the computing power task requests include the N computing power tasks;
[0065] Calculate the computational intensity corresponding to the target computing power task to obtain a first calculation result. The computational intensity is used to indicate the size of computing power resources required by the target computing power task. The target computing power task is any one of the N computing power tasks.
[0066] The latency sensitivity corresponding to the target computing power task is calculated to obtain a second calculation result, wherein the latency sensitivity is used to indicate the sensitivity of the target computing power task to response time;
[0067] Calculate the throughput requirement corresponding to the target computing power task to obtain a third calculation result. The throughput requirement is used to indicate the amount of data that the target computing power task needs to process per unit time during the task processing.
[0068] The computing resource requirement information corresponding to the target computing task is generated based on the first calculation result, the second calculation result, and the third calculation result.
[0069] In this embodiment, after receiving a computing power task request, the request is analyzed to obtain N computing power tasks. The resource requirements of the target computing power task are then calculated. Specifically, in this embodiment, the resource requirements are determined based on the computational intensity, latency sensitivity, and throughput requirements of the target computing power task.
[0070] Specifically, for the first Each task is evaluated based on its computational intensity, latency sensitivity, and throughput requirements.
[0071] Computational intensity reflects the computing resource requirements of a business task, and is typically measured by metrics such as CPU utilization and memory consumption. The calculation formula is as follows:
[0072] .
[0073] in, For the first The computational intensity of each task For the task CPU usage For the task Memory usage This represents the total amount of resources that can be allocated by the system.
[0074] Latency sensitivity reflects how sensitive a task is to response time. It is calculated by considering both the task's response time and the maximum required latency. The formula is as follows:
[0075] .
[0076] in, For the first The latency sensitivity of each task For the task The actual response time This represents the maximum acceptable latency for the task.
[0077] Throughput requirement measures the amount of data a task needs to process per unit of time, typically expressed as the amount of input and output data. The formula is as follows:
[0078] .
[0079] in, For the first The throughput requirements of each task. and Tasks The amount of input and output data, The length of time required to process this amount of data.
[0080] The first calculation result is obtained by calculating the computational intensity of the target computing task, the second calculation result is obtained by calculating the computational latency sensitivity, and the third calculation result is obtained by calculating the computational throughput requirement. The computing resource requirement information corresponding to the target computing task is obtained by combining the first calculation result, the second calculation result and the third calculation result.
[0081] Optionally, generating the computing resource requirement information corresponding to the target computing task based on the first calculation result, the second calculation result, and the third calculation result includes:
[0082] The first calculation result is converted into a first vector, the second calculation result is converted into a second vector, and the third calculation result is converted into a third vector;
[0083] The first vector, the second vector, and the third vector are normalized to obtain the processed first vector, the processed second vector, and the processed third vector. The normalization process is used to map the first vector, the second vector, and the third vector to the same feature space.
[0084] A target vector is generated based on the processed first vector, the processed second vector, and the processed third vector. The computing resource requirement information corresponding to the target computing task includes the target vector.
[0085] In this embodiment, after obtaining the first, second, and third calculation results, the profile modeling module can generate a business profile vector for each task. This vector contains multi-dimensional features of the task (computational intensity, latency sensitivity, throughput requirements, etc.), and a unified profile representation is obtained through normalization or standardization processing.
[0086] Specifically, the first calculation result, the second calculation result, and the third calculation result will first be transformed into vectors to obtain the first vector. Second vector Third vector .
[0087] Therefore, for the first vector Second vector Third vector The vector is normalized, generating a first, second, and third processed vector. The final target vector is then obtained. Target vector It can then be expressed as:
[0088] .
[0089] vector Completed the task Modeling of business profiles.
[0090] Optionally, the step of generating a list of N recommended nodes that match the N computing resource demand information based on the M first computing nodes included in the computing power system includes:
[0091] M status information corresponding to the M first computing power nodes are determined, and the status information is used to indicate the current available resource status of the corresponding first computing power node;
[0092] The M state information pieces are converted into vectors respectively to obtain M fourth vectors that correspond one-to-one with the M state information pieces;
[0093] Calculate the Euclidean distance between the target vector corresponding to the target computing power task and the M fourth vectors respectively to obtain M distance values;
[0094] From the M distance values, determine K target distance values, where the K target distance values are the K smallest distance values among the M distance values;
[0095] Generate a recommended node list corresponding to the target computing power task, wherein the recommended node list corresponding to the target computing power task includes K first computing nodes corresponding to the K target distance values.
[0096] In this embodiment, the K-nearest neighbor (KNN) algorithm is used to match tasks with resources. Based on the characteristics of the business profile, the most similar resource node is found for matching. The resource allocation optimization problem is modeled as an integer programming model and solved. It is assumed that... One task and One resource node, For the task Assigned to node The binary decision variables are used, and the goal of resource allocation is to minimize the total latency of the system. The constraints include that each task can only be assigned to one resource node, and the load of each resource node does not exceed its maximum carrying capacity.
[0097] Specifically, when generating the recommended node list corresponding to each computing power task, firstly, M state information points corresponding to the M first computing power nodes are determined. These state information points indicate the current available resource status of the corresponding first computing power node, such as available CPU, memory, and storage resources. The state vector of each resource node can be represented as:
[0098] .
[0099] in, , , They represent the first The amount of CPU, memory, and storage resources for each resource node.
[0100] The key to the KNN algorithm lies in how to measure the similarity between tasks and resources. To select the optimal resource, Euclidean distance is used to measure the matching degree between tasks and resources:
[0101] .
[0102] here, This represents the Euclidean distance between the task and the resource node. The smaller the distance, the higher the similarity between the task and the resource, and the better the match.
[0103] Calculate the distance between all resource nodes and the current task. For each task, use the formula from the previous step to calculate its distance to all resource nodes in the resource pool. Then, based on the calculated distances, sort these nodes in ascending order of distance and select the one most similar to the task. One resource node is selected as a recommended candidate resource.
[0104] Using a weighted voting strategy for resource recommendation, The recommended value is the weighted average of the resource characteristic values of the neighbors. The resource recommendation value can be obtained using the weighted average calculation formula:
[0105] .
[0106] in, Indicates task With resource nodes The similarity between them is calculated using the reciprocal of the Euclidean distance, but this can also be adjusted based on the historical performance and stability of the resource nodes. For the first The characteristics of each resource node.
[0107] The system outputs recommendations to the task. The recommended node list is provided. In this embodiment, the scheduling system can dynamically allocate resources through such recommendations, ensuring that tasks receive the most suitable resource support from the resource pool.
[0108] Optionally, based on preset conditions, the step of determining a second computing power node matching the corresponding computing power task from the recommended node list to obtain N second computing power nodes includes:
[0109] Calculate the matching degree between the computing resource requirement information corresponding to the target computing task and the K status information corresponding to the K first computing nodes included in the recommended node list corresponding to the target computing task, and obtain the K matching degree.
[0110] Based on preset conditions, a target matching degree is determined among the K matching degrees, wherein the target matching degree is the matching degree that best meets the preset conditions among the K matching degrees;
[0111] The first computing power node corresponding to the target matching degree is determined as the second computing power node corresponding to the target computing power task.
[0112] In this embodiment, a second computing power node matching each computing power task is determined based on the identified recommended node list. That is, resources in the system are dynamically adjusted and allocated according to the recommended resource nodes and their available resources to ensure that tasks are completed within the specified time and to avoid resource over- or under-utilization. By optimizing the allocation strategy, efficient resource utilization is achieved.
[0113] Specifically, the resource requirements for each task are determined through task profiling and resource recommendations provided by the recommendation algorithm module. These resource requirements typically include CPU, memory, and storage.
[0114] .
[0115] in, This indicates the resource requirements of the task.
[0116] The system monitors the current status of the resource pool in real time, including information such as available CPU, memory, and storage for each resource node:
[0117] .
[0118] in, Represents resource nodes Currently available resources.
[0119] Integer programming is used to optimize the resource allocation problem, and this optimization problem is solved to allocate resources. The following objective function and constraints are used to optimize the matching of tasks and resources:
[0120] Objective function:
[0121] .
[0122] in, For the task With resource nodes The degree of matching between them For the task Assigned to resource nodes Binary decision variables.
[0123] The constraints include:
[0124] 1. Each task must be assigned to a resource node:
[0125] .
[0126] 2. The load on each resource node must not exceed its maximum carrying capacity:
[0127] .
[0128] 3. Binary constraints for task allocation
[0129] .
[0130] Solve the integer programming problem described above. Based on the solution, determine which computing node each computing task is assigned to, i.e., determine the second computing node corresponding to each computing task. The allocation strategy ensures that the resource requirements of each task are met, while not exceeding the available resources of the resource nodes.
[0131] Optionally, after scheduling the N computing tasks to the N second computing nodes and processing the N computing tasks, the method further includes:
[0132] The current system state and current resource state of the computing power system are obtained. The current system state is used to indicate the computing resource requirements, latency sensitivity, and load requirements of the computing power system for processing the N computing power tasks. The current resource state is used to indicate the processor resources, memory resources, and storage resources currently available in the computing power system.
[0133] Based on the set reward function, the current system state and the current resource state are updated respectively to obtain the target system state and the target resource state;
[0134] The computing power system is optimized based on the target system state and the target resource state.
[0135] In this embodiment, during task execution, the system dynamically adjusts resource allocation based on real-time load changes and task progress. At this time, the scheduling algorithm employs reinforcement learning to update the resource allocation strategy in real time. The Q-learning algorithm is used to optimize the scheduling strategy. The goal of Q-learning is to find the optimal resource scheduling strategy through the interaction between the agent and the environment.
[0136] Setting status Actions based on the current system state (including task load, resource status, etc.) Rewards for the resource status (resource scheduling strategy) selected by the current system Provides immediate feedback after system execution (including response time, resource utilization, etc.).
[0137] The update formula for reinforcement learning Q-learning is:
[0138] .
[0139] in, For learning rate, As a discount factor, For instant rewards, The maximum possible action in the next state value.
[0140] By continuously updating resource scheduling strategies through reinforcement learning, the system can optimize resource scheduling and improve system response speed.
[0141] In reinforcement learning, after each scheduling decision, the agent observes the environment (i.e., changes in resource and task states) and continues to make decisions based on the new states. Through repeated trial and error, reinforcement learning continuously optimizes its strategy, ultimately learning an optimal scheduling policy. It can automatically adjust resource allocation in dynamic resource and task environments to achieve optimal performance. This is the advantage of reinforcement learning algorithms: the ability to adaptively adjust based on feedback.
[0142] In some embodiments, such as Figure 2 As shown, Figure 2 This is a schematic diagram of the system architecture in this embodiment. This application provides a method for intelligent recommendation and allocation of computing resources based on business profiles, by constructing task profiles and resource profiles, and based on the characteristics of task requirements and the existing state of the resource pool. The method will be described in detail below through specific embodiments.
[0143] First, key features for the task profile are defined in the business feature extraction module, such as computational intensity, latency sensitivity, and throughput requirements. Multi-dimensional features of the tasks are extracted by real-time monitoring and collection of business task data. In this embodiment, the task profile is constructed using the following formula:
[0144] .
[0145] in, , , These are the standardized values for computational intensity, latency sensitivity, and throughput requirements, respectively. The vector completed the task. Modeling of business profiles.
[0146] The resource profiling module obtains the real-time usage status of each resource node, including the usage of resources such as CPU, memory, and storage. Assume the resource node profile is as follows:
[0147] .
[0148] These resource profiles are dynamically updated as the system status changes, ensuring that resource recommendations are based on the latest resource usage.
[0149] The KNN algorithm is used to evaluate the matching degree between tasks and resources based on the distance between the task profile and the resource profile. Common distance calculation methods include Euclidean distance, as shown in the formula below:
[0150] .
[0151] Based on the calculated distance values, we select the one most similar to the task. Each resource node is used to recommend resources. This process is dynamically adjusted based on real-time system status and task requirements to ensure the accuracy and efficiency of resource allocation.
[0152] refer to Figure 2 This further illustrates how reinforcement learning algorithms can be used to optimize resource allocation decisions.
[0153] Define a state space and an action space. The state describes the current state of the task and resources. In this embodiment, the task state includes computational requirements, latency sensitivity, and load requirements; the resource state includes the availability of CPU, memory, and storage. The action space represents the selection of which resource nodes the task is assigned to. That is, at each point in time, the system selects the most suitable resource node to assign the task.
[0154] Design a reward function. To optimize resource allocation, the reward function needs to consider the following factors simultaneously:
[0155] Resource utilization rate: High resource utilization rate means a more efficient system;
[0156] Task completion time: The shorter the task completion time, the higher the reward;
[0157] System response time: Tasks with shorter response times are more rewarded.
[0158] Fairness: In scheduling multiple tasks, try to maintain fairness.
[0159] The Q-learning algorithm is used to update the state-action value function, and the resource scheduling strategy is optimized through repeated interactions. At each time step, the system selects the optimal action for resource allocation based on the current state.
[0160] .
[0161] Through continuous trial and error and learning, the system can gradually improve its resource allocation decisions, maximizing overall performance. Based on the updated values, the system selects the optimal resource node for task allocation. At each moment, the agent dynamically adjusts its resource allocation strategy by evaluating the match between tasks and resources, as well as the resource utilization rate under the current state.
[0162] The technical solution of this application, when acquiring N computing power tasks to be processed, determines a recommended node list suitable for each computing power task from among M first computing power nodes based on the computing power resource requirement information corresponding to the N computing power tasks, and determines the second computing power node corresponding to each computing power task based on the constraint of the lowest system latency of the computing power system. Thus, the N computing power tasks are processed based on the N second computing power nodes. Therefore, in the process of processing computing power tasks, the attribute information of computing power tasks is fully considered, avoiding insufficient or wasted resources when computing power nodes process computing power tasks, and improving the scheduling effect of computing power tasks.
[0163] See Figure 3 , Figure 3 This is a structural diagram of the computing task scheduling device provided in the embodiments of this application. Figure 3 As shown, the computing task scheduling device 300 includes:
[0164] The acquisition module 310 is used to acquire N computing resource requirement information corresponding to N computing power tasks to be processed, where N is a positive integer;
[0165] The generation module 320 is used to generate N recommended node lists that match the N computing resource demand information based on the M first computing power nodes included in the computing power system. Each recommended node list includes K first computing power nodes, where M is a positive integer greater than N and K is a positive integer less than M.
[0166] The determining module 330 is used to determine, according to preset conditions, a second computing power node matching the corresponding computing power task in the recommended node list, to obtain N second computing power nodes, wherein the second computing power node is a first computing power node in the corresponding recommended node list, and the preset conditions include the lowest system latency of the computing power system;
[0167] The processing module 340 is used to schedule the N computing power tasks to the N second computing power nodes respectively, and to process the N computing power tasks.
[0168] Optionally, the acquisition module 310 includes:
[0169] A receiving submodule is used to receive input computing power task requests, wherein the computing power task requests include the N computing power tasks;
[0170] The first calculation submodule is used to calculate the computation intensity corresponding to the target computing power task and obtain a first calculation result. The computation intensity is used to indicate the size of computing power resources required by the target computing power task. The target computing power task is any one of the N computing power tasks.
[0171] The second calculation submodule is used to calculate the latency sensitivity corresponding to the target computing power task and obtain a second calculation result. The latency sensitivity is used to indicate the sensitivity of the target computing power task to response time.
[0172] The third calculation submodule is used to calculate the throughput requirement corresponding to the target computing power task and obtain the third calculation result. The throughput requirement is used to indicate the amount of data that the target computing power task needs to process per unit time during the task processing.
[0173] The first generation submodule is used to generate computing resource requirement information corresponding to the target computing task based on the first calculation result, the second calculation result and the third calculation result.
[0174] Optionally, the generated submodules include:
[0175] A conversion unit is configured to convert the first calculation result into a first vector, the second calculation result into a second vector, and the third calculation result into a third vector;
[0176] The processing unit is used to normalize the first vector, the second vector, and the third vector to obtain the processed first vector, the processed second vector, and the processed third vector. The normalization process is used to map the first vector, the second vector, and the third vector to the same feature space.
[0177] A generation unit is used to generate a target vector based on the processed first vector, the processed second vector, and the processed third vector, wherein the computing resource requirement information corresponding to the target computing task includes the target vector.
[0178] Optionally, the generation module 320 includes:
[0179] The first determining submodule is used to determine M status information corresponding one-to-one with the M first computing power nodes, and the status information is used to indicate the current available resource status of the corresponding first computing power node;
[0180] The conversion submodule is used to convert the M state information into vectors respectively, so as to obtain M fourth vectors that correspond one-to-one with the M state information;
[0181] The fourth calculation submodule is used to calculate the Euclidean distance between the target vector corresponding to the target computing power task and the M fourth vectors respectively, and obtain M distance values;
[0182] The second determining submodule is used to determine K target distance values from the M distance values, wherein the K target distance values are the K smallest distance values among the M distance values;
[0183] The second generation submodule is used to generate a recommended node list corresponding to the target computing power task, wherein the recommended node list corresponding to the target computing power task includes K first computing nodes corresponding to the K target distance values.
[0184] Optionally, the determining module 330 includes:
[0185] The fifth calculation submodule is used to calculate the matching degree between the computing resource requirement information corresponding to the target computing power task and the K status information corresponding to the K first computing nodes included in the recommended node list corresponding to the target computing power task, and obtain K matching degrees.
[0186] The third determining submodule is used to determine a target matching degree among the K matching degrees according to preset conditions, wherein the target matching degree is the matching degree that best meets the preset conditions among the K matching degrees;
[0187] The fourth determination submodule is used to determine the first computing power node corresponding to the target matching degree as the second computing power node corresponding to the target computing power task.
[0188] Optionally, the processing module 340 includes:
[0189] The acquisition submodule is used to acquire the current system status and current resource status of the computing power system. The current system status is used to indicate the computing resource requirements, latency sensitivity, and load requirements of the computing power system for processing the N computing power tasks. The current resource status is used to indicate the currently available processor resources, available memory resources, and available storage resources of the computing power system.
[0190] The update submodule is used to update the current system state and the current resource state according to the set reward function to obtain the target system state and the target resource state.
[0191] The optimization submodule is used to optimize the computing power system based on the target system state and the target resource state.
[0192] The technical solution of this application, when acquiring N computing power tasks to be processed, determines a recommended node list suitable for each computing power task from among M first computing power nodes based on the computing power resource requirement information corresponding to the N computing power tasks, and determines the second computing power node corresponding to each computing power task based on the constraint of the lowest system latency of the computing power system. Thus, the N computing power tasks are processed based on the N second computing power nodes. Therefore, in the process of processing computing power tasks, the attribute information of computing power tasks is fully considered, avoiding insufficient or wasted resources when computing power nodes process computing power tasks, and improving the scheduling effect of computing power tasks.
[0193] This application also provides an electronic device. Please refer to [link to relevant documentation]. Figure 4 The electronic device may include a processor 401, a memory 402, and a program 4021 stored in the memory 402 and executable on the processor 401.
[0194] When program 4021 is executed by processor 401, it can achieve the following: Figure 1 Any step in the corresponding method embodiment:
[0195] Obtain the computing resource requirements information corresponding to the N computing power tasks to be processed, where N is a positive integer;
[0196] Based on the M first computing power nodes included in the computing power system, N recommended node lists are generated that match the N computing power resource demand information. Each recommended node list includes K first computing power nodes, where M is a positive integer greater than N and K is a positive integer less than M.
[0197] According to preset conditions, in the recommended node list, a second computing power node matching the corresponding computing power task is determined, resulting in N second computing power nodes. The second computing power node is a first computing power node in the corresponding recommended node list. The preset conditions include the lowest system latency of the computing power system.
[0198] The N computing tasks are scheduled to the N second computing nodes for processing.
[0199] Optionally, obtaining the N computing resource requirements corresponding to the N computing tasks to be processed includes:
[0200] Receive input computing power task requests, wherein the computing power task requests include the N computing power tasks;
[0201] Calculate the computational intensity corresponding to the target computing power task to obtain a first calculation result. The computational intensity is used to indicate the size of computing power resources required by the target computing power task. The target computing power task is any one of the N computing power tasks.
[0202] The latency sensitivity corresponding to the target computing power task is calculated to obtain a second calculation result, wherein the latency sensitivity is used to indicate the sensitivity of the target computing power task to response time;
[0203] Calculate the throughput requirement corresponding to the target computing power task to obtain a third calculation result. The throughput requirement is used to indicate the amount of data that the target computing power task needs to process per unit time during the task processing.
[0204] The computing resource requirement information corresponding to the target computing task is generated based on the first calculation result, the second calculation result, and the third calculation result.
[0205] Optionally, generating the computing resource requirement information corresponding to the target computing task based on the first calculation result, the second calculation result, and the third calculation result includes:
[0206] The first calculation result is converted into a first vector, the second calculation result is converted into a second vector, and the third calculation result is converted into a third vector;
[0207] The first vector, the second vector, and the third vector are normalized to obtain the processed first vector, the processed second vector, and the processed third vector. The normalization process is used to map the first vector, the second vector, and the third vector to the same feature space.
[0208] A target vector is generated based on the processed first vector, the processed second vector, and the processed third vector. The computing resource requirement information corresponding to the target computing task includes the target vector.
[0209] Optionally, the step of generating a list of N recommended nodes that match the N computing resource demand information based on the M first computing nodes included in the computing power system includes:
[0210] M status information corresponding to the M first computing power nodes are determined, and the status information is used to indicate the current available resource status of the corresponding first computing power node;
[0211] The M state information pieces are converted into vectors respectively to obtain M fourth vectors that correspond one-to-one with the M state information pieces;
[0212] Calculate the Euclidean distance between the target vector corresponding to the target computing power task and the M fourth vectors respectively to obtain M distance values;
[0213] From the M distance values, determine K target distance values, where the K target distance values are the K smallest distance values among the M distance values;
[0214] Generate a recommended node list corresponding to the target computing power task, wherein the recommended node list corresponding to the target computing power task includes K first computing nodes corresponding to the K target distance values.
[0215] Optionally, based on preset conditions, the step of determining a second computing power node matching the corresponding computing power task from the recommended node list to obtain N second computing power nodes includes:
[0216] Calculate the matching degree between the computing resource requirement information corresponding to the target computing task and the K status information corresponding to the K first computing nodes included in the recommended node list corresponding to the target computing task, and obtain the K matching degree.
[0217] Based on preset conditions, a target matching degree is determined among the K matching degrees, wherein the target matching degree is the matching degree that best meets the preset conditions among the K matching degrees;
[0218] The first computing power node corresponding to the target matching degree is determined as the second computing power node corresponding to the target computing power task.
[0219] Optionally, after scheduling the N computing tasks to the N second computing nodes and processing the N computing tasks, the method further includes:
[0220] The current system state and current resource state of the computing power system are obtained. The current system state is used to indicate the computing resource requirements, latency sensitivity, and load requirements of the computing power system for processing the N computing power tasks. The current resource state is used to indicate the processor resources, memory resources, and storage resources currently available in the computing power system.
[0221] Based on the set reward function, the current system state and the current resource state are updated respectively to obtain the target system state and the target resource state;
[0222] The computing power system is optimized based on the target system state and the target resource state.
[0223] The technical solution of this application, when acquiring N computing power tasks to be processed, determines a recommended node list suitable for each computing power task from among M first computing power nodes based on the computing power resource requirement information corresponding to the N computing power tasks, and determines the second computing power node corresponding to each computing power task based on the constraint of the lowest system latency of the computing power system. Thus, the N computing power tasks are processed based on the N second computing power nodes. Therefore, in the process of processing computing power tasks, the attribute information of computing power tasks is fully considered, avoiding insufficient or wasted resources when computing power nodes process computing power tasks, and improving the scheduling effect of computing power tasks.
[0224] This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described data rights confirmation embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0225] This application also provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described data rights confirmation method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0226] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0227] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a communication device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0228] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A method for scheduling computing tasks, characterized in that, Applied to computing power systems, the method includes: Obtain the computing resource requirements information corresponding to the N computing power tasks to be processed, where N is a positive integer; Based on the M first computing power nodes included in the computing power system, N recommended node lists are generated that match the N computing power resource demand information. Each recommended node list includes K first computing power nodes, where M is a positive integer greater than N and K is a positive integer less than M. According to preset conditions, in the recommended node list, a second computing power node matching the corresponding computing power task is determined, resulting in N second computing power nodes. The second computing power node is a first computing power node in the corresponding recommended node list. The preset conditions include the lowest system latency of the computing power system. The N computing tasks are scheduled to the N second computing nodes for processing.
2. The method according to claim 1, characterized in that, The process of obtaining the N computing resource requirements corresponding to the N computing tasks to be processed includes: Receive input computing power task requests, wherein the computing power task requests include the N computing power tasks; Calculate the computational intensity corresponding to the target computing power task to obtain a first calculation result. The computational intensity is used to indicate the size of computing power resources required by the target computing power task. The target computing power task is any one of the N computing power tasks. The latency sensitivity corresponding to the target computing power task is calculated to obtain a second calculation result, wherein the latency sensitivity is used to indicate the sensitivity of the target computing power task to response time; Calculate the throughput requirement corresponding to the target computing power task to obtain a third calculation result. The throughput requirement is used to indicate the amount of data that the target computing power task needs to process per unit time during the task processing. The computing resource requirement information corresponding to the target computing task is generated based on the first calculation result, the second calculation result, and the third calculation result.
3. The method according to claim 2, characterized in that, The step of generating computing resource requirement information corresponding to the target computing task based on the first calculation result, the second calculation result, and the third calculation result includes: The first calculation result is converted into a first vector, the second calculation result is converted into a second vector, and the third calculation result is converted into a third vector; The first vector, the second vector, and the third vector are normalized to obtain the processed first vector, the processed second vector, and the processed third vector. The normalization process is used to map the first vector, the second vector, and the third vector to the same feature space. A target vector is generated based on the processed first vector, the processed second vector, and the processed third vector. The computing resource requirement information corresponding to the target computing task includes the target vector.
4. The method according to claim 3, characterized in that, The process of generating a list of N recommended nodes that match the N computing resource demand information based on the M first computing nodes included in the computing power system includes: M status information corresponding to the M first computing power nodes are determined, and the status information is used to indicate the current available resource status of the corresponding first computing power node; The M state information pieces are converted into vectors respectively to obtain M fourth vectors that correspond one-to-one with the M state information pieces; Calculate the Euclidean distance between the target vector corresponding to the target computing power task and the M fourth vectors respectively to obtain M distance values; From the M distance values, determine K target distance values, where the K target distance values are the K smallest distance values among the M distance values; Generate a recommended node list corresponding to the target computing power task, wherein the recommended node list corresponding to the target computing power task includes K first computing nodes corresponding to the K target distance values.
5. The method according to claim 4, characterized in that, According to preset conditions, a second computing power node matching the corresponding computing power task is determined from the recommended node list, resulting in N second computing power nodes, including: Calculate the matching degree between the computing resource requirement information corresponding to the target computing task and the K status information corresponding to the K first computing nodes included in the recommended node list corresponding to the target computing task, and obtain the K matching degree. Based on preset conditions, a target matching degree is determined among the K matching degrees, wherein the target matching degree is the matching degree that best meets the preset conditions among the K matching degrees; The first computing power node corresponding to the target matching degree is determined as the second computing power node corresponding to the target computing power task.
6. The method according to claim 1, characterized in that, After scheduling the N computing tasks to the N second computing nodes and processing the N computing tasks, the method further includes: The current system state and current resource state of the computing power system are obtained. The current system state is used to indicate the computing resource requirements, latency sensitivity, and load requirements of the computing power system for processing the N computing power tasks. The current resource state is used to indicate the processor resources, memory resources, and storage resources currently available in the computing power system. Based on the set reward function, the current system state and the current resource state are updated respectively to obtain the target system state and the target resource state; The computing power system is optimized based on the target system state and the target resource state.
7. A scheduling device for computing power tasks, characterized in that, The device, applied to a computing system, includes: The acquisition module is used to acquire N computing resource requirement information corresponding to N computing power tasks to be processed, where N is a positive integer; The generation module is used to generate N recommended node lists that match the N computing resource demand information based on the M first computing power nodes included in the computing power system. Each recommended node list includes K first computing power nodes, where M is a positive integer greater than N and K is a positive integer less than M. The determination module is used to determine, according to preset conditions, a second computing power node matching the corresponding computing power task in the recommended node list, to obtain N second computing power nodes, wherein the second computing power node is a first computing power node in the corresponding recommended node list, and the preset conditions include the lowest system latency of the computing power system; The processing module is used to schedule the N computing power tasks to the N second computing power nodes respectively, and to process the N computing power tasks.
8. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, Includes computer instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 6.