Cloud disk scheduling method, device and storage medium based on elastic block storage service
By predicting and scheduling the storage cluster to be created in the cloud disk, the problem of unbalanced resource allocation in the cloud computing architecture is solved, and the rational dynamic allocation of storage resources and system stability are achieved.
Patent Information
- Application Number
- CN202411147265.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2044-08-20
AI Technical Summary
Under the cloud computing architecture, the difference in user data compression rates leads to unbalanced resource allocation in cloud disk scheduling strategies, affecting the effective utilization of resources and transmission bandwidth.
By obtaining the historical cloud disk usage status information of the user to be created and the current storage status information of each storage cluster, predict the predicted compression rate of the cloud disk to be created in different storage clusters, and create it into the target storage cluster to minimize the compression rate difference of all storage clusters.
The compression rate of each storage cluster is maintained relatively balanced, and storage resources are dynamically allocated, and a single storage cluster is avoided overload and resource waste, balanced disk wear, and improved the stability of the storage system and the balance of the fault domain.
Smart Images

Figure CN119025044B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer and network communication technology, and more particularly to a cloud disk scheduling method, device, and storage medium based on elastic block storage service. Background Art
[0002] Under the current cloud computing architecture, users deploy and run applications by purchasing virtual machines (VMs) of Elastic Computing Service (ECS), and these virtual machines provide data persistence by mounting block devices (BlockDevice, or cloud disk) of Elastic Block Storage (EBS). In order to reduce the demand for storage space and improve storage efficiency, data compression technology is introduced in the write path.
[0003] However, the data compression rates of different users vary, resulting in uneven resource allocation when cloud disk scheduling is performed based on various cloud disk scheduling strategies in the prior art, affecting the effective utilization of resources and transmission bandwidth. Summary of the invention
[0004] The embodiments of the present disclosure provide a cloud disk scheduling method, device and storage medium based on elastic block storage service, so as to keep the compression rate of each storage cluster under the cloud computing architecture relatively balanced and realize reasonable dynamic allocation of storage resources.
[0005] In a first aspect, an embodiment of the present disclosure provides a cloud disk scheduling method based on an elastic block storage service, including:
[0006] Obtain historical cloud disk usage status information of the user to whom the cloud disk to be created belongs, and current storage status information of each storage cluster; wherein any storage cluster includes one or more created cloud disks;
[0007] According to the historical cloud disk usage status information and the current storage status information of each storage cluster, predict the predicted compression rates of different storage clusters when the cloud disk to be created is created in different storage clusters;
[0008] According to the predicted compression rates of different storage clusters, a target storage cluster is determined from each storage cluster, and the cloud disk to be created is created in the target storage cluster, so that the difference in compression rates of all storage clusters is minimized after the cloud disk to be created is created in the target storage cluster.
[0009] In a second aspect, an embodiment of the present disclosure provides a cloud disk scheduling device based on an elastic block storage service, including:
[0010] An acquisition unit, used to acquire historical cloud disk usage status information of the user to whom the cloud disk to be created belongs, and current storage status information of each storage cluster; wherein any storage cluster includes one or more created cloud disks;
[0011] A prediction unit, configured to predict, based on the historical cloud disk usage status information and the current storage status information of each storage cluster, predicted compression rates of different storage clusters when the cloud disk to be created is created in different storage clusters;
[0012] A selection unit is used to determine a target storage cluster from each storage cluster according to the predicted compression rates of different storage clusters, and create the cloud disk to be created in the target storage cluster, so that the difference in compression rates of all storage clusters is minimized after the cloud disk to be created is created in the target storage cluster.
[0013] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor and a memory;
[0014] The memory stores computer-executable instructions;
[0015] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the cloud disk scheduling method based on the elastic block storage service as described in the first aspect and various possible designs of the first aspect.
[0016] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, a cloud disk scheduling method based on an elastic block storage service as described in the first aspect and various possible designs of the first aspect is implemented.
[0017] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including computer execution instructions. When a processor executes the computer execution instructions, it implements the cloud disk scheduling method based on the elastic block storage service as described in the first aspect and various possible designs of the first aspect.
[0018] The cloud disk scheduling method, device and storage medium based on elastic block storage service provided by the embodiments of the present disclosure obtain historical cloud disk usage status information of the user to whom the cloud disk to be created belongs, and current storage status information of each storage cluster, wherein any storage cluster includes one or more created cloud disks; based on the historical cloud disk usage status information and the current storage status information of each storage cluster, predict the predicted compression rates of different storage clusters when the cloud disk to be created is created in different storage clusters; based on the predicted compression rates of different storage clusters, determine a target storage cluster from each storage cluster, and create the cloud disk to be created in the target storage cluster, so that the difference between the compression rates of all storage clusters after the cloud disk to be created is created in the target storage cluster is minimized. In the disclosed embodiment, when creating a cloud disk, the problem of storage cluster compression rate balance is taken into consideration, and a suitable target storage cluster is selected for the cloud disk to be created, so that after the cloud disk to be created is created in the target storage cluster, the compression rates of the storage clusters remain relatively balanced, thereby achieving reasonable dynamic allocation of storage resources, avoiding overload and waste of resources in a single storage cluster, effectively balancing the wear of the disks of each storage cluster, improving the stability of the storage system and the balance of the fault domain, and avoiding excessive impact caused by the failure of a single storage cluster. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0020] Figure 1 A schematic diagram of a scenario of a cloud disk scheduling method based on an elastic block storage service provided in an embodiment of the present disclosure;
[0021] Figure 2 A schematic diagram of a cloud disk scheduling method based on an elastic block storage service provided in an embodiment of the present disclosure;
[0022] Figure 3 A schematic diagram of a cloud disk scheduling method based on an elastic block storage service provided in another embodiment of the present disclosure;
[0023] Figure 4 A structural block diagram of a cloud disk scheduling device based on elastic block storage service provided in an embodiment of the present disclosure;
[0024] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0026] In the prior art, cloud disk scheduling strategies usually do not take into account the differences in data compression rates of different users. For example, different users have different data formats and use different compression algorithms. Large differences in data compression rates for different users will lead to unbalanced resource allocation, especially some storage clusters may have too high compression rates, while some storage clusters may have too low compression rates. Too high compression rates require a larger transmission bandwidth during data reading and writing, and at the same time increase the number of disk read and write times, causing more disk wear, shortening the disk's service life, and increasing the risk of data corruption. The losses caused by data corruption are also greater (due to the larger amount of data actually stored in a storage cluster with a higher compression rate, the losses caused by a single storage cluster failure are also greater).
[0027] In order to solve the above technical problems, the embodiment of the present disclosure provides a cloud disk scheduling method based on elastic block storage service. When a user creates a cloud disk, the compression rate balance problem of each storage cluster is considered, and a suitable target storage cluster is selected for the cloud disk to be created, so that the compression rates of each storage cluster remain relatively balanced after the cloud disk to be created is created in the target storage cluster. In this way, reasonable dynamic allocation of storage resources can be achieved, overload and waste of resources of a single storage cluster can be avoided, the wear of the disks of each storage cluster can be effectively balanced, the stability of the storage system and the balance of the fault domain can be improved, and the excessive impact caused by the failure of a single storage cluster can be avoided.
[0028] Specifically, Figure 1 As shown, historical cloud disk usage information of the user to whom the cloud disk to be created belongs and current storage status information of each storage cluster can be obtained, wherein any storage cluster includes one or more created cloud disks; based on the historical cloud disk usage information and the current storage status information of each storage cluster, predicted compression rates of different storage clusters when the cloud disk to be created is created in different storage clusters are predicted; based on the predicted compression rates of different storage clusters, a target storage cluster is determined from each storage cluster so that the difference in compression rates of all storage clusters is minimized after the cloud disk to be created is created in the target storage cluster.
[0029] Optionally, a negative feedback mechanism can be introduced to dynamically adjust the prediction accuracy through a preset adjustment factor, where the preset adjustment factor can be determined based on the difference between the predicted compression rate and the actual compression rate of the historical target storage cluster during the historical cloud disk creation process, as well as the preset learning rate. The preset adjustment factor can be dynamically changed by learning the difference between the predicted compression rate and the actual compression rate, thereby realizing the correction of the predicted compression rate. The negative feedback mechanism improves the storage system's ability to adapt to future user-level data changes. When the business model of a single user changes, the predicted compression rate can be quickly iterated and calibrated, thereby maintaining efficient storage performance and resource utilization.
[0030] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0031] The cloud disk scheduling method based on elastic block storage service disclosed in the present invention will be described in detail below in conjunction with specific embodiments.
[0032] refer to Figure 2 , Figure 2 A schematic diagram of a cloud disk scheduling method based on an elastic block storage service provided in an embodiment of the present disclosure. The method of this embodiment can be applied in a terminal device or a server. The cloud disk scheduling method based on an elastic block storage service includes:
[0033] S201. Obtain historical cloud disk usage status information of the user to whom the cloud disk to be created belongs, and current storage status information of each storage cluster; wherein any storage cluster includes one or more created cloud disks.
[0034] In this embodiment, in the elastic block storage service (ECS) of the cloud computing architecture, when a user needs to create a new cloud disk, he can create it in a storage cluster. The storage cluster includes one or more created cloud disks, which can be created by any user. The cloud disk is a block device that can be attached to the elastic block storage service instance for storing data.
[0035] When a user needs to create a cloud disk, he or she may refer to the user's historical cloud disk usage information, including but not limited to the user's average cloud disk usage rate, historical compression rate, etc., to predict the usage status of the cloud disk to be created.
[0036] In addition, in order to ensure that the compression rates of various storage clusters in the cloud computing architecture remain relatively balanced after the cloud disk to be created is created in a storage cluster of the cloud computing architecture, it is necessary to consider the current storage status information of each storage cluster. The current storage status information of each storage cluster includes but is not limited to the current total capacity of any storage cluster, the average usage rate of the cloud disks included in any storage cluster, and the current compression rate of any storage cluster, etc., as basic information for selecting a storage cluster when creating the cloud disk to be created.
[0037] In specific implementation, the historical cloud disk usage information of each user can be collected to obtain a historical cloud disk usage information data set. More specifically, the historical compression rate of each user can be collected to obtain a compression rate data subset, and the average cloud disk usage rate of each user can be collected to obtain a usage rate data subset. In addition, the current storage status information of each storage cluster can be collected to obtain a storage status information data set. The details are not repeated here. Optionally, in this embodiment, usage information can be collected for each cloud disk in the cloud computing architecture, and then each cloud disk can be analyzed at the user granularity to obtain a historical cloud disk usage information data set, and each cloud disk can be analyzed at the cluster granularity to obtain a storage status information data set. Through the above-mentioned collection and analysis process, data support can be provided for subsequent cloud disk scheduling and storage resource optimization.
[0038] Optionally, if the user of the cloud disk to be created is an existing user, the user's historical cloud disk usage information can be collected; if the user of the cloud disk to be created is a new user, that is, there is no historical cloud disk usage information, or the number of cloud disks created by the user of the cloud disk to be created is small, or in other situations, the user's historical cloud disk usage information is small or inaccurate, resulting in the user's historical cloud disk usage information being unavailable, then the user's historical cloud disk usage information can be predicted. Specifically, similar user groups to the user of the cloud disk to be created can be determined, such as user groups in similar industries, user groups with similar purposes, etc., and similar user groups can be searched based on user attributes, and then the historical cloud disk usage information of similar user groups (the average value of the historical cloud disk usage information of the user group, or the historical cloud disk usage information of the most similar user can be used) is determined as the historical cloud disk usage information of the user of the cloud disk to be created.
[0039] S202: predicting, based on the historical cloud disk usage status information and the current storage status information of each storage cluster, predicted compression rates of different storage clusters when the cloud disk to be created is created in different storage clusters.
[0040] In this embodiment, in order to ensure that the compression rates of various storage clusters of the cloud computing architecture remain relatively balanced after the cloud disk to be created is created in a certain storage cluster of the cloud computing architecture, it can be assumed that the cloud disk to be created is created in different storage clusters respectively, and the predicted compression rate of the storage cluster to which the cloud disk to be created is created in each case is predicted, so as to facilitate the subsequent measurement of which case the compression rates of various storage clusters of the cloud computing architecture are more balanced. Among them, creating the cloud disk to be created in a certain storage cluster means that after the cloud computing architecture allocates storage resources for the cloud disk to be created, the cloud disk to be created is added to a certain storage cluster for management.
[0041] The predicted compression rates of different storage clusters when creating the cloud disk to be created in different storage clusters may be based on the historical cloud disk usage status information of the user to whom the cloud disk to be created belongs obtained in the above steps, and the current storage status information of each storage cluster.
[0042] Optionally, when making a prediction, the following process may be used:
[0043] Based on the historical cloud disk usage status information and the current storage status information of any storage cluster, determine the ratio of the first data volume after compression to the second data volume before compression in any storage cluster when the cloud disk to be created is created in any storage cluster, and obtain the predicted compression rate of any storage cluster based on the ratio.
[0044] In this embodiment, assuming that the cloud disk to be created is created in any storage cluster, the amount of data before and after data compression in the storage cluster when the cloud disk to be created is created in the storage cluster can be predicted based on the historical cloud disk usage status information of the user to which the cloud disk to be created belongs and the current storage status information of the storage cluster, and the ratio of the first amount of data after compression to the second amount of data before compression is calculated, and the predicted compression rate of the storage cluster can be obtained according to the ratio. Any feasible algorithm can be used to predict the amount of data before and after data compression in the storage cluster.
[0045] Of course, based on the historical cloud disk usage information of the user to whom the cloud disk to be created belongs, and the current storage status information of each storage cluster, any other feasible method can also be used to predict the predicted compression rate of different storage clusters when the cloud disk to be created is created in different storage clusters, such as through artificial intelligence models to predict, or through other algorithms, etc., which are not limited here.
[0046] S203. Determine a target storage cluster from each storage cluster according to the predicted compression rates of different storage clusters, and create the cloud disk to be created in the target storage cluster, so that the difference in compression rates of all storage clusters is minimized after the cloud disk to be created is created in the target storage cluster.
[0047] In this embodiment, it is assumed in the above steps that the cloud disk to be created is created in different storage clusters respectively. After predicting the predicted compression rate of the storage cluster to which the cloud disk to be created is created in each case, the difference between the compression rates of all storage clusters in each case can be determined based on the predicted compression rates of different storage clusters. Then, it can be determined that the difference between the compression rates of all storage clusters in a certain case is the smallest. This case is used as the optimal deployment strategy, that is, in the target storage cluster specified in the case where the cloud disk to be created is created, the compression rates of each storage cluster in the cloud computing architecture can be kept relatively balanced.
[0048] The cloud disk scheduling method based on elastic block storage service provided in this embodiment obtains the historical cloud disk usage status information of the user to whom the cloud disk to be created belongs, and the current storage status information of each storage cluster, wherein any storage cluster includes one or more cloud disks that have been created; according to the historical cloud disk usage status information and the current storage status information of each storage cluster, predicts the predicted compression rate of different storage clusters when the cloud disk to be created is created in different storage clusters; according to the predicted compression rate of different storage clusters, determines the target storage cluster from each storage cluster, and creates the cloud disk to be created in the target storage cluster, so that the difference between the compression rates of all storage clusters after the cloud disk to be created is created in the target storage cluster is minimized. In this embodiment, the problem of storage cluster compression rate balance is taken into account when creating a cloud disk, and a suitable target storage cluster is selected for the cloud disk to be created, so that the compression rates of each storage cluster after the cloud disk to be created is created in the target storage cluster remains relatively balanced, and reasonable dynamic allocation of storage resources is realized, avoiding overload and resource waste of a single storage cluster, effectively balancing the wear of the disks of each storage cluster, improving the stability of the storage system and the balance of the fault domain, and avoiding the excessive impact caused by the failure of a single storage cluster.
[0049] The cloud disk scheduling method based on the elastic block storage service provided in this embodiment can be applied to cloud computing architectures of any scale, especially in scenarios with non-large cluster scales and user scales, where the problem of uneven compression rate is more prominent. Through the cloud disk scheduling method based on the elastic block storage service of this embodiment, the compression rate of each storage cluster in a cloud computing framework of any scale can be balanced, thereby achieving efficient and reasonable use of resources.
[0050] Optionally, when determining the ratio of the first amount of data after compression to the second amount of data before compression in any storage cluster in the case of creating the cloud disk to be created in any storage cluster, the method may specifically include:
[0051] Determine, according to the current storage status information of any one of the storage clusters, the third amount of data after compression and the fourth amount of data before compression in any one of the storage clusters before creating the cloud disk to be created in the any one of the storage clusters;
[0052] Determine the fifth amount of data after compression and the sixth amount of data before compression in the cloud disk to be created according to the historical cloud disk usage status information;
[0053] The sum of the third data amount and the fifth data amount is determined as the first data amount, the sum of the fourth data amount and the sixth data amount is determined as the second data amount, and a ratio of the first data amount to the second data amount is obtained.
[0054] In this embodiment, the amount of data stored in the storage cluster before and after compression can be determined based on the current storage status information of the storage cluster, that is, the third amount of data after compression and the fourth amount of data before compression in the storage cluster before the cloud disk to be created is created in the storage cluster.
[0055] In specific implementation, the current total capacity of the storage cluster and the product of the average usage rate of the cloud disks included in the storage cluster can be obtained as the fourth data volume of the data currently stored in the storage cluster before compression; and the current total capacity of the storage cluster, the product of the average usage rate of the cloud disks included in the storage cluster, and the current compression rate of the storage cluster are obtained as the third data volume after compression in the storage cluster, that is, the data volume after the data currently stored in the storage cluster is compressed with the current compression rate of the storage cluster based on the fourth data volume before compression.
[0056] In addition, the amount of data before and after compression to be stored in the cloud disk to be created can be predicted based on the historical cloud disk usage status information of the user to whom the cloud disk to be created belongs, that is, the fifth amount of data after compression and the sixth amount of data before compression in the cloud disk to be created.
[0057] In specific implementation, the product of the average cloud disk usage rate of the user to whom the cloud disk to be created belongs, the number of cloud disks to be created, and the average capacity of the cloud disk to be created can be obtained as the sixth data volume before compression in the cloud disk to be created, wherein the product of the user's average cloud disk usage rate and the average capacity of the cloud disk to be created is the predicted storage data volume in a single cloud disk to be created, which is multiplied by the number of cloud disks to be created, and then obtained is the predicted storage data volume in all cloud disks to be created, that is, the sixth data volume before compression in the cloud disk to be created; and the product of the average cloud disk usage rate of the user to whom the cloud disk to be created belongs, the historical compression rate, the number of cloud disks to be created, and the average capacity of the cloud disk to be created is obtained as the fifth data volume after compression in the cloud disk to be created, that is, multiplying the sixth data volume by the user's historical compression rate, which is the data volume after compression of the sixth data volume in the cloud disk to be created, that is, the fifth data volume after compression in the cloud disk to be created.
[0058] Furthermore, adding the third data volume to the fifth data volume can obtain the first compressed data volume in the storage cluster when the cloud disk to be created is created in the storage cluster, and adding the fourth data volume to the sixth data volume can obtain the second data volume in the storage cluster when the cloud disk to be created is created in the storage cluster. Then, the first data volume is compared with the second data volume to obtain a ratio, and the predicted compression rate of the storage cluster can be obtained based on the ratio.
[0059] Optionally, in the above embodiment, the obtained ratio can be directly determined as the predicted compression rate of the storage cluster; or, a negative feedback mechanism can be introduced, and a preset adjustment factor can be multiplied on the basis of the obtained ratio, and the product can be determined as the predicted compression rate of the storage cluster. The dynamic adjustment of the prediction accuracy can be achieved through the preset adjustment factor, wherein the preset adjustment factor can be determined based on the difference between the predicted compression rate and the actual compression rate of the historical target storage cluster in the historical cloud disk creation process, and the preset learning rate. The preset adjustment factor is dynamically changed by learning the difference between the predicted compression rate and the actual compression rate, thereby realizing the correction of the predicted compression rate. The negative feedback mechanism improves the storage system's ability to adapt to future user-level data changes. When the business model of a single user changes, the predicted compression rate can be quickly iterated and calibrated, thereby maintaining efficient storage performance and resource utilization.
[0060] Specifically, assuming that the cloud disk to be created is created in any storage cluster, the predicted compression rate r of the storage cluster is new The following formula can be used for calculation:
[0061]
[0062] Among them, D c is the current total capacity of the storage cluster; C cis the current compression ratio of the storage cluster; F c is the average usage rate of the cloud disks included in the storage cluster; N u S is the number of cloud disks to be created; u is the average capacity of the cloud disk to be created; C u F is the historical compression rate of the user to whom the cloud disk to be created belongs; u is the average cloud disk usage rate of the users to whom the cloud disk to be created belongs; α is the preset adjustment factor.
[0063] Optionally, the preset adjustment factor α may be calculated by the following formula:
[0064] α=α+β·(r actual -r predicted )
[0065] Among them, β is the preset learning rate; r predicted The predicted compression rate of the historical target storage cluster during the historical cloud disk creation process, for example, the predicted compression rate calculated by the above formula when the cloud disk to be created was previously created to the historical target storage cluster; r actual It is the actual compression rate of the historical target storage cluster during the historical cloud disk creation process. For example, it is the actual compression rate of the historical target storage cluster collected when the cloud disk to be created was actually created in the historical target storage cluster last time.
[0066] Based on any of the above embodiments, S203 determines a target storage cluster from each storage cluster according to the predicted compression rates of different storage clusters, and creates the cloud disk to be created in the target storage cluster, so that the difference in compression rates of all storage clusters is minimized after the cloud disk to be created is created in the target storage cluster. Specifically, Figure 3 Shown include:
[0067] S301: in the case where the cloud disk to be created is created in any one of the storage clusters, construct an objective function for characterizing the difference between the compression rates of all storage clusters according to the predicted compression rate of the any one of the storage clusters and the actual compression rates of the remaining storage clusters except the any one of the storage clusters, and determine the value of the objective function;
[0068] S302: Determine the target storage cluster according to the value of the objective function in the case of creating the cloud disk to be created in different storage clusters, and create the cloud disk to be created in the target storage cluster.
[0069] In this embodiment, an objective function can be constructed to characterize the difference between the compression rates of all storage clusters in the case where the cloud disk to be created is created in any storage cluster. The objective function is constructed based on the compression rates of all storage clusters in the case, wherein the compression rate of the storage cluster to which the cloud disk to be created is created uses the predicted compression rate, and the remaining storage clusters use the actual compression rate. In addition, based on the objective function, it can be compared which of the different situations has the smallest difference between the compression rates of all storage clusters, that is, the compression rates between all storage clusters are the most balanced. The objective function only needs to be able to characterize the difference between the compression rates of all storage clusters in any situation, and the construction method and form of the objective function are not limited in this embodiment.
[0070] Optionally, the objective function can be constructed as follows:
[0071] Determine the compression rate standard deviation, maximum compression rate and minimum compression rate of all storage clusters according to the predicted compression rate of any storage cluster and the actual compression rates of the remaining storage clusters except the any storage cluster;
[0072] Based on the maximum compression rate and the minimum compression rate, the compression rate standard deviations of all storage clusters are normalized, and based on the normalization result, an objective function for characterizing the differences between the compression rates of all storage clusters is obtained.
[0073] In this embodiment, when the cloud disk to be created is created in any storage cluster, the compression rate standard deviation, maximum compression rate and minimum compression rate of all storage clusters can be determined according to the predicted compression rate of the storage cluster and the actual compression rates of the remaining storage clusters except the storage cluster, wherein the compression rate standard deviation is the square root of the arithmetic mean of the square value of the difference between the compression rate of each storage cluster and the average compression rate. Further, the compression rate standard deviation of all storage clusters can be normalized based on the maximum compression rate and the minimum compression rate, and the normalized result can be directly used as the objective function, or the normalized result can be further modified, for example, 1 minus the normalized result is used as the objective function, and the formula of the objective function C can be as follows:
[0074]
[0075] Among them, r i is the compression ratio of storage cluster i (predicted compression ratio or actual compression ratio); is the average compression ratio; n is the total number of all storage clusters; R max is the maximum compression ratio; R min is the minimum compression ratio.
[0076] In the objective function C, when the compression rates of all storage clusters are equal, the value of the objective function C is 1, indicating that the compression rates of all storage clusters are perfectly balanced; and when the compression rate differences of all storage clusters are greater, the value of the objective function C is closer to 0. Therefore, after calculating the values of the objective function C in all cases, a case where the value of the objective function C is closest to 1 can be selected. In this case, the difference between the compression rates of all storage clusters is the smallest. This case is used as the optimal deployment strategy, that is, the compression rates of the storage clusters of the cloud computing architecture can be kept relatively balanced in the target storage cluster specified in this case where the cloud disk to be created is created.
[0077] Of course, the construction of the objective function in this embodiment is not limited to the above-mentioned method. For example, the compression rate standard deviation or variance can be directly used as the objective function, or the objective function can be constructed by other methods.
[0078] Corresponding to the cloud disk scheduling method based on elastic block storage service of the above embodiment, Figure 4 A structural block diagram of a cloud disk scheduling device based on elastic block storage service provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 4 The cloud disk scheduling device 400 based on the elastic block storage service includes: an acquisition unit 401, a prediction unit 402 and a selection unit 403.
[0079] The acquisition unit 401 is used to acquire the historical cloud disk usage status information of the user to whom the cloud disk to be created belongs, and the current storage status information of each storage cluster; wherein any storage cluster includes one or more created cloud disks;
[0080] A prediction unit 402 is used to predict the predicted compression rates of different storage clusters when the cloud disk to be created is created in different storage clusters according to the historical cloud disk usage status information and the current storage status information of each storage cluster;
[0081] The selection unit 403 is used to determine a target storage cluster from each storage cluster according to the predicted compression rates of different storage clusters, and create the cloud disk to be created in the target storage cluster, so that the difference in compression rates of all storage clusters is minimized after the cloud disk to be created is created in the target storage cluster.
[0082] In one or more embodiments of the present disclosure, when predicting the predicted compression rates of different storage clusters when creating the cloud disk to be created in different storage clusters based on the historical cloud disk usage status information and the current storage status information of each storage cluster, the prediction unit 402 is used to:
[0083] Based on the historical cloud disk usage status information and the current storage status information of any storage cluster, determine the ratio of the first data volume after compression to the second data volume before compression in any storage cluster when the cloud disk to be created is created in any storage cluster, and obtain the predicted compression rate of any storage cluster based on the ratio.
[0084] In one or more embodiments of the present disclosure, when determining, based on the historical cloud disk usage status information and the current storage status information of any storage cluster, the ratio of the first amount of data after compression to the second amount of data before compression in any storage cluster in the case where the cloud disk to be created is created in any storage cluster, the prediction unit 402 is used to:
[0085] Determine, according to the current storage status information of any one of the storage clusters, the third amount of data after compression and the fourth amount of data before compression in any one of the storage clusters before creating the cloud disk to be created in the any one of the storage clusters;
[0086] Determine the fifth amount of data after compression and the sixth amount of data before compression in the cloud disk to be created according to the historical cloud disk usage status information;
[0087] The sum of the third data amount and the fifth data amount is determined as the first data amount, the sum of the fourth data amount and the sixth data amount is determined as the second data amount, and a ratio of the first data amount to the second data amount is obtained.
[0088] In one or more embodiments of the present disclosure, when the prediction unit 402 determines the third amount of data after compression and the fourth amount of data before compression in any storage cluster before creating the cloud disk to be created in the any storage cluster according to the current storage status information of the any storage cluster, it is used to:
[0089] Obtaining the product of the current total capacity of any storage cluster, the average usage rate of the included cloud disks, and the current compression rate of any storage cluster as the third data volume, and obtaining the product of the current total capacity of any storage cluster and the average usage rate of the included cloud disks as the fourth data volume;
[0090] and / or
[0091] The determining, according to the historical cloud disk usage status information, the fifth data volume after compression and the sixth data volume before compression in the cloud disk to be created includes:
[0092] The product of the average cloud disk usage rate of the user to whom the cloud disk to be created belongs, the historical compression rate, the number of cloud disks to be created, and the average capacity of the cloud disk to be created is obtained as the fifth data volume, and the product of the average cloud disk usage rate of the user to whom the cloud disk to be created belongs, the number of cloud disks to be created, and the average capacity of the cloud disk to be created is obtained as the sixth data volume.
[0093] In one or more embodiments of the present disclosure, when obtaining the predicted compression rate of any storage cluster according to the ratio, the prediction unit 402 is configured to:
[0094] Determine the product of the ratio and a preset adjustment factor as the predicted compression rate of any storage cluster;
[0095] The preset adjustment factor is determined according to the difference between the predicted compression rate and the actual compression rate of the historical target storage cluster in the historical cloud disk creation process, and the preset learning rate.
[0096] In one or more embodiments of the present disclosure, when the selection unit 403 determines a target storage cluster from each storage cluster according to the predicted compression rates of different storage clusters, and creates the cloud disk to be created in the target storage cluster so that the difference in compression rates of all storage clusters after the cloud disk to be created is created in the target storage cluster is minimized, it is configured to:
[0097] In the case where the cloud disk to be created is created in any one of the storage clusters, an objective function for characterizing the difference between the compression rates of all storage clusters is constructed according to the predicted compression rate of the any one of the storage clusters and the actual compression rates of the remaining storage clusters except the any one of the storage clusters, and a value of the objective function is determined;
[0098] The target storage cluster is determined according to the value of the objective function in the case of creating the cloud disk to be created in different storage clusters, and the cloud disk to be created is created in the target storage cluster.
[0099] In one or more embodiments of the present disclosure, when constructing an objective function for characterizing the difference between the compression rates of all storage clusters according to the predicted compression rate of any storage cluster and the actual compression rates of the remaining storage clusters except the any storage cluster, the selection unit 403 is used to:
[0100] Determine the compression rate standard deviation, maximum compression rate and minimum compression rate of all storage clusters according to the predicted compression rate of any storage cluster and the actual compression rates of the remaining storage clusters except the any storage cluster;
[0101] Based on the maximum compression rate and the minimum compression rate, the compression rate standard deviations of all storage clusters are normalized, and based on the normalization result, an objective function for characterizing the differences between the compression rates of all storage clusters is obtained.
[0102] In one or more embodiments of the present disclosure, when acquiring the historical cloud disk usage status information of the user to whom the cloud disk to be created belongs, the acquisition unit 401 is used to:
[0103] If the user to whom the cloud disk to be created belongs has no historical cloud disk usage information, or the historical cloud disk usage information is unavailable, a similar user group to the user to whom the cloud disk to be created belongs is determined, and the historical cloud disk usage information of the similar user group is determined as the historical cloud disk usage information of the user to whom the cloud disk to be created belongs.
[0104] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0105] refer to Figure 5 , which shows a schematic diagram of the structure of an electronic device 500 suitable for implementing the embodiment of the present disclosure, and the electronic device 500 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0106] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 to a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0107] Typically, the following devices may be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 508 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 509. The communication devices 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0108] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0109] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0110] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0111] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0112] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0113] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0114] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0115] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0116] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0117] In a first aspect, according to one or more embodiments of the present disclosure, a cloud disk scheduling method based on an elastic block storage service is provided, comprising:
[0118] Obtain historical cloud disk usage status information of the user to whom the cloud disk to be created belongs, and current storage status information of each storage cluster; wherein any storage cluster includes one or more created cloud disks;
[0119] According to the historical cloud disk usage status information and the current storage status information of each storage cluster, predict the predicted compression rates of different storage clusters when the cloud disk to be created is created in different storage clusters;
[0120] According to the predicted compression rates of different storage clusters, a target storage cluster is determined from each storage cluster, and the cloud disk to be created is created in the target storage cluster, so that the difference in compression rates of all storage clusters is minimized after the cloud disk to be created is created in the target storage cluster.
[0121] According to one or more embodiments of the present disclosure, predicting the predicted compression rates of different storage clusters when creating the cloud disk to be created in different storage clusters according to the historical cloud disk usage status information and the current storage status information of each storage cluster includes:
[0122] Based on the historical cloud disk usage status information and the current storage status information of any storage cluster, determine the ratio of the first data volume after compression to the second data volume before compression in any storage cluster when the cloud disk to be created is created in any storage cluster, and obtain the predicted compression rate of any storage cluster based on the ratio.
[0123] According to one or more embodiments of the present disclosure, determining, based on the historical cloud disk usage status information and the current storage status information of any storage cluster, a ratio of a first amount of data after compression to a second amount of data before compression in any storage cluster in a case where the cloud disk to be created is created in any storage cluster, includes:
[0124] Determine, according to the current storage status information of any one of the storage clusters, the third amount of data after compression and the fourth amount of data before compression in any one of the storage clusters before creating the cloud disk to be created in the any one of the storage clusters;
[0125] Determine the fifth amount of data after compression and the sixth amount of data before compression in the cloud disk to be created according to the historical cloud disk usage status information;
[0126] The sum of the third data amount and the fifth data amount is determined as the first data amount, the sum of the fourth data amount and the sixth data amount is determined as the second data amount, and a ratio of the first data amount to the second data amount is obtained.
[0127] According to one or more embodiments of the present disclosure, determining, according to the current storage status information of any storage cluster, the third amount of data after compression and the fourth amount of data before compression in any storage cluster before creating the cloud disk to be created in the any storage cluster, includes:
[0128] Obtaining the product of the current total capacity of any storage cluster, the average usage rate of the included cloud disks, and the current compression rate of any storage cluster as the third data volume, and obtaining the product of the current total capacity of any storage cluster and the average usage rate of the included cloud disks as the fourth data volume;
[0129] and / or
[0130] The determining, according to the historical cloud disk usage status information, the fifth data volume after compression and the sixth data volume before compression in the cloud disk to be created includes:
[0131] The product of the average cloud disk usage rate of the user to whom the cloud disk to be created belongs, the historical compression rate, the number of cloud disks to be created, and the average capacity of the cloud disk to be created is obtained as the fifth data volume, and the product of the average cloud disk usage rate of the user to whom the cloud disk to be created belongs, the number of cloud disks to be created, and the average capacity of the cloud disk to be created is obtained as the sixth data volume.
[0132] According to one or more embodiments of the present disclosure, obtaining the predicted compression rate of any storage cluster according to the ratio includes:
[0133] Determine the product of the ratio and a preset adjustment factor as the predicted compression rate of any storage cluster;
[0134] The preset adjustment factor is determined according to the difference between the predicted compression rate and the actual compression rate of the historical target storage cluster in the historical cloud disk creation process, and the preset learning rate.
[0135] According to one or more embodiments of the present disclosure, determining a target storage cluster from each storage cluster according to predicted compression rates of different storage clusters, and creating the cloud disk to be created in the target storage cluster, so that the difference in compression rates of all storage clusters after the cloud disk to be created is created in the target storage cluster is minimized, includes:
[0136] In the case where the cloud disk to be created is created in any one of the storage clusters, an objective function for characterizing the difference between the compression rates of all storage clusters is constructed according to the predicted compression rate of the any one of the storage clusters and the actual compression rates of the remaining storage clusters except the any one of the storage clusters, and a value of the objective function is determined;
[0137] The target storage cluster is determined according to the value of the objective function in the case of creating the cloud disk to be created in different storage clusters, and the cloud disk to be created is created in the target storage cluster.
[0138] According to one or more embodiments of the present disclosure, constructing an objective function for characterizing the difference between compression rates of all storage clusters according to the predicted compression rate of any storage cluster and the actual compression rates of the remaining storage clusters except the any storage cluster includes:
[0139] Determine the compression rate standard deviation, maximum compression rate and minimum compression rate of all storage clusters according to the predicted compression rate of any storage cluster and the actual compression rates of the remaining storage clusters except the any storage cluster;
[0140] Based on the maximum compression rate and the minimum compression rate, the compression rate standard deviations of all storage clusters are normalized, and based on the normalization result, an objective function for characterizing the differences between the compression rates of all storage clusters is obtained.
[0141] According to one or more embodiments of the present disclosure, obtaining historical cloud disk usage status information of the user to whom the cloud disk to be created belongs includes:
[0142] If the user to whom the cloud disk to be created belongs has no historical cloud disk usage information, or the historical cloud disk usage information is unavailable, a similar user group to the user to whom the cloud disk to be created belongs is determined, and the historical cloud disk usage information of the similar user group is determined as the historical cloud disk usage information of the user to whom the cloud disk to be created belongs.
[0143] In a second aspect, according to one or more embodiments of the present disclosure, a cloud disk scheduling device based on an elastic block storage service is provided, including:
[0144] An acquisition unit, used to acquire historical cloud disk usage status information of the user to whom the cloud disk to be created belongs, and current storage status information of each storage cluster; wherein any storage cluster includes one or more created cloud disks;
[0145] A prediction unit, configured to predict, based on the historical cloud disk usage status information and the current storage status information of each storage cluster, predicted compression rates of different storage clusters when the cloud disk to be created is created in different storage clusters;
[0146] A selection unit is used to determine a target storage cluster from each storage cluster according to the predicted compression rates of different storage clusters, and create the cloud disk to be created in the target storage cluster, so that the difference in compression rates of all storage clusters is minimized after the cloud disk to be created is created in the target storage cluster.
[0147] According to one or more embodiments of the present disclosure, when predicting the predicted compression rates of different storage clusters when creating the cloud disk to be created in different storage clusters based on the historical cloud disk usage status information and the current storage status information of each storage cluster, the prediction unit is used to:
[0148] Based on the historical cloud disk usage status information and the current storage status information of any storage cluster, determine the ratio of the first data volume after compression to the second data volume before compression in any storage cluster when the cloud disk to be created is created in any storage cluster, and obtain the predicted compression rate of any storage cluster based on the ratio.
[0149] According to one or more embodiments of the present disclosure, when determining, based on the historical cloud disk usage status information and the current storage status information of any storage cluster, the ratio of the first data volume after compression to the second data volume before compression in any storage cluster in the case where the cloud disk to be created is created in any storage cluster, the prediction unit is used to:
[0150] Determine, according to the current storage status information of any one of the storage clusters, the third amount of data after compression and the fourth amount of data before compression in any one of the storage clusters before creating the cloud disk to be created in the any one of the storage clusters;
[0151] Determine the fifth amount of data after compression and the sixth amount of data before compression in the cloud disk to be created according to the historical cloud disk usage status information;
[0152] The sum of the third data amount and the fifth data amount is determined as the first data amount, the sum of the fourth data amount and the sixth data amount is determined as the second data amount, and a ratio of the first data amount to the second data amount is obtained.
[0153] According to one or more embodiments of the present disclosure, when the prediction unit determines, based on the current storage status information of any storage cluster, the third amount of data after compression and the fourth amount of data before compression in any storage cluster before creating the cloud disk to be created in the any storage cluster, the prediction unit is used to:
[0154] Obtaining the product of the current total capacity of any storage cluster, the average usage rate of the included cloud disks, and the current compression rate of any storage cluster as the third data volume, and obtaining the product of the current total capacity of any storage cluster and the average usage rate of the included cloud disks as the fourth data volume;
[0155] and / or
[0156] The determining, according to the historical cloud disk usage status information, the fifth data volume after compression and the sixth data volume before compression in the cloud disk to be created includes:
[0157] The product of the average cloud disk usage rate of the user to whom the cloud disk to be created belongs, the historical compression rate, the number of cloud disks to be created, and the average capacity of the cloud disk to be created is obtained as the fifth data volume, and the product of the average cloud disk usage rate of the user to whom the cloud disk to be created belongs, the number of cloud disks to be created, and the average capacity of the cloud disk to be created is obtained as the sixth data volume.
[0158] According to one or more embodiments of the present disclosure, when the prediction unit obtains the predicted compression rate of any storage cluster according to the ratio, it is configured to:
[0159] Determine the product of the ratio and a preset adjustment factor as the predicted compression rate of any storage cluster;
[0160] The preset adjustment factor is determined according to the difference between the predicted compression rate and the actual compression rate of the historical target storage cluster in the historical cloud disk creation process, and the preset learning rate.
[0161] According to one or more embodiments of the present disclosure, when the selection unit determines a target storage cluster from each storage cluster according to predicted compression rates of different storage clusters, and creates the cloud disk to be created in the target storage cluster so that the difference in compression rates of all storage clusters after the cloud disk to be created is created in the target storage cluster is minimized, the selection unit is used to:
[0162] In the case where the cloud disk to be created is created in any one of the storage clusters, an objective function for characterizing the difference between the compression rates of all storage clusters is constructed according to the predicted compression rate of the any one of the storage clusters and the actual compression rates of the remaining storage clusters except the any one of the storage clusters, and a value of the objective function is determined;
[0163] The target storage cluster is determined according to the value of the objective function in the case of creating the cloud disk to be created in different storage clusters, and the cloud disk to be created is created in the target storage cluster.
[0164] According to one or more embodiments of the present disclosure, when constructing an objective function for characterizing the difference between the compression rates of all storage clusters according to the predicted compression rate of any storage cluster and the actual compression rates of the remaining storage clusters except the any storage cluster, the selection unit is configured to:
[0165] Determine the compression rate standard deviation, maximum compression rate and minimum compression rate of all storage clusters according to the predicted compression rate of any storage cluster and the actual compression rates of the remaining storage clusters except the any storage cluster;
[0166] Based on the maximum compression rate and the minimum compression rate, the compression rate standard deviations of all storage clusters are normalized, and based on the normalization result, an objective function for characterizing the differences between the compression rates of all storage clusters is obtained.
[0167] According to one or more embodiments of the present disclosure, when acquiring the historical cloud disk usage status information of the user to whom the cloud disk to be created belongs, the acquisition unit is used to:
[0168] If the user to whom the cloud disk to be created belongs has no historical cloud disk usage information, or the historical cloud disk usage information is unavailable, a similar user group to the user to whom the cloud disk to be created belongs is determined, and the historical cloud disk usage information of the similar user group is determined as the historical cloud disk usage information of the user to whom the cloud disk to be created belongs.
[0169] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;
[0170] The memory stores computer-executable instructions;
[0171] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the cloud disk scheduling method based on the elastic block storage service as described in the first aspect and various possible designs of the first aspect.
[0172] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the cloud disk scheduling method based on the elastic block storage service as described in the first aspect and various possible designs of the first aspect is implemented.
[0173] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including computer execution instructions. When a processor executes the computer execution instructions, the cloud disk scheduling method based on the elastic block storage service as described in the first aspect and various possible designs of the first aspect is implemented.
[0174] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0175] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0176] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A cloud disk scheduling method based on elastic block storage service, characterized in that: include: Obtain the historical cloud disk usage status information of the user to whom the cloud disk to be created belongs, as well as the current storage status information of each storage cluster; Any storage cluster includes one or more created cloud disks; According to the historical cloud disk usage status information and the current storage status information of each storage cluster, predict the predicted compression rates of different storage clusters when the cloud disk to be created is created in different storage clusters; According to the predicted compression rates of different storage clusters, the difference between the compression rates of all storage clusters in the case of creating the cloud disk to be created in different storage clusters is determined, a target storage cluster is determined from each storage cluster according to the case corresponding to the minimum difference, and the cloud disk to be created is created in the target storage cluster, so that the difference between the compression rates of all storage clusters after the cloud disk to be created is created in the target storage cluster is minimized.
2. The method according to claim 1, characterized in that The predicting, based on the historical cloud disk usage status information and the current storage status information of each storage cluster, predicted compression rates of different storage clusters when creating the cloud disk to be created in different storage clusters includes: Based on the historical cloud disk usage status information and the current storage status information of any storage cluster, determine the ratio of the first data volume after compression to the second data volume before compression in any storage cluster when the cloud disk to be created is created in any storage cluster, and obtain the predicted compression rate of any storage cluster based on the ratio.
3. The method according to claim 2, characterized in that The determining, based on the historical cloud disk usage status information and the current storage status information of any storage cluster, a ratio of a first amount of data after compression to a second amount of data before compression in any storage cluster in a case where the cloud disk to be created is created in any storage cluster, includes: Determine, according to the current storage status information of any one of the storage clusters, the third amount of data after compression and the fourth amount of data before compression in any one of the storage clusters before creating the cloud disk to be created in the any one of the storage clusters; Determine the fifth amount of data after compression and the sixth amount of data before compression in the cloud disk to be created according to the historical cloud disk usage status information; The sum of the third data amount and the fifth data amount is determined as the first data amount, the sum of the fourth data amount and the sixth data amount is determined as the second data amount, and a ratio of the first data amount to the second data amount is obtained.
4. The method according to claim 3, characterized in that The determining, according to the current storage status information of any storage cluster, the third amount of data after compression and the fourth amount of data before compression in any storage cluster before creating the cloud disk to be created in any storage cluster comprises: Obtaining the product of the current total capacity of any storage cluster, the average usage rate of the included cloud disks, and the current compression rate of any storage cluster as the third data volume, and obtaining the product of the current total capacity of any storage cluster and the average usage rate of the included cloud disks as the fourth data volume; and / or The determining, according to the historical cloud disk usage status information, the fifth data volume after compression and the sixth data volume before compression in the cloud disk to be created includes: The product of the average cloud disk usage rate of the user to whom the cloud disk to be created belongs, the historical compression rate, the number of cloud disks to be created, and the average capacity of the cloud disk to be created is obtained as the fifth data volume, and the product of the average cloud disk usage rate of the user to whom the cloud disk to be created belongs, the number of cloud disks to be created, and the average capacity of the cloud disk to be created is obtained as the sixth data volume.
5. The method according to any one of claims 2 to 4, characterized in that: Obtaining the predicted compression rate of any storage cluster according to the ratio includes: Determine the product of the ratio and a preset adjustment factor as the predicted compression rate of any storage cluster; The preset adjustment factor is determined according to the difference between the predicted compression rate and the actual compression rate of the historical target storage cluster in the historical cloud disk creation process, and the preset learning rate.
6. The method according to any one of claims 1 to 4, characterized in that: The method of determining the difference between the compression rates of all storage clusters in the case where the cloud disk to be created is created in different storage clusters according to the predicted compression rates of different storage clusters, determining a target storage cluster from each storage cluster according to a case corresponding to the minimum difference, and creating the cloud disk to be created in the target storage cluster includes: In the case where the cloud disk to be created is created in any one of the storage clusters, an objective function for characterizing the difference between the compression rates of all storage clusters is constructed according to the predicted compression rate of the any one of the storage clusters and the actual compression rates of the remaining storage clusters except the any one of the storage clusters, and a value of the objective function is determined; The target storage cluster is determined according to the value of the objective function in the case of creating the cloud disk to be created in different storage clusters, and the cloud disk to be created is created in the target storage cluster.
7. The method according to claim 6, characterized in that The constructing, according to the predicted compression rate of any storage cluster and the actual compression rates of the remaining storage clusters except the any storage cluster, an objective function for characterizing the difference between the compression rates of all storage clusters includes: Determine the compression rate standard deviation, maximum compression rate and minimum compression rate of all storage clusters according to the predicted compression rate of any storage cluster and the actual compression rates of the remaining storage clusters except the any storage cluster; Based on the maximum compression rate and the minimum compression rate, the compression rate standard deviations of all storage clusters are normalized, and based on the normalization result, an objective function for characterizing the differences between the compression rates of all storage clusters is obtained.
8. The method according to any one of claims 1 to 4, characterized in that: The step of obtaining the historical cloud disk usage status information of the user to whom the cloud disk to be created belongs includes: If the user to whom the cloud disk to be created belongs has no historical cloud disk usage information, or the historical cloud disk usage information is unavailable, a similar user group to the user to whom the cloud disk to be created belongs is determined, and the historical cloud disk usage information of the similar user group is determined as the historical cloud disk usage information of the user to whom the cloud disk to be created belongs.
9. A cloud disk scheduling device based on elastic block storage service, characterized in that: include: An acquisition unit, used to acquire historical cloud disk usage status information of the user to whom the cloud disk to be created belongs, and current storage status information of each storage cluster; Any storage cluster includes one or more created cloud disks; A prediction unit, configured to predict, based on the historical cloud disk usage status information and the current storage status information of each storage cluster, predicted compression rates of different storage clusters when the cloud disk to be created is created in different storage clusters; A selection unit is used to determine the difference between the compression rates of all storage clusters in the case where the cloud disk to be created is created in different storage clusters according to the predicted compression rates of different storage clusters, determine a target storage cluster from each storage cluster according to the situation corresponding to the minimum difference, and create the cloud disk to be created in the target storage cluster, so that the difference between the compression rates of all storage clusters is minimized after the cloud disk to be created is created in the target storage cluster.
10. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 8 is implemented.
12. A computer program product, characterized in that The method comprises computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Data migration method and device
CN110334079A
Resource scheduling method and device based on cloud storage system, electronic equipment, storage medium and program product
CN118502956A