Resource scheduling method and device, electronic equipment and computer readable medium

By selecting the target resource unit based on the resource unit status and weight in the k8s cluster, and using the idle computing power value and priority strategy to select the target working node, the problem of Pod allocation and data congestion in the cluster is solved, and efficient and intelligent allocation of resources is achieved. .

CN118733269APending Publication Date: 2024-10-01CHINA TELECOM CORP LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410881665.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing technology is difficult to realize automatic and intelligent allocation of Pods in k8s clusters, and data congestion is prone to occur during the resource scheduling process.

Method used

Automatic and intelligent allocation of resource units is achieved by selecting the target resource unit based on the resource unit status and weight of the worker node to be deployed in the target cluster, and selecting the target worker node based on the idle computing power value of the candidate worker node and the preset priority policy. .

Benefits of technology

It realizes automatic and intelligent allocation of resource units, avoids data congestion in the resource scheduling process, and improves the efficiency and accuracy of resource scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733269A_ABST
    Figure CN118733269A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a resource scheduling method and device, electronic equipment and a computer readable medium. The method comprises the following steps: selecting a target resource unit based on the state and weight of each resource unit of a working node to be deployed to a target cluster; selecting candidate working nodes from the working nodes in the target cluster based on the target resource unit; based on the idle computing power value of each candidate working node and a preset priority strategy, selecting a target working node in the candidate working nodes; and deploying the target resource unit to the target working node. According to the embodiment, automatic intelligent allocation of the resource units is realized, and data congestion in a resource scheduling process is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and specifically to a resource scheduling method, device, electronic device, and computer-readable medium. Background Art

[0002] k8s (kubernetes) is an open source container orchestration system for automating the deployment, expansion and management of containerized applications. Node (worker node) is a workload node in a k8s cluster for running applications and services. Pod is the smallest resource unit that can be created and managed in a k8s cluster, and is also the smallest schedulable unit running on a Node. Pod consists of one or more containers.

[0003] In the existing technology, the operation and maintenance of k8s has evolved from manual operation and maintenance to tool operation and maintenance and platform operation and maintenance. However, with the gradual deepening of digital development, the number of operating devices in various units has gradually increased. The existing technology is difficult to achieve automatic and intelligent allocation of Pods in the k8s cluster, and it is impossible to avoid data congestion in the resource scheduling process. Summary of the invention

[0004] The embodiments of the present application propose a resource scheduling method, device, electronic device and computer-readable medium to achieve automatic intelligent allocation of resource units and avoid data congestion during the resource scheduling process.

[0005] In a first aspect, an embodiment of the present application provides a resource scheduling method, the method comprising: selecting a target resource unit based on the status and weight of each resource unit of the working node to be deployed in the target cluster; selecting a candidate working node from the working nodes in the target cluster based on the target resource unit; selecting a target working node from the candidate working nodes based on the idle computing power value of each candidate working node and a preset priority strategy; and deploying the target resource unit to the target working node.

[0006] In the second aspect, an embodiment of the present application provides a resource scheduling device, which includes: a first selection unit, used to select a target resource unit based on the status and weight of each resource unit to be deployed to the working node in the target cluster; a second selection unit, used to select a candidate working node from the working nodes in the target cluster based on the target resource unit; a third selection unit, used to select a target working node from the candidate working nodes based on the idle computing power value of each candidate working node and a preset priority strategy; a deployment unit, used to deploy the target resource unit to the target working node.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any embodiment of the first aspect.

[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of the first aspect.

[0009] The resource scheduling method, device, electronic device and computer-readable medium provided in the embodiments of the present application select the target resource unit based on the status and weight of each resource unit to be deployed to the working node in the target cluster; then select the candidate working node from the working nodes in the target cluster based on the target resource unit; then select the target working node from the candidate working node based on the idle computing power value of each candidate working node and the preset priority strategy, so as to deploy the target resource unit to the target working node. Thus, the target resource unit to be deployed can be automatically selected based on the status and weight of each resource unit, and the target working node to be deployed can be automatically selected based on the idle computing power value of the working node and the preset priority strategy, thereby realizing the automatic intelligent allocation of resource units. Since the idle computing power value and other information are taken into account when selecting the target working node, resource scheduling in this way can avoid data congestion in the resource scheduling process. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0011] Figure 1 is a flow chart of an embodiment of the resource scheduling method of the present application;

[0012] Figure 2 It is a system architecture diagram of the resource scheduling method of the present application;

