Method, electronic device and computer readable storage device for managing stored data

CN116932426BActive Publication Date: 2026-10-23ZHONGSHAN JIANGBOLONG ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210364105.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-07
Publication Date
2026-10-23
Estimated Expiration
2042-04-07

AI Technical Summary

Benefits of technology

[0007]本申请的有益效果是:区别于现有技术的情况,本申请通过划分存储装置中存储的数据,得到多个存储数据单元并赋予每个存储单元表示其唯一性的数据特征值。对数据特征值相同的数据单元,仅保留一个物理地址,并让这些数据特征值相同的数据单元的多个逻辑地址都指向该物理地址,对于多个逻辑地址指向的其他物理地址进行释放,使得存储装置能够获得更多的存储空间用于存储其它数据,提高了产品的使用寿命。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116932426B_ABST
    Figure CN116932426B_ABST
Patent Text Reader

Abstract

The application discloses a management method of stored data. The application is applied to a storage device. The method comprises the following steps: determining a plurality of data units based on the data stored by the storage device; determining a data characteristic value corresponding to each data unit, the data characteristic value being used for identifying the uniqueness of the data content; remapping the logical addresses of at least part of the data units with the same data characteristic value to the same physical address, and releasing the storage space of at least part of the data units for other physical addresses. The application also discloses a storage device and a computer readable storage device. In the foregoing manner, the service life of the storage device can be prolonged under the condition of limited erasing and writing times.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data storage, and in particular to a method for managing stored data, an electronic device, and a computer-readable storage device. Background Technology

[0002] For NAND flash memory applications, the storage lifespan is closely related to the number of write / erase cycles. While NAND technology has advanced from 2D to 3D, the number of write / erase cycles has not significantly changed; in fact, QCL flash memory has fewer write / erase cycles compared to TCL flash memory. Given this limited number of write / erase cycles, how to improve product lifespan has become a critical technical problem that needs to be solved by those skilled in the art. Summary of the Invention

[0003] The main objective of this application is to provide a method for managing stored data, an electronic device, and a computer-readable storage device that can solve the technical problem of improving the lifespan of NAND products with a limited number of erase and write cycles.

[0004] To address the aforementioned technical problems, the first technical solution adopted in this application is: providing a method for managing stored data. This method is applied to a storage device. The method includes: determining multiple data units based on the data stored in the storage device; determining a data characteristic value corresponding to each data unit, the data characteristic value being used to identify the uniqueness of the data content; remapping the logical addresses of at least a portion of the data units with the same data characteristic value to point to the same physical address, and releasing the storage space of at least a portion of the data units for other physical addresses.

[0005] To address the aforementioned technical problems, the second technical solution adopted in this application is to provide a storage device. This storage device includes a memory and a processor. The memory stores program data, and the processor performs calculations and mapping management of the data's feature values ​​to implement the method described in the first technical solution.

[0006] To address the aforementioned technical problems, the third technical solution adopted in this application is to provide a computer-readable storage device. This computer-readable storage device stores program data and can be executed by a processor to implement the method described in the first technical solution.

[0007] The beneficial effects of this application are as follows: Unlike existing technologies, this application divides the data stored in the storage device into multiple storage data units and assigns each storage unit a unique data characteristic value. For data units with the same data characteristic value, only one physical address is reserved, and multiple logical addresses of these data units with the same data characteristic value all point to that physical address. Other physical addresses pointed to by these multiple logical addresses are released, allowing the storage device to obtain more storage space for storing other data and improving the product's lifespan. Attached Figure Description

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

[0009] Figure 1 This is a flowchart illustrating the first embodiment of the data storage management method of this application;

[0010] Figure 2 This is a flowchart illustrating the second embodiment of the data storage management method of this application;

[0011] Figure 3 This is a schematic diagram of an embodiment of the rules for storing feature values ​​in a storage device;

[0012] Figure 4 This is a schematic diagram of an embodiment of the storage rules for the first mapping table;

[0013] Figure 5 This is a flowchart illustrating the third embodiment of the data storage management method of this application;

[0014] Figure 6 This is a flowchart illustrating the fourth embodiment of the data storage management method of this application;

