Cloud hard disk resource pool management method and device, storage medium and electronic device

By analyzing user hard disk application requests and performing resource pool management based on the allocable capacity of the cloud hard disk resource pool, the problem of low resource utilization and waste caused by traditional allocation methods is solved, and more efficient resource allocation and utilization are achieved.

CN113485645BActive Publication Date: 2024-09-20BEIJING HUIJUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110769436.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-07
Publication Date
2024-09-20
Estimated Expiration
2041-07-07

AI Technical Summary

Technical Problem

The allocation method of traditional cloud hard disk resource pools relies on the subjective judgment of staff, resulting in low resource utilization and resource waste.

Method used

By analyzing the user's hard disk application request, it determines whether the application requirements are met based on the current allocable capacity and applied capacity of the cloud hard disk resource pool. After the user's application is successful, the corresponding physical disk space is allocated for the written data and a hard disk capacity application record is generated. to optimize resource allocation.

Benefits of technology

It improves the utilization rate of the cloud disk resource pool, avoids resource waste, and achieves more reasonable resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113485645B
    Figure CN113485645B
Patent Text Reader

Abstract

The present invention provides a management method and device for a cloud hard disk resource pool, a storage medium and an electronic device, the method comprising: parsing a hard disk application request sent by a user to determine the hard disk capacity applied by the user; determining the current allocatable capacity and applied capacity of the cloud hard disk resource pool; when the allocatable capacity is greater than the applied capacity and the hard disk capacity is not greater than the allocatable capacity, determining that the user's hard disk application is successful, saving the generated hard disk capacity application record corresponding to the user into a hard disk application record table, and upon receiving the write data input by the user, saving the write data into the physical disk space allocated to the user in the cloud hard disk resource pool. Based on the current allocatable capacity and applied capacity of the cloud hard disk resource pool, the resources of the cloud hard disk resource pool are reasonably allocated, and reasonable physical disk space is allocated for the write data input by the user, so as to avoid the situation where the hard disk capacity is not used, thereby improving the utilization rate of the cloud hard disk resource pool.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing technology, and in particular to a method and device for managing a cloud hard disk resource pool, a storage medium, and an electronic device. Background Art

[0002] With the development of Internet technology, cloud services based on Internet technology are gradually being used in people's lives. Cloud services are the increase, use and interaction mode of related services based on the Internet, usually involving the provision of dynamic, scalable and often virtualized resources through the Internet.

[0003] In order to provide users with better cloud services, cloud hard disks are usually used to provide cloud servers with highly reliable, high-performance, rich specifications and elastically scalable block storage services. Cloud hard disks are similar to hard disks on PCs and need to be mounted on cloud servers for use. Cloud hard disks can meet the business needs of various cloud server scenarios and are suitable for distributed file systems, development and testing, data warehouses, and high-performance computing.

[0004] In order to make reasonable use of the cloud hard disk resource pool, it is necessary to allocate the cloud hard disk resource pool. The traditional allocation method of the cloud hard disk resource pool mainly relies on the staff's understanding of the business characteristics of the cloud hard disk service users and their subjective judgment ability, and directly allocates the hard disk space requested by the user. However, this allocation method is unreasonable, resulting in low utilization of the cloud hard disk resource pool and waste of resources. Summary of the invention

[0005] In view of this, the present invention provides a management method and device, storage medium and electronic device for a cloud hard disk resource pool. When a user applies for hard disk capacity, it is determined whether the user meets the application requirements based on the hard disk capacity applied by the user and the current allocable capacity and applied capacity of the cloud hard disk resource pool. When the user meets the application requirements, a hard disk capacity application record of the user is generated and saved, and when the user's write data is received, the corresponding physical disk space is allocated to the write data in the cloud hard disk resource pool, thereby effectively improving the utilization rate of the cloud hard disk resource pool.

[0006] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0007] A method for managing a cloud hard disk resource pool, comprising:

[0008] When receiving a hard disk application request sent by a user, parsing the hard disk application request to determine the hard disk capacity applied by the user;

[0009] Based on the current hard disk usage information and hard disk application record table of the cloud hard disk resource pool, determine the current allocatable capacity and applied capacity of the cloud hard disk resource pool;

[0010] Determining whether the allocatable capacity is greater than the applied capacity;

[0011] If it is determined that the allocatable capacity is greater than the applied capacity, determining whether the hard disk capacity applied for by the user is less than or equal to the allocatable capacity;

[0012] If it is determined that the hard disk capacity is less than or equal to the allocatable capacity, it is determined that the user has successfully applied for the hard disk, a hard disk capacity application record corresponding to the user is generated, and the hard disk capacity application record is saved in the hard disk application record table, and when the write data input by the user is received, the data size of the write data is determined, and corresponding physical disk space is allocated to the write data in the cloud hard disk resource pool based on the data size, and the write data is saved in the physical disk space, wherein the data size is not greater than the hard disk capacity applied for by the user.

[0013] Optionally, the method of determining the current allocatable capacity and applied capacity of the cloud hard disk resource pool based on the current hard disk usage information and hard disk application record table of the cloud hard disk resource pool includes:

[0014] Based on the hard disk application record table, determining whether the user is the first applicant for the cloud hard disk resource pool;

