Data management method and solid-state storage device

By separating hot and cold data in solid-state storage devices based on differences in data popularity and write cycles, and by developing a migration plan, the performance degradation caused by excessive use of flash memory blocks is solved, thereby improving the storage performance and durability of the devices.

CN121722320APending Publication Date: 2026-03-24HANGZHOU HIKSTORAGE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-16
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

The problem of a significant decrease in the performance and stability of solid-state storage devices after a period of use due to excessive use of flash memory blocks.

Method used

By performing a separation operation on the data in the flash memory block based on the dynamic hotness threshold of the data, separating it into hot data and cold data, and combining the difference in erase and write cycles and the data retention capability coefficient, the migration cost is calculated, a data migration plan is formulated, and the storage of data in different flash memory blocks is optimized.

Benefits of technology

It improves the storage performance and durability of solid-state storage devices, avoids rapid degradation of storage performance, reduces the total amount and frequency of data migration, and improves data reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121722320A_ABST
    Figure CN121722320A_ABST
Patent Text Reader

Abstract

The invention discloses a data management method which comprises the following steps: based on a dynamic heat threshold value of data, performing separation operation on the data in a flash memory block to obtain hot data and cold data; distributing the flash memory blocks for the hot data and the cold data according to the data retention capability coefficient and the data retention requirement of each flash memory block; and when the difference of the erasing times of any flash memory block exceeds a wear threshold value, calculating the migration cost of any flash memory block based on the data retention demand and the data retention capability coefficient, and making a data migration plan, the method is used for solving the problem that the performance and the stability of the solid-state storage device are greatly reduced after being used for a period of time due to overuse of a flash memory block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage technology, and in particular to a data management method and a solid-state storage device. Background Technology

[0002] With the development of solid-state storage devices, such as SSD (Solid State Disk), eMMC (Embedded Multi Media Card), T-card, USB flash drive, and UFS (Universal Flash Storage), flash memory management technology is used to manage data.

[0003] For example, due to data erasure and rewrite operations, some flash memory blocks may fail due to overuse. Cold data stored in these flash memory blocks may be lost due to charge leakage. This risk can affect the overall performance of the system, reduce the reliability of cold data, and cause the performance and stability of solid-state storage devices to decline significantly after a period of use. Summary of the Invention

[0004] This application provides a data management method to address the problem of a significant decrease in the performance and stability of solid-state storage devices after a period of use due to excessive use of flash memory blocks.

[0005] In a first aspect, embodiments of this application provide a data management method, including: Based on the dynamic heat threshold of the data, a separation operation is performed on the data in the flash memory block to obtain hot data and cold data; For the first flash memory block whose erase / write count difference exceeds the wear threshold and / or the second flash memory block whose data retention capability coefficient does not meet the data retention requirements, the migration cost of migrating the data to be migrated is calculated based on the data retention requirements and the data retention capability coefficient, taking into account the hot data and / or cold data distribution of any flash memory block. The erase / write count difference represents the difference between the current erase / write count and the average erase / write count of all flash memory blocks in the solid-state storage device. Based on the migration costs mentioned above, a data migration plan is developed.

[0006] Optionally, the migration cost of migrating the data to be migrated is calculated based on the data retention requirements and the data retention capability coefficient, including: For any given flash memory block, based on the retention time in the data retention requirement, the number of erase / write cycles of the flash memory block, and the size of the data to be migrated on the flash memory block, the migration cost for migrating the data to be migrated on the flash memory block is determined. The migration cost shall not exceed the maximum migration cost of the solid-state storage device where the flash memory block is located.

[0007] Optionally, the process of developing a data migration plan based on the migration cost includes: The first flash memory block is used as the target high-wear flash memory block for the data to be migrated. For the target high-wear flash memory block, a wear leveling migration plan is formulated based on the data size of the data to be migrated in the low-wear flash memory block.

