CN117891392A - Management method and system for compressed data of solid state disk - Google Patents

Management method and system for compressed data of solid state disk Download PDF

Info

Publication number
CN117891392A
CN117891392A CN202311754451.XA CN202311754451A CN117891392A CN 117891392 A CN117891392 A CN 117891392A CN 202311754451 A CN202311754451 A CN 202311754451A CN 117891392 A CN117891392 A CN 117891392A
Authority
CN
China
Prior art keywords
target
page
logic block
group
target logic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311754451.XA
Other languages
Chinese (zh)
Inventor
方浩俊
王飞
杨州
黄运新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Dapu Microelectronics Co Ltd
Original Assignee
Shenzhen Dapu Microelectronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Dapu Microelectronics Co Ltd filed Critical Shenzhen Dapu Microelectronics Co Ltd
Priority to CN202311754451.XA priority Critical patent/CN117891392A/en
Publication of CN117891392A publication Critical patent/CN117891392A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a method and a system for managing compressed data of a solid state disk, wherein when the solid state disk is subjected to data writing, a plurality of target logic blocks to be written are respectively compressed, and the compressed target logic blocks are combined into a target logic block group; acquiring page addresses and intra-page offsets corresponding to the target logic block groups, and determining the intra-group offsets of all target logic blocks in the target logic block groups according to the arrangement positions of all target logic blocks in the target logic block groups; updating the logic mapping address of each target logic block to the corresponding position of the target meta information corresponding to the target logic block group according to the intra-group offset of each target logic block; and writing the target logical block group and the target meta information into corresponding positions of corresponding flash memory pages respectively according to the page address and the intra-page offset, and updating an L2P table. By the technical scheme, DDR capacity does not need to be additionally increased.

Description