[0015] If it is determined that the user is the first user to apply for the cloud hard disk resource pool, the total storage capacity of the cloud hard disk resource pool is determined as the current allocatable capacity of the cloud hard disk resource pool, and the current applied capacity of the cloud hard disk resource pool is determined to be zero;

[0016] If it is determined that the user is not the first applicant for the cloud hard disk resource pool, then each hard disk capacity application record in the hard disk application record table is obtained, the requested capacity of each hard disk capacity application record is determined, and the sum of each requested capacity is determined as the current applied capacity of the cloud hard disk resource pool;

[0017] The hard disk usage information is parsed to determine the actual hard disk usage space of the cloud hard disk resource pool, and the current allocatable capacity of the cloud hard disk resource pool is determined based on the actual hard disk usage space.

[0018] In the above method, optionally, determining the current allocatable capacity of the cloud hard disk resource pool based on the actual used space of the hard disk includes:

[0019] Determine the resource pool utilization rate of the cloud hard disk resource pool based on the actual used space of the hard disk and the total storage capacity of the cloud hard disk resource pool;

[0020] Substituting the resource pool utilization rate into a preset excess allocation formula for calculation to obtain the current excess allocation ratio of the cloud hard disk resource pool;

[0021] The excess allocation ratio is calculated with the total storage capacity to obtain the current allocatable capacity of the cloud hard disk resource pool.

[0022] Optionally, the method described above, determining the resource pool utilization rate of the cloud hard disk resource pool based on the actual used space of the hard disk and the total storage capacity of the cloud hard disk resource pool, includes:

[0023] The actual used space of the hard disk is compared with the total storage capacity, and the obtained ratio is determined as the resource pool utilization rate of the cloud hard disk resource pool.

[0024] The above method may optionally further include:

[0025] If it is determined that the allocatable capacity is not greater than the applied capacity, capacity expansion prompt information is generated and displayed to prompt the staff to expand the capacity of the cloud hard disk resource pool.

[0026] A cloud hard disk resource pool management device, comprising:

[0027] The parsing unit is used to parse the hard disk application request sent by the user and determine the hard disk capacity applied by the user when receiving the hard disk application request.

[0028] A determination unit, configured to determine the current allocatable capacity and applied capacity of the cloud hard disk resource pool based on the current hard disk usage information and hard disk application record table of the cloud hard disk resource pool;

[0029] A first judging unit, configured to judge whether the allocatable capacity is greater than the applied capacity;

[0030] A second judgment unit is used to judge whether the hard disk capacity applied by the user is less than or equal to the allocatable capacity if it is determined that the allocatable capacity is greater than the applied capacity;

[0031] A generating unit is configured to determine that the user has successfully applied for a hard disk if it is determined that the hard disk capacity is less than or equal to the allocatable capacity, generate a hard disk capacity application record corresponding to the user, save the hard disk capacity application record in the hard disk application record table, and upon receiving write data input by the user, determine the data size of the write data, allocate corresponding physical disk space for the write data in the cloud hard disk resource pool based on the data size, and save the write data to the physical disk space, wherein the data size is not greater than the hard disk capacity applied for by the user.

[0032] In the above device, optionally, the determining unit includes:

[0033] A judging subunit, configured to judge whether the user is the first applicant of the cloud hard disk resource pool based on the hard disk application record table;

[0034] a determination subunit, configured to, if it is determined that the user is the first applicant of the cloud hard disk resource pool, determine the total storage capacity of the cloud hard disk resource pool as the current allocatable capacity of the cloud hard disk resource pool, and determine that the current applied capacity of the cloud hard disk resource pool is zero;

[0035] an acquisition subunit, for obtaining each hard disk capacity application record in the hard disk application record table if it is determined that the user is not the first applicant for the cloud hard disk resource pool, determining the requested capacity of each hard disk capacity application record, and determining the sum of each requested capacity as the current applied capacity of the cloud hard disk resource pool;

[0036] The parsing subunit is used to parse the hard disk usage information, determine the actual hard disk usage space of the cloud hard disk resource pool, and determine the current allocatable capacity of the cloud hard disk resource pool based on the actual hard disk usage space.

[0037] In the above device, optionally, the parsing subunit includes:

[0038] A determination module, configured to determine a resource pool utilization rate of the cloud hard disk resource pool based on the actual used space of the hard disk and the total storage capacity of the cloud hard disk resource pool;

[0039] A first calculation module is used to substitute the resource pool utilization rate into a preset excess allocation formula for calculation to obtain a current excess allocation ratio of the cloud hard disk resource pool;

[0040] The second calculation module is used to calculate the excess allocation ratio and the total storage capacity to obtain the current allocatable capacity of the cloud hard disk resource pool.

[0041] The above device, optionally, the determination module includes:

[0042] The determination submodule is used to compare the actual used space of the hard disk with the total storage capacity, and determine the obtained ratio as the resource pool utilization rate of the cloud hard disk resource pool.

[0043] The above device may optionally further include:

[0044] The display unit is used to generate expansion prompt information if it is determined that the allocatable capacity is not greater than the applied capacity, and display the expansion prompt information to prompt the staff to expand the cloud hard disk resource pool.

