Resource allocation method and device, non-volatile storage medium, and processor

By obtaining and matching the labels of resource performance data, the allocation of virtual machines and hosts is optimized, and the low efficiency problem caused by uneven allocation of cloud computing resources is solved, and the resource utilization rate is maximized.

CN114840345BActive Publication Date: 2024-12-13CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210576990.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-25
Publication Date
2024-12-13
Estimated Expiration
2042-05-25

Smart Images

  • Figure CN114840345B_ABST
    Figure CN114840345B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for allocating resources, a non-volatile storage medium, and a processor. The method includes: obtaining performance data of resources, dividing resources into first resources and second resources according to the purpose of resources, wherein the first resource is a resource that provides capabilities, and the second resource is a resource that provides requirements; creating a first resource tag for the first resource and a second resource tag for the second resource according to the performance data; and determining a matching scheme for the first resource and the second resource by matching the first resource tag and the second resource tag. The present application solves the technical problem of low cloud resource efficiency caused by uneven cloud resource allocation during current cloud computing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing resources, and more specifically, to a method and device for allocating resources, a non-volatile storage medium, and a processor. Background Art

[0002] With the rapid development of cloud computing technology, it is being used more and more widely in life. Cloud computing is a technology that integrates originally scattered physical computer resources into a huge resource pool through virtualization technology to provide computing resources for users.

[0003] When generating virtual machines in batches, the virtualization system simply determines whether the remaining resources meet the demand, and then randomly allocates multiple virtual machines to the host machine. This may lead to two situations: the virtual machines are concentrated on the resources of one host machine, or the virtual machines are evenly distributed on each host machine. Concentrating multiple virtual machines on the resources of one host machine may cause the resource utilization rate of the host machine to be much higher than that of other hosts; if the virtual machine requires a large amount of resources, it will occupy the resources of the host machine; the resources available to each virtual machine will be reduced, resulting in a decrease in the performance of the virtual machine, or even the host machine will freeze or fail to generate virtual machines; if the virtual machines are evenly distributed, due to the inconsistent resource utilization of each host machine, it may cause uneven host machine resources.

[0004] Therefore, although this solution is simple and direct, allocating virtual machines on one host machine will cause the host machine to freeze due to excessive utilization, and the performance of the virtual machines will degrade due to insufficient capacity support; evenly distributing virtual machines will cause some hosts to run at low load due to fewer virtual machines, resulting in reduced cloud resource efficiency.

[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0006] The embodiments of the present application provide a method and device for allocating resources, a non-volatile storage medium, and a processor to at least solve the technical problem of low cloud resource efficiency caused by uneven cloud resource allocation during current cloud computing.

[0007] According to one aspect of an embodiment of the present application, a resource allocation method is provided, including the following steps: acquiring performance data of resources; dividing the resources into first resources and second resources according to their uses, wherein the first resource is a resource that provides capabilities, and the second resource is a resource that provides requirements; creating a first resource tag for the first resource and a second resource tag for the second resource according to the performance data; and determining a matching scheme for the first resource and the second resource by matching the first resource tag and the second resource tag.

[0008] Optionally, a first resource label is created for the first resource based on the performance data, including: if the performance data of the first resource simultaneously satisfies the following first condition, the first resource label is the first label: the average value of the first performance data is less than or equal to the first preset value and the maximum value is less than or equal to the second preset value; the average value of the second performance data is less than or equal to the third preset value and the maximum value is less than or equal to the fourth preset value; the average value of the third performance data is less than or equal to the fifth preset value; if the performance data of the first resource simultaneously satisfies the following second condition, the first resource label is the second label: the average value of the first performance data is greater than or equal to the sixth preset value and the maximum value is greater than or equal to the seventh preset value; the average value of the second performance data is greater than or equal to the eighth preset value and the minimum value is greater than or equal to the ninth preset value; the average value of the third performance data is greater than or equal to the tenth preset value; if the performance data of the first resource does not satisfy the first condition and does not satisfy the second condition, the first resource label is the third label.

[0009] Optionally, based on the performance data, a second resource label is created for the second resource, including: if the performance data of the second resource simultaneously satisfies the following third condition, the first resource label is the fourth label: the average value of the fourth performance data is less than or equal to the eleventh preset value and the maximum value is less than or equal to the twelfth preset value; the average value of the fifth performance data is less than or equal to the thirteenth preset value and the maximum value is less than or equal to the fourteenth preset value; the average value of the sixth performance data is less than or equal to the fifteenth preset value; if the performance data of the second resource simultaneously satisfies the following fourth condition, the first resource label is the fifth label: the average value of the fourth performance data is greater than or equal to the sixteenth preset value and the maximum value is greater than or equal to the seventeenth preset value; the average value of the fifth performance data is greater than or equal to the eighteenth preset value and the minimum value is greater than or equal to the nineteenth preset value; the average value of the sixth performance data is greater than or equal to the twentieth preset value; if the performance data of the second resource does not satisfy the third condition and does not satisfy the fourth condition, the first resource label is the sixth label.