[0015] Figure 7 This is a flowchart illustrating the fifth embodiment of the data storage management method of this application;

[0016] Figure 8 This is a flowchart illustrating the sixth embodiment of the data storage management method of this application;

[0017] Figure 9 This is a flowchart illustrating the seventh embodiment of the data storage management method of this application;

[0018] Figure 10 This is a flowchart illustrating the eighth embodiment of the data storage management method of this application;

[0019] Figure 11 This is a flowchart illustrating the ninth embodiment of the data storage management method of this application.

[0020] Figure 12 This is a schematic diagram of the structure of an embodiment of the storage device of this application;

[0021] Figure 13 This is a schematic diagram of the structure of an embodiment of the computer-readable storage device of this application. Detailed Implementation

[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0023] The terms "first," "second," etc., used in this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0024] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0025] Reference Figure 1 , Figure 1 This is a flowchart illustrating a first embodiment of the data management method of this application, which is applied to a storage device. The method includes the following steps:

[0026] S11: Based on the data stored in the storage device, determine multiple data units.

[0027] In the storage device, determine the data already stored. Divide the stored data into multiple data units. The size of these data units can be dynamically adjusted according to user usage.

[0028] S12: Determine the data feature value corresponding to each data unit.

[0029] For each data unit, a data feature value is calculated. This feature value calculation can be performed using the MD algorithm. The calculated data feature value is used to represent the uniqueness of the data content; that is, data units with different data content have different data feature values.

[0030] S13: Remap the logical addresses of at least a portion of the data units with the same data characteristic value to point to the same physical address, and release the mapping relationship of at least a portion of the data units to other physical addresses and the storage space of other physical addresses.

[0031] For the acquired data feature values, determine whether there are any identical data feature values. If so, it indicates that some data units in the stored data units have completely identical data content. Storing this identical data content at multiple addresses is a waste of storage resources for the storage device. Therefore, for storage units with identical data feature values, only one of the multiple physical addresses corresponding to them should be reserved, and the other corresponding physical storage spaces should be released to save storage resources for the storage device.

[0032] In one embodiment, the storage device divides the stored data, with each 64KB*N (storage device capacity / 256GB = N) data unit serving as a hash data cell. This size can be adjusted according to actual usage. The entire disk capacity is evenly divided and sorted according to the hash data cells (HDCs), with their sequence number being HDCN (Host Data Cell Number). After data division, the MD (Mean Disk Detection) feature value of each hash data cell is extracted, which guarantees the uniqueness of the data. The data feature value is stored in the storage device along with the data as redundancy information. The storage device analyzes and processes the data feature values. For data with the same MD feature value, its corresponding address management information is extracted, including the mapping relationship between logical addresses and physical addresses. The logical addresses of multiple hash data cells with the same MD feature value are adjusted to point to one of their corresponding physical addresses. For data in other physical addresses with the same MD feature value after the mapping relationship adjustment, they are marked as garbage, awaiting the GC (Garbage Collection) process to release their physical space, which can then be used for storing other data. When a logical address corresponding to the same physical address needs to be rewritten or erased, the corresponding address mapping information is modified. If erasing, the logical address information is deleted; if rewriting, the data needs to be recalculated and new address mapping information obtained.

[0033] In the above embodiments, this application divides the data stored in the storage device to obtain multiple storage data units and assigns each storage unit a unique data characteristic value. For data units with the same data characteristic value, only one physical address is reserved, and multiple logical addresses of these data units with the same data characteristic value all point to that physical address. Other physical addresses pointed to by multiple logical addresses are released, enabling the storage device to obtain more storage space for storing other data and improving the product's lifespan.

[0034] Reference Figure 2 , Figure 2 This is a flowchart illustrating a second embodiment of the data storage management method of this application. This method is a further extension of the first embodiment. The method includes the following steps:

[0035] S21: Determine the first mapping table.

[0036] A first mapping table is constructed, which stores data characteristic values ​​and their corresponding address mapping relationships. This first mapping table is used to manage the data units already stored in the storage device. The first mapping table stores the data characteristic values ​​of all stored data in the storage device.

