Quantity adjustment method and device, equipment and storage medium

By dynamically adjusting the number of critical data blocks on the hard drive in the storage system, the problem of wasted hard drive space is solved, achieving more efficient hard drive space utilization and increased user capacity.

CN121934776APending Publication Date: 2026-04-28DAWNING INFORMATION IND (BEIJING) CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DAWNING INFORMATION IND (BEIJING) CO LTD
Filing Date
2026-01-06
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In existing technologies, each hard drive in a storage system needs to reserve a fixed number of critical data blocks, which leads to wasted hard drive space and fails to effectively improve hard drive space utilization and user-available space capacity.

Method used

When a change in the number of hard disks in the storage pool of the storage system is detected, the number of allocated critical data blocks is dynamically adjusted by obtaining the data block demand and the number of currently available hard disks, and KOBJ is flexibly allocated according to actual needs.

Benefits of technology

It improves the flexibility of KOBJ allocation and the utilization rate of hard disk space, increases the available space capacity for users, and optimizes the rationality and efficiency of storage resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121934776A_ABST
    Figure CN121934776A_ABST
Patent Text Reader

Abstract

The invention relates to a quantity adjustment method and device, equipment and a storage medium. The method is applied to the technical field of storage systems and comprises the steps that under the condition that it is detected that the number of hard disks of a storage pool of the storage system is changed, the data block demand quantity and the number of currently available hard disks of the storage pool are obtained; according to the demand quantity of the data blocks and the quantity of the current available hard disks, adjusting the allocated quantity of the current available hard disks; wherein the allocated number is the number of the KOBJs allocated in the currently available hard disk, and the demand quantity of the data blocks is the number of the KOBJs required to meet the service demand. Compared with a traditional method that each hard disk needs to reserve a fixed number of KOBJs, the method has the advantages that the number of the distributed KOBJs in each hard disk can be dynamically adjusted according to the demanded quantity of the data blocks and the number of the currently available hard disks, so that the distribution flexibility of the KOBJs is improved, and the space utilization rate of the hard disks and the available space capacity of a user can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage system technology, and in particular to quantity adjustment methods, apparatus, devices and storage media. Background Technology

[0002] Key Objects (KOBJs) are small data blocks in a storage system, partitioned into fixed sizes and used by the power-saving memory management module. They are the core carrier for persisting memory data during power-saving scenarios. Key Objects serve two purposes: firstly, they quickly persist memory data to the power-saving hard drive during abnormal power outages. When power is restored, the data is read from the power-saving hard drive and placed back into memory for rapid business recovery. Secondly, in non-abnormal scenarios, metadata can be written to the data disk and replicated multiple times, ensuring no data loss even if multiple disks fail.

[0003] Currently, when determining the allocation of critical databases for each hard drive in a storage system, reservations are made based on the minimum number of disks in the storage pool (the minimum number of disks in the storage pool refers to the minimum number of physical hard drives required to maintain the normal operation of the storage pool and meet the preset data redundancy strategy and performance requirements). This means that each hard drive needs to reserve an equal and fixed number of critical data blocks. Even for expansion disks, additional critical data blocks need to be reserved, resulting in wasted hard drive space. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, device, and storage medium that can effectively improve the utilization rate of hard disk space and the amount of user-available space capacity to address the above-mentioned technical problems.

[0005] Firstly, this application provides a data writing method, including:

[0006] If a change in the number of hard drives in the storage pool of the storage system is detected, the data block requirement and the current number of available hard drives in the storage pool are obtained; where the data block requirement is the number of KOBJs required to meet business needs.

[0007] Based on the data block demand and the number of currently available hard disks, adjust the number of allocated hard disks; where the allocated number is the number of KOBJs already allocated to the currently available hard disks.

[0008] In this embodiment, when a change in the number of hard drives in the storage pool of the storage system is detected, the data block demand and the current number of available hard drives in the storage pool are obtained. Based on the data block demand and the current number of available hard drives, the allocated number of currently available hard drives is adjusted; where the allocated number is the number of KOBJs already allocated to the currently available hard drives, and the data block demand is the number of KOBJs required to meet business needs. Compared to the traditional method of reserving a fixed number of KOBJs for each hard drive, this application can dynamically adjust the number of allocated KOBJs on each hard drive based on the data block demand and the current number of available hard drives. This not only improves the flexibility of KOBJ allocation but also effectively improves hard drive space utilization and user-available space capacity.

[0009] In one embodiment, the allocated number of currently available hard disks is adjusted based on the data block demand and the number of currently available hard disks, including:

[0010] Based on the data block demand and the number of currently available hard disks, determine the number of KOBJs that should be allocated to the currently available hard disks;

[0011] Adjust the number of currently available hard drives that have been allocated based on the number that should be allocated.

[0012] In this embodiment, the number of KOBJs to be allocated to the currently available hard disks is determined based on the data block demand and the number of currently available hard disks. The number of KOBJs already allocated to the currently available hard disks is adjusted according to the number of KOBJs to be allocated. In other words, the number of KOBJs to be allocated to the currently available hard disks is dynamically adjustable based on the number of currently available hard disks, which further improves the flexibility of KOBJ allocation.

[0013] In one embodiment, the number of currently available hard disks is at least two; determining the number of KOBJs to be allocated to the currently available hard disks based on the data block demand and the number of currently available hard disks includes:

[0014] Compare the number of currently available hard drives with the number threshold;

[0015] Based on the data block demand, the number of currently available hard disks, and the comparison results, determine the number of KOBJs that should be allocated to each currently available hard disk.