[0010] Optionally, before determining the matching scheme of the first resource and the second resource by matching the first resource tag and the second resource tag, the method also includes: dynamically managing the first resource tag and the second resource tag respectively, wherein the dynamic management of the first resource tag includes: updating the first resource tag, predicting the first resource tag of the first resource after a first preset time period and calculating the influence coefficient of the first resource; updating the first resource tag according to a preset update frequency to ensure the validity of the first resource tag; dynamically managing the second resource tag includes: updating the second resource tag and predicting the second resource tag of the second resource after a second preset time period; updating the second resource tag according to the preset update frequency to ensure the validity of the second resource tag.

[0011] Optionally, predicting the first resource label of the first resource after a first preset duration of time includes: setting multiple time intervals, and classifying the performance data of the first resource into multiple time intervals according to the time of acquisition, respectively calculating the average values ​​of the first resource performance data in the multiple time intervals, and using the average value of the first resource performance data as the interval value of each time interval; using a preset algorithm to analyze multiple groups of corresponding time intervals and interval values ​​to obtain a mathematical relationship between the usage time of the first resource and the performance of the first resource, and predicting the first resource label of the first resource after the first preset duration of time according to the mathematical relationship.

[0012] Optionally, the method for calculating the impact coefficient of the first resource includes: calculating the average value of the performance utilization of the first resource; calculating the algebraic sum of performance data of all second resources that match the first resource and work on the first resource; and determining the ratio of the above average value to the algebraic sum as the impact coefficient of the first resource.

[0013] Optionally, predicting the second resource label of the second resource after a second preset time period includes: setting multiple time intervals, and classifying the performance data of the second resource into time intervals according to the time of acquisition, calculating the average value of the performance data of the second resource in each time interval, and using the average value as the interval value of each time interval; using a preset algorithm to analyze multiple groups of corresponding time intervals and interval values ​​to obtain a mathematical relationship between the usage time of the second resource and the performance of the second resource, and predicting the second resource label of the second resource after the second preset time period based on the mathematical relationship.

[0014] Optionally, by matching the first resource tag and the second resource tag, a matching scheme for the first resource and the second resource is determined, including: determining the allocatable margin of the first resource according to the first resource tag; determining the performance requirement of the second resource for the matching resource according to the tag of the second resource, and creating a tag for the matching resource according to the performance requirement; using the tag of the matching resource to filter out the first resource tag that meets the matching condition, wherein meeting the matching condition means that the allocatable margin of the first resource meets the performance requirement of the second resource for the matching resource; if the first resource tag is the first tag or the second tag, determining that the first resource tag meets the matching condition, and matching the second resource for the first resource; if the first resource tag is the third tag, determining that the first resource tag does not meet the matching condition, and refusing to match the second resource for the first resource.

[0015] Optionally, determining the matching scheme of the first resource and the second resource includes obtaining a first resource tag list for the first resource, wherein the first resource tag list includes: the current first resource tag of the first resource, the first resource tag after a first preset time period, and an influence coefficient of the first resource; obtaining a second resource tag list for the second resource, wherein the second resource tag list includes: the current second resource tag of the second resource, and the second resource tag after a second preset time period; calculating using the current first resource tag, the first resource tag after the first preset time period, the influence coefficient of the first resource, and the number of second resources matched with the first resource to obtain the first resource tag after the first resource is matched with the second resource; when the matched first resource tag is the third tag, re-matching is required until all first resources that meet the matching conditions are matched with the second resources.

[0016] According to another aspect of an embodiment of the present application, a resource allocation device is also provided, including: an acquisition module for acquiring performance data of resources; a classification module for dividing resources into a first resource and a second resource according to the purpose of the resources; wherein the first resource is a resource that provides capabilities, and the second resource is a resource that provides requirements; a creation module for creating a first resource tag for the first resource and a second resource tag for the second resource according to the performance data; and a matching module for determining a matching scheme for the first resource and the second resource by matching the first resource tag and the second resource tag.

[0017] According to another aspect of an embodiment of the present application, a non-volatile storage medium is provided, the non-volatile storage medium including a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the above resource allocation method.

[0018] According to yet another aspect of the embodiments of the present application, a processor is provided for running a program stored in a memory, wherein the above resource allocation method is executed when the program is running.

