WO2020253490A1 - 一种资源分配方法、装置及设备 - Google Patents

一种资源分配方法、装置及设备 Download PDF

Info

Publication number
WO2020253490A1
WO2020253490A1 PCT/CN2020/092740 CN2020092740W WO2020253490A1 WO 2020253490 A1 WO2020253490 A1 WO 2020253490A1 CN 2020092740 W CN2020092740 W CN 2020092740W WO 2020253490 A1 WO2020253490 A1 WO 2020253490A1
Authority
WO
WIPO (PCT)
Prior art keywords
resources
available
resource
rack group
available rack
Prior art date
Application number
PCT/CN2020/092740
Other languages
English (en)
French (fr)
Inventor
卢道和
饶俊明
刘生庆
龚洵峰
魏江鑫
杨耿丹
Original Assignee
深圳前海微众银行股份有限公司
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 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2020253490A1 publication Critical patent/WO2020253490A1/zh

Links

Images

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/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/504Resource capping

Definitions

  • the present invention relates to the field of cloud computing technology of financial technology (Fintech), and particularly relates to a resource allocation method, device and equipment.
  • the number of instances of core subsystems (A, B1) is not less than 3, and the number of instances of non-core subsystems is not less than 2;
  • the number of instances of a single DCN is deployed on at least two different cabinets.
  • IDC Internet Data Center, Internet Data Center
  • Important subsystems type A, B1, B2
  • the number of instances in a single DCN is not less than 2;
  • Important subsystems (Class A, B1, B2).
  • the number of instances in a single DCN is deployed in at least two different cabinets.
  • the host resource allocation in the existing solution includes the allocation of physical hosts and virtual hosts.
  • unallocated machines are screened from the CMDB according to the physical area, and a series of operations such as physical machine deployment, mother machine placement, and virtualization are performed.
  • a resource pool is formed, and resources that meet the above two high-availability rules are manually selected from the resource pool.
  • information such as DCN and application domains is allocated according to the subsystem and delivered to the resource demander.
  • the present invention provides a resource allocation method, device and equipment, which are used to solve the problem of slow resource allocation process and waste of time in the prior art when resource allocation is performed.
  • an embodiment of the present invention provides a resource allocation method, which includes:
  • the available resources with the same number of required resources are selected from the available rack groups for allocation, where
  • the available rack group is a rack group with available resources in the rack group.
  • the available rack group is a rack group with available resources in the rack group, because when it is determined that the number of required resources is not greater than the number of available rack groups, select the required resources from the rack group The same amount of resources are allocated, eliminating the need to manually select available resources in the resource pool, improving the process of resource allocation and saving time.
  • the method further includes:
  • the required resources are physical host resources, and if 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 group are repeatedly allocated;
  • the required resource is a virtual host resource. If the number of required resources is greater than the number of available rack groups, and is not greater than the number of available physical hosts in the business system corresponding to the required resource, then From the number of available physical hosts in the business system, the available resources that are the same as the required number of resources are selected for allocation.
  • the processing methods are different depending on the 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, then the rack The available resources of at least one available rack group in the group are repeatedly allocated; if the required resources are virtual host resources, and the number of required resources is greater than the number of available rack groups, and not greater than the available physical hosts of the business system corresponding to the required resources The number of available resources is selected from the available physical hosts of the business system with the same number of resources needed for allocation.
  • the required resources are virtual host resources, and if the number of required resources is greater than the number of available rack groups, the method further includes:
  • the required resource is a virtual host resource
  • the number of required resources is greater than the number of available rack groups, and is greater than the number of available resources in the business system corresponding to the required resources
  • an exception prompt will be made to indicate that the available resources are insufficient. Unable to allocate resources.
  • the required resources are physical host resources
  • the selecting from the available rack group the same amount of available resources as the required resources to allocate includes:
  • the above method shows how to select and allocate the same amount of available resources from the available rack group when the required resources are physical host resources.
  • the required resources are virtual host resources
  • the selecting from the available rack group the same amount of available resources as the required resources to allocate includes:
  • the SN of the parent machine and the IP address of the virtual host are sent to the terminal where the user is located.
  • the above method shows how to select and allocate the same amount of available resources from the available rack group when the required resources are virtual host resources.
  • an embodiment of the present invention provides a resource allocation device, which includes:
  • the allocation module if the number of required resources is not greater than the number of available rack groups established based on the data center wiring method TOR, then it is used to select from the available rack groups the same number of available resources as the required number of resources Resources are allocated, wherein the available rack group is a rack group for which there are available resources in the rack group.
  • the allocation module is further used to:
  • the required resources are physical host resources. If the number of required resources is greater than the number of available rack groups, at least one available rack group in the available rack group The available resources are repeatedly allocated;
  • the required resources are virtual host resources, if 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 business system corresponding to the required resources
  • the number of available resources is selected from the number of available physical hosts in the business system, which is the same as the required number of resources, for allocation.
  • the allocation module is further used to:
  • the required resource is a virtual host resource, if the number of required resources is greater than the number of available rack groups, and if the number of required resources is greater than the number of available resources in the business system corresponding to the required resources, Then no resource allocation is performed.
  • the required resources are physical host resources
  • the allocation module is specifically configured to:
  • the required resources are virtual host resources; the allocation module is specifically configured to:
  • the SN of the parent machine and the IP address of the virtual host are sent to the terminal where the user is located.
  • an embodiment of the present invention provides another resource allocation device, which includes:
  • Memory used to store program instructions
  • the processor is configured to call program instructions stored in the memory, and execute the method according to any one of the first aspects according to the obtained program.
  • an embodiment of the present invention also provides that the computer-readable storage medium stores computer instructions, and when the computer instructions run on a computer, the computer executes the method described in any one of the first aspects.
  • FIG. 1 is a method for resource allocation provided by an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a physical host resource allocation process provided by an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a virtual host resource allocation process provided by an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a first resource allocation device provided by an embodiment of the present invention.
  • Fig. 5 is a schematic structural diagram of a second resource allocation device provided by an embodiment of the present invention.
  • the embodiments of the present application provide a resource allocation method, device, and equipment, which are used to solve the problem of slow resource allocation process and waste of time in resource allocation in the prior art.
  • the method and the device are based on the same inventive concept. Since the principles of the method and the device to solve the problem are similar, the implementation of the device and the method can be referred to each other, and the repetition will not be repeated.
  • IaaS Infrastructure as a Service
  • infrastructure as a service is the bottom layer of cloud services and mainly provides some basic resources.
  • ToR Top of Rack, is a wiring method for data centers, which is to install an access switch on the top of a standard 42U server cabinet.
  • KVM Short for Kernel-based Virtual Machine, it is an open source system virtualization module based on hardware-based full virtualization technology.
  • VM Virtual Machine (Virtual Machine) refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment.
  • SystemID refers to the application system number, each business system has a unique system ID.
  • DCN Data Center Node, refers to a logical concept in the application system architecture. It does not represent the actual physical data center, but the same DCN must only belong to a certain physical data center.
  • AppDomain Application Domain, application domain, logical concept, domain to which the application belongs.
  • Hostname host name, used to display or set the host name of the system.
  • OpenStack is 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. The project goal is to provide a cloud computing management platform that is simple to implement, scalable, rich, and standardized. OpenStack provides infrastructure as a service (IaaS) solutions through a variety of complementary services, and each service provides APIs for integration.
  • IaaS infrastructure as a service
  • AZ Availability Zone
  • AZ can be understood simply as a collection of some hosts.
  • Nova and Cinder modules have integrated AZ functions before the Mitaka version.
  • the user can specify an AZ when creating a virtual machine, so that the virtual machine will be generated on the host contained in the AZ.
  • users can specify AZ when creating a volume, so that the volume will be allocated storage in the host included in the specified A.
  • Affinity Group OpenStack association group to ensure that the instances are on the same or different computing hypervisor hosts.
  • Image refers to the system mirror.
  • SN Serial Number, product serial number, 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, enjoy legitimate services, a set of genuine products Only corresponds to a set of product serial numbers.
  • CMDB Configuration Management Database
  • configuration management database CMDB stores and manages various configuration information of the equipment in the enterprise IT architecture. It is closely connected with all service support and service delivery processes to support the operation and play of these processes The value of the configuration information depends on the relevant processes to ensure the accuracy of the data.
  • ITSM ITService Management
  • IT service management IT service management is a set of methods to help companies effectively manage the planning, research and development, implementation and operation of IT systems. It is a set of methodology. This article refers to ITSM management platform in general.
  • At least one means one or more, and “multiple” means two or more.
  • “And/or” describes the association relationship of the associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone, where A, B can be singular or plural.
  • the character “/” generally indicates that the associated objects are in an “or” relationship.
  • “The following at least one item (a)” or similar expressions refers to any combination of these items, including any combination of a single item (a) or plural items (a).
  • At least one item (a) of a, b, or c can represent any of the following situations: a, b, c, d and b, a and c, b and c, a and b and c.
  • an embodiment of the present invention provides a resource allocation method. As shown in FIG. 1, the method specifically includes the following steps:
  • the number of required resources is first determined. If it is determined that the number of required resources is not greater than the number of available rack groups established based on TOR, then the available rack group with the same number of required resources is selected from the available rack group. Resources are allocated.
  • the available rack group here refers to the rack group with available resources in the rack group.
  • a resource request message When the resource demander needs resources, a resource request message will be issued.
  • the resource request message will carry the required resources and the number of required resources, such as DCN, Appdomain, SystemId, Image, physical zone, machine model, number of instances, etc. , And then determine the required resources and the number of required resources from the resource request information.
  • the physical area refers to the divided physical area, such as the management area, the external area, the server group area, etc.; the machine model can be created according to the needs of the business, and the corresponding resources can be created according to the needs of the business. Corresponding requirements.
  • resources may be physical host resources, virtual host resources, or a combination of physical host resources and virtual host resources.
  • the resource demander A issues a resource request message
  • the resource determined in the resource request message is 5 physical host resources and 3 virtual host resources.
  • the number of required resources After determining the number of required resources, compare the number of required resources with the number of available rack groups established based on TOR. If the number of required resources is not greater than the number of available rack groups, select and Available resources with the same number of required resources are allocated, and the available rack group here is a rack group with available resources in the rack group.
  • the number of required resources here is the same as the number of subsequent instances, and both represent the number of resources required by the resource demander.
  • the conventional rack is 42U and has 21 seats.
  • the conventional physical host is 2U, so a rack can hold up to 21 physical hosts and one rack group. There can be up to 42 physical hosts.
  • the physical host can no longer be allocated. If there are 42 physical hosts in a rack group and at least one physical host is not occupied, it means that the rack group is an available rack group.
  • the available resources are allocated.
  • the following describes the required resources as physical host resources and the required resources as virtual host resources.
  • Case 1 The required resources are physical host resources.
  • the resource usage rate of the available rack group that is, the ratio of the number of unoccupied physical hosts under the rack group to the total number of physical hosts, and the result is the resource usage rate of the available rack group.
  • the resource utilization rate of rack group 1 is 50%.
  • the resource usage rate of available rack group is 10%
  • the resource usage rate of available rack group 2 is 15%
  • the resource usage rate of available rack group 3 is 30%
  • the resource usage rate of available rack group 4 The resource utilization rate of the available rack group 5 is 35%
  • the resource utilization rate of the available rack group 5 is 50
  • the number of resources required is 2, then select 2 available rack groups with low resource utilization from the 5 available rack groups, namely Available rack group 1 and available rack group 2.
  • the selection method can be random selection or selection through preset rules. This application is not limited.
  • available rack group 1 and available rack group 2 For example, two available rack groups with low resource usage are selected, available rack group 1 and available rack group 2, and available rack group 1 has 2 unoccupied physical hosts, physical host 1 and physical host 2. There are 3 unoccupied physical hosts in the available rack group 2, physical host 3, physical host 4 and physical host 5.
  • the selected physical host SN and IP address are returned to the terminal where the user is located.
  • Case 2 The required resources are virtual host resources.
  • Select an available rack group with the same amount of resources as the required resource from the available rack group select an IP address with the same number of resources as the required resource from the available rack group with a small resource usage, and use the resource Select the resource name from the available rack group with low rate, determine the parent machine SN and virtual host IP address corresponding to the virtual host according to the IP address and resource name; send the parent machine SN and virtual host IP address to the user's terminal.
  • IP address pool is allocated the same number of IP addresses as the required resources, and the physical host name is incrementally allocated according to the CMDB, and the allocated IP address and physical host name are returned to the user.
  • the host name creation rule can be: CN+city+IDC+number.
  • the first host name created by the rule engine is CNSZFT05010001
  • the second host name is CNSZFT05010002
  • FT represents a 0501 computer room
  • 0001 represents the serial number.
  • the above is an explanation of resource allocation when the number of required resources is not greater than the number of available rack groups. If the number of required resources is greater than the number of available rack groups, it means that the rack group cannot meet the required resources. If the required resources are If it is a physical host resource, the available resources of at least one available rack group in the available rack group can be repeatedly allocated.
  • the following is an example to illustrate that the required resources are physical host resources.
  • the number of physical host resources required is 4, the available rack group is available rack group 1, available rack group 2, and available rack group 3.
  • the number of physical resources required 4 is greater than the number of available rack groups 3.
  • the available rack group 3 was repeatedly allocated.
  • the required resource is a virtual host resource, and the number of required resources is greater than the number of available rack groups, and is not greater than the number of available physical hosts of the business system corresponding to the required resource, then from the available physical hosts of the business system The host selects the available resources that are the same as the required number of resources for allocation.
  • the available resources with the same amount of resources as the required resources are selected from the available physical hosts of the business system for allocation, and the AZ of Openstack can be obtained based on the rack group, that is, the set of unoccupied physical hosts. Then, from the IP address pool of the virtual network segment, an IP address equal to the required number of resources is allocated, the physical host name is incrementally allocated according to the CMDB, and the allocated IP address and physical host name are sent to the terminal where the user is located.
  • the AZ of Openstack is obtained based on the rack group, which can be defined rules created in advance when building Openstack, that is, there is a corresponding relationship between the rack group and the AZ. After the rack group is determined, the AZ can be determined according to the corresponding relationship ;
  • the IP address pool of the virtual network can be a virtual network segment created in advance when Openstack is built, and the virtual network segment constitutes the IP address pool of the virtual network.
  • the required resources are virtual host resources, and the number of required resources is greater than the number of available rack groups, and is 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 abnormal prompt is displayed and no resource allocation is performed.
  • Embodiment 1 Physical host resource allocation.
  • FIG. 2 it is a schematic diagram of a physical host resource allocation process provided by an embodiment of the present invention.
  • S203 Determine whether the number of instances in the resource application information is less than the number of available rack groups in the live network, if so, perform S204, otherwise perform S211;
  • S205 Select an available rack group with the same number of instances as the available rack group with a small resource usage rate from the available rack groups;
  • Embodiment 2 Virtual host resource allocation.
  • FIG. 3 it is a schematic diagram of a virtual host resource allocation process provided by an embodiment of the present invention.
  • S303 Determine whether N is less than the number of available rack groups in the live network, if so, perform S304, otherwise perform S312;
  • S308 Select N IP addresses from the IP address pool of the virtual network segments of the N hosts;
  • S313 Determine whether N is less than the number of hosts in the affinity group, if so, perform S314, otherwise perform S316;
  • S315 Establish an OpenStack AZ based on the available rack group, and execute S307;
  • the embodiment of the present invention also provides a resource allocation device. Since the device corresponds to the device corresponding to the resource allocation method in the embodiment of the present invention, and the principle of the device to solve the problem is similar to the method, the The implementation of the device can refer to the implementation of the method, and the repetition will not be repeated.
  • FIG. 4 it is a schematic structural diagram of a resource allocation device provided by an embodiment of the present invention.
  • the device includes: a determining module 400 and an allocation module 401:
  • the determining module 400 is used to determine the required amount of resources
  • the allocation module 401 if the number of required resources is not greater than the number of available rack groups established based on the TOR of the data center, is used to select from the available rack groups the same as the number of required resources
  • the available resources are allocated, wherein the available rack group is a rack group for which available resources exist in the rack group.
  • the allocation module 401 is further configured to:
  • the required resources are physical host resources. If the number of required resources is greater than the number of available rack groups, at least one available rack group in the available rack group The available resources are repeatedly allocated;
  • the required resources are virtual host resources, if 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 business system corresponding to the required resources
  • the number of available resources is selected from the number of available physical hosts in the business system, which is the same as the required number of resources, for allocation.
  • the allocation module 401 is further configured to:
  • the required resource is a virtual host resource, if the number of required resources is greater than the number of available rack groups, and if the number of required resources is greater than the number of available resources in the business system corresponding to the required resources, Then no resource allocation is performed.
  • the required resources are physical host resources
  • the allocation module 401 is specifically configured to:
  • the required resource is a virtual host resource; the allocation module 401 is specifically configured to:
  • the SN of the parent machine and the IP address of the virtual host are sent to the terminal where the user is located.
  • another resource allocation device is provided in the embodiment of the present invention. Since the device corresponds to the device corresponding to the resource allocation method in the embodiment of the present invention, and the principle of the device to solve the problem is similar to that of the method, The implementation of the device can refer to the implementation of the method, and the repetition will not be repeated.
  • the device 500 includes:
  • Communication interface 501 memory 502 and processor 503;
  • the processor 503 communicates with other devices through the communication interface 501.
  • the other devices may be the aforementioned external online translation tools.
  • the communication interface 501 can provide an application programming interface solution.
  • the processor 503 can send the aforementioned translation parameters etc. to an 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 according to the obtained program The method in the above embodiment.
  • 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 device, a discrete gate or transistor logic device, a discrete hardware component, and may implement or Perform the 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. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
  • the memory is used to store program instructions.
  • the memory can be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., or it can be volatile. Volatile memory (volatile memory), such as random-access memory (RAM).
  • the memory may also be any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that 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 realizing a storage function, for storing program instructions and/or data.
  • the embodiments of the present application do not limit the specific connection medium between the aforementioned communication interface, memory, and processor, such as a bus.
  • the bus can be divided into an address bus, a data bus, and a control bus.
  • an embodiment of the present invention also provides a readable storage medium for resource allocation, including program code, and when the program code runs on a computing device, the program code is used to make the computing device execute the resource allocation method A step of.
  • this application may take the form of a computer program product on a computer-usable or computer-readable storage medium, which has a computer-usable or computer-readable program code implemented in the medium to be used by the instruction execution system or Used in conjunction with the instruction execution system.
  • a computer-usable or computer-readable medium can be any medium that can contain, store, communicate, transmit, or transmit a program for use by an instruction execution system, device, or device, or in combination with an instruction execution system, Device or equipment use.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

本发明公开了一种资源分配方法、装置及设备,涉及金融科技的云计算领域,用以解决现有技术中存在的进行资源分配时,资源分配进程缓慢,浪费时间的问题。本发明首先确定需要的资源数量,如果确定需要的资源数量不大于基于TOR建立的可用机架组的数量,那么从该可用机架组中选择与该需要的资源数量相同的可用资源进行分配,这里的可用机架组为在该机架组中存在可用资源的机架组,由于在确定需要的资源数量不大于可用机架组的数量时,从该机架组中选择与需要的资源数量相同的资源进行分配,从而无需人工在资源池中挑选可用资源,提高资源分配的进程,节省时间。

Description

一种资源分配方法、装置及设备
相关申请的交叉引用
本申请要求在2019年06月19日提交中国专利局、申请号为201910532166.0、申请名称为“一种资源分配方法、装置及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及金融科技(Fintech)的云计算技术领域,特别涉及一种资源分配方法、装置及设备。
背景技术
随着计算机技术的发展,越来越多的技术应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变,云计算也是,目前在云计算领域中,众多拥有较大IT资源和软件***的企业,都会在自己的数据中心部署内部云计算环境,其中最重要的技术是虚拟化以及支撑虚拟化的资源池管理模式和技术,比如云计算环境使用KVM虚拟化技术,在IaaS(基础设施即服务,Infrastructure as a Service)层采用传统的虚拟化架构方案。为了保证***的稳定性和高可用性,当前的应用高可用规则如下:
一、原应用高可用规则
1、核心子***(A,B1类)实例数不小于3,非核心子***实例数不小于2;
2、一个子***,在单个DCN的实例数至少部署在两个不同的机柜上面。
二、同城多中心多活下的应用高可用规则
1、一种子***的实例部署的IDC(Internet Data Center,互联网数据中心)数不小于2;
2、重要子***(A,B1,B2类),在单个DCN(Data Center Node,数据中心节点)内的实例数不小于2;
3、重要子***(A,B1,B2类),在单个DCN内的实例数至少部署在两个不同的机柜上。
现有方案中主机资源分配包括物理主机和虚拟主机分配,首先根据资源需求方的需求,从CMDB中按照物理区域筛选未分配的机器,进行物理机部署、母机投放、虚拟化等一系列操作,形成资源池,再从资源池中人工挑选满足上述两个高可用规则的资源,最后根据 子***分配DCN、应用域等信息,并交付给资源需求方。
由于资源分配时需要人工挑选资源,因此资源分配的进程缓慢,耗时较久。
发明内容
本发明提供一种资源分配方法、装置及设备,用以解决现有技术中存在的进行资源分配时,资源分配进程缓慢,浪费时间的问题。
第一方面,本发明实施例提供一种资源分配方法,该方法包括:
确定需要的资源数量;
若所述需要的资源数量不大于基于数据中心的布线方式TOR建立的可用机架组的数量,则从所述可用机架组中选择与所述需要的资源数量相同的可用资源进行分配,其中所述可用机架组为在所述机架组中存在可用资源的机架组。
上述方法,首先确定需要的资源数量,如果确定需要的资源数量不大于基于TOR建立的可用机架组的数量,那么从该可用机架组中选择与该需要的资源数量相同的可用资源进行分配,这里的可用机架组为在该机架组中存在可用资源的机架组,由于在确定需要的资源数量不大于可用机架组的数量时,从该机架组中选择与需要的资源数量相同的资源进行分配,从而无需人工在资源池中挑选可用资源,提高资源分配的进程,节省时间。
在一种可能的实现方式中,所述确定需要的资源数量之后,还包括:
所述需要的资源为物理主机资源,若所述需要的资源数量大于所述可用机架组的数量,则将所述可用机架组中至少一个可用机架组的可用资源进行重复分配;
所述需要的资源为虚拟主机资源,若所述需要的资源数量大于所述可用机架组的数量,且不大于所述需要的资源对应的业务***中可用物理主机的数量,则从所述业务***中可用物理主机的数量中选择与所述需要的资源数量相同的可用资源进行分配。
上述方法,在确定需要的资源数量之后,根据需要的资源不同,处理方式也不同,如果需要的资源为物理主机资源,且需要的资源数量大于可用机架组的数量,则将所述机架组中至少一个可用机架组的可用资源进行重复分配;如果需要的资源为虚拟主机资源,且需要的资源数量大于可用机架组的数量,不大于需要的资源对应的业务***的可用物理主机的数量,则从该业务***的可用物理主机中选择与需要的资源数量相同的可用资源进行分配。
在一种可能的实现方式中,所述需要的资源为虚拟主机资源,若所述需要的资源数量大于所述可用机架组的数量,还包括:
若所述需要的资源数量大于所述需要的资源对应的业务***中可用资源的数量,则不 进行资源分配。
上述方法,如果需要的资源为虚拟主机资源,且需要的资源数量大于可用机架组的数量,且大于需要的资源对应的业务***中可用资源的数量,则进行异常提示,说明可用资源不够,无法进行资源分配。
在一种可能的实现方式中,所述需要的资源为物理主机资源;
所述从所述可用机架组中选择与所述需要的资源数量相同的可用资源进行分配,包括:
从所述可用机架组中选择与所述需要的资源数量相同的资源使用率小的可用机架组;
针对一个资源使用率小的可用机架组,从所述资源使用率小的可用机架组中选择一个可用物理机SN和IP地址;
将选择的一个可用物理机SN和IP地址发送给用户所在终端。
上述方法,给出了当需要的资源为物理主机资源时,如何从可用机架组中选择与需要的资源数量相同的可用资源进行分配。
在一种可能的实现方式中,所述需要的资源为虚拟主机资源;
所述从所述可用机架组中选择与所述需要的资源数量相同的可用资源进行分配,包括:
从所述可用机架组中选择与所述需要的资源数量相同的资源使用率小的可用机架组;
从所述资源使用率小的可用机架组中选择与所述需要的资源数量相同的IP地址,以及从所述资源使用率小的可用机架组中选择资源名称;
根据所述IP地址和所述资源名称确定虚拟主机对应的母机SN和虚拟主机IP地址;
将所述母机SN和虚拟主机IP地址发送给用户所在终端。
上述方法,给出了当需要的资源为虚拟主机资源时,如何从可用机架组中选择与需要的资源数量相同的可用资源进行分配。
第二方面,本发明实施例提供一种资源分配装置,该装置包括:
确定模块,用于确定需要的资源数量;
分配模块,若所述需要的资源数量不大于基于数据中心的布线方式TOR建立的可用机架组的数量,则用于从所述可用机架组中选择与所述需要的资源数量相同的可用资源进行分配,其中所述可用机架组为在所述机架组中存在可用资源的机架组。
在一种可能的实现方式中,所述分配模块还用于:
所述确定需要的资源数量之后,所述需要的资源为物理主机资源,若所述需要的资源数量大于所述可用机架组的数量,则所述可用机架组中至少一个可用机架组的可用资源进行重复分配;
所述需要的资源为虚拟主机资源,若所述需要的资源数量大于所述可用机架组的数量, 且所述需要的资源数量不大于所述需要的资源对应的业务***中可用物理主机的数量,则从所述业务***中可用物理主机的数量中选择与所述需要的资源数量相同的可用资源进行分配。
在一种可能的实现方式中,所述分配模块还用于:
所述需要的资源为虚拟主机资源,若所述需要的资源数量大于所述可用机架组的数量,若所述需要的资源数量大于所述需要的资源对应的业务***中可用资源的数量,则不进行资源分配。
在一种可能的实现方式中,所述需要的资源为物理主机资源,所述分配模块具体用于:
从所述可用机架组中选择与所述需要的资源数量相同的资源使用率小的可用机架组;
针对一个资源使用率小的可用机架组,从所述资源使用率小的可用机架组中选择一个可用物理机SN和IP地址;
将选择的一个可用物理机SN和IP地址发送给用户所在终端。
在一种可能的实现方式中,所述需要的资源为虚拟主机资源;所述分配模块具体用于:
从所述可用机架组中选择与所述需要的资源数量相同的资源使用率小的可用机架组;
从所述资源使用率小的可用机架组中选择与所述需要的资源数量相同的IP地址,以及从所述资源使用率小的可用机架组中选择资源名称;
根据所述IP地址和所述资源名称确定虚拟主机对应的母机SN和虚拟主机IP地址;
将所述母机SN和虚拟主机IP地址发送给用户所在终端。
第三方面,本发明实施例提供另一种资源分配设备,该设备包括:
存储器以及处理器;
存储器,用于存储程序指令;
处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行第一方面任一项所述的方法。
第四方面,本发明实施例还提供所述计算机可读存储介质存储有计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行第一方面中任一项所述的方法。
另外,第二方面至第四方面中任一种实现方式所带来的技术效果可参见第一方面中不同实现方式所带来的技术效果,此处不再赘述。
本发明的这些方面或其他方面在以下实施例的描述中会更加简明易懂。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的 附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供一种资源分配的方法;
图2为本发明实施例提供的物理主机资源分配流程示意图;
图3为本发明实施例提供的虚拟主机资源分配流程示意图;
图4为本发明实施例提供的第一种资源分配装置结构示意图;
图5为本发明实施例提供的第二种资源分配装置结构示意图。
具体实施方式
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部份实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
本申请实施例提供一种资源分配方法、装置及设备,用以解决现有技术中存在的进行资源分配时,资源分配进程缓慢,浪费时间的问题。其中,方法和装置是基于同一发明构思的,由于方法及装置解决问题的原理相似,因此装置与方法的实施可以相互参见,重复之处不再赘述。
以下,对本申请中的部分用词进行解释说明,以便于本领域技术人员理解。
1)、IaaS:Infrastructure as a Service,基础设施即服务,是云服务的最底层,主要提供一些基础资源。
2)、ToR:Top of Rack,是一种数据中心的布线方式,就是在标准的42U的服务器机柜的最上面安装接入交换机。
3)、RACK:数据中心建设的统一标准,宽度是标准的19英寸,高度通常以“U”数来表示(1U=4.445cm),单个机柜为标准的42U高度。
4)、KVM:Kernel-based Virtual Machine的简称,是一个开源的***虚拟化模块,基于硬件的完全虚拟化技术。
5)、VM:虚拟机(Virtual Machine)指通过软件模拟的具有完整硬件***功能的、运行在一个完全隔离环境中的完整计算机***。
6)、SystemID:指应用***编号,每个业务***有唯一的***ID。
7)、DCN:Data Center Node,数据中心节点,指应用***架构中的一个逻辑概念,不 代表实际的物理数据中心,但同一个DCN必然只属于某一个物理数据中心。
8)、AppDomain:Application Domain,应用域,逻辑概念,应用所属的域。
9)、Hostname:主机名称,用以显示或设置***的主机名称。
10)、OpenStack:是一个开源的云计算管理平台项目,由几个主要的组件组合起来完成具体工作。OpenStack支持几乎所有类型的云环境,项目目标是提供实施简单、可大规模扩展、丰富、标准统一的云计算管理平台。OpenStack通过各种互补的服务提供了基础设施即服务(IaaS)的解决方案,每个服务提供API以进行集成。
11)、AZ:Availability Zone,可用区,,AZ简单来看可以理解成一些主机(host)的集合。在OpenStack中,Nova和Cinder模块在Mitaka版本之前已经集成了AZ的功能。在Nova模块中,用户创建虚机时可以指定一个AZ,这样虚机就会在这个AZ所包含的主机上生成。在Cinder模块中,用户可以在创建卷时指定AZ,这样卷会在指定的A所包含的主机中获得存储分配。
12)、Affinity Group:OpenStack关联组,确保实例在相同或不同的计算管理程序主机上。
13)、Image:镜像,指***镜像。
14)、SN:Serial Number,产品序列号,产品序列号是为了验证“产品的合法身份”而引入的一个概念,它是用来保障用户的正版权益,享受合法服务的,一套正版的产品只对应一组产品序列号。
15)、CMDB:Configuration Management Database,配置管理数据库,,CMDB存储与管理企业IT架构中设备的各种配置信息,它与所有服务支持和服务交付流程都紧密相联,支持这些流程的运转、发挥配置信息的价值,同时依赖于相关流程保证数据的准确性。
16)、ITSM:ITService Management,IT服务管理,IT服务管理是一套帮助企业对IT***的规划、研发、实施和运营进行有效管理的方法,是一套方法论,本文泛指ITSM管理平台。
另外,需要说明的是,本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示后续任意一种情况:a,b,c,d和b,a和c,b和c,a和b和c。
随着业务的快速扩展,数据中心规模逐渐扩大,业务申请资源需求愈发频繁,新项目上线、服务器迁移、服务器过保、硬件故障等需要快速新增或替换节点场景逐渐增多,目前,在进行资源分配时,从资源申请到资源分配,全流程人工介入较多,因此资源分配的交付流程缓慢,而且,在人工介入时,人员对资源利用情况没有宏观的认识,所以有可能会导致资源利用不均衡,增大了应用稳定运行的安全隐患,这种安全隐患会导致银行业务(贷款业务、存款业务或其他金融业务)的安全性低,不符合银行等金融机构的监管要求。
如果从资源申请到资源分配不需要人员参与,完全实现自动化,则会提高资源分配的进程。需要说明的是,本发明实施例描述的应用场景是为了更加清楚的说明本发明实施例的技术方案,并不构成对于本发明实施例提供的技术方案的限定,本领域普通技术人员可知,随着新应用场景的出现,本发明实施例提供的技术方案对于类似的技术问题,同样适用。
针对上述应用场景,本发明实施例提供一种资源分配的方法,如图1所示,该方法具体包括如下步骤:
S100,确定需要的资源数量;
S101,若所述需要的资源数量不大于基于数据中心的布线方式TOR建立的可用机架组的数量,则从所述可用机架组中选择与所述需要的资源数量相同的可用资源进行分配,其中所述可用机架组为在所述机架组中存在可用资源的机架组。
本发明实施例中,首先确定需要的资源数量,如果确定需要的资源数量不大于基于TOR建立的可用机架组的数量,那么从该可用机架组中选择与该需要的资源数量相同的可用资源进行分配,这里的可用机架组为在该机架组中存在可用资源的机架组,由于在确定需要的资源数量不大于可用机架组的数量时,从该机架组中选择与需要的资源数量相同的资源进行分配,从而无需人工在资源池中挑选可用资源,提高了资源分配的进程,节省时间。
当资源需求方需要资源时,会下发一个资源请求信息,资源请求信息中会携带需要的资源以及需要的资源数量,比如DCN、Appdomain、SystemId、Image、物理区、机器型号、实例数等信息,然后从资源请求信息中确定需要的资源以及需要的资源数量。
其中,物理区指的是划分的物理区域,比如,管理区、外联区、服务器群区等;机器型号可以按照业务的需求按需创建对应的资源,有些业务需求会对机器型号、Image有对应的要求。
需要说明的是,这里的资源可以是物理主机资源,也可以是虚拟主机资源,还可以是物理主机资源和虚拟主机资源的组合。
比如,资源需求方A下发一个资源请求信息,资源请求信息中确定的资源为需要的物理主机资源为5个,虚拟主机资源为3个。
确定了需要的资源数量后,将需要的资源数量与基于TOR建立的可用机架组的数量进行比较,如果需要的资源数量不大于可用机架组的数量,则从可用机架组中选择与需要的资源数量相同的可用资源进行分配,这里的可用机架组为在机架组中存在可用资源的机架组。
这里的需要的资源数量和后续的实例数量相同,都代表资源需求方需要的资源数。
需要说明的是,两个机架组成一个机架组,常规的机架是42U,21个机位,常规的物理主机是2U,所以一个机架最多可以放置21个物理主机,一个机架组最多可以有42个物理主机。
如果物理主机被占用了,则该物理主机不可再进行分配。如果一个机架组中有42个物理主机,存在至少一个物理主机未被占用,则说明该机架组为可用机架组。
在对需要的资源数量与可用机架组的数量进行比较时,如果需要的资源数量不大于基于TOR建立的可用机架组的数量,则从可用机架组中选择与需要的资源数量相同的可用资源进行分配,下面分别对需要的资源为物理主机资源和需要的资源为虚拟主机资源进行说明。
情形一、需要的资源为物理主机资源。
首先从可用机架组中选择与需要的资源数量相同的资源使用率小的可用机架组,然后针对一个资源使用率小的可用机架组,从资源使用率小的可用机架组中选择一个可用物理机SN和IP地址,最后将选择的一个可用物理机SN和IP地址发送给用户所在终端。
其中,可用机架组的资源使用率,也就是在该机架组下,未被占用的物理主机的数量与物理主机的总数量进行比值,结果即为该可用机架组的资源使用率。
比如,在机架组1下有42个物理主机,其中有21个物理主机被占用,则机架组1的资源使用率为50%。
从可用机架组中选择与需要的资源数量相同的资源使用率小的可用机架组,可以计算所有可用机架组的资源使用率,然后从所有机架组中选择与需要的资源数量相同的资源使用率小的可用机架组。
比如,有5个可用机架组,分别为可用机架组1,可用机架组2,可用机架组3,可用机架组4,可用机架组5,分别计算出每个可用机架组的资源使用率,可用机架组1的资源使用率为10%,可用机架组2的资源使用率为15%,可用机架组3的资源使用率为30%,可用机架组4的资源使用率为35%,可用机架组5的资源使用率为50,需要的资源数量为 2,则从5个可用机架组中选择2个资源使用率小的可用机架组,即可用机架组1和可用机架组2。
选择了与需要的资源数量相同的资源使用率小的可用机架组后,针对一个资源使用率小的可用机架组,从该资源使用率小的可用机架组中选择一个可用物理机SN和IP地址。
从资源使用率小的可用机架组中选择一个可用的物理机SN和IP地址,选择方式可以是随机选择,也可以通过预设规则选择,对此本申请不做限制。
比如,选择了2个资源使用率小的可用机架组,可用机架组1和可用机架组2,可用机架组1中有2个未被占用的物理主机,物理主机1和物理主机2,可用机架组2中有3个未被占用的物理主机,物理主机3、物理主机4和物理主机5,从每个选择的可用机架组中选择一个可用物理主机SN和IP地址,选择方式可以为随机选择,也可以根据预设规则选择。
选择了物理主机SN和IP地址后,将选择的物理主机SN和IP地址返回给用户所在终端。
情形二、需要的资源为虚拟主机资源。
从可用机架组中选择与需要的资源数量相同的资源使用率小的可用机架组,从资源使用率小的可用机架组中选择与需要的资源数量相同的IP地址,以及从资源使用率小的可用机架组中选择资源名称,根据IP地址和资源名称确定虚拟主机对应的母机SN和虚拟主机IP地址;将母机SN和虚拟主机IP地址发送给用户所在终端。
从可用机架组中选择与需要的资源数量相同的资源使用率小的可用机架组,和情形一中相同,此处不再重复赘述。
从资源使用率小的可用机架组中选择与需要的资源数量相同的IP地址,可以基于机架组计算出Openstack的AZ,也就是未被占用的物理主机的集合,然后从虚拟网段的IP地址池中分配出与所述需要的资源数量相同的IP地址,并根据CMDB中递增分配物理主机名称,将分配出的IP地址和物理主机名称返回给用户。
需要说明的是,主机名称的创建规则可以为:CN+city+IDC+编号,比如,使用规则引擎创建的第一台主机名称为CNSZFT05010001,第二台主机名称为CNSZFT05010002,以此类推,其中,CN代表china(中国),SZ代表深圳,FT代表某0501机房,0001代表编号。
以上是对需要的资源数量不大于可用机架组的数量的情况进行资源分配的说明,如果需要的资源数量大于可用机架组的数量,说明机架组不能满足需要的资源,如果需要的资源为物理主机资源,则可以对可用机架组中至少一个可用机架组的可用资源进行重复分配。
下面对需要的资源为物理主机资源进行举例说明。
比如,需要的物理主机资源的数量为4,可用机架组为可用机架组1,可用机架组2,可用机架组3,需要的物理资源的数量4大于可用机架组的数量3,此时可以从可用机架组1中随机选择一个可用物理主机,从机架组2中随机选择一个可用物理主机,从可用机架组3中随机选择两个可用物理主机进行资源分配,此时,可用机架组3进行了重复分配。
如果需要的资源为虚拟主机资源,且需要的资源数量大于可用机架组的数量,且不大于所述需要的资源对应的业务***的可用物理主机的数量,则从所述业务***的可用物理主机中选择与所述需要的资源数量相同的可用资源进行分配。
一种实施方式中,从业务***的可用物理主机中选择与所述需要的资源数量相同的可用资源进行分配,可以基于机架组得到Openstack的AZ,也就是未被占用的物理主机的集合,然后从虚拟网段的IP地址池中分配出与所述需要的资源数量相同的IP地址,并根据CMDB中递增分配物理主机名称,将分配出的IP地址和物理主机名称发送给用户所在终端。
这里基于机架组得到Openstack的AZ,可以是在搭建Openstack时预先创建好的定义规则,也就是机架组和AZ之间存在对应关系,确定了机架组后,即可根据对应关系确定AZ;
虚拟网的IP地址池,可以是在搭建Openstack时预先创建好虚拟网段,虚拟网段构成虚拟网的IP地址池。
如果需要的资源为虚拟主机资源,且需要的资源数量大于可用机架组的数量,且大于所述需要的资源对应的业务***中可用资源的数量,则说明现有资源不能满足需要的资源,因此显示异常提示,不进行资源分配。
下面以具体的实施例进行说明。
实施例一:物理主机资源分配。
如图2所示,为本发明实施例提供的物理主机资源分配流程示意图。
S200,确定现网CMDB中可用机架组数量;
S201,接收用户提交的ITSM资源申请信息;
S202,从该ITSM资源申请信息中获取实例数;
S203,判断资源申请信息中实例数是否小于现网中可用机架组数量,如果是,则执行S204,否则执行S211;
S204,计算每个可用机架组的资源使用率;
S205,从可用机架组中选择与实例数相同的资源使用率小的可用机架组;
S206,从选择的每个资源使用率小的可用机架组选取具体的RACK;
S207,从每个可用机架组中筛选具体机位中的物理主机;
S208,获取筛选的物理主机的SN和IP地址;
S209,将获取的SN和IP地址传入物理机纳管平台进行分配;
S210,将分配的SN和IP地址同步到CMDB;
S211,选择至少一个机架组进行重复分配;
S212,从可用机架组中选择具体的RACK,执行S207。
实施例二:虚拟主机资源分配。
如图3所示,为本发明实施例提供的虚拟主机资源分配流程示意图。
S300,确定现网CMDB中可用机架组的数量;
S301,接收用户提交的ITSM资源申请信息;
S302,从该ITSM资源申请信息中获取实例数N;
S303,确定N是否小于现网中可用机架组数量,如果是,则执行S304,否则执行S312;
S304,计算每个可用机架组的资源使用率;
S305,从可用机架组中选择与N个资源使用率小的可用机架组;
S306,以N个使用率小的可用机架组建立OpenStack的AZ;
S307,从AZ中选择N个主机;
S308,从N个主机的虚拟网段的IP地址池中选择N个IP地址;
S309,根据CMDB中递增确定主机名称;
S310,基于主机名称和N个IP地址,确定母机SN和对应的IP地址;
S311,将确定的母机SN和对应的IP地址同步到CMDB;
S312,将可用机架组中的可用主机组成亲合组;
S313,判断N是否小于亲合组中主机数量,如果是,则执行S314,否则执行S316;
S314,从亲和组中随机选择N个主机;
S315,基于可用机架组建立OpenStack的AZ,执行S307;
S316,显示异常信息,不进行分配。
基于同一发明构思,本发明实施例中还提供了一种资源分配装置,由于该装置对应的是本发明实施例资源分配方法对应的装置,并且该装置解决问题的原理与该方法相似,因此该装置的实施可以参见方法的实施,重复之处不再赘述。
如图4所示,为本发明实施例提供的一种资源分配装置结构示意图,该装置包括:确 定模块400和分配模块401:
确定模块400,用于确定需要的资源数量;
分配模块401,若所述需要的资源数量不大于基于数据中心的布线方式TOR建立的可用机架组的数量,则用于从所述可用机架组中选择与所述需要的资源数量相同的可用资源进行分配,其中所述可用机架组为在所述机架组中存在可用资源的机架组。
可选的,所述分配模块401还用于:
所述确定需要的资源数量之后,所述需要的资源为物理主机资源,若所述需要的资源数量大于所述可用机架组的数量,则所述可用机架组中至少一个可用机架组的可用资源进行重复分配;
所述需要的资源为虚拟主机资源,若所述需要的资源数量大于所述可用机架组的数量,且所述需要的资源数量不大于所述需要的资源对应的业务***中可用物理主机的数量,则从所述业务***中可用物理主机的数量中选择与所述需要的资源数量相同的可用资源进行分配。
可选的,所述分配模块401还用于:
所述需要的资源为虚拟主机资源,若所述需要的资源数量大于所述可用机架组的数量,若所述需要的资源数量大于所述需要的资源对应的业务***中可用资源的数量,则不进行资源分配。
可选的,所述需要的资源为物理主机资源,所述分配模块401具体用于:
从所述可用机架组中选择与所述需要的资源数量相同的资源使用率小的可用机架组;
针对一个资源使用率小的可用机架组,从所述资源使用率小的可用机架组中选择一个可用物理机SN和IP地址;
将选择的一个可用物理机SN和IP地址发送给用户所在终端。
可选的,所述需要的资源为虚拟主机资源;所述分配模块401具体用于:
从所述可用机架组中选择与所述需要的资源数量相同的资源使用率小的可用机架组;
从所述资源使用率小的可用机架组中选择与所述需要的资源数量相同的IP地址,以及从所述资源使用率小的可用机架组中选择资源名称;
根据所述IP地址和所述资源名称确定虚拟主机对应的母机SN和虚拟主机IP地址;
将所述母机SN和虚拟主机IP地址发送给用户所在终端。
基于同一发明构思,本发明实施例中还提供了另一种资源分配装置,由于该装置对应的是本发明实施例资源分配方法对应的装置,并且该装置解决问题的原理与该方法相似,因此该装置的实施可以参见方法的实施,重复之处不再赘述。
如图5所示,为本发明实施例提供的一种资源分配设备结构示意图,该设备500包括:
通信接口501,存储器502以及处理器503;
其中,所述处理器503通过所述通信接口501与其它设备进行通信,比如,其它设备可以是前述外部在线翻译工具。其中,通信接口501可以提供应用程序编程接口的解决方案。
处理器503可以通过通信接口501向外部在线翻译工具发送前述翻译参数等;存储器502,用于存储程序指令;处理器503,用于调用所述存储器502中存储的程序指令,按照获得的程序执行上述实施例中的方法。
在本申请实施例中,处理器可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
在本申请实施例中,存储器,用于存储程序指令,存储器可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM)。存储器还可以是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本申请实施例中的存储器还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。本申请实施例中不限定上述通信接口、存储器以及处理器之间的具体连接介质,比如总线,总线可以分为地址总线、数据总线、控制总线等。
进一步地,本发明实施例还提供一种资源分配的可读存储介质,包括程序代码,当所述程序代码在计算设备上运行时,所述程序代码用于使所述计算设备执行资源分配方法的步骤。
以上参照示出根据本申请实施例的方法、装置(***)和/或计算机程序产品的框图和/或流程图描述本申请。应理解,可以通过计算机程序指令来实现框图和/或流程图示图的一个块以及框图和/或流程图示图的块的组合。可以将这些计算机程序指令提供给通用计算机、专用计算机的处理器和/或其它可编程数据处理装置,以产生机器,使得经由计算机处理器和/或其它可编程数据处理装置执行的指令创建用于实现框图和/或流程图块中所指定的功能/动作的方法。
相应地,还可以用硬件和/或软件(包括固件、驻留软件、微码等)来实施本申请。更 进一步地,本申请可以采取计算机可使用或计算机可读存储介质上的计算机程序产品的形式,其具有在介质中实现的计算机可使用或计算机可读程序代码,以由指令执行***来使用或结合指令执行***而使用。在本申请上下文中,计算机可使用或计算机可读介质可以是任意介质,其可以包含、存储、通信、传输、或传送程序,以由指令执行***、装置或设备使用,或结合指令执行***、装置或设备使用。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (11)

  1. 一种资源分配方法,其特征在于,该方法包括:
    确定需要的资源数量;
    若所述需要的资源数量不大于基于数据中心的布线方式TOR建立的可用机架组的数量,则从所述可用机架组中选择与所述需要的资源数量相同的可用资源进行分配,其中所述可用机架组为在所述机架组中存在可用资源的机架组。
  2. 如权利要求1所述的方法,其特征在于,所述确定需要的资源数量之后,还包括:
    所述需要的资源为物理主机资源,若所述需要的资源数量大于所述可用机架组的数量,则对所述可用机架组中至少一个可用机架组的可用资源进行重复分配;
    所述需要的资源为虚拟主机资源,若所述需要的资源数量大于所述可用机架组的数量,且不大于所述需要的资源对应的业务***的可用物理主机的数量,则从所述业务***的可用物理主机中选择与所述需要的资源数量相同的可用资源进行分配。
  3. 如权利要求2所述的方法,其特征在于,所述需要的资源为虚拟主机资源,若所述需要的资源数量大于所述可用机架组的数量,还包括:
    若所述需要的资源数量大于所述需要的资源对应的业务***中可用资源的数量,则不进行资源分配。
  4. 如权利要求1所述的方法,其特征在于,所述需要的资源为物理主机资源;
    所述从所述可用机架组中选择与所述需要的资源数量相同的可用资源进行分配,包括:
    从所述可用机架组中选择与所述需要的资源数量相同的资源使用率小的可用机架组;
    针对一个资源使用率小的可用机架组,从所述资源使用率小的可用机架组中选择一个可用物理机序列号SN和网络协议IP地址;
    将选择的一个可用物理机SN和IP地址发送给用户所在终端。
  5. 如权利要求1-4任一项所述的方法,其特征在于,所述需要的资源为虚拟主机资源;
    所述从所述可用机架组中选择与所述需要的资源数量相同的可用资源进行分配,包括:
    从所述可用机架组中选择与所述需要的资源数量相同的资源使用率小的可用机架组;
    从所述资源使用率小的可用机架组中选择与所述需要的资源数量相同的IP地址,以及从所述资源使用率小的可用机架组中选择资源名称;
    根据所述IP地址和所述资源名称确定虚拟主机对应的母机SN和虚拟主机IP;
    将所述母机SN和虚拟主机IP地址发送给用户所在终端。
  6. 一种资源分配装置,其特征在于,该装置包括:
    确定模块,用于确定需要的资源数量;
    分配模块,若所述需要的资源数量不大于基于数据中心的布线方式TOR建立的可用机架组的数量,则用于从所述可用机架组中选择与所述需要的资源数量相同的可用资源进行分配,其中所述可用机架组为在所述机架组中存在可用资源的机架组。
  7. 如权利要求6所述的装置,其特征在于,所述分配模块还用于:
    所述确定需要的资源数量之后,所述需要的资源为物理主机资源,若所述需要的资源数量大于所述可用机架组的数量,则对所述可用机架组中至少一个可用机架组的可用资源进行重复分配;
    所述需要的资源为虚拟主机资源,若所述需要的资源数量大于所述可用机架组的数量,且所述需要的资源数量不大于所述需要的资源对应的业务***中可用物理主机的数量,则从所述业务***中可用物理主机的数量中选择与所述需要的资源数量相同的可用资源进行分配。
  8. 如权利要求6所述的装置,其特征在于,所述需要的资源为物理主机资源,所述分配模块具体用于:
    从所述可用机架组中选择与所述需要的资源数量相同的资源使用率小的可用机架组;
    针对一个资源使用率小的可用机架组,从所述资源使用率小的可用机架组中选择一个可用物理机SN和IP地址;
    将选择的一个可用物理机SN和IP地址发送给用户所在终端。
  9. 如权利要求6-8任一项所述的装置,其特征在于,所述需要的资源为虚拟主机资源;所述分配模块具体用于:
    从所述可用机架组中选择与所述需要的资源数量相同的资源使用率小的可用机架组;
    从所述资源使用率小的可用机架组中选择与所述需要的资源数量相同的IP地址,以及从所述资源使用率小的可用机架组中选择资源名称;
    根据所述IP地址和所述资源名称确定虚拟主机对应的母机SN和虚拟主机IP地址;
    将所述母机SN和虚拟主机IP地址发送给用户所在终端。
  10. 一种资源分配设备,其特征在于,包括:
    存储器以及处理器;
    存储器,用于存储程序指令;
    处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行权利要求1~5任一项所述的方法。
  11. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机 指令,当所述计算机指令在计算机上运行时,使得计算机执行权利要求1~5中任一项所述的方法。
PCT/CN2020/092740 2019-06-19 2020-05-27 一种资源分配方法、装置及设备 WO2020253490A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910532166.0A CN110287025A (zh) 2019-06-19 2019-06-19 一种资源分配方法、装置及设备
CN201910532166.0 2019-06-19

Publications (1)

Publication Number Publication Date
WO2020253490A1 true WO2020253490A1 (zh) 2020-12-24

Family

ID=68004791

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/092740 WO2020253490A1 (zh) 2019-06-19 2020-05-27 一种资源分配方法、装置及设备

Country Status (2)

Country Link
CN (1) CN110287025A (zh)
WO (1) WO2020253490A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287025A (zh) * 2019-06-19 2019-09-27 深圳前海微众银行股份有限公司 一种资源分配方法、装置及设备
CN113949637A (zh) * 2021-10-28 2022-01-18 中国建设银行股份有限公司 一种交换机资源智能分配部署方法及装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103327095A (zh) * 2013-06-20 2013-09-25 电子科技大学 一种可扩展的数据中心网络架构及实现方法
CN103797463A (zh) * 2011-07-27 2014-05-14 阿尔卡特朗讯公司 用于在云环境中指派虚拟资源的方法和设备
CN105404545A (zh) * 2015-12-03 2016-03-16 中国联合网络通信集团有限公司 虚拟机分配的方法及装置
CN108037984A (zh) * 2017-11-28 2018-05-15 深圳前海微众银行股份有限公司 数据分析的资源管理方法、***以及可读存储介质
US20180254999A1 (en) * 2017-03-06 2018-09-06 Linkedin Corporation Multidimensional resource allocation in data centers
CN110287025A (zh) * 2019-06-19 2019-09-27 深圳前海微众银行股份有限公司 一种资源分配方法、装置及设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103797463A (zh) * 2011-07-27 2014-05-14 阿尔卡特朗讯公司 用于在云环境中指派虚拟资源的方法和设备
CN103327095A (zh) * 2013-06-20 2013-09-25 电子科技大学 一种可扩展的数据中心网络架构及实现方法
CN105404545A (zh) * 2015-12-03 2016-03-16 中国联合网络通信集团有限公司 虚拟机分配的方法及装置
US20180254999A1 (en) * 2017-03-06 2018-09-06 Linkedin Corporation Multidimensional resource allocation in data centers
CN108037984A (zh) * 2017-11-28 2018-05-15 深圳前海微众银行股份有限公司 数据分析的资源管理方法、***以及可读存储介质
CN110287025A (zh) * 2019-06-19 2019-09-27 深圳前海微众银行股份有限公司 一种资源分配方法、装置及设备

Also Published As

Publication number Publication date
CN110287025A (zh) 2019-09-27

Similar Documents

Publication Publication Date Title
CN109582433B (zh) 一种资源调度方法、装置、云计算***及存储介质
CN104253865B (zh) 一种混合型桌面云服务平台的两级管理方法
US10079850B1 (en) Systems and methods for provisioning cyber security simulation exercises
US8695079B1 (en) Allocating shared resources
CN103078965B (zh) 虚拟机的ip地址管理方法
CN105579965A (zh) 经由提供商定义接口的客户端驻地资源控制
EP3442201B1 (en) Cloud platform construction method and cloud platform
WO2020253490A1 (zh) 一种资源分配方法、装置及设备
CN107666493B (zh) 一种数据库配置方法及其设备
CN103118073B (zh) 一种云环境下虚拟机数据持久化存储***和方法
JP2009237826A (ja) ストレージシステム及びそのボリューム管理方法
US10761869B2 (en) Cloud platform construction method and cloud platform storing image files in storage backend cluster according to image file type
JP2013174945A (ja) シンクライアントシステム、接続管理サーバ、接続管理方法、及び接続管理プログラム
Ma et al. vLocality: Revisiting data locality for MapReduce in virtualized clouds
Mylavarapu et al. An optimized capacity planning approach for virtual infrastructure exhibiting stochastic workload
CN107209706A (zh) 用于将设备连接到正在接收维护的应用和桌面的方法和***
CN104809026B (zh) 一种使用远程节点借用cpu计算资源的方法
CN113535087A (zh) 数据迁移过程中的数据处理方法、服务器及存储***
Nivetha et al. Modeling fuzzy based replication strategy to improve data availabiity in cloud datacenter
CN110908783A (zh) 一种云数据中心虚拟机的管控方法、***及设备
US12032988B2 (en) Virtual machine operation management in computing devices
CN110798362A (zh) 一种基于物联网的多数据中心在线管理***及管理方法
US20140244954A1 (en) Identifying and accessing reference data in an in-memory data grid
CN109558214B (zh) 异构环境下宿主机资源管理方法、装置和存储介质
CN113656181A (zh) 一种实时应用集群实例资源的发放方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20827514

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20827514

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 29/03/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20827514

Country of ref document: EP

Kind code of ref document: A1