Solid state disk mapping table deduplication method, deduplication device and solid state disk

By deduplication of the solid-state drive mapping table and setting the deduplication identification value for the elements with the most occurrences, the problem of excessive storage overhead of mapping tables in super-large-capacity solid-state drives is solved, and storage space optimization and hardware cost reduction are achieved.

CN120336210APending Publication Date: 2025-07-18HEFEI DATANG STORAGE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510510371.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

Traditional 4K mapping algorithms have excessive overhead for mapping tables in ultra-large capacity solid-state drives, resulting in an increase in DRAM storage space requirements, high hardware implementation costs and difficult to meet compactness and energy efficiency requirements.

Method used

By deduplication of the PPA table in the solid-state drive mapping table, set the deduplication identification value for the elements with the most occurrences, reduce the value of the same element, and optimize the mapping table size.

Benefits of technology

It effectively reduces the storage space requirements of mapping tables, reduces hardware costs, improves the compactness and energy efficiency of hardware design, and is suitable for ultra-large capacity solid-state drives.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336210A_ABST
    Figure CN120336210A_ABST
Patent Text Reader

Abstract

The invention discloses a solid state disk mapping table deduplication method and device and a solid state disk, and the method comprises the steps: for a PPA table meeting a preset condition, for at least one predetermined element in a PPA entry contained in the PPA table, obtaining a maximum occurrence number value corresponding to the element in the PPA table; wherein the maximum occurrence number value represents the value, with the maximum occurrence number, of the element in the PPA entry contained in the PPA table, and the occurrence number of the maximum occurrence number value in the PPA table is larger than 1; and according to a preset maximum occurrence number value corresponding to each element, carrying out duplicate removal processing on a value stored by the element in the PPA entry contained in the PPA table. According to the scheme, the value of the element corresponding to the maximum occurrence frequency value in the solid state disk mapping table can be subjected to duplicate removal, storage of the value of the element is reduced, and the size of the solid state disk mapping table is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to, but is not limited to, the field of storage technology, and particularly relates to a method and apparatus for deduplicating a solid-state drive (SSD) mapping table, and an SSD. Background Art

[0002] In the design of solid-state drives (SSDs), the 4K mapping algorithm is a key technology widely used to improve random write performance. This algorithm adjusts the management unit of the flash translation layer to 4KB data blocks, thereby reducing read / write amplification and optimizing random access latency. Since the management granularity of the 4K mapping algorithm aligns with the common 4K I / O operations of the host file system, this technology can significantly improve the performance of SSDs in random write scenarios, especially suitable for application environments with high I / O loads such as databases and virtualization.

[0003] However, with the continuous increase in the capacity of solid-state drives, especially the popularity of artificial intelligence (AI) training and inference scenarios in recent years, ultra-large-capacity SSDs (such as dozens of terabytes or even hundreds of terabytes) have gradually become the mainstream of market demand. In this context, the limitations of the traditional 4K mapping algorithm have become increasingly prominent: (1) Excessive storage overhead of the mapping table: The size of the mapping table required by the 4K mapping algorithm grows linearly with the SSD capacity, usually occupying about one-thousandth of the storage capacity (e.g., a 1TB SSD requires 1GB of DRAM to store the mapping table). For ultra-large-capacity SSDs (such as 100TB), the mapping table needs to occupy up to 100GB of DRAM, which poses huge challenges in terms of physical space layout, power consumption control, and cost. (2) Hardware implementation is not feasible: Ultra-large-capacity DRAM (such as dozens of gigabytes) not only significantly increases the manufacturing cost of SSDs but also complicates the PCB design, making it difficult to meet the requirements of actual products for compactness and energy efficiency.

[0004] In the prior art, although the 4K mapping algorithm performs well in small-capacity or consumer-grade SSDs, its linear growth characteristic of storage overhead makes it unable to meet the requirements of ultra-large-capacity SSDs in the AI era. Therefore, there is an urgent need for a solution to reduce the size of the DRAM storage space occupied by the SSD mapping table and solve a series of problems brought about by excessive storage overhead of the mapping table. Summary of the Invention

[0005] The following is an overview of the subject matter described in detail in this document. This overview is not intended to limit the scope of protection of the claims.

[0006] This application provides a method and apparatus for deduplicating an SSD mapping table, and an SSD, which can reduce the size of the DRAM storage space occupied by the SSD mapping table and solve a series of problems brought about by excessive storage overhead of the mapping table.