[0019] In the embodiment of the present application, the performance data of resources is obtained; the resources are divided into the first resource and the second resource according to the purpose of the resources; wherein the first resource is a resource that provides capabilities, and the second resource is a resource that provides requirements; a first resource tag is created for the first resource according to the performance data, and a second resource tag is created for the second resource; by matching the first resource tag and the second resource tag, a matching scheme of the first resource and the second resource is determined, and the host machine performance tag is dynamically updated according to the real-time utilization situation through cloud resource tag management and tag intelligent matching, and its available performance situation is marked; the virtual machine characteristic tag is marked according to the work order requirements, and virtual machine resources are allocated; when the virtual machine is created and deployed, the host machine and the virtual machine are matched according to the tag, and the allocation and deployment scheme of the virtual machine is determined through the algorithm model. The purpose of maximizing resource utilization is achieved, thereby realizing the technical effect of improving the efficiency of cloud resources, and further solving the technical problem of low cloud resource efficiency caused by uneven cloud resource allocation during cloud computing. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0021] Figure 1 It is a flow chart of a resource allocation method according to the related art;

[0022] Figure 2 is a structural diagram of a resource allocation device according to an embodiment of the present application;

[0023] Figure 3 It is a workflow diagram of a cloud network management according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] According to an embodiment of the present application, an embodiment of a method for allocating resources is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0027] To solve the above problems, the present application provides a resource allocation method, which introduces host performance labels and virtual machine characteristic labels, and creates host capability labels, including: rich, balanced, and tight; creates virtual machine demand labels, including: idle, balanced, and intensive; and dynamically manages the host and virtual machines. When allocating virtual machine resources, the relationship between the host and the virtual machine is matched according to the labels. Through the dynamic programming algorithm and the backpack strategy algorithm, different types of virtual machines are reasonably mixed on a host, thereby improving the host performance, fully considering the performance efficiency of the virtual machine, so that the overall performance reaches the optimal utilization value, and the purpose of improving the efficiency of cloud resources is achieved.

[0028] Figure 1 is a flow chart of a resource allocation method according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:

[0029] Step S102, obtaining performance data of resources.

[0030] Real-time monitoring and collection of performance data of existing resources, including the CPU computing power, memory capacity and data storage capacity of each resource, as well as the requirements for CPU computing power, memory capacity and storage capacity for normal operation.

[0031] Step S104: divide the resources into first resources and second resources according to their uses, wherein the first resources are resources that provide capabilities, and the second resources are resources that provide requirements.

[0032] All resources are divided into two categories according to their uses: first resources that provide capabilities and second resources that require capabilities; second resources, as loads, can achieve certain functions and need to be carried by first resources to be used; first resources, as carriers, provide capabilities for second resources, enabling them to achieve their functions.

[0033] Step S106: Create a first resource tag for the first resource and a second resource tag for the second resource according to the performance data.

[0034] Based on the obtained performance data, the performance usage of the first resource and the second resource is counted and the data is quantified by labels: according to the numerical value of the performance usage data, the resources are divided into different levels, and each level corresponds to a label type; the first resource is graded according to the provided capabilities; the second resource is graded according to the demand for capabilities.

[0035] Step S108: determining a matching solution between the first resource and the second resource by matching the first resource tag and the second resource tag.

[0036] The obtained performance data is analyzed to obtain the performance usage of the first resource and the second resource. According to the created first resource tag, a corresponding second resource tag is created, the first resource tag and the second resource tag are matched, and the matched first resource tag is calculated. If the matched first resource tag meets the conditions, it is considered to be a successful match; if the matched first resource tag does not meet the conditions, it is considered to have failed to match and needs to be re-matched until all first resources and second resources that meet the matching requirements are successfully matched.

[0037] Through the above steps, a method for allocating resources is provided to manage cloud resources in a labeled manner. The host performance label is dynamically updated according to the real-time utilization to identify its available performance status; the virtual machine characteristic label is identified according to the work order requirements; the label is intelligently matched to allocate virtual machine resources; the host and virtual machine are matched according to the label, and the allocation and deployment plan of the virtual machine is determined through the algorithm model, which can improve the overall performance.

[0038] According to an optional embodiment of the present application, a first resource tag is created for a first resource based on performance data, and the method is as follows: if the performance data of the first resource simultaneously satisfies the following first condition, the first resource tag is a first tag: the average value of the first performance data is less than or equal to the first preset value and the maximum value is less than or equal to the second preset value; the average value of the second performance data is less than or equal to the third preset value and the maximum value is less than or equal to the fourth preset value; the average value of the third performance data is less than or equal to the fifth preset value; if the performance data of the first resource simultaneously satisfies the following second condition, the first resource tag is a second tag: the average value of the first performance data is greater than or equal to the sixth preset value and the maximum value is greater than or equal to the seventh preset value; the average value of the second performance data is greater than or equal to the eighth preset value and the minimum value is greater than or equal to the ninth preset value; the average value of the third performance data is greater than or equal to the tenth preset value; if the performance data of the first resource does not satisfy the first condition and does not satisfy the second condition, the first resource tag is a third tag.