Management method and system for compressed data of solid state disk
Technical Field
The present invention relates to the field of computer software, and in particular, to a method and a system for managing compressed data of a solid state disk.
Background
As shown in fig. 1, a Solid State Disk (SSD) generally includes: master, flash (NAND Flash) array, dynamic random access memory (e.g., DDR or DRAM), connector. Managing an SSD internal system through a master control; user data and system data are stored through the flash memory array, and generally, a plurality of flash memory Channels (CH) are presented, and one Channel is independently connected to a group of flash memories, such as CH0, CH1, CHx in fig. 1, where the flash memories are characterized by requiring to be erased before being written, and the number of times of erasing is limited. The dynamic random access memory is used for storing an algorithm table; the connector is used for connecting a host (such as a PC or a server) and other peripheral units (such as peripherals, serial ports, sensors, power chips and the like).
The minimum programming unit of the flash memory is a flash memory Page (Page), as shown in fig. 2, a plurality of error correction units (Code Word) for protecting user data exist in one flash memory Page, and each error correction unit is composed of valid data and error correction check data, wherein the error correction check data is data generated by an error correction algorithm; the valid data is further divided into user data and meta information, wherein the meta information is used for firmware algorithm management and at least comprises a logical address, and the logical address corresponds to a logical block (user data).
The data address of a general host is defined as an LBA (Logic Block Address, logical block address), and the data distribution is managed by mapping management (i.e., L2P management) of the logical address to the physical address. Typically, a logical mapped address (LMA-Logic Mapping Address or LPA-Logic Page Address or other) is defined based on mapped data particles (e.g., 512B or 4 KB) with the physical page address (PMA-Physical Mapping Address or PPA-Physical Page Address) being the page address of the flash memory. As shown in FIG. 3, the granularity of data of the host is 512B, the granularity of mapping management data of the solid state disk is 4KB, and the size of a flash memory page is 16KB, then LBAs 0-7 are combined into logic block data with an address of LMA0, and 4 LMA 0-3 logic block data are combined into pages with an address of PMA 0. By performing mapping management through the L2P table, as shown in fig. 4, the page address W1 and the intra-page offset address W2' of the corresponding flash page can be found using the LMA as an index.
In addition, the meta-information contains LMAs (logical mapped addresses) that are used for L2P recovery (i.e., the LMAs of the stored data are found by the PMA, thereby recovering the L2P entries). As shown in fig. 5, a flash memory page stores a plurality of logic blocks, meta information and check data.
As shown in fig. 6, in the writing and reading process of the solid state disk, data distribution management is implemented by managing the L2P table. When writing data, writing a page address W1 and an intra-page offset address W2' of the logic block in the L2P table entry; when reading data, the page address W1 and the logical block offset address W2' within the page are obtained from the L2P table using the LMA as an index, thereby reading the logical block data.
The current page mapping technology is to map and manage flash memory pages according to 4K mapping particles, so that an L2P table occupies DDR main capacity in a solid state disk, the ratio of the DDR capacity requirement to the capacity of the solid state disk is 1:1000, for example, a 1TB solid state disk, and the DDR capacity is 1GB. However, with the application of the compression technology in the field of solid state hard drives, as a plurality of 4K logic block data are compressed into one error correction unit and then stored in a flash memory page, more logic block data are stored in the flash memory page.
As can be seen from the above, in the existing data distribution management, after using the compression technique, as the number of logical blocks in a flash memory page increases, the length occupied by the offset address of the page of the logical block in each table entry increases, referring to the offset address of the logical block in fig. 4, the offset (0/1/2/3) of the logical block in 4 pages can be managed by generally occupying 2 bits, when the number of logical blocks in a page increases to 64, 6 bits are needed to manage the offset (0-63), the length of each table entry increases by 4 bits, and if the offset address of the logical block increases, the DDR capacity requirement increases, for example, a 1TB disk increases by 1bit, that is, 1×1G/8=128 MB needs to be increased.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method and a system for managing compressed data of a solid state disk, aiming at the defect that the demand for DDR (double data rate) is increased after a compression technology in the prior art is introduced into the solid state disk.
The technical scheme adopted for solving the technical problems is as follows: the compressed data management method for constructing the solid state disk comprises the following steps of:
step S11, respectively compressing a plurality of target logic blocks to be written, and combining the compressed target logic blocks into a target logic block group;
step S12, obtaining page addresses and intra-page offsets corresponding to the target logic block groups, and determining the intra-group offsets of all target logic blocks in the target logic block groups according to the arrangement positions of all target logic blocks in the target logic block groups;
step S13, according to the intra-group offset of each target logic block, updating the logic mapping address of each target logic block to the corresponding position of the target meta-information corresponding to the target logic block group;
and step S14, respectively writing the target logical block group and the target meta information into corresponding positions of corresponding flash memory pages according to the page address and the intra-page offset, and updating an L2P table.
Preferably, the step S14 includes:
according to the page address and the intra-page offset, the target logical block group and the target meta information are combined and then written into corresponding positions of corresponding flash memory pages;
updating the page address and the intra-page offset to an L2P table.
Preferably, the step S14 includes:
determining the position of target meta information corresponding to the target logical block group in a meta information group according to the intra-page offset, and updating the target meta information to the corresponding position of the meta information group, wherein the meta information group comprises meta information respectively corresponding to each logical block group in the flash memory page;
writing the target logic block group into the corresponding position of the corresponding flash memory page according to the page address and the intra-page offset; and writing the target meta-information group into a specific position of a corresponding flash memory page according to the page address.
Preferably, the step of writing the target meta-information group to a specific location of a corresponding flash page includes:
and writing the target meta-information group into the head position of the corresponding flash memory page.
The invention also constructs a compressed data management method of the solid state disk, and when the solid state disk is subjected to data reading, the following steps are carried out:
step S21, according to the L2P table and the logic mapping address of the target logic block to be read, acquiring the page address, the intra-page offset and the target meta information corresponding to the target logic block group where the target logic block is located;
step S22, determining the offset of the target logic block in the target logic block group according to the logic mapping address and the target meta information;
and step S23, reading the target logic blocks of the target logic block group according to the intra-group offset.
Preferably, the step S21 includes:
according to the logic mapping addresses of the target logic blocks to be read, obtaining page addresses and intra-page offsets of a target logic block group where the target logic blocks are located by inquiring an L2P table, wherein the L2P table stores the logic mapping addresses of a plurality of logic blocks of a corresponding flash memory page and page addresses and intra-page offsets of the logic block group where the logic blocks mapped by all the logic mapping addresses are located;
and reading the target logical block group and target meta information of the corresponding flash memory page according to the acquired page address and the acquired intra-page offset.
Preferably, the step S21 includes:
according to the logic mapping address of the target logic block to be read, acquiring the page address of the target logic block group where the target logic block is located by inquiring an L2P table;
reading a corresponding flash memory page according to the page address, and extracting a meta-information group from a specific position of the flash memory page;
obtaining target meta information for storing the logical mapping address by analyzing the meta information group, obtaining the position of the target meta information in the meta information group, and obtaining the offset of the target logical block group in the flash memory page according to the determined position;
and reading the target logic block group according to the intra-page offset.
Preferably, the step of extracting the meta information group from a specific location of the flash page includes:
and extracting a meta-information group from the head position of the flash memory page.
The invention also constructs a compressed data management system of the solid state disk, which comprises a processor and a memory storing a computer program, wherein the processor realizes the steps of the compressed data management method of the solid state disk when executing the computer program.
The invention also constructs a compressed data management system of the solid state disk, which comprises a data distribution processing unit, a command operation controller and a data path unit, wherein,
the data path unit is used for respectively compressing a plurality of target logic blocks to be written when the data is written into the solid state disk, and combining the compressed plurality of target logic blocks into a target logic block group;
the data distribution processing unit is used for acquiring page addresses and intra-page offsets corresponding to the target logic block groups when the solid state disk is subjected to data writing, and determining the intra-group offsets of all the target logic blocks in the target logic block groups according to the arrangement positions of all the target logic blocks in the target logic block groups; when the solid state disk is subjected to data reading, acquiring a page address, an intra-page offset and target meta information corresponding to a target logic block group where the target logic block is located according to an L2P table and a logic mapping address of the target logic block to be read, and determining the intra-group offset of the target logic block in the target logic block group according to the logic mapping address and the target meta information;
the command operation controller is used for updating the logic mapping address of each target logic block to the corresponding position of the target meta information corresponding to the target logic block group according to the intra-group offset of each target logic block when the solid state disk is subjected to data writing, writing the target logic block group and the target meta information into the corresponding positions of the corresponding flash memory pages respectively according to the page address and the intra-page offset, and updating an L2P table; and when the solid state disk is subjected to data reading, reading the target logic block of the target logic block group according to the intra-group offset.
According to the technical scheme, one logic block group comprises a plurality of compressed logic blocks, and a corresponding relation between an arrangement rule of each logic mapping address (LMA value) in meta-information and an arrangement rule of each logic block in the logic block group is established, so that when data writing is carried out, the corresponding relation can be utilized to determine the arrangement position of each logic mapping address (LMA value) in the meta-information according to the arrangement position of each logic block in the logic block group; when data is read, the corresponding relation can be utilized to determine the arrangement position of the target logic block in the logic block group according to the arrangement position of the target logic mapping address (LMA value) in the meta-information. Therefore, in this data management method, even if the number of logical blocks in one flash page is increased due to compression of each logical block, the data occupation length in the L2P entry is not increased, and thus, the DDR capacity is not required to be additionally increased.
Drawings
In order to more clearly illustrate the embodiments of the present invention, the drawings that are required for the description of the embodiments will be briefly described below, it being apparent that the drawings in the following description are only some embodiments of the present invention and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art. In the accompanying drawings:
FIG. 1 is a logical block diagram of a solid state disk in the prior art;
FIG. 2 is a data structure diagram of a prior art flash page;
FIG. 3 is a diagram showing the relationship between the data granularity of the solid state disk mapping management data and the data granularity of the host and the flash memory page size;
FIG. 4 is a schematic diagram of a prior art L2P table indexed by logical mapped addresses;
FIG. 5 is a data structure diagram of a prior art flash page;
FIG. 6 is a schematic diagram of a method for managing compressed data of a solid state disk according to the prior art;
FIG. 7 is a diagram showing a data distribution of compressed logic blocks in a flash memory page according to an embodiment of the present invention;
FIG. 8 is a flowchart of writing data in a compressed data management method of a solid state disk according to a first embodiment of the present invention;
FIG. 9 is a flowchart of data reading in a compressed data management method of a solid state disk according to a first embodiment of the present invention;
FIG. 10 is a diagram of indexing an L2P table with logical mapping addresses according to a second embodiment of the present invention;
fig. 11 is a data structure diagram of meta information in a second embodiment of the present invention;
FIG. 12 is a flowchart of a method for managing compressed data of a solid state disk according to a second embodiment of the present invention;
FIG. 13 is a flowchart of writing data in a compressed data management method of a solid state disk according to a second embodiment of the present invention;
FIG. 14 is a flowchart of data reading in a compressed data management method of a solid state disk according to a second embodiment of the present invention;
FIG. 15 is a diagram of indexing an L2P table with logical mapped addresses according to a third embodiment of the present invention;
FIG. 16 is a data distribution diagram in a flash memory page in a third embodiment of the present invention;
FIG. 17 is a data structure diagram of a flash memory page in a third embodiment of the present invention;
fig. 18 is a data structure diagram of meta information in a third embodiment of the present invention;
FIG. 19 is a flowchart of writing data in a compressed data management method of a solid state disk according to a third embodiment of the present invention;
FIG. 20 is a flowchart of data reading in a compressed data management method of a solid state disk according to a third embodiment of the present invention;
FIG. 21 is a logic block diagram of a first embodiment of a compressed data management system (flash memory controller) for a solid state disk of the present invention;
FIG. 22 is a representation of the time overhead of a prior art flash read process;
FIG. 23 is a time overhead representation of a flash read process in a second embodiment of the present invention;
FIG. 24 is a time overhead representation of a flash read process in a third embodiment of the present invention;
FIG. 25 is a logic block diagram of a first embodiment of the data distribution processing unit of FIG. 21;
fig. 26 is a logic structure diagram of a solid state disk controller according to a first embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 8 is a flowchart of a first embodiment of a compressed data management method of a solid state disk according to the present invention, in which, when writing data to the solid state disk, the following steps are performed:
step S11, respectively compressing a plurality of target logic blocks to be written, and combining the compressed target logic blocks into a target logic block group;
step S12, obtaining page addresses and intra-page offsets corresponding to the target logic block groups, and determining the intra-group offsets of all target logic blocks in the target logic block groups according to the arrangement positions of all target logic blocks in the target logic block groups;
step S13, according to the intra-group offset of each target logic block, updating the logic mapping address of each target logic block to the corresponding position of the target meta-information corresponding to the target logic block group;
and step S14, respectively writing the target logical block group and the target meta information into corresponding positions of corresponding flash memory pages according to the page address and the intra-page offset, and updating an L2P table.
Fig. 9 is a flowchart of a second embodiment of a compressed data management method of a solid state disk according to the present invention, in which, when data is read from the solid state disk, the following steps are performed:
step S21, according to the L2P table and the logic mapping address of the target logic block to be read, acquiring the page address, the intra-page offset and the target meta information corresponding to the target logic block group where the target logic block is located;
step S22, determining the offset of the target logic block in the target logic block group according to the logic mapping address and the target meta information;
and step S23, reading the target logic blocks of the target logic block group according to the intra-group offset.
In the above embodiment, a logical block Group (Group) is introduced, that is, one logical block Group includes a plurality of compressed logical blocks, as shown in fig. 7, the logical blocks LMA0 to 2 are combined into one logical block Group, and the logical blocks LMAn-3 to LMAn are combined into one logical block Group. Moreover, a corresponding relation between the arrangement rule of each logic mapping address (LMA value) in the meta-information and the arrangement rule of each logic block in the logic block group is established, so that when data writing is carried out, the arrangement position of each logic mapping address (LMA value) in the meta-information can be determined according to the arrangement position of each logic block in the logic block group by utilizing the corresponding relation; when data is read, the corresponding relation can be utilized to determine the arrangement position of the target logic block in the logic block group according to the arrangement position of the target logic mapping address (LMA value) in the meta-information. Therefore, in this data management method, even if the number of logical blocks in one flash page increases due to compression of each logical block, it is not necessary to increase the data length in the L2P entry, and thus it is not necessary to additionally increase DDR capacity.
Specifically, the present application optimizes management of compressed data by the following method.
In one implementation, while introducing a logical block Group (Group), referring to fig. 10, several logical blocks within a page are divided into a plurality of logical block groups according to a certain rule, and a page address of a flash page and an offset address within a logical block Group (i.e., an offset within a page) are recorded in an L2P table entry. Thus, one flash page is still a set of 4 logical blocks, whose L2P table logical block set page requires the length of the offset address to remain unchanged. Moreover, in the process of searching the L2P table entry index, the address of the logic block group is found first instead of directly indexing to the address of the logic block.
In addition, the intra-group offset of the logic blocks in the logic block group is determined by using the LMA recorded in the meta-information, and the intra-group offset of the logic blocks mapped by the LMA can be reflected by setting the intra-group LMA arrangement rule of the meta-information, so that the intra-group offset address of the logic blocks mapped by the LMA can be obtained by searching the meta-information. Referring to fig. 11, it can be understood that the permutation number of the LMA1 in the meta information is used as the offset address of the logical block mapped by the LMA1 in the logical block group. So that the management data distribution and index lookup can be explicitly compressed.
Further, referring to fig. 12, in addition to the page address of the flash memory page, the Entry (Entry) of the L2P table records the intra-page offset address of the logical block group at the position where the intra-page offset address of the logical block is recorded, and if the mapping management granularity after compression is still 4KB, the intra-group index is performed only differently from the non-compressed management, and in this embodiment, the LMA in the meta information is used for further indexing, and the relationship between the LMA arrangement rule and the offset of the logical block mapped by the LMA arrangement rule is set.
In this implementation method, when writing data to the solid state disk, step S14 further includes: according to the page address and the intra-page offset, the target logical block group and the target meta information are combined and then written into corresponding positions of corresponding flash memory pages; updating the page address and the intra-page offset to an L2P table.
The following describes a procedure of writing data (refer only to corresponding related processing, not to details of writing data itself) with reference to fig. 13:
first step S101, the data path processing unit combines a plurality of logic blocks into a logic block group, and combines a plurality of logic block groups into a page data;
step S102, selecting a free page as a storage object according to a design data distribution rule, and recording a page address, namely, obtaining a page address of target storage of a logic block group to be written;
step S103, determining the offset of the target logic block group stored in the page, and recording the offset address in the page of the target logic block group;
step S104, establishing an offset relation between the position of the LMA in the meta-information and the logic block corresponding to the LMA in the logic block group according to the design index rule;
step S105, updating the LMA value into the position corresponding to the meta information;
sixth, a write data operation (not shown in the figure);
seventh step S107, after the writing is completed, updating the L2P table item, namely updating the page address of the logic block group corresponding to the LMA, and updating the intra-page offset of the logic block group corresponding to the LMA.
Accordingly, in this implementation method, when the data is read from the solid state disk, step S21 further includes: according to the logic mapping addresses of the target logic blocks to be read, obtaining page addresses and intra-page offsets of a target logic block group where the target logic blocks are located by inquiring an L2P table, wherein the L2P table stores the logic mapping addresses of a plurality of logic blocks of a corresponding flash memory page and page addresses and intra-page offsets of the logic block group where the logic blocks mapped by all the logic mapping addresses are located; and reading the target logical block group and target meta information of the corresponding flash memory page according to the acquired page address and the acquired intra-page offset.
The process of data reading is described below with reference to fig. 14:
step S108, looking up an L2P table according to the LMA1 index, and obtaining a page address W1 of the pointed flash memory page and an intra-page offset address W2 of the logic block group, wherein the page address and the intra-page offset address are recorded in the L2P table in the data writing process;
step S109, according to the page address and the offset address in the page, a flash page reading operation is initiated to obtain a logic block group and corresponding meta information, wherein the logic block group comprises logic blocks mapped by LMAs 0-2.
In the third step S110, the offset address (i.e. intra-group offset) of the target logical block in the logical block group is calculated according to the LMA1 and the meta information, so that the logical block pointed by the LMA1 needs to be separated, that is, the LMA1 needs to be found from the LMA 0-2, where the L2P table cannot determine its location, and the meta information needs to be processed (retrieved according to the set rule), so that a module (e.g. a data distribution processing unit) is needed to perform the calculation, and its input requirements are "LMA1" and "meta information", and its output is the offset address of the target logical block mapped by the LMA1 in the logical block group. After the offset address is obtained, the target logical block can be obtained.
In another implementation, while introducing a logical block Group (Group), referring to fig. 15, the record of the intra-page offset address is removed from the L2P table back and forth, i.e., the L2P entry only retains the page address, and no longer retains the intra-logical block page offset address or intra-logical block Group page offset address.
In addition, meta information groups are introduced, and referring to fig. 16, meta information corresponding to each logical block group is combined together to form a meta information group, and is an independent error correction unit. The meta-information group may be placed in the header of the flash page, i.e. stored starting from the header address, followed by the logical block group. Of course, in other embodiments, the meta-information groups may also have deterministic intra-page offset addresses when stored.
The offset of the logical block group in the page and the offset of the logical block in the group are determined by using the LMA recorded in the meta information, and when the LMA is stored in the meta information, the rule is set to reflect: the logical block group where it is located is offset in the page; the logical blocks to which they are mapped are offset within the group. Referring to fig. 17 and 18, the arrangement number of the meta information where LMA1 is located in the meta information group is used as the offset address in the page; the arrangement sequence number of the LMA1 in the meta information is used as an intra-group offset address, for example, the meta information 0 corresponds to the logic block group 0, the LMAs 0-2 in the meta information correspond to the logic blocks LMA 0-LMA 2 in the logic block group.
In this alternative implementation, step S14 further includes:
determining the position of target meta information corresponding to the target logical block group in a meta information group according to the intra-page offset, and updating the target meta information to the corresponding position of the meta information group, wherein the meta information group comprises meta information respectively corresponding to each logical block group in the flash memory page; writing the target logic block group into the corresponding position of the corresponding flash memory page according to the page address and the intra-page offset; and writing the target meta-information group to a specific location of the corresponding flash memory page according to the page address, e.g., the target meta-information group may be written to a head location of the corresponding flash memory page.
The following describes a procedure of writing data (refer to a corresponding related process, not involving a detailed procedure of writing data itself) with reference to fig. 19:
first step S201, the data path processing unit combines a plurality of logic blocks into a logic block group, and combines a plurality of logic block groups into one page of data;
step S202, selecting a free page as a storage object according to a design data distribution rule, and recording a page address, namely, obtaining the page address of a logic block group to be written;
step S203, determining the offset of the logic block group corresponding to the LMA stored in the page according to the design data distribution rule, and establishing the relation between the position of the meta information corresponding to the logic block group corresponding to the LMA1 in the meta information group and the offset position of the logic block data corresponding to the LMA1 stored in the page according to the design index rule;
step S204, establishing a relation between the position of the LMA1 in the meta information and the offset of the logic block mapped by the LMA1 in the logic block group according to the design index rule;
fifth step S205: updating the LMA1 to the corresponding position of the meta-information, and updating the meta-information to the corresponding position in the meta-information group;
sixth, a write data operation (not shown in the figure);
in the seventh step S207, after the writing is completed, the L2P entry is updated, that is, the page address of the logical block group target storage corresponding to the LMA1 is updated.
Accordingly, in the other alternative implementation method, when the data is read from the solid state disk, step S21 further includes:
according to the logic mapping address of the target logic block to be read, acquiring the page address of the target logic block group where the target logic block is located by inquiring an L2P table;
reading a corresponding flash memory page according to the page address, and extracting a meta information group from a specific position of the flash memory page, for example, the meta information group can be extracted from a head position of the flash memory page;
obtaining target meta information for storing the logical mapping address by analyzing the meta information group, obtaining the position of the target meta information in the meta information group, and obtaining the offset of the target logical block group in the flash memory page according to the determined position;
and reading the target logic block group according to the intra-page offset.
The process of data reading is described below with reference to fig. 20:
step S208, looking up the L2P table according to the LMA1 index to obtain the page address of the pointed flash memory page, wherein the corresponding relation between the LMA1 and the page address is determined in the data writing process and recorded in the L2P table;
in the second step S209, a flash page reading operation is initiated according to the page address, so as to obtain the corresponding meta-information group.
Step S210, according to the set retrieval rule, the meta-information group is processed, the input requirements are 'LMA 1' and 'meta-information group', and the output is the offset address of 'logic block group' in which the logic block pointed by LMA1 is positioned in the flash memory page and the offset address of the logic block pointed by LMA1 in the logic block group;
step S211, performing secondary reading according to the page address of the flash memory page and the offset address in the page to obtain a corresponding logic block group;
fifth step S212, according to the obtained intra-group offset address and the read logic block group, the logic block pointed by LMA1 is obtained.
The invention also constructs a compressed data management system (namely a flash memory controller) of the solid state disk, as shown in fig. 21, the compressed data management system comprises a data distribution processing unit, a command operation controller, a data path unit, a flash memory time sequence processor and a flash memory IO interface, wherein the data path unit is used for respectively compressing a plurality of target logic blocks to be written when writing data into the solid state disk, and combining the compressed target logic blocks into a target logic block group; the data distribution processing unit is used for acquiring page addresses and intra-page offsets corresponding to the target logic block groups when writing data into the solid state disk, and determining the intra-group offsets of all the target logic blocks in the target logic block groups according to the arrangement positions of all the target logic blocks in the target logic block groups; when the solid state disk is subjected to data reading, acquiring a page address, an intra-page offset and target meta information corresponding to a target logic block group where the target logic block is located according to an L2P table and a logic mapping address of the target logic block to be read, and determining the intra-group offset of the target logic block in the target logic block group according to the logic mapping address and the target meta information; when writing data into the solid state disk, the command operation controller is used for updating the logic mapping address of each target logic block to the corresponding position of the target meta information corresponding to the target logic block group according to the intra-group offset of each target logic block, writing the target logic block group and the target meta information into the corresponding positions of the corresponding flash memory pages respectively according to the page address and the intra-page offset, and updating an L2P table; and when the data of the solid state disk is read, reading the target logic block of the target logic block group according to the intra-group offset.
In this embodiment, a data distribution processing unit is added in the flash memory controller and is placed between the command operation controller and the data path unit, and the required meta information can be directly input into the data distribution processing unit, and when reading is required, a command can be output to the command operation controller, so that the reading operation can be quickly realized. In addition, the data distribution processing unit is arranged in the flash memory controller, so that the internal transmission cost can be reduced, and the time cost of restarting the reading operation and the like can be reduced.
The invention also constructs a compressed data management system of the solid state disk, which comprises a processor and a memory storing a computer program, wherein the processor realizes the steps of the compressed data management method of the solid state disk in the embodiment when executing the computer program.
In the above embodiment, it should be noted that, when managing the compressed data of the solid state disk, the functions may be implemented by hardware or software. Moreover, when the compressed data is read, the process of reading is divided into two times at the hardware processing level, namely, the meta information group is read for the first time, then the intra-page offset and the intra-group offset corresponding to the LMA are calculated, and the second reading is performed based on the intra-page offset and the intra-group offset, so that the corresponding logic blocks in the corresponding logic block group are obtained. Obviously, if the function is implemented in software, the performance thereof is greatly affected, specifically, in the time overhead expression diagram of the flash read process in the related art shown in fig. 22, tb represents the time of reading the logical block and the meta information, in the time overhead expression diagram of the flash read process in the second embodiment of the present invention shown in fig. 23, tb represents the time of reading the logical block group and the meta information, in the time overhead expression diagram of the flash read process in the third embodiment of the present invention shown in fig. 24, t2 represents the time of reading the meta information group, t3 represents the time of determining the intra-page offset corresponding to the logical block, the intra-group offset (i.e., the time required for processing by the data distribution processing unit), and t5 represents the time of reading the logical block. It follows that in design, the functions of the data distribution processing unit are preferably implemented using hardware logic.
Further, as shown in fig. 25, the data distribution processing unit of this embodiment mainly implements address indexing, and is implemented by a data distribution rule table and a retrieval processing unit, and the data distribution processing unit includes a data distribution rule table, a retrieval processing unit and a data interface, where the data distribution rule table may define in advance the following contents: 1. defining an arrangement rule of logical mapping addresses in meta information to reflect intra-group offset of logical blocks mapped by each logical mapping address in a first method; 2. in the second method, an arrangement rule of meta information where logical mapping addresses are located is defined to reflect the intra-page offset of each logical block group. And the retrieval processing unit is used for retrieving the meta-information data according to the rules on the surfaces of the rule list to obtain the relevant offset address. The data interface is used for receiving input data, mainly meta-information and logic block groups, on the data path and outputting offset addresses to the command operation controller for further operation.
In addition, the Flash memory Controller may be a part of a solid state disk Controller, as shown in fig. 26, where the solid state disk Controller includes a CPU module, and a Flash memory Controller (Flash Controller), a DDR Controller (DDR Controller), a PCIe Controller (PCIe Controller), an NVMe Controller (NVMe Controller), a data path processor (Data Path Processor), and a peripheral module, which are respectively connected to the CPU module. Of course, in other embodiments, the flash memory controller may be connected to the solid state disk controller as a separate part.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any such modifications, equivalents, and improvements that fall within the spirit and principles of the present invention are intended to be covered by the following claims.