[0037] S22: Determine whether the data feature values ​​are stored in the first mapping table.

[0038] For the data feature values ​​of multiple data units obtained, determine whether they have been stored in the first mapping table. If so, execute step S23.

[0039] S23: Update the address mapping relationship of the data feature value to point the logical address to the physical address corresponding to the data feature value in the first mapping table, and add the updated address mapping relationship to the first mapping table.

[0040] When it is determined that the data feature value of the data unit already exists in the first mapping table, the address mapping relationship of the data unit is updated, its logical address is redirected to the physical address corresponding to the data feature value stored in the first mapping table, and the logical address of the data unit is also added to the address mapping relationship of the data feature value.

[0041] The number of feature values ​​stored in the first mapping table depends on the size of the data unit. The maximum number of data units that can be divided into in the total capacity of the storage device is the maximum number of feature values ​​that can be stored.

[0042] like Figure 3 As shown, Figure 3This is a schematic diagram of an embodiment of a rule for storing feature values ​​in a storage device. In this flash memory array, data is stored in units of pages that make up storage blocks. The size of each page is the same as the size of the data unit it is divided into, and the data feature values ​​are written as redundant data corresponding to the write data with each write command.

[0043] like Figure 4 As shown, Figure 4 This is a schematic diagram of an embodiment of the storage rules for the first mapping table. Each extracted data unit's data feature value corresponds to a set of address mappings for all data feature values.

[0044] Reference Figure 5 , Figure 5 This is a flowchart illustrating a third embodiment of the data storage management method of this application. This method is a further extension of the above embodiments. The method includes the following steps:

[0045] S31: Get the data written by the write command.

[0046] Receive write commands sent by the host and obtain the data to be written.

[0047] S32: Divide the written data into at least one data unit and extract the data feature value of the data unit.

[0048] Based on the aforementioned rules for dividing data units, the data to be written is divided into units of the same size. After obtaining at least one data unit for the data to be written, its data characteristic value is calculated for subsequent addition of its corresponding address mapping information.

[0049] S33: Determine whether data feature values ​​are stored.

[0050] Determine whether the data feature value and its corresponding address mapping relationship are stored in the mapping table. If the data feature value exists, proceed to step S34.

[0051] S34: Point the logical address of the data unit to the physical address corresponding to the data characteristic value.

[0052] After determining that the data feature value and its corresponding address mapping relationship already exist in the mapping table, the logical address of the data to be written this time is directly mapped to the physical address pointing to the feature value, without having to write the data to a new physical address.

[0053] Reference Figure 6 , Figure 6 This is a flowchart illustrating a fourth embodiment of the data storage management method of this application. This method is a further extension of the third embodiment. The method includes the following steps:

[0054] S41: Determine the second mapping table.

[0055] The second mapping table stores data characteristic values ​​determined based on the historical data written, along with the address mapping relationships corresponding to those data characteristic values. The second mapping table is a mapping table that stores data characteristic values ​​and corresponding address mapping relationships based on the historical data written by the host.

[0056] S42: Determine whether the data feature values ​​are stored in the second mapping table.

[0057] Upon receiving the write command, the data to be written is retrieved, and it is determined whether the feature value of the data to be written exists in the second mapping table.

[0058] S43: Update the address mapping relationships in the second mapping table.

[0059] If the data characteristic value is not found in the second mapping table, it indicates that the same data as the data being written this time has not been written before, and the data to be written this time needs to be written to a new physical address. Simultaneously with writing the data to the new physical address, a new data characteristic value for this data and its corresponding address mapping relationship are added to the second mapping table, and this information is synchronized to the first mapping table. If the data characteristic value is found in the second mapping table, it indicates that the same data as the data being written this time has been written before, and there is no need to write the data to a new physical address. The logical address of the data being written this time is directly mapped to the physical address corresponding to the characteristic value in the second mapping table, the logical address of the data being written this time is added to the address mapping relationship of data characteristic values ​​in the second mapping table, and this information is synchronized to the first mapping table.