[0016] In this embodiment, the sufficiency of hard disk resources can be determined by comparing the current number of available hard disks with a threshold number. Then, by combining the data block demand, the current number of available hard disks, and the comparison results, a corresponding number of KOBJs are allocated to each hard disk, ensuring that the allocation scheme matches actual needs, improving the efficiency of data storage or processing, and thus enhancing the rationality and accuracy of KOBJ allocation.

[0017] In one embodiment, the quantity threshold includes a first quantity threshold and a second quantity threshold, wherein the first quantity threshold is less than the second quantity threshold;

[0018] Based on the data block demand, the number of currently available hard drives, and the comparison results, determine the number of KOBJs that should be allocated to each currently available hard drive, including:

[0019] If the comparison result shows that the number of currently available hard disks is greater than the first threshold and less than the second threshold, the number of KOBJs to be allocated to each currently available hard disk is determined based on the ratio of data block demand to the number of currently available hard disks.

[0020] In this embodiment, when the comparison result shows that the number of currently available hard disks is greater than a first threshold and less than a second threshold, i.e., when the hard disk resources are within the normal resource range, the number of KOBJs to be allocated to each currently available hard disk is determined based on the ratio of data block demand to the number of currently available hard disks. This enables the storage system to support batch disk failures, removals, and expansions of multi-disk storage pools without excessive redundancy. By dynamically adjusting, the KOBJ allocation is always kept at the minimum quota, ensuring that the total number of KOBJs in the storage pool does not decrease or increase, and does not encroach on too much user space, thereby maximizing the effective increase of user available capacity.

[0021] In one embodiment, the number of KOBJs to be allocated to each currently available hard disk is determined based on the data block demand, the number of currently available hard disks, and the comparison results, including:

[0022] If the comparison result shows that the number of currently available hard drives is not greater than the first threshold or not less than the second threshold, the target available hard drive is selected from the currently available hard drives based on the remaining hard drive capacity of each currently available hard drive.

[0023] Based on the data block demand and the target number of available hard disks, determine the number of KOBJs that should be allocated to each currently available hard disk.

[0024] In this embodiment, when the comparison result shows that the number of currently available hard disks is not greater than a first threshold or not less than a second threshold, a target available hard disk is selected from each currently available hard disk based on its remaining capacity. The number of KOBJs to be allocated to each currently available hard disk is determined based on the data block demand and the target number of the target available hard disks. This embodiment defines the allocation scenario based on the comparison result of the number of hard disks and the two thresholds, avoiding a "one-size-fits-all" allocation method. It adapts to different situations where hard disk resources are abundant or scarce, and determines the KOBJ allocation based on the actual data block demand and the target number of hard disks. This satisfies business needs while avoiding excessive resource occupation or idleness, thus improving the overall utilization rate of storage resources.

[0025] In one embodiment, determining the number of KOBJs to be allocated to each currently available hard disk based on the data block demand and the target number of available hard disks includes:

[0026] If the comparison result shows that the number of currently available hard disks is not greater than the first quantity threshold, determine the number of KOBJs to be allocated.

[0027] The supplementary allocation quantity is determined based on the ratio of the quantity to be allocated to the target number of available hard drives.

[0028] Based on the sum of the supplementary allocation quantity and the already allocated quantity, determine the number of KOBJs to be allocated to the target available hard disks; and,

[0029] Based on the allocated quantity, determine the number of KOBJs that should be allocated to the remaining available hard drives; where the remaining available hard drives are the hard drives other than the target available hard drive among the currently available hard drives.

[0030] In this embodiment, when hard disk resources are scarce, the number of KOBJs to be allocated is determined. Based on the ratio of the number to be allocated to the target number of available hard disks, a supplementary allocation quantity is determined. Then, based on the sum of the supplementary allocation quantity and the already allocated quantity, the number of KOBJs to be allocated to the target available hard disks is determined, and based on the already allocated quantity, the number of KOBJs to be allocated to the remaining available hard disks is determined; wherein, the remaining available hard disks are all currently available hard disks excluding the target available hard disks. This effectively solves the problem of excessive single-disk load and has the effect of balancing hard disk storage resources.

[0031] In one embodiment, determining the number of KOBJs to be allocated to each currently available hard disk based on the data block demand and the target number of available hard disks includes:

[0032] If the comparison result shows that the number of currently available hard drives is not less than the second quantity threshold, the number of critical data blocks to be allocated to the target available hard drives is determined based on the ratio of the data block demand to the target number of target available hard drives; and,

[0033] Based on the initial quantity, determine the number of KOBJs that should be allocated to the remaining available hard drives; where the remaining available hard drives are the hard drives other than the target available hard drive among the currently available hard drives; the initial quantity is zero.

[0034] In this embodiment, when hard disk resources are sufficient, in order to avoid the allocation of KOBJs being too scattered and to facilitate the power-saving memory management module to manage the KOBJs in the target available hard disk, this embodiment realizes that KOBJs are configured only in the target available hard disk, which increases the centralized management effect of KOBJs and the rationality of hard disk resource allocation.

[0035] Secondly, this application also provides a quantity adjustment device, configured in a storage system, comprising:

[0036] The acquisition module is used to acquire the data block requirement and the current number of available hard disks in the storage pool when a change in the number of hard disks in the storage system is detected; whereby the data block requirement is the number of KOBJs required to meet business needs.

[0037] The adjustment module is used to adjust the number of currently available hard disks allocated based on the data block demand and the number of currently available hard disks; where the allocated number is the number of KOBJs already allocated to the currently available hard disks.

[0038] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the various method embodiments provided in the first aspect above.

[0039] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the method embodiments provided in the first aspect above.

[0040] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps in the various method embodiments provided in the first aspect above.

[0041] In the aforementioned quantity adjustment method, apparatus, device, and storage medium, when a change in the number of hard disks in the storage pool of the storage system is detected, the data block demand and the current number of available hard disks in the storage pool are obtained. Based on the data block demand and the current number of available hard disks, the allocated number of currently available hard disks is adjusted; wherein, the allocated number is the number of KOBJs already allocated to the currently available hard disks, and the data block demand is the number of KOBJs required to meet business needs. Compared to the traditional method of reserving a fixed number of KOBJs for each hard disk, this application can dynamically adjust the number of allocated KOBJs in each hard disk based on the data block demand and the current number of available hard disks, which not only improves the flexibility of KOBJ allocation but also effectively improves hard disk space utilization and user-available space capacity. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 This is a schematic diagram illustrating the principle of a distributed file system.

[0044] Figure 2 A flowchart illustrating a first quantity adjustment method provided in some embodiments of this application;

[0045] Figure 3 A flowchart illustrating the process of adjusting the allocated number of currently available hard disks, provided for some embodiments of this application;

[0046] Figure 4 A flowchart illustrating a first method for determining the number of KOBJs to be allocated for each currently available hard disk, provided for some embodiments of this application;

[0047] Figure 5 A schematic diagram of a second process for determining the number of KOBJs to be allocated for each currently available hard disk, provided for some embodiments of this application;

[0048] Figure 6 A flowchart illustrating a third method for determining the number of KOBJs to be allocated for each currently available hard disk, provided for some embodiments of this application;

[0049] Figure 7 A flowchart illustrating a fourth method for determining the number of KOBJs to be allocated for each currently available hard disk, provided for some embodiments of this application;

[0050] Figure 8 A flowchart illustrating the fifth method for determining the number of KOBJs to be allocated for each currently available hard disk, provided for some embodiments of this application;

[0051] Figure 9 A flowchart illustrating a second quantity adjustment method provided in some embodiments of this application;

[0052] Figure 10 Structural block diagram of the quantity adjustment device provided in some embodiments of this application;

[0053] Figure 11 This is an internal structural diagram of a computer device provided in some embodiments of this application. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0055] Key Objects (KOBJs) are small data blocks in a storage system, partitioned into fixed sizes and used by the power-saving memory management module. They are the core carrier for persisting memory data during power-saving scenarios. Key Objects serve two purposes: firstly, they quickly persist memory data to the power-saving hard drive during abnormal power outages. When power is restored, the data is read from the power-saving hard drive and placed back into memory for rapid business recovery. Secondly, in non-abnormal scenarios, metadata can be written to the data disk and replicated multiple times, ensuring no data loss even if multiple disks fail.

[0056] Currently, when determining the allocation of critical databases for each hard drive in a storage system, reservations are made based on the minimum number of disks in the storage pool (the minimum number of disks in the storage pool refers to the minimum number of physical hard drives required to maintain the normal operation of the storage pool and meet the preset data redundancy strategy and performance requirements). This means that each hard drive needs to reserve an equal and fixed number of critical data blocks. Even for expansion disks, additional critical data blocks need to be reserved, resulting in wasted hard drive space.

[0057] To address the aforementioned problems, a quantity adjustment method proposed in this application can be applied to... Figure 1 In the application environment shown, when the controller in the storage system detects a change in the number of hard drives in the storage pool, it obtains the data block demand and the current number of available hard drives in the storage pool. Based on the data block demand and the current number of available hard drives, the controller adjusts the allocated number of currently available hard drives. The data block demand is the number of KOBJs required to meet business needs; the allocated number is the number of KOBJs already allocated to the currently available hard drives.

[0058] The storage system is a complete hardware and software system for centralized storage, management, reading, writing, and protection of data. Its core objective is to provide stable, efficient, and reliable data access services for business systems. The hardware layer of the storage system includes: storage media: physical hard drives (HDDs, SSDs), battery-protected hard drives, memory, etc., which are the physical carriers of data; control unit: the storage controller, responsible for processing data read / write commands, managing storage resources, and implementing redundancy and fault tolerance; auxiliary modules: such as the BBU (Battery Backup Unit) you mentioned earlier, used for power-loss protection; and interface cards, switches, etc., responsible for data transmission between devices.

[0059] Based on this, in an exemplary embodiment, such as Figure 2 As shown, a quantity adjustment method is provided, which is applied to... Figure 1 The storage system in the text, specifically taking the controller used in the storage system as an example, includes the following steps:

[0060] S201, if a change in the number of hard disks in the storage pool of the storage system is detected, obtain the data block demand and the current number of available hard disks in the storage pool.

[0061] The data block requirement refers to the number of KOBJs needed to meet business needs. A storage pool is a logical storage resource collection formed by integrating the storage space of multiple physical hard drives; simply put, it's "packaging" scattered hard drives into a unified, managed "resource pool." Key Objects (KOBJs) are small data blocks in the storage system, cut to a fixed size and used by the power-saving memory management module. They are the core carrier for persisting memory data in power-saving scenarios. Key objects have two functions: one is to quickly persist memory data to the power-saving hard drive during abnormal power outages, and when power is restored, read the previous data from the power-saving hard drive and put it into memory for rapid business recovery; the other is to write metadata to the data disk and create multiple copies in non-abnormal scenarios, ensuring no data loss even if multiple disks fail. The number of currently available hard drives refers to the number of hard drives in the storage pool that are currently usable.

[0062] Optionally, in this embodiment, one possible implementation for detecting changes in the number of hard drives in the storage pool of the storage system is to determine that a change in the number of hard drives in the storage pool of the storage system has been detected when a hard drive failure event is detected in the storage system. Here, a hard drive failure event refers to an event in which the state of a hard drive changes from a normal state to a failure state.

[0063] Optionally, another possible implementation of detecting changes in the number of hard drives in the storage pool of the storage system in this embodiment is to determine that a change in the number of hard drives in the storage pool of the storage system has been detected when a hard drive expansion event is detected in the storage system. Here, a hard drive expansion event refers to an event in which a new hard drive is added to the storage pool.

[0064] One optional implementation method for obtaining the data block requirement in this embodiment is to determine the current business requirements. Based on the current business requirements, predict the memory usage. Based on the memory usage, determine the data block requirement.

[0065] Another optional implementation method for obtaining the data block demand in this embodiment is to obtain historical service usage (e.g., the last service usage), and determine the total amount of KOBJ required based on the historical service usage as the data block demand.

[0066] In this embodiment, one optional implementation of obtaining the number of currently available hard disks in the storage pool is to obtain the number of hard disks in the storage pool whose hard disk status is normal, and use the number of hard disks in the normal status as the number of currently available hard disks.

[0067] Another optional implementation of this embodiment for obtaining the number of currently available hard drives in the storage pool is to obtain the number of valid hard drives in the storage pool and use this number as the number of currently available hard drives. Valid hard drives are those whose storage capacity is lower than a preset threshold; for example, the preset threshold can be 95%.

[0068] S202, adjust the allocated number of currently available hard disks based on the data block demand and the number of currently available hard disks.

[0069] The allocated quantity refers to the number of KOBJs already allocated in the currently available hard disks, that is, the number of KOBJs already reserved in the currently available hard disks.

[0070] As an optional implementation of this application, the number of available hard disks to be changed is determined based on the current number of available hard disks, the number of KOBJs to be supplemented is determined based on the number of available hard disks to be changed and the data block demand, and the number of currently available hard disks to be allocated is adjusted based on the supplemented number.

[0071] Another optional implementation of this application involves determining the minimum number of KOBJs for the currently available hard drives based on the data block demand and the number of currently available hard drives. Based on the minimum number of KOBJs for the currently available hard drives, the allocated number of currently available hard drives is adjusted. For example, if the allocated number is lower than the minimum number, the number of KOBJs for such currently available hard drives is supplemented to ensure that the number of KOBJs is above the minimum number.

[0072] In this embodiment, when a change in the number of hard drives in the storage pool of the storage system is detected, the data block demand and the current number of available hard drives in the storage pool are obtained. Based on the data block demand and the current number of available hard drives, the allocated number of currently available hard drives is adjusted; where the allocated number is the number of KOBJs already allocated to the currently available hard drives, and the data block demand is the number of KOBJs required to meet business needs. Compared to the traditional method of reserving a fixed number of KOBJs for each hard drive, this application can dynamically adjust the number of allocated KOBJs on each hard drive based on the data block demand and the current number of available hard drives. This not only improves the flexibility of KOBJ allocation but also effectively improves hard drive space utilization and user-available space capacity.

[0073] Based on the above embodiments, in an exemplary embodiment, in order to improve the precise adjustability of the number of KOBJs allocated to each hard drive and the accuracy of KOBJ allocation, such as... Figure 3 As shown, an optional implementation method for adjusting the allocated number of currently available hard disks based on data block demand and the number of currently available hard disks includes:

[0074] S301, based on the data block demand and the number of currently available hard disks, determine the number of KOBJs that should be allocated to the currently available hard disks.

[0075] The number to be allocated refers to the number of KOBJs that should be allocated to each currently available hard drive when a change in the number of hard drives in the storage pool of the storage system is detected, i.e., after a change in the number of hard drives in the storage pool.

[0076] As an optional implementation of this application, a target available hard drive is selected from the currently available hard drives. The number of KOBJs to be allocated to the currently available hard drives is determined based on the data block demand and the number of target available hard drives. For example, the ratio of the data block demand to the number of target available hard drives is used as the number of KOBJs to be allocated to each target available hard drive. The number of KOBJs to be allocated to the remaining available hard drives (excluding the target available hard drives) is configured to "0". In this embodiment, an optional implementation of selecting a target available hard drive from the currently available hard drives is to randomly select one based on a preset number.

[0077] Another optional implementation of this application embodiment is to determine the target demand based on the data block demand and redundancy ratio. The number of KOBJs to be allocated to the currently available hard drives is determined based on the ratio of the target demand to the number of currently available hard drives. For example, the ratio of the target demand to the number of currently available hard drives is used to determine the number of KOBJs to be allocated to the currently available hard drives. In this embodiment, an optional implementation of determining the target demand based on the data block demand and redundancy ratio is to use the product of the data block demand and the redundancy ratio (e.g., 110%, 120%, etc.) as the target demand.

[0078] S302, adjust the allocated number of currently available hard disks according to the number to be allocated.

[0079] As an optional implementation of this application, if the number to be allocated is greater than the number of currently available hard disks already allocated, a supplementary difference between the number to be allocated and the number already allocated is determined, and the number of KOBJs of currently available hard disks is supplemented based on the supplementary difference.

[0080] As another optional implementation of this application, if the number to be allocated is not greater than the number of currently available hard disks already allocated, the recovery difference between the number already allocated and the number to be allocated is determined, and the number of KOBJs already allocated to the currently available hard disks is recovered based on the recovery difference, and the recovery amount is the recovery difference.

[0081] In this embodiment, the number of KOBJs to be allocated to the currently available hard disks is determined based on the data block demand and the number of currently available hard disks. The number of KOBJs already allocated to the currently available hard disks is adjusted according to the number of KOBJs to be allocated. In other words, the number of KOBJs to be allocated to the currently available hard disks is dynamically adjustable based on the number of currently available hard disks, which further improves the flexibility of KOBJ allocation.

[0082] Based on the above embodiments, in an exemplary embodiment, to further improve the flexibility of KOBJ allocation, such as... Figure 4 As shown, an optional implementation method for determining the number of KOBJs to be allocated to currently available hard disks based on data block demand and the number of currently available hard disks includes:

[0083] S401 compares the number of currently available hard drives with the number threshold.

[0084] The quantity threshold refers to the boundary condition used to determine whether the number of currently available hard drives meets the requirements.

[0085] Optionally, in this embodiment, the number of currently available hard disks is compared with a quantity threshold to obtain a comparison result. For example, the comparison result may be that the number of currently available hard disks is greater than the quantity threshold; or, the number of currently available hard disks is not greater than the quantity threshold.

[0086] S402, based on the data block demand, the number of currently available hard disks, and the comparison results, determine the number of KOBJs that should be allocated to each currently available hard disk.

[0087] As an optional implementation of this application, if the comparison result shows that the number of currently available hard disks is less than the quantity threshold, the ratio of the data block demand to the number of currently available hard disks is used as the number of KOBJs to be allocated to each currently available hard disk.

[0088] Another optional implementation of this application embodiment is as follows: if the comparison result shows that the number of currently available hard disks is not less than a threshold, a target available hard disk is selected from the current available hard disks, and the ratio of the data block demand to the number of target available hard disks is used as the number of KOBJs to be allocated to the target available hard disk. The number of available hard disks other than the target available hard disk is configured to be "0". In this embodiment, an optional implementation of selecting the target available hard disk from the current available hard disks is that it can be randomly selected from the current available hard disks according to a preset number.

[0089] In this embodiment, the sufficiency of hard disk resources can be determined by comparing the current number of available hard disks with a threshold number. Then, by combining the data block demand, the current number of available hard disks, and the comparison results, a corresponding number of KOBJs are allocated to each hard disk, ensuring that the allocation scheme matches actual needs, improving the efficiency of data storage or processing, and thus enhancing the rationality and accuracy of KOBJ allocation.

[0090] Based on the above embodiments, in an exemplary embodiment, to further improve the rationality and accuracy of KOBJ allocation, the quantity threshold in this embodiment includes a first quantity threshold and a second quantity threshold, wherein the first quantity threshold is less than the second quantity threshold. Based on this, such as... Figure 5 As shown, an optional implementation method for determining the number of KOBJs to be allocated to each currently available hard disk based on data block demand, the number of currently available hard disks, and comparison results includes:

[0091] S501, if the comparison result shows that the number of currently available hard disks is greater than the first quantity threshold and less than the second quantity threshold, determine the number of KOBJs to be allocated to each currently available hard disk based on the ratio of the data block demand to the number of currently available hard disks.

[0092] As an optional implementation of this application, if the comparison result shows that the number of currently available hard disks is greater than a first quantity threshold and less than a second quantity threshold, the ratio of the data block demand to the number of currently available hard disks is used as the number of KOBJs to be allocated to each currently available hard disk.

[0093] Another optional implementation of this application embodiment is as follows: when the comparison result shows that the number of currently available hard disks is greater than a first quantity threshold and less than a second quantity threshold, the initial allocation amount is determined based on the ratio of the data block demand to the number of currently available hard disks. The number of KOBJs to be allocated to each currently available hard disk is determined based on the product of the initial allocation amount and the redundancy ratio. In this embodiment, an optional implementation of determining the number of KOBJs to be allocated to each currently available hard disk based on the product of the initial allocation amount and the redundancy ratio is to use the product of the initial allocation amount and the redundancy ratio as the number of KOBJs to be allocated to each currently available hard disk. The redundancy ratio can be 110%, 120%, etc.

[0094] In this embodiment, when the comparison result shows that the number of currently available hard disks is greater than a first threshold and less than a second threshold, i.e., when the hard disk resources are within the normal resource range, the number of KOBJs to be allocated to each currently available hard disk is determined based on the ratio of data block demand to the number of currently available hard disks. This enables the storage system to support batch disk failures, removals, and expansions of multi-disk storage pools without excessive redundancy. By dynamically adjusting, the KOBJ allocation is always kept at the minimum quota, ensuring that the total number of KOBJs in the storage pool does not decrease or increase, and does not encroach on too much user space, thereby maximizing the effective increase of user available capacity.

[0095] Based on the above embodiments, in one embodiment, when hard disk resources are abundant or scarce, in order to improve the rationality of the allocation of the number of KOBJs on the currently available hard disks, such as... Figure 6 As shown, another optional implementation method for determining the number of KOBJs to be allocated to each currently available hard disk, based on data block demand, the number of currently available hard disks, and comparison results, includes:

[0096] S601, if the comparison result shows that the number of currently available hard disks is not greater than the first quantity threshold or not less than the second quantity threshold, select the target available hard disk from each currently available hard disk based on the remaining hard disk capacity of each currently available hard disk.

[0097] The remaining hard drive capacity refers to the usable capacity of the currently available hard drives. The target available hard drive refers to the hard drive that meets the requirements selected from the currently available hard drives.

[0098] As an optional implementation of this application, if the comparison result shows that the number of currently available hard drives is not greater than a first threshold, the currently available hard drives are sorted according to their remaining capacity. Based on the sorting result, a target available hard drive is selected from among the currently available hard drives. Specifically, the currently available hard drives are sorted in descending order according to their remaining capacity to obtain a sorting result. The currently available hard drives that are among the first preset number (e.g., the first 5) in the sorting result are selected as the target available hard drives.

[0099] As another optional implementation of this application, if the comparison result shows that the number of currently available hard drives is not less than a second threshold, the currently available hard drives are sorted according to their remaining hard drive capacity. Based on the sorting result, a target available hard drive is selected from among the currently available hard drives. Specifically, the currently available hard drives are sorted in descending order according to their remaining hard drive capacity to obtain a sorting result. The currently available hard drives that are among the top two preset number (e.g., the top 10) in the sorting result are selected as the target available hard drives.

[0100] S602, based on the data block demand and the target number of available hard disks, determine the number of KOBJs to be allocated to each currently available hard disk.

[0101] Optionally, in this embodiment, the ratio of the data block demand to the target number of available hard disks is used as the number of KOBJs to be allocated to each target available hard disk. A preset number "0" is used as the number of KOBJs to be allocated to the remaining available hard disks.

[0102] In this embodiment, when the comparison result shows that the number of currently available hard disks is not greater than a first threshold or not less than a second threshold, a target available hard disk is selected from each currently available hard disk based on its remaining capacity. The number of KOBJs to be allocated to each currently available hard disk is determined based on the data block demand and the target number of the target available hard disks. This embodiment defines the allocation scenario based on the comparison result of the number of hard disks and the two thresholds, avoiding a "one-size-fits-all" allocation method. It adapts to different situations where hard disk resources are abundant or scarce, and determines the KOBJ allocation based on the actual data block demand and the target number of hard disks. This satisfies business needs while avoiding excessive resource occupation or idleness, thus improving the overall utilization rate of storage resources.

[0103] Based on the above embodiments, in one embodiment, such as Figure 7 As shown, an optional implementation method for determining the number of KOBJs to be allocated to each currently available hard disk based on the data block demand and the target number of available hard disks includes:

[0104] S701, if the comparison result shows that the number of currently available hard disks is not greater than the first quantity threshold, determine the number of KOBJs to be allocated.

[0105] The quantity to be allocated refers to the total number of KOBJs that need to be allocated.

[0106] As an optional implementation of this application, the allocated quantities of each currently available hard disk are summed to obtain a first value. The difference between the data block demand and the first value is used as the quantity to be allocated by KOBJ.

[0107] Another optional implementation of this application is to determine the changed hard drive corresponding to the hard drive quantity change event, and determine the number of KOBJs to be allocated based on the number of KOBJs already allocated to the changed hard drive. For example, if the hard drive quantity change event is a hard drive failure event, and the hard drive status of two hard drives has changed to a failure state, and the number of KOBJs already allocated to each of these two hard drives is 10, then the number of KOBJs to be allocated is 20.

[0108] S702 determines the supplementary allocation quantity based on the ratio of the quantity to be allocated to the target quantity of available hard disks.

[0109] Optionally, in this embodiment, the ratio of the quantity to be allocated to the target number of available hard disks is used as the supplementary allocation quantity.

[0110] S703 determines the number of KOBJs to be allocated to the target available hard disk based on the sum of the supplementary allocation quantity and the already allocated quantity.

[0111] Optionally, in this embodiment, the sum of the supplementary allocation quantity and the already allocated quantity can be used as the number of KOBJs to be allocated to each target available hard disk.

[0112] S704, based on the allocated quantity, determines the number of KOBJs that should be allocated to the remaining available hard disks.

[0113] The remaining available hard drives are those other than the target available hard drive among the currently available hard drives.

[0114] Optionally, in this embodiment, the already allocated quantity is used as the number of KOBJs to be allocated to the remaining available hard drives. That is, the number of KOBJs on the remaining available hard drives will not change.

[0115] In this embodiment, when hard disk resources are scarce, the number of KOBJs to be allocated is determined. Based on the ratio of the number to be allocated to the target number of available hard disks, a supplementary allocation quantity is determined. Then, based on the sum of the supplementary allocation quantity and the already allocated quantity, the number of KOBJs to be allocated to the target available hard disks is determined, and based on the already allocated quantity, the number of KOBJs to be allocated to the remaining available hard disks is determined; wherein, the remaining available hard disks are all currently available hard disks excluding the target available hard disks. This effectively solves the problem of excessive single-disk load and has the effect of balancing hard disk storage resources.

[0116] Based on the above embodiments, in one embodiment, such as Figure 8 As shown, an optional implementation method for determining the number of KOBJs to be allocated to each currently available hard disk based on the data block demand and the target number of available hard disks includes:

[0117] S801, if the comparison result shows that the number of currently available hard disks is not less than the second quantity threshold, determine the number of critical data blocks to be allocated to the target available hard disks based on the ratio of the data block demand to the target number of target available hard disks.

[0118] Optionally, in this embodiment, if the comparison result shows that the number of currently available hard disks is not less than the second quantity threshold, the ratio of the data block demand to the target number of target available hard disks is used as the number of critical data blocks to be allocated to the target available hard disks.

[0119] S802, based on the initial quantity, determine the number of KOBJs that should be allocated to the remaining available hard disks.

[0120] The remaining available hard drives are the hard drives other than the target available hard drive among the currently available hard drives; the initial number is zero.

[0121] Optionally, in this embodiment, the initial quantity is used as the number of KOBJs to be allocated to the remaining available hard drives. The initial quantity is 0. That is, no KOBJs are configured on the remaining available hard drives.

[0122] In this embodiment, when hard disk resources are sufficient, in order to avoid the allocation of KOBJs being too scattered and to facilitate the power-saving memory management module to manage the KOBJs in the target available hard disk, this embodiment implements the configuration of only the number of KOBJs to be allocated in the target available hard disk, thereby increasing the centralized management effect of KOBJs and the rationality of hard disk resource allocation.

[0123] Based on the above embodiments, in an exemplary embodiment, such as Figure 9 As shown, the quantity adjustment method may include the following steps:

[0124] S901, upon detecting a change in the number of hard disks in the storage pool of the storage system, obtains the data block demand and the current number of available hard disks in the storage pool.

[0125] S902 compares the number of currently available hard drives with the number threshold.

[0126] S903, if the comparison result shows that the number of currently available hard disks is greater than the first quantity threshold and less than the second quantity threshold, determine the number of KOBJs to be allocated to each currently available hard disk based on the ratio of data block demand to the number of currently available hard disks.

[0127] S904: If the comparison result shows that the number of currently available hard disks is not greater than the first quantity threshold or not less than the second quantity threshold, select the target available hard disk from each currently available hard disk based on the remaining hard disk capacity of each currently available hard disk.

[0128] S905: If the comparison result shows that the number of currently available hard disks is not greater than the first quantity threshold, determine the number of KOBJs to be allocated.

[0129] S906 determines the supplementary allocation quantity based on the ratio of the quantity to be allocated to the target quantity of available hard disks.

[0130] S907, based on the sum of the supplementary allocation quantity and the already allocated quantity, determine the number of KOBJs to be allocated to the target available hard disk.

[0131] S908, based on the allocated quantity, determine the number of KOBJs to be allocated to the remaining available hard disks. The remaining available hard disks are all the currently available hard disks excluding the target available hard disk.

[0132] S909, if the comparison result shows that the number of currently available hard disks is not less than the second quantity threshold, determine the number of critical data blocks to be allocated to the target available hard disks based on the ratio of the data block demand to the target number of target available hard disks.

[0133] S910, based on the initial quantity, determine the number of KOBJs to be allocated to the remaining available hard disks. The remaining available hard disks are all the currently available hard disks excluding the target available hard disk; the initial quantity is zero.

[0134] S911 adjusts the number of currently available hard disks allocated based on the number to be allocated.

[0135] In this embodiment, upon detecting a change in the number of hard drives in the storage pool of the storage system, the system obtains the data block demand and the current number of available hard drives in the storage pool. Based on the data block demand and the current number of available hard drives, the allocated number of currently available hard drives is adjusted; where the allocated number refers to the number of KOBJs already allocated to the currently available hard drives, and the data block demand is the number of KOBJs required to meet business needs. Compared to the traditional method of reserving a fixed number of KOBJs for each hard drive, this application can dynamically adjust the number of allocated KOBJs on each hard drive based on the data block demand and the current number of available hard drives. This not only improves the flexibility of KOBJ allocation but also effectively improves hard drive space utilization and user-available space capacity.

[0136] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0137] Based on the same inventive concept, this application also provides a quantity adjustment device for implementing the quantity adjustment method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more quantity adjustment device embodiments provided below can be found in the limitations of the quantity adjustment method described above, and will not be repeated here.

[0138] In one exemplary embodiment, such as Figure 10 As shown, a quantity adjustment device 1 is provided, applied to a storage system, including: an acquisition module 10 and an adjustment module 20; wherein,

[0139] The acquisition module 10 is used to acquire the data block demand and the current number of available hard disks in the storage pool when a change in the number of hard disks in the storage pool of the storage system is detected; wherein, the data block demand is the number of KOBJs required to meet business needs;

[0140] The adjustment module 20 is used to adjust the number of currently available hard disks allocated based on the data block demand and the number of currently available hard disks; wherein, the allocated number is the number of KOBJs allocated in the currently available hard disks.

[0141] This embodiment provides a quantity adjustment device. When a change in the number of hard drives in a storage pool of a storage system is detected, the device obtains the data block demand and the current number of available hard drives in the storage pool. Based on the data block demand and the current number of available hard drives, the device adjusts the allocated number of KOBJs on the currently available hard drives. The allocated number refers to the number of KOBJs already allocated to the currently available hard drives, and the data block demand is the number of KOBJs required to meet business needs. Compared to the traditional method of reserving a fixed number of KOBJs for each hard drive, this application can dynamically adjust the number of KOBJs allocated to each hard drive based on the data block demand and the current number of available hard drives. This not only improves the flexibility of KOBJ allocation but also effectively improves hard drive space utilization and user-available space capacity.

[0142] In one embodiment, the adjustment module is further specifically used for:

[0143] Based on the data block demand and the number of currently available hard disks, determine the number of KOBJs that should be allocated to the currently available hard disks;

[0144] Adjust the number of currently available hard drives that have been allocated based on the number that should be allocated.

[0145] In one embodiment, the adjustment module is further specifically used for:

[0146] Compare the number of currently available hard drives with the number threshold;

[0147] Based on the data block demand, the number of currently available hard disks, and the comparison results, determine the number of KOBJs that should be allocated to each currently available hard disk.

[0148] In one embodiment, the quantity threshold includes a first quantity threshold and a second quantity threshold, wherein the first quantity threshold is less than the second quantity threshold;

[0149] The adjustment module is also specifically used for:

[0150] If the comparison result shows that the number of currently available hard disks is greater than the first threshold and less than the second threshold, the number of KOBJs to be allocated to each currently available hard disk is determined based on the ratio of data block demand to the number of currently available hard disks.

[0151] In one embodiment, the adjustment module is further specifically used for:

[0152] If the comparison result shows that the number of currently available hard drives is not greater than the first threshold or not less than the second threshold, the target available hard drive is selected from the currently available hard drives based on the remaining hard drive capacity of each currently available hard drive.

[0153] Based on the data block demand and the target number of available hard disks, determine the number of KOBJs that should be allocated to each currently available hard disk.

[0154] In one embodiment, the adjustment module is further specifically used for:

[0155] If the comparison result shows that the number of currently available hard disks is not greater than the first quantity threshold, determine the number of KOBJs to be allocated.

[0156] The supplementary allocation quantity is determined based on the ratio of the quantity to be allocated to the target number of available hard drives.

[0157] Based on the sum of the supplementary allocation quantity and the already allocated quantity, determine the number of KOBJs to be allocated to the target available hard disks; and,

[0158] Based on the allocated quantity, determine the number of KOBJs that should be allocated to the remaining available hard drives; where the remaining available hard drives are the hard drives other than the target available hard drive among the currently available hard drives.

[0159] In one embodiment, the adjustment module is further specifically used for:

[0160] If the comparison result shows that the number of currently available hard drives is not less than the second quantity threshold, the number of critical data blocks to be allocated to the target available hard drives is determined based on the ratio of the data block demand to the target number of target available hard drives; and,

[0161] Based on the initial quantity, determine the number of KOBJs that should be allocated to the remaining available hard drives; where the remaining available hard drives are the hard drives other than the target available hard drive among the currently available hard drives; the initial quantity is zero.

[0162] In this embodiment, when hard disk resources are sufficient, in order to avoid the allocation of KOBJs being too scattered and to facilitate the power-saving memory management module to manage the KOBJs in the target available hard disk, this embodiment realizes that KOBJs are configured only in the target available hard disk, which increases the centralized management effect of KOBJs and the rationality of hard disk resource allocation.

[0163] Each module in the aforementioned quantity adjustment device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0164] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 11 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores information related to critical data blocks. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a quantity adjustment method.

[0165] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0166] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0167] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0168] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0169] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based quantitative adjustment logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0170] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0171] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for adjusting quantity, characterized in that, The method includes: If a change in the number of hard disks in the storage pool of the storage system is detected, the data block demand and the current number of available hard disks in the storage pool are obtained; wherein, the data block demand is the number of critical data blocks (KOBJ) required to meet business needs; Based on the data block demand and the number of currently available hard disks, the number of allocated hard disks is adjusted; wherein, the number of allocated hard disks is the number of KOBJs already allocated to the currently available hard disks.

2. The method according to claim 1, characterized in that, The step of adjusting the allocated number of currently available hard disks based on the data block demand and the number of currently available hard disks includes: Based on the data block demand and the number of currently available hard disks, determine the number of KOBJs that should be allocated to the currently available hard disks; The number of currently available hard disks is adjusted according to the number to be allocated.

3. The method according to claim 2, characterized in that, The number of currently available hard disks is at least two; determining the number of KOBJs to be allocated to the currently available hard disks based on the data block demand and the number of currently available hard disks includes: The number of currently available hard drives is compared with a threshold number. Based on the data block demand, the number of currently available hard disks, and the comparison results, determine the number of KOBJs that should be allocated to each of the currently available hard disks.

4. The method according to claim 3, characterized in that, The quantity threshold includes a first quantity threshold and a second quantity threshold, wherein the first quantity threshold is less than the second quantity threshold; The step of determining the number of KOBJs to be allocated to each of the currently available hard disks based on the data block demand, the number of currently available hard disks, and the comparison results includes: If the comparison result shows that the number of currently available hard disks is greater than the first quantity threshold and less than the second quantity threshold, the number of KOBJs to be allocated to each of the currently available hard disks is determined according to the ratio of the data block demand to the number of currently available hard disks.

5. The method according to claim 4, characterized in that, The step of determining the number of KOBJs to be allocated to each of the currently available hard disks based on the data block demand, the number of currently available hard disks, and the comparison results includes: If the comparison result shows that the number of currently available hard disks is not greater than the first quantity threshold or not less than the second quantity threshold, a target available hard disk is selected from the currently available hard disks based on the remaining hard disk capacity of each currently available hard disk. Based on the data block demand and the target number of available hard disks, determine the number of KOBJs that should be allocated to each of the currently available hard disks.

6. The method according to claim 5, characterized in that, The step of determining the number of KOBJs to be allocated to each of the currently available hard disks based on the data block demand and the target number of available hard disks includes: If the comparison result shows that the number of currently available hard disks is not greater than the first quantity threshold, the number of KOBJs to be allocated is determined. The supplementary allocation quantity is determined based on the ratio of the quantity to be allocated to the target quantity of available hard disks. Based on the sum of the supplementary allocation quantity and the already allocated quantity, determine the number of KOBJs to be allocated to the target available hard disk; and, Based on the already allocated quantity, determine the number of KOBJs that should be allocated to the remaining available hard drives; wherein, the remaining available hard drives are the hard drives other than the target available hard drive among the currently available hard drives.

7. The method according to claim 5, characterized in that, The method for determining the number of KOBJs to be allocated to each of the currently available hard disks based on the data block demand and the target number of available hard disks includes: If the comparison result indicates that the number of currently available hard disks is not less than the second quantity threshold, the number of critical data blocks to be allocated to the target available hard disks is determined based on the ratio of the data block demand to the target number of target available hard disks; and, Based on the initial quantity, determine the number of KOBJs that should be allocated to the remaining available hard drives; wherein, the remaining available hard drives are the hard drives other than the target available hard drive among the currently available hard drives; the initial quantity is zero.

8. A quantity adjustment device, characterized in that, The device includes: The acquisition module is used to acquire the data block demand and the current number of available hard disks in the storage pool when a change in the number of hard disks in the storage pool of the storage system is detected; wherein, the data block demand is the number of KOBJs required to meet business needs; The adjustment module is used to adjust the number of currently available hard disks allocated based on the data block demand and the number of currently available hard disks; wherein the allocated number is the number of KOBJs already allocated to the currently available hard disks.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the quantity adjustment method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the quantity adjustment method according to any one of claims 1 to 7.