[0045] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the cloud hard disk management method as described above.

[0046] An electronic device, characterized in that it includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the cloud hard disk management method as described above.

[0047] Compared with the prior art, the present invention has the following advantages:

[0048] The present invention provides a management method and device for a cloud hard disk resource pool, a storage medium and an electronic device. The method comprises: when receiving a hard disk application request sent by a user, parsing the hard disk application request to determine the hard disk capacity applied by the user; determining the allocatable capacity and the applied capacity of the cloud hard disk resource pool; when the allocatable capacity is greater than the applied capacity and the hard disk capacity is less than or equal to the allocatable capacity, determining that the user has successfully applied for the hard disk, generating a hard disk capacity application record corresponding to the user, and saving the hard disk capacity application record in a hard disk application record table. Based on the allocatable capacity and the applied capacity of the cloud hard disk resource pool, the user's hard disk application request is processed, and the resource status of the cloud hard disk resource pool can be autonomously and dynamically evaluated according to the current allocatable capacity and the applied capacity of the cloud hard disk resource pool, so as to more reasonably allocate the resources of the cloud hard disk resource pool. After the user successfully applies for the hard disk, when receiving the write data sent by the user, physical disk space is allocated in the cloud hard disk resource pool for the write data so as to save the write data. Thus, it can effectively avoid allocating too much hard disk capacity to the user, resulting in the situation that the hard disk capacity is not used, thereby improving the utilization rate of the cloud hard disk resource pool. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention 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 only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0050] Figure 1 A method flow chart of a cloud hard disk resource pool management method provided by an embodiment of the present invention;

[0051] Figure 2 Another method flow chart of a method for managing a cloud hard disk resource pool provided by an embodiment of the present invention;

[0052] Figure 3 A flowchart of another method for managing a cloud hard disk resource pool provided by an embodiment of the present invention;

[0053] Figure 4 A schematic diagram of the structure of a cloud hard disk resource pool management device provided by an embodiment of the present invention;

[0054] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0057] Based on the background technology, it can be known that the traditional way of allocating cloud hard disks has the phenomenon of low cloud hard disk utilization and resource waste; in order to solve this problem, the present invention provides a cloud hard disk management method, which can be used in many general or special computing device environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or devices, etc.

[0058] The execution subject of the present invention may be a server or a processor in a computer terminal, referring to Figure 1 , is a method flow chart of a cloud hard disk management method provided by an embodiment of the present invention, and is specifically described as follows:

[0059] S101. When receiving a hard disk application request sent by a user, the hard disk application request is parsed to determine the hard disk capacity requested by the user.

[0060] The present invention can be applied to a cloud hard disk manager, which can be a computer terminal, a server or a processor.

[0061] When a user needs to apply for a hard disk, he needs to generate a hard disk application request according to the needs. The hard disk application request includes the user's user information and the hard disk capacity that the user needs to apply for. Among them, the hard disk capacity in the present invention can be understood as hard disk space, hard disk capacity space, etc.

[0062] S102: Based on the current hard disk usage information and hard disk application record table of the cloud hard disk resource pool, determine the current allocatable capacity and applied capacity of the cloud hard disk resource pool.

[0063] Get the current hard disk usage information and hard disk application record table of the cloud hard disk resource pool, where the hard disk usage information is information generated according to the current usage status of the cloud hard disk resource pool after receiving the hard disk application request sent by the user. The hard disk usage information includes information about the physical disk space currently actually used by the cloud hard disk resource pool.

[0064] The allocatable capacity of the cloud hard disk resource pool in this application refers to the sum of the cloud hard disk capacities that can be allocated by a resource pool that provides cloud hard disk services. Furthermore, the allocatable capacity in this application is determined based on the current difference allocation ratio of the cloud hard disk resource pool and the total storage capacity of the cloud hard disk resource pool; the applied capacity of the cloud hard disk resource pool in this application refers to the sum of the hard disk capacities successfully applied for by each user; further, the units of the disk capacity, allocatable capacity, and applied capacity applied for by the user can be GiB, TiB, or PiB.

[0065] S103, determine whether the allocatable capacity is greater than the applied capacity; if it is determined that the allocatable capacity is greater than the applied capacity, execute S104; if it is determined that the allocatable capacity is not greater than the applied capacity, execute S106.

[0066] The allocatable capacity and the applied capacity may be compared to determine whether the allocatable capacity is greater than the applied capacity.

[0067] S104, determine whether the hard disk capacity applied for by the user is less than or equal to the allocatable capacity; if it is determined that the hard disk capacity is less than or equal to the allocatable capacity, execute S105; if it is determined that the hard disk capacity is greater than the allocatable capacity, execute S107.

[0068] The allocatable capacity is compared with the hard disk capacity requested by the user, so as to determine whether the hard disk capacity requested by the user is less than or equal to the allocatable capacity.

[0069] It should be noted that the execution order of S103 and S104 in the present invention can be interchanged. When S104 is executed first, if it is determined that the hard disk capacity is less than or equal to the allocatable capacity, S103 is executed; if it is determined that the hard disk capacity is greater than the allocatable capacity, S107 is executed; when S103 is executed, if it is determined that the allocatable capacity is greater than the applied capacity, S105 is executed; if it is determined that the allocatable capacity is not greater than the applied capacity, S106 is executed.

