Load balancing method and device in heterogeneous computing power network, computer equipment and readable storage medium
Through the dynamic task allocation method, the problem of unbalanced resource utilization caused by static scheduling in heterogeneous computing power network is solved, and efficient resource utilization and task efficiency are achieved.
Patent Information
- Application Number
- CN202411748216.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-14
AI Technical Summary
The load balancing method of heterogeneous computing power network based on static scheduling in the prior art leads to unbalanced resource utilization, resulting in a decline in overall computing power network performance.
By receiving the computing tasks submitted by the client, the task is classified, and dynamically allocating tasks to the most suitable computing nodes based on the task category and real-time resource information of each computing node of the heterogeneous computing power network.
It realizes efficient utilization of resources of each computing node, avoids idle or overload of resources, significantly improves overall resource utilization, improves task completion speed and efficiency, and meets the delay requirements of real-time applications.
Smart Images

Figure CN119621335A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer network technology, and in particular to a load balancing method, apparatus, computer equipment, computer-readable storage medium, and computer program product in a heterogeneous computing network. Background Art
[0002] With the development of technologies such as cloud computing, edge computing, 5G networks, and the Internet of Things (IoT), computing resources have become more distributed and diversified. More and more computing tasks are no longer concentrated in a single cloud data center, but are distributed on different types of computing nodes, which may include high-performance servers, edge devices, and embedded systems, thus forming a heterogeneous computing network.
[0003] In the related art, a static scheduling-based method is used to load balance heterogeneous computing networks. However, the static load balancing method determines the load distribution of the nodes before the task arrives, which easily leads to uneven resource utilization and a decrease in the performance of the overall computing network. Summary of the invention
[0004] Based on this, it is necessary to provide a load balancing method, apparatus, computer equipment, computer-readable storage medium and computer program product in a heterogeneous computing network to address the technical problem that the above method easily leads to unbalanced resource utilization and thus a decline in the performance of the overall computing network.
[0005] In a first aspect, the present application provides a method for load balancing in a heterogeneous computing network. The method comprises:
[0006] Receive computing tasks submitted by clients;
[0007] Classifying the computing tasks to obtain task categories;
[0008] According to the task category and the real-time resource information of each computing node in the heterogeneous computing power network, the computing task is allocated to a target computing node among the computing nodes.
[0009] In one embodiment, the computing tasks are classified to obtain task categories, including:
[0010] Acquire task information of the computing task; the task information includes input data, computing requirements and priority;
[0011] The task category is determined according to the task information.
[0012] In one embodiment, determining the task category according to the task information includes:
[0013] Matching the task information with preset classification conditions, and determining the task category according to the matching result; or,
[0014] The pre-trained classification model is called to classify the task information to obtain the task category.
[0015] In one of the embodiments, allocating the computing task to a target computing node among the computing nodes according to the task category and the real-time resource information of each computing node in the heterogeneous computing network includes:
[0016] Determine the resource requirement of the computing task according to the task category; and determine the available resource amount of each computing node according to the real-time resource information of each computing node;
[0017] Determining allocation weights of the computing nodes according to the resource demand and the available resources of the computing nodes;
[0018] The computing task is allocated to a target computing node among the computing nodes according to the allocation weight.
[0019] In one embodiment, allocating the computing task to a target computing node among the computing nodes according to the allocation weight includes:
[0020] The allocation weight is adjusted by an adjustment factor to obtain an adjusted weight; the adjustment factor is determined according to the priority and delay target of the computing task;
[0021] The computing task is allocated to a target computing node among the computing nodes according to the adjusted weight.
[0022] In one embodiment, there are multiple computing tasks, and allocating the computing tasks to a target computing node among the computing nodes according to the allocation weights includes:
[0023] A weighted algorithm is adopted to allocate a corresponding target computing node to each computing task according to the allocation weight.
[0024] In a second aspect, the present application also provides a load balancing device in a heterogeneous computing network. The device includes:
[0025] The task receiving module is used to receive the computing tasks submitted by the client;
[0026] A task classification module, used to classify the computing tasks to obtain task categories;
[0027] The task allocation module is used to allocate the computing task to the target computing node among the computing nodes according to the task category and the real-time resource information of the computing nodes in the heterogeneous computing power network.
[0028] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0029] Receive computing tasks submitted by clients;
[0030] Classifying the computing tasks to obtain task categories;
[0031] According to the task category and the real-time resource information of each computing node in the heterogeneous computing power network, the computing task is allocated to a target computing node among the computing nodes.
[0032] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0033] Receive computing tasks submitted by clients;
[0034] Classifying the computing tasks to obtain task categories;
[0035] According to the task category and the real-time resource information of each computing node in the heterogeneous computing power network, the computing task is allocated to a target computing node among the computing nodes.
[0036] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0037] Receive computing tasks submitted by clients;
[0038] Classifying the computing tasks to obtain task categories;
[0039] According to the task category and the real-time resource information of each computing node in the heterogeneous computing power network, the computing task is allocated to a target computing node among the computing nodes.
[0040] The load balancing method, device, computer equipment, storage medium and computer program product in the above heterogeneous computing power network, after receiving the computing tasks submitted by the client, classify the computing tasks to obtain the task category; according to the task category and the real-time resource information of each computing node in the heterogeneous computing power network, the computing tasks are assigned to the target computing nodes in each computing node. The method monitors the resource status of each computing node in real time, so that tasks can be dynamically assigned according to the actual resource status of each computing node and the task requirements of the computing tasks, which can ensure the efficient use of resources of each computing node, avoid idle or overloaded resources, thereby significantly improving the overall resource utilization rate and solving the performance bottleneck caused by uneven resource utilization in traditional methods. Furthermore, through reasonable task allocation, it is ensured that the computing tasks are efficiently processed on suitable nodes, thereby improving the overall completion speed and efficiency of the tasks. Through intelligent scheduling, tasks that are sensitive to delay can be assigned to suitable nodes first, reducing the average response time of tasks and meeting the needs of real-time applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is an application environment diagram of a load balancing method in a heterogeneous computing power network in one embodiment;
[0042] Figure 2 A schematic diagram of a flow chart of a load balancing method in a heterogeneous computing network in one embodiment;
[0043] Figure 3 A flowchart of a computing task allocation step in one embodiment;
[0044] Figure 4 A schematic diagram of a flow chart of a load balancing method in a heterogeneous computing power network in another embodiment;
[0045] Figure 5 It is a structural block diagram of a load balancing device in a heterogeneous computing network in one embodiment;
[0046] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0047] 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.
[0048] It is understandable that the traditional method based on static scheduling for load balancing of heterogeneous computing power networks determines the load distribution of nodes before the task arrives, which has the following problems:
[0049] 1. It is easy to cause unbalanced resource utilization, resulting in a decline in the performance of the overall computing network.
[0050] 2. The system response time is long and tasks cannot be processed in a timely manner, especially during peak load periods.
[0051] 3. The flexibility of load distribution is poor and cannot adapt to the dynamic changes of resources in heterogeneous computing networks.
[0052] Therefore, in order to solve the above problems, this application proposes an adaptive load balancing method that can perceive the dynamic changes of multi-dimensional resources (such as CPU, storage, network bandwidth, etc.) in real time in a heterogeneous computing network, and perform intelligent scheduling based on the computing power differences and task load conditions of the computing nodes. Compared with the existing static scheduling load balancing method, this method can flexibly adjust the task allocation strategy to achieve efficient resource utilization. It is particularly suitable for heterogeneous computing environments such as cloud, edge, and the Internet of Things, and significantly improves system performance and task processing efficiency.
[0053] The load balancing method in a heterogeneous computing network provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the client 102 communicates with the load balancing server 104 through the network. The data storage system can store the data that the load balancing server 104 needs to process. The data storage system can be integrated on the load balancing server 104, or it can be placed on the cloud or other network servers. In the application scenario of the present application, the user inputs the computing task on the client 102 and submits the computing task to the load balancing server 104. After the load balancing server 104 receives the computing task, it classifies the computing task to obtain the task category; according to the task category and the real-time resource information of each computing node in the heterogeneous computing power network, the computing task is assigned to the target computing node in each computing node. Among them, the client 102 can be but is not limited to a client installed in various personal computers, laptops, smart phones, tablet computers and other devices. The load balancing server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0054] In one embodiment, Figure 2 As shown in FIG, a load balancing method in a heterogeneous computing network is provided, and the method is applied to Figure 1 The load balancing server 104 in the example is used as an example to illustrate, including the following steps:
[0055] Step S210, receiving a computing task submitted by a client.
[0056] The computing task includes information such as input data, computing requirements, and priority. The data format of the computing task can be JSON or XML.
[0057] Specifically, the user sets the computing task on the client, and after the setting is completed, the computing task can be submitted, and the computing task is sent to the load balancing server for distribution and processing.
[0058] Step S220, classify the computing tasks to obtain task categories.
[0059] In a specific implementation, based on the task information included in the computing task, its computing complexity and resource requirements can be identified, thereby determining its task category (such as real-time task, batch processing task, etc.).
[0060] Step S230, assigning computing tasks to target computing nodes among the computing nodes according to the task categories and the real-time resource information of the computing nodes in the heterogeneous computing network.
[0061] Specifically, a resource monitoring module can be set up in the load balancing server to monitor the CPU, memory, storage, network bandwidth and other resource information of each computing node in the heterogeneous computing network in real time, and regularly send the monitored resource information to the decision-making module. By dynamically monitoring multi-dimensional resources (such as CPU, storage, bandwidth, etc.), the load distribution strategy can be flexibly adjusted to ensure efficient use of resources in the heterogeneous computing network.
[0062] The decision module uses an adaptive load balancing algorithm to allocate tasks based on the task category and the real-time resource information of each computing node, and outputs the target computing node for the computing task. When there are multiple computing tasks, the target computing node assigned to each computing task is output. After scheduling, each computing task is assigned to a suitable target computing node to perform specific computing tasks. After the execution is completed, the execution status and results of the task are returned to the client, and the execution status and results of the task can be displayed on the client's display interface.
[0063] Through modular design and adaptive algorithms, this solution provides an efficient solution to the load balancing problem in heterogeneous computing networks. Through real-time data flow and resource perception, it ensures that tasks can be executed on the most suitable computing nodes, thereby achieving optimal resource utilization and improved system performance.
[0064] For example, in a cloud computing data center, users submit large-scale computing tasks through the client. The load balancing server reasonably allocates each computing task based on the current resource usage of the cloud server to achieve efficient resource utilization and task processing.
[0065] In the load balancing method in the above-mentioned heterogeneous computing network, after receiving the computing tasks submitted by the client, the computing tasks are classified to obtain the task categories; according to the task categories and the real-time resource information of each computing node in the heterogeneous computing network, the computing tasks are assigned to the target computing nodes in each computing node. This method monitors the resource status of each computing node in real time, so that tasks can be dynamically assigned according to the actual resource status of each computing node and the task requirements of the computing tasks, which can ensure the efficient use of resources of each computing node, avoid idle or overloaded resources, thereby significantly improving the overall resource utilization rate and solving the performance bottleneck caused by uneven resource utilization in traditional methods. Furthermore, through reasonable task allocation, it is ensured that the computing tasks are efficiently processed on suitable nodes, thereby improving the overall completion speed and efficiency of the tasks. Through intelligent scheduling, tasks that are sensitive to delay can be assigned to suitable nodes first, reducing the average response time of tasks and meeting the needs of real-time applications.
[0066] In an exemplary embodiment, the above step S220, classifying the computing tasks to obtain task categories, includes: obtaining task information of the computing tasks; the task information includes input data, computing requirements and priority; and determining the task category based on the task information.
[0067] Among them, the task categories include real-time tasks and batch tasks. Batch tasks refer to a group of tasks that are processed in batches without real-time interaction requirements. Real-time tasks refer to the immediate processing of input data, which usually needs to be completed within strict time limits to meet the user's interaction needs or the system's time-sensitive requirements.
[0068] The input data of the computing task includes data type, format, etc. The computing requirements can clearly define the computing resources required for the task, such as the required computing power (such as CPU and GPU usage), memory requirements, computing time, etc. The priority indicates the urgency and importance of the task and can be defined by business rules. For example, real-time tasks have a higher priority than batch tasks.
[0069] In the specific implementation, key information is extracted from the acquired task information to form a feature vector. For example, the type of input data is encoded, such as using word embedding; the computing requirements are converted into quantifiable indicators, such as the values of CPU and memory requirements; the priorities are numerically processed, such as high priority is 3, medium priority is 2, and low priority is 1. Furthermore, based on the task information, the preset classification conditions can be used to classify the tasks, or the pre-trained classification model can be used to classify the tasks.
[0070] In this embodiment, by effectively classifying computing tasks, not only can the efficiency and resource utilization of the system be improved, but also the user experience and management process can be improved and the error rate can be reduced; by reasonably designing and implementing the classification process, the quality and effect of computing task processing can be greatly enhanced.
[0071] In an exemplary embodiment, the step of determining the task category based on the task information includes: matching the task information with preset classification conditions and determining the task category based on the matching result; or, calling a pre-trained classification model to classify the task information to obtain the task category.
[0072] Specifically, the computing tasks can be classified according to predetermined rules. For example, if the task priority is high and the task computing requirement is real-time computing, the task category is determined to be a real-time task. If the task priority is low and the task volume is greater than the task volume threshold, the task category is determined to be a batch task.
[0073] The computing tasks can also be classified through the classification model. By pre-training a neural network model as a classification model, when classifying tasks, the task features of the task information are extracted, the task features are input into the pre-trained classification model, and the classification is processed through the classification model to output the task category of the computing task. Among them, the training process of the classification model includes: obtaining a training data set, the training data set may include multiple sample tasks and the category label of each sample task; extracting the task features of each sample task in the training data set, using the task features as input and the category label as supervision information to train the initial classification model. More specifically, the task features of the sample task are input into the initial classification model, the predicted category is output, the predicted category and the category label are substituted into the loss function, the loss value is calculated, and the initial classification model is trained with reducing the loss value as the training goal until the loss value converges or reaches a preset number of training times, and the training is terminated to obtain the pre-trained classification model.
[0074] In this embodiment, the task information is matched with the preset classification conditions, and the task category is determined according to the matching results. When there are few task categories and obvious features, the tasks can be quickly classified. The pre-trained classification model is called to classify the task information to obtain the task category. The model can automatically process a large amount of task information, reduce manual intervention, and improve work efficiency. The pre-trained model can continuously adapt to new data and patterns through transfer learning or online learning, so as to maintain high accuracy when processing new tasks.
[0075] In an exemplary embodiment, if Figure 3 As shown, in the above step S230, the computing task is allocated to the target computing node among the computing nodes according to the task category and the real-time resource information of each computing node in the heterogeneous computing power network, including:
[0076] Step S231, determining the resource requirement of the computing task according to the task category; and determining the available resource amount of each computing node according to the resource information of each computing node;
[0077] Step S232, determining the allocation weight of each computing node according to the resource demand and the available resource of each computing node;
[0078] Step S233: Allocate the computing task to the target computing node among the computing nodes according to the allocation weight.
[0079] In the specific implementation, different tasks have different requirements for resources, so the resource requirements of the computing tasks can be determined according to the task category. And, for each computing node, the available resources of the computing node are determined based on the real-time resource information of the computing node (such as the currently occupied CPU, memory, bandwidth, etc.) and the total resources. Furthermore, based on the resource requirements of the current computing task and the available resources of each node, a weighted function or decision rule is used to calculate the allocation weight of each computing node. Specifically, the ratio of the available resources of each computing node to the resource requirements of the current computing task can be obtained as the allocation weight of each computing node, which can be expressed as follows:
[0080]
[0081] in, represents the allocation weight of computing node i, represents the available resources of computing node i, Indicates the resource requirements of a computing task.
[0082] Furthermore, the higher the allocation weight, the higher the allocation priority. Therefore, the computing task can be allocated to the computing node with the highest allocation weight among the computing nodes to perform the computing task. The computing node with the highest allocation weight is recorded as the target computing node.
[0083] In this embodiment, by dynamically allocating tasks and optimizing according to node capabilities, tasks are guaranteed to run on the most suitable nodes, thereby reducing the time required to complete tasks, achieving optimal resource utilization and computing efficiency, and improving the responsiveness and flexibility of the system.
[0084] In an exemplary embodiment, the above-mentioned step S233 allocates the computing task to the target computing node among the computing nodes according to the allocation weight, including: adjusting the allocation weight by an adjustment factor to obtain an adjusted weight; the adjustment factor is determined according to the priority and delay target of the computing task; and according to the adjusted weight, allocating the computing task to the target computing node among the computing nodes.
[0085] In the specific implementation, when allocating computing nodes to computing tasks, the priority and delay target of the computing tasks can also be considered, and the adjustment factor can be set according to the priority and delay target. Specifically, the weight of high-priority tasks with short delay time can be increased to ensure that they can obtain more resources; the weight of low-priority tasks with long delay time can be reduced so that they do not affect high-priority tasks when resources are competing. After setting the adjustment factor, the weight can be adjusted based on the original allocation weight that has been determined. Specifically, the adjustment factor can be multiplied by the original allocation weight to obtain the adjusted weight. The actual allocation of computing tasks is performed according to the adjusted weight.
[0086] In this embodiment, by dynamically adjusting the allocation weights, the system can respond to changing demands in real time, so that high-priority tasks can obtain sufficient computing resources in a timely manner, be completed on time, and meet delay targets. The use of computing resources can be maximized, and high-priority tasks can obtain resources first. At the same time, low-priority tasks can use resources when high-priority tasks are idle to avoid waste.
[0087] In an exemplary embodiment, there are multiple computing tasks, and step S233 allocates the computing tasks to target computing nodes in each computing node according to the allocation weight, including: using a weighted algorithm to allocate a corresponding target computing node to each computing task according to the allocation weight.
[0088] In a specific implementation, a weighted algorithm such as weighted round-robin or weighted random can be used to allocate each computing task to each computing node according to the allocation weight.
[0089] For example, when the weighted polling method is used, each computing node is traversed in a round-robin manner based on the weight, and nodes with large weights are given priority when assigning tasks to achieve load balancing.
[0090] When using the weighted random method, when assigning tasks, the computing nodes are randomly selected based on the weights as the probability basis. The nodes with larger weights have higher probability of being selected.
[0091] In this embodiment, by using a weighted algorithm to allocate computing tasks, the system can achieve efficient resource utilization and optimized task processing efficiency, especially showing good adaptability in dynamically changing load conditions.
[0092] refer to Figure 4 , is a flow chart of a load balancing method in a heterogeneous computing network shown in another embodiment. In this embodiment, the following steps are included:
[0093] Step S410, receiving a computing task submitted by a client and task information of the computing task; the task information includes input data, computing requirements and priority;
[0094] Step S420, determining the task category according to the task information;
[0095] Step S430, determining the resource requirement of the computing task according to the task category; and determining the available resource amount of each computing node according to the real-time resource information of each computing node in the heterogeneous computing power network;
[0096] Step S440, obtaining the ratio of the available resources to the required resources of each computing node as the allocation weight of each computing node;
[0097] Step S450, adjusting the allocation weight by adjusting the factor to obtain the adjusted weight; the adjustment factor is determined according to the priority and delay target of the computing task;
[0098] Step S460: Allocate the computing task to the target computing node among the computing nodes according to the adjusted weight.
[0099] This method has the following beneficial effects:
[0100] (1) Improving resource utilization: Through real-time monitoring and dynamic scheduling, we ensure efficient utilization of resources of each computing node and avoid resource idleness or overload, thereby significantly improving overall resource utilization.
[0101] (2) Reduce system response time: Through intelligent scheduling, delay-sensitive tasks are assigned to appropriate nodes first, reducing the average response time of tasks and meeting the needs of real-time applications.
[0102] (3) Improve task processing efficiency: Realize reasonable task allocation to ensure that computing tasks are efficiently processed on suitable nodes, thereby improving the overall speed and efficiency of task completion.
[0103] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0104] Based on the same inventive concept, the embodiment of the present application also provides a load balancing device in a heterogeneous computing network for implementing the load balancing method in the heterogeneous computing network involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the load balancing device in one or more heterogeneous computing networks provided below can refer to the limitations of the load balancing method in the heterogeneous computing network above, and will not be repeated here.
[0105] In one embodiment, Figure 5 As shown, a load balancing device in a heterogeneous computing network is provided, including:
[0106] The task receiving module 510 is used to receive the computing task submitted by the client;
[0107] A task classification module 520 is used to classify the computing tasks to obtain task categories;
[0108] The task allocation module 530 is used to allocate the computing task to a target computing node among the computing nodes according to the task category and the real-time resource information of the computing nodes in the heterogeneous computing power network.
[0109] In one embodiment, the task classification module 520 is further used to obtain task information of the computing task; the task information includes input data, computing requirements and priority; and the task category is determined based on the task information.
[0110] In one embodiment, the task classification module 520 is further used to match the task information with preset classification conditions and determine the task category according to the matching result; or, call a pre-trained classification model to classify the task information to obtain the task category.
[0111] In one embodiment, the task allocation module 530 is also used to determine the resource requirement of the computing task according to the task category; and determine the available resources of each computing node according to the real-time resource information of each computing node; determine the allocation weight of each computing node according to the resource requirement and the available resources of each computing node; and allocate the computing task to a target computing node among the computing nodes according to the allocation weight.
[0112] In one embodiment, the task allocation module 530 is also used to adjust the allocation weight through an adjustment factor to obtain an adjusted weight; the adjustment factor is determined according to the priority and delay target of the computing task; and according to the adjusted weight, the computing task is allocated to a target computing node among the computing nodes.
[0113] In one embodiment, there are multiple computing tasks, and the task allocation module 530 is further used to use a weighted algorithm to allocate a corresponding target computing node to each computing task according to the allocation weight.
[0114] Each module in the load balancing device in the above heterogeneous computing network can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0115] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data in the load balancing process in a heterogeneous computing power network. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a load balancing method in a heterogeneous computing power network is implemented.
[0116] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0117] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0118] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0119] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0120] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0121] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0122] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0123] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A load balancing method in a heterogeneous computing network, characterized in that: The method comprises: Receive computing tasks submitted by clients; Classifying the computing tasks to obtain task categories; According to the task category and the real-time resource information of each computing node in the heterogeneous computing power network, the computing task is allocated to a target computing node among the computing nodes.
2. The method according to claim 1, characterized in that The computing tasks are classified to obtain task categories, including: Acquire task information of the computing task; the task information includes input data, computing requirements and priority; The task category is determined according to the task information.
3. The method according to claim 2, characterized in that Determining the task category according to the task information includes: Matching the task information with preset classification conditions, and determining the task category according to the matching result; or, The pre-trained classification model is called to classify the task information to obtain the task category.
4. The method according to claim 1, characterized in that: The allocating the computing task to a target computing node among the computing nodes according to the task category and the real-time resource information of the computing nodes in the heterogeneous computing network includes: Determine the resource requirement of the computing task according to the task category; and determine the available resource amount of each computing node according to the real-time resource information of each computing node; Determining allocation weights of the computing nodes according to the resource demand and the available resources of the computing nodes; The computing task is allocated to a target computing node among the computing nodes according to the allocation weight.
5. The method according to claim 4, characterized in that The allocating the computing task to a target computing node among the computing nodes according to the allocation weights includes: The allocation weight is adjusted by an adjustment factor to obtain an adjusted weight; the adjustment factor is determined according to the priority and delay target of the computing task; The computing task is allocated to a target computing node among the computing nodes according to the adjusted weight.
6. The method according to claim 4, characterized in that There are multiple computing tasks, and allocating the computing tasks to target computing nodes among the computing nodes according to the allocation weights includes: A weighted algorithm is adopted to allocate a corresponding target computing node to each computing task according to the allocation weight.
7. A load balancing device in a heterogeneous computing network, characterized in that: The device comprises: The task receiving module is used to receive the computing tasks submitted by the client; A task classification module, used to classify the computing tasks to obtain task categories; The task allocation module is used to allocate the computing task to the target computing node among the computing nodes according to the task category and the real-time resource information of the computing nodes in the heterogeneous computing power network.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the load balancing method in a heterogeneous computing power network described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the load balancing method in a heterogeneous computing power network described in any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the load balancing method in a heterogeneous computing power network described in any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Distributed heterogeneous computing resource scheduling method and system
CN121233272A