[0013] Figure 3 is a schematic diagram of the structure of an embodiment of a resource scheduling device of the present application;

[0014] Figure 4 It is a schematic diagram of the structure of an electronic device used to implement an embodiment of the present application. DETAILED DESCRIPTION

[0015] All actions to obtain signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located, and with the authorization given by the owner of the corresponding device.

[0016] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0017] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0018] Please refer to Figure 1 , which shows a process 100 according to an embodiment of a resource scheduling method of the present application. The resource scheduling method can be applied to a k8s cluster.

[0019] The resource scheduling method comprises the following steps:

[0020] Step 101 : Select a target resource unit based on the status and weight of each resource unit to be deployed to the working node in the target cluster.

[0021] In this embodiment, the target cluster is a k8s cluster. k8s (kubernetes) is an open source container orchestration system for automating the deployment, expansion and management of containerized applications. A k8s cluster is a collection of physical or virtual machines that are organized into a single computing resource pool and run the k8s platform on it.

[0022] In this embodiment, the k8s cluster usually includes a master node (Master) and multiple worker nodes (Node). The master node is usually responsible for the management and control of the k8s cluster. The master node can be deployed in the central server. In addition, the central server can also deploy a historical alarm database and an abnormal traffic analysis model. The worker node is responsible for running containerized applications. It can be deployed in each local core server to collect the network traffic of each local server and generate logs to store in each local core server.

[0023] In this embodiment, the resource unit (Pod) is the smallest resource unit that can be created and managed in the k8s cluster, and is also the smallest schedulable unit running on the Node. A Pod consists of one or more containers. The resource unit is responsible for running services and generating traffic data.

[0024] In this embodiment, the target resource unit can be selected based on the status and weight of each resource unit to be deployed to the working node in the target cluster. The status of the resource unit may include a normal state and an abnormal state. In some implementations, each resource unit may have a status identifier, and the status of the resource unit can be determined by reading the status identifier. The weight of each resource unit can be determined based on the business data it runs. The weight may include core, important, non-core, etc. In practice, the resource unit with the highest weight and in a normal state can be selected as the target resource unit.

[0025] In some optional implementations of this embodiment, based on the status and weight of each resource unit to be deployed to the working node in the target cluster, selecting the target resource unit includes the following sub-steps:

[0026] Sub-step 1011, detecting the indicators of each resource unit to be deployed to the working node in the target cluster. The above indicators can be used to measure the status of the resource unit.

[0027] Sub-step 1012, determining the state of each resource unit based on the indicator value of the indicator. Here, a judgment rule can be pre-set as needed to judge the state of each resource based on the indicator value.

[0028] Sub-step 1013, selecting a resource unit in a normal state as a candidate resource unit.

[0029] Sub-step 1014, based on the weight of each candidate resource unit, determine the score of each candidate resource unit. Here, for each candidate resource unit, the weight of the candidate resource unit is the weight of the business data run by the candidate resource unit. The higher the weight, the higher the score of the candidate resource unit. The weight of the business data can be determined according to the business type. The correspondence between the business type and the weight can be pre-set according to business needs, and is not specifically limited here.

[0030] Sub-step 1015, based on the scores of the candidate resource units, select a target resource unit from the candidate resource units. Here, the candidate resource unit with the highest score may be determined as the target resource unit.

[0031] By selecting candidate resource units based on the indicator values ​​of each resource unit, and then determining the score of each candidate resource unit based on the weight of the candidate resource unit, and finally selecting the target resource unit based on the score, the most important resource units in normal state can be deployed preferentially, so that the most important business data can be processed first.

[0032] In some optional implementations of this embodiment, the above indicators may include but are not limited to at least one of the following: CPU usage, memory usage, disk occupancy, and network delay time. The above sub-step 1012 may specifically include:

[0033] For each resource unit, if the indicator value of any indicator of the resource unit is greater than or equal to the threshold, the resource unit is determined to be in an abnormal state; if the indicator value of each indicator of the resource unit is less than the threshold, the resource unit is determined to be in a normal state.

[0034] It should be noted that the threshold corresponding to each indicator can be set as needed. The indicator values ​​corresponding to different indicators can be the same or different, which is not specifically limited here.

[0035] By comparing the indicator value with the threshold, the status of each resource unit can be easily and quickly determined, thereby quickly selecting candidate resource units.

[0036] Step 102 : Select a candidate working node from working nodes in the target cluster based on the target resource unit.

[0037] In this embodiment, all working nodes in the target cluster can be traversed, and working nodes that meet the requirements can be screened out as candidate working nodes according to the pre-set pre-selection policy rules. As an example, working nodes with sufficient idle resources to deploy the above-mentioned target resource unit can be determined as candidate working nodes. If there is no working node that meets the pre-selection policy rules, the above-mentioned target resource unit will be suspended until there is a working node that meets the requirements.

[0038] In some optional implementations of this embodiment, the following steps may be followed: first, resource requirement information of the target resource unit is obtained; then, based on the resource requirement information and the weight of the target resource unit, a candidate working node is selected from the working nodes in the target cluster.

[0039] In practice, the resource requirement information may be a requested resource value, for example, a storage space size, etc. Exemplarily, based on the label of the target resource unit and the resource requirement information, the working nodes in the target cluster may be traversed, and working nodes whose remaining resources meet the resource requirements and whose labels match may be selected as candidate working nodes. The label of the target resource unit may be a weight label of the business data run by the target resource unit.

[0040] By selecting candidate work nodes, you can preliminarily screen the work nodes that meet the requirements in the target cluster, reduce the amount of computation in subsequent steps, thereby increasing the speed of selecting target work nodes and improving the overall efficiency of resource scheduling.

[0041] In some optional implementations of this embodiment, after selecting a candidate working node, the following steps may also be performed: when there are multiple candidate working nodes, the resource units managed by the candidate working nodes are organized into a resource unit matrix; the score of each resource unit in the resource unit matrix is ​​obtained, and the score of each resource unit is used as the initial load balancing value of each resource unit; the data in the resource units with the same initial load balancing value is adjusted through virtual services to update the load balancing value of each resource unit in the resource unit matrix.

[0042] Among them, virtual services can be provided by Istio. Among them, Istio is an open source service mesh platform for managing, observing and controlling network communications in distributed microservice architectures. It provides a simplified way to build scalable and secure inter-service communications without changing the application code. The main functions of Istio include load balancing, service discovery, traffic management, fault injection, security and observability. By deploying agents as sidecar containers for each service, Istio achieves control over inter-service communications. These agents can automatically intercept network traffic between services to achieve load balancing, secure communication, fault recovery and other functions. In addition, Istio also provides a control plane for managing and configuring agents and collecting telemetry data. The Istio project can provide a traffic management mechanism for microservice architectures, while also creating a foundation for other value-added features (including security, monitoring, routing, connection management and policies).

[0043] See also Figure 2 The system architecture diagram of the resource scheduling method shown in FIG. The system structure includes an application layer, a microservice layer, a service grid layer, a k8s layer, a container layer, and a cloud computing layer. The above-mentioned virtual service implemented based on Istio is located in the above-mentioned service grid layer. By changing the original method call to a remote call and implementing the function of the class library through a proxy, the service grid successfully separates the service-to-communication from the program, and the inter-service communication is no longer a part of the application. After the separation, these separated inter-service communication capabilities form a separate abstraction layer under the application and become a dedicated infrastructure layer for inter-service communication. At this point, these capabilities appear in a completed form, and there is no longer a separate class library or framework form. After the inter-service communication is extracted, it is set as an infrastructure layer and integrated into the infrastructure, closely connected with the underlying infrastructure, and then integrated into one, becoming a part of the platform system, thereby forming a service grid layer.

[0044] In practice, when there are multiple candidate work nodes, or when an optimization solution for separating code from database is required, all Pods managed by the candidate work nodes can be formed into a Pod matrix. The load distribution receiver can be pre-deployed in the work node of the k8s cluster for load distribution management. Then, the score of each Pod in the Pod matrix can be used as the initial load balancing value, and the value range of the initial load balancing value is between 1 and 100. Among them, the score of each Pod in the Pod matrix can be determined according to the business data running in the Pod. Then, Istio adjusts the load balancing when the data in the Pods with the same score in the Pod matrix is ​​forwarded to the same Node or different Nodes in an orderly manner according to the initial load balancing value. Among them, when forwarding Pods with the same score to the same Node, they can be distributed in order according to the size of the most recent historical score. When forwarding Pods with the same score to different Nodes, they can be distributed to the Node with the highest score in the most recent time first. Istio predicts the rise and fall of the load balancing trend between the Pods managed by the Node through the initial load balancing value, which overcomes the shortcomings of poor scalability of hard load devices.

[0045] Step 103: Select a target working node from the candidate working nodes based on the idle computing power value of each candidate working node and a preset priority strategy.

[0046] In this embodiment, computing power is the ability of a computer device or a computing / data center to process information, and is the ability of computer hardware and software to work together to perform certain computing requirements. The computing power value is the value that represents the computing power. The idle computing power value is the difference between the total computing power value and the computing power requirement value.

[0047] In this embodiment, the target working node among the candidate working nodes can be selected based on the idle computing power value of each candidate working node and the preset priority policy. As an example, the candidate working node whose idle computing power value is greater than the target value can be selected first. If the number of the selected candidate working nodes whose idle computing power value is greater than the target value is not unique, the candidate working node with the highest priority can be selected as the target working node based on the preset priority policy. As another example, the candidate working node with the largest idle computing power value can be selected first. If the number of the candidate working nodes with the largest idle computing power value is not unique, the candidate working node with the highest priority can be selected as the target working node based on the preset priority policy.

[0048] In some optional implementations of this embodiment, the following sub-steps may be performed:

[0049] Sub-step 1031, based on the computing power requirement value and the total computing power value of each candidate working node, determine the idle computing power value of each candidate working node. For each candidate working node, the total computing power value of the candidate working node is a fixed value, which can be obtained in advance according to its hardware configuration. The computing power requirement value can be obtained according to the business data processed by the above-mentioned target resource unit.

[0050] Optionally, the following steps can be performed: First, the computing power requirement value is determined based on the logical operation computing power requirement value, parallel computing computing power requirement value, and neural network acceleration computing power requirement value of the task. Then, based on the total computing power value and computing power requirement value of each candidate work node, the idle computing power value of each candidate work node is determined. Here, the logical operation computing power requirement value, the parallel computing computing power requirement value, and the neural network acceleration computing power requirement value can be determined according to the business requirements processed by the target resource node. The final computing power requirement value can be the sum of the logical operation computing power requirement value, the parallel computing computing power requirement value, and the neural network acceleration computing power requirement value of the task.

[0051] Sub-step 1032, based on the computing power value of each candidate work node and the preset priority strategy, determine the score of each candidate work node. Here, the computing power value can be directly used as the score of the candidate work node. If there are at least two candidate work nodes with the highest scores, the at least two candidate work nodes with the highest scores can be re-scored according to the preset priority strategy. The higher the priority, the higher the score of the re-scoring. Here, the score of each re-scored candidate work node is higher than the score of the candidate work node that is scored only once.

[0052] In practice, the above priority strategy can be one of the priority strategies provided by k8s, which can be selected according to needs and is not limited here. The priority strategies provided by k8s may include but are not limited to at least one of the following: equal priority (EqualPriority), image location priority (ImageLocalityPriority), least requested priority (LeastRequestedPriority), balanced resource allocation (BalancedResourceAllocation), selector spread priority (SelectorSpreadPriority), node affinity priority (NodeAffinityPriority), taint removal priority (TaintTolerationPriority), ignoring scheduling requirements during execution (requiredDuringSchedulingIgnoredDuringExecution), most requested priority (MostRequestedPriority), service spreading priority (ServiceSpreadingPriority), etc.

[0053] Sub-step 1033, based on the scores of the candidate working nodes, select a target working node from the candidate working nodes. Here, the candidate working node with the highest score can be selected as the target working node.

[0054] The idle computing power value of each candidate work node is determined based on the computing power demand value and the total computing power value of each candidate work node, and then the score of each candidate work node is determined based on the computing power value of each candidate work node and the preset priority strategy. Based on the score of each candidate work node, the target work node among the candidate work nodes is selected, so that the target resource unit can be deployed to the work node with the largest idle computing power and the highest priority, so that the most important business data can be optimally processed and data congestion can be avoided.

[0055] Step 104: deploy the target resource unit to the target working node.

[0056] In this embodiment, the target resource unit can be first taken out, and then the information in the resource unit set in the k8s scheduler cache can be refreshed. After that, after the node agent service detects the binding information generated by the k8s scheduler, the k8s system deploys the target resource unit to the target working node based on the binding information.