[0070] S105, determining that the user's application for a hard disk is successful, generating a hard disk capacity application record corresponding to the user, and saving the hard disk capacity application record in the hard disk application record table, and upon receiving the write data input by the user, determining the data size of the write data, allocating corresponding physical disk space for the write data in the cloud hard disk resource pool based on the data size, and saving the write data to the physical disk space, wherein the data size is not greater than the hard disk capacity applied for by the user.

[0071] In the present application, when it is determined that the hard disk capacity is less than or equal to the allocatable capacity, it is determined that the user's application for the hard disk is successful, and a hard disk capacity application record corresponding to the user is generated, wherein the generated hard disk capacity application record includes the user's user information, the applied hard disk capacity, the application time, and other contents.

[0072] After the hard disk capacity application record corresponding to the user is generated, the hard disk capacity application record is saved in the hard disk application record table, which indicates that the user has the permission to write data to the cloud hard disk resource pool, that is, the user's hard disk application is successful. This can also mean that the hard disk capacity applied by the user is registered, but the corresponding hard disk space has not yet been allocated to the user.

[0073] When write data input by the user is received, the data size of the write data is determined. It should be noted that the data size of the write data represents the minimum hard disk capacity required to save the write data. Based on the data size of the write data, physical disk space is allocated for the write data in the cloud hard disk resource pool, and the write data is saved in the physical disk space, wherein the data size of the write data is not greater than the hard disk capacity applied for by the user. It should be noted that the physical disk space is the hard disk capacity space required for actually storing the write data. Preferably, the size of the physical disk space allocated for the write data in the cloud hard disk is equal to the data size of the write data, thereby maximizing the utilization of the resources of the cloud hard disk resource pool.

[0074] After the hard disk capacity application record corresponding to the user is saved in the hard disk application record table, when the write data sent by the user is received, physical disk space is allocated for the write data in the cloud hard disk resource pool. Therefore, hard disk space is allocated to the user only when the user actually needs to use the hard disk, so that the cloud hard disk is fully utilized, thereby improving the utilization rate of the cloud hard disk and preventing resource waste.

[0075] S106: Generate expansion prompt information, and display the expansion prompt information to prompt the staff to expand the cloud hard disk resource pool.

[0076] When it is determined that the allocatable capacity is not greater than the applied capacity, it is determined that the user's application for a hard disk has failed, and no hard disk capacity is allocated to the user. An expansion prompt message is generated, which includes the hard disk information, physical usage information, and allocated information of the cloud hard disk. The expansion prompt message is displayed to prompt the staff to expand the cloud hard disk resource pool so that hard disk space can continue to be allocated to the user.

[0077] S107: Generate application failure information, and display the application failure information to the user.

[0078] In the method provided by an embodiment of the present invention, when the hard disk capacity applied for by the user is greater than the current allocatable capacity of the hard disk resource pool, an application failure message is generated and displayed to the user, wherein the application failure message prompts the user that the hard disk application has failed, and the application failure message includes the reason for the application failure, the hard disk application time, user information and other contents.

[0079] Preferably, after executing S106, the method provided in the present application may continue to execute S107, and after executing S107, the process of the user applying for a hard disk ends.

[0080] In the method provided by the embodiment of the present invention, when receiving a hard disk application request sent by a user, the hard disk application request is parsed to determine the hard disk capacity applied by the user; the current allocable capacity and the applied capacity of the cloud hard disk resource pool are determined; when the allocable capacity is greater than the applied capacity and the hard disk capacity is less than or equal to the allocable capacity, a hard disk capacity application record corresponding to the user is generated, and the hard disk capacity application record is saved in a hard disk application record table; when receiving the write data input by the user, according to the data size of the write data input by the user, the corresponding hard disk capacity is allocated in the cloud hard disk for the write data, and the write data is saved in the hard disk capacity. This application allocates a hard disk to the user based on the current allocable capacity, the applied capacity and the hard disk capacity applied by the user of the cloud hard disk resource pool. When the allocable capacity of the cloud hard disk resource pool is greater than the applied capacity and the hard disk capacity applied by the user is less than or equal to the allocable capacity, the user successfully applies for the hard disk, generates the user's hard disk capacity record and saves the user's hard disk capacity record, thereby, according to the current allocable capacity, the applied capacity and the hard disk capacity applied by the user of the cloud hard disk resource pool, the user's hard disk application can be reasonably processed, thereby improving the reasonable allocation of cloud hard disk resources, and then improving the utilization rate of cloud hard disks. After recording the user's hard disk capacity application record, this application allocates the corresponding hard disk capacity for the write data in the cloud hard disk when the user inputs the write data. Therefore, the user is allocated the same amount of hard disk space as the user actually needs, thereby effectively avoiding the situation where the hard disk capacity applied by the user is not used, thereby improving the utilization rate of the cloud hard disk and avoiding the waste of cloud hard disk resources.

[0081] Reference Figure 2 , which is a flowchart of a method for determining the current allocatable capacity and applied capacity of a cloud hard disk resource pool based on the hard disk usage information and hard disk application record table of a cloud hard disk resource pool provided by an embodiment of the present invention, and is specifically described as follows:

[0082] S201. Based on the hard disk application record table, determine whether the user is the first applicant for the cloud hard disk resource pool; if it is determined that the user is the first applicant for the cloud hard disk, execute S202; if it is determined that the user is not the first applicant for the cloud hard disk, execute S203.

[0083] The hard disk application record table is parsed, and whether the user is the first applicant of the cloud hard disk is determined by determining whether the hard disk application record table is empty. When it is determined that the hard disk application record table is empty, it can be determined that the user is the first applicant of the cloud hard disk. When it is determined that the hard disk application record table is not empty, it can be determined that the user is not the first applicant of the cloud hard disk.

[0084] S202: Determine the total storage capacity of the resource pool of the cloud hard disk as the current allocatable capacity of the cloud hard disk resource pool, and determine that the current applied capacity of the cloud hard disk resource pool is zero.

[0085] It should be noted that the total storage capacity of a cloud disk resource pool refers to the total amount of data that can actually be stored in a resource pool that provides cloud disk services. The total storage capacity of a cloud disk can be expressed in GiB, TiB, or PiB. Optionally, the total storage capacity of a cloud disk resource pool can also be called the total storage hard disk capacity of the cloud disk resource pool.

[0086] S203: Obtain each hard disk capacity application record in the hard disk application record table, determine the requested capacity of each hard disk capacity application record, and determine the sum of each requested capacity as the applied capacity of the cloud hard disk.

[0087] Obtain each hard disk capacity application record in the hard disk application record table. The hard disk capacity application record is a record generated when the user successfully applies for a hard disk. Determine the requested capacity of each hard disk capacity application record, where the requested capacity is the capacity of the hard disk applied by the user, that is, the hard disk capacity applied by the user. Sum each requested capacity, and determine the sum of each requested capacity as the applied capacity of the cloud hard disk.

[0088] It should be noted that each hard disk capacity application record in the hard disk application record table is a normal and valid record; after the user successfully applies for a hard disk, if the user no longer needs the applied hard disk, he or she can apply to delete the applied hard disk. After the user deletes the applied hard disk, the hard disk capacity application record corresponding to the hard disk applied by the user in the hard disk application record table will be deleted, thereby ensuring that each hard disk capacity application record in the hard disk application record table is a valid record.

[0089] S204: parse the hard disk usage information to determine the actual hard disk usage space of the cloud hard disk resource pool, and determine the current allocatable capacity of the cloud hard disk resource pool based on the actual hard disk usage space.

[0090] The hard disk usage information is parsed to determine the actual hard disk usage space of the cloud hard disk resource pool. The actual hard disk usage space of the cloud hard disk resource pool is the hard disk capacity occupied by the data stored in the cloud hard disk resource pool. In other words, the hard disk capacity occupied by the data stored in the cloud hard disk resource pool is the physical disk space actually used by the cloud hard disk resource pool.

[0091] Reference Figure 3 , is a flow chart of a method for determining the current allocatable capacity of a cloud hard disk resource pool based on the actual hard disk usage space provided by an embodiment of the present invention, and is specifically described as follows:

[0092] S301. Determine a resource pool utilization rate of the cloud hard disk resource pool based on the actual used space of the hard disk and the total storage capacity of the cloud hard disk resource pool.

[0093] When determining the resource pool utilization rate of the cloud hard disk resource pool, the actual used space of the hard disk is compared with the total storage capacity, and the obtained ratio is determined as the resource pool utilization rate of the cloud hard disk resource pool; specifically: the resource pool utilization rate of the cloud hard disk = (the actual used space of the hard disk of the cloud hard disk resource pool / the total storage capacity of the cloud hard disk resource pool). Furthermore, the resource pool utilization rate of the cloud hard disk resource pool is used to measure what proportion of the storage space of the cloud hard disk resource pool has been written with data.

[0094] S302: Substitute the resource pool usage rate into a preset excess allocation formula for calculation to obtain a current excess allocation ratio of the cloud hard disk resource pool.

[0095] The specific content of the excess allocation formula provided by the present invention is as follows:

[0096] Among them, u% represents the resource pool utilization rate of the cloud hard disk resource pool; S% represents the safety water level coefficient, wherein the safety water level coefficient is set to 5% in the present invention, and the safety water level line can be set according to actual usage; it should be noted that, under ideal conditions, i takes infinity, and in the present invention, i is set to an integer of 6.

[0097] Furthermore, the formula for the excess allocation ratio is expanded as follows:

[0098] Excess allocation ratio = ((1-u%-S%) 0 +(1-u%-S%) 1 +(1-u%-S%) 2 +…+(1-u%-S%) x );

[0099] When i is set to 6, the expanded formula for the excess allocation ratio is as follows:

[0100] Excess allocation ratio = ((1-u%-S%) 0 +(1-u%-S%) 1 +(1-u%-S%) 2 +(1-u%-S%) 3 +(1-u%-S%) 4 +(1-u%-S%) 5 +(1-u%-S%) 6 );

