L2P table optimization method and device for solid state hard disk, solid state hard disk and storage medium

By determining the number of Super blocks and L2P tables based on the RAID level in the SSD, and reusing space with the L2P table and Super block, the problem of large DDR usage is solved, the cost of the SSD is reduced, and the logical block address is quickly read. Pick.

CN114661245BActive Publication Date: 2024-10-22INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210413054.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-19
Publication Date
2024-10-22
Estimated Expiration
2042-04-19

AI Technical Summary

Technical Problem

The L2P table of existing SSDs is independent of block info, resulting in huge DDR usage and increasing the cost of SSDs.

Method used

By obtaining the RAID level of the solid-state drive, determine the number of physical blocks and the number of L2P tables in the super block, and reuse the space between the L2P table and the super block to store target data.

Benefits of technology

It reduces the usage of DDR, reduces the cost of solid-state drives, and enables fast reading of logical block addresses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114661245B_ABST
    Figure CN114661245B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention relate to a method and device for optimizing an L2P table of a solid state drive, a solid state drive and a storage medium, comprising: obtaining a RAID level of the solid state drive; determining the number of physical blocks in a Super block based on the RAID level; determining the number of L2P tables in the Super block based on the number of physical blocks; and based on the number of L2P tables in the Super block, dividing a space corresponding to the number of L2P tables from the Super block for storing first target data. By using the method, the use of DDR can be reduced by reusing space between the L2P table and the Super block, thereby reducing the cost of the solid state drive.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of solid state drive data storage, and in particular to a method and device for optimizing an L2P table of a solid state drive, a solid state drive, and a storage medium. Background Art

[0002] The hardware of solid-state drives (SSDs) is mainly composed of controllers, storage particles (Nand) and double data rate synchronous dynamic random access memory (Double Data Rate, DDR) and other components. Nand is equivalent to the cache of solid-state drives, which is used to cache some read and write data; L2p is a mapping table from logical addresses to material addresses, and the largest use of DDR is the cache L2P table. Generally, the ratio of the size of the L2P table to the capacity of the SSD disk is 1:1000. For example, the DDR usage of a 4T disk is 4G, so optimizing the size of the L2P table can significantly reduce the use of DDR and reduce the cost of SSD disks.

[0003] At present, in addition to storing user data, SSD disks also need to store some non-user data, which can be called metadata. Metadata is used to manage the reading and writing of user data. The main metadata includes L2P table, Trim info, block info, etc. The existing L2P table is generally independent of block info, so its DDR consumption is very large. Therefore, how to optimize the L2P table to reduce DDR usage has become an urgent problem to be solved. Summary of the invention

[0004] In view of this, in order to solve the above technical problems or part of the technical problems, the embodiments of the present invention provide a method and device for optimizing the L2P table of a solid state drive, a solid state drive, and a storage medium.

[0005] In a first aspect, an embodiment of the present invention provides a method for optimizing an L2P table of a solid state drive, comprising:

[0006] Get the RAID level of the solid state drive;

[0007] Determine the number of physical blocks in a Super block based on the RAID level;

[0008] Determine the number of L2P tables in the Super Block based on the number of physical blocks;

[0009] Based on the number of L2P tables in the one Super block, a space corresponding to the number of L2P tables is divided from the one Super block for storing the first target data.

[0010] In a possible implementation, the method further includes:

[0011] Get the capacity information of any page in a physical block;

[0012] Determining the number of L2P tables in a physical block based on the capacity information of any page;

[0013] The number of L2P tables in the Superblock is determined based on the number of physical blocks and the number of L2P tables in one physical block.

[0014] In a possible implementation, the method further includes, the first target data includes a logical block address of a user;

[0015] Obtain the encoding information of the user's logical block address;

[0016] The logical block address is stored in the L2P table of the corresponding number based on the encoding information of the logical block address.

[0017] In a possible implementation, the method further includes:

[0018] The number of Super blocks in the solid state drive is determined based on the encoding information of the logical block address.

[0019] In a possible implementation, the method further includes:

[0020] receiving a data read instruction sent by the user, wherein the data read instruction carries target logical block address information;

[0021] Determine a target Super block based on the target logical block address information;

[0022] Read the data start and end virtual addresses of the target logical block address in the target Super block;

[0023] Based on the data start and end virtual addresses, second target data is read.

[0024] In a possible implementation, the method further includes:

[0025] Obtaining attribute information of the solid state drive;

[0026] The RAID level of the solid state drive is determined based on the attribute information.

[0027] In a second aspect, an embodiment of the present invention provides an L2P table optimization device for a solid state drive, comprising:

[0028] An acquisition module, used to obtain the RAID level of the solid state drive;

[0029] A determination module, configured to determine the number of physical blocks in a Super block based on the RAID level;

[0030] The determining module is further configured to determine the number of L2P tables in the Super Block based on the number of physical blocks;

[0031] A partitioning module is used to partition a space corresponding to the number of L2P tables in the Super block based on the number of L2P tables in the Super block, so as to store the first target data.

[0032] In a possible implementation, the determination module is further used to obtain capacity information of any page in a physical block; determine the number of L2P tables in a physical block based on the capacity information of any page; and determine the number of L2P tables in the Super block based on the number of physical blocks and the number of L2P tables in a physical block.

[0033] In a third aspect, an embodiment of the present invention provides a solid-state hard disk, comprising: a processor and a memory, wherein the processor is used to execute an L2P table optimization program of the solid-state hard disk stored in the memory to implement the L2P table optimization method of the solid-state hard disk described in the first aspect above.

[0034] In a fourth aspect, an embodiment of the present invention provides a storage medium, comprising: the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the L2P table optimization method of the solid state drive described in the first aspect above.

[0035] The L2P table optimization scheme for a solid-state hard disk provided in an embodiment of the present invention obtains the RAID level of the solid-state hard disk; determines the number of physical blocks in a Super block based on the RAID level; determines the number of L2P tables in the Super block based on the number of physical blocks; and divides a space corresponding to the number of L2P tables in the Super block based on the number of L2P tables in the Super block for storing first target data. Compared with the existing L2P table that is independent of block info and consumes a huge amount of DDR, which increases the cost of the solid-state hard disk, the present scheme can reduce the use of DDR by reusing the space of the L2P table and the Super block, thereby reducing the cost of the solid-state hard disk. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A schematic diagram of a flow chart of a method for optimizing an L2P table of a solid state drive provided by an embodiment of the present invention;

[0037] Figure 2 A schematic diagram of a flow chart of another L2P table optimization method for a solid state drive provided by an embodiment of the present invention;

[0038] Figure 3 A schematic diagram of a flow chart of another L2P table optimization method for a solid state drive provided by an embodiment of the present invention;

[0039] Figure 4 A schematic diagram of the structure of an L2P table optimization device for a solid state hard disk provided by an embodiment of the present invention;

[0040] Figure 5 A schematic diagram of the structure of a solid state drive provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0042] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.

[0043] Figure 1 A schematic diagram of a flow chart of a method for optimizing an L2P table of a solid state drive provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the sending method specifically includes:

[0044] S11. Obtain the RAID level of the solid state drive.

[0045] Aiming at the problem that the L2P table is too large and occupies too much DDR, increasing the cost of solid state hard disk, the present invention designs an L2P table optimization method, which multiplexes the space of the L2P table independent of Block info and super block, and can reduce the situation that the L2P table occupies DDR.

[0046] In the embodiment of the present invention, the RAID level of the solid state drive is firstly obtained, for example, 15+1.

[0047] S12: Determine the number of physical blocks in a Super block based on the RAID level.

[0048] Continuing with the above example, if the RAID level based on the solid-state drive is 15+1, then it can be determined that the number of physical blocks contained in the Super block is 16.

[0049] S13. Determine the number of L2P tables in the Super Block based on the number of physical blocks.

[0050] Continuing with the above example, since an L2P table can store 4K of data and obtain the capacity information of a page (for example, 16K), 4 L2P tables are needed to mark a page. Therefore, it can be determined that the number of L2P tables in a physical block is 4, and further, the number of L2P tables in a super block can be determined to be 64.

[0051] S14. Based on the number of L2P tables in the one Super block, divide the space corresponding to the number of L2P tables from the one Super block for storing the first target data.

[0052] In an embodiment of the present invention, based on the number of L2P tables in a Super block determined as above, a space corresponding to the determined number of L2P tables is divided from a Superblock, that is, the L2P table and super block multiplexing space is used to store the first target data, wherein the first target data may be non-user data.

[0053] The L2P table optimization method of the solid state drive provided by the embodiment of the present invention obtains the RAID level of the solid state drive; determines the number of physical blocks in a Super block based on the RAID level; determines the number of L2P tables in the Super block based on the number of physical blocks; and divides the space corresponding to the number of L2P tables in the Super block based on the number of L2P tables in the Super block for storing the first target data. Compared with the existing L2P table that is independent of block info and consumes a huge amount of DDR, which increases the cost of the solid state drive, the method can reduce the use of DDR by reusing the space of the L2P table and the Super block, thereby reducing the cost of the solid state drive.

[0054] Figure 2 A flow chart of another L2P table optimization method for a solid state drive provided by an embodiment of the present invention is shown as follows: Figure 2As shown, the sending method specifically includes:

[0055] S21. Obtaining attribute information of the solid state drive.

[0056] S22. Determine the RAID level of the solid state drive based on the attribute information.

[0057] In the embodiment of the present invention, firstly, attribute information of the solid state drive is obtained, and the attribute information may record the RAID level of the solid state drive, for example, 15+1.

[0058] S23: Determine the number of physical blocks in a Super block based on the RAID level.

[0059] Continuing with the above example, if the RAID level based on the solid-state drive is 15+1, then it can be determined that the number of physical blocks contained in the Super block is 16.

[0060] S24. Obtain capacity information of any page in a physical block.

[0061] Get the capacity information of any page in the physical block (for example, 16K).

[0062] S25. Determine the number of L2P tables in a physical block based on the capacity information of any page.

[0063] Continuing with the above example, since an L2P table can store 4K of data and the capacity information of a page is 16K, four L2P tables are needed to mark a page, that is, the number of L2P tables in a physical block is 4.

[0064] S26. Determine the number of L2P tables in the Super Block based on the number of physical blocks and the number of L2P tables in one physical block.

[0065] From the above example, it can be seen that the number of physical blocks contained in a Super block is 16, the number of L2P tables in a physical block is 4, and it can be determined that the number of L2P tables in a Super block is 64.

[0066] S27. Obtain the encoding information of the user's logical block address.

[0067] The encoding information of the user's logical block address is obtained. The encoding information may be an Arabic numeral code, for example, 0-123.

[0068] S28. Store the logical block address into a corresponding numbered L2P table based on the encoding information of the logical block address.

[0069] In the embodiment of the present invention, since the number of L2P tables in each Super block is 64, the user's 0-63 logical block addresses are stored in Super block1, and 64-123 logical block addresses are stored in Super block2.

[0070] It should be noted that if the user has more logical block addresses, they will be stored according to the above rules.

[0071] S29. Determine the number of Super blocks in the solid state drive based on the encoding information of the logical block address.

[0072] In the embodiment of the present invention, the number of Super blocks is determined according to the encoding information of the user's logical block address, ensuring that the logical block addresses of all users are stored in the Super block.

[0073] For example, if the encoding information of the user's logical block address is 0-300, 5 Super blocks are required.

[0074] The L2P table optimization method of the solid state drive provided by the embodiment of the present invention obtains the RAID level of the solid state drive; determines the number of physical blocks in a Super block based on the RAID level; determines the number of L2P tables in the Super block based on the number of physical blocks; and divides the space corresponding to the number of L2P tables in the Super block based on the number of L2P tables in the Super block for storing first target data. According to the method, by reusing the space of the L2P table and the Super block, the use of DDR can be reduced, thereby reducing the cost of the solid state drive.

[0075] Figure 3 A flowchart of another L2P table optimization method for a solid state drive provided by an embodiment of the present invention is shown as follows: Figure 3 As shown, the sending method specifically includes:

[0076] S31. Receive a data read instruction sent by the user, wherein the data read instruction carries target logical block address information.

[0077] In the embodiment of the present invention, when a user needs to read data, a read data instruction sent by the user is received, and the read data instruction carries target logical block address information, wherein the target logical block address information can be coding information or a logical block address.

[0078] S32. Determine a target Super block based on the target logical block address information.

[0079] A Super block storing the target logical block address is determined according to the target logical block address information.

[0080] For example, if the logical block address information is code 64, it can be determined that the target Super block is Superblock2.

[0081] S33, reading the data start and end virtual addresses of the target logical block address in the target Super block.

[0082] S34. Read the second target data based on the data start and end virtual addresses.

[0083] In the embodiment of the present invention, the data start and end virtual addresses of the target logical block address can be used to calculate the logical item to be read through the offset index, and the data is read to the end virtual address to read all the data, that is, read the second target data.

[0084] The L2P table optimization method of the solid state drive provided by the embodiment of the present invention can reduce the use of DDR by reusing the L2P table and the Super block space, thereby reducing the cost of the solid state drive, and can quickly read data according to the logical block address index.

[0085] Figure 4 A schematic diagram of the structure of an L2P table optimization device for a solid state drive provided by an embodiment of the present invention specifically includes:

[0086] The acquisition module 401 is used to acquire the RAID level of the solid state drive;

[0087] A determination module 402, configured to determine the number of physical blocks in a Super block based on the RAID level;

[0088] The determining module 402 is further configured to determine the number of L2P tables in the Super Block based on the number of physical blocks;

[0089] The partitioning module 403 is used to partition the space corresponding to the number of L2P tables in the one Superblock based on the number of L2P tables in the one Superblock, for storing the first target data.

[0090] In a possible implementation, the acquisition module 401 is specifically configured to acquire attribute information of the solid state drive; and determine the RAID level of the solid state drive based on the attribute information.

[0091] In a possible implementation, the determination module 402 is specifically used to obtain the capacity information of any page in a physical block; determine the number of L2P tables in a physical block based on the capacity information of any page; and determine the number of L2P tables in the Super block based on the number of physical blocks and the number of L2P tables in a physical block.

[0092] In a possible implementation manner, the determination module 402 is further configured to determine the number of Super blocks in the solid state drive based on the encoding information of the logical block address.

[0093] In a possible implementation, the determination module 402 is further used to receive a read data instruction sent by the user, wherein the read data instruction carries target logical block address information; determine a target Super block based on the target logical block address information; read the data start and end virtual addresses of the target logical block address in the target Super block; and read the second target data based on the data start and end virtual addresses.

[0094] In a possible implementation manner, the partitioning module 403 is specifically configured to obtain encoding information of a user's logical block address; and store the logical block address into a corresponding numbered L2P table based on the encoding information of the logical block address.

[0095] The L2P table optimization device of the solid state disk provided in this embodiment can be as follows: Figure 4 The L2P table optimization device of the solid state drive shown in FIG. 1 may be executed as follows: Figure 1-3 All steps of the L2P table optimization method for solid-state drives in Figure 1-3 The technical effect of the L2P table optimization method of the solid state drive shown in the figure is as follows. For details, please refer to Figure 1-3 For the sake of brevity, the relevant description is not repeated here.

[0096] Figure 5 A schematic diagram of the structure of a solid state hard disk provided by an embodiment of the present invention, Figure 5The solid state drive 500 shown includes: at least one processor 501, a memory 502, at least one network interface 504 and other user interfaces 503. The various components in the solid state drive 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 505 is not shown in FIG. Figure 5 Various buses are labeled as bus system 505 .

[0097] The user interface 503 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).

[0098] It can be understood that the memory 502 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0099] In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and an application program 5022 .

[0100] The operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 5022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present invention can be included in the application 5022.

[0101] In the embodiment of the present invention, by calling the program or instruction stored in the memory 502, specifically, the program or instruction stored in the application 5022, the processor 501 is used to execute the method steps provided by each method embodiment, for example, including:

[0102] Obtain a RAID level of a solid state drive; determine the number of physical blocks in a Super block based on the RAID level; determine the number of L2P tables in the Super block based on the number of physical blocks; and based on the number of L2P tables in the Super block, divide a space corresponding to the number of L2P tables from the Super block for storing first target data.

[0103] In a possible implementation, the capacity information of any page in a physical block is obtained; the number of L2P tables in a physical block is determined based on the capacity information of any page; and the number of L2P tables in the Super block is determined based on the number of physical blocks and the number of L2P tables in a physical block.

[0104] In a possible implementation, the first target data includes a user's logical block address; encoding information of the user's logical block address is obtained; and based on the encoding information of the logical block address, the logical block address is stored in a corresponding numbered L2P table.

[0105] In a possible implementation, the number of Super blocks in the solid state drive is determined based on the encoding information of the logical block address.

[0106] In one possible implementation, a read data instruction sent by the user is received, wherein the read data instruction carries target logical block address information; a target Superblock is determined based on the target logical block address information; data start and end virtual addresses of the target logical block address are read in the target Superblock; and second target data is read based on the data start and end virtual addresses.

[0107] In a possible implementation, attribute information of the solid state drive is obtained; and the RAID level of the solid state drive is determined based on the attribute information.

[0108] The method disclosed in the above embodiment of the present invention can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 501 or the instruction in the form of software. The above processor 501 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.

[0109] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.

[0110] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0111] The solid state drive provided in this embodiment may be Figure 5 For a solid state drive such as the one shown in Figure 1-3 All steps of the L2P table optimization method for solid-state drives in Figure 1-3 The technical effect of the L2P table optimization method of the solid state drive shown in the figure is as follows. For details, please refer to Figure 1-3 For the sake of brevity, the relevant description is not repeated here.

[0112] The embodiment of the present invention also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.

[0113] When one or more programs in the storage medium can be executed by one or more processors, the L2P table optimization method of the solid state drive executed on the solid state drive side can be implemented.

[0114] The processor is used to execute the L2P table optimization program of the solid state drive stored in the memory to implement the following steps of the L2P table optimization method of the solid state drive executed on the solid state drive side:

[0115] Obtain a RAID level of a solid state drive; determine the number of physical blocks in a Super block based on the RAID level; determine the number of L2P tables in the Super block based on the number of physical blocks; and based on the number of L2P tables in the Super block, divide a space corresponding to the number of L2P tables from the Super block for storing first target data.

[0116] In a possible implementation, the capacity information of any page in a physical block is obtained; the number of L2P tables in a physical block is determined based on the capacity information of any page; and the number of L2P tables in the Super block is determined based on the number of physical blocks and the number of L2P tables in a physical block.

[0117] In a possible implementation, the first target data includes a user's logical block address; encoding information of the user's logical block address is obtained; and based on the encoding information of the logical block address, the logical block address is stored in a corresponding numbered L2P table.

[0118] In a possible implementation, the number of Super blocks in the solid state drive is determined based on the encoding information of the logical block address.

[0119] In one possible implementation, a read data instruction sent by the user is received, wherein the read data instruction carries target logical block address information; a target Superblock is determined based on the target logical block address information; data start and end virtual addresses of the target logical block address are read in the target Superblock; and second target data is read based on the data start and end virtual addresses.

[0120] In a possible implementation, attribute information of the solid state drive is obtained; and the RAID level of the solid state drive is determined based on the attribute information.

[0121] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0122] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0123] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for optimizing the L2P table of a solid state drive, characterized in that: include: Get the RAID level of the SSD; Determine the number of physical blocks in a Super block based on the RAID level; Determine the number of L2P tables in the Super Block based on the number of physical blocks; Based on the number of L2P tables in the one Super Block, divide the space corresponding to the number of L2P tables from the one Super Block for storing the first target data; The determining the number of L2P tables in the Super Block based on the number of physical blocks includes: Get the capacity information of any page in a physical block; Determining the number of L2P tables in a physical block based on the capacity information of any page; The number of L2P tables in the Superblock is determined based on the number of physical blocks and the number of L2P tables in one physical block.

2. The method according to claim 1, characterized in that: The first target data includes a user's logical block address; The method of allocating space corresponding to the number of L2P tables in the one Super Block based on the number of L2P tables in the one Super Block for storing the first target data includes: Obtain the encoding information of the user's logical block address; The logical block address is stored in the L2P table of the corresponding number based on the encoding information of the logical block address.

3. The method according to claim 2, characterized in that The method further comprises: The number of Super blocks in the solid state drive is determined based on the encoding information of the logical block address.

4. The method according to claim 2, characterized in that: The method further comprises: receiving a data read instruction sent by the user, wherein the data read instruction carries target logical block address information; Determine a target Super block based on the target logical block address information; Read the data start and end virtual addresses of the target logical block address in the target Super block; Based on the data start and end virtual addresses, second target data is read.

5. The method according to claim 1, characterized in that: The obtaining of the RAID level of the solid state drive includes: Obtaining attribute information of the solid state drive; The RAID level of the solid state drive is determined based on the attribute information.

6. A device for optimizing the L2P table of a solid state drive, characterized in that: include: An acquisition module, used to obtain the RAID level of the solid state drive; A determination module, configured to determine the number of physical blocks in a Super block based on the RAID level; The determining module is further configured to determine the number of L2P tables in the Super Block based on the number of physical blocks; a partitioning module, configured to partition a space corresponding to the number of L2P tables in the one Super Block based on the number of L2P tables in the one Super Block, for storing the first target data; The determination module is further used to obtain capacity information of any page in a physical block; determine the number of L2P tables in a physical block based on the capacity information of any page; and determine the number of L2P tables in the Super block based on the number of physical blocks and the number of L2P tables in a physical block.

7. A solid state hard disk, characterized in that: include: A processor and a memory, wherein the processor is used to execute an L2P table optimization program of a solid state drive stored in the memory to implement the L2P table optimization method of a solid state drive according to any one of claims 1 to 5.

8. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the L2P table optimization method for a solid state drive according to any one of claims 1 to 5.