[0057] The method provided by the above-mentioned embodiment of the present application selects the target resource unit based on the status and weight of each resource unit to be deployed to the working node in the target cluster; then, based on the target resource unit, selects the candidate working node from the working nodes in the target cluster; then, based on the idle computing power value of each candidate working node and the preset priority strategy, selects the target working node from the candidate working node, thereby deploying the target resource unit to the target working node. Thus, the target resource unit to be deployed can be automatically selected based on the status and weight of each resource unit, and the target working node to be deployed with the above-mentioned target resource unit can be automatically selected based on the idle computing power value of the working node and the preset priority strategy, thereby realizing automatic intelligent allocation of resource units. Since information such as the idle computing power value is taken into account when selecting the target working node, resource scheduling in this way can avoid data congestion during resource scheduling.

[0058] Further references Figure 3 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a resource scheduling device, and the device embodiment is Figure 1 The method embodiments shown correspond.

[0059] like Figure 3As shown, the resource scheduling device 300 of this embodiment includes: a first selection unit 301, used to select a target resource unit based on the status and weight of each resource unit to be deployed to the working node in the target cluster; a second selection unit 302, used to select a candidate working node from the working nodes in the target cluster based on the target resource unit; a third selection unit 303, used to select a target working node from the candidate working nodes based on the idle computing power value of each candidate working node and a preset priority strategy; a deployment unit 304, used to deploy the target resource unit to the target working node.

[0060] Optionally, the first selection unit 301 is also used to detect indicators of each resource unit to be deployed to the working node in the target cluster; determine the status of each resource unit based on the indicator value of the indicator; select resource units in a normal state as candidate resource units; determine the score of each candidate resource unit based on the weight of each candidate resource unit; and select a target resource unit from the candidate resource units based on the score of each candidate resource unit.

[0061] Optionally, the indicators include at least one of the following: CPU utilization, memory utilization, disk occupancy, and network delay time; the first selection unit 301 is also used for, for each resource unit, if the indicator value of any indicator of the resource unit is greater than or equal to a threshold, then the resource unit is determined to be in an abnormal state; if the indicator value of each indicator of the resource unit is less than the threshold, then the resource unit is determined to be in a normal state.

[0062] Optionally, the second selection unit 302 is further used to obtain resource demand information of the target resource unit; and select a candidate working node from the working nodes in the target cluster based on the resource demand information and the weight of the target resource unit.

[0063] Optionally, the device also includes a load balancing unit, which is used to: when there are multiple candidate working nodes, organize the resource units managed by the candidate working nodes into a resource unit matrix; obtain the score of each resource unit in the resource unit matrix, and use the score of each resource unit as the initial load balancing value of each resource unit; adjust the data in the resource units with the same initial load balancing value through virtual services to update the load balancing value of each resource unit in the resource unit matrix.

[0064] Optionally, the third selection unit 303 is also used to determine the idle computing power value of each candidate work node based on the computing power requirement value and the total computing power value of each candidate work node; determine the score of each candidate work node based on the computing power value of each candidate work node and a preset priority strategy; and determine the target work node among the candidate work nodes based on the score of each candidate work node.

[0065] Optionally, the third selection unit 303 is also used to determine the computing power requirement value based on the logical operation computing power requirement value, parallel computing computing power requirement value and neural network acceleration computing power requirement value of the task; and determine the idle computing power value of each candidate working node based on the total computing power value of each candidate working node and the computing power requirement value.

[0066] The device provided by the above-mentioned embodiment of the present application selects the target resource unit based on the status and weight of each resource unit to be deployed to the working node in the target cluster; then, based on the target resource unit, selects the candidate working node from the working nodes in the target cluster; then, based on the idle computing power value of each candidate working node and the preset priority strategy, selects the target working node from the candidate working node, thereby deploying the target resource unit to the target working node. Thus, the target resource unit to be deployed can be automatically selected based on the status and weight of each resource unit, and the target working node to be deployed can be automatically selected based on the idle computing power value of the working node and the preset priority strategy, thereby realizing automatic intelligent allocation of resource units. Since information such as the idle computing power value is taken into account when selecting the target working node, resource scheduling in this way can avoid data congestion during resource scheduling.

[0067] Reference below Figure 4 , which shows a schematic structural diagram of an electronic device for implementing some embodiments of the present application. Figure 4 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0068] like Figure 4 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0069] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a disk, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 4 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0070] In particular, according to some embodiments of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of some embodiments of the present application are executed.

[0071] It should be noted that the computer-readable medium described in some embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0072] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0073] The computer-readable medium may be included in the electronic device; or it may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: selects a target resource unit based on the status and weight of each resource unit to be deployed to the working node in the target cluster; selects a candidate working node from the working nodes in the target cluster based on the target resource unit; selects a target working node from the candidate working nodes based on the idle computing power value of each candidate working node and a preset priority strategy; and deploys the target resource unit to the target working node.

