Cloud disk allocation method, device, electronic device and storage medium
By selecting the target storage warehouse in multiple dimensions, the problem of low resource utilization and load imbalance caused by the existing cloud disk allocation strategy is solved, and the efficiency and cost-effectiveness of the cloud block storage system are improved.
Patent Information
- Application Number
- CN202010567943.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-19
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-06-19
AI Technical Summary
The existing cloud disk allocation strategy considers a single dimension, resulting in low resource utilization and load imbalance in the cloud block storage system, which increases physical costs and operation and maintenance costs.
By obtaining the characteristic values in the cloud disk allocation request, the load characteristic values are determined, and the target storage warehouse is selected from multiple dimensions based on these characteristic values to achieve relatively balanced allocation of cloud disks and reduce the risk of resource overload.
It improves the resource utilization of the cloud block storage system, reduces load imbalance problems and operation and maintenance costs, and optimizes the operational efficiency of cloud services.
Smart Images

Figure CN111722806B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence and cloud storage technology. Specifically, the present application relates to a cloud disk allocation method, device, electronic device and storage medium. Background Art
[0002] Amazon, a world-renowned cloud service provider, launched cloud block storage technology in 2009 to support data storage management. Cloud disk is a typical application product of cloud block storage technology. It provides efficient and reliable storage devices for cloud server instances. It is a highly available, highly reliable, low-cost, customizable block storage device that supports persistent storage at the data block level. A typical cloud block storage system consists of four parts: client, virtual machine, cloud disk, and storage end. Users run applications on their own virtual machines and can apply for a large number of cloud disks for themselves to meet the storage needs of virtual machines. The actual storage space of the cloud disk comes from the allocation of backend storage. Considering data security and management convenience, cloud service providers often divide the storage end into multiple physically isolated computer rooms, each of which is called a warehouse. The cloud disk selects a warehouse for storage space allocation through a certain allocation strategy.
[0003] At present, cloud disk allocation strategies are mostly formulated based on the application capacity of cloud disks and the remaining capacity of each warehouse. Usually, the warehouse with the largest remaining capacity is selected for allocation. However, with the advent of the big data era, the number of cloud disk tenants (including corporate users and individual users) is increasing, and the amount of data in the cloud block storage system is growing rapidly, which has gradually exposed some drawbacks of the existing allocation strategies. Since the existing cloud disk allocation strategy considers a single dimension, it leads to low resource utilization and load imbalance in the cloud block storage system, resulting in huge physical and operation costs of cloud data centers. Summary of the invention
[0004] The embodiments of the present application provide a cloud disk allocation method, device, electronic device and storage medium, which can solve at least one of the problems existing in the prior art.
[0005] The specific technical solutions provided by the embodiments of this application are as follows:
[0006] The present invention provides a cloud disk allocation method, which includes:
[0007] Obtain a cloud disk allocation request, where the cloud disk allocation request includes a characteristic value of a cloud disk request characteristic;
[0008] Determine, based on the characteristic value of the cloud disk request characteristic, the characteristic value of the load characteristic corresponding to the cloud disk allocation request;
[0009] Determine a target storage warehouse corresponding to the cloud disk allocation request from each candidate storage warehouse based on a characteristic value of the cloud disk request characteristic and a characteristic value of the load characteristic;
[0010] From the target storage warehouse, determine the storage space that matches the cloud disk allocation request as the target cloud disk.
[0011] The embodiment of the present application provides a cloud disk allocation device, which includes:
[0012] An acquisition module is used to acquire a cloud disk allocation request, where the cloud disk allocation request includes a characteristic value of a cloud disk request characteristic;
[0013] A first determination module, configured to determine a characteristic value of a load characteristic corresponding to a cloud disk allocation request based on a characteristic value of a cloud disk request characteristic;
[0014] A second determination module is used to determine a target storage warehouse corresponding to the cloud disk allocation request from each candidate storage warehouse based on a characteristic value of the cloud disk request characteristic and a characteristic value of the load characteristic;
[0015] The third determination module is used to determine the storage space matching the cloud disk allocation request from the target storage warehouse as the target cloud disk.
[0016] An embodiment of the present application also provides an electronic device, which includes one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method provided in the embodiment of the present application.
[0017] The embodiment of the present application also provides a computer-readable storage medium, which is used to store a computer program. When the computer program runs on a processor, the processor can execute the method provided in the embodiment of the present application.
[0018] The beneficial effects of the technical solution provided by this application are:
[0019] The present application provides a cloud disk allocation method, device, electronic device and storage medium, which determines the characteristic value of the load characteristic based on the characteristic value of the cloud disk request characteristic contained in the cloud disk allocation request; determines the target storage warehouse from each candidate storage warehouse based on the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, and then determines the storage space matching the cloud disk allocation request from the target storage warehouse as the target cloud disk. Among them, the target cloud disk is finally determined based on the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, which realizes the relatively balanced allocation of cloud disks from multiple dimensions, reduces the problem of unbalanced load of each storage warehouse in the cloud block storage system, reduces the risk of storage warehouse resource overload, and improves the resource utilization of the cloud block storage system. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.
[0021] Figure 1 A schematic diagram of the system architecture of the cloud disk allocation method provided in an embodiment of the present application;
[0022] Figure 2 A flowchart of a cloud disk allocation method provided in an embodiment of the present application;
[0023] Figure 3 A schematic diagram of a cloud disk allocation system provided in an embodiment of the present application;
[0024] Figure 4 A schematic diagram of a cloud disk allocation process provided in an embodiment of the present application;
[0025] Figure 5 A schematic diagram of the structure of a cloud disk allocation device provided in an embodiment of the present application;
[0026] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0028] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0029] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0030] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.
[0031] At present, the storage method of the storage system is: create a logical volume, and when creating a logical volume, allocate physical storage space for each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, stores the data on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, Identity). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.
[0032] The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.
[0033] Artificial intelligence cloud service is generally referred to as AIaaS (AI as a Service). This is the service mode of a mainstream artificial intelligence platform. Specifically, the AIaaS platform will split several common AI services and provide independent or packaged services in the cloud. This service model is similar to opening an AI theme mall: all developers can access and use one or more artificial intelligence services provided by the platform through API interfaces. Some senior developers can also use the AI framework and AI infrastructure provided by the platform to deploy and operate their own cloud artificial intelligence services.
[0034] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.
[0035] The executor of the technical solution of this application is a server. The server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected by wired or wireless communication, and this application does not limit this.
[0036] The following is an example of an embodiment to introduce the system architecture of the technical solution of this application. Figure 1 As shown in the figure, the cloud block storage system consists of four parts: client, virtual machine, cloud disk and storage end. The cloud disk is mounted on the virtual machine in the form of a virtual volume. Users can access data far away in the cloud through the client (application on the virtual machine) just like accessing a local hard disk. The client communicates with the server (not shown in the figure) and sends a cloud disk allocation request to the server. The server communicates with the virtual machine and the storage end. The server obtains various resource data from various storage warehouses on the storage end according to the cloud disk allocation request and allocates storage space for the cloud disk on the virtual machine.
[0037] Specifically, the cloud disk allocation request received by the server contains a characteristic value of the cloud disk request feature. Based on the characteristic value of the cloud disk request feature corresponding to the cloud disk allocation request, the server determines the characteristic value of the load feature corresponding to the cloud disk allocation request, and determines the cloud disk allocation strategy based on the characteristic value of the cloud disk request feature and the characteristic value of the load feature, and determines the target storage warehouse corresponding to the cloud disk allocation request from each candidate storage warehouse (as shown in the figure Warehouse 1, Warehouse 2, ... Warehouse N) to allocate storage space for the new cloud disk. Among them, each candidate storage warehouse is subject to various resource restrictions, as shown in the figure, various resources include capacity, input / output operations per second (IOPS), and storage bandwidth. Since the storage end is divided into many storage warehouses, in order to ensure the load balancing of each storage warehouse and maximize resource utilization, a multi-dimensional allocation strategy is required to select a suitable storage warehouse for resource allocation for the new cloud disk.
[0038] The present application embodiment provides a cloud disk allocation method, such as Figure 2 As shown, the method includes:
[0039] Step S101, obtaining a cloud disk allocation request, wherein the cloud disk allocation request includes a characteristic value of a cloud disk request characteristic;
[0040] The server receives a cloud disk allocation request sent by the user through the client, where the cloud disk allocation request includes a feature value of a cloud disk request feature.
[0041] Among them, the cloud disk allocation request is a request for applying for a new cloud disk (also called a cloud disk to be allocated), and the cloud disk allocated according to the request can be called a target cloud disk. The cloud disk request feature is the attribute of the new cloud disk you want to apply for, such as the cloud disk type, cloud disk size, user type of the cloud disk application (such as whether it is a VIP), etc. The feature value of the cloud disk request feature is the attribute value of the attribute. For example, for the attribute of cloud disk size, the attribute value is the value of the capacity of the new cloud disk applied for, that is, the capacity value of the storage space; for another example, for the feature of the user type of the cloud disk application, the feature value is yes or no.
[0042] It should be noted that the cloud disk allocation request in the embodiment of the present application can be a request from a user to apply for a free cloud disk, or a request from a user to apply for a paid cloud disk, wherein the user in the embodiment of the present application can be an individual user or an enterprise user, etc., and the embodiment of the present application does not limit this. The solution of the embodiment of the present application can be applied to any application scenario for cloud disk application / allocation.
[0043] It can be understood that a cloud disk allocation request is a request for a user to order (i.e., apply for) a new cloud disk, and therefore, the cloud disk request feature can also be referred to as a cloud disk order feature. Optionally, the cloud disk order feature can be as shown in Table 1. The feature value of the order feature is the value of the order feature, and the order attribute information of the cloud disk can include at least one of the following:
[0044] Cloud disk type: the type of cloud disk used, including data disk and system disk;
[0045] Cloud disk size: the capacity of the cloud disk;
[0046] User attributes of the cloud disk: whether the cloud disk user is a VIP;
[0047] Attribute information of the virtual machine where the cloud disk is located: The attribute information of the virtual machine where the cloud disk is located includes at least one of the number of CPU cores of the virtual machine, the memory of the virtual machine, and the type of the virtual machine. The type of the virtual machine is the configuration information of the virtual machine, whether the virtual machine configuration is 1 core CPU and 1GB memory (also known as the selection of the cloud server corresponding to the cloud disk);
[0048] Payment mode: the user's payment method;
[0049] Local disk attributes: whether the cloud disk is a local disk;
[0050] Snapshot size: The backup snapshot capacity of the cloud disk.
[0051] Ordering Features meaning Disk_Type The cloud disk type is data disk or system disk Is_VIP Is the user a VIP user? VM_CPU Number of CPU cores in the user VM VM_Mem Memory size of the user VM Pay_Mode User payment method Is_Local Whether the cloud disk belongs to the local disk Is_1c1g Selection of cloud servers corresponding to cloud disks Snap_Use Snapshot size Disk_Size Cloud disk capacity
[0052] Table 1
[0053] Step S102, determining a characteristic value of a load characteristic corresponding to a cloud disk allocation request based on a characteristic value of a cloud disk request characteristic;
[0054] Specifically, the server may predict the characteristic value of the load characteristic corresponding to the cloud disk allocation request based on the characteristic value of the cloud disk request characteristic, predict the characteristic value of the load characteristic corresponding to the cloud disk allocation request, and then determine the cloud disk allocation strategy.
[0055] The load characteristic of the cloud disk is a characteristic of the load attribute information of the cloud disk, and the characteristic value of the load characteristic is a value of the load characteristic. The load attribute information of the cloud disk may include multiple dimensions, and may specifically include at least one of the following:
[0056] Average IOPS, peak IOPS, average storage bandwidth, and peak storage bandwidth.
[0057] Specifically, the average IOPS may include the average IOPS value within a preset time period, for example, the average IOPS value of the cloud disk within 30 days; the peak IOPS may include the maximum IOPS value within the preset time period, for example, the maximum IOPS value of the cloud disk within 30 days; the average storage bandwidth may include the average storage bandwidth value within the preset time period, for example, the average storage bandwidth value of the cloud disk within 30 days; the peak storage bandwidth may include the maximum storage bandwidth value within the preset time period, for example, the maximum storage bandwidth of the cloud disk within 30 days.
[0058] In the technical solution of the present application, the characteristic value of the load characteristic corresponding to the cloud disk allocation request can be predicted based on the characteristic value of the cloud disk request characteristic, and the relationship between the characteristic value of the characteristic corresponding to the cloud disk request characteristic of the allocated cloud disk and the characteristic value of the load characteristic, as shown in the following embodiments.
[0059] In a possible implementation, determining a characteristic value of a load characteristic corresponding to a cloud disk allocation request based on a characteristic value of a cloud disk request characteristic includes:
[0060] Determine a cloud disk target category corresponding to the cloud disk allocation request based on a feature value of the cloud disk request feature;
[0061] Based on the characteristic values of the load characteristics of each allocated cloud disk belonging to the cloud disk target category, the characteristic value of the load characteristic corresponding to the cloud disk allocation request is determined.
[0062] In practical applications, the characteristic value of the load characteristic can be predicted based on the characteristic value of the cloud disk request characteristic. The allocated cloud disks are classified to obtain multiple cloud disk categories. When a new cloud disk needs to be allocated, the type of the new cloud disk can be predicted first. Since the characteristic value of the load characteristic of the allocated cloud disk is known, the characteristic value of the load characteristic corresponding to the cloud disk allocation request can be determined based on the characteristic value of the load characteristic of the allocated cloud disk of the same category, that is, the predicted value of the characteristic value of the load characteristic of the new cloud disk to be allocated.
[0063] If the load characteristics of the allocated cloud disk include multiple dimensions, the load characteristics corresponding to the corresponding predicted cloud disk allocation request may also include multiple dimensions.
[0064] In one example, based on the subscription characteristics of the new cloud disk a1, it is determined that the new cloud disk a1 is a B1-class cloud disk. There are 10 allocated cloud disks belonging to the B1 class, namely b1, b2, ... b10. The average of the load characteristics of these 10 allocated cloud disks is used as the predicted value of the load characteristics of the new cloud disk a1. If the load characteristics of each allocated cloud disk include 3 dimensions, the predicted load characteristics of the new cloud disk also include 3 dimensions, and the characteristic value of the load characteristics of each dimension is the average of the characteristic values of the load characteristics of the corresponding dimension of the 10 allocated cloud disks.
[0065] In an embodiment of the present application, based on the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic of each allocated cloud disk belonging to the target category, the characteristic value of the load characteristic corresponding to the cloud disk allocation request is predicted; based on the characteristic value of the load characteristic of the allocated cloud disk of the same category as the new cloud disk, the characteristic value of the load characteristic corresponding to the cloud disk allocation request obtained has a high accuracy, which facilitates optimization of the cloud disk allocation strategy according to the prediction results.
[0066] How to determine the cloud disk target category corresponding to the cloud disk allocation request according to the feature value of the subscription feature corresponding to the cloud disk allocation request is specifically described in the following embodiment.
[0067] In a possible implementation, determining the cloud disk target category corresponding to the cloud disk allocation request based on the feature value of the cloud disk request feature includes:
[0068] Based on the feature value of the cloud disk request feature, the cloud disk target category corresponding to the cloud disk allocation request is obtained through the cloud disk classifier;
[0069] The cloud disk classifier is trained in the following way:
[0070] Obtain a training data set, the training data set includes various training samples, each training sample includes a feature value of each target cloud disk request feature of the sample cloud disk and a category label of the sample cloud disk;
[0071] The initial classifier is trained based on each training sample until the preset training end condition is met, and the initial classifier at the end of the training is used as the cloud disk classifier;
[0072] The input of the initial classifier is the feature value of each target cloud disk request feature of the sample cloud disk, and the output is the category label of the sample cloud disk.
[0073] In actual applications, based on the characteristic values of the cloud disk request features, the new cloud disk to be allocated is classified by the cloud disk classifier to determine the target category of the new cloud disk. Optionally, the specific form of the cloud disk classifier is not limited in the embodiment of the present application, such as but not limited to a classifier based on any of the following algorithms: decision tree classification algorithm, ensemble learning classification algorithm, random forest classification algorithm, etc. In actual applications, the specific classifier to be used can be selected or configured according to the actual application requirements and application scenarios. For example, the classification performance of the classifier, the training complexity or cost of the classifier, and other convenient considerations can be considered.
[0074] The specific process of training the cloud disk classifier may include:
[0075] First, a training sample set is obtained. Each training sample includes the feature values of each target cloud disk request feature of the sample cloud disk and the category label of the sample cloud disk. The sample cloud disk in the training sample set is all or part of the allocated cloud disk. The target cloud disk request feature is determined based on the cloud disk request feature of the allocated cloud disk. For example, the target cloud disk request feature can be one or more cloud disk request features selected according to a certain strategy. The category label of the sample cloud disk is the label of the target category corresponding to the allocated cloud disk.
[0076] The initial classifier is trained based on each training sample until the preset training end condition is met, and the initial classifier at the end of the training is used as the cloud disk classifier;
[0077] The input of the initial classifier is the feature value of each target cloud disk request feature of the sample cloud disk, and the output is the category label of the sample cloud disk.
[0078] In an embodiment of the present application, a cloud disk classifier is trained based on historical data of allocated cloud disks so that the category of the sample cloud disk predicted by the cloud disk separator is close to the category label of the sample cloud disk. After obtaining the trained cloud disk separator, the feature values of each target feature of the new cloud disk can be input into the cloud disk classifier, and the target category of the cloud disk corresponding to the cloud disk allocation request can be obtained through the cloud disk classifier. After obtaining the target category of the cloud disk corresponding to the cloud disk allocation request, the feature value of the load feature of the new cloud disk corresponding to the cloud disk allocation request can be predicted based on the cloud disk category corresponding to the cloud disk allocation request, so that the corresponding storage warehouse can be further determined based on the feature value of the cloud disk request feature and the feature value of the load feature.
[0079] Among them, the category label of each sample cloud disk is determined by load characteristics, as shown in the following embodiment for details.
[0080] In a possible implementation, the category label of each sample cloud disk is obtained in the following way:
[0081] Obtain characteristic values of the load characteristics of each sample cloud disk;
[0082] Cluster the load characteristics of each sample cloud disk to obtain cluster categories;
[0083] Based on each clustering category, determine the category label of each sample cloud disk.
[0084] In practical applications, each sample cloud disk can be an allocated cloud disk. After the allocated cloud disk runs for a period of time, the load characteristics corresponding to each cloud disk are obtained. According to the load characteristics of each sample cloud disk, a cloud disk clusterer based on machine learning is constructed to cluster cloud disks with similar load characteristics into one category, obtain each cluster category, and determine the cluster label corresponding to each cluster category.
[0085] The specific clusterer to be used can be selected or configured according to the actual application requirements and application scenarios. For example, the clustering performance of the clusterer, the training complexity or cost of the clusterer, and other convenient considerations can be considered. The form of the cloud disk clusterer is not limited in the embodiments of the present disclosure. Optionally, the cloud disk clusterer can be a clusterer based on any of the following clustering algorithms:
[0086] K-means clustering algorithm (k-means clustering algorithm), hierarchical clustering algorithm (Agglomerative Nesting, AGNES), density-based spatial clustering algorithm (Density-Based Spatial Clustering of Applications with Noise, DBSCAN).
[0087] Optionally, the k value of the k-means clustering algorithm can be determined based on empirical values, experimental values, or using a preconfigured strategy. For example, the k value can be determined using the elbow rule to ensure good clustering accuracy. As an optional solution, the value of k can be 3.
[0088] In an embodiment of the present application, by clustering the load characteristics of the sample cloud disks, the category label of each sample cloud disk can be obtained, that is, by clustering the load characteristics of each sample cloud disk, the classification result of the cloud disk is obtained based on the clustering result of the load characteristics, and the classification result can be used as the category label of the sample cloud disk for the training of the cloud disk classifier.
[0089] In a possible implementation, the load characteristics of the sample cloud disk include at least one of the following:
[0090] Average IOPS, peak IOPS, average storage bandwidth, and peak storage bandwidth.
[0091] In practical applications, after obtaining the training sample set, a step of preprocessing each training sample in the training sample set may also be included. The load characteristics of the sample cloud disk within a preset time period may be preprocessed to obtain the load characteristic mean within the preset time period.
[0092] In one example, the training samples in the training data set may include the characteristic values of the load characteristics of 20,000 sample cloud disks for 30 days. Assuming that the characteristic value of the load characteristics of each sample cloud disk is recorded every 5 minutes, there are 8,640 load characteristics corresponding to timestamps in a cloud disk within 30 days. The mean of the load characteristics of each sample cloud disk within 30 days is calculated to obtain the preprocessed load characteristics for clustering.
[0093] In addition, in addition to the category labels of the sample cloud disks, the training samples of the cloud disk classifier also include the feature values of each target cloud disk request feature. As can be seen from the previous description, the target cloud disk request feature can be determined based on at least one of the various information such as the experience value, the experimental value or the importance of the cloud disk request feature. Of course, it can also be determined based on the pre-configured strategy to screen out the more important cloud disk request features that have a greater impact on the cloud disk allocation results, providing a basis for further improving the resource utilization of the cloud storage system.
[0094] In a possible implementation, for each sample cloud disk, each target cloud disk request feature is determined in the following manner:
[0095] Obtain a candidate feature set, where the candidate feature set includes each candidate cloud disk request feature of each sample cloud disk;
[0096] Filtering a first target feature set from the candidate feature set according to the importance of each candidate cloud disk request feature;
[0097] Among them, the first target feature set includes at least one candidate cloud disk request feature, and the first classification accuracy of the cloud disk classifier corresponding to the first target feature set is greater than the second classification accuracy of the cloud disk classifier corresponding to the second target feature set, wherein the second target feature set includes the first target feature set, and the candidate cloud disk request feature with the greatest importance among the candidate cloud disk request features in the candidate feature set except the first target feature set.
[0098] In practical applications, the candidate feature set is a set of candidate cloud disk request features, and the first target feature set is screened out from the candidate feature set according to the importance of each candidate cloud disk request feature. The importance of each candidate cloud disk request feature can be characterized by a feature importance parameter. Based on this optional scheme, the target feature set with the best classification accuracy can be obtained as the final selected target feature set, that is, through this scheme, as many target cloud disk request features as possible with the highest possible classification accuracy can be screened out.
[0099] In one example, the target features screened out from the candidate feature set include: cloud disk type, cloud disk capacity, local disk attributes, virtual machine memory size, and virtual machine CPU core count.
[0100] In the embodiment of the present application, the target feature set is screened according to the importance of each candidate cloud disk request feature, which solves the problem of interference of features with less influence on the cloud disk classifier and reduces the training time of the cloud disk classifier.
[0101] For a specific implementation of selecting the first target feature set from the candidate feature set, see the following embodiment.
[0102] In a possible implementation, based on the importance of each candidate cloud disk request feature, the first target feature set is screened from the candidate feature set, including:
[0103] The following operations are performed cyclically according to the importance of each candidate cloud disk request feature until the second classification accuracy is less than the first classification accuracy, and the initial set at the end of the cycle is used as the first target feature set;
[0104] According to the importance of each candidate cloud disk request feature, the candidate cloud disk request feature with the greatest importance is selected from the candidate feature set and added to the initial set, and the candidate cloud disk request feature added to the first target feature set is deleted from the candidate feature set;
[0105] Constructing a second target feature set based on the most important candidate cloud disk request feature in the deleted candidate feature set and the first target feature set;
[0106] A first classification accuracy and a second classification accuracy of the cloud disk classifier corresponding to the first target feature set and the second target feature set, respectively, are determined.
[0107] In practical applications, the most important candidate cloud disk request features are selected from the candidate feature set in turn and added to the initial set, and the candidate cloud disk request features added to the first target feature set are deleted from the candidate feature set. The second target feature set is constructed based on the most important candidate cloud disk request features in the deleted candidate feature set and the first target feature set. The first classification accuracy and the second classification accuracy of the cloud disk classifier corresponding to the first target feature set and the second target feature set are determined respectively. The above operations are performed cyclically according to the importance of each candidate cloud disk request feature until the second classification accuracy is less than the first classification accuracy. The initial set at the end of the loop is used as the first target feature set, and the cloud disk classifier is trained using the first target feature set obtained.
[0108] In one example, feature importance during decision tree training, i.e., feature_importance, can be used for feature selection. feature_importance is also called Gini importance, which is used to measure the change of Gini index. Gini index indicates the probability of a randomly selected sample in a sample set being classified incorrectly. The larger the Gini index of an attribute, the more unreasonable the classification based on the attribute; the smaller the Gini index, the better the classification based on the attribute. Then, the larger the feature_importance of an attribute, the greater the change of its Gini index, and the more important the attribute.
[0109] Assume that the candidate feature set is A, which contains 9 candidate subscription features {Disk_Size, VM_Mem, VM_CPU, Disk_Type, Is_Local, Is_VIP, Pay_Mode, Is_1c1g, Snap_Use}. In the process of target feature selection, it is used as a feature value to train the decision tree classifier to obtain the feature_importance index of each feature corresponding to the classification. The larger the value, the more helpful the feature is for classification. Each time feature selection selects the feature value with the largest feature_importance index from the candidate feature set, adds it to the feature set B, and deletes the feature from the A set.
[0110] Table 2 shows the feature_importance change process in the target feature selection process in an example of the present application. In each target feature selection process, the feature with the highest feature_importance is selected as the target feature and added to set B.
[0111]
[0112]
[0113] Table 2
[0114] As shown in Table 2, the values in the table are recorded as the feature_importance values corresponding to each subscription feature. Each time a new target feature is added to set B, the classification accuracy before and after the feature is added will be compared. Accuracy refers to the proportion of samples predicted correctly by the cloud disk classifier to the total samples. Once the accuracy drops, it proves that the feature interferes with the classifier, and the feature is removed from B. At this point, the feature selection process ends, and set B is used as the final target feature set. As shown in Table 1, when the first feature selection is performed (number 2 shown in the table), the feature_importance value of Disk_Size is the largest, and it is added to set B. When the next selection is performed, VM_Mem is added, and the accuracy of the classifier corresponding to before and after the addition of VM_Mem is calculated. If the accuracy after adding is higher, the selection continues. If the accuracy drops, the set before adding is determined as the target feature set.
[0115] As an example, Table 3 shows the change in prediction accuracy during the feature selection process. When the target feature set B is {Disk_Size, VM_Mem, VM_CPU, Disk_Type, Is_Local}, the prediction accuracy is the highest. When the "Is_VIP" feature is added in the sixth feature selection, the prediction accuracy has slightly declined, and the feature selection process is terminated. Finally, the set B = {Disk_Type, VM_Mem, VM_CPU, Disk_Size, Is_Local} is used as the target feature set for classifier training.
[0116] Set B Prediction Accuracy {Disk_Size} 72.7% {Disk_Size, VM_Mem} 82.6% {Disk_Size, VM_Mem, Disk_Type} 83.2% {Disk_Size, VM_Mem, VM_CPU, Disk_Type} 83.5% {Disk_Size, VM_Mem, VM_CPU, Disk_Type, Is_Local} 84.3% {Disk_Size, VM_Mem, VM_CPU, Disk_Type, Is_Local, Is_VIP} 84.0%
[0117] Table 3
[0118] In a possible implementation, each candidate cloud disk request feature includes at least one of the following:
[0119] The usage type of the cloud disk, the capacity of the cloud disk, the user attribute information of the cloud disk, the attribute information of the virtual machine where the cloud disk is located, the payment mode, the local disk attributes, and the backup snapshot capacity of the cloud disk.
[0120] In actual applications, the candidate cloud disk request features can be selected from the cloud disk request features, and all cloud disk request features can be selected, or some cloud disk request features can be selected.
[0121] Step S103: Based on the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, a target storage warehouse corresponding to the cloud disk allocation request is determined from each candidate storage warehouse.
[0122] Specifically, the server can determine the cloud disk allocation strategy based on the characteristic value of the cloud disk request feature corresponding to the cloud disk allocation request and the characteristic value of the predicted load feature, determine the target storage warehouse corresponding to the cloud disk allocation request from each candidate storage warehouse, and determine the storage space of the new cloud disk to be allocated corresponding to the cloud disk allocation request from the target storage warehouse.
[0123] Step S104: Determine, from the target storage warehouse, a storage space that matches the cloud disk allocation request as the target cloud disk.
[0124] Specifically, according to the characteristic values of the cloud disk request characteristics and the characteristic values of the load characteristics contained in the cloud disk allocation request, a corresponding storage space can be determined from the target storage warehouse as the target cloud disk, and the storage space matches the cloud disk allocation request.
[0125] In a possible implementation, based on the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, determining the target storage warehouse corresponding to the cloud disk allocation request from each candidate storage warehouse includes:
[0126] According to the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, a target storage warehouse corresponding to the cloud disk allocation request is selected from storage warehouses that meet the requirements;
[0127] Here, satisfying the requirements refers to satisfying the characteristic value requirements of the cloud disk request characteristics and the characteristic value requirements of the load characteristics.
[0128] In practical applications, the selection of the target storage warehouse needs to consider the requirements of the characteristic values of the cloud disk request characteristics and the characteristic values of the load characteristics. When the requirements are met, the target storage warehouse corresponding to the cloud disk allocation request is selected from the candidate storage warehouses.
[0129] In one example, W = {W 1 ,W 2 ,...,W n} to represent n storage warehouses, where W n represents the nth storage warehouse. For any storage warehouse W j (1≤j≤n) storage capacity (C j )、IOPS(I j ) and storage bandwidth (B j ) is represented by L j ={C j ,I j ,B j} to indicate. Storage warehouse W j The actual usage of storage capacity, IOPS and storage bandwidth is shown in the figure. j ={c j ,i j ,b j}. r={x,y,z} represents the application capacity, average IOPS and average storage bandwidth requirements of the new cloud disk.
[0130] Among them, the storage warehouse that meets the requirements is storage warehouse W j The characteristic value requirements of the ordered characteristic and the load characteristic are as follows:
[0131]
[0132] In a possible implementation, according to the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, a target storage warehouse corresponding to the cloud disk allocation request is selected from storage warehouses that meet the requirements, including:
[0133] Based on the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, determining the resource utilization rate corresponding to each storage warehouse when allocating the cloud disk corresponding to the cloud disk allocation request from each storage warehouse that meets the requirements;
[0134] Based on the resource utilization rates of the storage warehouses, the target storage warehouse corresponding to the cloud disk allocation request is determined.
[0135] In practical applications, after obtaining the characteristic values of the cloud disk request feature and the characteristic values of the load feature, the resource utilization corresponding to each storage warehouse can be determined by combining the characteristic values of the cloud disk request feature and the characteristic values of the load feature, and the cloud disk allocation strategy can be determined based on the resource utilization to select the optimal storage warehouse. The cloud disk allocation strategy ensures that the most cloud disks are allocated with the existing storage warehouses to achieve the purpose of improving resource utilization, and ensures load balancing among the storage warehouses, so as to maximize the benefits of cloud service operators and reduce operation and maintenance costs.
[0136] In addition, the technical solution of the present application can also determine cloud disk allocation strategies in multiple dimensions through resource utilization in multiple dimensions, thereby optimizing cloud disk classification, as shown in the following embodiments.
[0137] In a possible implementation, determining, based on a characteristic value of a cloud disk request characteristic and a characteristic value of a load characteristic, if a cloud disk corresponding to the cloud disk allocation request is allocated from each storage warehouse that meets the requirements, a resource utilization rate corresponding to each storage warehouse includes:
[0138] For each storage warehouse that meets the requirements, based on the feature value of each feature in the cloud disk request feature and the load feature, determine the resource utilization rate corresponding to each feature when allocating the cloud disk corresponding to the cloud disk allocation request from each storage warehouse that meets the requirements;
[0139] Based on the resource utilization rates of the storage warehouses, the target storage warehouse corresponding to the cloud disk allocation request is determined, including:
[0140] For each storage warehouse, based on the resource utilization of the storage warehouse corresponding to each of the cloud disk request characteristics and the load characteristics, determine the average resource utilization corresponding to the storage warehouse;
[0141] Based on the resource utilization and average resource utilization of each storage warehouse corresponding to each feature, the target storage warehouse corresponding to the cloud disk allocation request is determined.
[0142] In practical applications, the resource utilization corresponding to each feature can be determined through the characteristic values of each feature in the cloud disk request feature and the load feature. Based on the resource utilization and average resource utilization of each feature, a multi-dimensional allocation strategy can be further formulated to determine the target storage warehouse corresponding to the cloud disk allocation request, thereby improving the overall resource utilization of the cloud block storage system and reducing load imbalance.
[0143] In one example, the storage warehouse Wk The resource utilization of capacity, IOPS, and storage bandwidth can be expressed as:
[0144]
[0145] in, Respectively represent the storage warehouse W k The capacity, IOPS and storage bandwidth resource utilization of C k ,I k ,B k Respectively represent the storage warehouse W k The resource limits of storage capacity, IOPS, and storage bandwidth. k ,i k ,b k Respectively represent the storage warehouse W k The actual usage of storage capacity, IOPS, and storage bandwidth.
[0146] If the new cloud disk is allocated to the storage warehouse W j , then the storage warehouse W j The three-dimensional resource utilization is expressed as:
[0147]
[0148] in, Respectively represent the new cloud disk allocated to the storage warehouse W j After that, storage warehouse W j The resource utilization in three dimensions: capacity, IOPS, and storage bandwidth. x, y, and z represent the requested capacity, average IOPS, and average storage bandwidth requirements of the cloud disk to be allocated, respectively.
[0149] In a possible implementation, determining a target storage warehouse corresponding to a cloud disk allocation request based on resource utilization and average resource utilization of each storage warehouse corresponding to each feature includes:
[0150] For each storage warehouse, when allocating a cloud disk corresponding to a cloud disk allocation request from the storage warehouse, determine the Manhattan distance between the cloud disk corresponding to the cloud disk allocation request and the storage warehouse based on the resource utilization rate of each feature in the cloud disk request feature and the load feature of the storage warehouse;
[0151] Based on the Manhattan distances corresponding to the storage warehouses, the target storage warehouse corresponding to the cloud disk allocation request is determined.
[0152] In actual applications, the server can determine the target storage warehouse corresponding to the cloud disk allocation request for each storage warehouse based on the resource utilization corresponding to each feature of the ordering feature and load feature of the storage warehouse, by calculating the Manhattan distance between the new cloud disk and each storage warehouse.
[0153] In one example, after calculating the resource utilization of the three dimensions of capacity, IOPS, and storage bandwidth according to formula (3), the average resource utilization of the three dimensions is further calculated as the resource utilization corresponding to each storage warehouse after the new cloud disk is allocated to each storage warehouse.
[0154] The calculation formula for the average resource utilization in the three dimensions is as follows:
[0155]
[0156] Allocate new cloud disk to storage warehouse W j The Manhattan distance is then defined as:
[0157]
[0158] The storage warehouse with the smallest Manhattan distance is selected as the target storage warehouse corresponding to the cloud disk allocation request.
[0159] The cloud disk allocation method provided in the embodiment of the present application determines the characteristic value of the load characteristic based on the characteristic value of the cloud disk request characteristic contained in the cloud disk allocation request; determines the target storage warehouse from each candidate storage warehouse based on the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, and then determines the storage space matching the cloud disk allocation request from the target storage warehouse as the target cloud disk. Among them, the target cloud disk is finally determined based on the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, which realizes the relatively balanced allocation of cloud disks from multiple dimensions, reduces the problem of unbalanced load of each storage warehouse in the cloud block storage system, reduces the risk of storage warehouse resource overload, and improves the resource utilization of the cloud block storage system.
[0160] The following is an explanation of the technical solution of the present application in the form of a cloud disk distribution system composed of multiple devices through a specific embodiment.
[0161] like Figure 3 As shown, the cloud disk classification system of the technical solution of the present application includes: a data processing device, an offline training device, a data prediction device, a multi-dimensional allocation device and a storage device.
[0162] Among them, the data processing device is used to pre-process the allocated cloud disk (historical cloud disk) data, such as calculating the average load characteristics and peak load characteristics within a preset period.
[0163] The offline training device includes a clustering module and a classification module; the clustering module is used to cluster the load features of the allocated cloud disk after preprocessing to obtain category labels of each category; the classification module is used to use the feature values of the features corresponding to the cloud disk request features of the allocated cloud disk and the category labels obtained by clustering as training samples to train the cloud disk classifier.
[0164] The storage device includes a large number of storage warehouses for storing cloud disks requested by clients, that is, for providing storage resources and allocating cloud disks.
[0165] The data prediction device is used to predict the category of the new cloud disk using the cloud disk classifier, and calculate the load characteristics corresponding to the cloud disk allocation request based on the load characteristics of each allocated cloud disk in the category corresponding to the new cloud disk.
[0166] The multidimensional allocation device is used to allocate new cloud disks using a multidimensional allocation strategy, determine the target storage warehouse corresponding to the cloud disk allocation request, and allocate cloud disks through a multidimensional allocation strategy, which can improve the resource utilization of the cloud block storage system and reduce the load imbalance of the system.
[0167] The following describes in detail a specific embodiment of the process from a server receiving a cloud disk allocation request from a client to determining a target storage warehouse corresponding to the cloud disk allocation request.
[0168] like Figure 4 As shown, the process from receiving a cloud disk allocation request from a client to determining the target storage warehouse corresponding to the cloud disk allocation request includes two stages: online multi-dimensional allocation represented by (1)(2)(3) and offline data analysis represented by (4)(5)(6). The online multi-dimensional allocation stage is used for the allocation of a new cloud disk. The client sends a cloud disk allocation request to the server. The request includes the feature value of the subscription feature corresponding to the cloud disk allocation request. The feature value of the subscription feature corresponding to the cloud disk allocation request is input into a cloud disk classifier (the classifier shown in the figure). The cloud disk classifier predicts the feature value of the load feature (the load information shown in the figure) corresponding to the cloud disk allocation request, including: read and write times per second, storage bandwidth, and determines the multi-dimensional allocation strategy based on the application capacity in the subscription feature (the subscription information shown in the figure) and the feature value of the load feature. Based on the multi-dimensional allocation strategy, the target storage warehouse is determined from multiple storage warehouses on the storage end.
[0169] The offline data analysis phase includes obtaining the data of the allocated cloud disk from the storage end as a training sample set (the original data shown in the figure), preprocessing the training samples, and processing them into a data set that can be used by the clusterer; inputting the characteristic values of the load characteristics of the preprocessed training sample set into the clusterer for clustering to obtain category labels; using the characteristic values of the subscription characteristics of the allocated cloud disk and the category labels obtained by clustering, training the cloud disk classifier, and finally obtaining a trained cloud disk classifier.
[0170] Among them, after the offline data analysis phase is executed once, the online multi-dimensional allocation phase can perform multi-dimensional allocation on the real-time cloud disk allocation request to obtain the target storage warehouse corresponding to each new cloud disk.
[0171] Based on Figure 2 Based on the same principle as the method shown in , the embodiment of the present disclosure also provides a cloud disk allocation device 30, such as Figure 5 As shown, the device 30 comprises:
[0172] An acquisition module 31 is used to acquire a cloud disk allocation request, wherein the cloud disk allocation request includes a characteristic value of a cloud disk request characteristic;
[0173] A first determination module 32, configured to determine a characteristic value of a load characteristic corresponding to a cloud disk allocation request based on a characteristic value of a cloud disk request characteristic;
[0174] A second determination module 33 is used to determine a target storage warehouse corresponding to the cloud disk allocation request from each candidate storage warehouse based on a characteristic value of the cloud disk request characteristic and a characteristic value of the load characteristic;
[0175] The third determination module 34 is used to determine the storage space matching the cloud disk allocation request from the target storage warehouse as the target cloud disk.
[0176] In a possible implementation, the first determining module 32 is configured to:
[0177] Determine a cloud disk target category corresponding to the cloud disk allocation request based on a feature value of the cloud disk request feature;
[0178] Based on the characteristic values of the load characteristics of each allocated cloud disk belonging to the cloud disk target category, the characteristic value of the load characteristic corresponding to the cloud disk allocation request is determined.
[0179] In a possible implementation, when determining the cloud disk target category corresponding to the cloud disk allocation request based on the feature value of the cloud disk request feature, the first determination module 32 is configured to:
[0180] Based on the feature value of the cloud disk request feature, the cloud disk target category corresponding to the cloud disk allocation request is obtained through the cloud disk classifier;
[0181] The cloud disk classifier is trained in the following way:
[0182] Obtain a training data set, the training data set includes various training samples, each training sample includes a feature value of each target cloud disk request feature of the sample cloud disk and a category label of the sample cloud disk;
[0183] The initial classifier is trained based on each training sample until the preset training end condition is met, and the initial classifier at the end of the training is used as the cloud disk classifier;
[0184] The input of the initial classifier is the feature value of each target cloud disk request feature of the sample cloud disk, and the output is the category label of the sample cloud disk.
[0185] In a possible implementation, the category label of each sample cloud disk is obtained in the following way:
[0186] Obtain characteristic values of the load characteristics of each sample cloud disk;
[0187] Cluster the load characteristics of each sample cloud disk to obtain cluster categories;
[0188] Based on each clustering category, determine the category label of each sample cloud disk.
[0189] In a possible implementation, the load characteristics of the sample cloud disk include at least one of the following:
[0190] Average number of reads and writes per second, peak number of reads and writes per second, average storage bandwidth, peak storage bandwidth.
[0191] In a possible implementation, for each sample cloud disk, each target cloud disk request feature is determined in the following manner:
[0192] Obtain a candidate feature set, where the candidate feature set includes each candidate cloud disk request feature of each sample cloud disk;
[0193] Filtering a first target feature set from the candidate feature set according to the importance of each candidate cloud disk request feature;
[0194] Among them, the first target feature set includes at least one candidate cloud disk request feature, and the first classification accuracy of the cloud disk classifier corresponding to the first target feature set is greater than the second classification accuracy of the cloud disk classifier corresponding to the second target feature set, wherein the second target feature set includes the first target feature set, and the candidate cloud disk request feature with the greatest importance among the candidate cloud disk request features in the candidate feature set except the first target feature set.
[0195] In a possible implementation, the first target feature set is selected from the candidate feature set according to the importance of each candidate cloud disk request feature, which is implemented in the following manner:
[0196] The following operations are performed cyclically according to the importance of each candidate cloud disk request feature until the second classification accuracy is less than the first classification accuracy, and the initial set at the end of the cycle is used as the first target feature set;
[0197] According to the importance of each candidate cloud disk request feature, the candidate cloud disk request feature with the greatest importance is selected from the candidate feature set and added to the initial set, and the candidate cloud disk request feature added to the first target feature set is deleted from the candidate feature set;
[0198] Constructing a second target feature set based on the most important candidate cloud disk request feature in the deleted candidate feature set and the first target feature set;
[0199] A first classification accuracy and a second classification accuracy of the cloud disk classifier corresponding to the first target feature set and the second target feature set, respectively, are determined.
[0200] In a possible implementation, each candidate cloud disk request feature includes at least one of the following:
[0201] The usage type of the cloud disk, the capacity of the cloud disk, the user attribute information of the cloud disk, the attribute information of the virtual machine where the cloud disk is located, the payment mode, the local disk attributes, and the backup snapshot capacity of the cloud disk.
[0202] In a possible implementation, the second determining module 33 is configured to:
[0203] According to the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, a target storage warehouse corresponding to the cloud disk allocation request is selected from storage warehouses that meet the requirements;
[0204] Here, satisfying the requirements refers to satisfying the characteristic value requirements of the cloud disk request characteristics and the characteristic value requirements of the load characteristics.
[0205] In a possible implementation, when the second determination module 33 selects the target storage warehouse corresponding to the cloud disk allocation request from the storage warehouses that meet the requirements according to the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, it is used to:
[0206] Based on the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, determining the resource utilization rate corresponding to each storage warehouse when allocating the cloud disk corresponding to the cloud disk allocation request from each storage warehouse that meets the requirements;
[0207] Based on the resource utilization rates of the storage warehouses, the target storage warehouse corresponding to the cloud disk allocation request is determined.
[0208] In a possible implementation, the second determination module 33 determines, based on the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, the resource utilization rate corresponding to each storage warehouse when allocating the cloud disk corresponding to the cloud disk allocation request from each storage warehouse that meets the requirements, for:
[0209] For each storage warehouse that meets the requirements, based on the feature value of each feature in the cloud disk request feature and the load feature, determine the resource utilization rate corresponding to each feature when allocating the cloud disk corresponding to the cloud disk allocation request from each storage warehouse that meets the requirements;
[0210] When determining the target storage warehouse corresponding to the cloud disk allocation request based on the resource utilization rates corresponding to the storage warehouses, the second determination module 33 is used to:
[0211] For each storage warehouse, based on the resource utilization of the storage warehouse corresponding to each of the cloud disk request characteristics and the load characteristics, determine the average resource utilization corresponding to the storage warehouse;
[0212] Based on the resource utilization and average resource utilization of each storage warehouse corresponding to each feature, the target storage warehouse corresponding to the cloud disk allocation request is determined.
[0213] In a possible implementation, when determining the target storage warehouse corresponding to the cloud disk allocation request based on the resource utilization and average resource utilization of each storage warehouse corresponding to each feature, the second determination module 33 is used to:
[0214] For each storage warehouse, when allocating a cloud disk corresponding to a cloud disk allocation request from the storage warehouse, determine the Manhattan distance between the cloud disk corresponding to the cloud disk allocation request and the storage warehouse based on the resource utilization rate of each feature in the cloud disk request feature and the load feature of the storage warehouse;
[0215] Based on the Manhattan distances corresponding to the storage warehouses, the target storage warehouse corresponding to the cloud disk allocation request is determined.
[0216] The present application provides a cloud disk allocation device, which determines the characteristic value of the load characteristic based on the characteristic value of the cloud disk request characteristic contained in the cloud disk allocation request; determines the target storage warehouse from each candidate storage warehouse based on the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, and then determines the storage space matching the cloud disk allocation request from the target storage warehouse as the target cloud disk. Among them, the target cloud disk is finally determined based on the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, which realizes the relatively balanced allocation of cloud disks from multiple dimensions, reduces the problem of unbalanced load of each storage warehouse in the cloud block storage system, reduces the risk of storage warehouse resource overload, and improves the resource utilization of the cloud block storage system.
[0217] The above embodiment introduces the cloud disk allocation device from the perspective of a virtual module. The following describes an electronic device from the perspective of a physical module, as shown below:
[0218] The present application embodiment provides an electronic device, such as Figure 6 As shown, Figure 6 The electronic device 9000 shown includes: a processor 9001 and a memory 9003. The processor 9001 and the memory 9003 are connected, such as through a bus 9002. Optionally, the electronic device 9000 may also include a transceiver 9004. It should be noted that in actual applications, the transceiver 9004 is not limited to one, and the structure of the electronic device 9000 does not constitute a limitation on the embodiments of the present application.
[0219] The processor 9001 may be a CPU, a general-purpose processor, a GPU, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor 9001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0220] The bus 9002 may include a path to transmit information between the above components. The bus 9002 may be a PCI bus or an EISA bus, etc. The bus 9002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0221] The memory 9003 may be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an EEPROM, a CD-ROM or other optical disk storage, an optical disk storage (including a compressed optical disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.
[0222] The memory 9003 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 9001. The processor 9001 is used to execute the application code stored in the memory 9003 to implement the content shown in any of the above method embodiments.
[0223] An embodiment of the present application provides an electronic device, and the electronic device in the embodiment of the present application includes: one or more processors; a memory; one or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and when the one or more programs are executed by the processor, a cloud disk allocation request is obtained, and the cloud disk allocation request includes a characteristic value of a cloud disk request characteristic; based on the characteristic value of the cloud disk request characteristic, a characteristic value of a load characteristic is determined; based on the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, a target storage warehouse is determined from each candidate storage warehouse; from the target storage warehouse, a storage space matching the cloud disk allocation request is determined as the target cloud disk.
[0224] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program runs on a processor, the processor can execute the corresponding content in the aforementioned method embodiment.
[0225] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned cloud disk allocation method or the method provided in various optional implementations of the cloud disk allocation method.
[0226] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0227] The above description is only a partial implementation method 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 cloud disk allocation method, characterized in that: The method comprises: Obtaining a cloud disk allocation request, wherein the cloud disk allocation request includes a characteristic value of a cloud disk request characteristic; Based on the feature value of the cloud disk request feature, obtaining the cloud disk target category corresponding to the cloud disk allocation request through a cloud disk classifier; Determining a characteristic value of the load characteristic corresponding to the cloud disk allocation request based on characteristic values of the load characteristics of each allocated cloud disk belonging to the cloud disk target category; Determining a target storage warehouse corresponding to the cloud disk allocation request from each candidate storage warehouse based on a characteristic value of the cloud disk request characteristic and a characteristic value of the load characteristic; Determine, from the target storage warehouse, a storage space matching the cloud disk allocation request as a target cloud disk; The cloud disk classifier is trained in the following way: Acquire a training data set, wherein the training data set includes training samples, each of which includes a feature value of each target cloud disk request feature of the sample cloud disk and a category label of the sample cloud disk; The initial classifier is trained based on each of the training samples until a preset training end condition is met, and the initial classifier at the end of the training is used as the cloud disk classifier; The input of the initial classifier is the feature value of each target cloud disk request feature of the sample cloud disk, and the output is the category label of the sample cloud disk.
2. The method according to claim 1, characterized in that The category labels of the sample cloud disks are obtained in the following way: Obtaining characteristic values of load characteristics of each of the sample cloud disks; Clustering the load characteristics of each of the sample cloud disks to obtain cluster categories; Based on each clustering category, a category label of each of the sample cloud disks is determined.
3. The method according to claim 2, characterized in that The load characteristics of the sample cloud disk include at least one of the following: Average number of reads and writes per second, peak number of reads and writes per second, average storage bandwidth, peak storage bandwidth.
4. The method according to claim 1, characterized in that: For each of the sample cloud disks, the request characteristics of each target cloud disk are determined in the following manner: Obtain a candidate feature set, wherein the candidate feature set includes each candidate cloud disk request feature of each of the sample cloud disks; Filtering a first target feature set from the candidate feature set according to the importance of each of the candidate cloud disk request features; Among them, the first target feature set includes at least one candidate cloud disk request feature, and the first classification accuracy of the cloud disk classifier corresponding to the first target feature set is greater than the second classification accuracy of the cloud disk classifier corresponding to the second target feature set, wherein the second target feature set includes the first target feature set and the most important candidate cloud disk request feature among the candidate cloud disk request features in the candidate feature set except the first target feature set.
5. The method according to claim 4, characterized in that The step of selecting a first target feature set from the candidate feature set according to the importance of each of the candidate cloud disk request features includes: Loopingly performing the following operations according to the importance of each of the candidate cloud disk request features until the second classification accuracy is less than the first classification accuracy, and taking the initial set at the end of the loop as the first target feature set; According to the importance of each of the candidate cloud disk request features, the candidate cloud disk request feature with the greatest importance is selected from the candidate feature set and added to the initial set, and the candidate cloud disk request feature added to the first target feature set is deleted from the candidate feature set; Building a second target feature set based on the most important candidate cloud disk request feature in the deleted candidate feature set and the first target feature set; Determine a first classification accuracy and a second classification accuracy of the cloud disk classifier corresponding to the first target feature set and the second target feature set, respectively.
6. The method according to claim 4, characterized in that Each candidate cloud disk request feature includes at least one of the following: The usage type of the cloud disk, the capacity of the cloud disk, the user attribute information of the cloud disk, the attribute information of the virtual machine where the cloud disk is located, the payment mode, the local disk attributes, and the backup snapshot capacity of the cloud disk.
7. The method according to any one of claims 1 to 4, characterized in that: The determining, from each candidate storage warehouse, a target storage warehouse corresponding to the cloud disk allocation request based on the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, comprises: Selecting a target storage warehouse corresponding to the cloud disk allocation request from storage warehouses that meet the requirements according to a characteristic value of the cloud disk request characteristic and a characteristic value of the load characteristic; The satisfying requirement refers to satisfying the requirement of the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic.
8. The method according to claim 7, characterized in that The step of selecting a target storage warehouse corresponding to the cloud disk allocation request from storage warehouses that meet the requirements according to the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic includes: Determine, based on the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, the resource utilization rate corresponding to each storage warehouse when allocating the cloud disk corresponding to the cloud disk allocation request from each storage warehouse that meets the requirements; Based on the resource utilization rates corresponding to the storage warehouses, a target storage warehouse corresponding to the cloud disk allocation request is determined.
9. The method according to claim 8, characterized in that The determining, based on the characteristic value of the cloud disk request characteristic and the characteristic value of the load characteristic, the resource utilization rate corresponding to each storage warehouse when allocating the cloud disk corresponding to the cloud disk allocation request from each storage warehouse that meets the requirements, includes: For each of the storage warehouses that meets the requirements, determining, based on the feature value of each feature in the cloud disk request feature and the load feature, a resource utilization rate corresponding to each feature when allocating the cloud disk corresponding to the cloud disk allocation request from each of the storage warehouses that meets the requirements; The determining, based on the resource utilization rates corresponding to the storage warehouses, the target storage warehouse corresponding to the cloud disk allocation request includes: For each of the storage warehouses, based on the resource utilization of the storage warehouse corresponding to each of the cloud disk request characteristics and the load characteristics, determine an average resource utilization corresponding to the storage warehouse; Based on the resource utilization and average resource utilization of each storage warehouse corresponding to each feature, the target storage warehouse corresponding to the cloud disk allocation request is determined.
10. The method according to claim 9, characterized in that The determining, based on the resource utilization and average resource utilization of each storage warehouse corresponding to each feature, a target storage warehouse corresponding to the cloud disk allocation request comprises: For each of the storage warehouses, when allocating the cloud disk corresponding to the cloud disk allocation request from the storage warehouse, determining the Manhattan distance between the cloud disk corresponding to the cloud disk allocation request and the storage warehouse based on the resource utilization rate of the storage warehouse corresponding to each of the cloud disk request characteristics and the load characteristics; Based on the Manhattan distances corresponding to the storage warehouses, a target storage warehouse corresponding to the cloud disk allocation request is determined.
11. A cloud disk allocation device, characterized in that: The device comprises: An acquisition module, configured to acquire a cloud disk allocation request, wherein the cloud disk allocation request includes a characteristic value of a cloud disk request characteristic; A first determination module is configured to obtain a cloud disk target category corresponding to the cloud disk allocation request through a cloud disk classifier based on a feature value of the cloud disk request feature; and determine a feature value of the load feature corresponding to the cloud disk allocation request based on a feature value of a load feature of each allocated cloud disk belonging to the cloud disk target category; A second determination module is used to determine a target storage warehouse corresponding to the cloud disk allocation request from each candidate storage warehouse based on a characteristic value of the cloud disk request characteristic and a characteristic value of the load characteristic; A third determination module is used to determine, from the target storage warehouse, a storage space matching the cloud disk allocation request as a target cloud disk; The cloud disk classifier is trained in the following way: Acquire a training data set, wherein the training data set includes training samples, each of which includes a feature value of each target cloud disk request feature of the sample cloud disk and a category label of the sample cloud disk; The initial classifier is trained based on each of the training samples until a preset training end condition is met, and the initial classifier at the end of the training is used as the cloud disk classifier; The input of the initial classifier is the feature value of each target cloud disk request feature of the sample cloud disk, and the output is the category label of the sample cloud disk.
12. An electronic device, characterized in that: The electronic device comprises: one or more processors; Memory; One or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program. When the computer program runs on a processor, the processor can execute the method according to any one of claims 1 to 10.