[0007] An embodiment of the present application provides a method for deduplicating a solid-state drive mapping table. The mapping table stores one or more PPA tables. Each PPA table contains one or more PPA entries. Each PPA entry contains one or more elements, and the elements are used to indicate the physical area for storing data. The method includes: For a PPA table that meets a preset condition, for at least one predetermined element in the PPA entries included in the PPA table, obtain the maximum occurrence count value corresponding to the element in the PPA table. Wherein, the maximum occurrence count value represents the value with the most occurrences of the element in the PPA entries included in the PPA table, and the number of times the maximum occurrence count value appears in the PPA table is greater than 1. Deduplicate the values stored for the element in the PPA entries included in the PPA table respectively according to the maximum occurrence count value corresponding to each predetermined element.

[0008] An embodiment of the present application further provides a device for deduplicating a solid-state drive mapping table, including: a memory and a processor. The memory is used to store a program for deduplicating the solid-state drive mapping table. The processor is used to read the program for deduplicating the solid-state drive mapping table and execute the method for deduplicating the solid-state drive mapping table as described in any embodiment of the present application.

[0009] An embodiment of the present application further provides a solid-state drive, and the mapping table of the solid-state drive is deduplicated by using the method for deduplicating the solid-state drive mapping table as described in any embodiment of the present application.

[0010] Compared with the related art, a method, a device, and a solid-state drive for deduplicating a solid-state drive mapping table provided by an embodiment of the present application. For a PPA table that meets a preset condition, for at least one predetermined element in the PPA entries included in the PPA table, obtain the maximum occurrence count value corresponding to the element in the PPA table. Then, the values stored for the element in the PPA entries included in the PPA table can be deduplicated respectively according to the maximum occurrence count value corresponding to each predetermined element. This solution can deduplicate the values of the elements corresponding to the maximum occurrence count value in the solid-state drive mapping table, reduce the storage of the values of the elements, and thus effectively reduce the size of the solid-state drive mapping table, thereby solving a series of problems caused by excessive storage overhead of the mapping table.

[0011] Other features and advantages of the present application will be described in the following specification, and in part will be obvious from the specification, or will be understood by implementing the present application. Other advantages of the present application can be realized and obtained through the solutions described in the specification and the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings are used to provide an understanding of the technical solutions of the present application, and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solutions of the present application, and do not constitute a limitation to the technical solutions of the present application.

[0013] Figure 1 It is a brief flowchart of the method for deduplicating the solid-state drive mapping table in the embodiment of the present application; Figure 2 It is a schematic structural diagram of the PPA entry in the solid-state drive mapping table in the embodiment of the present application; Figure 3 It is a schematic diagram of the solid-state drive mapping table in the embodiment of the present application; Figure 4 It is a schematic diagram of the solid-state drive mapping table showing the splitting of the PPA table in the embodiment of the present application; Figure 5 It is a schematic diagram of the device for deduplicating the solid-state drive mapping table in the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0014] The present application describes multiple embodiments, but the description is exemplary rather than restrictive, and it is obvious to those of ordinary skill in the art that there can be more embodiments and implementation solutions within the scope of the embodiments described in the present application. Although many possible feature combinations are shown in the accompanying drawings and discussed in the detailed description, many other combination ways of the disclosed features are also possible. Unless specifically restricted, any feature or element of any embodiment can be combined with any other feature or element in any other embodiment, or can replace any other feature or element in any other embodiment.

[0015] The present application includes and contemplates combinations with features and elements known to those of ordinary skill in the art. The embodiments, features, and elements disclosed in the present application can also be combined with any conventional features or elements to form unique invention solutions. Any feature or element of any embodiment can also be combined with features or elements from other invention solutions to form another unique invention solution. Therefore, it should be understood that any feature shown and / or discussed in the present application can be implemented alone or in any suitable combination. Therefore, except for the limitations made according to the appended claims and their equivalents, the embodiments are not subject to other limitations. In addition, various modifications and changes can be made within the scope of protection of the appended claims.

[0016] In addition, when describing representative embodiments, the specification may have presented the method and / or process as a particular sequence of steps. However, to the extent that the method or process does not depend on the particular order of the steps described herein, the method or process should not be limited to the particular order of steps described. As will be understood by those of ordinary skill in the art, other sequences of steps are possible. Accordingly, the particular order of steps set forth in the specification should not be construed as a limitation on the claims. In addition, the claims directed to the method and / or process should not be limited to performing their steps in the order written, as those skilled in the art can readily understand that these orders may vary and still remain within the spirit and scope of the embodiments of the present application.

[0017] The following are explanations of some identifiers mentioned in this application: LCA: Logical Cluster Address, the logical cluster address; PPA: Physical Page Address, the physical page address (the actual storage location of the flash memory); PPA table: Physical Page Address Table, the physical page address table; PPA entry: Physical Page Address Entry, the physical page address table entry.

[0018] The following is a brief introduction to some content related to this application: A solid-state drive is a new type of storage device. Compared with traditional mechanical hard drives, it has significant advantages such as large capacity, high reliability, fast read and write speeds, shock and drop resistance, low power consumption, and noiselessness. With these characteristics, solid-state drives have been widely used in the fields of consumer-grade PCs and enterprise-level servers.

[0019] A solid-state drive mainly consists of three core components: a solid-state drive controller, a flash memory array, and a DRAM cache; among them: (1) The solid-state drive controller is responsible for data management and transmission control. (2) The flash memory array is composed of multiple flash memory chips (NANDFlash Die), and its architecture has a high degree of parallelism: multiple Dies form multiple channels and multiple banks, and read and write operations can be executed concurrently between different channels and banks; each Die is composed of multiple blocks, each block is composed of multiple pages; the size of the physical area used to store user data in each page is 16KB. (3) The DRAM cache is mainly used to store the mapping table inside the solid-state drive and the temporary storage of read and write data.

[0020] When writing or reading data stored in a solid - state drive, the order is to first determine the channel and bank of the flash array, and then determine the block and page. When a system application writes data to a solid - state drive, it depends on the upper - layer application to access the data segment number LBA in the logical space of the solid - state drive. Inside the solid - state drive controller, the LBA is converted into LCA. In general application scenarios, the size of LBA is 512 Byte. According to different mapping methods inside the solid - state drive, the size of LCA is also different. If the 4K mapping method is adopted inside the solid - state drive, the size of LCA is 4096 Byte; if the 16K mapping method is adopted inside the solid - state drive, the size of LCA is 16384 Byte. When the 4K mapping method is used, the LCA0 data is the data set of LBA0 - LBA7; when the 16K mapping method is used, the LCA0 data is the data set of LBA0 - LBA 31 data set.

[0021] During the data access process, the solid - state drive controller needs to perform multi - level address conversion: first, convert the LBA accessed by the system application into LCA, and then map the LCA to the physical address PPA of the flash array (i.e., the channel, bank, block, and page where the data is stored). The mapping relationship between LCA and PPA constitutes the mapping table from the logical space data segment address of the solid - state drive to the physical address of the flash array. When the system reads data from the flash, it first converts the requested LBA into the corresponding LCA, then looks up the mapping table according to the LCA to get the PPA (i.e., the actual position where the data is stored in the flash storage array), reads the data from the flash array according to the PPA, and returns the data to the upper - layer application.

[0022] In the mapping table cached in the solid - state drive DRAM, the LCA corresponding to the first PPA entry is 0, the LCA corresponding to the second PPA entry is 1, and so on.

[0023] An embodiment of this application provides a method for deduplicating the mapping table of a solid - state drive. The mapping table stores one or more PPA tables. Each PPA table contains one or more PPA entries, and each PPA entry contains one or more elements; as Figure 1 shown, the method may include the following steps: Step S110: For a PPA table that meets the preset conditions, for at least one predetermined element in the PPA entries included in the PPA table, obtain the maximum occurrence count value corresponding to this type of element in the PPA table; wherein, the maximum occurrence count value represents the value with the most occurrences of this type of element in the PPA entries included in the PPA table, and the number of times the maximum occurrence count value appears in the PPA table is greater than 1. Step S120: Respectively, according to the maximum occurrence count value corresponding to each predetermined element, perform duplicate removal processing on the values stored for this type of element in the PPA entries included in the PPA table.

[0024] Exemplarily, the PPA table that meets the preset conditions may refer to that the number of updated PPA entries in the PPA table is greater than a preset maximum number threshold, or it may also refer to receiving a duplicate removal instruction for the PPA table issued by the user; currently, it may also be other preset conditions, and this application does not limit this.

[0025] Exemplarily, each of the predetermined elements refers to an element that needs to be de-duplicated and is set in advance; all types of elements included in the PPA entry can be set as predetermined elements according to actual needs, or any one or more elements included in the PPA entry can be set as predetermined elements.

[0026] In the SSD mapping table duplicate removal method of this embodiment, for a PPA table that meets the preset conditions, for at least one predetermined element in the PPA entries included in the PPA table, obtain the maximum occurrence count value corresponding to this type of element in the PPA table; then, respectively, according to the maximum occurrence count value corresponding to each predetermined element, perform duplicate removal processing on the values stored for this type of element in the PPA entries included in the PPA table. This solution can de-duplicate the values of the elements corresponding to the maximum occurrence count value in the SSD mapping table, reduce the storage of the element values, and thus effectively reduce the size of the SSD mapping table, thereby solving a series of problems caused by excessive storage overhead of the mapping table.

[0027] In an exemplary embodiment, the performing duplicate removal processing on the values stored for this type of element in the PPA entries included in the PPA table respectively according to the maximum occurrence count value corresponding to each predetermined element may include: For each predetermined element, perform the following processing respectively: According to the maximum occurrence count value corresponding to this type of element, respectively set the duplicate removal flag value for this type of element in the PPA entries included in the PPA table. Based on the duplicate removal identification value, perform duplicate removal on the values of this type of element in the PPA entries contained in the PPA table that are the same as the maximum occurrence times value.

[0028] The method for removing duplicates from the solid-state drive mapping table in this embodiment can set duplicate removal identification values for the elements in the PPA entries contained in the PPA table, and then can perform duplicate removal on the values of the elements according to the duplicate removal identification values corresponding to different elements, reducing the storage of the values of the elements, and thus effectively reducing the size of the solid-state drive mapping table.

[0029] In an example of this embodiment, the duplicate removal identification value may include a first identification value, a second identification value, or a third identification value; the setting of the duplicate removal identification value of this type of element in the PPA entries contained in the PPA table according to the maximum occurrence times value corresponding to this type of element may include: For this type of element, traverse the PPA entries stored in the PPA table, and sequentially compare the value of this type of element in the current PPA entry with the corresponding maximum occurrence times value; in the case where the comparison result is the same and it is the first time to be the same during the traversal process, set the duplicate removal identification value of this type of element in the current PPA entry to the third identification value; in the case where the comparison result is the same and it is not the first time to be the same during the traversal process, set the duplicate removal identification value of this type of element in the current PPA entry to the first identification value; in the case where the comparison result is different, set the duplicate removal identification value of this type of element in the current PPA entry to the second identification value.

[0030] It should be noted that the above example is only one situation for implementing the method for removing duplicates from the solid-state drive, and this application does not limit this. For example, it may also be: in the case where the comparison result is the same and it is the last time to be the same during the traversal process, set the duplicate removal identification value of this type of element in the current PPA entry to the third identification value; in the case where the comparison result is the same and it is not the last time to be the same during the traversal process, set the duplicate removal identification value of this type of element in the current PPA entry to the first identification value; in the case where the comparison result is different, set the duplicate removal identification value of this type of element in the current PPA entry to the second identification value. That is, as long as it can achieve setting the duplicate removal identification value of one type of element with the same comparison result to the third identification value and setting the duplicate removal identification values of other elements with the same comparison result to the first identification value.

[0031] The method for deduplicating the solid-state drive mapping table in this example traverses the PPA entries stored in the PPA table, and sequentially compares the value of this element in the current PPA entry with the corresponding maximum occurrence value. In this way, the deduplication flag values of the elements that do not need to be deduplicated can be set to the second flag value and the third flag value, and the deduplication flag value of the elements that need to be deduplicated can be set to the first flag value. Subsequently, based on the deduplication flag value, the values of the elements corresponding to the first flag value can be deleted, achieving deduplication of the values of the elements that are the same as the maximum occurrence value, reducing the storage of the values of the elements, and effectively reducing the size of the solid-state drive mapping table.

[0032] In an example of this embodiment, the deduplication flag value is the third flag value, which is used to identify that the corresponding PPA entry stores the maximum occurrence value of this element, so that when reading the value of this element with the deduplication flag value being the first flag value, the value of this element in the PPA entry can be returned.

[0033] The method for deduplicating the solid-state drive mapping table in this example explains why the deduplication flag values of the elements that do not need to be deduplicated are distinguished (set to the second flag value and the third flag value respectively). The reason is that since the values of the elements corresponding to the first flag value are deleted, these element values cannot be directly read from the solid-state drive during reading. Therefore, the values of the elements identified by the third flag value are used as the values of these elements (because the values of these elements are the same as the values of the elements corresponding to the third flag value, both are the maximum occurrence values). As for the elements corresponding to the third flag value, their values are stored in the solid-state drive and can be directly read. This solution shows that the method for deduplicating the solid-state drive mapping table of this application can ensure the normal reading of data and the accuracy of the solid-state drive while effectively reducing the size of the solid-state drive mapping table.