[0039] Dividing resources into different levels according to the numerical size of performance usage data can eliminate the volatility of data in practice and facilitate effective and reasonable resource allocation and overall scheduling.

[0040] In this embodiment, the first resource that provides the capability is regarded as a host machine, and three labels are created according to the performance utilization of the three aspects of the host machine's CPU computing power, memory capacity, and storage capacity. These three labels correspond to the three types of capability-rich, capability-balanced, and capability-constrained. For a capability-rich host machine: when providing capability, the average CPU utilization is less than or equal to 20%, and the maximum utilization is less than or equal to 30%; the average memory utilization is less than or equal to 30%, and the maximum utilization is less than or equal to 40%; the average storage capacity utilization is less than or equal to 40%. For a capability-constrained host machine: when providing capability, the average CPU utilization is greater than or equal to 70%, and the maximum utilization is greater than or equal to 80%; the average memory utilization is greater than or equal to 80%, and the maximum utilization is greater than or equal to 90%. A host machine that does not meet both conditions is a capability-balanced host machine.

[0041] According to another optional embodiment of the present application, creating a second resource tag for the second resource based on the performance data can be achieved by the following method: if the performance data of the second resource simultaneously satisfies the following third condition, the first resource tag is the fourth tag: the average value of the fourth performance data is less than or equal to the eleventh preset value and the maximum value is less than or equal to the twelfth preset value; the average value of the fifth performance data is less than or equal to the thirteenth preset value and the maximum value is less than or equal to the fourteenth preset value; the average value of the sixth performance data is less than or equal to the fifteenth preset value; if the performance data of the second resource simultaneously satisfies the following fourth condition, the first resource tag is the fifth tag: the average value of the fourth performance data is greater than or equal to the sixteenth preset value and the maximum value is greater than or equal to the seventeenth preset value; the average value of the fifth performance data is greater than or equal to the eighteenth preset value and the minimum value is greater than or equal to the nineteenth preset value; the average value of the sixth performance data is greater than or equal to the twentieth preset value; if the performance data of the second resource does not satisfy the third condition and does not satisfy the fourth condition, the first resource tag is the sixth tag.

[0042] In this embodiment, the second resource that provides the demand is regarded as a virtual machine. According to the three tag types of the host machine and the conditions for limiting the tag types, three virtual machine tag types and limiting conditions are created correspondingly, and the virtual machines are divided into three categories: demand idle type, demand balanced type, and demand intensive type. For demand idle type virtual machines: the average CPU utilization rate required at runtime is less than or equal to 20%, and the maximum utilization rate is less than or equal to 30%; the average memory utilization rate required is less than or equal to 30%, and the maximum utilization rate is less than or equal to 40%; the average storage capacity utilization rate required is less than or equal to 40%. For demand intensive virtual machines: the average CPU utilization rate required at runtime is greater than or equal to 70%, and the maximum utilization rate is greater than or equal to 80%; the average memory utilization rate required is greater than or equal to 80%, and the maximum utilization rate is greater than or equal to 90%. Virtual machines that do not meet the above two conditions are demand balanced virtual machines.

[0043] For virtual machines that have not yet matched a host, when creating a label, the label type and limiting conditions of the virtual machine are used as an evaluation model to evaluate the specification parameters of the virtual machine, and a label is created for the virtual machine based on the specification parameters of the virtual machine; for demand-balanced virtual machines; the number of CPU cores required at runtime is less than or equal to 4, the ratio of the required memory to the required number of CPU cores is less than or equal to 1, and the required storage space is less than or equal to 100G; for demand-intensive virtual machines; the number of CPU cores required at runtime is greater than or equal to 16, the ratio of the required memory to the required number of CPU cores is greater than or equal to 3, and the required storage space is greater than or equal to 300G. Virtual machines whose requirements for CPU, memory, and storage space at runtime do not fall into the above two situations are demand-balanced virtual machines.

[0044] It should be noted that the conditional thresholds for limiting the host machine tag type and the conditional thresholds for limiting the virtual machine tag type can both be statically configured.