[0060] The storage rules for the second mapping table are the same as those for the first mapping table, except that the data feature values ​​in the second mapping table are determined solely by the data being written. The number of feature values ​​in the second mapping table is generally less than or equal to the number of feature values ​​in the first mapping table.

[0061] Reference Figure 7 , Figure 7 This is a flowchart illustrating a fifth embodiment of the data storage management method of this application. This method is a further extension of the above embodiments. The method includes the following steps:

[0062] S51: Determine whether the data written by the write command has reached the capacity of a data unit.

[0063] When acquiring and writing data, if the amount of data transmitted is too small to meet the data volume requirement of a data unit, step S52 is executed.

[0064] S52: Wait for subsequent data to be written until the capacity of a data unit is met before extracting data feature values.

[0065] After a period of time, or until the next write command, data that does not meet the capacity of a single data unit is grouped together with subsequent data and divided into data units. Data features are then extracted from the divided data units.

[0066] Reference Figure 8 , Figure 8 This is a flowchart illustrating a sixth embodiment of the data storage management method of this application. This method is a further extension of the above embodiments. The method includes the following steps:

[0067] S61: Obtain the logical address information read by the read command.

[0068] Upon receiving a read command, the logical address from which data needs to be read is obtained. The storage device then determines the corresponding physical address based on this logical address and reads the required data from that physical address.

[0069] S62: Determine whether logical address information is stored.

[0070] Determine whether the mapping table stores information related to the logical address. If the logical address exists in the address mapping relationship, proceed to step S63.

[0071] S63: Read the data from the physical address corresponding to the logical address to the host.

[0072] If the mapping table contains address mapping information related to the logical address, the corresponding physical address is determined based on this mapping information, and the stored data is retrieved and transmitted to the host. If it does not exist, it indicates that the logical address does not contain data and there is no corresponding physical address.

[0073] Reference Figure 9 , Figure 9 This is a flowchart illustrating a seventh embodiment of the data storage management method of this application. This method is a further extension of the sixth embodiment. The method includes the following steps:

[0074] S71: Determine the third mapping table.

[0075] The third mapping table is updated based on the first mapping table. The third mapping table stores the data characteristic values ​​of all stored data in the storage device and their corresponding address mapping relationships, which are used for address lookup when reading data.

[0076] S72: Determine whether the logical address is stored in the third mapping table.

[0077] The system checks whether the logical address contained in the read command is stored in the third mapping table. If it exists, it means that the data is stored. The corresponding physical address is determined based on the mapping relationship of the logical address, and the data information is read from the physical address. If it does not exist, it means that the logical address does not store program data, and there is no corresponding physical address for it.

[0078] The third mapping table is managed using a conventional binary tree structure. Newly arrived nodes are traversed starting from the root node, with smaller-numbered data units attached to their left and larger-numbered data units to their right, and so on, allowing the nodes to grow. This tree structure enables rapid data retrieval.

[0079] Reference Figure 10 , Figure 10 This is a flowchart illustrating the eighth embodiment of the data storage management method of this application. This method is a further extension of the above embodiments. The method includes the following steps:

[0080] S81: Determine whether a write command or read command exists within a preset time range.

[0081] To ensure the accuracy of the data in the first mapping table and the timeliness of command response, the first mapping table is only determined when the storage device is idle, thereby adjusting the address mapping relationship corresponding to the data and releasing the physical address. To determine whether the storage device is idle, a preset time range is used. When no read or write operations occur on the storage device within a certain time, it indicates that the storage device is idle, and step S82 is executed.

[0082] S82: The steps of determining the first mapping table and updating the address mapping relationship.

[0083] When the storage device is idle, the stored data is divided and the data feature values ​​are matched. The first mapping table is then determined, the address mapping relationship of the data units is adjusted, and redundant physical addresses are released.

[0084] like Figure 11 As shown, Figure 11 This is a flowchart illustrating the ninth embodiment of the data storage management method of this application. It includes the following steps:

[0085] S91: Determine whether a read or write command has been received within a preset time range.

[0086] If received, proceed to step S92. If not received, proceed to step S104.

[0087] S92: Determine the command type.