[0101] In the method provided by the embodiment of the present invention, after obtaining the over-allocation ratio, the cloud hard disk is over-allocated based on the over-allocation ratio, wherein the over-allocation means that the total capacity of the allocated cloud hard disk exceeds the total capacity of the resource pool, and the storage space in the allocated hard disk total capacity that has not been written with data is allocated again.

[0102] Furthermore, the safety water level coefficient in the present invention is used to reserve a certain amount of storage capacity space to cope with data migration during server failure, data writing during capacity expansion, sudden data writing, etc.; it should be noted that after deducting the reserved storage capacity space, the proportion of the remaining storage capacity space to the total capacity of the resource pool is the safety water level. For example, the resource pool needs to reserve 15% of the storage space to cope with emergencies, then the safety water level is 85%.

[0103] S303: Calculate the excess allocation ratio and the total storage capacity to obtain the current allocatable capacity of the cloud hard disk resource pool.

[0104] The over-allocation ratio and the total storage hard disk capacity are multiplied to obtain the current allocatable capacity of the cloud hard disk resource pool. Specifically, the current allocatable capacity of the cloud hard disk resource pool = over-allocation ratio * total storage capacity of the cloud hard disk resource pool.

[0105] In the method provided by the embodiment of the present invention, the introduction of an over-allocation ratio can effectively over-allocate the resources of the cloud hard disk resource pool, and the over-allocated capacity is the hard disk capacity that is not used after the user successfully applies for the hard disk, thereby effectively avoiding resource waste, and when determining the over-allocation ratio, a safety water level coefficient is introduced, thereby ensuring that when the cloud hard disk resource pool is over-allocated, the cloud hard disk resource pool has sufficient storage space to cope with data migration when a server fails, data writing during expansion, sudden data writing, etc., and by introducing the safety water level coefficient, the cloud hard disk can reserve a certain storage space, thereby avoiding the situation where the cloud hard disk resource pool is full, causing data to be unwritable, and causing serious system failures.

[0106] and Figure 1 Corresponding to the method shown in FIG. 1 , an embodiment of the present invention further provides a cloud hard disk resource pool management device, which can be applied to other intelligent devices such as computer terminals. The structural diagram of the device is shown in FIG. Figure 4 The specific instructions are as follows:

[0107] The parsing unit 401 is used to parse the hard disk application request sent by the user and determine the hard disk capacity applied by the user when receiving the hard disk application request.

[0108] The determining unit 402 is used to determine the current allocatable capacity and applied capacity of the cloud hard disk resource pool based on the current hard disk usage information and hard disk application record table of the cloud hard disk resource pool;

[0109] A first judging unit 403, configured to judge whether the allocatable capacity is greater than the applied capacity;

[0110] The second determination unit 404 is configured to determine whether the hard disk capacity applied for by the user is less than or equal to the allocatable capacity if it is determined that the allocatable capacity is greater than the applied capacity;

[0111] The generating unit 405 is used to determine that the user's application for the hard disk is successful if it is determined that the hard disk capacity is less than or equal to the allocatable capacity, generate a hard disk capacity application record corresponding to the user, save the hard disk capacity application record in the hard disk application record table, and upon receiving the write data input by the user, determine the data size of the write data, allocate corresponding physical disk space for the write data in the cloud hard disk resource pool based on the data size, and save the write data to the physical disk space, wherein the data size is not greater than the hard disk capacity applied for by the user.

[0112] In the method provided by the embodiment of the present invention, when a hard disk application request sent by a user is received, the hard disk application request is parsed to determine the hard disk capacity applied for by the user; the allocatable capacity and the applied capacity of the cloud hard disk resource pool are determined; when the allocatable capacity is greater than the applied capacity and the hard disk capacity is less than or equal to the allocatable capacity, it is determined that the user application is successful, a hard disk capacity application record corresponding to the user is generated, and the hard disk capacity application record is saved in a hard disk application record table; according to the data size of the write data input by the user, corresponding physical disk space is allocated in the cloud hard disk for the write data, and the write data is saved in the physical disk space. When a user applies for hard disk capacity, the user's application is processed based on the allocatable capacity and applied capacity of the cloud hard disk resource pool. When the allocatable capacity is greater than the applied capacity and the hard disk capacity is less than or equal to the allocatable capacity, the user's hard disk application is successful, and the user's hard disk capacity application record is saved. When the user inputs write data, the corresponding hard disk capacity is allocated to the write data in the cloud hard disk resource pool. Therefore, the resources in the cloud hard disk resource pool are reasonably allocated based on the current allocatable capacity and applied capacity of the cloud hard disk resource pool, thereby improving the utilization rate of the cloud hard disk and avoiding waste of the cloud hard disk resource pool.

[0113] In the device provided by the embodiment of the present invention, the determining unit 402 in the device may be configured as follows:

[0114] A judging subunit, configured to judge whether the user is the first applicant of the cloud hard disk resource pool based on the hard disk application record table;

[0115] a determination subunit, configured to, if it is determined that the user is the first applicant of the cloud hard disk resource pool, determine the total storage capacity of the cloud hard disk resource pool as the current allocatable capacity of the cloud hard disk resource pool, and determine that the current applied capacity of the cloud hard disk resource pool is zero;