[0045] According to another optional embodiment of the present application, by matching the first resource tag and the second resource tag, before determining the matching scheme of the first resource and the second resource, it is necessary to dynamically manage the first resource tag and the second resource tag respectively, wherein the dynamic management of the first resource tag includes: updating the first resource tag, predicting the first resource tag of the first resource after a first preset time period and calculating the influence coefficient of the first resource; updating the first resource tag according to a preset update frequency to ensure the validity of the first resource tag; dynamically managing the second resource tag includes: updating the second resource tag and predicting the second resource tag of the second resource after a second preset time; updating the second resource tag according to the preset update frequency to ensure the validity of the second resource tag.

[0046] The performance data of the first resource and the second resource are collected in real time, and the performance data of the first resource and the performance data of the second resource are analyzed respectively to determine the conditions satisfied by the performance data of the first resource and the performance data of the second resource, and the first resource tag and the second resource tag are updated according to the preset frequency to ensure the accuracy of subsequent tag matching. The performance data of the first resource and the second resource are counted regularly by day and hour, so as to obtain the performance usage of the resources in each time period, which is convenient for observing the performance trend of the resources.

[0047] In an optional embodiment of the present application, predicting a first resource label of a first resource after a first preset duration of time includes the following steps: setting multiple time intervals, and classifying the performance data of the first resource into multiple time intervals according to the time of acquisition, respectively calculating the average values ​​of the first resource performance data in the multiple time intervals, and using the average value of the first resource performance data as the interval value of each time interval; using a preset algorithm to analyze multiple groups of corresponding time intervals and interval values ​​to obtain a mathematical relationship between the usage time of the first resource and the performance of the first resource, and predicting the first resource label of the first resource after the first preset duration of time based on the mathematical relationship.

[0048] The obtained performance data of the first resource is statistically analyzed on a daily and hourly basis to obtain the performance usage of the first resource in each time period. Through the analysis of the digital curve fitting algorithm, the performance trend curve data can be generated to predict the performance prediction in the future time period. Since the time of data collection is a set of irregular discrete points, the corresponding interval value is also a set of discrete points on the plane. Through the curve fitting algorithm, this set of discrete points on the plane can be approximately depicted with a continuous curve, thereby obtaining the mathematical relationship between the usage time of the first resource and the performance of the first resource, so as to calculate the performance of the first resource after the first preset time period, which is convenient for predicting the first resource label in the future time period and improving the accuracy of label matching.

[0049] According to an optional embodiment of the present application, calculating the impact coefficient of the first resource includes the following steps: calculating the average value of the performance utilization of the first resource; calculating the algebraic sum of the performance data of all second resources that match the first resource and work on the first resource; and determining the ratio of the above average value to the algebraic sum as the impact coefficient of the first resource.

[0050] In order to accurately reflect the impact of virtual machine specifications on the performance of the host machine, the specification performance impact coefficient is calculated for each host machine. The performance impact coefficient of the host machine is the ratio of the average utilization of the host machine to the algebraic sum of the virtual machines working on the host machine. A host machine can be matched with multiple virtual machines, but a virtual machine can only be matched with one host machine. Only the virtual machines working on the host machine will affect the performance of the host machine. Since the utilization of each host machine is different, the specifications and quantity of the matched virtual machines are different, the impact coefficient of each host machine is also very different.

[0051] According to another optional embodiment of the present application, predicting the second resource label of the second resource after a second preset duration can be achieved by the following method: setting multiple time intervals, and classifying the performance data of the second resource into time intervals according to the time of acquisition, calculating the average value of the performance data of the second resource in each time interval, and using the average value as the interval value of each time interval; using a preset algorithm to analyze multiple groups of corresponding time intervals and interval values, obtain the mathematical relationship between the usage time of the second resource and the performance of the second resource, and predicting the second resource label of the second resource after the second preset duration based on the mathematical relationship. The method for predicting the second resource label after the second preset duration is the same as the method used to predict the first resource label after the first preset duration, and will not be repeated here.

[0052] According to an optional embodiment of the present application, a matching scheme for the first resource and the second resource is determined by matching a first resource tag and a second resource tag, including the following steps: determining the allocatable margin of the first resource according to the first resource tag; determining the performance requirement of the second resource for the matching resource according to the tag of the second resource, and creating a tag for the matching resource according to the performance requirement; using the tag of the matching resource to filter out the first resource tag that meets the matching condition, wherein meeting the matching condition means that the allocatable margin of the first resource meets the performance requirement of the second resource for the matching resource; if the first resource tag is the first tag or the second tag, determining that the first resource tag meets the matching condition, and matching the second resource for the first resource; if the first resource tag is the third tag, determining that the first resource tag does not meet the matching condition, and refusing to match the second resource for the first resource.