[0008] Optionally, based on the data size of the data to be migrated in the high-wear flash memory block, a wear leveling migration plan is formulated, including: Calculate the first migration cost of migrating cold data from the low-wear flash memory block to the high-wear flash memory block; and / or Based on the magnitude of the first hot data in the high-wear flash memory block where the heat value drops below the dynamic heat threshold, calculate the second migration cost of migrating the first hot data to the low-wear flash memory block; Based on the first migration cost and / or the second migration cost, a wear leveling migration plan is formulated.

[0009] Optionally, the process of developing a data migration plan includes: For the second flash memory block, a data retention migration plan is developed, wherein the data retention migration plan includes: The data from the second flash block is migrated to a flash block whose data retention coefficient is higher than the average data retention coefficient of all flash blocks in the solid-state storage device.

[0010] Optionally, before executing the data migration plan, prioritize all data to be migrated in all data migration plans according to at least one of the following methods: Set the cold data in the second flash memory block as the first priority data; and / or Set the heat data in the first flash memory block and / or the second flash memory block whose heat value drops below the dynamic heat threshold as the second priority data; and / or Set the hot data in the first flash memory block as the third priority data.

[0011] Optionally, before performing a separation operation on the data in the flash memory block based on a dynamic heat threshold of the data, the method further includes: The heat value of the data is determined based on the data access characteristics of the data and the time decay coefficient of the solid-state storage device. If the current idle capacity of the hot block is less than the idle capacity threshold of the hot block, the dynamic heat threshold is reduced according to the proportion of the current idle capacity of the hot block.

[0012] Optionally, the dynamic heat threshold is reduced according to the proportion of the current hot block's idle capacity, including: The dynamic heat threshold h is calculated using the following formula. th :

[0013] Among them, h i b represents the current popularity value of the data. j B represents the j-th flash memory block. h p represents a set of flash memory blocks. j c represents the current number of free pages in the j-th flash memory block. j This represents the block capacity of the j-th flash memory block; This indicates the percentage of the current hot block idle capacity in the total current hot block capacity.

[0014] Optionally, the process of developing a data migration plan based on the migration cost includes: For any one of the first and / or second flash blocks in a solid-state storage device: Based on the migration priority of the data to be migrated in the flash memory block, determine the size of the data to be migrated in the flash memory block and the number of erase / write cycles required to migrate the data to be migrated, and calculate the migration cost of migrating the data to be migrated in the flash memory block; If the migration cost exceeds the maximum migration cost that the solid-state storage device can bear, then according to the migration priority, the data to be migrated that is ranked lower will be removed from the data set to be migrated.

[0015] In a second aspect, embodiments of this application provide a solid-state storage device, including: Flash controller and multiple flash blocks; The flash memory controller executes the computer-readable instructions to implement the above-described data management method.

[0016] In this embodiment, by performing a separation operation on the data in the flash memory block before its data retention capability deteriorates, instead of migrating all the data, the total amount and frequency of data migration are reduced, thereby reducing the overall hardware erase and write overhead. In addition, by matching the data retention capability coefficient of the flash memory block with the data retention requirements and monitoring the number of erase and write cycles, flash memory blocks whose data retention capability may deteriorate can be detected in a timely manner, avoiding data loss due to flash memory block aging and charge leakage, thereby improving the storage performance and durability of the solid-state storage device and avoiding rapid degradation of storage performance. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of a data management method provided in an embodiment of this application; Figure 2 This is a schematic diagram of a data management method provided in an embodiment of this application; Figure 3 This is a schematic diagram of a data management method provided in an embodiment of this application; Figure 4 This is a schematic diagram of the flash memory controller functional modules provided in an embodiment of this application. Detailed Implementation

[0018] The present application will be described in detail below with reference to the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present application. Any structural, methodological, or functional modifications made by those skilled in the art based on these embodiments are included within the protection scope of the present application.

[0019] By quantifying the access frequency of data, the time decay of data popularity can be estimated, thereby calculating the data's popularity value. Separating hot and cold data into flash memory blocks with different characteristics based on this popularity value can optimize the overall performance of solid-state storage devices. However, if only the access performance optimization of hot data is focused on, without considering the reliability of flash memory blocks for long-term storage of cold data, data partitioning may rely solely on access frequency. This could lead to cold data being allocated to flash memory blocks whose reliability cannot meet long-term storage requirements, resulting in a significant decline in the reliability of cold data.

[0020] To improve the reliability of solid-state storage devices after long-term operation, embodiments of this application provide a data management method, including: S101: Based on the dynamic heat threshold of the data, perform a separation operation on the data in the flash memory block to obtain hot data and cold data; S102: For the first flash memory block whose erase / write cycle difference value exceeds the wear threshold and / or the second flash memory block whose data retention capability coefficient does not meet the data retention requirements, calculate the migration cost of migrating the data to be migrated from the first flash memory block and / or the second flash memory block based on the data retention requirements and the data retention capability coefficient, taking into account the hot data and / or cold data distribution of any flash memory block. Here, the erase / write cycle difference value represents the difference between the current erase / write cycle count and the average erase / write cycle count of all flash memory blocks in the solid-state storage device. S103: Formulate a data migration plan based on the migration cost.

[0021] Before step S101, the method may further include: determining the heat value of the data based on the data access characteristics of the data and the time decay coefficient of the solid-state storage device; If the current idle capacity of the hot block is less than the idle capacity threshold of the hot block, the dynamic heat threshold is reduced according to the proportion of the current idle capacity of the hot block.

[0022] For example, the dynamic heat threshold h can be calculated according to the following formula. th :

[0023] Among them, h i b represents the current popularity value of the data. j B represents the j-th flash memory block. h p represents a set of flash memory blocks. j c represents the current number of free pages in the j-th flash memory block. j This represents the block capacity of the j-th flash memory block; This indicates the percentage of the current hot block idle capacity in the total current hot block capacity.

[0024] Data retention capability refers to the length of time that a solid-state storage device using NAND (NOT AND) Flash technology can reliably retain data when the flash memory blocks are not powered on.

[0025] Data retention capability decreases with increasing number of erase / write cycles.

[0026] In this embodiment, the data retention capability is quantified by the data retention capability coefficient. The larger the data retention capability coefficient, the longer the data can be retained in the flash memory block. The data retention capability coefficient is negatively correlated with the number of erase and write cycles of the flash memory block. The data retention capability coefficient can be determined by accelerated aging test before leaving the factory. The data retention capability coefficient is related to the material, manufacturing process, manufacturing process and physical architecture of the flash memory block.

[0027] For example, the data retention capability coefficient can be modeled based on pre-testing before shipment:

[0028] in, , and These are inherent parameters of solid-state storage devices. This indicates the factory specifications of solid-state storage devices.

[0029] Step S102 can be implemented in the following way: For any given flash memory block, based on the retention time in the data retention requirement, the number of erase / write cycles of the flash memory block, and the data size of the data to be migrated on the flash memory block, the migration cost for migrating the data to be migrated on the flash memory block is determined, wherein the migration cost does not exceed the maximum migration cost of the solid-state storage device where the flash memory block is located.

[0030] The data migration plan in step S103 may include a wear leveling migration plan and / or a data retention migration plan.

[0031] In the wear leveling migration plan: The first flash memory block is designated as a high-wear flash memory block; For high-wear flash memory blocks, a wear leveling migration plan is formulated based on the data size of the data to be migrated in the high-wear flash memory blocks: Based on the size of the cold data in the high-wear flash memory block, calculate the first migration cost to migrate the cold data from the high-wear flash memory block to the low-wear flash memory block; and / or Based on the magnitude of the first hot data in the high-wear flash memory block where the heat value drops below the dynamic heat threshold, calculate the second migration cost of migrating the first hot data to the low-wear flash memory block; Based on the first migration cost and / or the second migration cost, a wear leveling migration plan is formulated.

[0032] In the data retention migration plan: Data from the second flash memory block whose data retention coefficient is insufficient to meet data retention requirements will be migrated to a flash memory block whose data retention coefficient is higher than the average data retention coefficient of all flash memory blocks in the solid-state storage device.

[0033] After developing a data migration plan, it can be optimized and adjusted using at least one of the following methods: Prioritize the migration of all data to be migrated in all data migration plans: Set the cold data in the second flash memory block as the first priority data; and / or Set the heat data in the first flash memory block and / or the second flash memory block whose heat value drops below the dynamic heat threshold as the second priority data; and / or Set the hot data in the first flash memory block as the third priority data.

[0034] For example, the data migration plan can also be optimized and adjusted in the following way, and then executed after the optimization and adjustment are completed: For any one of the first and / or second flash blocks in a solid-state storage device: Based on the migration priority of the data to be migrated in the flash memory block, determine the size of the data to be migrated in the flash memory block and the number of erase / write cycles required to migrate the data to be migrated, and calculate the migration cost of migrating the data to be migrated in the flash memory block; If the migration cost exceeds the maximum migration cost that the solid-state storage device can bear, then according to the migration priority, the data to be migrated that is ranked lower will be removed from the data set to be migrated.

[0035] In this embodiment, by performing a separation operation on the data in the flash memory block before its data retention capability deteriorates, instead of migrating all the data, the total amount and frequency of data migration are reduced, thereby reducing the overall hardware erase and write overhead. In addition, by matching the data retention capability coefficient of the flash memory block with the data retention requirements and monitoring the number of erase and write cycles, flash memory blocks whose data retention capability may deteriorate can be detected in a timely manner, avoiding data loss due to flash memory block aging and charge leakage, thereby improving the storage performance and durability of the solid-state storage device and avoiding rapid degradation of storage performance.

[0036] For example, see Figure 2 As shown in the figure, this application provides a data management method including: S201: Construct a data set from all the data in the solid-state storage device.

[0037] Define each data d in sisblock i The attributes include: Data size s i (Unit: 16KB) Data access frequency f i (Number of visits per unit of time) Last access time t a,i (The interval between the most recent access time and the current time) Data write time t w,i (Time to write data to flash memory) Minimum retention time requirement (The shortest time to keep data from being lost).

[0038] S202: Construct all flash memory blocks in the solid-state storage device into a set B = {b1, b2, ..., b...} m} Each flash block bj may include at least one of the following attributes: (1) Block capacity c j (Unit: 16KB)c j The value can be fixed depending on the model of the flash memory device.

[0039] (2) Total number of erase / write cycles The cumulative number of erase / write cycles can be determined based on the P / E cycle count.

[0040] (3) Data retention coefficient r j : Characterizes the retention performance of flash memory blocks, r jThe larger the value, the longer the data remains in the flash memory block, and the data retention capability coefficient can be based on a degradation model established through pre-testing before shipment.

[0041] in, , and These are inherent parameters of solid-state storage devices. This indicates the factory characteristics of the solid-state storage device, which are negatively correlated with the data retention capability coefficient.

[0042] (4) Current number of free pages ( ) S203: Calculate the popularity value h based on data access characteristics in data attributes. i

[0043] Where α and β represent weighting coefficients, and , γ represents the time decay coefficient, which can be obtained according to the application scenario of the solid-state storage device, and its value range can be [0.01 / second, 0.1 / second]. max(f(D)) represents the maximum access frequency of the data set in the flash block. now Indicates the current time. This indicates the interval between the most recent access time and the current time.

[0044] In S203, data access frequency is used as the preferred data access characteristic.

[0045] S204: Set a dynamic thermal threshold h in solid-state storage devices th Dynamic heat threshold h th It can be obtained, but is not limited to, through the following methods:

[0046] Among them, h i b represents the current popularity value of the data. j B represents the j-th flash memory block. h p represents a set of flash memory blocks. j c represents the current number of free pages in the j-th flash memory block. j This represents the block capacity of the j-th flash memory block.

[0047] Dynamic heat threshold h th The total idle capacity of the hot block is dynamically adjusted, among which, satisfying the following conditions: B hFor a set of hot blocks, the total data size of the hot data segments is no greater than B times the total capacity of the set of hot data blocks. h This is a collection of hot blocks.

[0048] like Then h i Data d corresponding to the popularity value i Divided into thermal data set D h , like Then h i Data corresponding to popularity value d i Divided into cold data set D c ; When the idle capacity of the hot block is less than 10% of the total capacity of the hot block (Right now This triggers an emergency migration mechanism, prioritizing the migration of the 10% of hot data with the lowest activity levels. To cold block area B c .

[0049] S205: Data retention capability coefficient based on flash memory blocks r j Based on performance characteristics, the hot block set B is divided into groups. h With cold block set B c .

[0050] Hot block set B h Select Furthermore, flash memory blocks with fast erase and write speeds (such as SLC, Single-Level Cell) have r th The retention threshold (to meet the short-term retention requirements of hot data, r) th (30 days) cold block set B c Select Furthermore, blocks with slower write / erase speeds (such as TLC, Triple-Level Cell, Three-Level Cell / QLC, Quad-Level Cell, and Four-Level Cell) are used to store cold data; S206: Allocate flash memory blocks to the hot data and cold data according to the data retention capability coefficient and data retention requirements of each flash memory block.

[0051] Among them, the hot data distribute The allocation strategy for flash memory blocks is as follows: prioritize the erase / write factor. Smaller flash memory blocks to balance wear and tear, and meet [the requirements]. That is, select flash memory blocks with a low number of erase / write cycles and a data retention coefficient that meets the basic data retention requirements as hot blocks for storing hot data; For cold data distribute The allocation strategy for flash memory blocks is: prioritizing the number of erase / write cycles. Smaller and Larger flash memory blocks are used to meet high data retention and wear leveling requirements, thus enabling long-term retention of cold data.

[0052] S207: Periodically obtain data popularity values, dynamic popularity thresholds, and block attributes.

[0053] The period of S207 can be used as follows: This indicates that its value range can be between 1 and 10 minutes.

[0054] S208: Periodically determine whether the difference in the number of erase / write cycles of the flash memory blocks exceeds the wear threshold. If so, execute S209.

[0055] S209: Develop a data migration plan, calculate migration costs, and adjust the data migration plan.

[0056] The data migration plan may include a wear leveling migration plan and / or a data retention migration plan.

[0057] For each flash memory block in a solid-state storage device: The size of the data to be migrated and the number of erase / write operations required to migrate the data to be migrated are determined according to the migration priority of the data in the flash memory block, and the migration cost of the data to be migrated in the flash memory block is calculated. If the migration cost of any flash memory block exceeds the maximum migration cost that the solid-state storage device can bear, then the data to be migrated that is ranked lower will be removed from the data set to be migrated according to the migration priority.

[0058] See Figure 3 As shown, the data management method may include: S301: Initialize the acquired data attributes and block attributes; S302: Calculate Data Popularity h i Divide the hot data D h and cold data D c S303: Allocate flash memory blocks for hot and cold data based on block attributes; S304: Periodically update data attributes and block attributes; S305: Detect whether the difference in the number of erase and write cycles of the flash memory blocks exceeds the wear threshold; if so, proceed with S306. If not, proceed with S307; S306: Wear leveling migration plan; S307: Determine the data retention capability coefficient r of the flash memory block j Does the data retention requirement meet the requirements? If yes, proceed with S308; otherwise, proceed with S309. S308: Data retention migration plan.

[0059] S309: Calculate the migration cost. If the migration cost exceeds the migration cost threshold, adjust the data migration priority and return to S304. In the next cycle, revise the migration plan. Repeat the process of periodically updating attributes until the device stops operating.

[0060] For example, the migration cost described above can be calculated using the following migration cost function:

[0061] Where M represents the data to be migrated d i Set, s i For the data to be migrated d i Size, e j The number of erase / write operations consumed during the migration of the data to be migrated, ensuring the accuracy of each migration. C max C represents the maximum migration cost that a solid-state storage device can tolerate. max It can be configured according to performance requirements.

[0062] In the above embodiments, after the wear leveling migration plan and data retention migration plan are triggered, the migration cost can be calculated by another module. In S5, the migration priority is adjusted according to the migration cost. When the migration is executed in the future, the source block and target block to be migrated are determined according to the migration priority, thereby avoiding the situation where the migration cannot be completed.

[0063] An optional embodiment of this application provides a solid-state storage device, which includes a flash memory controller and a NAND Flash memory array, wherein the NAND Flash memory array includes multiple flash memory blocks.

[0064] Among them, see Figure 4 As shown, the flash memory controller includes, but is not limited to, the following functional modules: (1) Attribute quantization module: used to quantify data attributes and block attributes. The collection of data attributes can include: data access characteristics and data retention requirements.

[0065] Data access characteristics can include: data access frequency and recent access time, and data write time. Data retention requirements can be the minimum retention time required for data in flash memory blocks.

[0066] Data attributes can be stored in the sisblock of the data block.

[0067] Block attribute collection includes: The cumulative number of erase / write cycles of the flash memory block, the data retention capability coefficient of the flash memory block, and the number of free pages.

[0068] (2) Hot and cold classification module: used for heat calculation and threshold adaptation. Heat calculation can include: The popularity score of data access is calculated based on data access characteristics such as data access frequency, recent access time, and data write time.

[0069] Threshold adaptation can include: adjusting the dynamic heat threshold based on the heat value.

[0070] (3) Block management module, which can be used for block classification and block allocation. Block classification: Flash memory blocks can be divided into hot block sets and cold block sets based on the data retention capability coefficient; Block allocation: Flash blocks can be allocated to both cold and hot data, with priority given to low-wear and highly adaptable flash blocks for data allocation.

[0071] (4) Dynamic adjustment module: can be used for status detection, migration scheduling and migration execution. The status detection includes: periodically updating block attributes and data attributes, detecting wear differences in flash memory blocks, and data retention capabilities; Migration scheduling includes: planning for triggering wear leveling migration and data persistence migration, and generating migration plans; The migration execution includes: performing data migration according to the migration plan and updating the block mapping table.

[0072] (5) Cost control module: can be used for cost calculation and priority ranking. Cost calculation includes: calculating migration costs to ensure that the migration costs do not exceed the maximum migration costs that the solid-state storage device can afford; Prioritization includes ranking the data migration priority based on the popularity value of the data to be migrated and the wear status of the flash memory blocks. (6) Mapping table management module, used to maintain the mapping relationship between data and flash memory blocks and dynamically adjust and update addresses.

[0073] Based on the same inventive concept, embodiments of this application also provide a flash memory controller and a plurality of flash memory blocks; The flash memory controller executes the computer-readable instructions to implement the above-described data management method.

[0074] The flash memory controller provided in this application embodiment executes the computer-readable instructions to achieve the following: Based on the dynamic heat threshold of the data, a separation operation is performed on the data in the flash memory block to obtain hot data and cold data; For a first flash memory block whose erase / write cycle difference value exceeds the wear threshold and / or a second flash memory block whose data retention capability coefficient does not meet the data retention requirements, the migration cost of migrating the data to be migrated from the first flash memory block and / or the second flash memory block is calculated based on the data retention requirements and the data retention capability coefficient, taking into account the hot data and / or cold data distribution of any flash memory block. The erase / write cycle difference value represents the difference between the current erase / write cycle and the average erase / write cycle of all flash memory blocks in the solid-state storage device. Based on the migration costs mentioned above, a data migration plan is developed.

[0075] Optionally, the migration cost of migrating the data to be migrated is calculated based on the data retention requirements and the data retention capability coefficient, including: For any given flash memory block, based on the retention time in the data retention requirement, the number of erase / write cycles of the flash memory block, and the size of the data to be migrated on the flash memory block, the migration cost for migrating the data to be migrated on the flash memory block is determined. The migration cost shall not exceed the maximum migration cost of the solid-state storage device where the flash memory block is located.

[0076] Optionally, the process of developing a data migration plan based on the migration cost includes: The first flash memory block is used as the target high-wear flash memory block for the data to be migrated. For the target high-wear flash memory block, a wear leveling migration plan is formulated based on the data size of the data to be migrated in the low-wear flash memory block.

[0077] Optionally, based on the data size of the data to be migrated in the high-wear flash memory block, a wear leveling migration plan is formulated, including: Calculate the first migration cost of migrating cold data from the low-wear flash memory block to the high-wear flash memory block; and / or Based on the magnitude of the first hot data in the high-wear flash memory block where the heat value drops below the dynamic heat threshold, calculate the second migration cost of migrating the first hot data to the low-wear flash memory block; Based on the first migration cost and / or the second migration cost, a wear leveling migration plan is formulated.

[0078] Optionally, the process of developing a data migration plan includes: For the second flash memory block, a data retention migration plan is developed, wherein the data retention migration plan includes: The data from the second flash block is migrated to a flash block whose data retention coefficient is higher than the average data retention coefficient of all flash blocks in the solid-state storage device.

[0079] Optionally, before executing the data migration plan, prioritize all data to be migrated in all data migration plans according to at least one of the following methods: Set the cold data in the second flash memory block as the first priority data; and / or Set the heat data in the first flash memory block and / or the second flash memory block whose heat value drops below the dynamic heat threshold as the second priority data; and / or Set the hot data in the first flash memory block as the third priority data.

[0080] Optionally, before performing a separation operation on the data in the flash memory block based on a dynamic heat threshold of the data, the method further includes: The heat value of the data is determined based on the data access characteristics of the data and the time decay coefficient of the solid-state storage device. If the current idle capacity of the hot block is less than the idle capacity threshold of the hot block, the dynamic heat threshold is reduced according to the proportion of the current idle capacity of the hot block.

[0081] Optionally, the dynamic heat threshold is reduced according to the proportion of the current hot block's idle capacity, including: The dynamic heat threshold h is calculated using the following formula. th :

[0082] Among them, h i b represents the current popularity value of the data. j B represents the j-th flash memory block. h p represents a set of flash memory blocks. j c represents the current number of free pages in the j-th flash memory block. j This represents the block capacity of the j-th flash memory block; This indicates the percentage of the current hot block idle capacity in the total current hot block capacity.

[0083] Optionally, the process of developing a data migration plan based on the migration cost includes: For any one of the first and / or second flash blocks in a solid-state storage device: Based on the migration priority of the data to be migrated in the flash memory block, determine the size of the data to be migrated in the flash memory block and the number of erase / write cycles required to migrate the data to be migrated, and calculate the migration cost of migrating the data to be migrated in the flash memory block; If the migration cost exceeds the maximum migration cost that the solid-state storage device can bear, then according to the migration priority, the data to be migrated that is ranked lower will be removed from the data set to be migrated.

[0084] In this embodiment, by performing a separation operation on the data in the flash memory block before its data retention capability deteriorates, instead of migrating all the data, the total amount and frequency of data migration are reduced, thereby reducing the overall hardware erase and write overhead. In addition, by matching the data retention capability coefficient of the flash memory block with the data retention requirements and monitoring the number of erase and write cycles, flash memory blocks whose data retention capability may deteriorate can be detected in a timely manner, avoiding data loss due to flash memory block aging and charge leakage, thereby improving the storage performance and durability of the solid-state storage device and avoiding rapid degradation of storage performance.

[0085] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0086] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0087] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. The above descriptions are merely preferred embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A data management method, characterized in that, The method includes: Based on the dynamic heat threshold of the data, a separation operation is performed on the data in the flash memory block to obtain hot data and cold data; For the first flash memory block whose erase / write count difference exceeds the wear threshold and / or the second flash memory block whose data retention capability coefficient does not meet the data retention requirements, the migration cost of migrating the data to be migrated is calculated based on the data retention requirements and the data retention capability coefficient, taking into account the hot data and / or cold data distribution of any flash memory block. The erase / write count difference represents the difference between the current erase / write count and the average erase / write count of all flash memory blocks in the solid-state storage device. Based on the migration costs mentioned above, a data migration plan is developed.

2. The method as described in claim 1, characterized in that, The migration cost of migrating the data to be migrated is calculated based on the data retention requirements and the data retention capability coefficient, including: For any given flash memory block, based on the retention time in the data retention requirement, the number of erase / write cycles of the flash memory block, and the size of the data to be migrated on the flash memory block, the migration cost for migrating the data to be migrated on the flash memory block is determined. The migration cost shall not exceed the maximum migration cost of the solid-state storage device where the flash memory block is located.

3. The method as described in claim 1, characterized in that, The process of developing a data migration plan, taking into account the migration costs, includes: The first flash memory block is used as the target high-wear flash memory block for the data to be migrated. For the target high-wear flash memory block, a wear leveling migration plan is formulated based on the data size of the data to be migrated in the low-wear flash memory block.

4. The method as described in claim 3, characterized in that, Based on the data size of the data to be migrated in the high-wear flash memory block, a wear leveling migration plan is formulated, including: Calculate the first migration cost of migrating cold data from the low-wear flash memory block to the high-wear flash memory block; and / or Based on the magnitude of the first hot data in the high-wear flash memory block where the heat value drops below the dynamic heat threshold, calculate the second migration cost of migrating the first hot data to the low-wear flash memory block; Based on the first migration cost and / or the second migration cost, a wear leveling migration plan is formulated.

5. The method as described in claim 1, characterized in that, The process of developing a data migration plan includes: For the second flash memory block, a data retention migration plan is developed, wherein the data retention migration plan includes: The data from the second flash block is migrated to a flash block whose data retention coefficient is higher than the average data retention coefficient of all flash blocks in the solid-state storage device.

6. The method according to any one of claims 3-5, characterized in that, Before executing the data migration plan, prioritize all data to be migrated according to at least one of the following methods: Set the cold data in the second flash memory block as the first priority data; and / or Set the heat data in the first flash memory block and / or the second flash memory block whose heat value drops below the dynamic heat threshold as the second priority data; and / or Set the hot data in the first flash memory block as the third priority data.

7. The method as described in claim 1, characterized in that, Before performing a data separation operation on the data in the flash memory block based on a dynamic heat threshold of the data, the method further includes: The heat value of the data is determined based on the data access characteristics of the data and the time decay coefficient of the solid-state storage device. If the current idle capacity of the hot block is less than the idle capacity threshold of the hot block, the dynamic heat threshold is reduced according to the proportion of the current idle capacity of the hot block.

8. The method as described in claim 7, characterized in that, Based on the current percentage of idle capacity of the hot block, the dynamic heat threshold is reduced, including: The dynamic heat threshold h is calculated using the following formula. th : Among them, h i b represents the current popularity value of the data. j B represents the j-th flash memory block. h p represents a set of flash memory blocks. j c represents the current number of free pages in the j-th flash memory block. j This represents the block capacity of the j-th flash memory block; This indicates the percentage of the current hot block idle capacity in the total current hot block capacity.

9. The method as described in claim 6, characterized in that, The process of developing a data migration plan, taking into account the migration costs, includes: For any one of the first and / or second flash blocks in a solid-state storage device: Based on the migration priority of the data to be migrated in the flash memory block, determine the size of the data to be migrated in the flash memory block and the number of erase / write cycles required to migrate the data to be migrated, and calculate the migration cost of migrating the data to be migrated in the flash memory block; If the migration cost exceeds the maximum migration cost that the solid-state storage device can bear, then according to the migration priority, the data to be migrated that is ranked lower will be removed from the data set to be migrated.

10. A solid-state storage device, characterized in that, include: Flash controller and multiple flash blocks; The flash memory controller executes the computer-readable instructions to implement the method as described in any one of claims 1-5 and 7-8.