Claims (10)

1. The compressed data management method of the solid state disk is characterized by comprising the following steps of:
step S11, respectively compressing a plurality of target logic blocks to be written, and combining the compressed target logic blocks into a target logic block group;
step S12, obtaining page addresses and intra-page offsets corresponding to the target logic block groups, and determining the intra-group offsets of all target logic blocks in the target logic block groups according to the arrangement positions of all target logic blocks in the target logic block groups;
step S13, according to the intra-group offset of each target logic block, updating the logic mapping address of each target logic block to the corresponding position of the target meta-information corresponding to the target logic block group;
and step S14, respectively writing the target logical block group and the target meta information into corresponding positions of corresponding flash memory pages according to the page address and the intra-page offset, and updating an L2P table.
2. The method for managing compressed data of a solid state disk according to claim 1, wherein the step S14 includes:
according to the page address and the intra-page offset, the target logical block group and the target meta information are combined and then written into corresponding positions of corresponding flash memory pages;
updating the page address and the intra-page offset to an L2P table.
3. The method for managing compressed data of a solid state disk according to claim 1, wherein the step S14 includes:
determining the position of target meta information corresponding to the target logical block group in a meta information group according to the intra-page offset, and updating the target meta information to the corresponding position of the meta information group, wherein the meta information group comprises meta information respectively corresponding to each logical block group in the flash memory page;
writing the target logic block group into the corresponding position of the corresponding flash memory page according to the page address and the intra-page offset; and writing the target meta-information group into a specific position of a corresponding flash memory page according to the page address.
4. A method of managing compressed data of a solid state disk as claimed in claim 3, wherein said step of writing said target meta-information group to a specific location of a corresponding flash memory page comprises:
and writing the target meta-information group into the head position of the corresponding flash memory page.
5. The compressed data management method of the solid state disk is characterized by comprising the following steps of:
step S21, according to the L2P table and the logic mapping address of the target logic block to be read, acquiring the page address, the intra-page offset and the target meta information corresponding to the target logic block group where the target logic block is located;
step S22, determining the offset of the target logic block in the target logic block group according to the logic mapping address and the target meta information;
and step S23, reading the target logic blocks of the target logic block group according to the intra-group offset.
6. The method for managing compressed data of a solid state disk as claimed in claim 5, wherein the step S21 includes:
according to the logic mapping addresses of the target logic blocks to be read, obtaining page addresses and intra-page offsets of a target logic block group where the target logic blocks are located by inquiring an L2P table, wherein the L2P table stores the logic mapping addresses of a plurality of logic blocks of a corresponding flash memory page and page addresses and intra-page offsets of the logic block group where the logic blocks mapped by all the logic mapping addresses are located;
and reading the target logical block group and target meta information of the corresponding flash memory page according to the acquired page address and the acquired intra-page offset.
7. The method for managing compressed data of a solid state disk as claimed in claim 5, wherein the step S21 includes:
according to the logic mapping address of the target logic block to be read, acquiring the page address of the target logic block group where the target logic block is located by inquiring an L2P table;
reading a corresponding flash memory page according to the page address, and extracting a meta-information group from a specific position of the flash memory page;
obtaining target meta information for storing the logical mapping address by analyzing the meta information group, obtaining the position of the target meta information in the meta information group, and obtaining the offset of the target logical block group in the flash memory page according to the determined position;
and reading the target logic block group according to the intra-page offset.
8. The method for managing compressed data of a solid state disk of claim 7, wherein the step of extracting the meta information group from the specific location of the flash memory page comprises:
and extracting a meta-information group from the head position of the flash memory page.
9. A compressed data management system for a solid state disk, comprising a processor and a memory storing a computer program, wherein the processor implements the steps of the compressed data management method for a solid state disk according to any one of claims 1 to 8 when executing the computer program.
10. A compressed data management system of a solid state disk is characterized by comprising a data distribution processing unit, a command operation controller and a data path unit, wherein,
the data path unit is used for respectively compressing a plurality of target logic blocks to be written when the data is written into the solid state disk, and combining the compressed plurality of target logic blocks into a target logic block group;
the data distribution processing unit is used for acquiring page addresses and intra-page offsets corresponding to the target logic block groups when the solid state disk is subjected to data writing, and determining the intra-group offsets of all the target logic blocks in the target logic block groups according to the arrangement positions of all the target logic blocks in the target logic block groups; when the solid state disk is subjected to data reading, acquiring a page address, an intra-page offset and target meta information corresponding to a target logic block group where the target logic block is located according to an L2P table and a logic mapping address of the target logic block to be read, and determining the intra-group offset of the target logic block in the target logic block group according to the logic mapping address and the target meta information;
the command operation controller is used for updating the logic mapping address of each target logic block to the corresponding position of the target meta information corresponding to the target logic block group according to the intra-group offset of each target logic block when the solid state disk is subjected to data writing, writing the target logic block group and the target meta information into the corresponding positions of the corresponding flash memory pages respectively according to the page address and the intra-page offset, and updating an L2P table; and when the solid state disk is subjected to data reading, reading the target logic block of the target logic block group according to the intra-group offset.
CN202311754451.XA 2023-12-18 2023-12-18 Management method and system for compressed data of solid state disk Pending CN117891392A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311754451.XA CN117891392A (en) 2023-12-18 2023-12-18 Management method and system for compressed data of solid state disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311754451.XA CN117891392A (en) 2023-12-18 2023-12-18 Management method and system for compressed data of solid state disk