[0053] Create a second resource demand assessment model to derive the relationship between the second resource tag and the second resource performance data; confirm the performance of the first resource that can match it based on the second resource tag and the performance data, create a tag of the first resource that can match it accordingly, and filter the first resource tag that matches the tag.

[0054] In an optional embodiment according to the present application, determining the matching scheme of the first resource and the second resource can also be achieved by the following method: obtaining a first resource tag list of the first resource, wherein the first resource tag list includes: the current first resource tag of the first resource, the first resource tag after a first preset time period, and the influence coefficient of the first resource; obtaining a second resource tag list of the second resource, wherein the second resource tag list includes: the current second resource tag of the second resource, and the second resource tag after a second preset time period; using the current first resource tag, the first resource tag after the first preset time period, the influence coefficient of the first resource, and the number of second resources matched with the first resource to calculate, to obtain the first resource tag after the first resource is matched with the second resource; when the matched first resource tag is the third tag, it needs to be re-matched until all first resources that meet the matching conditions are matched with the second resources.

[0055] Match the first resource tag list of the first resource with the second resource tag list of the second resource: if the allocatable margin of the first resource cannot meet the demand of the second resource, do not match the second resource for the first resource; if the current first resource tag of the first resource is the third tag, do not match the second resource for the first resource; if after the first resource is matched with the second resource, the matched first resource tag is the third tag, the current matching scheme is invalid and needs to be re-matched until all first resources that meet the matching conditions are matched with the second resources, and the matching scheme of the first resource and the second resource is determined.

[0056] In order to more intuitively describe the label matching process, the virtual machine and the host machine are substituted into the present embodiment. Before matching, a list of allocatable margins for each capability of the host machine is obtained based on the cluster information; a list of host machine labels and a list of virtual machine labels for the most recent time period are obtained; the historical performance usage of the host machine and the virtual machine is obtained, and the performance usage of the host machine and the virtual machine is predicted. Matching is performed according to the following steps: virtual machines are classified according to labels, and according to the labels of virtual machines, the requirements of virtual machines for host performance are obtained, the application requirements of virtual machines are expanded according to the list, and dynamic matching is performed cyclically according to the list of applied virtual machines; hosts whose allocatable margins are not met are filtered out, and hosts whose host labels have capacity constraints are filtered out; the relationship between newly applied virtual machine labels and existing virtual machine labels is intelligently mixed through dynamic programming algorithms and backpack strategy algorithms to select the optimal host; the predicted value of the host label after deployment is calculated by first calculating the average value of the current label value in the host label list and the label value after the first preset time, then calculating the product of the number of virtual machines matching the host and the influence coefficient in the host label list, and finally calculating the sum of the above average value and the product. If the label enters the capacity constraint type, the host is temporarily marked as ignored and re-matched; the virtual machine is deployed on the host, and the corresponding data of the host is updated: allocatable margin, host label.

[0057] Figure 2 FIG. 1 is a structural diagram of a resource allocation device according to an embodiment of the present application, such as Figure 2 As shown, the device comprises:

[0058] An acquisition module 20, used to acquire performance data of resources;

[0059] A classification module 22, used to classify resources into first resources and second resources according to the usage of the resources, wherein the first resources are resources that provide capabilities and the second resources are resources that provide requirements;

[0060] A creation module 24, configured to create a first resource tag for the first resource and a second resource tag for the second resource according to the performance data;

[0061] The matching module 26 is used to determine a matching solution between the first resource and the second resource by matching the first resource tag and the second resource tag.

[0062] This device can achieve the goal of optimal and maximized use of resource pool efficiency, and has practical significance for improving resource utilization and service quality.

[0063] It should be noted that Figure 2 The preferred implementation of the illustrated embodiment can be found in Figure 1 The relevant description of the illustrated embodiment will not be repeated here.

[0064] In specific implementation, it can be applied to the network cloud network management support system. Figure 3 The figure shows the flow chart of resource allocation in the network cloud network management support system. As shown in the figure, the whole process consists of the work order task module, which schedules and manages the task requests of other modules according to the requirements of the resource creation link, and completes the work order task of resource application; the monitoring and analysis module monitors and collects the performance data of existing resources in real time, counts the historical performance usage, performs label quantification processing, and performs data mining and analysis according to the performance prediction algorithm to generate resource usage trend prediction data, and assists the virtual machine allocation module to optimize the allocation strategy; the resource management module selects the appropriate host machine resource range list according to the label quantification results of existing resources and the resource deployment parameters specified by the work order task module, and outputs the resource usage trend prediction data to the virtual machine allocation module for allocation processing; the virtual machine allocation module obtains the deployment plan that maximizes the overall resource pool efficiency according to the host machine resource range list and the virtual machine application parameters specified by the work order task module, combined with the host machine label data and resource usage trend prediction data, through the scheduling allocation strategy algorithm, and returns to the work order task module for virtual machine creation processing; the construction processing module sends commands to the resource pool for virtual machine construction processing according to the virtual machine deployment plan.

[0065] An embodiment of the present application further provides a non-volatile storage medium, which includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the above resource allocation method.

[0066] The above-mentioned non-volatile storage medium is used to store programs that perform the following functions: obtain performance data of resources; divide the resources into first resources and second resources according to the purpose of the resources; wherein the first resource is a resource that provides capabilities, and the second resource is a resource that provides requirements; create a first resource tag for the first resource and a second resource tag for the second resource according to the performance data; and determine a matching scheme for the first resource and the second resource by matching the first resource tag and the second resource tag.

[0067] An embodiment of the present application further provides a processor, which is used to run a program stored in a memory, wherein the above resource allocation method is executed when the program is running.

[0068] The above-mentioned processor is used to run a program that performs the following functions: obtaining performance data of resources; dividing resources into first resources and second resources according to their uses; wherein the first resource is a resource that provides capabilities, and the second resource is a resource that provides requirements; creating a first resource tag for the first resource and a second resource tag for the second resource according to the performance data; and determining a matching scheme for the first resource and the second resource by matching the first resource tag and the second resource tag.

[0069] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0070] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0071] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0072] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0073] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0074] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0075] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for allocating resources. It is characterized in that The following steps are involved: Get performance data for resources; According to the purpose of the resource, the resource is divided into a first resource and a second resource, wherein the first resource is a resource that provides capabilities, and the second resource is a resource that provides requirements; Creating a first resource tag for the first resource and a second resource tag for the second resource according to the performance data; By matching the first resource tag and the second resource tag, a matching scheme of the first resource and the second resource is determined, wherein before determining the matching scheme of the first resource and the second resource by matching the first resource tag and the second resource tag, the method also includes: dynamically managing the first resource tag and the second resource tag respectively, wherein the dynamic management of the first resource tag includes: updating the first resource tag, predicting the first resource tag of the first resource after a first preset time period and calculating the impact coefficient of the first resource, wherein the impact coefficient of the first resource is used to represent the impact of the second resource that matches the first resource and works on the first resource on the performance of the first resource; updating the first resource tag according to a preset update frequency to ensure the validity of the first resource tag; dynamically managing the second resource tag includes: updating the second resource tag and predicting the second resource tag of the second resource after a second preset time period; updating the second resource tag according to a preset update frequency to ensure the validity of the second resource tag.

2. The method according to claim 1, It is characterized in that The creating a first resource tag for the first resource according to the performance data includes: If the performance data of the first resource satisfies the following first condition at the same time, the first resource tag is a first tag: The average value of the first performance data is less than or equal to the first preset value and the maximum value is less than or equal to the second preset value; The average value of the second performance data is less than or equal to the third preset value and the maximum value is less than or equal to the fourth preset value; The average value of the third performance data is less than or equal to a fifth preset value; If the performance data of the first resource satisfies the following second condition at the same time, the first resource tag is the second tag: The average value of the first performance data is greater than or equal to a sixth preset value and the maximum value is greater than or equal to a seventh preset value; The average value of the second performance data is greater than or equal to an eighth preset value and the minimum value is greater than or equal to a ninth preset value; The average value of the third performance data is greater than or equal to a tenth preset value; If the performance data of the first resource does not satisfy the first condition and does not satisfy the second condition, the first resource tag is the third tag.

3. The method according to claim 2, It is characterized in that The creating a second resource tag for the second resource according to the performance data includes: If the performance data of the second resource satisfies the following third condition at the same time, the first resource tag is the fourth tag: The average value of the fourth performance data is less than or equal to the eleventh preset value and the maximum value is less than or equal to the twelfth preset value; The average value of the fifth performance data is less than or equal to the thirteenth preset value and the maximum value is less than or equal to the fourteenth preset value; The average value of the sixth performance data is less than or equal to the fifteenth preset value; If the performance data of the second resource simultaneously satisfies the following fourth condition, the first resource tag is the fifth tag: The average value of the fourth performance data is greater than or equal to the sixteenth preset value and the maximum value is greater than or equal to the seventeenth preset value; The average value of the fifth performance data is greater than or equal to the eighteenth preset value and the minimum value is greater than or equal to the nineteenth preset value; The average value of the sixth performance data is greater than or equal to the twentieth preset value; If the performance data of the second resource does not satisfy the third condition and does not satisfy the fourth condition, the first resource tag is the sixth tag.