[0074] Computer program code for performing the operations of some embodiments of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++; and also conventional procedural programming languages ​​such as "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, or may be connected to an external computer (e.g., through the Internet using an Internet service provider), including a local area network (LAN) or a wide area network (WAN).

[0075] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0076] The units described in some embodiments of the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes a first determination unit, a second determination unit, a selection unit, and a third determination unit. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0077] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0078] The above description is only some preferred embodiments of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present application is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with (but not limited to) the technical features with similar functions disclosed in the embodiments of the present application to form a technical solution.

Claims

1. A resource scheduling method, It is characterized in that The method comprises: Select a target resource unit based on the status and weight of each resource unit to be deployed to the working node in the target cluster; Based on the target resource unit, selecting a candidate working node from working nodes in the target cluster; Based on the idle computing power value of each candidate working node and the preset priority strategy, select the target working node from the candidate working nodes; Deploy the target resource unit to the target working node.

2. The method according to claim 1, It is characterized in that The selecting a target resource unit based on the status and weight of each resource unit to be deployed to the working node in the target cluster includes: Check the indicators of each resource unit of the working node to be deployed in the target cluster; Determining the status of each resource unit based on the indicator value of the indicator; Selecting a resource unit in a normal state as a candidate resource unit; Determine the score of each candidate resource unit based on the weight of each candidate resource unit; Based on the score of each candidate resource unit, a target resource unit is selected from the candidate resource units.

3. The method according to claim 2, It is characterized in that The indicator includes at least one of the following: CPU usage, memory usage, disk occupancy, and network delay time; The determining the state of each resource unit based on the indicator value of the indicator includes: For each resource unit, if the indicator value of any indicator of the resource unit is greater than or equal to the threshold, the resource unit is determined to be in an abnormal state; if the indicator value of each indicator of the resource unit is less than the threshold, the resource unit is determined to be in a normal state.

4. The method according to claim 1, It is characterized in that The selecting, based on the target resource unit, a candidate working node from working nodes in the target cluster includes: Acquiring resource demand information of the target resource unit; Based on the resource demand information and the weight of the target resource unit, a candidate working node is selected from the working nodes in the target cluster.

5. The method according to claim 1, It is characterized in that After selecting the candidate working node, the method further includes: When there are multiple candidate working nodes, the resource units managed by the candidate working nodes are combined into a resource unit matrix; Obtaining a score of each resource unit in the resource unit matrix, and using the score of each resource unit as an initial load balancing value of each resource unit; The data in the resource units with the same initial load balancing value are adjusted through the virtual service to update the load balancing value of each resource unit in the resource unit matrix.

6. The method according to claim 1, It is characterized in that The step of selecting a target working node from the candidate working nodes based on the idle computing power value of each candidate working node and a preset priority strategy includes: Based on the computing power requirement value and the total computing power value of each candidate working node, determine the idle computing power value of each candidate working node; Determine the score of each candidate work node based on the computing power value of each candidate work node and the preset priority strategy; Based on the scores of the candidate working nodes, a target working node among the candidate working nodes is determined.

7. The method according to claim 6, It is characterized in that The step of determining the idle computing power value of each candidate working node based on the computing power requirement value and the total computing power value of each candidate working node includes: Determine the computing power requirement based on the logical operation computing power requirement, parallel computing computing power requirement, and neural network acceleration computing power requirement of the task; Based on the total computing power value of each candidate working node and the computing power requirement value, the idle computing power value of each candidate working node is determined.

8. A resource scheduling device, It is characterized in that The device comprises: A first selection unit, configured to select a target resource unit based on the status and weight of each resource unit to be deployed to a working node in a target cluster; A second selection unit, configured to select a candidate working node from working nodes in the target cluster based on the target resource unit; A third selection unit is used to select a target working node from the candidate working nodes based on the idle computing power value of each candidate working node and a preset priority strategy; A deployment unit is used to deploy the target resource unit to the target working node.

9. An electronic device, It is characterized in that include: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Cluster deployment method and device and storage medium

    CN119254776A

  • Fault processing method, system, device, equipment, medium and program of cluster system

    CN119668916A

  • Calculation power scheduling method, device and equipment for large model heterogeneous reasoning and medium

    CN121455645A