CN111158909B - Cluster resource allocation processing method, device, equipment and storage medium - Google Patents

Cluster resource allocation processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN111158909B
CN111158909B CN201911376966.4A CN201911376966A CN111158909B CN 111158909 B CN111158909 B CN 111158909B CN 201911376966 A CN201911376966 A CN 201911376966A CN 111158909 B CN111158909 B CN 111158909B
Authority
CN
China
Prior art keywords
resource
cluster
resources
idle
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911376966.4A
Other languages
Chinese (zh)
Other versions
CN111158909A (en
Inventor
张辉
房秉毅
杨绍光
赖羿明
张鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Unicom Cloud Data Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Unicom Cloud Data Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd, Unicom Cloud Data Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201911376966.4A priority Critical patent/CN111158909B/en
Publication of CN111158909A publication Critical patent/CN111158909A/en
Application granted granted Critical
Publication of CN111158909B publication Critical patent/CN111158909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)
  • Hardware Redundancy (AREA)

Abstract

The application discloses a cluster resource allocation processing method, device, equipment and storage medium, wherein the method comprises the following steps: acquiring idle resources of at least one cluster resource; classifying the cluster resources according to the idle resources and a preset classification rule to obtain at least one type of cluster resources; acquiring a borrowing request sent by a request cluster, wherein the borrowing request is used for requesting to acquire at least one target resource from at least one cluster resource; and inquiring the target resource in the at least one cluster resource according to the borrowing request, and returning the target resource to the request cluster. The cluster resources participating in the borrowing of the cluster resources do not need to store the resource information of other cluster resources, so that the storage cost is low, the cluster resources are scattered in each cluster, the problem of single-point faults is avoided, and meanwhile, the borrowing request is processed by the cluster resources together, the processing efficiency is high, and the processing is timely.

Description

Cluster resource allocation processing method, device, equipment and storage medium
Technical Field
The application relates to the technical field of computing resource management, in particular to a cluster resource allocation processing method, device, equipment and storage medium.
Background
With the development of computationally intensive and delay sensitive technologies such as AI, AR and VR, the demands on computing resources and communication delays by cluster computing are increasing, and in order to accommodate such high demands, cluster resource allocation needs to be performed among a plurality of cluster resources.
In the related art, a cross-domain cluster resource aggregation and allocation method is generally adopted to perform cluster resource allocation processing. The method includes the steps that each cluster resource is registered in a resource service center and relevant information of all cluster resources is stored, so that a cross-domain distributed cluster resource pool is constructed, and when borrowing requests sent by other clusters are received, the resource service center can allocate idle cluster resources meeting requirements in the cross-domain distributed cluster resource pool.
However, in the above method, when the cluster resource is updated more frequently, the storage overhead of the resource service center is larger, and the efficiency of borrowing request processing is low; when a plurality of clusters initiate borrowing requests to a resource service center at the same time, the resource service center needs to perform serial processing on all the borrowing requests, so that the task waiting time is long, and the borrowing requests are not processed timely; meanwhile, the method also has the problem of single-point failure, namely if a resource service center fails, cluster resource allocation cannot be continued.
Disclosure of Invention
The embodiment of the application provides a cluster resource allocation processing method, device, equipment and storage medium, which are used for solving the problems of low borrowing request processing efficiency, untimely processing and single-point failure existing in the existing cluster resource allocation processing method.
In a first aspect, the present application provides a cluster resource allocation processing method, including:
acquiring idle resources of at least one cluster resource;
classifying the cluster resources according to the idle resources and a preset classification rule to obtain at least one type of cluster resources;
acquiring a borrowing request sent by a request cluster, wherein the borrowing request is used for requesting to acquire at least one target resource from at least one cluster resource;
and inquiring the target resource in the at least one cluster resource according to the borrowing request, and returning the target resource to the request cluster.
Further, the idle resources include at least one idle resource node, and the classifying the cluster resources according to the idle resources and a preset classification rule to obtain at least one type of cluster resources includes:
classifying the idle resource nodes according to preset classification rules and determining a first resource category of the idle resource nodes;
Determining a first resource category of the idle resource node with the highest resource category priority as a second resource category of the corresponding cluster resource;
and classifying the cluster resources according to the second resource category to obtain at least one type of cluster resources.
Further, the idle resource node includes at least one idle sub-resource, and the classifying the idle resource node according to the idle resource node and a preset classification rule, to determine the first resource class of the idle resource node includes:
classifying the idle sub-resources according to the idle sub-resources and a preset classification rule, and determining a third resource category of the idle sub-resources;
and determining a third resource category of the idle sub-resource with the lowest resource category priority as a first resource category of a corresponding idle resource node.
Further, after obtaining at least one type of cluster resource, the method further includes:
constructing at least one cluster resource distribution space according to the at least one cluster resource, wherein each cluster resource distribution space comprises one cluster resource;
according to the borrowing request, querying the target resource in the at least one cluster resource comprises:
And inquiring the target resource in the at least one cluster resource distribution space according to the borrowing request.
Further, according to the borrowing request, querying the target resource in the at least one cluster resource distribution space includes:
determining a cluster resource distribution space to which the target resource belongs according to the borrowing request;
determining cluster resources to which the target resources belong according to the cluster resource distribution space to which the target resources belong;
and determining the target resource according to the cluster resource to which the target resource belongs.
Further, the different usage states of the cluster resources correspond to different idle resources, and the method further comprises:
and dynamically adjusting the second resource category of the cluster resource according to the change condition of the idle resource.
Further, the returning the target resource to the request cluster includes:
and sending the target resource to the request cluster according to the gateway IP address information of the request cluster.
Further, the preset classification rule includes:
and dividing the resources into a plurality of resource categories according to the quantity of the resources, wherein the higher the quantity of the resources is, the higher the priority of the corresponding resource category is.
In a second aspect, the present application provides a cluster resource allocation processing device, including:
the first acquisition unit is used for acquiring idle resources of at least one cluster resource;
the first processing unit is used for classifying the cluster resources according to the idle resources and a preset classification rule to obtain at least one type of cluster resources;
the second acquisition unit is used for acquiring a borrowing request sent by a request cluster, wherein the borrowing request is used for requesting to acquire at least one target resource from the at least one cluster resource;
and the second processing unit is used for inquiring the target resource in the at least one cluster resource according to the borrowing request and returning the target resource to the request cluster.
Further, the free resources comprise at least one free resource node, and the first processing unit comprises:
the first processing subunit is used for classifying the idle resource nodes according to the idle resource nodes and a preset classification rule, and determining a first resource category of the idle resource nodes;
a second processing subunit, configured to determine, as a second resource class of the corresponding cluster resource, a first resource class of the idle resource node with a highest resource class priority;
And the third processing subunit is used for classifying the cluster resources according to the second resource category to obtain at least one type of cluster resources.
Further, the free resource node comprises at least one free sub-resource, and the first processing sub-unit comprises:
the first processing module is used for classifying the idle sub-resources according to the idle sub-resources and a preset classification rule, and determining a third resource category of the idle sub-resources;
and the second processing module is used for determining the third resource category of the idle sub-resource with the lowest resource category priority as the first resource category of the corresponding idle resource node.
Further, the apparatus further comprises:
the third processing unit is used for constructing at least one cluster resource distribution space according to the at least one cluster resource, wherein each cluster resource distribution space comprises one cluster resource;
the second processing unit includes:
and the fourth processing subunit is used for inquiring the target resource in the at least one cluster resource distribution space according to the borrowing request.
Further, the fourth processing subunit includes:
The third processing module is used for determining a cluster resource distribution space to which the target resource belongs according to the borrowing request;
a fourth processing module, configured to determine, according to a cluster resource distribution space to which the target resource belongs, a cluster resource to which the target resource belongs;
and the fifth processing module is used for determining the target resource according to the cluster resource to which the target resource belongs.
Further, the different usage states of the cluster resources correspond to different idle resources, and the apparatus further includes:
and the fourth processing unit is used for dynamically adjusting the second resource category of the cluster resource according to the change condition of the idle resource.
Further, the second processing unit includes:
and the fifth processing subunit is used for sending the target resource to the request cluster according to the gateway IP address information of the request cluster.
Further, the preset classification rule includes:
and dividing the resources into a plurality of resource categories according to the quantity of the resources, wherein the higher the quantity of the resources is, the higher the priority of the corresponding resource category is.
In a third aspect, the present application provides an electronic device, including:
At least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the first aspects.
In a fourth aspect, the present application provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method of any one of the first aspects.
One embodiment of the above application has the following advantages or benefits: according to the method, cluster resources are classified according to the resource quantity of idle resources of the cluster resources, borrowing request processing is carried out on each classified cluster resource, target resources are searched, mutual borrowing of the idle resources among clusters is achieved, the cluster resources participating in the cluster resource borrowing do not need to store resource information of other cluster resources, the borrowing request is processed by a plurality of cluster resources together, and the problems that the borrowing request processing efficiency is low, the borrowing request processing is not timely, single-point faults exist and the like when the cluster resource distribution processing is carried out by a resource service center are solved; because the cluster resources participating in the cluster resource borrowing do not need to store the resource information of other cluster resources, the storage expense is low, the cluster resources are scattered in each cluster, the problem of single-point faults is avoided, and meanwhile, the borrowing request is processed by the cluster resources together, the processing efficiency is high, and the processing is timely.
Other effects of the above alternative will be described below in connection with specific embodiments.
Drawings
The drawings are for better understanding of the present solution and do not constitute a limitation of the present application.
Fig. 1 is a flow chart of a cluster resource allocation processing method provided in an embodiment of the present application;
fig. 2 is a flow chart of another cluster resource allocation processing method according to an embodiment of the present application;
FIG. 2a is a schematic diagram of three cluster resource distribution spaces according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a cluster resource allocation processing device provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of still another cluster resource allocation processing device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a cluster resource allocation processing device according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Noun interpretation referred to in this application:
cluster resources: the aggregate of all resources available for data computation in the cluster includes CPU, memory, operating system, etc.
Resource classification space: a set of cluster resources consisting of cluster resources of the same class.
Application scenario of the application: with the development of computationally intensive and delay sensitive technologies such as AI, AR and VR, the demands on computing resources and communication delays by cluster computing are increasing, and in order to accommodate such high demands, cluster resource allocation needs to be performed among a plurality of cluster resources.
In the related art, a cross-domain cluster resource aggregation and allocation method is generally adopted to perform cluster resource allocation processing. The method includes the steps that each cluster resource is registered in a resource service center and relevant information of all cluster resources is stored, so that a cross-domain distributed cluster resource pool is constructed, and when borrowing requests sent by other clusters are received, the resource service center can allocate idle cluster resources meeting requirements in the cross-domain distributed cluster resource pool.
However, in the above method, when the cluster resource is updated more frequently, the storage overhead of the resource service center is larger, and the efficiency of borrowing request processing is low; when a plurality of clusters initiate borrowing requests to a resource service center at the same time, the resource service center needs to perform serial processing on all the borrowing requests, so that the task waiting time is long, and the borrowing requests are not processed timely; meanwhile, the method also has the problem of single-point failure, namely if a resource service center fails, cluster resource allocation cannot be continued.
The method, the device, the equipment and the storage medium for processing cluster resource allocation aim to solve the technical problems.
Fig. 1 is a processing method for allocating cluster resources according to an embodiment of the present application, as shown in fig. 1, where the method includes:
step 101, obtaining idle resources of at least one cluster resource.
In this embodiment, specifically, the execution body of this embodiment is a terminal device or an application program, a server, or a controller provided on the terminal device, or other apparatus or device capable of executing this embodiment, and this embodiment is described taking the execution body as an example of a server provided on the terminal device.
In order to meet the high requirements of cluster calculation on computing resources and communication delay, different clusters can mutually carry out cluster resource borrowing, in the existing cluster resource borrowing method, a resource service center completes all cluster resource borrowing work, however, when a plurality of clusters simultaneously request to borrow cluster resources, the resource service center cannot simultaneously process the cluster resource borrowing work of all the clusters, so that the cluster resource borrowing has delay and low efficiency. The cluster resource allocation processing method provided by the embodiment is suitable for the situation that a plurality of clusters simultaneously request borrowing cluster resources.
Cluster resources include all sub-resources of the cluster that are available for data computation, including, for example, CPUs, memory, operating systems, and the like. The free resources of the cluster resources refer to the part of the cluster resources which are unoccupied and in an available state. Preferably, the idle resource for obtaining at least one cluster resource in this embodiment may refer to a resource amount of idle resources for obtaining at least one sub-resource of at least one cluster resource, for example, may be a number of idle cores of a CPU for obtaining a certain cluster resource, and/or a free capacity of a memory.
And 102, classifying the cluster resources according to the idle resources and a preset classification rule to obtain at least one type of cluster resources.
In this embodiment, specifically, according to the amount of resources of the idle resources, each cluster resource is classified according to a preset classification rule, a resource class corresponding to each cluster resource is determined, and cluster resources belonging to the same resource class are used as one class of cluster resources, so as to finally obtain at least one class of cluster resources.
The purpose of performing cluster resource borrowing among different clusters is to obtain more available computing resources, so that the cluster resources are classified according to the resource quantity of the hollow resources in the cluster resources, the determined resource types of the cluster resources can truly reflect the available computing resources in the cluster resources, and resource borrowing among different clusters can be performed more conveniently and rapidly.
Wherein the amount of free resources comprises an amount of free resources of at least one sub-resource in the cluster resource. When classifying corresponding cluster resources according to the resource quantity of the idle resources, the resource quantity of the idle resources of all the sub-resources in the cluster resources can be selected as a classification basis, the resource quantity of the idle resources of one or more sub-resources can be selected as a classification basis, the types of the sub-resources serving as the classification basis of the cluster resources can be dynamically selected according to the use requirement of the cluster resources, for example, in order to meet more efficient cluster calculation, the idle core number of a CPU and the idle capacity of a memory can be selected as the classification basis of the cluster resources.
The preset classification rule comprises the following steps: according to the quantity of the resources, the resources are divided into a plurality of resource categories, and the higher the quantity of the resources is, the higher the priority of the corresponding resource category is. The preset classification rule may include a sub-resource type corresponding to the cluster resource and an interval length corresponding to the resource amount of each sub-resource, and may be preset according to experience and classification requirements in the art. For example, the classification standard may be designed according to the classification requirement of the cluster resources, and may be designed corresponding to all sub-resource types of the cluster resources, or may be designed corresponding to only one or more sub-resources in the cluster resources; the interval length of the resource amount of each sub-resource included in each cluster resource class may be preset according to cluster resource usage experience in the field, and for example, CPUs having cores 1-2, 3-4, and 5-6 may be set as one class, or CPUs having cores 1-3 and 4-6 may be set as one class, respectively, according to experience.
When the cluster resources to be classified are classified, the resource quantity of the idle resources of each sub-resource in the cluster resources can be matched with the resource quantity interval corresponding to the preset cluster resource class, and when the resource quantity of the idle resources belongs to a certain resource quantity interval, the cluster resource class corresponding to the resource quantity interval is used as the resource class of the cluster resources to be classified.
Step 103, obtaining a borrowing request sent by a request cluster, where the borrowing request is used to request to obtain at least one target resource from at least one cluster resource.
In this embodiment, specifically, the request cluster may be any one of all clusters, and when the cluster resource of a certain cluster cannot meet the computing requirement of the cluster, the cluster may request to borrow the cluster resource of another cluster, and when the cluster requests to borrow the cluster resource of another cluster, the cluster is used as the request cluster. The request cluster can borrow cluster resources to other clusters by sending borrowing requests to other clusters, wherein the borrowing requests carry relevant information of target resources expected to be borrowed by the request cluster.
The method for the request cluster to send the borrowing request to other clusters may be a conventional method in the art, and the embodiment is not limited herein. For example, the request cluster may send a borrowing request to surrounding clusters by broadcasting, or may send a borrowing request to a specific plurality of clusters according to IP addresses of other clusters.
Step 104, according to the borrowing request, inquiring the target resource in at least one type of cluster resource, and returning the target resource to the request cluster.
In this embodiment, specifically, after receiving a borrowing request sent by a request cluster, a part of resources matched with a target resource may be selected from the at least one cluster resource according to related information of the target resource carried in the borrowing request, and the part of resources is returned to the request cluster as the target resource. The related information of the target resource includes a resource type and a resource amount of the target resource, for example, the related information of the target resource is a CPU with a core number of 3-4, or a memory with a capacity of 5-6G, or a CPU with a core number of 3-4+a memory with a capacity of 5-6G.
In this embodiment, the idle resource of at least one cluster resource is obtained; classifying cluster resources according to idle resources and preset classification rules to obtain at least one type of cluster resources; acquiring a borrowing request sent by a request cluster, wherein the borrowing request is used for requesting to acquire at least one target resource from at least one cluster resource; and according to the borrowing request, inquiring the target resource in at least one type of cluster resource, and returning the target resource to the request cluster. In the method of the embodiment, cluster resources are classified according to the resource quantity of idle resources of the cluster resources, borrowing request processing is carried out on each classified cluster resource, target resources are searched, mutual borrowing of the idle resources among clusters is achieved, the cluster resources participating in the cluster resource borrowing do not need to store resource information of other cluster resources, the borrowing request is processed by a plurality of cluster resources together, and the problems that the borrowing request processing efficiency is low, the borrowing request processing is not timely, single-point faults exist and the like when the cluster resource distribution processing is carried out by a resource service center are overcome; because the cluster resources participating in the cluster resource borrowing do not need to store the resource information of other cluster resources, the storage expense is low, the cluster resources are scattered in each cluster, the problem of single-point faults is avoided, and meanwhile, the borrowing request is processed by the cluster resources together, the processing efficiency is high, and the processing is timely.
Fig. 2 is a flow chart of another cluster resource allocation processing method provided in an embodiment of the present application, as shown in fig. 2, where the method includes:
step 201, obtaining idle resources of at least one cluster resource, wherein the idle resources of each cluster resource comprise at least one idle resource node, and each idle resource node comprises at least one idle sub-resource.
For any one cluster resource, it is composed of at least one resource node, each resource node is composed of at least one sub-resource. The free resources of the cluster resources are partial resources which are unoccupied and in an available state in the cluster resources, so that the free resources are also formed by at least one free resource node based on the formation mode of the cluster resources, and the free resource nodes forming the free resources are also formed by at least one free sub-resource.
Illustratively, one cluster resource is composed of a first resource node and a second resource node, wherein the first resource node and the second resource node both contain 8-core CPUs and 8-G memories, however, the first resource node has 2-core CPUs and 4-G memories in a use state, the second resource node has 5-core CPUs and 3-G memories in a use state, and then the remaining 6-core CPUs and 4-G memories of the first resource node and the remaining 3-core CPUs and 5-G memories of the second resource node belong to idle sub-resources; the remaining 6-core CPU and 4G memory of the first resource node form a first idle resource node, and the remaining 3-core CPU and 5G memory of the second resource node form a second idle resource node; the first idle resource node and the second idle resource node together form an idle resource of the cluster resource.
Step 202, classifying the idle sub-resources according to a preset classification rule and determining a third resource class of the idle sub-resources; and determining a third resource category of the idle sub-resource with the lowest resource category priority as a first resource category of the corresponding idle resource node.
In this embodiment, specifically, all idle sub-resources in each idle resource node are classified according to a preset classification rule, a third resource class corresponding to each idle sub-resource is determined, and then the third resource class of the idle sub-resource with the lowest resource class priority in all idle sub-resources is used as the first resource class corresponding to the corresponding idle resource node.
The method and principle of setting the preset classification rule are similar to or the same as those described in step 102, refer to the relevant description of step 102, and are not repeated here.
For example, according to the cluster calculation requirement, the cluster calculation has obvious requirement on two sub-resources of the CPU and the memory in the cluster resource, so that the corresponding two sub-resources of the CPU and the memory are determined to set the preset classification rule; meanwhile, according to the cluster resource use experience in the field, the interval length of the resource quantity corresponding to the CPU and the memory in each category is respectively determined, for example, according to the resource use experience in the field, the CPU of the 1-2 core can achieve similar calculation effect, and then the CPU of the 1-2 core can be set as one resource category. According to the above classification method and principle, the preset classification rules set in this embodiment include:
The resources are divided into T classes, t= { T1, T2, … … Tn }, as:
t1 class: CPU 1-2 cores and memory 0-2G;
t2 class: CPU 3-4 core, memory 2-4G;
t3 class: CPU 5-6 core, memory 4-6G;
t4 class: 7-8 cores of a CPU and 6-8G of internal memory;
……
tn class: CPU (2 n-1) -2n core, memory (2 n-2) -2nG.
According to the description of step 102, the priority of the resource class corresponding to the larger resource amount is higher, and therefore, in the above classification rule, the priority of each resource class is TI < T2 < T3 < T4 < … … < Tn.
In the above classification rule, only two sub-resources of CPU and memory in the cluster resource are classified, and in practical application, the sub-resource types involved in the classification rule can be changed or increased or decreased according to the requirements of cluster calculation on the sub-resource types.
The above-listed classification rules are merely illustrative of the preset classification rules of the present embodiment, and are not limited to the present embodiment, and other classification rules may be adopted as the preset classification rules in the present embodiment, which are not described herein.
After the preset classification rule is determined, each idle sub-resource needs to be classified according to the preset classification rule, and the resource category corresponding to each idle sub-resource, namely, the third resource category is determined. For example, assume that the idle resources of the cluster resource a contain three idle nodes, and the idle sub-resources corresponding to each idle node are as follows:
{node1(cpu:4,memory:8);{node2(cpu:5,memory:5);{node3(cpu:8,memory:8)}。
According to the classification rule of the present embodiment, classification of the idle sub-resources of the three nodes may determine:
the CPU resource class in node1 is T2 class, and the memory resource class is T4 class;
the CPU resource class in node2 is T3 class, and the memory resource class is T3 class;
the CPU resource class in node3 is T4 class, and the memory resource class is T4 class.
After determining the third resource category of each idle sub-resource, the third resource category of the idle sub-resource with the lowest priority of the resource categories in all the idle sub-resources is required to be used as the resource category corresponding to the corresponding idle resource node, namely the first resource category. For example, for node1, the resource class of the sub-resource CPU is T2 class, and the resource class of the sub-resource memory is T4 class, because the resource class of the T2 class has a lower priority than the resource class of the T4 class, therefore, according to the method of the present embodiment, the resource class T2 of the sub-resource CPU of node1 is determined as the resource class of node1, that is, the first resource class of node1 is T2 class; similarly, it may be determined that the first resource class of node2 is a T3 class and the first resource class of node3 is a T4 class.
In this embodiment, the third resource class corresponding to the idle sub-resource with the lowest resource class priority is determined as the first resource class corresponding to the corresponding idle resource node, so that each idle resource in the idle resource node can be ensured to meet the classification requirement of the first resource class, in other words, the resource class of the idle resource node can be ensured to represent the resource class of all the idle sub-resources.
Step 203, determining a first resource class of the idle resource node with the highest resource class priority as a second resource class of the corresponding cluster resource; and classifying the cluster resources according to the second resource category to obtain at least one type of cluster resources.
In this embodiment, specifically, the method for determining the resource class priority of the first resource class is the same as the method for determining the resource class priority described in step 202, and will not be described in detail here.
The first resource class of the idle resource node with the highest resource class priority is determined as the second resource class of the corresponding cluster resource, for example, for the cluster resource a in step 202, it includes node1, node2 and node3, the first resource class of node1 is the T2 class, the first resource class of node2 is the T3 class, the first resource class of node3 is the T4 class, and according to the above-mentioned resource class priority determining method, the priority of the T4 class resource class is the highest, so according to the method of the present embodiment, the resource class T4 of node3 is determined as the resource class of the cluster resource a, that is, the second resource class of the cluster resource a is the T4 class.
Classifying the cluster resources according to the second resource category to obtain at least one type of cluster resources, including: and dividing the cluster resources corresponding to the same resource category into the cluster resources of the same category according to the second resource category of each cluster resource. For example, if the cluster resource B, the cluster resource C, and the cluster resource D are all known cluster resources, and the method according to the embodiment may determine that the resource class of the cluster resource B is the T3 class, the resource class of the cluster resource C is the T4 class, and the resource class of the cluster resource D is the T2 class, according to the method of the embodiment, the cluster resource a and the cluster resource C may be divided into the same class of cluster resources, the cluster resource B may be separately divided into one class of cluster resources, and the cluster resource D may be separately divided into one class of cluster resources.
Optionally, the present embodiment further includes: and constructing at least one cluster resource distribution space according to the at least one cluster resource, wherein each cluster resource distribution space comprises one cluster resource. According to the embodiment, the cluster resource distribution space is constructed, so that the classified idle resources of each cluster resource can be managed and inquired conveniently.
Optionally, the present embodiment further includes: and dynamically adjusting the second resource category of each cluster resource according to the change condition of the idle resource of each cluster resource. In the using process of the cluster resources, due to the change of the using state, the idle resources of the cluster resources may be changed at the same time, and according to the classification processing method of the embodiment, after the idle resources are changed, the resource types of the corresponding cluster resources may be changed, so that the second resource type of each cluster resource needs to be dynamically adjusted according to the change condition of the idle resources, so as to ensure that the second resource type can reflect the idle resources of the corresponding cluster resources in real time.
In this embodiment, the first resource class corresponding to the idle resource node with the highest priority of the resource classes is determined as the second resource class of the corresponding cluster resource, so that it can be ensured that the second resource class of the cluster resource can include all the first resource classes of all the idle nodes, and the situation that the idle resource node corresponding to the first resource class is not reflected in the cluster resource distribution space due to the fact that the priority of the second resource class is smaller than that of a certain first resource class is avoided, and when the cluster resource needs to be borrowed, the idle resource node cannot be found in the cluster resource distribution space, so that the cluster resource cannot be fully utilized, and the cluster resource is wasted is caused.
Step 204, obtaining a borrowing request sent by a request cluster, where the borrowing request is used to request to obtain at least one target resource from at least one cluster resource.
The method and principle of step 204 are similar to or the same as those of step 103, and refer to relevant descriptions of step 103, and are not repeated here. It should be noted that, if at least one cluster resource distribution space is constructed according to at least one cluster resource in step 203, the borrowing request is used to request to obtain at least one target resource from the at least one cluster resource distribution space.
Step 205, determining a cluster resource distribution space to which the target resource belongs according to the borrowing request; determining cluster resources to which the target resources belong according to the cluster resource distribution space to which the target resources belong; and determining the target resource according to the cluster resource to which the target resource belongs, and returning the target resource to the request cluster.
In this embodiment, specifically, after receiving a borrowing request, a cluster resource distribution space containing target resources is first determined according to relevant information of the target resources carried in the borrowing request, then target resource inquiry is performed in the cluster resource distribution space, and the inquired target resources are returned to the request cluster.
FIG. 2a is a schematic diagram of three cluster resource distribution spaces in the present embodiment, as shown in FIG. 2a, RCS T1 、RCS T2 And RCS T3 (not shown in the figure) represent three cluster resource distribution spaces, respectively. Wherein, RCS T1 Consists of T1 cluster resources and RCS T2 Consists of T2 cluster resources and RCS T3 Consists of T3 cluster resources; RCS (RCS) T1 Consisting of cluster resources C1, C2 and C3, RCS T2 Consists of cluster resources C4 and C5; c1 is composed of nodes n1 and n2, C2 is composed of node n3, C3 is composed of node n4, C4 is composed of nodes n5 and n6, and C5 is composed of nodes n7 and n 8. Alternatively, the cluster resource distribution space RCS T1 、RCS T2 And RCS T3 There may also be resource access ports M1, M2 and M3, respectively, for borrowing requests and cluster resources to or from. When the self resource of the node n1 cannot meet the self calculation requirement, firstly, a borrowing Request is sent out from the cluster resource C1 to which the node n1 belongs, and the borrowing Request carries the related information of the target resource required by the node n 1; then, inquiring the target resource in the cluster resource C1 to which the node n1 belongs, wherein an inquiring result shows that the target resource does not exist in the cluster resource C1; continuing to send a borrowing Request to other cluster resources in all cluster resource distribution spaces, and determining the cluster resource distribution space containing the target resource as RCS according to the borrowing Request T2 Then in the cluster resource distribution space RCS T2 And (3) inquiring the target resource, determining the cluster resource to which the target resource belongs as C5, inquiring the target resource n7 in the cluster resource as C5, and returning the inquired target resource n7 to the request cluster.
Optionally, in this embodiment, the target resource is sent to the request cluster according to gateway IP address information of the request cluster.
In this embodiment, by acquiring the idle resources of at least one cluster resource, where the idle resource of each cluster resource includes at least one idle resource node, and each idle resource node includes at least one idle sub-resource; classifying the idle sub-resources according to a preset classification rule and determining a third resource class of the idle sub-resources; determining a third resource category of the idle sub-resource with the lowest resource category priority as a first resource category of the corresponding idle resource node; determining a first resource category of the idle resource node with the highest resource category priority as a second resource category of the corresponding cluster resource; classifying the cluster resources according to the second resource category to obtain at least one type of cluster resources; acquiring a borrowing request sent by a request cluster, wherein the borrowing request is used for requesting to acquire at least one target resource from at least one cluster resource; determining a cluster resource distribution space to which the target resource belongs according to the borrowing request; determining cluster resources to which the target resources belong according to the cluster resource distribution space to which the target resources belong; and determining the target resource according to the cluster resource to which the target resource belongs, and returning the target resource to the request cluster. Determining a third resource class corresponding to the idle sub-resource with the lowest resource class priority as a first resource class corresponding to the corresponding idle resource node, wherein each idle resource in the idle resource node can be ensured to meet the classification requirement of the first resource class, and the resource class of the idle resource node can represent the resource class of all idle sub-resources; the first resource category corresponding to the idle resource node with the highest priority of the resource categories is determined to be the second resource category of the corresponding cluster resource, so that the second resource category of the cluster resource can be ensured to comprise the first resource categories of all idle nodes, and the cluster resource corresponding to the first resource category can not be fully utilized when the priority of the second resource category is smaller than that of a certain first resource category, thereby causing cluster resource waste; in addition, in the embodiment, the cluster resources participating in the cluster resource borrowing do not need to store the resource information of other cluster resources, so that the storage cost is low, the cluster resources are scattered in each cluster, the problem of single-point faults is avoided, and meanwhile, the borrowing request is processed in a plurality of cluster resource distribution spaces, the processing efficiency is high, and the processing is timely.
Fig. 3 is a schematic structural diagram of a cluster resource allocation processing device provided in an embodiment of the present application, where, as shown in fig. 3, the device includes:
a first obtaining unit 1, configured to obtain a free resource of at least one cluster resource;
the first processing unit 2 is configured to classify cluster resources according to idle resources and a preset classification rule, so as to obtain at least one type of cluster resources;
a second obtaining unit 3, configured to obtain a borrowing request sent by a request cluster, where the borrowing request is used to request to obtain at least one target resource from at least one cluster resource;
and the second processing unit 4 is configured to query the target resource in at least one type of cluster resources according to the borrowing request, and return the target resource to the request cluster.
In this embodiment, the idle resource of at least one cluster resource is obtained; classifying cluster resources according to idle resources and preset classification rules to obtain at least one type of cluster resources; acquiring a borrowing request sent by a request cluster, wherein the borrowing request is used for requesting to acquire at least one target resource from at least one cluster resource; and according to the borrowing request, inquiring the target resource in at least one type of cluster resource, and returning the target resource to the request cluster. In the method of the embodiment, cluster resources are classified according to the resource quantity of idle resources of the cluster resources, borrowing request processing is carried out on each classified cluster resource, target resources are searched, mutual borrowing of the idle resources among clusters is achieved, the cluster resources participating in the cluster resource borrowing do not need to store resource information of other cluster resources, the borrowing request is processed by a plurality of cluster resources together, and the problems that the borrowing request processing efficiency is low, the borrowing request processing is not timely, single-point faults exist and the like when the cluster resource distribution processing is carried out by a resource service center are overcome; because the cluster resources participating in the cluster resource borrowing do not need to store the resource information of other cluster resources, the storage expense is low, the cluster resources are scattered in each cluster, the problem of single-point faults is avoided, and meanwhile, the borrowing request is processed by the cluster resources together, the processing efficiency is high, and the processing is timely.
Fig. 4 is a schematic structural diagram of another cluster resource allocation processing device according to an embodiment of the present application, and on the basis of fig. 3, as shown in fig. 4,
the free resources comprise at least one free resource node, a first processing unit 2 comprising:
a first processing subunit 21, configured to classify the idle resource node according to a preset classification rule and determine a first resource class of the idle resource node;
a second processing subunit 22, configured to determine, as a second resource class of the corresponding cluster resource, a first resource class of the idle resource node with the highest priority of the resource classes;
the third processing subunit 23 is configured to classify the cluster resources according to the second resource class, to obtain at least one class of cluster resources.
The free resource node comprises at least one free sub-resource, a first processing sub-unit 21 comprising:
the first processing module 211 is configured to classify the idle sub-resources according to a preset classification rule according to the idle sub-resources, and determine a third resource class of the idle sub-resources;
the second processing module 212 is configured to determine a third resource class of the idle sub-resource with the lowest priority of the resource classes as the first resource class of the corresponding idle resource node.
The apparatus further comprises:
and the third processing unit 5 is configured to construct at least one cluster resource distribution space according to at least one cluster resource, where each cluster resource distribution space includes one cluster resource.
The second processing unit 4 includes:
a fourth processing subunit 41, configured to query the target resource in the at least one cluster resource distribution space according to the borrowing request.
The fourth processing subunit 41 includes:
a third processing module 411, configured to determine, according to the borrowing request, a cluster resource distribution space to which the target resource belongs;
a fourth processing module 412, configured to determine, according to the cluster resource distribution space to which the target resource belongs, a cluster resource to which the target resource belongs;
a fifth processing module 413, configured to determine the target resource according to the cluster resource to which the target resource belongs.
Different usage states of cluster resources correspond to different idle resources, and the device further comprises:
and the fourth processing unit 6 is configured to dynamically adjust the second resource class of the cluster resource according to the change condition of the idle resource.
The second processing unit 4 includes:
the fifth processing subunit 42 is configured to send the target resource to the request cluster according to the gateway IP address information of the request cluster.
The preset classification rule comprises the following steps:
the resources are divided into a plurality of resource categories according to the quantity of the resources, wherein the priority of the corresponding resource category is higher as the quantity of the resources is larger.
In this embodiment, by acquiring the idle resources of at least one cluster resource, where the idle resource of each cluster resource includes at least one idle resource node, and each idle resource node includes at least one idle sub-resource; classifying the idle sub-resources according to a preset classification rule and determining a third resource class of the idle sub-resources; determining a third resource category of the idle sub-resource with the lowest resource category priority as a first resource category of the corresponding idle resource node; determining a first resource category of the idle resource node with the highest resource category priority as a second resource category of the corresponding cluster resource; classifying the cluster resources according to the second resource category to obtain at least one type of cluster resources; acquiring a borrowing request sent by a request cluster, wherein the borrowing request is used for requesting to acquire at least one target resource from at least one cluster resource; determining a cluster resource distribution space to which the target resource belongs according to the borrowing request; determining cluster resources to which the target resources belong according to the cluster resource distribution space to which the target resources belong; and determining the target resource according to the cluster resource to which the target resource belongs, and returning the target resource to the request cluster. Determining a third resource class corresponding to the idle sub-resource with the lowest resource class priority as a first resource class corresponding to the corresponding idle resource node, wherein each idle resource in the idle resource node can be ensured to meet the classification requirement of the first resource class, and the resource class of the idle resource node can represent the resource class of all idle sub-resources; the first resource category corresponding to the idle resource node with the highest priority of the resource categories is determined to be the second resource category of the corresponding cluster resource, so that the second resource category of the cluster resource can be ensured to comprise the first resource categories of all idle nodes, and the cluster resource corresponding to the first resource category can not be fully utilized when the priority of the second resource category is smaller than that of a certain first resource category, thereby causing cluster resource waste; in addition, in the embodiment, the cluster resources participating in the cluster resource borrowing do not need to store the resource information of other cluster resources, so that the storage cost is low, the cluster resources are scattered in each cluster, the problem of single-point faults is avoided, and meanwhile, the borrowing request is processed in a plurality of cluster resource distribution spaces, the processing efficiency is high, and the processing is timely.
According to embodiments of the present application, an electronic device and a readable storage medium are also provided.
As shown in fig. 5, a block diagram of an electronic device is provided that is a method for cluster resource allocation processing according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the application described and/or claimed herein.
As shown in fig. 5, the electronic device includes: one or more processors 501, memory 502, and interfaces for connecting components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In other embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple electronic devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 501 is illustrated in fig. 5.
Memory 502 is a non-transitory computer readable storage medium provided herein. The memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method of cluster resource allocation processing provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the method of cluster resource allocation processing provided by the present application.
The memory 502 is used as a non-transitory computer readable storage medium, and may be used to store a non-transitory software program, a non-transitory computer executable program, and modules, such as program instructions/modules (e.g., the acquisition unit 1, the first processing unit 2, and the second processing unit 3 shown in fig. 3) corresponding to a method of cluster resource allocation processing in an embodiment of the present application. The processor 501 executes various functional applications of the server and data processing, i.e., a method of implementing the cluster resource allocation process in the above-described method embodiment, by running non-transitory software programs, instructions, and modules stored in the memory 502.
Memory 502 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of the electronic device of the cluster resource allocation process, and the like. In addition, memory 502 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 502 may optionally include memory located remotely from processor 501, which may be connected to the electronic devices of the cluster resource allocation process via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the method for cluster resource allocation processing may further include: an input device 503 and an output device 504. The processor 501, memory 502, input devices 503 and output devices 504 may be connected by a bus or otherwise, for example in fig. 5.
The input device 503 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device of the cluster resource allocation process, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer stick, one or more mouse buttons, a track ball, a joystick, etc. input devices. The output devices 504 may include a display device, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASIC (application specific integrated circuit), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
These computing programs (also referred to as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented in a high-level procedural and/or object-oriented programming language, and/or in assembly/machine language. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
The principles and beneficial effects of the cluster resource allocation processing system provided in this embodiment are described with reference to the principles and beneficial effects of the cluster resource allocation processing method in fig. 1-2, and are not repeated.
The embodiment of the application also provides a method for cluster resource allocation processing, which comprises the following steps: receiving an image searching instruction, determining an image group matched with the image to be searched based on the image to be searched in the image searching instruction, and displaying the image group; the image to be searched comprises at least one first image main body, and the first image main body can be any one or more of the following: text, graphics, and electronic images.
The principles and beneficial effects of the cluster resource allocation processing method provided in this embodiment are described with reference to the principles and beneficial effects of the cluster resource allocation processing method in fig. 1-2, and are not repeated.
In the embodiments of the present application, the foregoing embodiments may be referred to and referred to each other, and the same or similar steps and terms are not repeated herein.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions disclosed in the present application can be achieved, and are not limited herein.
The above embodiments do not limit the scope of the application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (16)

1. The cluster resource allocation processing method is characterized by comprising the following steps of:
acquiring idle resources of at least one cluster resource;
classifying the cluster resources according to the idle resources and a preset classification rule to obtain at least one type of cluster resources;
acquiring a borrowing request sent by a request cluster, wherein the borrowing request is used for requesting to acquire at least one target resource from at least one cluster resource;
inquiring the target resource in the at least one cluster resource according to the borrowing request, and returning the target resource to the request cluster;
the idle resources comprise at least one idle resource node, the cluster resources are classified according to the idle resources and a preset classification rule to obtain at least one type of cluster resources, and the method comprises the following steps:
classifying the idle resource nodes according to preset classification rules and determining a first resource category of the idle resource nodes;
determining a first resource category of the idle resource node with the highest resource category priority as a second resource category of the corresponding cluster resource;
and classifying the cluster resources according to the second resource category to obtain at least one type of cluster resources.
2. The method of claim 1, wherein the idle resource node includes at least one idle sub-resource, and wherein the classifying the idle resource node according to the idle resource node and a preset classification rule to determine the first resource class of the idle resource node includes:
classifying the idle sub-resources according to the idle sub-resources and a preset classification rule, and determining a third resource category of the idle sub-resources;
and determining a third resource category of the idle sub-resource with the lowest resource category priority as a first resource category of a corresponding idle resource node.
3. The method of claim 1, wherein after obtaining at least one type of cluster resource, the method further comprises:
constructing at least one cluster resource distribution space according to the at least one cluster resource, wherein each cluster resource distribution space comprises one cluster resource;
according to the borrowing request, querying the target resource in the at least one cluster resource comprises:
and inquiring the target resource in the at least one cluster resource distribution space according to the borrowing request.
4. A method according to claim 3, wherein querying the target resource in the at least one clustered resource distribution space in accordance with the borrowing request comprises:
determining a cluster resource distribution space to which the target resource belongs according to the borrowing request;
determining cluster resources to which the target resources belong according to the cluster resource distribution space to which the target resources belong;
and determining the target resource according to the cluster resource to which the target resource belongs.
5. The method of any of claims 1-4, wherein different usage states of the cluster resources correspond to different free resources, the method further comprising:
and dynamically adjusting the second resource category of the cluster resource according to the change condition of the idle resource.
6. The method of any of claims 1-4, wherein the returning the target resource to the request cluster comprises:
and sending the target resource to the request cluster according to the gateway IP address information of the request cluster.
7. The method of any one of claims 1-4, wherein the preset classification rule comprises:
And dividing the resources into a plurality of resource categories according to the quantity of the resources, wherein the higher the quantity of the resources is, the higher the priority of the corresponding resource category is.
8. A cluster resource allocation processing device, comprising:
the first acquisition unit is used for acquiring idle resources of at least one cluster resource;
the first processing unit is used for classifying the cluster resources according to the idle resources and a preset classification rule to obtain at least one type of cluster resources;
the second acquisition unit is used for acquiring a borrowing request sent by a request cluster, wherein the borrowing request is used for requesting to acquire at least one target resource from the at least one cluster resource;
the second processing unit is used for inquiring the target resource in the at least one cluster resource according to the borrowing request and returning the target resource to the request cluster;
the free resources comprise at least one free resource node, and the first processing unit comprises:
the first processing subunit is used for classifying the idle resource nodes according to the idle resource nodes and a preset classification rule, and determining a first resource category of the idle resource nodes;
A second processing subunit, configured to determine, as a second resource class of the corresponding cluster resource, a first resource class of the idle resource node with a highest resource class priority;
and the third processing subunit is used for classifying the cluster resources according to the second resource category to obtain at least one type of cluster resources.
9. The apparatus of claim 8, wherein the free resource node comprises at least one free sub-resource, the first processing sub-unit comprising:
the first processing module is used for classifying the idle sub-resources according to the idle sub-resources and a preset classification rule, and determining a third resource category of the idle sub-resources;
and the second processing module is used for determining the third resource category of the idle sub-resource with the lowest resource category priority as the first resource category of the corresponding idle resource node.
10. The apparatus of claim 8, wherein the apparatus further comprises:
the third processing unit is used for constructing at least one cluster resource distribution space according to the at least one cluster resource, wherein each cluster resource distribution space comprises one cluster resource;
The second processing unit includes:
and the fourth processing subunit is used for inquiring the target resource in the at least one cluster resource distribution space according to the borrowing request.
11. The apparatus of claim 10, wherein the fourth processing subunit comprises:
the third processing module is used for determining a cluster resource distribution space to which the target resource belongs according to the borrowing request;
a fourth processing module, configured to determine, according to a cluster resource distribution space to which the target resource belongs, a cluster resource to which the target resource belongs;
and the fifth processing module is used for determining the target resource according to the cluster resource to which the target resource belongs.
12. The apparatus according to any of claims 8-11, wherein different usage states of the cluster resources correspond to different free resources, the apparatus further comprising:
and the fourth processing unit is used for dynamically adjusting the second resource category of the cluster resource according to the change condition of the idle resource.
13. The apparatus according to any one of claims 8-11, wherein the second processing unit comprises:
and the fifth processing subunit is used for sending the target resource to the request cluster according to the gateway IP address information of the request cluster.
14. The apparatus according to any one of claims 8-11, wherein the preset classification rule comprises:
and dividing the resources into a plurality of resource categories according to the quantity of the resources, wherein the higher the quantity of the resources is, the higher the priority of the corresponding resource category is.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-7.
CN201911376966.4A 2019-12-27 2019-12-27 Cluster resource allocation processing method, device, equipment and storage medium Active CN111158909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911376966.4A CN111158909B (en) 2019-12-27 2019-12-27 Cluster resource allocation processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911376966.4A CN111158909B (en) 2019-12-27 2019-12-27 Cluster resource allocation processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111158909A CN111158909A (en) 2020-05-15
CN111158909B true CN111158909B (en) 2023-07-25

Family

ID=70558575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911376966.4A Active CN111158909B (en) 2019-12-27 2019-12-27 Cluster resource allocation processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111158909B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111597024B (en) * 2020-05-14 2022-02-18 科东(广州)软件科技有限公司 Cross-domain cluster processing method and device, electronic equipment and storage medium
CN111858041B (en) * 2020-07-10 2023-06-30 中国联合网络通信集团有限公司 Data processing method and server
CN112099952A (en) * 2020-09-16 2020-12-18 亚信科技(中国)有限公司 Resource scheduling method and device, electronic equipment and storage medium
CN113806097A (en) * 2021-09-29 2021-12-17 杭州网易云音乐科技有限公司 Data processing method and device, electronic equipment and storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739292A (en) * 2009-12-04 2010-06-16 曙光信息产业(北京)有限公司 Application characteristic-based isomeric group operation self-adapting dispatching method and system
CN101819540A (en) * 2009-02-27 2010-09-01 国际商业机器公司 Method and system for scheduling task in cluster
CN103176849A (en) * 2013-03-12 2013-06-26 浙江大学 Virtual machine clustering deployment method based on resource classification
CN103207814A (en) * 2012-12-27 2013-07-17 北京仿真中心 Decentralized cross cluster resource management and task scheduling system and scheduling method
CN103235742A (en) * 2013-04-07 2013-08-07 山东大学 Dependency-based parallel task grouping scheduling method on multi-core cluster server
CN103513983A (en) * 2012-06-25 2014-01-15 国际商业机器公司 Method and system for predictive alert threshold determination tool
CN103677958A (en) * 2013-12-13 2014-03-26 华为技术有限公司 Virtualization cluster resource scheduling method and device
CN103870339A (en) * 2014-03-06 2014-06-18 上海华为技术有限公司 Cluster resource allocation method and cluster resource allocation device
CN103970587A (en) * 2014-04-21 2014-08-06 华为技术有限公司 Resource scheduling method, device and system
CN105528054A (en) * 2015-12-25 2016-04-27 珠海国芯云科技有限公司 Cluster system comprehensive scheduling energy saving method and device
CN107621973A (en) * 2016-07-13 2018-01-23 阿里巴巴集团控股有限公司 A kind of method for scheduling task and device across cluster
CN107801086A (en) * 2017-10-20 2018-03-13 广东省南方数字电视无线传播有限公司 The dispatching method and system of more caching servers
CN110022337A (en) * 2018-01-09 2019-07-16 阿里巴巴集团控股有限公司 Resource regulating method, device, equipment and system
CN110389836A (en) * 2019-07-17 2019-10-29 腾讯科技(深圳)有限公司 A kind of more cluster management methods, device, server and storage medium
CN110389873A (en) * 2018-04-17 2019-10-29 北京京东尚科信息技术有限公司 A kind of method and apparatus of determining server resource service condition

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101819540A (en) * 2009-02-27 2010-09-01 国际商业机器公司 Method and system for scheduling task in cluster
CN101739292A (en) * 2009-12-04 2010-06-16 曙光信息产业(北京)有限公司 Application characteristic-based isomeric group operation self-adapting dispatching method and system
CN103513983A (en) * 2012-06-25 2014-01-15 国际商业机器公司 Method and system for predictive alert threshold determination tool
CN103207814A (en) * 2012-12-27 2013-07-17 北京仿真中心 Decentralized cross cluster resource management and task scheduling system and scheduling method
CN103176849A (en) * 2013-03-12 2013-06-26 浙江大学 Virtual machine clustering deployment method based on resource classification
CN103235742A (en) * 2013-04-07 2013-08-07 山东大学 Dependency-based parallel task grouping scheduling method on multi-core cluster server
CN103677958A (en) * 2013-12-13 2014-03-26 华为技术有限公司 Virtualization cluster resource scheduling method and device
CN103870339A (en) * 2014-03-06 2014-06-18 上海华为技术有限公司 Cluster resource allocation method and cluster resource allocation device
CN103970587A (en) * 2014-04-21 2014-08-06 华为技术有限公司 Resource scheduling method, device and system
CN105528054A (en) * 2015-12-25 2016-04-27 珠海国芯云科技有限公司 Cluster system comprehensive scheduling energy saving method and device
CN107621973A (en) * 2016-07-13 2018-01-23 阿里巴巴集团控股有限公司 A kind of method for scheduling task and device across cluster
CN107801086A (en) * 2017-10-20 2018-03-13 广东省南方数字电视无线传播有限公司 The dispatching method and system of more caching servers
CN110022337A (en) * 2018-01-09 2019-07-16 阿里巴巴集团控股有限公司 Resource regulating method, device, equipment and system
CN110389873A (en) * 2018-04-17 2019-10-29 北京京东尚科信息技术有限公司 A kind of method and apparatus of determining server resource service condition
CN110389836A (en) * 2019-07-17 2019-10-29 腾讯科技(深圳)有限公司 A kind of more cluster management methods, device, server and storage medium

Also Published As

Publication number Publication date
CN111158909A (en) 2020-05-15

Similar Documents

Publication Publication Date Title
CN111158909B (en) Cluster resource allocation processing method, device, equipment and storage medium
KR102549821B1 (en) Server resource allocation method, device, electronic equipment and storage medium
CN111694646B (en) Resource scheduling method, device, electronic equipment and computer readable storage medium
TWI430102B (en) Network adapter resources allocating method,storage medium,and computer
CN108431796B (en) Distributed resource management system and method
CN109729106B (en) Method, system and computer program product for processing computing tasks
US10554782B2 (en) Agile hostpool allocator
US8874751B2 (en) Candidate set solver with user advice
US9256506B1 (en) System and method for performing operations on target servers
CN111259205B (en) Graph database traversal method, device, equipment and storage medium
TW202246977A (en) Task scheduling method and apparatus, computer device and storage medium
US10437645B2 (en) Scheduling of micro-service instances
CN106790332B (en) Resource scheduling method, system and main node
US9218198B2 (en) Method and system for specifying the layout of computer system resources
CN111078516A (en) Distributed performance test method and device and electronic equipment
US11755354B2 (en) NUMA-aware resource allocation and placement of database containers
US11947534B2 (en) Connection pools for parallel processing applications accessing distributed databases
CN111418187A (en) Scalable statistics and analysis mechanism in cloud networks
CN109002364A (en) Optimization method, electronic device and the readable storage medium storing program for executing of interprocess communication
EP4109261A2 (en) Access processing method, device, storage medium and program product
Yang et al. Joint optimization of mapreduce scheduling and network policy in hierarchical clouds
CN112912850A (en) Simulation system and method using query-based interests
CN102843424A (en) Heterogeneous distributed cloud computing system and method
Liu et al. A task scheduling method based on online algorithm in cloud computing environment
WO2023169408A1 (en) Resource scheduling method, apparatus, and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant