Heterogeneous resource management method and device, equipment, storage medium and program product

Through the management nodes, the heterogeneous resource attributes of the K8S cluster are obtained and scheduled, and the container sandbox and security isolation mechanism are used to solve the complexity and security problems of resource management in multi-cloud environments, achieving efficient and secure resource scheduling and management.

CN120512409APending Publication Date: 2025-08-19SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510609769.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The existing technology cannot effectively manage different cloud resources in multi-cloud environments, resulting in increased management complexity and difficult cross-cloud resource scheduling, and virtualization and containerization technologies have security vulnerabilities and performance overhead.

Method used

The load size and user resource requirements of the K8S cluster are obtained through the management nodes, the heterogeneous resource attributes and resource occupancy information of each slave node are determined, and the container sandbox mechanism and security isolation mechanism are used for containerization processing, and resource scheduling is performed based on the load size and resource occupancy information, including fault processing and storage resource adjustment.

Benefits of technology

It realizes efficient utilization and unified management of resources in multi-cloud environments, reduces operation and maintenance costs, improves management efficiency, and ensures resource security and high availability and reliability of K8S clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120512409A_ABST
    Figure CN120512409A_ABST
Patent Text Reader

Abstract

The invention relates to a heterogeneous resource management method and device, computer equipment, a computer readable storage medium and a computer program product. The heterogeneous resource management method and device are used for management nodes in a K8S cluster. The method comprises the following steps: obtaining a load size and a user resource demand corresponding to the K8S cluster, and obtaining a resource attribute of a heterogeneous resource of each slave node in the K8S cluster, the slave node being a cloud server; determining resource occupation information of each slave node according to each resource attribute; and performing resource scheduling on each heterogeneous resource according to the load size, the user resource demand and each piece of resource occupation information. By adopting the method, different cloud resources in the multi-cloud environment can be managed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for managing heterogeneous resources. Background Art

[0002] With the rapid development of cloud computing technology, cloud service providers can provide cloud computing products to enterprises to provide cloud computing services to enterprises.

[0003] Related technologies, such as VMware's vSphere and KVM, implement cloud computing services by virtualizing physical resources.

[0004] However, related technologies can only be used for a single cloud environment and cannot manage different cloud resources in a multi-cloud environment. Summary of the Invention

[0005] Based on this, it is necessary to provide a heterogeneous resource management method, device, computer equipment, computer-readable storage medium and computer program product that can manage different cloud resources in a multi-cloud environment to address the above technical problems.

[0006] In a first aspect, the present application provides a heterogeneous resource method for managing nodes in a K8S cluster. The method includes:

[0007] Obtain the load size and user resource requirements corresponding to the K8S cluster, and obtain the resource attributes of the heterogeneous resources of each slave node in the K8S cluster, where the slave node is a cloud server;

[0008] Determining resource occupancy information of each slave node according to each resource attribute;

[0009] Resource scheduling is performed on each of the heterogeneous resources according to the load size, the user resource demand, and the resource occupancy information.

[0010] In one embodiment, the resource scheduling of each of the heterogeneous resources according to the load size, the user resource demand, and the resource occupancy information includes:

[0011] For each of the slave nodes, determining whether the slave node has a service failure based on the resource occupancy information of the slave node, and determining the slave node as a target slave node if the slave node has a service failure;

[0012] Resource scheduling is performed on the heterogeneous resources of the target slave node according to the load size, the user resource demand, and the resource occupancy information of the target slave node.

[0013] In one embodiment, the service failure includes a service interruption, and the resource scheduling of the heterogeneous resources of the target slave node according to the load size, the user resource demand, and the resource occupancy information of the target slave node includes:

[0014] Determine a first scheduling strategy based on resource occupancy information of other slave nodes in the K8S cluster except the target slave node, resource occupancy information of the target slave node, the load size, and the user resource demand;

[0015] According to the first scheduling strategy, at least one backup slave node is determined from each of the other slave nodes, and the heterogeneous resources of the target slave node are switched to the backup slave node.

[0016] In one embodiment, the service failure includes insufficient storage resources, and the resource scheduling of the heterogeneous resources of the target slave node according to the load size, the user resource demand, and the resource occupancy information of the target slave node includes:

[0017] Determining the storage resource size of the target slave node according to the resource occupancy information of the target slave node;

[0018] Determining a second scheduling strategy according to the storage resource size of the target slave node, the load size, and the user resource demand;

[0019] According to the second scheduling policy, the storage resource size of the target slave node is adjusted.

[0020] In one embodiment, the method further comprises:

[0021] receiving, through a gateway device, a service request for the target slave node;

[0022] The performing resource scheduling on the heterogeneous resources of the target slave node according to the load size, the user resource demand, and the resource occupancy information of the target slave node includes:

[0023] In response to the service request, resource scheduling is performed on the heterogeneous resources of the target slave node according to the load size, the user resource demand, and the resource occupancy information of the target slave node.

[0024] In one embodiment, the method further comprises:

[0025] Containerizing the heterogeneous resources of each slave node using a container sandbox mechanism and a security isolation mechanism to obtain the heterogeneous resources after containerization;

[0026] Performing resource scheduling on each of the heterogeneous resources according to the load size, the user resource demand, and the resource occupancy information, including:

[0027] Resource scheduling is performed on the heterogeneous resources after the containerization process according to the load size, the user resource demand, and the resource occupancy information.

[0028] In a second aspect, the present application also provides a heterogeneous resource management device for use in a management node in a K8S cluster. The device includes:

[0029] An acquisition module is used to obtain the load size and user resource requirements corresponding to the K8S cluster, and obtain the resource attributes of the heterogeneous resources of each slave node in the K8S cluster, where the slave node is a cloud server;

[0030] A determination module, configured to determine resource occupancy information of each slave node according to each resource attribute;

[0031] The scheduling module is used to schedule the heterogeneous resources according to the load size, the user resource demand and the resource occupancy information.

[0032] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in the first aspect when executing the computer program.

[0033] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.

[0034] In a fifth aspect, the present application further provides a computer program product, comprising a computer program that, when executed by a processor, implements the steps of the method described in the first aspect.

[0035] The above-mentioned heterogeneous resource management method, device, computer equipment, computer-readable storage medium and computer program product, the management node first obtains the load size and user resource requirements corresponding to the K8S cluster, and obtains the resource attributes of the heterogeneous resources of each slave node in the K8S cluster, the slave node is a cloud server, and then, according to each resource attribute, determines the resource occupancy information of each slave node, and then, according to the load size, user resource requirements and each resource occupancy information, performs resource scheduling for each heterogeneous resource. In this heterogeneous resource management method, the management node can dynamically adjust each heterogeneous resource in the management node by obtaining the resource attributes of the heterogeneous resources of each slave node, ensuring efficient utilization of resources, and through the automated deployment and configuration of applications in the management node, reduce manual intervention and errors, reduce operation and maintenance costs, thereby enabling unified management of multiple cloud servers, saving management resources, improving management efficiency, and thus enabling management of different cloud resources in a multi-cloud environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0037] Figure 1 FIG1 is an application environment diagram of a method for managing heterogeneous resources in one embodiment;

[0038] Figure 2 1 is a flow chart of a method for managing heterogeneous resources in one embodiment;

[0039] Figure 3 203 is a flow chart of step 203 in one embodiment;

[0040] Figure 4 302 is a flowchart of an embodiment;

[0041] Figure 5 is a flow chart of step 302 in another embodiment;

[0042] Figure 6 is a structural block diagram of a heterogeneous resource management device in one embodiment;

[0043] Figure 7 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0045] In multi-cloud management, the increase in cloud environments and the heterogeneity of resources have led to an increase in the complexity of the management interface, making it difficult for administrators to understand and operate quickly and accurately. Moreover, the different resource scheduling strategies and algorithms of different cloud service providers have also increased the difficulty of cross-cloud resource scheduling.

[0046] When managing heterogeneous resources, both virtualization and containerization technologies introduce performance overhead and potential security vulnerabilities. For example, resource isolation between virtual machines may not be perfect, and there may be risks of resource sharing between containers. Therefore, with the widespread adoption of virtualization and containerization, managing large numbers of virtual machines and containers has become increasingly difficult.

[0047] In related technologies, when different cloud service providers offer different APIs and services, cross-cloud service integration is difficult. Accurate data migration, synchronization, and service governance between different cloud environments also face significant challenges. In view of this, this application proposes a heterogeneous resource management method to achieve the management of different cloud resources in a multi-cloud environment.

[0048] The heterogeneous resource management method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Figure 1 It includes a management node 102 and multiple slave nodes 104, wherein the management node 102 communicates with the slave nodes 104 through the network. The first data storage system can store the data that the management node 102 needs to process. The first data storage system can be integrated on the management node 102, or it can be placed on the cloud or other network servers. The second data storage system can store the data that the slave node 104 needs to process. The second data storage system can be integrated on the slave node 104, or it can be placed on the cloud or other network servers. First, the management node obtains the load size and user resource requirements corresponding to the K8S cluster, and obtains the resource attributes of the heterogeneous resources of each slave node in the K8S cluster. Then, based on each resource attribute, the resource occupancy information of each slave node is determined, and then, based on the load size, user resource requirements and each resource occupancy information, resource scheduling is performed on each heterogeneous resource. The slave node 104 can be a cloud server.

[0049] In an exemplary embodiment, Figure 2 As shown, a method for managing heterogeneous resources is provided, which is applied to Figure 1 The following steps are used as an example to illustrate the management node in the example:

[0050] Step 201: Obtain the load size and user resource requirements corresponding to the K8S cluster, and obtain the resource attributes of the heterogeneous resources of each slave node in the K8S cluster.

[0051] Among them, the slave node is the cloud server.

