Storage control method of storage device and related equipment
By comparing the preset write volume threshold of the low-bit usage type based on the data volume and the low-bit usage type, the problem of low storage density and performance in the prior art is solved, and higher storage density and performance is achieved.
Patent Information
- Application Number
- CN202411997928.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Existing storage solutions have difficulty dynamically upgrading the types of flash particles, resulting in lower storage density and performance.
By obtaining the data amount of the original data and the current usage type of the storage medium, the target usage type of the storage medium is determined based on the data amount and the preset write amount threshold of the low-bit usage type, so as to convert the usage type of the storage medium while ensuring data integrity.
It improves storage density and storage performance, and can make full use of storage space without sacrificing system performance, improving the storage density and overall performance of the entire system.
Smart Images

Figure CN119937922A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of storage control of storage devices, and more specifically, to a storage control method of a storage device, a storage control device of a storage device, a storage control device of a storage device, a computer-readable storage medium, and a computer program product containing instructions. Background Art
[0002] In modern data storage, the basic process of interaction between the host and the storage device is that the process of interaction between the host and the read-write particles includes "host write-memory software / hardware processing-write particles" and "host read-memory software / hardware processing-read particles". Since existing storage solutions often fix the type of flash memory particles, such as the common TLC, QLC, etc., once these particles are produced, it is difficult to upgrade to a storage type with a lower bit number, such as from TLC to SLC or QLC to TLC. This is because the limitations of the flash memory manufacturing process and cost considerations make dynamic type conversion difficult, which results in the low bit (bit) cannot be directly changed to a high bit, and when the high bit is changed to a low bit, the storage capacity will also be reduced due to the low storage capacity of the low bit.
[0003] Therefore, the storage density and storage performance of the prior art are low. Summary of the invention
[0004] Embodiments of the present application provide a storage control method for a storage device, a storage control device for a storage device, a storage control device for a storage device, a computer-readable storage medium, and a computer program product containing instructions, for performing storage control of a storage device while improving storage density and storage performance.
[0005] In a first aspect, an embodiment of the present application provides a storage control method of a storage device, comprising:
[0006] Acquire original data and determine the data volume of the original data;
[0007] Determine the current usage type of the storage medium;
[0008] The target usage type of the storage medium is determined based on a comparison between the data volume and a preset write volume threshold value corresponding to at least one low-order usage type, the target usage type is the current usage type, or any one of the at least one low-order usage type, the number of bits of the low-order usage type is lower than the number of bits of the current usage type, the preset write volume threshold value is the product of the total capacity of the current usage type and a low-to-high bit ratio, and the low-to-high bit ratio is the ratio of the number of bits of the low-order usage type to the number of bits of the current usage type.
[0009] Optionally, determining the target usage type of the storage medium according to a comparison between the data amount and a preset write amount threshold value corresponding to at least one low-order usage type includes:
[0010] If there is a preset write amount threshold value that is greater than the target low usage type corresponding to the data amount, the target low usage type is used as the target usage type.
[0011] Optionally, determining the target usage type of the storage medium according to a comparison between the data amount and a preset write amount threshold value corresponding to at least one low-order usage type includes:
[0012] If there is no low-order usage type corresponding to a preset write amount threshold value greater than the data amount, compressing the original data to obtain compressed data;
[0013] Determine a target compression ratio of the compressed data, wherein the target compression ratio of the compressed data is a ratio of the data volume of the original data to the data volume of the compressed data;
[0014] The target usage type of the storage medium is determined based on a comparison result between the target compression rate of the compressed data and a preset minimum compression rate threshold value corresponding to at least one low-order usage type, wherein the preset minimum compression rate threshold value is the ratio of the number of bits of the current usage type to the number of bits of the low-order usage type.
[0015] Optionally, determining the target usage type of the storage medium based on a comparison result between the target compression rate and a preset minimum compression rate threshold value corresponding to at least one low-order usage type includes:
[0016] If there is a preset minimum compression rate threshold value that is less than the target low-order usage type corresponding to the target compression rate, the target usage type of the storage medium is determined to be the target low-order usage type.
[0017] Optionally, determining the target usage type of the storage medium based on a comparison result between the target compression rate and a preset minimum compression rate threshold value corresponding to at least one low-order usage type includes:
[0018] If there is no low-order usage type corresponding to a preset minimum compression rate threshold value that is less than the target compression rate, it is determined that the target usage type of the storage medium is the current usage type.
[0019] Optionally, the compressed data includes compressed data and uncompressed data;
[0020] After compressing the original data to obtain compressed data, the method further includes:
[0021] Determining that a target usage type of a storage medium corresponding to the uncompressed data is the current usage type;
[0022] The determining the target usage type of the storage medium based on a comparison result between the target compression rate of the compressed data and a preset minimum compression rate threshold value corresponding to at least one low-order usage type includes:
[0023] Determine a target compression rate for the compressed data, and determine a target usage type of a storage medium corresponding to the compressed data based on a comparison result between the target compression rate for the compressed data and a preset minimum compression rate threshold value corresponding to at least one low-order usage type.
[0024] Optionally, determining the target usage type of the storage medium corresponding to the compressed data based on a comparison result between the target compression rate of the compressed data and a preset minimum compression rate threshold value corresponding to at least one low-order usage type includes:
[0025] If there is a preset minimum compression rate threshold value that is smaller than the target low-order usage type corresponding to the target compression rate of the compressed data, the target usage type of the storage medium corresponding to the compressed data is determined as the target low-order usage type.
[0026] Optionally, determining the target usage type of the storage medium corresponding to the compressed data based on a comparison result between the target compression rate of the compressed data and a preset minimum compression rate threshold value corresponding to at least one low-order usage type includes:
[0027] If there is no low-order usage type corresponding to the target compression rate of the compressed data whose preset minimum compression rate threshold is less than the target compression rate of the compressed data, the target usage type of the storage medium corresponding to the compressed data is determined as the current usage type.
[0028] Optionally, determining the current usage type of the storage medium includes:
[0029] After the storage medium is erased based on the first usage type, the first usage type is used as the current usage type.
[0030] In a second aspect, an embodiment of the present application provides a storage control device of a storage device, including:
[0031] An acquisition unit, used to acquire original data and determine the data volume of the original data;
[0032] A determination unit, used to determine the current usage type of the storage medium;
[0033] The determination unit is further used to determine a target usage type of the storage medium based on a comparison between the data volume and a preset write volume threshold value corresponding to at least one low-order usage type, the target usage type being the current usage type, or any one of the at least one low-order usage types, the number of bits of the low-order usage type being lower than the number of bits of the current usage type, the preset write volume threshold being the product of the total capacity of the current usage type and a low-to-high bit ratio, the low-to-high bit ratio being the ratio of the number of bits of the low-order usage type to the number of bits of the current usage type.
[0034] In a third aspect, an embodiment of the present application provides a storage control device of a storage device, including:
[0035] CPU, memory, input and output interfaces, wired or wireless network interfaces, and power supply;
[0036] The memory is a short-term storage memory or a persistent storage memory;
[0037] The central processing unit is configured to communicate with the memory and execute instruction operations in the memory to perform the storage control method of the aforementioned storage device.
[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on a computer, the computer executes the storage control method of the aforementioned storage device.
[0039] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the storage control method of the aforementioned storage device.
[0040] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages: the original data can be obtained, the data volume of the original data can be determined, the current usage type of the storage medium can be determined, and the target usage type of the storage medium can be determined based on the comparison of the data volume with the preset write volume threshold corresponding to at least one low-order usage type. The target usage type is the current usage type, or any one of at least one low-order usage type. The number of bits of the low-order usage type is lower than the number of bits of the current usage type. The preset write volume threshold is the product of the total capacity of the current usage type and the low-to-high ratio. The low-to-high ratio is the ratio of the number of bits of the low-order usage type to the number of bits of the current usage type. Under the premise of ensuring the storage integrity of some data, the usage type of the storage medium can be converted from the usage type of a storage medium with a high number of bits to the usage type of a storage medium with a lower number of bits, and the storage density and storage performance are high. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1A schematic diagram of a flow chart of a storage control method of a storage device disclosed in an embodiment of the present application;
[0042] Figure 2 A schematic diagram of the flash memory particle types disclosed in the embodiments of the present application;
[0043] Figure 3 A schematic diagram of converting a high-level usage type into a low-level usage type disclosed in an embodiment of the present application;
[0044] Figure 4 A schematic flow chart of another storage control method for a storage device disclosed in an embodiment of the present application;
[0045] Figure 5 A schematic diagram of a NAND initialization state disclosed in an embodiment of the present application;
[0046] Figure 6 A schematic diagram of the structure of a storage control device of a storage device disclosed in an embodiment of the present application;
[0047] Figure 7 A schematic diagram of the structure of a storage control device of a storage device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0048] Embodiments of the present application provide a storage control method for a storage device, a storage control device for a storage device, a storage control device for a storage device, a computer-readable storage medium, and a computer program product containing instructions, for performing storage control of a storage device while improving storage density and storage performance.
[0049] See also Figure 1 , Figure 1 The present invention is a flowchart of a storage control method of a storage device disclosed in an embodiment of the present application, the method comprising:
[0050] 101. Obtain original data and determine the data volume of the original data.
[0051] In this embodiment, when performing storage control of the storage device, original data may be acquired and the data volume of the original data may be determined.
[0052] Specifically, raw data refers to data that has not been compressed, and the data volume of raw data refers to the size of the storage space actually occupied by the raw data during the storage process.
[0053] 102. Determine the current usage type of the storage medium.
[0054] After the original data is acquired and the data volume of the original data is determined, the current usage type of the storage medium can be determined.
[0055] Specifically, the storage control method of the storage device according to the embodiments of the present application is applicable to all products using NAND flash memory chips. NAND (Not And) flash memory chips are a type of non-volatile semiconductor memory and are the basic units that make up the flash memory storage array in a solid-state drive (SSD). SLC (Single-Level Cell), MLC (Multi-Level Cell), TLC (Trinary-Level Cell), and QLC (Quad-Level Cell) are all different levels of coding methods adopted by NAND flash memory. These types represent the number of binary digits that a single storage cell can store data, and determine the characteristics of storage density and performance, such as lifespan, performance, the amount of data stored per cell, and data stability, etc. For the amount of data stored per cell, please refer to Figure 2 , Figure 2 which is a schematic diagram of the types of flash memory chips disclosed in the embodiments of the present application, Figure 2 indicating the number of bits stored under each cell of SLC, MLC, TLC, and QLC, or the storage data density of each cell. Each cell of SLC stores 1 bit of data, each cell of MLC stores 2 bits of data, each cell of TLC stores 3 bits of data, and each cell of QLC stores 4 bits of data. For lifespan: SLC > MLC > TLC > QLC. For performance: SLC > MLC > TLC > QLC. For the amount of data stored per cell: SLC < MLC < TLC < QLC. For data stability: SLC > MLC > TLC > QLC.
[0056] 103. Determine the target usage type of the storage medium according to the comparison between the data volume and the preset write volume thresholds respectively corresponding to at least one lower-order usage type. The target usage type is the current usage type or any one of the at least one lower-order usage type. The number of bits of the lower-order usage type is lower than that of the current usage type. The preset write volume threshold is the product of the total capacity of the current usage type and the low-to-high ratio. The low-to-high ratio is the ratio of the number of bits of the lower-order usage type to the number of bits of the current usage type.
[0057] After determining the current usage type of the storage medium, the target usage type of the storage medium can be determined according to the comparison between the data volume and the preset write volume thresholds respectively corresponding to at least one lower-order usage type. The target usage type is the current usage type or any one of the at least one lower-order usage type. The number of bits of the lower-order usage type is lower than that of the current usage type. The preset write volume threshold is the product of the total capacity of the current usage type and the low-to-high ratio. The low-to-high ratio is the ratio of the number of bits of the lower-order usage type to the number of bits of the current usage type.
[0058] Specifically, for example, if the current usage type is QLC, the low-order usage type is any one of the usage types of storage media having a lower number of bits than QLC, such as SLC, MLC, and TLC.
[0059] It is worth mentioning that, under the premise of ensuring the integrity of partial data storage, converting the usage type of storage media from the usage type (coding type) of storage media with a high number of bits to the usage type (coding type) of storage media with a lower number of bits can improve storage density and storage performance.
[0060] In an embodiment of the present application, original data can be obtained, the data volume of the original data can be determined, the current usage type of the storage medium can be determined, and the target usage type of the storage medium can be determined based on the comparison of the data volume with the preset write volume threshold corresponding to at least one low-order usage type. The target usage type is the current usage type, or any one of at least one low-order usage type. The number of bits of the low-order usage type is lower than the number of bits of the current usage type. The preset write volume threshold is the product of the total capacity of the current usage type and the low-to-high ratio. The low-to-high ratio is the ratio of the number of bits of the low-order usage type to the number of bits of the current usage type. Under the premise of ensuring the storage integrity of some data, the usage type of the storage medium can be converted from the usage type of a storage medium with a high number of bits to the usage type of a storage medium with a lower number of bits, and the storage density and storage performance are high.
[0061] In the embodiment of the present application, there are multiple methods for determining the target usage type of the storage medium based on the comparison between the data volume and the preset write volume threshold value corresponding to at least one low-order usage type. Figure 1 The storage control method of the storage device shown in the figure, one method of which is described below.
[0062] In this embodiment, when performing storage control of the storage device, the original data may be acquired first, and the data volume of the original data may be determined.
[0063] After the original data is acquired and the data volume of the original data is determined, the current usage type of the storage medium can be determined.
[0064] After determining the current usage type of the storage medium, the target usage type of the storage medium can be determined based on the comparison of the data volume and the preset write volume threshold corresponding to at least one low-order usage type. The target usage type is the current usage type, or any one of at least one low-order usage type. The number of bits of the low-order usage type is lower than the number of bits of the current usage type. The preset write volume threshold is the product of the total capacity of the current usage type and the low-to-high ratio. The low-to-high ratio is the ratio of the number of bits of the low-order usage type to the number of bits of the current usage type.
[0065] Among them, based on the comparison between the data volume and the preset write volume threshold corresponding to at least one low-order usage type, the method for determining the target usage type of the storage medium can be: if there is a preset write volume threshold that is greater than the target low-order usage type corresponding to the data volume, then the target low-order usage type is used as the target usage type.
[0066] Specifically, if the current usage type is QLC, the low-order usage type is any one of SLC, MLC, and TLC usage types. The total capacity of QLC is 8TB, and the preset write volume thresholds corresponding to SLC, MLC, and TLC are 8TB*(1 / 4), 8TB*(2 / 4), and 8TB*(3 / 4), respectively. If the amount of original data is 5.9TB, since 8TB*(3 / 4) is greater than 5.9TB, it can be determined that TLC (target low-order usage type) is the target usage type.
[0067] It is worth mentioning that when the amount of data is small but still suitable for low-bit type storage, low-bit type is given priority, which can reduce read and write latency and energy consumption, thereby improving storage performance.
[0068] Among them, the method for determining the target usage type of the storage medium based on the comparison between the data volume and the preset write volume threshold corresponding to at least one low-order usage type can also be: if there is no low-order usage type corresponding to the preset write volume threshold greater than the data volume, the original data is first compressed to obtain compressed data, and then the target compression rate of the compressed data is determined, the target compression rate of the compressed data is the ratio of the data volume of the original data to the data volume of the compressed data, and finally the target usage type of the storage medium is determined based on the comparison result of the target compression rate of the compressed data with the preset compression rate minimum threshold corresponding to at least one low-order usage type, the preset compression rate minimum threshold is the ratio of the number of bits of the current usage type to the number of bits of the low-order usage type.
[0069] For details, please refer to Figure 3 , Figure 3 This is a schematic diagram of converting a high-level usage type into a low-level usage type disclosed in an embodiment of the present application. Figure 3 A method is demonstrated to convert a high-level (such as 4-bit QLC) usage type into a low-level (such as 3-bit TLC) usage type through specific technical means (such as data compression, etc.) to maintain or increase storage capacity and improve storage performance. This method can keep the storage capacity unchanged or larger, and the greater the compression rate, the greater the storage capacity can be achieved. Without sacrificing system performance, the storage space can be fully utilized, thereby improving the storage density and overall performance of the entire system. That is, this high-bit flash memory particle conversion to low-bit flash memory particles combined with the compression algorithm can greatly improve the performance of flash memory particles and data stability while ensuring capacity.
[0070] Among them, the method for determining the target usage type of the storage medium based on the comparison result of the target compression rate and the preset compression rate minimum threshold value corresponding to at least one low-order usage type can be: if there is a target low-order usage type corresponding to a preset compression rate minimum threshold value that is smaller than the target compression rate, then the target usage type of the storage medium is determined to be the target low-order usage type.
[0071] Among them, the method for determining the target usage type of the storage medium based on the comparison result of the target compression rate and the preset compression rate minimum threshold value corresponding to at least one low-use type can also be that if there is no low-use type corresponding to the preset compression rate minimum threshold value being lower than the target compression rate, then the target usage type of the storage medium is determined to be the current usage type.
[0072] For details, please refer to Figure 4 , Figure 4 A flowchart of another storage control method for a storage device disclosed in an embodiment of the present application is shown in FIG. Figure 4 It can be seen that the current usage type is the QLC high bit usage type, and the low bit usage type is the TLC low bit usage type. Specifically, the host data (original data) is written first, and then the storage device receives the write data of the host, and caches the data in the storage device, and executes the steps corresponding to the following three conditions:
[0073] Condition 1: When the amount of original data is less than the preset write amount threshold [preset write amount threshold = total capacity of the current usage type * (number of low bits / number of high bits) = total capacity * (3 / 4), the original data is assembled and written according to the TLC rules, and the assembled data is sent to NAND for write operation.
[0074] Condition 2: When the amount of original data is greater than the preset write amount threshold, the original data is compressed. If the target compression rate is greater than the preset minimum compression rate threshold (preset minimum compression rate threshold = 4 / 3), the compressed data is assembled according to the TLC rule and the assembled data is sent to NAND for write operation.
[0075] Condition 3: When the amount of original data is greater than the preset write amount threshold, if the target compression rate is less than the preset minimum compression rate threshold (compression rate threshold = 4 / 3), the compressed data is assembled according to the QLC rule and the assembled data is sent to NAND for write operation.
[0076] Among them, the target compression rate (data compression rate) needs to be guaranteed to be greater than or equal to high bit / low bi. It can be understood that if it is QLC to TLC, the target compression rate must be greater than the preset minimum compression rate threshold of 4 / 3, if it is QLC to MLC, the target compression rate must be greater than the preset minimum compression rate threshold of 4 / 2, and so on.
[0077] Among them, after compressing the original data to obtain the compressed data, it can be determined that the target usage type of the storage medium corresponding to the uncompressed data is the current usage type, the compressed data includes compressed data and uncompressed data, and wherein the method for determining the target usage type of the storage medium based on the size comparison result of the target compression rate of the compressed data and the preset compression rate minimum threshold value corresponding to at least one low-order usage type can be to determine the target compression rate of the compressed data, and determine the target usage type of the storage medium corresponding to the compressed data based on the size comparison result of the target compression rate of the compressed data and the preset compression rate minimum threshold value corresponding to at least one low-order usage type.
[0078] It should be understood that not all data in the original data can be compressed. Therefore, when the original data is compressed, the compressed data obtained may contain two parts of data, namely compressed data and uncompressed data. The compressed data refers to the data in the original data that can be compressed, and the uncompressed data refers to the data in the original data that cannot be compressed.
[0079] Among them, the method for determining the target usage type of the storage medium corresponding to the compressed data based on the comparison result of the target compression rate of the compressed data and the preset compression rate minimum threshold value corresponding to at least one low-order usage type may be: if there is a target low-order usage type corresponding to the target compression rate of the compressed data whose preset minimum compression rate threshold value is smaller than the target low-order usage type, then the target usage type of the storage medium corresponding to the compressed data is determined as the target low-order usage type.
[0080] Among them, the method for determining the target usage type of the storage medium corresponding to the compressed data based on the comparison result of the target compression rate of the compressed data and the preset compression rate minimum threshold value corresponding to at least one low-order usage type can also be: if there is no low-order usage type corresponding to the target compression rate of the compressed data whose preset compression rate minimum threshold value is lower than the target compression rate of the compressed data, then the target usage type of the storage medium corresponding to the compressed data is determined as the current usage type.
[0081] It is worth mentioning that when the amount of compressed data approaches or reaches the preset minimum compression rate threshold of a certain low-bit usage type, selecting a lower bit type can increase storage density, optimize storage strategy, and improve storage space utilization.
[0082] The method for determining the current usage type of the storage medium may be to perform erasing processing on the storage medium based on the first usage type and then use the first usage type as the current usage type.
[0083] For details, please refer to Figure 5 , Figure 5 A schematic diagram of a NAND initialization state disclosed in an embodiment of the present application, Figure 5 The initialization steps for converting all QLC / TLC / MLC to TLC / MLC / SLC respectively, such as Figure 5 As shown, the original nand cannot be written when it is not erased. Take 2 planes as an example. Each plane has 4 AUs (write units), and each AU can store 4KB of data. When the nand is erased according to TLC, the TLC rule requires 3page*2plane*2AU*4KB for each write, and only one program (write) is required. When the nand is erased according to QLC, the QLC rule requires 4page*2plane*2AU*4KB for each write, and two programs (writes) are required to complete the NAND write data. Therefore, through different erase modes (TLC, MLC or QLC), the nature of subsequent read and write operations can be changed to a certain extent. For example, if it is erased in QLC mode, it can be initialized to TLC or MLC so that the program only operates for the corresponding erase level, or it can be used partially according to the original level and partially converted. This flexibility depends on the system's required configuration. This allows the behavior and performance of the storage device to be adjusted as needed.
[0084] In this embodiment, the original data can be obtained, the data volume of the original data can be determined, the current usage type of the storage medium can be determined, and the target usage type of the storage medium can be determined according to the comparison between the data volume and the preset write volume threshold value corresponding to at least one low-order usage type. The target usage type is the current usage type, or any one of at least one low-order usage type. The number of bits of the low-order usage type is lower than the number of bits of the current usage type. The preset write volume threshold value is the product of the total capacity of the current usage type and the low-high bit ratio. The low-high bit ratio is the ratio of the number of bits of the low-order usage type to the number of bits of the current usage type. Under the premise of ensuring the integrity of partial data storage, the usage type of the storage medium can be converted from the usage type of the storage medium with a high number of bits to the usage type of the storage medium with a lower number of bits, and the storage density and storage performance are high. Secondly, this high-bit flash memory particle conversion to low-bit flash memory particles combined with the compression algorithm can greatly improve the performance of the flash memory particles and data stability while ensuring the capacity. Finally, for the data volume of the compressed data close to or reaching the preset minimum compression rate threshold of a certain low-order usage type, selecting a lower bit type can increase the storage density, optimize the storage strategy, and improve the storage space utilization.
[0085] The storage control method of the storage device in the embodiment of the present application is described above. The storage control device of the storage device in the embodiment of the present application is described below. Figure 6 , an embodiment of a storage control device of a storage device in an embodiment of the present application includes:
[0086] An acquisition unit, used to acquire original data and determine the data volume of the original data;
[0087] A determination unit, used to determine the current usage type of the storage medium;
[0088] The determination unit is further used to determine a target usage type of the storage medium based on a comparison between the data volume and a preset write volume threshold value corresponding to at least one low-order usage type, the target usage type being the current usage type, or any one of the at least one low-order usage types, the number of bits of the low-order usage type being lower than the number of bits of the current usage type, the preset write volume threshold being the product of the total capacity of the current usage type and a low-to-high bit ratio, the low-to-high bit ratio being the ratio of the number of bits of the low-order usage type to the number of bits of the current usage type.
[0089] In an embodiment of the present application, original data can be obtained, the data volume of the original data can be determined, the current usage type of the storage medium can be determined, and the target usage type of the storage medium can be determined based on the comparison of the data volume with the preset write volume threshold corresponding to at least one low-order usage type. The target usage type is the current usage type, or any one of at least one low-order usage type. The number of bits of the low-order usage type is lower than the number of bits of the current usage type. The preset write volume threshold is the product of the total capacity of the current usage type and the low-to-high ratio. The low-to-high ratio is the ratio of the number of bits of the low-order usage type to the number of bits of the current usage type. Under the premise of ensuring the storage integrity of some data, the usage type of the storage medium can be converted from the usage type of a storage medium with a high number of bits to the usage type of a storage medium with a lower number of bits, and the storage density and storage performance are high.
[0090] See below Figure 7 In the embodiment of the present application, an embodiment of the storage control device 700 of the storage device includes:
[0091] CPU 701, memory 705, input / output interface 704, wired or wireless network interface 703 and power supply 702;
[0092] The memory 705 is a temporary storage memory or a permanent storage memory;
[0093] The CPU 701 is configured to communicate with the memory 705 and execute the instructions in the memory 705 to perform the aforementioned Figure 1 The method in the illustrated embodiment.
[0094] The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium includes instructions, when the instructions are executed on a computer, the computer executes the aforementioned Figure 1 The method in the illustrated embodiment.
[0095] The present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the aforementioned Figure 1 The method in the illustrated embodiment.
[0096] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0097] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0098] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0099] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0100] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0101] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A storage control method for a storage device, characterized in that: include: Acquire original data and determine the data volume of the original data; Determine the current usage type of the storage medium; The target usage type of the storage medium is determined based on a comparison between the data volume and a preset write volume threshold value corresponding to at least one low-order usage type, the target usage type is the current usage type, or any one of the at least one low-order usage type, the number of bits of the low-order usage type is lower than the number of bits of the current usage type, the preset write volume threshold value is the product of the total capacity of the current usage type and a low-to-high bit ratio, and the low-to-high bit ratio is the ratio of the number of bits of the low-order usage type to the number of bits of the current usage type.
2. The storage control method of the storage device according to claim 1, characterized in that: The determining the target usage type of the storage medium according to the comparison between the data amount and the preset write amount threshold value corresponding to at least one low-order usage type includes: If there is a preset write amount threshold value that is greater than the target low usage type corresponding to the data amount, the target low usage type is used as the target usage type.
3. The storage control method of the storage device according to claim 1, characterized in that: The determining the target usage type of the storage medium according to the comparison between the data amount and the preset write amount threshold value corresponding to at least one low-order usage type includes: If there is no low-order usage type corresponding to a preset write amount threshold value greater than the data amount, compressing the original data to obtain compressed data; Determine a target compression ratio of the compressed data, wherein the target compression ratio of the compressed data is a ratio of the data volume of the original data to the data volume of the compressed data; The target usage type of the storage medium is determined based on a comparison result between the target compression rate of the compressed data and a preset minimum compression rate threshold value corresponding to at least one low-order usage type, wherein the preset minimum compression rate threshold value is the ratio of the number of bits of the current usage type to the number of bits of the low-order usage type.
4. The storage control method of the storage device according to claim 3, characterized in that: The determining the target usage type of the storage medium based on a comparison result between the target compression rate and a preset minimum compression rate threshold value corresponding to at least one low-order usage type includes: If there is a preset minimum compression rate threshold value that is less than the target low-order usage type corresponding to the target compression rate, the target usage type of the storage medium is determined to be the target low-order usage type.
5. The storage control method of the storage device according to claim 3, characterized in that: The determining the target usage type of the storage medium based on a comparison result between the target compression rate and a preset minimum compression rate threshold value corresponding to at least one low-order usage type includes: If there is no low-order usage type corresponding to a preset minimum compression rate threshold value that is less than the target compression rate, it is determined that the target usage type of the storage medium is the current usage type.
6. The storage control method of the storage device according to claim 3, characterized in that: The compressed data includes compressed data and uncompressed data; After compressing the original data to obtain compressed data, the method further includes: Determining that a target usage type of a storage medium corresponding to the uncompressed data is the current usage type; The determining the target usage type of the storage medium based on a comparison result between the target compression rate of the compressed data and a preset minimum compression rate threshold value corresponding to at least one low-order usage type includes: Determine a target compression rate for the compressed data, and determine a target usage type of a storage medium corresponding to the compressed data based on a comparison result between the target compression rate for the compressed data and a preset minimum compression rate threshold value corresponding to at least one low-order usage type.
7. The storage control method of the storage device according to claim 6, characterized in that: The determining the target usage type of the storage medium corresponding to the compressed data based on the comparison result between the target compression rate of the compressed data and the preset minimum compression rate threshold value corresponding to at least one low-order usage type comprises: If there is a preset minimum compression rate threshold value that is smaller than the target low-order usage type corresponding to the target compression rate of the compressed data, the target usage type of the storage medium corresponding to the compressed data is determined as the target low-order usage type.
8. The storage control method of the storage device according to claim 7, characterized in that: The determining the target usage type of the storage medium corresponding to the compressed data based on the comparison result between the target compression rate of the compressed data and the preset minimum compression rate threshold value corresponding to at least one low-order usage type comprises: If there is no low-order usage type corresponding to the target compression rate of the compressed data whose preset minimum compression rate threshold is less than the target compression rate of the compressed data, the target usage type of the storage medium corresponding to the compressed data is determined as the current usage type.
9. The storage control method of the storage device according to claim 1, characterized in that: The determining the current usage type of the storage medium includes: After the storage medium is erased based on the first usage type, the first usage type is used as the current usage type.
10. A storage control device for a storage device, characterized in that: include: An acquisition unit, used to acquire original data and determine the data volume of the original data; A determination unit, used to determine the current usage type of the storage medium; The determination unit is further used to determine the target usage type of the storage medium based on a comparison between the data volume and a preset write volume threshold value corresponding to at least one low-order usage type, the target usage type being the current usage type, or any one of the at least one low-order usage types, the number of bits of the low-order usage type being lower than the number of bits of the current usage type, the preset write volume threshold being the product of the total capacity of the current usage type and a low-to-high bit ratio, the low-to-high bit ratio being the ratio of the number of bits of the low-order usage type to the number of bits of the current usage type.
11. A storage control device of a storage device, characterized in that: include: CPU and memory; The memory is a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises instructions, and when the instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 9.
13. A computer program product comprising instructions, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
A power-down protection method of a solid state hard disk
CN109189605A
Storage device control method and device and storage device
CN115729437A
Storage medium conversion method of memory and electronic equipment
CN118444842A
Data storage method and data storage system of storage chip
CN118626024A
Mass storage device with dynamic single level cell (SLC) buffer specific program and / or erase settings
US20190034330A1