CN108965167A - A kind of distribution method and device of cloud resource - Google Patents
A kind of distribution method and device of cloud resource Download PDFInfo
- Publication number
- CN108965167A CN108965167A CN201810797844.1A CN201810797844A CN108965167A CN 108965167 A CN108965167 A CN 108965167A CN 201810797844 A CN201810797844 A CN 201810797844A CN 108965167 A CN108965167 A CN 108965167A
- Authority
- CN
- China
- Prior art keywords
- resource type
- resource
- cloud resources
- allocation
- allocation process
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/70—Admission control; Resource allocation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
Abstract
本发明实施例公开了一种云资源的分配方法,包括:接收到对云资源的申请后,确定所述云资源所属的资源类型;当所确定的资源类型为新增的资源类型时,将所确定的资源类型与已建立的多个分配流程中的一个进行映射;执行所确定的资源类型映射的分配流程,以进行所述云资源的分配。通过本发明的方案,解决了新增一种或几种资源类型的申请,而无需随之变动扩充原有的分配流程及业务代码等问题。
The embodiment of the present invention discloses a method for allocating cloud resources, including: after receiving an application for cloud resources, determining the resource type to which the cloud resources belong; The determined resource type is mapped with one of multiple established allocation processes; the allocation process mapped to the determined resource type is executed to allocate the cloud resources. Through the solution of the invention, the application for adding one or several types of resources is solved without changing and expanding the original distribution process and business codes.
Description
技术领域technical field
本发明涉及云技术,尤其涉及一种云资源的分配方法及装置。The present invention relates to cloud technology, in particular to a method and device for allocating cloud resources.
背景技术Background technique
在云环境下,计算、存储、网络、容器等数据中心的基础设施资源会按需提供给租户使用,但是,由于资源是有限度的,并且,管理人员也不知道每个租户会具体需求多少资源,这就需要租户去主动按需申请所需要的资源类型与资源配额(类似日常生活中的用水、用电的购买场景),并且,在审批通过后,会要求自动创建出相应的资源,比如,申请虚拟机,审批通过后,自动创建虚拟机。In a cloud environment, computing, storage, network, container and other data center infrastructure resources will be provided to tenants on demand. However, because resources are limited, and managers do not know how much each tenant will specifically need Resources, which requires tenants to actively apply for the required resource types and resource quotas on demand (similar to the purchase scenarios of water and electricity in daily life), and, after approval, they will be required to automatically create corresponding resources. For example, apply for a virtual machine, and after the approval is approved, the virtual machine will be created automatically.
当前很多云平台系统已经提供了资源分配功能,但通常是一种资源类型对应一种分配流程,这就面临着随着申请资源类型的扩展而导致原有的分配流程的业务代码随之扩充的问题。如何做到新增一种或几种资源类型的申请分配而无需随之变动扩充原有的分配流程业务代码是亟待解决的技术问题。At present, many cloud platform systems have provided resource allocation functions, but usually one resource type corresponds to one allocation process, which is faced with the expansion of the business code of the original allocation process as the application resource type expands. question. How to add one or several resource types to apply for allocation without changing and expanding the original allocation process business code is a technical problem that needs to be solved urgently.
发明内容Contents of the invention
本发明的主要目的在于提供一种云资源的分配方法及装置,可以实现当新增一种或几种资源类型时,无需变动扩充原有的分配流程以及分配流程的业务代码。The main purpose of the present invention is to provide a method and device for allocating cloud resources, which can realize that when one or several types of resources are added, the original allocation process and the business code of the allocation process do not need to be changed or expanded.
为了解决上述技术问题,本发明提供了一种云资源的分配方法,包括:In order to solve the above technical problems, the present invention provides a method for allocating cloud resources, including:
一种云资源的分配方法,其特征在于,所述方法包括:A method for allocating cloud resources, characterized in that the method comprises:
接收到对云资源的申请后,确定所述云资源所属的资源类型;After receiving the application for the cloud resource, determine the resource type to which the cloud resource belongs;
当所确定的资源类型为新增的资源类型时,将所确定的资源类型与已建立的多个分配流程中的一个进行映射;When the determined resource type is a newly added resource type, mapping the determined resource type with one of multiple established allocation processes;
执行所确定的资源类型映射的分配流程,以进行所述云资源的分配。Execute the determined resource type mapping allocation process to allocate the cloud resources.
进一步地,所述接收到对云资源的申请之前,所述方法还包括:Further, before receiving the application for cloud resources, the method also includes:
预先定义多种资源类型;Multiple resource types are pre-defined;
根据预定规则将所述预先定义的多种资源类型划分为不同的类别;Dividing the predefined resource types into different categories according to predetermined rules;
针对不同的类别,建立与每个类别对应的分配流程;For different categories, establish an allocation process corresponding to each category;
并建立所述资源类型与所述分配流程的映射关系。And establish a mapping relationship between the resource type and the allocation process.
进一步地,所述资源类型与所述分配流程是一对一或者多对一的映射关系。Further, the resource type and the allocation process are in a one-to-one or many-to-one mapping relationship.
进一步地,所述将所确定的资源类型与已建立的多个分配流程中的一个进行映射,包括:Further, said mapping the determined resource type with one of multiple established allocation processes includes:
根据所述预定规则判断所确定的资源类型所属的类别;judging the category to which the determined resource type belongs according to the predetermined rule;
在已建立的多个分配流程中,根据所述类别确定所对应的分配流程;Among the multiple established allocation processes, determine the corresponding allocation process according to the category;
将所确定的资源类型与所确定的分配流程进行映射。Map identified resource types with identified allocation processes.
进一步地,所述执行所确定的资源类型映射的分配流程,包括:Further, the allocation process of executing the determined resource type mapping includes:
审批所述对云资源的申请后,调用资源管理接口及所确定的资源类型的相关参数;After approving the application for cloud resources, call the resource management interface and related parameters of the determined resource type;
通过所述资源管理接口将所述相关参数发送至资源管理模块,以用于对所申请的云资源进行管理和创建。The relevant parameters are sent to the resource management module through the resource management interface, so as to manage and create the applied cloud resources.
为了解决上述问题,本发明还提供了一种云资源的分配装置,包括:存储器和处理器;其特征在于:In order to solve the above problems, the present invention also provides a device for allocating cloud resources, including: a memory and a processor; it is characterized in that:
所述存储器,用于保存用于云资源的分配的程序;The memory is used to store programs for cloud resource allocation;
所述处理器,用于读取执行所述用于云资源的分配的的程序,执行如下操作:The processor is configured to read and execute the program for allocating cloud resources, and perform the following operations:
接收到对云资源的申请后,确定所述云资源所属的资源类型;After receiving the application for the cloud resource, determine the resource type to which the cloud resource belongs;
当所确定的资源类型为新增的资源类型时,将所确定的资源类型与已建立的多个分配流程中的一个进行映射;When the determined resource type is a newly added resource type, mapping the determined resource type with one of multiple established allocation processes;
执行所确定的资源类型映射的分配流程,以进行所述云资源的分配。Execute the determined resource type mapping allocation process to allocate the cloud resources.
进一步,所述处理器读取执行所述用于云资源的分配的程序,还执行如下操作:Further, the processor reads and executes the program for allocating cloud resources, and also performs the following operations:
所述接收到对云资源的申请之前,预先定义多种资源类型;Before receiving the application for cloud resources, pre-define multiple resource types;
根据预定规则将所述预先定义的多种资源类型划分为不同的类别;Dividing the predefined resource types into different categories according to predetermined rules;
针对不同的类别,建立与每个类别对应的分配流程;For different categories, establish an allocation process corresponding to each category;
并建立所述资源类型与所述分配流程的映射关系。And establish a mapping relationship between the resource type and the allocation process.
进一步,所述处理器读取执行所述用于云资源的分配的程序,还执行如下操作:Further, the processor reads and executes the program for allocating cloud resources, and also performs the following operations:
所述资源类型与所述分配流程是一对一或者多对一的映射关系。The resource type and the allocation process are in a one-to-one or many-to-one mapping relationship.
进一步,所述将所确定的资源类型与已建立的多个分配流程中的一个进行映射,包括:Further, said mapping the determined resource type with one of multiple established allocation processes includes:
根据所述预定规则判断所确定的资源类型所属的类别;judging the category to which the determined resource type belongs according to the predetermined rule;
在已建立的多个分配流程中,根据所述类别确定所对应的分配流程;Among the multiple established allocation processes, determine the corresponding allocation process according to the category;
将所确定的资源类型与所确定的分配流程进行映射。Map identified resource types with identified allocation processes.
进一步,所述执行所确定的资源类型映射的分配流程,包括:Further, the allocation process of executing the determined resource type mapping includes:
审批所述对云资源的申请后,调用资源管理接口及所确定的资源类型的相关参数;After approving the application for cloud resources, call the resource management interface and related parameters of the determined resource type;
通过所述资源管理接口将所述相关参数发送至资源管理模块,以用于对所申请的云资源进行管理和创建。The relevant parameters are sent to the resource management module through the resource management interface, so as to manage and create the applied cloud resources.
本发明提出了一种云资源的分配方法,包括:接收到对云资源的申请后,确定所述云资源所属的资源类型当所确定的资源类型为新增的资源类型时,将所确定的资源类型与已建立的多个分配流程中的一个进行映射;执行所确定的资源类型映射的分配流程,以进行所述云资源的分配。通过本发明的方案,解决了新增一种或几种资源类型的申请,而无需随之变动扩充原有的分配流程及业务代码等问题。The present invention proposes a method for allocating cloud resources, including: after receiving an application for cloud resources, determining the resource type to which the cloud resources belong; The type is mapped with one of multiple established allocation processes; and the determined allocation process mapped to the resource type is executed to allocate the cloud resources. Through the solution of the invention, the application for adding one or several types of resources is solved without changing and expanding the original allocation process and business codes.
本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
附图说明Description of drawings
附图用来提供对本发明技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本发明的技术方案,并不构成对本发明技术方案的限制。The accompanying drawings are used to provide a further understanding of the technical solution of the present invention, and constitute a part of the description, and are used together with the embodiments of the application to explain the technical solution of the present invention, and do not constitute a limitation to the technical solution of the present invention.
图1为本发明实施例的云资源的分配方法的流程图;Fig. 1 is a flow chart of a method for allocating cloud resources according to an embodiment of the present invention;
图2为本发明实施例的云资源的分配装置的示意图;FIG. 2 is a schematic diagram of a device for allocating cloud resources according to an embodiment of the present invention;
图3为本发明实施例的云资源的资源类型定义的流程图;FIG. 3 is a flowchart of resource type definition of cloud resources according to an embodiment of the present invention;
图4为本发明实施例的资源类型与分配流程映射关系的示意图;FIG. 4 is a schematic diagram of a mapping relationship between a resource type and an allocation process according to an embodiment of the present invention;
图5为本发明实施例的建立资源类型与分配流程映射关系的流程图;FIG. 5 is a flowchart of establishing a mapping relationship between a resource type and an allocation process according to an embodiment of the present invention;
图6为本发明实施例的资源管理的流程图。FIG. 6 is a flow chart of resource management in an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚明白,下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。In order to make the purpose, technical solution and advantages of the present invention more clear, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined arbitrarily with each other.
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The steps shown in the flowcharts of the figures may be performed in a computer system, such as a set of computer-executable instructions. Also, although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that shown or described herein.
图1是本发明实施例的云资源的分配方法的流程图,根据该流程图,本实施例的云资源的分配方法,包括:FIG. 1 is a flow chart of a method for allocating cloud resources in an embodiment of the present invention. According to the flow chart, the method for allocating cloud resources in this embodiment includes:
步骤100:接收到对云资源的申请后,确定所述云资源所属的资源类型;Step 100: After receiving the application for the cloud resource, determine the resource type to which the cloud resource belongs;
在本实施例中,在接收到对云资源的申请后,确定该申请的云资源所属的资源类型。In this embodiment, after the application for cloud resources is received, the resource type to which the applied cloud resources belong is determined.
可选地,在接收到对云资源的申请之前,预先定义多种资源类型,即对于不同云资源所属的资源类型,可以预先定义,例如,虚拟机定义为VM,网络定义为NET。Optionally, before receiving an application for cloud resources, multiple resource types are pre-defined, that is, the resource types to which different cloud resources belong can be pre-defined, for example, a virtual machine is defined as VM, and a network is defined as NET.
可选地,将上述预先定义的资源类型保存到云平台的数据库中。Optionally, save the above-mentioned pre-defined resource types in the database of the cloud platform.
可选地,根据资源类型的重要性等相关因素设定分类规则,将预先定义的多种资源类型根据分类规则划分为不同的类别;例如:将主机、云硬盘等划分为第一类别;将云物理机、共享盘等划分为第二类别。并根据不同的类别,建立与每个类别对应的分配流程,在建立分配流程以后,将每个类别的资源类型与分配流程进行映射;例如:将第一类别的资源类型与第一分配流程进行映射,将第二类别的资源类型与第二分配流程进行映射。Optionally, classification rules are set according to the importance of resource types and other related factors, and multiple predefined resource types are divided into different categories according to the classification rules; for example: hosts, cloud hard disks, etc. are divided into the first category; Cloud physical machines, shared disks, etc. are classified into the second category. And according to different categories, establish an allocation process corresponding to each category. After the allocation process is established, map the resource type of each category with the allocation process; for example: match the resource type of the first category with the first allocation process Mapping, mapping the resource type of the second category with the second allocation process.
可选地,所述建立与每个类别对应的分配流程后,建立所述资源类型与所述分配流程的映射关系表。Optionally, after the allocation process corresponding to each category is established, a mapping relationship table between the resource type and the allocation process is established.
在本实施例的一些可选的实现方式中,所述映射关系表中,所述资源类型与所述分配流程是一对一或者多对一的映射关系,具体包括:一种类别可以包括一种资源类型或者多种资源类型,将类别与分配流程进行映射时,类别与分配流程可以是一对一的关系;资源类型和分配流程之间可以是一对一,或多对一的关系;其中,不同分配流程之间,至少审批步骤是不同的。In some optional implementations of this embodiment, in the mapping relationship table, the resource type and the allocation process are in a one-to-one or many-to-one mapping relationship, specifically including: a category may include a One resource type or multiple resource types, when mapping the category and the allocation process, the category and the allocation process can be in a one-to-one relationship; the resource type and the allocation process can be in a one-to-one or many-to-one relationship; Wherein, among different allocation processes, at least the approval steps are different.
步骤101:当所确定的资源类型为新增的资源类型时,将所确定的资源类型与已建立的多个分配流程中的一个进行映射。Step 101: When the determined resource type is a newly added resource type, map the determined resource type with one of multiple established allocation processes.
在本实施例中,首先对所确定的资源类型进行判断,如果是新增的资源类型时,将所确定的资源类型与已建立的多个分配流程中的一个分配流程进行映射。In this embodiment, the determined resource type is first judged, and if it is a newly added resource type, the determined resource type is mapped to one of the multiple established allocation processes.
在本实施例的一些可选的实现方式中,将所确定的资源类型与已建立的多个分配流程中的一个进行映射,可以包括:根据所述预定规则判断所确定的资源类型所属的类别;在已建立的多个分配流程中,根据所述类别确定所对应的分配流程;将所确定的资源类型与所确定的分配流程进行映射。例如:若新增的资源类型为A,根据预先设定的分类规则对新增的资源类型A进行判断,若资源类型A属于第一类别,那么将新增的资源类型A与第一类别相映射的第一分配流程建立映射关系。若资源类型A根据预先设定的分类规则进行判断,不属于已经划分的任何类别,那么需要重新建立新的类别,并建立新的类别的分配流程,执行建立分配流程的指令,当建立完新的分配流程后,假设新的分配流程为第三分配流程,将新增的资源类型A与第三分配流程进行映射。In some optional implementation manners of this embodiment, mapping the determined resource type with one of multiple established allocation processes may include: judging the category to which the determined resource type belongs according to the predetermined rule ; Among the multiple established allocation processes, determine the corresponding allocation process according to the category; map the determined resource type with the determined allocation process. For example: if the newly added resource type is A, judge the newly added resource type A according to the preset classification rules, if the resource type A belongs to the first category, then associate the newly added resource type A with the first category The mapping first allocation process establishes the mapping relationship. If the resource type A is judged according to the preset classification rules and does not belong to any category that has been classified, then a new category needs to be re-established, and the allocation process of the new category needs to be established, and the instruction for establishing the allocation process will be executed. After the allocation process, assuming that the new allocation process is the third allocation process, the newly added resource type A is mapped to the third allocation process.
步骤102:执行所确定的资源类型映射的分配流程,以进行所述云资源的分配。Step 102: Execute the determined allocation process of resource type mapping, so as to allocate the cloud resources.
在本实施中,执行所确定的资源类型映射的分配流程,以进行所述云资源的分配;其中,资源类型与所述分配流程可以是一对一或者多对一的映射关系。具体实现过程例如,如果所确定的资源类型A,相映射的分配流程为第一分配流程;执行第一分配流程的分配流程,在执行完分配流程后,进行云资源的分配。In this implementation, the determined resource type mapping allocation process is executed to allocate the cloud resources; wherein, the resource type and the allocation process may be in a one-to-one or many-to-one mapping relationship. For example, if the determined resource type is A, the corresponding allocation process is the first allocation process; the allocation process of the first allocation process is executed, and the cloud resources are allocated after the allocation process is completed.
在本实施例的一些可选的实现方式中,所述执行所确定的资源类型映射的分配流程,包括:审批所述云资源的申请后,调用资源管理接口及所确定的资源类型的相关参数;通过所述资源管理接口将所述相关参数发送至资源管理模块,以用于所申请云资源的管理和创建。In some optional implementations of this embodiment, the execution of the determined resource type mapping allocation process includes: after approving the application for the cloud resource, calling the resource management interface and related parameters of the determined resource type ; sending the related parameters to the resource management module through the resource management interface, so as to manage and create the requested cloud resources.
需要说明的是,上述内容仅是本发明的具体实施例,与上述实施例相同或相似的实施例,以及上述实施例的变体都在本发明的保护范围之内。It should be noted that the above-mentioned content is only a specific embodiment of the present invention, and embodiments identical or similar to the above-mentioned embodiments, as well as variations of the above-mentioned embodiments, are within the protection scope of the present invention.
另外,本申请提供了一种云资源的分配装置的一个实施例,该装置实施例与图1所示的方法实施例对应,该装置具体可以应用于各种云平台中。In addition, the present application provides an embodiment of an apparatus for allocating cloud resources, the apparatus embodiment corresponds to the method embodiment shown in FIG. 1 , and the apparatus can be specifically applied to various cloud platforms.
如图2所示,本实施例的云资源的分配装置包括:存储器和处理器;As shown in FIG. 2, the device for allocating cloud resources in this embodiment includes: a memory and a processor;
所述存储器,用于保存用于云资源的分配的程序;The memory is used to store programs for cloud resource allocation;
所述处理器,用于读取执行所述用于云资源的分配的程序,执行如下操作:The processor is configured to read and execute the program for allocating cloud resources, and perform the following operations:
接收到对云资源的申请后,确定所述云资源所属的资源类型;After receiving the application for the cloud resource, determine the resource type to which the cloud resource belongs;
当所确定的资源类型为新增的资源类型时,将所确定的资源类型与已建立的多个分配流程中的一个进行映射;When the determined resource type is a newly added resource type, mapping the determined resource type with one of multiple established allocation processes;
执行所确定的资源类型映射的分配流程,以进行所述云资源的分配。Execute the determined resource type mapping allocation process to allocate the cloud resources.
可选地,所述处理器读取执行所述用于云资源的分配的程序,还执行如下操作:所述接收到对云资源的申请之前,预先定义多种资源类型;根据预定规则将所述预先定义的多种资源类型划分为不同的类别;针对不同的类别,建立与每个类别对应的分配流程。Optionally, the processor reads and executes the program for allocating cloud resources, and further performs the following operations: before receiving the application for cloud resources, pre-defines multiple types of resources; The multiple predefined resource types mentioned above are divided into different categories; for different categories, an allocation process corresponding to each category is established.
可选地,所述资源类型与所述分配流程是一对一或者多对一的映射关系。Optionally, the resource type and the allocation process are in a one-to-one or many-to-one mapping relationship.
可选地,所述将所确定的资源类型与已建立的多个分配流程中的一个进行映射,包括:根据所述预定规则判断所确定的资源类型所属的类别;在已建立的多个分配流程中,根据所述类别确定所对应的分配流程;将所确定的资源类型与所确定的分配流程进行映射。Optionally, the mapping the determined resource type with one of the multiple established allocation processes includes: judging the category to which the determined resource type belongs according to the predetermined rule; In the process, the corresponding allocation process is determined according to the category; and the determined resource type is mapped to the determined allocation process.
可选地,所述执行所确定的资源类型映射的分配流程,包括:审批所述对云资源的申请后,调用资源管理接口及所确定的资源类型的相关参数;通过所述资源管理接口将所述相关参数发送至资源管理模块,以用于对所申请的云资源进行管理和创建。Optionally, the execution of the determined allocation process of resource type mapping includes: after approving the application for cloud resources, calling the resource management interface and related parameters of the determined resource type; The relevant parameters are sent to the resource management module for managing and creating the applied cloud resources.
本实施例的一个具体示例的实施过程如下:The implementation process of a specific example of this embodiment is as follows:
步骤1.预先定义资源类型,例如,虚拟机定义为VM,网络定义为NET。Step 1. Predefine the resource type, for example, a virtual machine is defined as VM, and a network is defined as NET.
步骤2.将预先定义资源类型保存到后台数据库中,见图3。Step 2. Save the predefined resource type to the background database, see Figure 3.
步骤3.预先建立资源类型与分配流程的映射关系,见图4、图5。Step 3. Establish the mapping relationship between resource types and allocation processes in advance, see Figure 4 and Figure 5.
步骤4.对云资源的申请审批通过后,调用资源管理接口及所确定的资源类型的相关参数;通过所述资源管理接口将所述相关参数发送至资源管理模块,以用于对所申请的云资源进行管理和创建。Step 4. After the application for cloud resources is approved, call the resource management interface and the relevant parameters of the determined resource type; send the relevant parameters to the resource management module through the resource management interface to be used for the application. Cloud resources are managed and created.
步骤5.后续如果新增一种需要进行云资源的分配的资源类型,只需要重复进行前面4步的操作即可,从而无需改动分配流程原有的业务逻辑。Step 5. If you add a new resource type that needs to be allocated for cloud resources, you only need to repeat the operations of the previous 4 steps, so that there is no need to change the original business logic of the allocation process.
在上述示例的步骤1中,预先定义资源类型,具体实现过程如图3的云资源的资源类型定义的流程图所示:In step 1 of the above example, the resource type is defined in advance, and the specific implementation process is shown in the flow chart of the resource type definition of cloud resources in Figure 3:
一,定义资源类型,例如,虚拟机定义为VM,网络定义为NET;First, define the resource type, for example, a virtual machine is defined as VM, and a network is defined as NET;
二,当定义资源类型后,保存所述资源类型到数据库中;Two, after defining the resource type, save the resource type in the database;
三,保存资源管理接口及参数到数据库;3. Save the resource management interface and parameters to the database;
四,结束资源类型的定义。Fourth, end the definition of the resource type.
在上述示例的步骤3中,所述资源类型与所述分配流程的映射关系也可以以映射关系图的形式进行展示,具体的映射关系如图4资源类型与分配流程映射关系的示意图所示:In step 3 of the above example, the mapping relationship between the resource type and the allocation process can also be displayed in the form of a mapping relationship diagram. The specific mapping relationship is shown in Figure 4, which is a schematic diagram of the mapping relationship between resource types and allocation processes:
其中,所述资源类型可以包括:项目、云主机、云硬盘、云物理机、浮动IP以及共享盘等等。Wherein, the resource type may include: project, cloud host, cloud hard disk, cloud physical machine, floating IP, shared disk, and so on.
与所述资源类型映射的分配流程可以包括:第一分配流程和第二分配流程;The allocation process mapped to the resource type may include: a first allocation process and a second allocation process;
从图4可以看出,资源类型中的项目、云主机和云硬盘与第一分配流程进行映射;云物理机、浮动IP和共享盘与第二分配流程进行映射;本示例中,资源类型与分配流程是多对一的关系。It can be seen from Figure 4 that the project, cloud host, and cloud hard disk in the resource type are mapped with the first allocation process; cloud physical machines, floating IPs, and shared disks are mapped with the second allocation process; in this example, resource types are mapped with The allocation process is a many-to-one relationship.
在上述示例的步骤3中,预先建立资源类型与分配流程的映射关系的流程图,如图5所示:In step 3 of the above example, the flow chart of the mapping relationship between the resource type and the allocation process is established in advance, as shown in Figure 5:
新建一个分配流程;Create a new allocation process;
在建立完分配流程后,从数据库中读取资源类型;After the allocation process is established, the resource type is read from the database;
将所述资源类型按照预设规则与分配流程进行映射;Mapping the resource type with the allocation process according to preset rules;
保存流程与资源类型的映射关系。Save the mapping relationship between processes and resource types.
在上述示例的步骤4中,资源管理的流程图,如图6所示:对云资源的申请审批通过后,调用资源管理接口及所确定的资源类型的相关参数;通过所述资源管理接口将所述相关参数发送至资源管理模块,以用于对所申请的云资源进行管理和创建。这样,在最后审批通过后的资源管理过程中(例如,审批成功后自动创建虚拟机的过程),可以直接从数据库中取出该资源类型的关联接口及参数(例如,取出创建虚拟机的接口及参数)并执行。In step 4 of the above example, the flow chart of resource management is shown in Figure 6: after the application for cloud resources is approved, the resource management interface and related parameters of the determined resource type are invoked; through the resource management interface, the The relevant parameters are sent to the resource management module for managing and creating the applied cloud resources. In this way, in the resource management process after the final approval (for example, the process of automatically creating a virtual machine after the approval is successful), the associated interface and parameters of the resource type can be directly taken out from the database (for example, the interface and parameters for creating a virtual machine are taken out) parameters) and execute.
本申请中的云资源分配方法的又一具体示例:1)定义资源类型,建立资源类型与分配流程之间的映射关系;2)资源管理接口配置模块,通过该模块,可以实现资源申请审批通过后,通过调用资源管理系统的相关接口,从而避免了对业务流程审批系统的代码侵入。Another specific example of the cloud resource allocation method in this application: 1) define the resource type, and establish the mapping relationship between the resource type and the allocation process; 2) the resource management interface configuration module, through which the resource application can be approved and approved Finally, by calling the relevant interface of the resource management system, the code intrusion into the business process approval system is avoided.
基于本实施例的一个具体示例,实现一种可灵活扩展的云资源分配方法及装置,可以实现新增一种或几种资源类型的申请,而无需随之变动扩充原有的分配流程及业务代码等问题。Based on a specific example of this embodiment, a flexible and scalable cloud resource allocation method and device can be implemented, which can realize the application of adding one or several types of resources without changing and expanding the original allocation process and business Code and other issues.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.
上述本发明实施例先后顺序仅仅为了描述,不代表实施例的优劣。任何与本发明设计思路相同或相似的方案,以及与本发明实施例相同或相似的方案和本发明实施例的变体都在本发明的保护范围之内。The sequence of the above-mentioned embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. Any solutions identical or similar to the design concept of the present invention, solutions identical or similar to the embodiments of the present invention and variations of the embodiments of the present invention are within the protection scope of the present invention.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products are stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technical fields , are all included in the scope of patent protection of the present invention in the same way.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810797844.1A CN108965167A (en) | 2018-07-19 | 2018-07-19 | A kind of distribution method and device of cloud resource |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810797844.1A CN108965167A (en) | 2018-07-19 | 2018-07-19 | A kind of distribution method and device of cloud resource |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN108965167A true CN108965167A (en) | 2018-12-07 |
Family
ID=64497877
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810797844.1A Pending CN108965167A (en) | 2018-07-19 | 2018-07-19 | A kind of distribution method and device of cloud resource |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108965167A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109726988A (en) * | 2018-12-26 | 2019-05-07 | 北京金山奇剑数码科技有限公司 | A kind of flow engine call method, device, electronic equipment and readable storage medium storing program for executing |
| CN114327743A (en) * | 2021-11-08 | 2022-04-12 | 浙江高信技术股份有限公司 | Cloud management system |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103780686A (en) * | 2014-01-15 | 2014-05-07 | 浪潮(北京)电子信息产业有限公司 | Method and system for customizing application approval procedure in cloud organization |
| CN104239141A (en) * | 2014-09-05 | 2014-12-24 | 北京邮电大学 | Task optimized-scheduling method in data center on basis of critical paths of workflow |
| CN104331772A (en) * | 2014-11-03 | 2015-02-04 | 浪潮(北京)电子信息产业有限公司 | Process management method and system of cloud data center for achieving resource examination and approval |
| CN105307130A (en) * | 2014-06-30 | 2016-02-03 | 中兴通讯股份有限公司 | Resource allocation method and resource allocation system |
-
2018
- 2018-07-19 CN CN201810797844.1A patent/CN108965167A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103780686A (en) * | 2014-01-15 | 2014-05-07 | 浪潮(北京)电子信息产业有限公司 | Method and system for customizing application approval procedure in cloud organization |
| CN105307130A (en) * | 2014-06-30 | 2016-02-03 | 中兴通讯股份有限公司 | Resource allocation method and resource allocation system |
| CN104239141A (en) * | 2014-09-05 | 2014-12-24 | 北京邮电大学 | Task optimized-scheduling method in data center on basis of critical paths of workflow |
| CN104331772A (en) * | 2014-11-03 | 2015-02-04 | 浪潮(北京)电子信息产业有限公司 | Process management method and system of cloud data center for achieving resource examination and approval |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109726988A (en) * | 2018-12-26 | 2019-05-07 | 北京金山奇剑数码科技有限公司 | A kind of flow engine call method, device, electronic equipment and readable storage medium storing program for executing |
| CN114327743A (en) * | 2021-11-08 | 2022-04-12 | 浙江高信技术股份有限公司 | Cloud management system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108287708B (en) | Data processing method and device, server and computer readable storage medium | |
| CN103414752B (en) | A kind of cloud data center virtual machine distribution method of network aware | |
| US9645852B2 (en) | Managing a workload in an environment | |
| CN105808323A (en) | Virtual machine creation method and system | |
| CN105704188A (en) | Deployment method and apparatus of applications and services | |
| CN103369038B (en) | Platform serves PaaS management platform and method | |
| CN106681799B (en) | It is inserted into the methods, devices and systems of disk | |
| CN109104491A (en) | A kind of micro services call method, device, server and storage medium | |
| CN109995814A (en) | Moving method and device, communication equipment, the storage medium of cloud host resource | |
| CN111736957A (en) | Hybrid deployment method, device, device and storage medium for multiple types of services | |
| CN105335235A (en) | IaaS mode based resource management system and method | |
| CN115469887A (en) | Release method and device, electronic device and storage medium of cloud-native application | |
| CN114930788B (en) | Method and system for securely processing integrated message streams in a multi-tenant container | |
| WO2021051569A1 (en) | Data isolation method and apparatus, computer device and storage medium | |
| CN108965167A (en) | A kind of distribution method and device of cloud resource | |
| CN114170007B (en) | Reversal transaction return message assembly method, program product, medium and electronic device | |
| CN108429642A (en) | A topology recognition method, system, device and computer storage medium | |
| CN107277146A (en) | A kind of distributed storage service traffics model generating method and system | |
| CN111192100A (en) | Workflow scheduling method, device and system | |
| CN110290172B (en) | Container application cloning method and device, computer equipment and storage medium | |
| CN113986879A (en) | A business data migration method and related device | |
| US20130145004A1 (en) | Provisioning using presence detection | |
| CN109450798B (en) | Method for managing routing table information and computer-readable storage medium | |
| US10958730B2 (en) | Mapping virtual network functions | |
| CN116795492A (en) | Resource scheduling methods, devices, equipment and readable storage media of cloud platforms |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181207 |