[0052] A Kubernetes (K8S) cluster is a distributed system used to automate the deployment, scaling, and management of containerized applications. A Kubernetes cluster consists of a group of physical or virtual machines (referred to as nodes), which can include a management node and multiple slave nodes. In this embodiment, a cross-cloud integration framework can be built on the Kubernetes cluster and deployed on the management node to manage cloud services provided by different cloud service providers. The management node can be a local management server or a cloud server, and the slave nodes can be cloud servers provided by the cloud service provider.

[0053] Heterogeneous resources refer to various resources from different slave nodes with different types, characteristics, or architectures. Heterogeneous resources can include computing resources, storage resources, network resources, and so on. Resource attributes refer to information such as the size, usage, and idle status of heterogeneous resources. For example, if heterogeneous resources include storage resources, the resource attributes of the storage resources may be that the total storage resource size is 100GB.

[0054] The load size refers to the workload intensity of the K8S cluster during operation, which can include CPU load, memory load, and network load. User resource demand refers to the requirements of the user's application or business workload for various resources during operation.

[0055] In this embodiment, the management node can establish a connection with each slave node through an API interface, obtain the heterogeneous resources of each slave node through the API interface, and then determine the resource attributes of each heterogeneous resource based on the obtained heterogeneous resources. Optionally, the management node can actively obtain resource attributes in real time or periodically, or the management node can also receive resource attributes sent by the slave node, or the management node can also obtain resource attributes when it detects a failure in the slave node.

[0056] Step 202: Determine resource occupancy information of each slave node based on the attributes of each resource.

[0057] The resource occupancy information refers to the information about the current resource usage. For example, the total storage resource in the heterogeneous resources of slave node A is 100 GB, and the obtained resource attribute is 60 GB of free storage resources, that is, the storage resource of slave node A is 60 GB remaining.

[0058] In this embodiment, the management node can obtain the idle resource amount and total resource amount in each resource attribute respectively, and then obtain the resource occupancy of each resource attribute based on the idle resource amount and the total resource amount, and then determine the resource occupancy information of each slave node based on the resource occupancy of each resource attribute.

[0059] Step 203: Perform resource scheduling on the heterogeneous resources according to the load size, user resource requirements, and resource occupancy information.

[0060] It should be noted that in a K8S cluster, the management node can determine the load allocated to each slave node based on user resource requirements and the resource occupancy information of each slave node, and then schedule and manage the resources of each slave node according to the load size of each slave node.

[0061] In this embodiment, the management node can determine whether the idle resources of each slave node meet the user resource demand based on the load size and the occupancy information of each resource, and then perform resource scheduling for each heterogeneous resource based on the result.

[0062] For example, if the idle resources of the slave node do not meet the user resource requirements, other idle resources can be allocated to the slave node, or the load can be switched to other slave nodes for processing; if the idle resources of the slave node meet the user resource requirements, the load can be allocated to the slave node for processing.

[0063] As a possible implementation method, a management platform can also be deployed on the management node, and the interface of the management platform can be displayed on the display device of the management node. The interface can receive resource scheduling operations triggered by the user to realize resource scheduling of various heterogeneous resources, or the interface can also receive heterogeneous resource display operations triggered by the user to display the resource attributes of the heterogeneous resources of each slave node to the user.

[0064] Among them, after the management platform accesses the heterogeneous resources of each slave node through the API interface, it can also perform information maintenance operations such as information conversion on each heterogeneous resource.

[0065] In the above-mentioned heterogeneous resource management method, the management node first obtains the load size and user resource requirements corresponding to the K8S cluster, and obtains the resource attributes of the heterogeneous resources of each slave node in the K8S cluster, where the slave node is a cloud server. Then, based on each resource attribute, the resource occupancy information of each slave node is determined, and then, based on the load size, user resource requirements and each resource occupancy information, resource scheduling is performed on each heterogeneous resource. In this heterogeneous resource management method, the management node can dynamically adjust each heterogeneous resource in the management node by obtaining the resource attributes of the heterogeneous resources of each slave node, ensuring efficient utilization of resources, and through the automated deployment and configuration of applications in the management node, reducing manual intervention and errors, reducing operation and maintenance costs, thereby enabling unified management of multiple cloud servers, saving management resources, improving management efficiency, and thus enabling management of different cloud resources in a multi-cloud environment.

[0066] In an exemplary embodiment, Figure 3 As shown, this embodiment involves a process of how a management node schedules heterogeneous resources based on load size, user resource requirements, and resource occupancy information. Step 203 includes:

[0067] Step 301 : for each slave node, based on the resource occupancy information of the slave node, determining whether the slave node has a service failure, and if the slave node has a service failure, determining the slave node as a target slave node.

[0068] A service failure refers to a situation where various services running on a slave node experience anomalies, resulting in the inability to provide normal functionality. For example, a service failure may include hardware component failure, operating system failure, network connection interruption, etc. In this embodiment, the slave node experiencing the service failure is identified as the target slave node, and resource scheduling is performed to address the failure of the target slave node.

[0069] It should be noted that in this embodiment, a single slave node is used as an example to describe the process of resource scheduling for heterogeneous resources by the management node. It is understood that if a slave node experiences an operational failure, resources may be maliciously occupied, such as due to process outages, container escapes, or configuration errors. Therefore, the resource usage of a slave node may reflect whether the slave node is operating normally, and whether it is a faulty node can be determined based on the resource usage information of the slave node.

[0070] In this embodiment, the management node can determine, based on the resource occupancy information of the slave node, that the resource occupancy information corresponding to each slave node is greater than a preset resource occupancy threshold, and then determine that the slave node has a service failure. Then, the node is designated as the target node. For example, if the resource occupancy threshold is 80% and the resource occupancy information indicates that 85% of the resources are occupied, then the slave node can be determined to have a service failure.

[0071] Step 302 : performing resource scheduling on the heterogeneous resources of the target slave node according to the load size, user resource requirements, and resource occupancy information of the target slave node.

[0072] In this embodiment, the management node can determine the task processing requirements based on the user's resource requirements, and calculate the required amount of resources based on the load size, and then switch the heterogeneous resources of the target slave node to other slave nodes that can meet the resource requirements and load size to ensure the availability of the service.

[0073] In this embodiment, for each slave node, the management node determines whether the slave node has a service failure based on the resource occupancy information of the slave node, and if the slave node has a service failure, determines the slave node as the target slave node, and then performs resource scheduling on the heterogeneous resources of the target slave node based on the load size, user resource requirements and the resource occupancy information of the target slave node. Since the resource occupancy information can characterize the resource usage of the slave node, it is possible to determine whether the slave node has a service failure based on the resource occupancy information, thereby improving the accuracy of determining whether the slave node has a failure.

[0074] In an exemplary embodiment, Figure 4 As shown, the service failure includes service interruption. This embodiment relates to a process in which the management node performs resource scheduling on the heterogeneous resources of the target slave node based on the load size, user resource requirements, and resource occupancy information of the target slave node. The above step 302 includes:

[0075] Step 401: Determine a first scheduling strategy based on resource occupancy information of other slave nodes in the K8S cluster except the target slave node, resource occupancy information of the target slave node, load size, and user resource requirements.

[0076] The other slave nodes are slave nodes in the K8S cluster except the target slave node. The first scheduling strategy refers to a strategy for scheduling heterogeneous resources of the target slave node in response to a service interruption failure.

[0077] In this embodiment, the management node can determine the required amount of resources based on the load size and user resource requirements, and then compare the resource occupancy information of other slave nodes with the resource occupancy information of the target slave node to determine whether there is a slave node among the other slave nodes whose resource occupancy information is greater than the resource occupancy information of the target slave node. If so, the first scheduling strategy can be determined to switch the heterogeneous resources of the target slave node to this slave node.

[0078] Step 402: According to the first scheduling policy, at least one backup slave node is determined from the other slave nodes, and the heterogeneous resources of the target slave node are switched to the backup slave node.

[0079] The standby slave node refers to a slave node used to receive heterogeneous resources from the target slave node.

[0080] It should be noted that in this implementation, a management platform can be deployed in the management node, and each slave node can be accessed by calling the API interface of the management platform to obtain heterogeneous resources of each slave node or send heterogeneous resources to each slave node.

[0081] In this embodiment, the management node can determine at least one backup slave node based on the first scheduling strategy, then access the backup slave node through the API interface, and then switch the heterogeneous resources of the target slave node to the backup slave node on the management platform deployed in the management node.

[0082] In this embodiment, the management node first determines a first scheduling strategy based on the resource occupancy information of other slave nodes in the K8S cluster except the target slave node, the resource occupancy information of the target slave node, the load size and the user resource requirements. Then, based on the first scheduling strategy, it can determine at least one backup slave node from each other slave node, and switch the heterogeneous resources of the target slave node to the backup slave node. Since the determined first scheduling strategy can fully consider the target slave node, other slave nodes, load size and user resource requirements, it can improve the accuracy of the determined first scheduling strategy, thereby ensuring the high availability and reliability of the K8S cluster.

[0083] In an exemplary embodiment, Figure 5 As shown, the service failure includes insufficient storage resources. This embodiment involves a process in which the management node schedules heterogeneous resources of the target slave node based on the load size, user resource requirements, and resource occupancy information of the target slave node. The above step 302 includes:

[0084] Step 501: Determine the storage resource size of the target slave node according to the resource occupancy information of the target slave node.

[0085] The storage resource size of the target slave node refers to the capacity of the storage space in the target slave node for storing data.

[0086] In this embodiment, the management node may obtain relevant information about storage resources from the resource occupancy information of the target slave node, and then determine the storage resource size of the target slave node according to the relevant information about storage resources.

[0087] Step 502: Determine a second scheduling strategy based on the storage resource size, load size, and user resource requirements of the target slave node.

[0088] The second scheduling strategy refers to a strategy for scheduling heterogeneous resources of a target slave node in response to a failure of insufficient storage resources.

[0089] In this embodiment, the management node can determine the amount of data required to process the load corresponding to the load size based on the load size and user resource requirements, and then determine the expected required storage capacity based on the data amount. Then, based on the difference between the determined storage capacity and the storage resource size of the target slave node, determine the second scheduling strategy to allocate storage space greater than or equal to the difference to the target slave node.

[0090] For example, if the determined storage capacity is 20G and the storage resource size of the target slave node is 10G, it can be determined that the storage resource of the target slave node is insufficient, and storage space greater than or equal to 10G is allocated to the target slave node.

[0091] Step 503: Adjust the storage resource size of the target slave node according to the second scheduling policy.

[0092] It should be noted that adjusting the storage resource size of the target slave node refers to increasing the storage resource of the target slave node. Optionally, new virtual memory can be allocated to the target slave node, or specific storage space can be allocated in other slave nodes to store the data of the target slave node.

[0093] In this embodiment, the management node may determine the size of the storage resource that needs to be allocated to the target slave node according to the second scheduling policy, and then allocate the storage resource to the target slave node from the storage resources of other slave nodes.

[0094] Exemplarily, the management node may allocate virtual memory to the target slave node, or the management node may also divide part of the storage space in other slave nodes and store the data of the target slave node in the other slave nodes.

[0095] In this embodiment, the management node determines the storage resource size of the target slave node based on the resource occupancy information of the target slave node, and can determine a second scheduling strategy based on the storage resource size, load size and user resource requirements of the target slave node, so that the storage resource size of the target slave node can be adjusted according to the second scheduling strategy. Since the determined second scheduling strategy takes into account the target slave node, load size and user resource requirements, the adjustment of the storage resources of the target slave node can meet the load size and user resource requirements, thereby improving the reliability of solving insufficient memory resources and improving the availability of the K8S cluster.

[0096] In an exemplary embodiment, this embodiment relates to a process of how a management node implements resource scheduling for heterogeneous resources of a target slave node. The above method further includes: receiving a service request for the target slave node through a gateway device.

[0097] Among them, the gateway device is a device deployed in the K8S cluster to exchange data with the management node and each slave node to realize the routing and forwarding of data between networks.

[0098] It can be understood that in the event of a service failure in the target slave node, a corresponding service request can be generated and sent to the gateway device. The gateway device can forward the service request to the management node. Therefore, the management node can obtain the service request from the gateway device, thereby responding to the service request and performing resource scheduling on the heterogeneous resources of the target slave node.

[0099] In this embodiment, the management node may obtain the server request for the target slave node forwarded by the gateway device through connection with the gateway device.

[0100] The above step 203 may include: in response to the service request, scheduling the heterogeneous resources of the target slave node according to the load size, user resource demand and resource occupancy information of the target slave node.

[0101] In this embodiment, after receiving the service request, the management node can respond to the service request, determine that a service failure has occurred in the target slave node, and then schedule the heterogeneous resources of the target slave node based on the load size, user resource requirements and resource occupancy information of the target slave node.

[0102] In this embodiment, the management node receives service requests for the target slave node through the gateway device, and can respond to the service request and schedule the heterogeneous resources of the target slave node according to the load size, user resource requirements and resource occupancy information of the target slave node, thereby improving the rapid discovery of target slave nodes with service failures and improving the efficiency of response to service failures.

[0103] In an exemplary embodiment, this embodiment relates to a process of containerizing heterogeneous resources after a management node acquires the heterogeneous resources. The method further includes:

[0104] The container sandbox mechanism and security isolation mechanism are used to containerize the heterogeneous resources of each slave node to obtain the heterogeneous resources after containerization.

[0105] The container sandbox mechanism is a security technology used to isolate and restrict the application runtime environment within a container, preventing processes within the container from impacting the host machine or other containers. A security isolation mechanism is a technical means of ensuring system security. It isolates different system components, users, data, or applications, limiting direct interactions between them, thereby reducing security risks and preventing the spread of security vulnerabilities and malicious attacks. For example, security isolation mechanisms can include network isolation and system isolation.

[0106] In this embodiment, after obtaining the heterogeneous resources of each slave node in the K8S cluster, the management node can use the container sandbox mechanism and security isolation mechanism to containerize each heterogeneous resource and integrate each heterogeneous resource into each container to improve the security of each heterogeneous resource during use.

[0107] The above step 203 may include: performing resource scheduling on the heterogeneous resources after each containerization process according to the load size, user resource demand and resource occupancy information.

[0108] Based on the above, the management node can schedule the heterogeneous resources after each containerization process according to the load size, user resource requirements and resource occupancy information.

[0109] In this embodiment, the management node containerizes the heterogeneous resources of each slave node by utilizing the container sandbox mechanism and the security isolation mechanism to obtain the heterogeneous resources after containerization. Then, the management node can schedule the heterogeneous resources after containerization according to the load size, user resource requirements and resource occupancy information. Since the heterogeneous resources are containerized, each heterogeneous resource can be isolated from other heterogeneous resources, thereby improving the security of each heterogeneous resource and further improving the reliability of the K8S cluster.

[0110] To facilitate understanding by those skilled in the art, the following is a detailed introduction to the heterogeneous resource management method provided by this application. The method may include:

[0111] S1, obtains the load size and user resource requirements corresponding to the K8S cluster, and obtains the resource attributes of the heterogeneous resources of each slave node in the K8S cluster.

[0112] S2, using the container sandbox mechanism and security isolation mechanism to containerize the heterogeneous resources of each slave node to obtain the heterogeneous resources after containerization.

[0113] S3: Determine the resource occupancy information of each slave node based on the attributes of each resource.

[0114] S4, receiving a service request for the target slave node through the gateway device.

[0115] S5. For each slave node, determine whether the slave node has a service failure based on the resource occupancy information of the slave node, and if the slave node has a service failure, determine the slave node as a target slave node.

[0116] S6, determine the first scheduling strategy based on the resource occupancy information of other slave nodes in the K8S cluster except the target slave node, the resource occupancy information of the target slave node, the load size and the user resource demand.

[0117] S7. According to the first scheduling strategy, determine at least one backup slave node from the other slave nodes, and switch the heterogeneous resources of the target slave node to the backup slave node.

[0118] S8. Determine the storage resource size of the target slave node according to the resource occupancy information of the target slave node.

[0119] S9: Determine a second scheduling strategy based on the storage resource size, load size, and user resource requirements of the target slave node.

[0120] S10: Adjust the storage resource size of the target slave node according to the second scheduling strategy.

[0121] It should be noted that for the descriptions in S1-S10 above, reference can be made to the relevant descriptions in the above embodiments, and the effects are similar, so this embodiment will not be repeated here.

[0122] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0123] Based on the same inventive concept, embodiments of the present application also provide a heterogeneous resource management device for implementing the aforementioned heterogeneous resource management method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of the one or more heterogeneous resource management device embodiments provided below can be found in the limitations of the heterogeneous resource management method described above and will not be further elaborated here.

[0124] In one embodiment, Figure 6 As shown, a heterogeneous resource management device is provided, including an acquisition module 601, a determination module 602 and a scheduling module 603, wherein:

[0125] Acquisition module 601 is used to obtain the load size and user resource requirements corresponding to the K8S cluster, and obtain the resource attributes of the heterogeneous resources of each slave node in the K8S cluster, where the slave node is a cloud server;

[0126] Determination module 602, for determining resource occupancy information of each slave node according to each resource attribute;

[0127] The scheduling module 603 is used to schedule the heterogeneous resources according to the load size, user resource requirements and resource occupancy information.

[0128] The heterogeneous resource management device provided in this embodiment can execute the above method embodiment. Its implementation principles and technical effects are similar and will not be described in detail here.

[0129] In one embodiment, the scheduling module 603 includes:

[0130] a determining unit, configured to determine, for each slave node, whether a service failure exists in the slave node based on resource occupancy information of the slave node, and determine the slave node as a target slave node if the service failure exists in the slave node;

[0131] The first scheduling unit is used to schedule the heterogeneous resources of the target slave node according to the load size, user resource demand and resource occupancy information of the target slave node.

[0132] The heterogeneous resource management device provided in this embodiment can execute the above method embodiment. Its implementation principles and technical effects are similar and will not be described in detail here.

[0133] In one embodiment, the service failure includes a resource abnormality, and the first scheduling unit is specifically configured to:

[0134] Get the resource usage of other target servers except the target server;

[0135] Determine the scheduling strategy based on the resource usage of other target servers and the resource usage of the target server;

[0136] According to the scheduling strategy, the backup server for resource switching is determined, and heterogeneous resources are switched to the backup server.

[0137] The heterogeneous resource management device provided in this embodiment can execute the above method embodiment. Its implementation principles and technical effects are similar and will not be described in detail here.

[0138] In one embodiment, the service failure includes insufficient storage resources, and the first scheduling unit is specifically configured to:

[0139] Determine the storage resource size of the target slave node according to the resource occupancy information of the target slave node;

[0140] Determining a second scheduling strategy based on the storage resource size, load size, and user resource requirements of the target slave node;

[0141] According to the second scheduling strategy, the storage resource size of the target slave node is adjusted. The heterogeneous resource management device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0142] In one embodiment, the apparatus further comprises:

[0143] A receiving module, configured to receive a service request for a target slave node through a gateway device;

[0144] The above 302 includes: a third scheduling unit, configured to:

[0145] In response to the service request, the heterogeneous resources of the target slave node are scheduled according to the load size, user resource requirements and resource occupancy information of the target slave node.

[0146] The heterogeneous resource management device provided in this embodiment can execute the above method embodiment. Its implementation principles and technical effects are similar and will not be described in detail here.

[0147] In one embodiment, the apparatus further comprises:

[0148] A processing module is used to containerize the heterogeneous resources of each slave node using the container sandbox mechanism and the security isolation mechanism to obtain the heterogeneous resources after containerization;

[0149] The above step 203 includes: a fourth scheduling unit configured to:

[0150] Resource scheduling is performed on the heterogeneous resources after containerization based on load size, user resource requirements, and resource occupancy information.

[0151] The heterogeneous resource management device provided in this embodiment can execute the above method embodiment. Its implementation principles and technical effects are similar and will not be described in detail here.

[0152] Each module in the heterogeneous resource management device described above may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0153] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. 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 computer program in the non-volatile storage medium. The database of the computer device is used to store heterogeneous resource data of each slave node. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication 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 method for managing heterogeneous resources is implemented.

[0154] Those skilled in the art will understand that Figure 7 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 shown in the figure, or combine certain components, or have a different component arrangement.

[0155] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0156] Obtain the load size and user resource requirements corresponding to the K8S cluster, and obtain the resource attributes of the heterogeneous resources of each slave node in the K8S cluster, where the slave node is the cloud server;

[0157] Determine the resource occupancy information of each slave node based on the attributes of each resource;

[0158] Resource scheduling is performed on heterogeneous resources based on load size, user resource requirements, and resource occupancy information.

[0159] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0160] For each slave node, determining whether the slave node has a service failure based on the resource occupancy information of the slave node, and determining the slave node as a target slave node if the slave node has a service failure;

[0161] According to the load size, user resource requirements and resource occupancy information of the target slave node, the heterogeneous resources of the target slave node are scheduled.

[0162] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0163] Get the resource usage of other target servers except the target server;

[0164] Determine the scheduling strategy based on the resource usage of other target servers and the resource usage of the target server;

[0165] According to the scheduling strategy, the backup server for resource switching is determined, and heterogeneous resources are switched to the backup server.

[0166] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0167] Determine the storage resource size of the target slave node according to the resource occupancy information of the target slave node;

[0168] Determining a second scheduling strategy based on the storage resource size, load size, and user resource requirements of the target slave node;

[0169] According to the second scheduling strategy, the storage resource size of the target slave node is adjusted.

[0170] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0171] receiving a service request for a target slave node through a gateway device;

[0172] Based on the load size, user resource requirements, and resource occupancy information of the target slave node, the heterogeneous resources of the target slave node are scheduled, including:

[0173] In response to the service request, the heterogeneous resources of the target slave node are scheduled according to the load size, user resource requirements and resource occupancy information of the target slave node.

[0174] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0175] receiving a service request for a target slave node through a gateway device;

[0176] Utilize the container sandbox mechanism and security isolation mechanism to containerize the heterogeneous resources of each slave node to obtain the heterogeneous resources after containerization;

[0177] Scheduling of heterogeneous resources is performed based on load size, user resource requirements, and resource occupancy information, including:

[0178] Resource scheduling is performed on the heterogeneous resources after containerization based on load size, user resource requirements, and resource occupancy information.

[0179] 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 following steps are implemented:

[0180] Obtain the load size and user resource requirements corresponding to the K8S cluster, and obtain the resource attributes of the heterogeneous resources of each slave node in the K8S cluster, where the slave node is the cloud server;

[0181] Determine the resource occupancy information of each slave node based on the attributes of each resource;

[0182] Resource scheduling is performed on heterogeneous resources based on load size, user resource requirements, and resource occupancy information.

[0183] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0184] For each slave node, determining whether the slave node has a service failure based on the resource occupancy information of the slave node, and determining the slave node as a target slave node if the slave node has a service failure;

[0185] According to the load size, user resource requirements and resource occupancy information of the target slave node, the heterogeneous resources of the target slave node are scheduled.

[0186] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0187] Get the resource usage of other target servers except the target server;

[0188] Determine the scheduling strategy based on the resource usage of other target servers and the resource usage of the target server;

[0189] According to the scheduling strategy, the backup server for resource switching is determined, and heterogeneous resources are switched to the backup server.

[0190] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0191] Determine the storage resource size of the target slave node according to the resource occupancy information of the target slave node;

[0192] Determining a second scheduling strategy based on the storage resource size, load size, and user resource requirements of the target slave node;

[0193] According to the second scheduling strategy, the storage resource size of the target slave node is adjusted.

[0194] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0195] receiving a service request for a target slave node through a gateway device;

[0196] Based on the load size, user resource requirements, and resource occupancy information of the target slave node, the heterogeneous resources of the target slave node are scheduled, including:

[0197] In response to the service request, the heterogeneous resources of the target slave node are scheduled according to the load size, user resource requirements and resource occupancy information of the target slave node.

[0198] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0199] Utilize the container sandbox mechanism and security isolation mechanism to containerize the heterogeneous resources of each slave node to obtain the heterogeneous resources after containerization;

[0200] Scheduling of heterogeneous resources is performed based on load size, user resource requirements, and resource occupancy information, including:

[0201] Resource scheduling is performed on the heterogeneous resources after containerization based on load size, user resource requirements, and resource occupancy information.

[0202] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0203] Obtain the load size and user resource requirements corresponding to the K8S cluster, and obtain the resource attributes of the heterogeneous resources of each slave node in the K8S cluster, where the slave node is the cloud server;

[0204] Determine the resource occupancy information of each slave node based on the attributes of each resource;

[0205] Resource scheduling is performed on heterogeneous resources based on load size, user resource requirements, and resource occupancy information.

[0206] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0207] For each slave node, determining whether the slave node has a service failure based on the resource occupancy information of the slave node, and determining the slave node as a target slave node if the slave node has a service failure;

[0208] According to the load size, user resource requirements and resource occupancy information of the target slave node, the heterogeneous resources of the target slave node are scheduled.

[0209] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0210] Get the resource usage of other target servers except the target server;

[0211] Determine the scheduling strategy based on the resource usage of other target servers and the resource usage of the target server;

[0212] According to the scheduling strategy, the backup server for resource switching is determined, and heterogeneous resources are switched to the backup server.

[0213] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0214] Determine the storage resource size of the target slave node according to the resource occupancy information of the target slave node;

[0215] Determining a second scheduling strategy based on the storage resource size, load size, and user resource requirements of the target slave node;

[0216] According to the second scheduling strategy, the storage resource size of the target slave node is adjusted.

[0217] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0218] receiving a service request for a target slave node through a gateway device;

[0219] Based on the load size, user resource requirements, and resource occupancy information of the target slave node, the heterogeneous resources of the target slave node are scheduled, including:

[0220] In response to the service request, the heterogeneous resources of the target slave node are scheduled according to the load size, user resource requirements and resource occupancy information of the target slave node.

[0221] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0222] Utilize the container sandbox mechanism and security isolation mechanism to containerize the heterogeneous resources of each slave node to obtain the heterogeneous resources after containerization;

[0223] Scheduling of heterogeneous resources is performed based on load size, user resource requirements, and resource occupancy information, including:

[0224] Resource scheduling is performed on the heterogeneous resources after containerization based on load size, user resource requirements, and resource occupancy information.

[0225] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to a memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processors (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.

[0226] The technical features of the above embodiments can 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.

[0227] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A method for managing heterogeneous resources, characterized in that: For a management node in a K8S cluster, the method includes: Obtain the load size and user resource requirements corresponding to the K8S cluster, and obtain the resource attributes of the heterogeneous resources of each slave node in the K8S cluster, where the slave node is a cloud server; Determining resource occupancy information of each slave node according to each resource attribute; Resource scheduling is performed on each of the heterogeneous resources according to the load size, the user resource demand, and the resource occupancy information.

2. The method according to claim 1, characterized in that The performing resource scheduling on each of the heterogeneous resources according to the load size, the user resource demand, and the resource occupancy information includes: For each of the slave nodes, determining whether the slave node has a service failure based on the resource occupancy information of the slave node, and determining the slave node as a target slave node if the slave node has a service failure; Resource scheduling is performed on the heterogeneous resources of the target slave node according to the load size, the user resource demand, and the resource occupancy information of the target slave node.

3. The method according to claim 2, characterized in that The service failure includes a service interruption, and the resource scheduling of the heterogeneous resources of the target slave node according to the load size, the user resource demand, and the resource occupancy information of the target slave node includes: Determine a first scheduling strategy based on resource occupancy information of other slave nodes in the K8S cluster except the target slave node, resource occupancy information of the target slave node, the load size, and the user resource demand; According to the first scheduling strategy, at least one backup slave node is determined from each of the other slave nodes, and the heterogeneous resources of the target slave node are switched to the backup slave node.

4. The method according to claim 2, characterized in that The service failure includes insufficient storage resources, and the resource scheduling of the heterogeneous resources of the target slave node according to the load size, the user resource demand, and the resource occupancy information of the target slave node includes: Determining the storage resource size of the target slave node according to the resource occupancy information of the target slave node; Determining a second scheduling strategy according to the storage resource size of the target slave node, the load size, and the user resource demand; According to the second scheduling policy, the storage resource size of the target slave node is adjusted.

5. The method according to claim 2, characterized in that The method further comprises: receiving, through a gateway device, a service request for the target slave node; The performing resource scheduling on the heterogeneous resources of the target slave node according to the load size, the user resource demand, and the resource occupancy information of the target slave node includes: In response to the service request, resource scheduling is performed on the heterogeneous resources of the target slave node according to the load size, the user resource demand, and the resource occupancy information of the target slave node.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Containerizing the heterogeneous resources of each slave node using a container sandbox mechanism and a security isolation mechanism to obtain the heterogeneous resources after containerization; Performing resource scheduling on each of the heterogeneous resources according to the load size, the user resource demand, and the resource occupancy information, including: Resource scheduling is performed on each of the containerized heterogeneous resources according to the load size, the user resource demand, and the resource occupancy information.

7. A heterogeneous resource management device, characterized in that: For use as a management node in a K8S cluster, the device includes: An acquisition module is used to obtain the load size and user resource requirements corresponding to the K8S cluster, and obtain the resource attributes of the heterogeneous resources of each slave node in the K8S cluster, where the slave node is a cloud server; A determination module, configured to determine resource occupancy information of each slave node according to each resource attribute; The scheduling module is used to schedule the heterogeneous resources according to the load size, the user resource demand and the resource occupancy information.

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 method according to 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 method according to 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 method according to any one of claims 1 to 6 are implemented.