[0034] In an example of this embodiment, the deduplicating the values of the elements in the PPA entries contained in the PPA table that are the same as the maximum occurrence value according to the deduplication flag value may include: Determine the size of the space that can be saved after deduplicating the PPA table according to the deduplication flag values of the elements in the PPA entries contained in the PPA table; When the size of the space that can be saved after deduplicating the PPA table is greater than or equal to the preset memory saving threshold, delete the values of the elements with the deduplication flag value being the first flag value from the corresponding PPA entries; When the size of the space that can be saved after deduplicating the PPA table is less than the preset memory saving threshold, set the deduplication flag values of all elements in the PPA entries contained in the PPA table to the second flag value.

[0035] Exemplarily, determining the size of the space that can be saved after deduplication of the PPA table according to the deduplication identification value of the elements in the PPA entry contained in the PPA table may include: for each element of each PPA entry included in the PPA table, taking the sum of the storage spaces occupied by the values of the elements with the deduplication identification value being the first identifier as the size of the space that can be saved after deduplication of the PPA table.

[0036] The deduplication method of the solid-state drive mapping table in this example sets to trigger the deduplication of the mapping table only under specific conditions, which can not only ensure the deduplication of the mapping table and avoid the mapping table occupying too much storage space due to untimely deduplication, but also reduce the frequency of deduplication of the mapping table, avoid multiple erasures and writes to the solid-state drive, and improve the service life of the solid-state drive.

[0037] In an exemplary embodiment, each PPA table may correspond to an item update quantity value, and the item update quantity value is used to identify the number of updated PPA entries in the corresponding PPA table; the method may further include: When any PPA entry included in a PPA table is updated, adding 1 to the item update quantity value corresponding to the PPA table; After performing deduplication processing on the values of a certain element stored in the PPA entries contained in the PPA table according to the maximum occurrence times value corresponding to each element, initializing the item update quantity value corresponding to the PPA table to 0; Monitoring the item update quantity value of each PPA table, and when the item update quantity value of any PPA table is greater than a preset maximum quantity threshold, performing the solid-state drive mapping table deduplication method described in any embodiment of the present application.

[0038] The deduplication method of the solid-state drive mapping table in this embodiment corresponds to an item update quantity value for each PPA table, and when any PPA entry included in a PPA table is updated, adding 1 to the item update quantity value corresponding to the PPA table; in this way, the trigger of the deduplication judgment of the mapping table can be realized by monitoring the item update quantity value of each PPA table, and the deduplication judgment is performed only when the item update quantity value of any PPA table is greater than a preset maximum quantity threshold, which can not only trigger the deduplication judgment of the mapping table at an appropriate time and avoid the mapping table occupying too much storage space due to untimely deduplication, but also reduce the execution frequency of the deduplication judgment of the mapping table and improve the performance of the solid-state drive.

[0039] In an exemplary embodiment, each PPA table may correspond to a deduplication flag, and the deduplication flag may be set to 1 or 0. 1 indicates that deduplication has not been performed, and 0 indicates that deduplication has been performed. The method further includes: after performing deduplication processing on the values of a certain element stored in the PPA entries contained in the PPA table according to the maximum occurrence count value corresponding to each element, setting the deduplication flag corresponding to the PPA table to 0.

[0040] The method for deduplicating the solid-state drive mapping table in this embodiment sets a deduplication flag for each PPA table, so that it is possible to determine whether the PPA table has been deduplicated through the deduplication flag corresponding to the PPA table.

[0041] In an exemplary embodiment, as Figure 2 shown, the PPA entry may include one or more of the following elements: block, page, ce, channel, plane, and page_offset.

[0042] Exemplarily, the number of PPA entry bits occupied by each element varies according to the quantity and type of NAND FLASH on the actual board.

[0043] In summary, the method for deduplicating the solid-state drive mapping table in this embodiment can effectively reduce the size of the solid-state drive mapping table, especially applicable to solid-state drives with ultra-large capacities. The larger the capacity of the solid-state drive, the more mapping table storage space can be saved.

[0044] The following is a specific example of the method for deduplicating the solid-state drive mapping table in the embodiment of the present application: Before introducing the steps of this specific example, first introduce the solid-state drive mapping table of this example.

[0045] As Figure 3 and Figure 4 shown, the solid-state drive mapping table of this example may include N PPA entries, and every M PPA entries form a PPA table, where N and M are positive integers, and M < N. This means that the solid-state drive mapping table of this example includes N / M PPA tables.

[0046] The structure diagram of the PPA entry in the solid-state drive mapping table of this example can refer to Figure 2 and may include the following elements: block, page, ce, channel, plane, and page_offset.

[0047] For each PPA entry, a bitmap[5:0] is defined in the DRAM to indicate whether various elements in the current PPA entry are stored; among them, bitmap[5] represents the block, bitmap[4] represents the page, bitmap[3] represents the ce, bitmap[2] represents the channel, bitmap[1] represents the plane, and bitmap[0] represents the page_offset; the bitmap value of each element occupies 2 bits; if the bitmap value of a certain element is 0, it means that the value of this element is not stored; if the bitmap value of a certain element is 1, it means that the value of this element is stored on the DRAM; if the bitmap value of a certain element is 2, it means that the value of this element is stored on the DRAM, and the value of this element is the first element value stored after the deduplication operation of the PPA table where the PPA entry containing this element is located.

[0048] In this embodiment, the bitmap value of the element represents the deduplication identification value described above, 0 represents the first identification value described above, 1 represents the second identification value described above, and 2 represents the third identification value described above.

[0049] In this example, the deduplication method for the solid-state drive mapping table according to the embodiment of the present application may include the following steps S510-step S520: Step S510: When the host writes data, update the PPA entry corresponding to the written data and the item update quantity value corresponding to the PPA table where the PPA entry is located (add 1 to the item update quantity value).

[0050] Exemplarily, a count can be defined for each PPA table, and the count is used to represent the number of updated PPA entries in the PPA table (i.e., the item update quantity value). When the host writes data, the solid-state drive controller will allocate a PPA for each LCA, and the PPA entry at the corresponding position in the solid-state drive DRAM mapping table will be updated to the newly allocated PPA, and at the same time, the count defined in the PPA table where the current PPA entry is located will be updated (i.e., the count is incremented by 1).

[0051] Step S520: For each PPA table, monitor the item update quantity value corresponding to the PPA table in real time, and perform deduplication processing on the values stored in the elements of the PPA entries contained in the PPA table when the item update quantity value is greater than the preset maximum quantity threshold.

[0052] Exemplarily, the deduplication process for the values stored in the elements of the PPA entry in the PPA table may include the following steps S521 - S525: Step S521: For each type of element in the PPA entry contained in the PPA table, traverse the values of this type of element in the PPA entry contained in the PPA table, and count the number of times the same value appears; Exemplarily, for example, for the block element in the PPA entry contained in the PPA table, count the values of the block element in the PPA entry contained in the PPA table, and calculate the number of times the same numerical value appears; Exemplarily, the statistical results may be <val1, cnt1>, <val2, cnt2>, ……, <val x , cnt x 】, where val is the value of the block element, and cnt is the number of times the same value val of the block element appears in the PPA entry contained in the PPA table.

[0053] Step S522: Determine the maximum number of occurrences value of this type of element in the PPA table.

[0054] Exemplarily, still taking the values of the block element statistically in Step S521 as an example, compare cnt1, cnt2, ……, cnt x to find the maximum value cnt j , and the element value val j corresponding to this maximum value cnt j is the maximum number of occurrences value of this type of element.

[0055] Step S523: According to the maximum number of occurrences value corresponding to this type of element, set the deduplication flag value of this type of element in the PPA entry contained in the PPA table. The deduplication flag value can be 0, 1, or 2; 0 indicates that the value of this type of element is not stored, 1 indicates that the value of this type of element is stored on the DRAM, and 2 indicates that the value of this type of element is stored on the DRAM and can use the value of this type of element as the value of the element with the deduplication flag value of 1 after the PPA table where the PPA entry of this type of element is located undergoes the deduplication operation.

[0056] Exemplarily, still taking the values of the block element statistically in Step S521 and Step S522 as an example, compare the value of the block element in the PPA entry contained in the current PPA table with cnt j corresponding to val j ; when the comparison results are the same and it is with val jIn the case of the same first PPA entry, the bitmap[5] corresponding to this PPA entry is 2 (indicating that the value of the block element of this PPA entry needs to be stored on the DRAM); in the case where the comparison results are the same and not the same as val j In the case of the same first PPA entry, the bitmap[5] corresponding to this PPA entry is 0 (indicating that the value of the block element of this PPA entry does not need to be stored on the DRAM); in the case where the comparison results are different, the bitmap[5] corresponding to this PPA entry is 1 (indicating that the value of the block element of this PPA entry needs to be stored on the DRAM).

[0057] After steps S521 - S523 are completed, the bitmap[5:0] values of the PPA entries included in this PPA table are all updated.

[0058] Step S524: Determine the size of the space that can be saved after deduplication of this PPA table according to the deduplication identification values of the elements in the PPA entries included in this PPA table.

[0059] Exemplarily, it may include steps S5241 - S5242: Step S5241: Traverse the PPA entries in this PPA table, and calculate the size of the space that can be saved after deduplication for each PPA entry; exemplarily, for a certain PPA entry, traverse the 12 bits of the bitmap of this PPA entry (each element occupies 2 bits, and the 6 elements in a PPA entry occupy a total of 12 bits), and add up the number of bits occupied by the elements with bitmap being 0 in the structure of this PPA entry, then the size of the space that can be saved for a certain PPA entry can be obtained; Step S5242: Use the sum of the sizes of the spaces that can be saved for all the PPA entries in this PPA table as the size of the space that can be saved after deduplication of this PPA table, which can be represented by y.

[0060] Step S525: When the size of the space that can be saved after deduplication of the PPA table is greater than or equal to the preset memory saving threshold, determine the values of the elements in the PPA entries contained in the PPA table that are the same as the maximum occurrence times value and are not the first occurrence according to the deduplication identification value, and delete the values of such elements from the corresponding PPA entries; when the size of the space that can be saved after deduplication of the PPA table is less than the preset memory saving threshold, write 1 to the bitmap value of each PPA entry included in the PPA table and retain the values of all elements.

[0061] Exemplarily, the preset memory saving threshold can be M * 12; still taking the size of the space y that can be saved after deduplication of the PPA table obtained in step S524 as an example, if y >= M * 12, then perform deduplication and sorting, that is, according to the bitmap value of each PPA entry, delete the value of the element corresponding to the bitmap value of 0 from the PPA entry; if y < M * 12, then do not perform deduplication and sorting, and at the same time write 1 to the bitmap value of each PPA entry included in the PPA table and retain the values of all elements.

[0062] In summary, this embodiment can perform deduplication and sorting on the solid - state drive mapping table, and effectively reduce the size of the ultra - large - capacity solid - state drive mapping table without affecting performance.

[0063] An embodiment of the present application further provides a device for deduplicating a solid - state drive mapping table, as Figure 5 shown, including: a memory and a processor; The memory is used to save the program for deduplicating the solid - state drive mapping table; The processor is used to read the program for deduplicating the solid - state drive mapping table and execute the method for deduplicating the solid - state drive mapping table as described in any embodiment of the present application.

[0064] An embodiment of the present application further provides a solid - state drive, and the mapping table of the solid - state drive is deduplicated by using the method for deduplicating the solid - state drive mapping table as described in any embodiment of the present application.

[0065] In summary, a method and apparatus for deduplicating a mapping table of a solid-state drive, and a solid-state drive provided by this application divide the mapping table of an ultra-large-capacity solid-state drive into intervals (divided into PPA tables). Each interval segment (i.e., each PPA table) contains a certain number of PPA entries. Each PPA entry is composed of several types of elements, and each type of element occupies a certain number of bits. For the PPA entries within a certain interval segment, count the number of PPA entries with the same value for the same type of element, and take the value of the element with the highest number of PPA entries. When all the PPA entries within the current interval segment store this element, if the value is the same as the value of the element with the highest number of PPA entries, then the current PPA entry does not store the value of this element, so as to reduce the size of the mapping table.

[0066] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and apparatuses, can be implemented as software, firmware, hardware, and their appropriate combinations. In the hardware implementation, the division between the functional modules / units mentioned above does not necessarily correspond to the division of physical components. For example, a physical component can have multiple functions, or a function or step can be executed by several physical components in cooperation. Some or all components can be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term "computer storage medium" includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, a communication medium typically contains computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium.

[0067] In the description of this specification, the descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0068] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.

Claims

1. A method for deduplicating a solid-state drive mapping table, characterized in that, The mapping table stores one or more PPA tables, each of the PPA tables includes one or more PPA entries, and each of the PPA entries includes one or more elements, and the elements are used to indicate physical regions for storing data; the method includes: For a PPA table that meets a preset condition, for at least one predetermined element in the PPA entries included in the PPA table, obtain the maximum occurrence number value corresponding to this element in the PPA table; wherein, the maximum occurrence number value represents the value with the most occurrences of this element in the PPA entries included in the PPA table, and the number of times the maximum occurrence number value appears in the PPA table is greater than 1; Respectively, according to the maximum occurrence number value corresponding to each predetermined element, perform duplicate removal processing on the values of this element stored in the PPA entries included in the PPA table.

2. The method for deduplicating the solid state drive mapping table according to claim 1, wherein The step of respectively performing duplicate removal processing on the values of this element stored in the PPA entries included in the PPA table according to the maximum occurrence number value corresponding to each predetermined element includes: For each predetermined element, perform the following processing respectively: According to the maximum occurrence number value corresponding to this element, respectively set the duplicate removal flag value of this element in the PPA entries included in the PPA table; According to the duplicate removal flag value, perform duplicate removal processing on the values of this element that are the same as the maximum occurrence number value in the PPA entries included in the PPA table.

3. The method for deduplicating the solid-state drive mapping table according to claim 2, wherein, The duplicate removal flag value includes a first flag value, a second flag value or a third flag value; the step of respectively setting the duplicate removal flag value of this element in the PPA entries included in the PPA table according to the maximum occurrence number value corresponding to this element includes: For this element, traverse the PPA entries stored in the PPA table, and sequentially compare the value of this element in the current PPA entry with the corresponding maximum occurrence number value; In the case where the comparison result is the same and it is the first time to be the same during the traversal process, set the duplicate removal flag value of this element in the current PPA entry to the third flag value; In the case where the comparison result is the same and it is not the first time to be the same during the traversal process, set the duplicate removal flag value of this element in the current PPA entry to the first flag value; In the case where the comparison result is different, set the duplicate removal flag value of this element in the current PPA entry to the second flag value.

4. The SSD mapping table deduplication method according to claim 3, characterized in that, The step of performing duplicate removal processing on the values of this element that are the same as the maximum occurrence number value in the PPA entries included in the PPA table according to the duplicate removal flag value includes: According to the duplicate removal flag values of the elements in the PPA entries included in the PPA table, determine the size of the space that can be saved after duplicate removal of the PPA table; When the space size that can be saved after deduplication of the PPA table is greater than or equal to a preset memory saving threshold, the value of the element with the deduplication identification value being the first identification value is deleted from the corresponding PPA entry; When the space size that can be saved after deduplication of the PPA table is less than the preset memory saving threshold, the deduplication identification values of all elements in the PPA entries included in the PPA table are set to the second identification value.

5. The method for deduplicating the solid-state drive mapping table according to claim 4, wherein Determining the space size that can be saved after deduplication of the PPA table according to the deduplication identification values of the elements in the PPA entries included in the PPA table includes: For each type of element in each PPA entry included in the PPA table, the sum of the storage spaces occupied by the values of the elements with the deduplication identification value being the first identifier is used as the space size that can be saved after deduplication of the PPA table.

6. The method for deduplicating a solid-state drive mapping table according to claim 3, wherein The deduplication identification value being the third identification value is used to identify the maximum occurrence number value of this type of element stored in the corresponding PPA entry, so as to return the value of this type of element in the PPA entry when reading the value of this type of element with the deduplication identification value being the first identification value.

7. The method for deduplicating the solid-state drive mapping table according to claim 1, wherein, Each PPA table corresponds to an item update quantity value, and the item update quantity value is used to identify the number of updated PPA entries in the corresponding PPA table; the method further includes: When any PPA entry included in a PPA table is updated, the item update quantity value corresponding to the PPA table is incremented by 1; After deduplicating the values of this type of element stored in the PPA entries included in the PPA table according to the maximum occurrence number value corresponding to each type of element, the item update quantity value corresponding to the PPA table is initialized to 0; Monitor the item update quantity value of each PPA table, and when the item update quantity value of any PPA table is greater than a preset maximum quantity threshold, execute the solid state drive mapping table deduplication method as described in any one of claims 1 to 6.

8. The method for deduplicating the solid state drive mapping table according to claim 1, wherein The PPA entry includes one or more of the following elements: block, page, ce, channel, plane, and page_offset.

9. A solid-state drive mapping table deduplication device, comprising: A memory and a processor, characterized in that: The memory is used to store a program for solid state drive mapping table deduplication; The processor is used to read the program for solid state drive mapping table deduplication and execute the solid state drive mapping table deduplication method as described in any one of claims 1 to 8.

10. A solid state drive, characterized in that, The mapping table of the solid state drive is deduplicated by using the solid state drive mapping table deduplication method as described in any one of claims 1 to 8.