Publications (1)

Publication Number Publication Date
CN117891392A true CN117891392A (en) 2024-04-16

Family

ID=90646431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311754451.XA Pending CN117891392A (en) 2023-12-18 2023-12-18 Management method and system for compressed data of solid state disk

Country Status (1)

Country Link
CN (1) CN117891392A (en)

Similar Documents

Publication Publication Date Title
US10275361B2 (en) Managing multiple namespaces in a non-volatile memory (NVM)
US7761648B2 (en) Caching method for NAND flash translation layer
US9229876B2 (en) Method and system for dynamic compression of address tables in a memory
US11232041B2 (en) Memory addressing
US7702844B2 (en) Address mapping method and mapping information managing method for flash memory, and flash memory using the same
US8335907B2 (en) Micro-update architecture for address tables
US6477632B1 (en) Storage device and accessing method
KR102603070B1 (en) Memory system, a method of writing data to the memory system, and a method of reading data from the memory system
US20200089619A1 (en) Data storage device and method of deleting namespace thereof
US20100287330A1 (en) Method for writing data into flash memory
US20210216448A1 (en) Data storage device in a key-value storage architecture with data compression, and non-volatile memory control method
TW202044046A (en) A data storage device and a data processing method
TWI715408B (en) Flash memory controller, memory device and method for accessing flash memory module
CN108614671B (en) Key-data access method based on namespace and solid-state storage device
CN111026678B (en) Cache design method and device based on solid state disk and computer equipment
CN110309081B (en) FTL data page reading and writing method based on compressed storage and address mapping table entry
JP7407230B2 (en) ecc parity bias for key value data storage devices
CN114003169B (en) Data compression method for SSD
US11636042B2 (en) Data processing method for improving access performance of memory device and data storage device utilizing the same
CN112486861B (en) Solid state disk mapping table data query method and device, computer equipment and storage medium
CN117891392A (en) Management method and system for compressed data of solid state disk
US20090055574A1 (en) NAND Flash Memory Device And Related Method Thereof
CN108614669B (en) Key-data access method for solving hash collision and solid-state storage device
CN114398297A (en) Storage method and storage device based on mixed address mapping
KR100688463B1 (en) Method for writing and erasing data of physical memory

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination