A resource allocation method, device and equipment

By determining the number of resources in resource allocation and selecting the resources of the corresponding available rack group, the problem of slow resource allocation process in the prior art is solved, and more efficient resource allocation and time savings are achieved.

CN110287025BActive Publication Date: 2025-06-24WEBANK (CHINA)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201910532166.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-19
Publication Date
2025-06-24
Estimated Expiration
2039-06-19

AI Technical Summary

Technical Problem

In the prior art, resource allocation process is slow, resulting in wasted time.

Method used

By determining the number of resources required, if the number is not greater than the number of available rack groups established by the cabling method TOR based on the data center, select available resources from the available rack groups with the same number of required resources for allocation, avoiding manual selection in the resource pool.

Benefits of technology

It improves the process of resource allocation, saves time, and reduces the necessity of manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110287025B_ABST
    Figure CN110287025B_ABST
Patent Text Reader

Abstract

The present invention discloses a resource allocation method, apparatus and device, which relate to the field of cloud computing in fintech, and are used to solve the problem that in the prior art, when resource allocation is performed, the resource allocation process is slow and time is wasted. The present invention first determines the required amount of resources. If it is determined that the required amount of resources is not greater than the number of available rack groups established based on TOR, then the same amount of available resources as the required amount of resources is selected from the available rack groups for allocation. Here, the available rack groups are the rack groups in which there are available resources. Since when it is determined that the required amount of resources is not greater than the number of available rack groups, the same amount of resources as the required amount of resources is selected from the rack groups for allocation, there is no need for manual selection of available resources in the resource pool, thereby improving the resource allocation process and saving time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cloud computing in financial technology (Fintech), and particularly relates to a resource allocation method, device, and equipment. Background Art

[0002] With the development of computer technology, more and more technologies are applied in the financial field, and traditional finance is gradually transforming into financial technology (Fintech). The same is true for cloud computing. Currently, in the field of cloud computing, many enterprises with large IT resources and software systems will deploy internal cloud computing environments in their own data centers. The most important technologies are virtualization and the resource pool management mode and technology that support virtualization. For example, the cloud computing environment uses KVM virtualization technology and adopts a traditional virtualization architecture solution at the IaaS (Infrastructure as a Service) layer. To ensure the stability and high availability of the system, the current application high-availability rules are as follows:

[0003] I. Original Application High-Availability Rules

[0004] 1. The number of instances of the core subsystems (Category A, B1) is not less than 3, and the number of instances of non-core subsystems is not less than 2;

[0005] 2. For a subsystem, the number of instances deployed in a single DCN is at least on two different cabinets.

[0006] II. Application High-Availability Rules in Multi-Active in Multiple Metropolitan Area Data Centers

[0007] 1. The number of IDCs (Internet Data Centers) in which the instances of a type of subsystem are deployed is not less than 2;

[0008] 2. For important subsystems (Category A, B1, B2), the number of instances within a single DCN (Data Center Node) is not less than 2;

[0009] 3. For important subsystems (Category A, B1, B2), the number of instances within a single DCN is at least deployed on two different cabinets.

[0010] In the existing solution, the host resource allocation includes physical host and virtual host allocation. First, according to the requirements of the resource requester, unallocated machines are screened from the CMDB according to the physical region, and a series of operations such as physical machine deployment, mother machine placement, and virtualization are performed to form a resource pool. Then, resources that meet the above two high-availability rules are manually selected from the resource pool. Finally, information such as DCN and application domain is allocated according to the subsystem and delivered to the resource requester.

[0011] Since manual selection of resources is required during resource allocation, the resource allocation process is slow and time-consuming. Summary of the Invention

[0012] The present invention provides a resource allocation method, apparatus, and device to solve the problem in the prior art that during resource allocation, the resource allocation process is slow and time-consuming.

[0013] In a first aspect, an embodiment of the present invention provides a resource allocation method, which includes:

[0014] Determine the quantity of resources required;

[0015] If the quantity of resources required is not greater than the number of available rack groups established based on the TOR cabling method of the data center, select available resources equal in number to the quantity of resources required from the available rack groups for allocation, where the available rack groups are those in which there are available resources in the rack group.

[0016] In the above method, first determine the quantity of resources required. If it is determined that the quantity of resources required is not greater than the number of available rack groups established based on TOR, then select available resources equal in number to the quantity of resources required from the available rack groups for allocation. Here, the available rack groups are those in which there are available resources in the rack group. Since when it is determined that the quantity of resources required is not greater than the number of available rack groups, resources equal in number to the quantity of resources required are selected from the rack group for allocation, there is no need for manual selection of available resources from the resource pool, improving the resource allocation process and saving time.

[0017] In a possible implementation, after determining the quantity of resources required, it further includes:

[0018] If the resources required are physical host resources and the quantity of resources required is greater than the number of available rack groups, then repeatedly allocate the available resources of at least one available rack group in the available rack groups;

[0019] If the resources required are virtual host resources and the quantity of resources required is greater than the number of available rack groups and not greater than the number of available physical hosts in the service system corresponding to the resources required, then select available resources equal in number to the quantity of resources required from the number of available physical hosts in the service system for allocation.

[0020] In the above method, after determining the quantity of resources required, depending on the different types of resources needed, the processing methods are also different. If the required resources are physical host resources and the quantity of required resources is greater than the number of available rack groups, then the available resources of at least one available rack group in the rack group are redistributed. If the required resources are virtual host resources and the quantity of required resources is greater than the number of available rack groups and not greater than the number of available physical hosts of the business system corresponding to the required resources, then available resources equal in quantity to the required resources are selected from the available physical hosts of this business system for allocation.

[0021] In a possible implementation manner, when the required resources are virtual host resources, if the quantity of required resources is greater than the number of available rack groups, it further includes:

[0022] If the quantity of required resources is greater than the quantity of available resources in the business system corresponding to the required resources, then no resource allocation is performed.

[0023] In the above method, if the required resources are virtual host resources, and the quantity of required resources is greater than the number of available rack groups and greater than the quantity of available resources in the business system corresponding to the required resources, then an exception prompt is given indicating that there are not enough available resources and resource allocation cannot be performed.

[0024] In a possible implementation manner, the required resources are physical host resources;

[0025] The selecting of available resources equal in quantity to the required resources from the available rack groups for allocation includes:

[0026] Selecting available rack groups with a small resource utilization rate and equal in quantity to the required resources from the available rack groups;

[0027] For one available rack group with a small resource utilization rate, selecting one available physical machine SN and IP address from the available rack group with a small resource utilization rate;

[0028] Sending the selected one available physical machine SN and IP address to the terminal where the user is located.

[0029] The above method shows how to select available resources equal in quantity to the required resources from the available rack groups for allocation when the required resources are physical host resources.

[0030] In a possible implementation manner, the required resources are virtual host resources;

[0031] The selecting of available resources equal in quantity to the required resources from the available rack groups for allocation includes:

[0032] Select an available rack group with a small resource utilization rate and the same number of resources as the required resources from the available rack groups;

[0033] Select IP addresses with the same number of resources as the required resources from the available rack groups with a small resource utilization rate, and select resource names from the available rack groups with a small resource utilization rate;

[0034] Determine the master machine SN and virtual host IP address corresponding to the virtual host according to the IP address and the resource name;

[0035] Send the master machine SN and virtual host IP address to the user's terminal.

[0036] The above method shows how to select available resources with the same number of resources as the required resources from available rack groups when the required resources are virtual host resources for allocation.

[0037] In a second aspect, an embodiment of the present invention provides a resource allocation device, and the device includes:

[0038] A determination module, configured to determine the number of required resources;

[0039] An allocation module, if the number of required resources is not greater than the number of available rack groups established based on the TOR wiring method of the data center, is configured to select available resources with the same number of resources as the required resources from the available rack groups for allocation, where the available rack groups are rack groups with available resources in the rack groups.

[0040] In a possible implementation manner, the allocation module is further configured to:

[0041] After determining the number of required resources, if the required resources are physical host resources and the number of required resources is greater than the number of available rack groups, the available resources of at least one available rack group in the available rack groups are re-allocated;

[0042] If the required resources are virtual host resources, and the number of required resources is greater than the number of available rack groups and the number of required resources is not greater than the number of available physical hosts in the service system corresponding to the required resources, select available resources with the same number of resources as the required resources from the number of available physical hosts in the service system for allocation.

[0043] In a possible implementation manner, the allocation module is further configured to:

[0044] The required resources are virtual host resources. If the number of required resources is greater than the number of available rack groups, or if the number of required resources is greater than the number of available resources in the business system corresponding to the required resources, resource allocation is not performed.

[0045] In a possible implementation, the required resources are physical host resources, and the allocation module is specifically configured to:

[0046] Select, from the available rack groups, the available rack groups with a small resource utilization rate and the same number as the required resources;

[0047] For an available rack group with a small resource utilization rate, select an available physical machine SN and IP address from the available rack group with a small resource utilization rate;

[0048] Send the selected available physical machine SN and IP address to the terminal where the user is located.

[0049] In a possible implementation, the required resources are virtual host resources; the allocation module is specifically configured to:

[0050] Select, from the available rack groups, the available rack groups with a small resource utilization rate and the same number as the required resources;

[0051] Select IP addresses with the same number as the required resources from the available rack groups with a small resource utilization rate, and select resource names from the available rack groups with a small resource utilization rate;

[0052] Determine the mother machine SN and virtual host IP address corresponding to the virtual host according to the IP address and the resource name;

[0053] Send the mother machine SN and virtual host IP address to the terminal where the user is located.

[0054] In a third aspect, an embodiment of the present invention provides another resource allocation device, and the device includes:

[0055] A memory and a processor;

[0056] The memory is used to store program instructions;

[0057] The processor is used to call the program instructions stored in the memory and execute the method according to any one of the first aspects according to the obtained program.

[0058] In a fourth aspect, an embodiment of the present invention further provides that the computer-readable storage medium stores computer instructions, and when the computer instructions run on a computer, the computer is caused to execute the method according to any one of the first aspects.

[0059] In addition, for the technical effects brought by any of the implementation manners in the second to fourth aspects, reference may be made to the technical effects brought by different implementation manners in the first aspect, which will not be elaborated herein.

[0060] These aspects or other aspects of the present invention will be more clearly understood in the following description of the embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings according to these drawings without creative efforts.

[0062] Figure 1 This embodiment of the present invention provides a method for resource allocation;

[0063] Figure 2 This is a schematic diagram of the physical host resource allocation process provided by the embodiment of the present invention;

[0064] Figure 3 This is a schematic diagram of the virtual host resource allocation process provided by the embodiment of the present invention;

[0065] Figure 4 This is a schematic diagram of the structure of the first resource allocation device provided by the embodiment of the present invention;

[0066] Figure 5 This is a schematic diagram of the structure of the second resource allocation device provided by the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0067] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the drawings. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.

[0068] This application embodiment provides a resource allocation method, device and equipment to solve the problem of slow resource allocation process and wasted time in resource allocation in the prior art. Among them, the method and the device are based on the same inventive concept. Since the principles of the method and the device for solving problems are similar, the implementation of the device and the method can be referred to each other, and the repeated parts will not be elaborated.

[0069] Hereinafter, some terms used in this application are explained to facilitate the understanding of those skilled in the art.

[0070] 1)、IaaS: Infrastructure as a Service, which is the bottom layer of cloud services and mainly provides some basic resources.

[0071] 2)、ToR: Top of Rack, which is a cabling method for data centers, that is, an access switch is installed at the top of a standard 42U server cabinet.

[0072] 3)、RACK: A unified standard for data center construction, with a width of 19 inches as the standard, and the height is usually expressed in "U" numbers (1U = 4.445 cm), and a single cabinet has a standard height of 42U.

[0073] 4)、KVM: Short for Kernel-based Virtual Machine, which is an open-source system virtualization module and is based on hardware full virtualization technology.

[0074] 5)、VM: A virtual machine (Virtual Machine) refers to a complete computer system that is simulated by software with complete hardware system functions and runs in a completely isolated environment.

[0075] 6)、SystemID: Refers to the application system number, and each business system has a unique system ID.

[0076] 7)、DCN: Data Center Node, which is a logical concept in the application system architecture, does not represent an actual physical data center, but the same DCN must belong to only one physical data center.

[0077] 8)、AppDomain: Application Domain, a logical concept, the domain to which the application belongs.

[0078] 9)、Hostname: The host name, used to display or set the host name of the system.

[0079] 10)、OpenStack: An open-source cloud computing management platform project, which is composed of several main components to complete specific tasks. OpenStack supports almost all types of cloud environments, and the project goal is to provide a cloud computing management platform that is simple to implement, can be scaled up massively, rich, and has a unified standard. OpenStack provides an Infrastructure as a Service (IaaS) solution through various complementary services, and each service provides an API for integration.

[0080] 11)、AZ: Availability Zone, the available zone. Briefly speaking, an AZ can be understood as a set of some hosts. In OpenStack, the AZ function has been integrated into the Nova and Cinder modules before the Mitaka version. In the Nova module, when a user creates a virtual machine, they can specify an AZ, and then the virtual machine will be generated on the hosts included in this AZ. In the Cinder module, a user can specify an AZ when creating a volume, and then the volume will obtain storage allocation from the hosts included in the specified AZ.

[0081] 12)、Affinity Group: OpenStack affinity group, which ensures that instances are on the same or different hypervisor hosts.

[0082] 13)、Image: Image, referring to the system image.

[0083] 14)、SN: Serial Number, the product serial number. The product serial number is a concept introduced to verify the "legal identity of the product". It is used to protect the legitimate rights and interests of users and enable them to enjoy legal services. A set of genuine products corresponds to only one set of product serial numbers.

[0084] 15)、CMDB: Configuration Management Database. The CMDB stores and manages various configuration information of devices in the enterprise IT architecture. It is closely associated with all service support and service delivery processes, supports the operation of these processes, realizes the value of configuration information, and at the same time depends on relevant processes to ensure the accuracy of data.

[0085] 16)、ITSM: IT Service Management. IT service management is a set of methods that help enterprises effectively manage the planning, R & D, implementation, and operation of IT systems. It is a set of methodologies. In this article, it generally refers to the ITSM management platform.

[0086] In addition, it should be noted that in this application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent any of the following subsequent situations: a, b, c, d and b, a and c, b and c, a and b and c.

[0087] With the rapid expansion of business, the scale of the data center has gradually increased, and the demand for business application resources has become more frequent. Scenarios such as new project launches, server migrations, server out-of-warranty periods, and hardware failures that require rapid addition or replacement of nodes have gradually increased. Currently, in the process of resource allocation, from resource application to resource allocation, there is a lot of manual intervention throughout the process. As a result, the resource allocation and delivery process is slow. Moreover, when manual intervention occurs, personnel do not have a macroscopic understanding of the resource utilization situation, so it may lead to unbalanced resource utilization, increasing the security risks for the stable operation of applications. Such security risks will result in low security for banking operations (loan operations, deposit operations, or other financial operations), which does not meet the regulatory requirements of financial institutions such as banks.

[0088] If there is no need for personnel to participate from resource application to resource allocation and full automation is achieved, the process of resource allocation will be improved.

[0089] The application scenarios described in the embodiments of the present invention are for more clearly explaining the technical solutions of the embodiments of the present invention and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Those of ordinary skill in the art know that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are equally applicable to similar technical problems.

[0090] For the above application scenarios, the embodiments of the present invention provide a method for resource allocation, as Figure 1 shown. The method specifically includes the following steps:

[0091] S100, determining the required amount of resources;

[0092] S101, if the required amount of resources is not greater than the number of available rack groups established based on the TOR wiring method of the data center, select available resources equal to the required amount of resources from the available rack groups for allocation, where the available rack groups are the rack groups in which there are available resources.

[0093] In the embodiments of the present invention, first, the required number of resources is determined. If it is determined that the required number of resources is not greater than the number of available rack groups established based on TOR, then the same number of available resources as the required number of resources is selected from these available rack groups for allocation. Here, the available rack groups are the rack groups in which there are available resources. Since when it is determined that the required number of resources is not greater than the number of available rack groups, the same number of resources as the required number of resources is selected from this rack group for allocation, there is no need for manual selection of available resources in the resource pool, which improves the process of resource allocation and saves time.

[0094] When a resource requester needs resources, a resource request message will be sent. The resource request message will carry the required resources and the required number of resources, such as information like DCN, Appdomain, SystemId, Image, physical area, machine model, number of instances, etc. Then, the required resources and the required number of resources are determined from the resource request message.

[0095] Among them, the physical area refers to the divided physical regions, such as the management area, the external connection area, the server cluster area, etc.; the machine model can create corresponding resources according to the requirements of the business. Some business requirements have corresponding requirements for the machine model and Image.

[0096] It should be noted that the resources here can be physical host resources, virtual host resources, or a combination of physical host resources and virtual host resources.

[0097] For example, resource requester A sends a resource request message, and the resources determined in the resource request message are 5 physical host resources and 3 virtual host resources required.

[0098] After determining the required number of resources, the required number of resources is compared with the number of available rack groups established based on TOR. If the required number of resources is not greater than the number of available rack groups, then the same number of available resources as the required number of resources is selected from the available rack groups for allocation. Here, the available rack groups are the rack groups in which there are available resources.

[0099] The required number of resources here is the same as the subsequent number of instances, both representing the number of resources required by the resource requester.

[0100] It should be noted that two racks form a rack group. A conventional rack is 42U with 21 bays, and a conventional physical host is 2U. Therefore, a rack can hold at most 21 physical hosts, and a rack group can have at most 42 physical hosts.

[0101] If a physical host is occupied, it cannot be allocated again. If there are 42 physical hosts in a rack group and at least one physical host is unoccupied, it means that the rack group is an available rack group.

[0102] When comparing the quantity of required resources with the quantity of available rack groups, if the quantity of required resources is not greater than the quantity of available rack groups established based on TOR, select the same quantity of available resources as the required resources from the available rack groups for allocation. The following separately explains the cases where the required resources are physical host resources and virtual host resources.

[0103] Case 1: The required resources are physical host resources.

[0104] First, select from the available rack groups the available rack group with a small resource utilization rate and the same quantity as the required resources. Then, for an available rack group with a small resource utilization rate, select an available physical machine SN and IP address from the available rack group with a small resource utilization rate. Finally, send the selected available physical machine SN and IP address to the user's terminal.

[0105] Among them, the resource utilization rate of the available rack group, that is, under this rack group, the ratio of the number of unoccupied physical hosts to the total number of physical hosts, and the result is the resource utilization rate of this available rack group.

[0106] For example, there are 42 physical hosts under rack group 1, and 21 of them are occupied, then the resource utilization rate of rack group 1 is 50%.

[0107] To select from the available rack groups the available rack group with a small resource utilization rate and the same quantity as the required resources, it is possible to calculate the resource utilization rates of all available rack groups, and then select from all rack groups the available rack group with a small resource utilization rate and the same quantity as the required resources.

[0108] For example, there are 5 available rack groups, namely available rack group 1, available rack group 2, available rack group 3, available rack group 4, and available rack group 5. Calculate the resource utilization rate of each available rack group respectively. The resource utilization rate of available rack group 1 is 10%, the resource utilization rate of available rack group 2 is 15%, the resource utilization rate of available rack group 3 is 30%, the resource utilization rate of available rack group 4 is 35%, and the resource utilization rate of available rack group 5 is 50. If the quantity of required resources is 2, then select 2 available rack groups with a small resource utilization rate from the 5 available rack groups, namely available rack group 1 and available rack group 2.

[0109] After selecting an available rack group with a small resource utilization rate that is the same as the number of required resources, for an available rack group with a small resource utilization rate, select an available physical machine SN and IP address from this available rack group with a small resource utilization rate.

[0110] Selecting an available physical machine SN and IP address from an available rack group with a small resource utilization rate can be a random selection or can be selected according to a preset rule. This application does not limit this.

[0111] For example, if 2 available rack groups with a small resource utilization rate are selected, available rack group 1 and available rack group 2, there are 2 unoccupied physical hosts in available rack group 1, physical host 1 and physical host 2, and there are 3 unoccupied physical hosts in available rack group 2, physical host 3, physical host 4, and physical host 5. Select an available physical host SN and IP address from each selected available rack group. The selection method can be a random selection or can be selected according to a preset rule.

[0112] After selecting the physical machine SN and IP address, return the selected physical machine SN and IP address to the user's terminal.

[0113] Situation 2: The required resource is a virtual host resource.

[0114] Select an available rack group with a small resource utilization rate that is the same as the number of required resources from the available rack groups, select IP addresses that are the same as the number of required resources from the available rack groups with a small resource utilization rate, and select resource names from the available rack groups with a small resource utilization rate. Determine the mother machine SN and virtual host IP address corresponding to the virtual host according to the IP address and resource name; send the mother machine SN and virtual host IP address to the user's terminal.

[0115] Selecting an available rack group with a small resource utilization rate that is the same as the number of required resources from the available rack groups is the same as in Situation 1 and will not be repeated here.

[0116] Select IP addresses that are the same as the number of required resources from the available rack groups with a small resource utilization rate. It is possible to calculate the AZ of Openstack based on the rack group, that is, the set of unoccupied physical hosts, and then allocate IP addresses that are the same as the number of required resources from the IP address pool of the virtual network segment, and incrementally allocate physical host names according to the CMDB. Return the allocated IP addresses and physical host names to the user.

[0117] It should be noted that the creation rule of the host name can be: CN + city + IDC + number. For example, the first host name created using the rule engine is CNSZFT05010001, the second host name is CNSZFT05010002, and so on. Among them, CN represents China, SZ represents Shenzhen, FT represents a certain IDC room 0501, and 0001 represents the number.

[0118] The above is the description of resource allocation when the quantity of required resources is not greater than the quantity of available rack groups. If the quantity of required resources is greater than the quantity of available rack groups, it means that the rack groups cannot meet the required resources. If the required resources are physical host resources, then the available resources of at least one of the available rack groups in the available rack groups can be repeatedly allocated.

[0119] The following is an example of the case where the required resources are physical host resources.

[0120] For example, the quantity of required physical host resources is 4, and the available rack groups are available rack group 1, available rack group 2, and available rack group 3. The quantity of required physical resources 4 is greater than the quantity of available rack groups 3. At this time, one available physical host can be randomly selected from available rack group 1, one available physical host can be randomly selected from rack group 2, and two available physical hosts can be randomly selected from available rack group 3 for resource allocation. At this time, available rack group 3 has been repeatedly allocated.

[0121] If the required resources are virtual host resources, and the quantity of required resources is greater than the quantity of available rack groups and not greater than the quantity of available physical hosts of the business system corresponding to the required resources, then the same quantity of available resources as the quantity of required resources is selected from the available physical hosts of the business system for allocation.

[0122] In implementation, to select the same quantity of available resources as the quantity of required resources from the available physical hosts of the business system, the AZ of Openstack can be obtained based on the rack group, that is, the set of unoccupied physical hosts. Then, the same quantity of IP addresses as the quantity of required resources is allocated from the IP address pool of the virtual network segment, and the physical host name is incrementally allocated according to CMDB. The allocated IP addresses and physical host names are sent to the user's terminal.

[0123] Here, obtaining the AZ of Openstack based on the rack group can be a predefined rule created in advance when building Openstack, that is, there is a corresponding relationship between the rack group and the AZ. After determining the rack group, the AZ can be determined according to the corresponding relationship;

[0124] The IP address pool of the virtual network can pre-create a virtual network segment when building Openstack, and the virtual network segment constitutes the IP address pool of the virtual network.

[0125] If the required resources are virtual host resources, and the number of required resources is greater than the number of available rack groups, and greater than the number of available resources in the business system corresponding to the required resources, it means that the existing resources cannot meet the required resources. Therefore, an exception prompt is displayed and resource allocation is not performed.

[0126] The following is illustrated with specific embodiments.

[0127] Embodiment 1: Physical host resource allocation.

[0128] As Figure 2 shown, it is a schematic diagram of the physical host resource allocation process provided by the embodiment of the present invention.

[0129] S200, determine the number of available rack groups in the current network CMDB;

[0130] S201, receive the ITSM resource application information submitted by the user;

[0131] S202, obtain the number of instances from the ITMS resource application information;

[0132] S203, determine whether the number of instances in the resource application information is less than the number of available rack groups in the current network. If so, execute S204; otherwise, execute S211;

[0133] S204, calculate the resource utilization rate of each available rack group;

[0134] S205, select the available rack groups with a small resource utilization rate and the same number as the number of instances from the available rack groups;

[0135] S206, select specific RACKs from each selected available rack group with a small resource utilization rate;

[0136] S207, filter the physical hosts in the specific positions from each available rack group;

[0137] S208, obtain the SN and IP addresses of the filtered physical hosts;

[0138] S209, pass the obtained SN and IP addresses to the physical machine management platform for allocation;

[0139] S210, synchronize the allocated SN and IP addresses to the CMDB;

[0140] S211, select at least one rack group for repeated allocation;

[0141] S212. Select a specific RACK from the available rack groups and execute S207.

[0142] Embodiment 2: Virtual host resource allocation.

[0143] As Figure 3 shown, it is a schematic diagram of the virtual host resource allocation process provided by the embodiment of the present invention.

[0144] S300. Determine the number of available rack groups in the existing network CMDB;

[0145] S301. Receive the ITSM resource application information submitted by the user;

[0146] S302. Obtain the number of instances N from the ITMS resource application information;

[0147] S303. Determine whether N is less than the number of available rack groups in the existing network. If so, execute S304; otherwise, execute S312;

[0148] S304. Calculate the resource utilization rate of each available rack group;

[0149] S305. Select N available rack groups with low resource utilization rates from the available rack groups;

[0150] S306. Establish an OpenStack AZ with N available rack groups with low utilization rates;

[0151] S307. Select N HOSTs from the AZ;

[0152] S308. Select N IP addresses from the IP address pool of the virtual network segment of the N HOSTs;

[0153] S309. Determine the Hostname according to the increment in the CMDB;

[0154] S310. Based on the Hostname and N IP addresses, determine the mother machine SN and the corresponding IP addresses;

[0155] S311. Synchronize the determined mother machine SN and the corresponding IP addresses to the CMDB;

[0156] S312. Form affinity groups with the available HOSTs in the available rack groups;

[0157] S313. Determine whether N is less than the number of HOSTs in the affinity group. If so, execute S314; otherwise, execute S316;

[0158] S314. Randomly select N HOSTs from the affinity group;

[0159] S315. Establish an AZ of OpenStack based on the available rack groups, and execute S307;

[0160] S316. Display the exception information and do not perform allocation.

[0161] Based on the same inventive concept, an embodiment of the present invention further provides a resource allocation device. Since this device corresponds to the device corresponding to the resource allocation method in the embodiment of the present invention, and the principle of this device to solve problems is similar to that of the method, the implementation of this device can refer to the implementation of the method, and the repeated parts will not be elaborated.

[0162] As Figure 4 shown, it is a schematic structural diagram of a resource allocation device provided by an embodiment of the present invention. The device includes: a determination module 400 and an allocation module 401:

[0163] The determination module 400 is configured to determine the required resource quantity;

[0164] The allocation module 401, if the required resource quantity is not greater than the number of available rack groups established based on the TOR wiring mode of the data center, is configured to select available resources equal to the required resource quantity from the available rack groups for allocation, where the available rack groups are the rack groups with available resources in the rack groups.

[0165] Optionally, the allocation module 401 is further configured to:

[0166] After determining the required resource quantity, if the required resource is a physical host resource and the required resource quantity is greater than the number of available rack groups, the available resources of at least one available rack group in the available rack groups are repeatedly allocated;

[0167] If the required resource is a virtual host resource, and the required resource quantity is greater than the number of available rack groups and the required resource quantity is not greater than the number of available physical hosts in the business system corresponding to the required resource, select available resources equal to the required resource quantity from the number of available physical hosts in the business system for allocation.

[0168] Optionally, the allocation module 401 is further configured to:

[0169] If the required resource is a virtual host resource and the required resource quantity is greater than the number of available rack groups, and if the required resource quantity is greater than the number of available resources in the business system corresponding to the required resource, no resource allocation is performed.

[0170] Optionally, when the required resource is a physical host resource, the allocation module 401 is specifically configured to:

[0171] Select, from the available rack groups, the available rack groups with low resource utilization rates and the same number of resources as the required resources;

[0172] For an available rack group with a low resource utilization rate, select an available physical machine SN and IP address from the available rack groups with low resource utilization rates;

[0173] Send the selected available physical machine SN and IP address to the terminal where the user is located.

[0174] Optionally, the required resource is a virtual host resource; the allocation module 401 is specifically configured to:

[0175] Select, from the available rack groups, the available rack groups with low resource utilization rates and the same number of resources as the required resources;

[0176] Select IP addresses with the same number of resources as the required resources from the available rack groups with low resource utilization rates, and select resource names from the available rack groups with low resource utilization rates;

[0177] Determine the mother machine SN and virtual host IP address corresponding to the virtual host according to the IP address and the resource name;

[0178] Send the mother machine SN and virtual host IP address to the terminal where the user is located.

[0179] Based on the same inventive concept, another resource allocation device is also provided in an embodiment of the present invention. Since this device corresponds to the device corresponding to the resource allocation method in the embodiment of the present invention, and the principle of solving problems by this device is similar to that of the method, the implementation of this device can refer to the implementation of the method, and the repeated parts will not be described again.

[0180] As Figure 5 shown, it is a schematic structural diagram of a resource allocation device provided by an embodiment of the present invention. The device 500 includes:

[0181] A communication interface 501, a memory 502, and a processor 503;

[0182] Among them, the processor 503 communicates with other devices through the communication interface 501. For example, the other devices can be the aforementioned external online translation tools. Among them, the communication interface 501 can provide a solution for the application programming interface.

[0183] The processor 503 can send the aforementioned translation parameters, etc. to the external online translation tool through the communication interface 501; the memory 502 is used to store program instructions; the processor 503 is used to call the program instructions stored in the memory 502 and execute the method in the above embodiment according to the obtained program.

[0184] In the embodiments of the present application, the processor may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field-programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

[0185] In the embodiments of the present application, the memory is used to store program instructions. The memory may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., or may also be a volatile memory, such as a random-access memory (RAM). The memory may also be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, for storing program instructions and / or data. In the embodiments of the present application, the specific connection medium between the above-mentioned communication interface, memory, and processor is not limited, such as a bus, and the bus may be divided into an address bus, a data bus, a control bus, etc.

[0186] Furthermore, an embodiment of the present invention also provides a readable storage medium for resource allocation, including program code, which, when the program code runs on a computing device, is used to cause the computing device to execute the steps of the resource allocation method.

[0187] The above describes the present application with reference to the block diagrams and / or flowcharts showing the methods, apparatuses (systems), and / or computer program products according to the embodiments of the present application. It should be understood that one block of the block diagrams and / or flowcharts and the combination of blocks of the block diagrams and / or flowcharts can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, and / or other programmable data processing devices to generate a machine, such that the instructions executed via the computer processor and / or other programmable data processing devices create a method for implementing the functions / actions specified in the blocks of the block diagrams and / or flowcharts.

[0188] Accordingly, the present application can also be implemented by hardware and / or software (including firmware, resident software, microcode, etc.). Further, the present application can take the form of a computer program product on a computer-usable or computer-readable storage medium, which has computer-usable or computer-readable program code implemented in the medium for use by or in connection with an instruction execution system. In the context of the present application, a computer-usable or computer-readable medium can be any medium that can contain, store, communicate, transmit, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.

[0189] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.

Claims

1. A resource allocation method, characterized in that, The method includes: Determining the quantity of resources required; If the quantity of resources required is not greater than the number of available rack groups established based on the TOR cabling method of the data center, selecting the same number of available resources as the quantity of resources required from the available rack groups for allocation, where the available rack groups are the rack groups with available resources in the rack groups; The selecting the same number of available resources as the quantity of resources required from the available rack groups for allocation includes: When the resources required are physical host resources, selecting the available rack groups with lower resource utilization rates and the same number as the quantity of resources required from the available rack groups. For an available rack group with a lower resource utilization rate, selecting an available physical machine serial number (SN) and network protocol IP address from the available rack group with a lower resource utilization rate, and sending the selected available physical machine SN and IP address to the user's terminal; When the resources required are virtual host resources, selecting the available rack groups with lower resource utilization rates and the same number as the quantity of resources required from the available rack groups, selecting the same number of IP addresses as the quantity of resources required from the available rack groups with lower resource utilization rates, and selecting resource names from the available rack groups with lower resource utilization rates. Determining the mother machine SN and virtual host IP corresponding to the virtual host according to the IP addresses and the resource names, and sending the mother machine SN and virtual host IP address to the user's terminal.

2. The method according to claim 1, characterized in that After determining the quantity of resources required, it further includes: When the resources required are physical host resources, if the quantity of resources required is greater than the number of available rack groups, reallocating the available resources of at least one available rack group in the available rack groups; When the resources required are virtual host resources, if the quantity of resources required is greater than the number of available rack groups and not greater than the number of available physical hosts of the service system corresponding to the resources required, selecting the same number of available resources as the quantity of resources required from the available physical hosts of the service system for allocation.

3. The method according to claim 2, wherein When the resources required are virtual host resources, if the quantity of resources required is greater than the number of available rack groups, it further includes: If the quantity of resources required is greater than the quantity of available resources in the service system corresponding to the resources required, no resource allocation is performed.

4. A resource allocation device, characterized in that, The device includes: A determination module for determining the quantity of resources required; An allocation module, if the quantity of resources required is not greater than the number of available rack groups established based on the TOR cabling method of the data center, for selecting the same number of available resources as the quantity of resources required from the available rack groups for allocation, where the available rack groups are the rack groups with available resources in the rack groups; Among them, the allocation module is specifically used for: The required resources are physical host resources. Select from the available rack groups the available rack groups with low resource utilization rate and the same number as the required resources. For an available rack group with low resource utilization rate, select an available physical machine SN and IP address from the available rack groups with low resource utilization rate, and send the selected available physical machine SN and IP address to the user's terminal. The required resources are virtual host resources. Select from the available rack groups the available rack groups with low resource utilization rate and the same number as the required resources. Select from the available rack groups with low resource utilization rate the IP addresses with the same number as the required resources, and select the resource names from the available rack groups with low resource utilization rate. Determine the mother machine SN and virtual host IP address corresponding to the virtual host according to the IP addresses and the resource names, and send the mother machine SN and virtual host IP address to the user's terminal.

5. The device according to claim 4, characterized in that, The allocation module is further configured to: After determining the quantity of required resources, when the required resources are physical host resources, if the quantity of required resources is greater than the quantity of available rack groups, reallocate the available resources of at least one available rack group in the available rack groups. When the required resources are virtual host resources, if the quantity of required resources is greater than the quantity of available rack groups and the quantity of required resources is not greater than the quantity of available physical hosts in the business system corresponding to the required resources, select the available resources with the same number as the quantity of required resources from the quantity of available physical hosts in the business system for allocation.

6. A resource allocation device, characterized in that, Including: A memory and a processor; The memory is used for storing program instructions; The processor is used for calling the program instructions stored in the memory and executing the method according to any one of claims 1 to 3 according to the obtained program.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and when the computer instructions run on a computer, the computer is caused to execute the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Multidimensional resource allocation in data centers

    US20180254999A1