4. The method according to claim 1, It is characterized in that Predicting a first resource tag of the first resource after a first preset time period, including: Setting multiple time intervals, and classifying the performance data of the first resource into the multiple time intervals according to the time when the performance data of the first resource is acquired, respectively calculating the average values ​​of the performance data of the first resource in the multiple time intervals, and using the average values ​​of the performance data of the first resource as the interval values ​​of each of the time intervals; A preset algorithm is used to analyze multiple groups of corresponding time intervals and interval values ​​to obtain a mathematical relationship between the usage time of the first resource and the performance of the first resource, and a first resource label of the first resource after a first preset time is predicted based on the mathematical relationship.

5. The method according to claim 1, It is characterized in that Calculating the impact coefficient of the first resource includes: Calculating an average value of the performance utilization of the first resource; Calculating the algebraic sum of performance data of all the second resources matching the first resource and working on the first resource; A ratio of the average value to the algebraic sum is determined as an influence coefficient of the first resource.

6. The method according to claim 1, It is characterized in that Predicting a second resource tag of the second resource after a second preset time period, includes: Setting multiple time intervals, and classifying the performance data of the second resource into the time intervals according to the time of acquisition, calculating the average value of the performance data of the second resource in each of the time intervals, and using the average value as the interval value of each of the time intervals; A preset algorithm is used to analyze multiple groups of corresponding time intervals and interval values ​​to obtain a mathematical relationship between the usage time of the second resource and the performance of the second resource, and the second resource label of the second resource after a second preset time is predicted based on the mathematical relationship.

7. The method according to claim 3, It is characterized in that Determining a matching scheme between the first resource and the second resource by matching the first resource tag and the second resource tag includes: Determining an allocatable margin of the first resource according to the first resource tag; Determining a performance requirement of the second resource for a matching resource according to the label of the second resource, and creating a label of the matching resource according to the performance requirement; Using the tag of the matching resource, filter out the first resource tag that meets the matching condition, wherein meeting the matching condition means that the allocatable margin of the first resource meets the performance requirement of the second resource for the matching resource; If the first resource tag is the first tag or the second tag, determine that the first resource tag satisfies the matching condition, and match the second resource for the first resource; If the first resource tag is the third tag, it is determined that the first resource tag does not satisfy the matching condition, and the first resource is refused to match the second resource.

8. The method according to claim 7, It is characterized in that Determining a matching scheme between the first resource and the second resource by matching the first resource tag and the second resource tag includes: Obtaining a first resource tag list of the first resource, wherein the first resource tag list includes: a current first resource tag of the first resource, the first resource tag after a first preset time period, and an influence coefficient of the first resource; Obtain a second resource tag list of the second resource, wherein the second resource tag list includes: The current second resource tag of the second resource, and the second resource tag after a second preset time period; Calculate using the current first resource label, the first resource label after a first preset time, the influence coefficient of the first resource, and the quantity of second resources matching the first resource to obtain the first resource label after the first resource matches the second resource; When the matched first resource tag is the third tag, re-matching is required until all the first resources meeting the matching condition are matched with the second resources.

9. A resource allocation device, It is characterized in that include: An acquisition module, used to acquire the performance data of the resource; a classification module, configured to classify the resources into first resources and second resources according to the uses of the resources, wherein the first resources are resources that provide capabilities, and the second resources are resources that provide requirements; a creation module, configured to create a first resource tag for the first resource and a second resource tag for the second resource according to the performance data; A matching module is used to determine a matching scheme of the first resource and the second resource by matching the first resource tag and the second resource tag, wherein before determining the matching scheme of the first resource and the second resource by matching the first resource tag and the second resource tag, the matching module is also used to: dynamically manage the first resource tag and the second resource tag respectively, wherein the dynamic management of the first resource tag includes: updating the first resource tag, predicting the first resource tag of the first resource after a first preset time period and calculating the impact coefficient of the first resource, wherein the impact coefficient of the first resource is used to represent the impact of a second resource that matches the first resource and works on the first resource on the performance of the first resource; updating the first resource tag according to a preset update frequency to ensure the validity of the first resource tag; dynamically managing the second resource tag includes: updating the second resource tag and predicting the second resource tag of the second resource after a second preset time period; updating the second resource tag according to a preset update frequency to ensure the validity of the second resource tag.

10. A non-volatile storage medium, It is characterized in that The non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute the resource allocation method described in any one of claims 1 to 8.

11. A processor, It is characterized in that The processor is used to run a program stored in the memory, wherein: When the program is running, the resource allocation method described in any one of claims 1 to 8 is executed.

Citation Information

Patent Citations

  • Resource scheduling method, apparatus and system

    CN108399101A

  • Resource scheduling method and device for cloud computing platform and storage medium

    CN113867937A