[0088] If it is a command other than a read / write command, proceed to step S93.

[0089] S93: Appropriate processing.

[0090] Perform the corresponding processing according to the given instructions.

[0091] If it is a write command, proceed to step S94.

[0092] S94: Extract the data feature values ​​of the written data.

[0093] If the data being written does not meet the capacity requirement of the data unit, it will wait for subsequent data to be written together until the capacity requirement is met before writing. The data characteristic value is obtained before writing.

[0094] S95: Determine whether the data feature value is stored in the second mapping table.

[0095] If it exists, proceed to step S96. If it does not exist, proceed to step S97.

[0096] S96: Add the logical address of the data to be written to the address mapping relationship of the data feature value.

[0097] S97: Add the data characteristic value of the written data and the corresponding address mapping relationship to the second mapping table.

[0098] After the second mapping table is updated, proceed to step S98.

[0099] S98: Synchronize the information in the second mapping table to the first mapping table.

[0100] While completing the update and synchronization, the information in the second mapping table will also be updated in the FTL management unit.

[0101] S99: Determine if the logical address exists in the third mapping table.

[0102] When a read command is detected, check if an address mapping relationship exists related to the logical address. If it exists, proceed to step S100. If it does not exist, proceed to step S101.

[0103] S100: Obtain the address mapping relationship corresponding to the logical address in the third mapping table.

[0104] After obtaining the address mapping relationship, determine the physical address corresponding to the logical address and read the data information from the physical address.

[0105] S101: Obtain address mapping information managed by FTL.

[0106] The third mapping table does not store any information related to this logical address, meaning that no data is stored at this logical address, and therefore it was not stored in the third mapping table, or the data between the mapping tables has not been updated. Information related to this logical address stored in the FTL management unit is then read.

[0107] S102: Based on the stored data, divide it into multiple data units.

[0108] When the storage device is idle, the data stored internally is divided.

[0109] S103: Determine the data characteristic value corresponding to the data unit.

[0110] S104: Determine whether the data feature value is stored in the first mapping table.

[0111] For each feature value, determine whether it is true or false. If it is true, proceed to step S105. If not, proceed to step S106.

[0112] S105: Add the logical address of the data to the address mapping relationship of the data feature value, and release its physical address.

[0113] When the existence of the feature value is determined, it indicates that the same data has already been stored in the physical address corresponding to the feature value in the first mapping table. Therefore, the logical address of the data is remapped to point to the physical address, and its own physical address is released to make room for the storage of other data.

[0114] S106: Add the data feature value and its corresponding address mapping relationship to the first mapping table.

[0115] When the feature value does not exist, it indicates that no other physical address stores the same data. The feature value of the data and the corresponding mapping relationship between logical address and physical address are stored in the first mapping table.

[0116] S107: Synchronize the information in the first mapping table to the second and third mapping tables.

[0117] Once the first mapping table is updated, the information in the other mapping tables is synchronized.

[0118] The relevant steps in this embodiment can be referred to in the above embodiments, and will not be repeated here.

[0119] Through the above embodiments, by dividing the data stored in the storage device, multiple storage data units are obtained, and each storage unit is assigned a unique data characteristic value. For data units with the same data characteristic value, only one physical address is reserved, and multiple logical addresses of these data units with the same data characteristic value all point to that physical address. Other physical addresses pointed to by multiple logical addresses are released, allowing the storage device to obtain more storage space for storing other data, thereby improving the product's lifespan. This application also proposes corresponding methods for executing write and read commands for the new mapping relationship.

[0120] like Figure 9 As shown, Figure 9 This is a schematic diagram of the structure of an embodiment of the storage device of this application.

[0121] The storage device includes a processor 110 and a memory 120.

[0122] Processor 110 controls the operation of the storage device. Processor 110 may also be referred to as a CPU (Central Processing Unit). Processor 110 may be an integrated circuit chip with signal sequence processing capabilities. Processor 110 may also be a general-purpose processor, digital signal sequence processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The general-purpose processor may be a microprocessor or any conventional processor. Processor 110 is used to perform calculations on the data in memory 120 and manage the address mapping relationship. It can calculate the data characteristic values ​​of the data and update the mapping relationship.