[0116] an acquisition subunit, for obtaining each hard disk capacity application record in the hard disk application record table if it is determined that the user is not the first applicant for the cloud hard disk resource pool, determining the requested capacity of each hard disk capacity application record, and determining the sum of each requested capacity as the current applied capacity of the cloud hard disk resource pool;

[0117] The parsing subunit parses the hard disk usage information to determine the actual hard disk usage space of the cloud hard disk resource pool, and determines the current allocatable capacity of the cloud hard disk resource pool based on the actual hard disk usage space.

[0118] In the device provided by the embodiment of the present invention, the parsing subunit in the device can be configured as follows:

[0119] A determination module, configured to determine a resource pool utilization rate of the cloud hard disk resource pool based on the actual used space of the hard disk and the total storage capacity of the cloud hard disk resource pool;

[0120] A first calculation module is used to substitute the resource pool utilization rate into a preset excess allocation formula for calculation to obtain a current excess allocation ratio of the cloud hard disk resource pool;

[0121] The second calculation module is used to calculate the excess allocation ratio and the total storage capacity to obtain the current allocatable capacity of the cloud hard disk resource pool.

[0122] In the device provided by the embodiment of the present invention, the determination module in the device may be configured as follows:

[0123] The determination submodule is used to compare the actual used space of the hard disk with the total storage capacity, and determine the obtained ratio as the resource pool utilization rate of the cloud hard disk resource pool.

[0124] In the device provided in the embodiment of the present invention, the device is further configured as follows:

[0125] The display unit is used to generate expansion prompt information if it is determined that the allocatable capacity is not greater than the applied capacity, and display the expansion prompt information to prompt the staff to expand the cloud hard disk resource pool.

[0126] An embodiment of the present invention further provides a storage medium, wherein the storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to perform the following operations:

[0127] When receiving a hard disk application request sent by a user, parsing the hard disk application request to determine the hard disk capacity applied by the user;

[0128] Based on the current hard disk usage information and hard disk application record table of the cloud hard disk resource pool, determine the current allocatable capacity and applied capacity of the cloud hard disk resource pool;

[0129] Determining whether the allocatable capacity is greater than the applied capacity;

[0130] If it is determined that the allocatable capacity is greater than the applied capacity, determining whether the hard disk capacity applied for by the user is less than or equal to the allocatable capacity;

[0131] If it is determined that the hard disk capacity is less than or equal to the allocatable capacity, it is determined that the user has successfully applied for the hard disk, a hard disk capacity application record corresponding to the user is generated, and the hard disk capacity application record is saved in the hard disk application record table, and when the write data input by the user is received, the data size of the write data is determined, and corresponding physical disk space is allocated to the write data in the cloud hard disk resource pool based on the data size, and the write data is saved in the physical disk space, wherein the data size is not greater than the hard disk capacity applied for by the user.

[0132] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 5 As shown, it specifically includes a memory 501 and one or more instructions 502, wherein the one or more instructions 502 are stored in the memory 501 and are configured to be executed by one or more processors 503 to perform the following operations:

[0133] When receiving a hard disk application request sent by a user, parsing the hard disk application request to determine the hard disk capacity applied by the user;

[0134] Based on the current hard disk usage information and hard disk application record table of the cloud hard disk resource pool, determine the current allocatable capacity and applied capacity of the cloud hard disk resource pool;

[0135] Determining whether the allocatable capacity is greater than the applied capacity;

[0136] If it is determined that the allocatable capacity is greater than the applied capacity, determining whether the hard disk capacity applied for by the user is less than or equal to the allocatable capacity;

[0137] If it is determined that the hard disk capacity is less than or equal to the allocatable capacity, it is determined that the user has successfully applied for the hard disk, a hard disk capacity application record corresponding to the user is generated, and the hard disk capacity application record is saved in the hard disk application record table, and when the write data input by the user is received, the data size of the write data is determined, and corresponding physical disk space is allocated to the write data in the cloud hard disk resource pool based on the data size, and the write data is saved in the physical disk space, wherein the data size is not greater than the hard disk capacity applied for by the user.

[0138] The specific implementation processes and derivative methods of the above-mentioned embodiments are all within the protection scope of the present invention.

[0139] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0140] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0141] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for managing a cloud hard disk resource pool, characterized in that: include: When receiving a hard disk application request sent by a user, parsing the hard disk application request to determine the hard disk capacity applied by the user; Based on the current hard disk usage information and hard disk application record table of the cloud hard disk resource pool, determine the current allocatable capacity and applied capacity of the cloud hard disk resource pool; Determining whether the allocatable capacity is greater than the applied capacity; If it is determined that the allocatable capacity is greater than the applied capacity, determining whether the hard disk capacity applied for by the user is less than or equal to the allocatable capacity; If it is determined that the hard disk capacity is less than or equal to the allocatable capacity, it is determined that the user has successfully applied for a hard disk, a hard disk capacity application record corresponding to the user is generated, and the hard disk capacity application record is saved in the hard disk application record table, and when receiving the write data input by the user, the data size of the write data is determined, and based on the data size, corresponding physical disk space is allocated to the write data in the cloud hard disk resource pool, and the write data is saved in the physical disk space, wherein the data size is not greater than the hard disk capacity applied by the user, and when the hard disk capacity application record is saved in the hard disk application record table, the corresponding hard disk space has not been allocated to the user; The determining the current allocatable capacity and applied capacity of the cloud hard disk resource pool based on the current hard disk usage information and hard disk application record table of the cloud hard disk resource pool includes: Based on the hard disk application record table, determining whether the user is the first applicant for the cloud hard disk resource pool; If it is determined that the user is the first user to apply for the cloud hard disk resource pool, the total storage capacity of the cloud hard disk resource pool is determined as the current allocatable capacity of the cloud hard disk resource pool, and the current applied capacity of the cloud hard disk resource pool is determined to be zero; If it is determined that the user is not the first applicant for the cloud hard disk resource pool, then each hard disk capacity application record in the hard disk application record table is obtained, the requested capacity of each hard disk capacity application record is determined, and the sum of each requested capacity is determined as the current applied capacity of the cloud hard disk resource pool; Parsing the hard disk usage information to determine the actual hard disk usage space of the cloud hard disk resource pool, and determining the resource pool usage rate of the cloud hard disk resource pool based on the actual hard disk usage space and the total storage capacity of the cloud hard disk resource pool; Substitute the resource pool usage rate into the preset excess allocation formula for calculation to obtain the current excess allocation ratio of the cloud hard disk resource pool. The excess allocation formula is: ,in, Indicates the resource pool usage of the cloud disk resource pool; Indicates the safety water level coefficient; The excess allocation ratio is calculated with the total storage capacity to obtain the current allocatable capacity of the cloud hard disk resource pool.

2. The method according to claim 1, characterized in that The determining the resource pool utilization rate of the cloud hard disk resource pool based on the actual used space of the hard disk and the total storage capacity of the cloud hard disk resource pool includes: The actual used space of the hard disk is compared with the total storage capacity, and the obtained ratio is determined as the resource pool utilization rate of the cloud hard disk resource pool.

3. The method according to claim 1, characterized in that Also includes: If it is determined that the allocatable capacity is not greater than the applied capacity, capacity expansion prompt information is generated and displayed to prompt the staff to expand the capacity of the cloud hard disk resource pool.

4. A cloud hard disk resource pool management device, characterized in that: include: The parsing unit is used to parse the hard disk application request sent by the user and determine the hard disk capacity applied by the user when receiving the hard disk application request. A determination unit, configured to determine the current allocatable capacity and applied capacity of the cloud hard disk resource pool based on the current hard disk usage information and hard disk application record table of the cloud hard disk resource pool; A first judging unit, configured to judge whether the allocatable capacity is greater than the applied capacity; A second judgment unit is used to judge whether the hard disk capacity applied by the user is less than or equal to the allocatable capacity if it is determined that the allocatable capacity is greater than the applied capacity; A generating unit, configured to determine that the user has successfully applied for a hard disk if it is determined that the hard disk capacity is less than or equal to the allocatable capacity, generate a hard disk capacity application record corresponding to the user, save the hard disk capacity application record in the hard disk application record table, and upon receiving the write data input by the user, determine the data size of the write data, allocate corresponding physical disk space for the write data in the cloud hard disk resource pool based on the data size, and save the write data in the physical disk space, wherein the data size is not greater than the hard disk capacity applied by the user, and when the hard disk capacity application record is saved in the hard disk application record table, the corresponding hard disk space has not been allocated to the user; The determining unit comprises: A judging subunit, configured to judge whether the user is the first applicant of the cloud hard disk resource pool based on the hard disk application record table; a determination subunit, configured to, if it is determined that the user is the first applicant of the cloud hard disk resource pool, determine the total storage capacity of the cloud hard disk resource pool as the current allocatable capacity of the cloud hard disk resource pool, and determine that the current applied capacity of the cloud hard disk resource pool is zero; an acquisition subunit, for obtaining each hard disk capacity application record in the hard disk application record table if it is determined that the user is not the first applicant for the cloud hard disk resource pool, determining the requested capacity of each hard disk capacity application record, and determining the sum of each requested capacity as the current applied capacity of the cloud hard disk resource pool; The parsing subunit is used to parse the hard disk usage information, determine the actual hard disk usage space of the cloud hard disk resource pool, and determine the current allocatable capacity of the cloud hard disk resource pool based on the actual hard disk usage space; The parsing subunit comprises: A determination module, configured to determine a resource pool utilization rate of the cloud hard disk resource pool based on the actual used space of the hard disk and the total storage capacity of the cloud hard disk resource pool; The first calculation module is used to substitute the resource pool utilization rate into a preset excess allocation formula for calculation to obtain the current excess allocation ratio of the cloud hard disk resource pool. The excess allocation formula is: ,in, Indicates the resource pool usage of the cloud disk resource pool; Indicates the safety water level coefficient; The second calculation module is used to calculate the excess allocation ratio and the total storage capacity to obtain the current allocatable capacity of the cloud hard disk resource pool.

5. A storage medium, characterized in that: The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the cloud hard disk resource pool management method according to any one of claims 1 to 3.

6. An electronic device, characterized in that: The method comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the cloud hard disk resource pool management method as described in any one of claims 1 to 3.