[0123] The memory 120 is used to store program data.

[0124] The processor 110 is used to execute instructions to implement the methods provided by any embodiment and possible combination of the storage data management methods described above in this application.

[0125] like Figure 10 As shown, Figure 10 This is a schematic diagram of the structure of an embodiment of the computer-readable storage device of this application.

[0126] One embodiment of the readable storage device of this application includes a memory 210 that stores program data, which, when executed, implements the method provided by any embodiment and possible combinations of the storage data management method of this application.

[0127] The memory 210 may include a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or other media that can store program instructions. Alternatively, it may be a server that stores the program instructions, which can send the stored program instructions to other devices for execution or execute the stored program instructions itself.

[0128] In summary, this application divides the data stored in the storage device into multiple storage data units and assigns each storage unit a unique data characteristic value. For data units with the same data characteristic value, only one physical address is reserved, and multiple logical addresses of these data units with the same data characteristic value all point to that physical address. Other physical addresses pointed to by these multiple logical addresses are released, allowing the storage device to obtain more storage space for storing other data and improving the product's lifespan.

[0129] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0130] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0131] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0132] If the integrated units in the other embodiments described above are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0133] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for managing stored data, applied to a storage device, characterized in that, The method includes: When a write command is received, the data to be written by the write command is divided into at least one data unit, the data feature value of the data unit is extracted, and the data feature value is used as redundant data and stored together with the data to be written by the write command in the storage device. Determine whether a write command or read command exists within a preset time range; If not, when the storage device is idle, multiple data units are determined based on the data stored in the storage device; Based on the stored redundant data, a data feature value corresponding to each data unit is determined, and the data feature value is used to represent the uniqueness of the data content; The logical addresses of at least a portion of the data units with the same data feature values ​​are remapped to point to the same physical address, and the mapping relationship of the at least a portion of the data units to other physical addresses and the storage space of the other physical addresses are released.

2. The method according to claim 1, characterized in that, The method further includes: A first mapping table is determined, which stores the data feature values ​​and their corresponding address mapping relationships. The step of remapping the logical addresses of at least a portion of the data units with the same data feature values ​​to point to the same physical address includes: Determine whether the data feature value is stored in the first mapping table; If so, update the address mapping relationship of the data feature value so that the logical address points to the physical address corresponding to the data feature value in the first mapping table, and add the updated address mapping relationship to the first mapping table.

3. The method according to claim 2, characterized in that, After the step of extracting the data feature values ​​of the data unit, the method further includes: Determine whether the data feature value is stored; If so, the logical address of the data unit is pointed to the physical address corresponding to the data feature value.

4. The method according to claim 3, characterized in that, The method further includes: A second mapping table is determined, which stores the data feature values ​​determined based on the written historical data and the address mapping relationship corresponding to the data feature values; The determination of whether the feature value is stored includes: Determine whether the data feature value is stored in the second mapping table; The address mapping relationships in the second mapping table are updated.

5. The method according to claim 1 or 3, characterized in that, Before the step of extracting the data feature values ​​of the data unit, the method further includes: Determine whether the data written by the write command has reached the capacity of one of the data units; If not, wait for subsequent data to be written until the capacity of one of the data units is met before extracting the data feature values.

6. The method according to claim 2, characterized in that, The method further includes: Obtain the logical address information read by the read command; Determine whether the logical address information is stored; If so, read the data from the physical address corresponding to the logical address to the host.

7. The method according to claim 6, characterized in that, The method further includes: A third mapping table is determined, and the third mapping table is updated based on the first mapping table; The determination of whether the logical address is stored includes: Determine whether the logical address is stored in the third mapping table.

8. A storage device, characterized in that, include: Memory, used to store program data; A processor for calculating and mapping the feature values ​​of data to implement the method as described in any one of claims 1-7.

9. A computer-readable storage device, characterized in that, It stores program data that can be executed by a processor to implement the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Writing, reading and garbage collection method of solid-state memory system

    CN103150258A

  • Offline deduplication for solid-state storage devices

    CN105468294A