Data writing method, data reading method, data processing method, and related device

By setting the write cache table in the partition namespace solid-state drive, recording and storing the status of the failed write data, the problem that data write failure affects read and write performance is solved, and data read and write performance and service quality improvement in the case of write failure are achieved.

WO2025061100A1PCT designated stage expired Publication Date: 2025-03-27T-HEAD (SHANGHAI) SEMICON CO LTD

Patent Information

Application Number
PCT/CN2024/119779
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-21
Filing Date
2024-09-19
Publication Date
2025-03-27

AI Technical Summary

Technical Problem

In a partitioned namespace solid-state drive, when data write fails, it will affect the read and write performance of the host, resulting in a decline in service quality of data processing.

Method used

A data writing method is adopted to record the status of the write failed data by presetting the write cache table in the partition namespace solid-state drive, and store the write failed data in the write cache table.

Benefits of technology

In the case of data writing failure, by quickly obtaining and rewriting the failed data, the read and write performance of data is improved, the efficiency of data processing is improved, and the service quality of data processing is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024119779_27032025_PF_FP_ABST
    Figure CN2024119779_27032025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the invention provide a data writing method, a data reading method, a data processing method, and a related device. The data writing method is applied to a zoned namespace solid state disk, and comprises: obtaining a data write request; when data writing for the data write request fails, on the basis of a flash memory physical address corresponding to a target logical address in the data write request, storing the data in a corresponding position in a write cache table; recording as a write-buffering state the data writing state of the data for which writing failed; the write cache table is preset in the zoned namespace solid state hard disk and comprises table entries corresponding to individual flash memory physical addresses to allow data that failed to write as well as data writing states to be stored in the table. In the technical solution provided by embodiments of the invention, establishing a write cache table allows for data that failed to write to be stored in a write cache table. In this way, execution of the data write requests is not affected, read-write performance of the data is improved, and the service quality of data processing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Data writing method, data reading method, data processing method and related equipment

[0001] This application claims priority to the Chinese patent application filed on September 21, 2023, with application number 202311230113.6 and invention name “Data writing method, data reading method, data processing method and related equipment”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of computer technology, and specifically to a data writing method, a data reading method, a data processing method, and related devices. Background Art

[0003] The Zoned Namespace Solid State Drive (ZNS SSD) migrates the Flash Translation Layer (FTL) from the SSD to the upper-layer host, opening the SSD's internals to the host. This allows users to flexibly customize the FTL based on their needs. The ZNS SSD can write data from host write requests to the cache (flash) based on the specified FTL.

[0004] However, when writing data to the flash memory of a ZNS SSD, write failures may occur. This data write failure affects the host's data read and write performance. Therefore, how to provide a technical solution to improve data read and write performance and enhance the data processing service quality in the event of data write failures has become a technical problem that technicians in this field urgently need to solve.

[0005] Summary of the Invention

[0006] In view of this, embodiments of the present invention provide a data writing method, a data reading method, a data processing method and related devices to improve data reading and writing performance and enhance the service quality of data processing when data writing fails.

[0007] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions.

[0008] In a first aspect, an embodiment of the present invention provides a data writing method applied to a partitioned namespace solid-state drive, the method comprising:

[0009] Get data write request;

[0010] When writing of data in the data write request fails, storing the data in the data write request in a position corresponding to the flash memory physical address in the write cache table according to the flash memory physical address corresponding to the target logical address in the data write request, and recording the data write status of the write-failed data as a writing status at the position corresponding to the flash memory physical address in the write cache table;

[0011] The write cache table is pre-set in the partition namespace solid state drive and includes table entries corresponding to respective flash memory physical addresses, so as to store the write failure data and the data write status in the table entries.

[0012] In a second aspect, an embodiment of the present invention provides a data reading method applied to a partitioned namespace solid-state drive, the method comprising:

[0013] Get data read request;

[0014] According to the flash memory physical address corresponding to the target logical address in the data read request, obtaining the data write status and physical address remapping flag at the position corresponding to the flash memory physical address in the write cache table;

[0015] When the data writing state is in the writing state and there is no physical address remapping flag at the position corresponding to the flash memory physical address in the write cache table, the data stored at the position corresponding to the flash memory physical address in the write cache table is read.

[0016] In a third aspect, an embodiment of the present invention provides a data processing method, applied to a host, the method comprising:

[0017] When a data write failure signal is obtained, a data read request containing the data write failure signal is generated and sent to the partition namespace solid state drive to obtain the data stored in the write cache table and rewrite the data.

[0018] In a fourth aspect, an embodiment of the present invention provides an electronic device comprising a memory and a processor, wherein the memory stores a program, and the processor calls the program stored in the memory to execute the data writing method as described in the first aspect, or executes the data reading method as described in the second aspect, or executes the data processing method as described in the third aspect.

[0019] In a fifth aspect, an embodiment of the present invention further provides a storage medium storing a program, which, when executed, implements the data writing method as described in the first aspect, or implements the data reading method as described in the second aspect, or implements the data processing method as described in the third aspect.

[0020] In a sixth aspect, an embodiment of the present invention further provides a computer program, which, when executed, implements the data writing method as described in the first aspect, or implements the data reading method as described in the second aspect, or implements the data processing method as described in the third aspect.

[0021] An embodiment of the present invention provides a data writing method, which is applied to a partition namespace solid-state hard drive, including: obtaining a data write request; when data in the data write request fails to be written, storing the data in the data write request in a write cache table at a position corresponding to the flash memory physical address according to the flash memory physical address corresponding to the target logical address in the data write request, and recording the data write status of the write-failed data as a writing status in the write cache table at the position corresponding to the flash memory physical address; wherein the write cache table is pre-set in the partition namespace solid-state hard drive, including table entries corresponding to each flash memory physical address, so as to store the write-failed data and the data write status in the table entries accordingly.

[0022] As can be seen, the data writing method provided by the embodiment of the present invention pre-sets a write cache table in the partition namespace solid-state drive. Therefore, when the partition namespace solid-state drive executes an acquired data write request and writes the data in the data write request to the target address, i.e., the flash memory physical address, if the data write fails, the data that failed to be written at this time can be directly stored in the write cache table as write failure data based on the flash memory physical address in the acquired data write failure signal. Since the write cache table includes table entries corresponding to the flash memory physical addresses, the flash memory physical address in the write failure signal can be stored in the write cache table entry. In addition, when storing the write failure data, the embodiment of the present invention records the data write status of the write failure data as being in a writing state at the location corresponding to the flash memory physical address in the write cache table. Therefore, when the write failure data needs to be rewritten later and the corresponding data needs to be read, the write cache table can be accessed based on the recorded in-writing state flag to quickly obtain the write failure data that needs to be rewritten from the write cache table. This improves the data read and write performance and data processing efficiency in the event of a data write failure, thereby achieving the purpose of improving the service quality of data processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0024] FIG1 is a schematic diagram of the address mapping relationship between the host and the partition namespace solid state drive;

[0025] FIG2 is a schematic diagram of an implementation structure of a partition namespace solid-state drive and a host for data processing;

[0026] FIG3 is a flow chart of a data processing method provided by an embodiment of the present invention;

[0027] FIG4 is a schematic diagram of a flow chart of a data writing method provided by an embodiment of the present invention;

[0028] FIG5 is a flow chart of a data reading method provided by an embodiment of the present invention;

[0029] 6 is a schematic diagram showing the correspondence between a write cache table and a physical super block in a data write method according to an embodiment of the present invention;

[0030] 7 is a schematic diagram of the address mapping relationship between the write cache table and the target logical address and the physical super block in the data writing method provided in an embodiment of the present invention;

[0031] FIG8 is a schematic diagram of an implementation process of storing write-failed data in a data writing method provided by an embodiment of the present invention;

[0032] 9 is a schematic diagram of an implementation process of physical address remapping in the data writing method provided in an embodiment of the present invention;

[0033] FIG10 is an architecture diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0035] Zoned Namespaces is a new command set (Zoned Namespace Command Set) in the NVMe specification. This command set exposes a set of interfaces (zoned block storage interface) to the host. This interface divides its capacity into multiple zones, allowing random reads within each zone, but only sequential writes. This design simplifies the data placement strategy within the SSD, aligns written data with the physical media, and optimizes throughput, QoS, capacity, lifespan, etc. However, making good use of this read and write interface requires additional adaptation at the user software layer. Solid-state drives (SSDs) that support the Zoned Namespaces command set are called Zoned Namespaces SSDs (ZNS SSDs).

[0036] The ZNS specification divides the entire logical block address (LBA) range of the SSD namespace into several equal-length intervals. Each equal-length LBA interval becomes a zone. Writes must be performed sequentially within each zone, and each zone is managed by its own independent state machine.

[0037] For ease of understanding, please refer to Figures 1 and 2. Figure 1 is a schematic diagram of the address mapping relationship between the host and the partition namespace solid-state drive, and Figure 2 is a schematic diagram of an implementation structure of data processing between the partition namespace solid-state drive and the host.

[0038] As shown in FIG. 1 and FIG. 2 , the ZNS SSD includes a host 20 , a ZNS SSD controller 10 , and a storage medium 30 .

[0039] The storage medium 30 can be a non-volatile random access storage medium (Not AND flash, NAND Flash), which can latch charges through transistors so that information can still be maintained when there is no power supply. The data of NAND Flash is stored in memory cells in the form of bits, and only one bit can be stored in a memory cell. These memory cells are connected into bit lines in a certain number of units, which is the bit width of the NAND Device. These bit lines will be combined into pages, and multiple pages form a block. The number of blocks on a specific flash depends on the needs. NAND flash reads and writes data in pages and erases data in blocks. The number of erase and write times of a block is limited, and the maximum number of erase and write times is called PE Cycles (Program erase cycles). The process of writing PE to NAND flash is also called the programming process, that is, (program).

[0040] The ZNS SSD controller 10 includes a front end (FE) 11, a front end (FE) 12, and a front end (FE) 13, which are functional modules for parsing and transmitting data according to the NVME protocol.

[0041] The cache 14 is used to cache frequently used data.

[0042] The memory controller 15 is used to control the acquisition of corresponding data from the memory according to the target logical address. One memory controller 15 controls the reading of data in the corresponding connected memory.

[0043] When data processing is performed inside the ZNS SSD, the host 20 sends a data processing request to the ZNS SSD controller 10, and the host 20 applies for multiple space resources at the same time; the ZNS SSD controller 10 receives the data processing request, such as a data write request, using the front end 11 to first receive the data write request sent by the host 20, and then transmits the data obtained from the cache based on the target logical address in the data write request to the front end 12 through the front end 11, and then transmits it to the front end 13 through the front end 12, so that the front end 13 can determine the flash memory physical address converted from the target logical address according to the mapping relationship, and transmit the data to the bare chip corresponding to the flash memory physical address in the storage medium.

[0044] Of course, when there is no data stored in the cache, the memory controller 15 is used to obtain data from the corresponding connected memory according to the target logical address, and then stored in the cache 14, and then the data is transferred from the cache 14 to the front end 13 using the front end 12.

[0045] However, when the partitioned namespace solid-state drive executes a data write request and writes the data in the data write request into the flash memory physical address, a medium write failure will occur in the process of writing to the flash memory physical address, but the data that failed to be written is still inside the storage medium. Since the target logical address of the data in the ZNS is mapped one-to-one to the flash memory physical address, the data at the flash memory physical address where the write failed requires an additional area for storage. Otherwise, the host 20 will re-read the flash memory physical address where the write failed, which will cause a read failure and result in data loss.

[0046] If the write-failed data is transferred to other flash memory physical addresses, the pre-established mapping relationship between the target logical address (Logical Block Address, LBA) in the data write request sent by Host 20 and the flash memory physical address (FPA) inside the ZNS SSD will be destroyed. The ZNS SSD needs to quickly establish a new mapping relationship between the flash memory physical address and the target logical address in the Host's data write request, and needs to solve the reading performance problem well. Therefore, in response to the above problems, an embodiment of the present invention provides a data processing method, which is applied to a partitioned namespace solid-state drive to improve the data read and write performance in the event of data write failure, improve the efficiency of data processing, and thereby achieve the purpose of improving the service quality of data processing.

[0047] Please refer to FIG. 3 , which is a flow chart of a data processing method provided by an embodiment of the present invention.

[0048] First, in terms of a partitioned namespace solid-state drive, as shown in FIG3 , the data processing method may include the following steps:

[0049] Step S101: Obtain a data write request.

[0050] The data write request is issued by the host according to the data write demand and sent to the partition namespace solid state drive. The data write request may include the data to be written and the target logical address LBA corresponding to the physical location where the data needs to be written (i.e., the flash memory physical address); so that the partition namespace solid state drive can write the data to the corresponding physical address according to the flash memory physical address corresponding to the target logical address.

[0051] Step S102, when the data write request fails to write data, according to the flash memory physical address corresponding to the target logical address in the data write request, the data in the data write request is stored in the write cache table at a position corresponding to the flash memory physical address.

[0052] The partition namespace solid state drive processes the data write request according to the acquired data write request, that is, the partition namespace solid state drive writes the data to the flash memory physical address corresponding to the target logical address according to the target logical address in the data write request.

[0053] When a write failure occurs during the process of writing data to the flash memory physical address, the partition namespace solid-state drive will write the data that failed to be written at this time, that is, the write failure data, and subsequently process the write failure data based on the flash memory physical address corresponding to the data when the write failure occurs.

[0054] The write cache table is pre-set in the partition namespace solid state drive and includes table entries corresponding to respective flash memory physical addresses, so as to store the write failure data and record the data write status in the table entries.

[0055] Step S103 : In the write cache table, the data write status of the write-failed data is recorded as being in a writing state at the physical address position of the flash memory.

[0056] The write cache table can be used to store write-failed data. In order to facilitate the subsequent re-acquisition and re-writing of the write-failed data, each table entry in the write cache table is matched one-to-one with the flash memory physical address. That is, when the partition namespace solid-state drive executes a data write request, the flash memory physical address is matched with each table entry in the write cache table in the order in which the data is written in sequence according to the flash memory physical address corresponding to the target logical address; when a data write failure signal is obtained, the write-failed data can be directly stored in the write cache table according to the returned flash memory physical address, and the position corresponding to the physical flash memory address is the corresponding table entry.

[0057] In order to facilitate the acquisition and judgment of write-failed data, the write cache table can further set the data write status at this time to the writing status (Buffer) in the corresponding table entry after storing the write-failed data in the corresponding table entry, to indicate that the table entry stores data that has not been written successfully. When the write-failed data needs to be obtained subsequently, the corresponding stored write-failed data can be quickly obtained based on the status mark of the writing status, so that the write-failed data can be rewritten.

[0058] It can be seen that the data writing method provided by the embodiment of the present invention, since a write cache table is pre-set in the partition namespace solid-state drive, when the partition namespace solid-state drive executes the obtained data write request and writes the data in the data write request to the target address, i.e., the flash memory physical address, when the data write fails, the data that failed to be written at this time can be directly stored in the write cache table as write failure data according to the flash memory physical address corresponding to the data write failure. Since the write cache table includes table entries corresponding to the flash memory physical addresses, the data can be stored in the write cache table entries based on the flash memory physical addresses. In addition, when storing the write failure data, the embodiment of the present invention records the data write status of the write failure data as being in a writing state at the location corresponding to the flash memory physical address in the write cache table. Therefore, when it is necessary to re-write the write failure data and read the corresponding data later, the write cache table can be accessed according to the recorded in-writing state flag to quickly obtain the write failure data that needs to be rewritten from the write cache table, thereby improving the data read and write performance and data processing efficiency in the case of data write failure, thereby achieving the purpose of improving the service quality of data processing.

[0059] In order to facilitate the distinction of data write states recorded in the write cache table and to quickly execute data write requests, in one embodiment, different tags can be used to record different data write states. Please refer to Figure 4, which is a flow chart of a data write method provided by an embodiment of the present invention.

[0060] As shown in the figure, the process can include the following steps:

[0061] Step S110: obtaining a data write request.

[0062] The data write request is issued by the host according to the data write demand and sent to the partition namespace solid state drive. The data write request may include the data to be written and the target logical address LBA corresponding to the physical location where the data needs to be written (i.e., the flash memory physical address); so that the partition namespace solid state drive can write the data to the corresponding address according to the flash memory physical address corresponding to the target logical address.

[0063] Step S111, according to the flash memory physical address corresponding to the target logical address in the data write request, write the data in the data write request into the pre-applied physical super block of the partition namespace solid state drive corresponding to the flash memory physical address.

[0064] The physical super block is a pre-applied physical super block set in the partition namespace solid state drive, and the physical super block corresponds to the write cache table one by one.

[0065] The partitioned namespace solid state drive responds to the data write request, that is, the partitioned namespace solid state drive writes the data into the flash memory physical address corresponding to the target logical address according to the target logical address in the data write request.

[0066] Step S112, determining whether the data in the data write request fails to be written, if yes, executing step S113, if no, executing step S115.

[0067] Step S113 , writing the data into the flash memory physical address corresponding to the target logical address in the data write request.

[0068] Step S114 : In the write cache table, the data write status of the write-failed data corresponding to the flash memory physical address position is maintained as a writing status.

[0069] The entry corresponding to the write-failed data is recorded with a "writing-in-progress" status (buffer). The "writing-in-progress" status may indicate that the data is being written but has not yet been successfully written.

[0070] In one embodiment, the writing status may be that during the process of executing the data write request, that is, in the process of writing data to the corresponding flash memory physical address based on the target logical address, the corresponding entry in the write cache table records the data write status as the writing status. When the data write fails, based on the returned data write failure signal, the data write status (writing status) recorded in the write cache table entry corresponding to the flash memory address in the data write signal is maintained.

[0071] In another embodiment, the data writing status may also be that when the data in the data write request fails to be written, based on the flash memory physical address of the data that failed to be written, the data writing status corresponding to the failed data is recorded as the writing status in the write cache table entry. That is, the data writing status may be recorded in the write cache table in advance when the data is written, or may be recorded in the write cache table in real time after the data write fails.

[0072] Step S115 : In the write cache table, the data write status of the data corresponding to the flash memory physical address position is recorded as a write completion status.

[0073] If the data write is determined to be successful, it indicates that the data has been successfully written to the physical superblock. The different data write determination result signals obtained can facilitate subsequent operations of the partitioned namespace SSD. To facilitate distinguishing different data write states in the write cache table, after determining that the data in the data write request has been successfully written to the physical superblock, a corresponding write success flag can also be recorded in the write cache table.

[0074] The write completion status (Flash) indicates that the data has been written into the physical super block according to the flash physical address, so the data write status can be recorded as the write completion status in the entry corresponding to the flash physical address in the write cache table.

[0075] If the entry corresponding to the flash memory physical address in the write cache table does not pre-record the "writing in progress" status, the "write complete status (Flash)" may be recorded in real time based on the real-time determination of whether the data is successfully written. If the entry corresponding to the flash memory physical address in the write cache table does pre-record the "writing in progress" status, the "writing in progress" status is updated to the "write complete status (Flash)."

[0076] According to different marks recorded in the write cache table for different data write states, the data state in each table entry of the write cache table can be conveniently determined, so as to obtain write failure data in the corresponding table entry.

[0077] In order to enable the host to quickly obtain write-failed data that needs to be rewritten, in one embodiment, the partition namespace solid-state drive may further send a data write failure signal to the host.

[0078] Please continue to refer to FIG3 . As shown in FIG3 , the process may further include:

[0079] Step S104: Send a data write failure signal to the host.

[0080] The partition namespace solid-state drive sends a data write failure signal to the host, wherein the data write failure signal includes the flash memory physical address. Therefore, when the host obtains the data write failure signal, it can directly read the write failure data from the corresponding table entry in the write cache table according to the record mark of the data write status corresponding to the flash memory physical address, thereby rewriting the write failure data, facilitating the host's acquisition of the write failure data, and improving the host's efficiency in acquiring the write failure data, thereby improving the service quality of data reading and writing.

[0081] When the number of data write failure signals obtained by the ZNS SSD continues to accumulate, the write failure data stored in the write cache table continues to increase, which will cause the host Host to read the write failure data that needs to be rewritten to slow down. Therefore, in order to solve the problem of the host reading rate drop caused by storing a large amount of write failure data, in one embodiment, the physical address of the data that has been written successfully and the write cache table that stores a large amount of write failure data can also be remapped.

[0082] Please refer to FIG. 5 , which is a flow chart of a data reading method provided by an embodiment of the present invention.

[0083] As shown in Figure 5, for a partitioned namespace solid-state drive, the process may include the following steps:

[0084] Step S120: Acquire a data write request.

[0085] Step S121 : when data writing in the data writing request fails, obtaining the number of failures of the data writing.

[0086] In order to facilitate the judgment of whether it is necessary to remap the physical addresses of the write cache table and the physical super block containing the successfully written data, the number of failures in data writing can be recorded and judged. When the amount of write failure data stored in the write cache table due to the number of failures is large, the write cache table and the physical super block can be remapped.

[0087] Step S122, determining whether the number of failures corresponding to the same write cache table reaches a write threshold, if yes, executing step S123, if no, executing step S124.

[0088] The number of failures corresponds to the amount of write-failed data written when a data write request fails, that is, the amount of data stored by the partition namespace solid-state drive in the write cache table when data write fails.

[0089] The write threshold is the maximum data volume corresponding to the reduction in the rate at which the host reads write-failed data that needs to be rewritten.

[0090] Step S123: Migrate the data in the super cache block corresponding to the write cache table that has reached the write threshold to another super cache block, perform physical address remapping, and set a physical address remapping flag in the write cache table.

[0091] A physical address remapping flag is added to the data write cache table that reaches the write threshold at this time. Therefore, when the subsequent partition namespace solid-state drive sends a data write failure signal to the host, the host can determine the corresponding address for obtaining the write failure data based on whether the data write failure signal contains the physical address remapping flag, so that the host can quickly obtain the write failure data without affecting the host's reading and writing efficiency.

[0092] Step S124, according to the flash memory physical address corresponding to the target logical address in the data write request, the data in the data write request is stored in the write cache table at the position corresponding to the flash memory physical address, and in the write cache table, the data write status of the write-failed data is recorded as a writing status at the position corresponding to the flash memory physical address.

[0093] When the write threshold is not reached, it means that the number of write failure data stored in the write cache table at this time will not affect the efficiency of the host reading the write failure data. Therefore, the write failure data in the data write failure signal can be directly stored in the original write cache table without the need to remap the physical address of the write cache table and the physical super block.

[0094] Step S125: Send a data write failure signal to the host.

[0095] The data write failure signal may be a data write failure signal with a physical address remapping flag in step S123, or a data write failure signal without a physical address remapping flag in step S124.

[0096] In one embodiment, step S123 may include:

[0097] The write cache table and the data written into the super physical block of the partition namespace solid state drive corresponding to the write cache table are transferred to the physical super block of the partition namespace solid state drive not corresponding to the write cache table.

[0098] The non-corresponding physical super blocks of the partition namespace solid state drive refer to other physical super blocks except the physical super block initially corresponding to the write cache table.

[0099] It should be noted that when initially determining a physical super block for storing data, multiple physical super blocks may be determined simultaneously.

[0100] Since the data stored in the physical super block corresponds to the target logical address in the data write request and the various table entries in the write cache table, when the write cache table is physically remapped, the physical address of the data already written in the physical super block corresponding to the write cache table must be synchronously remapped to avoid affecting the data read and write performance of subsequent hosts.

[0101] In one embodiment, to enable the host to successfully complete data reading and writing, a mapping relationship can be established between the write cache table, the target logical address, and the physical super block corresponding to the flash memory physical address. Please refer to Figures 6 and 7. Figure 6 is a schematic diagram of the corresponding relationship between the write cache table and the physical super block in the data writing method provided by an embodiment of the present invention, and Figure 7 is a schematic diagram of the address mapping relationship between the write cache table, the target logical address, and the physical super block in the data writing method provided by an embodiment of the present invention.

[0102] As shown in Figures 6 and 7, the allocation status of the partition namespace solid-state hard disk is recorded through a space resource table, which includes the correspondence between each space resource, each write cache table and the physical first address in the flash memory physical address of each physical super block of the partition namespace solid-state hard disk. The write cache table includes a write cache table in a set state and a write cache table in a non-set state.

[0103] Whether the space resource is set with a write cache table is determined according to the setting status, so that the space resource that can be set can be determined according to actual usage, and the number of write cache tables can be reasonably set.

[0104] In the space resources in the non-setting state, the corresponding relationship between the space resources and the physical super block is established according to the corresponding relationship when the write cache table is not normally set, so as to meet the processing of data write requests in different situations.

[0105] By establishing the corresponding relationship, the host can quickly determine the flash memory physical address corresponding to the write-failed data and the physical super block corresponding to the write data.

[0106] In one embodiment, the data write status recorded in the write cache table further includes a no data write status.

[0107] The no data written state (Invalid) indicates that no related write failure data has been written into the entry of the write cache table.

[0108] To facilitate understanding of the specific implementation of the data processing method provided in an embodiment of the present invention, please refer to Figures 8 and 9 in combination with Figures 6 and 7. Figure 8 is a schematic diagram of an implementation process of storing write-failed data in the data writing method provided in an embodiment of the present invention. Figure 9 is a schematic diagram of an implementation process of physical address remapping in the data writing method provided in an embodiment of the present invention.

[0109] As shown in Figure 8, when data writing fails, the partition namespace solid-state hard drive writes the data in the data write request into the table entry corresponding to the flash memory physical address corresponding to the writing failure in the write cache table, and records the corresponding data writing status in the table entry as the writing status, thereby avoiding the subsequent host from reusing the corresponding table entry when the writing fails to record the data writing status of the new data when writing data; at the same time, it is convenient for the subsequent host to obtain the write failure data in the corresponding table entry based on the flash memory physical address.

[0110] As shown in Figure 9, when the number of write failures of a data write request reaches the write threshold, it means that writing the write-failed data into the same write cache table at this time will affect the host's read and write efficiency; therefore, based on the data in the write request for the data that failed to be written at this time and the flash memory physical address, the data that has been written to the physical super block corresponding to the write cache table and the write cache table are physically remapped according to the correspondence shown in Figure 6, and a physical address remapping flag is set in the write cache table, so that when the subsequent host obtains a data write failure signal to re-read the write-failed data, it can determine the new write cache table and the corresponding table entry location for storing the write-failed data based on the physical address remapping flag set in the write cache table, thereby improving the host's efficiency in reading the write-failed data without affecting the host's reading of the write-failed data.

[0111] Based on the partition namespace SSD using the write cache table to store write-failed data, when the host obtains the data write failure signal sent by the partition namespace SSD, the write-failed data can be obtained and rewritten. Please continue to refer to Figure 3.

[0112] As shown in FIG3 , for the host, the data processing method may include the following steps:

[0113] Step S201: Acquire a data write failure signal.

[0114] The write failure signal is sent by the partition namespace solid-state drive to the host when a write fails. The data write failure signal includes the stored flash memory physical address corresponding to the write failure data, so that the host sentence can directly index the write failure data in the write cache table according to the flash memory physical address.

[0115] Step S202 : Generate and send a data read request containing the data write failure signal to the partition namespace solid state drive to obtain the data stored in the write cache table and rewrite the data.

[0116] Since the partition namespace solid-state hard drive has stored the write-failed data in the corresponding table entry of the write cache table according to the flash memory physical address, the host can form a data read request to obtain the write-failed data based on the received data write failure signal, and send the data read request to the partition namespace solid-state hard drive, so that the partition namespace solid-state hard drive can determine the corresponding writing status based on the flash memory physical address in the data write failure signal carried by the data read request, and thus obtain the write-failed data by indexing in the write cache table according to the writing status; and finally rewrite the write-failed data.

[0117] The partitioned namespace solid-state hard drive, based on the writing status corresponding to the flash memory physical address, indexes the write-failed data from the corresponding table entry in the write cache table and returns the write-failed data to the host, so that the host regenerates a data write request based on the write-failed data, thereby rewriting the write-failed data, that is, re-issuing a data write request for the write-failed data to the partitioned space named solid-state hard drive, so as to determine a new flash memory physical address based on the new target logical address for the write-failed data in the new data write request, and then write the write-failed data to the new flash memory physical address.

[0118] As can be seen, the data processing method provided by the embodiment of the present invention pre-sets a write cache table in the partition namespace solid-state drive. Therefore, when the partition namespace solid-state drive executes an acquired data write request and writes the data in the data write request to the target address, i.e., the flash memory physical address, if the data write fails, the data that failed to be written at this time can be directly stored in the write cache table as write failure data based on the flash memory physical address in the acquired data write failure signal. Since the write cache table includes table entries corresponding to the flash memory physical addresses, the data that failed to be written can be stored in the write cache table entry based on the flash memory physical address in the write failure signal. In addition, when storing the write failure data, the embodiment of the present invention records the data write status of the write failure data as being in a writing state at the location corresponding to the flash memory physical address in the write cache table. Therefore, when it is necessary to re-write the write failure data and read the corresponding data later, the write cache table can be accessed based on the recorded in-writing state flag to quickly obtain the write failure data that needs to be rewritten from the write cache table. This improves the data read and write performance and data processing efficiency in the event of a data write failure, thereby achieving the purpose of improving the service quality of data processing.

[0119] In one embodiment, the host may further send a data write request to the partition namespace solid state drive according to the data write signal, please continue to refer to FIG. 3 .

[0120] As shown in FIG3 , the data processing method for the host may further include:

[0121] Step S2001, obtain the user's regional activation signal; according to the regional activation signal, allocate a write cache table and a super physical block of the partition namespace solid state drive to the user, and request the partition namespace solid state drive to record the write cache table and the super physical block corresponding thereto.

[0122] After the host obtains the user's zone activation signal based on the data writing requirement, it can determine multiple space resource open zones based on the zone activation signal. Each space resource corresponds to an application with data writing requirements, and each space resource contains multiple flash memory physical addresses for storing data for an application.

[0123] In order to be able to directly store the failed data when writing fails, so as to quickly establish the address correspondence between the failed data and the host, the host applies for the write cache table Write Cache Table and multiple physical super blocks Superblock at the same time when determining multiple space resources, where one physical super block corresponds to one space resource.

[0124] After applying for the write cache table and multiple physical super blocks, the applied write cache table and multiple physical super blocks are recorded on the partition namespace solid state drive, so that the partition namespace solid state drive can store the write failure data in the table entry in the write cache table corresponding to the flash memory physical address of the physical super block, which is convenient for the host to read later.

[0125] Furthermore, to trigger the partition namespace to execute data writing, the host requests the partition namespace solid state drive to record the write cache table and the corresponding super physical block, and then issues a data write request to the partition namespace solid state drive.

[0126] Step S2002: Send a data write request.

[0127] In one embodiment, the applied write cache table and multiple physical super blocks may be recorded in a space resource table of the partition namespace solid state drive.

[0128] Because a large amount of write-failure data stored in the write cache table affects the host's read efficiency, after the amount of write-failure data stored in the write cache table, i.e., the number of write-failure data, reaches the write threshold, the write cache table and the successfully written data are physically remapped, and a physical address remapping flag is set in the corresponding data write-failure signal. Therefore, when the host receives the data write-failure signal and detects the physical address remapping flag in the data write-failure signal, it re-determines the read address and then reads the write-failure data based on the new read address. Please continue to refer to Figure 5.

[0129] As shown in FIG5 , for the host, the data processing method may further include the following steps:

[0130] Step S210: Send a data write request.

[0131] The data write request is a data write request generated by the host according to the data write requirement. When the subsequent partition namespace solid state drive responds to the data write request and fails to execute, that is, fails to write data, a data write failure signal is returned to the host.

[0132] Step S211: obtaining a data write failure signal.

[0133] Step S212: Generate and send a data read request containing the data write failure signal to the partition namespace solid state drive.

[0134] This is so as to obtain the data stored in the write cache table according to the data read request and rewrite the data.

[0135] It should be noted that the data write request containing the data write failure signal also includes a target logical address that needs to be rewritten, so that after obtaining the write failure data, it can be rewritten based on the new target logical address to avoid writing to the flash memory physical address where the write failure occurs.

[0136] The host sends a data write request containing the data write failure signal to the partition namespace solid state drive, so that the partition namespace solid state drive can quickly obtain the write failure data from the write cache table according to the writing status corresponding to the aforementioned recorded write failure data, so as to complete the rewriting of the write failure data.

[0137] For a partitioned namespace SSD, please continue to refer to Figure 5 and may also include the following steps:

[0138] Step S217, obtaining a data read request; and according to the flash memory physical address corresponding to the target logical address in the data read request, obtaining the data write status and physical address remapping flag at the position corresponding to the flash memory physical address in the write cache table.

[0139] The data read request is generated by the host based on a data write failure signal sent by the partition namespace solid state drive, and is used to read the write failure data for rewriting.

[0140] Step S218, detecting whether the data writing state is in the writing state and whether a physical address remapping flag is set at the position corresponding to the flash memory physical address in the write cache table. If yes, execute step S219; if not, execute step S220.

[0141] The physical address remapping flag indicates that a write cache table for storing write failure data in a data write failure signal and a physical super block for storing data in a data write request have been changed.

[0142] Step S219: determining a remapped flash memory physical address according to the flash memory physical address and the physical address remapping flag, and reading the data requested by the data read request according to the remapped flash memory physical address.

[0143] When the data write status is in the writing status and there is a physical address remapping flag at the position corresponding to the flash memory physical address in the write cache table, it means that the flash memory physical address included in the data read request at this time needs to be recalculated to determine the flash memory physical address after remapping, so that the host can accurately obtain the corresponding write failure data; since the time required to recalculate the flash memory physical address after remapping is based on the flash memory physical address with the physical address remapping flag, it is less than the time for the host to directly read the write failure data stored in the write cache table without physical address remapping, so it will not affect the host's reading of the write failure data, and can improve the efficiency of the host's reading of the write failure data, and thus will not affect the service quality of the host reading the write failure data and rewriting the write failure data.

[0144] Step S220: Read the data stored at the location corresponding to the flash memory physical address in the write cache table.

[0145] When the data write status is not the writing status and does not have a physical address remapping flag, it means that the number of write-failed data stored in the write cache table at this time will not affect the host's reading efficiency. Therefore, the corresponding writing status can be directly determined according to the flash memory physical address corresponding to the data write failure, so as to read the write-failed data from the write cache table based on the writing status and perform subsequent rewriting.

[0146] In one embodiment, before executing step S217, due to the existence of a partition namespace solid-state hard disk, a situation in which a writing status is recorded in a corresponding table entry of a write cache table when data writing fails, and the partition namespace solid-state hard disk may contain a physical super block of a write cache table in an unset state, that is, there is a physical super block that does not need to set a write cache table; therefore, when the partition namespace solid-state hard disk receives a data read request containing a data write failure signal sent by the host, it can also first determine whether a write cache table is set in the physical super block corresponding to the flash memory physical address in the data read request based on the correspondence between the space resources, the setting state of the write cache table and the physical first address of the physical super block; after determining that a write cache table is set In the case of entering the cache table, it is determined whether the flash memory physical address has a corresponding writing status. Since the data read request received by the partition name space solid-state hard disk at this time is based on the data write failure signal, that is, the partition name space solid-state hard disk has recorded the data write status when the data write fails as the writing status in the corresponding table entry of the write cache table, the corresponding writing status can be determined based on the flash memory physical address; when it is determined that there is a corresponding writing status, since the physical address is remapped to avoid the limited reading data speed, before obtaining the write failure data, it is possible to detect whether the write cache table has a physical address remapping flag, that is, step S217, so as to accurately obtain the write failure data.

[0147] It can be seen that the data reading method provided by the embodiment of the present invention, since a write cache table is pre-set in the partition namespace solid-state drive, when the partition namespace solid-state drive executes an acquired data write request and writes the data in the data write request to the target address, i.e., the flash memory physical address, if the data write fails, the data that failed to be written at this time can be directly stored in the write cache table as write failure data according to the flash memory physical address corresponding to the data write failure. Since the write cache table includes table entries corresponding to the flash memory physical addresses, the data can be stored in the write cache table entries based on the flash memory physical addresses. In addition, when storing the write failure data, the embodiment of the present invention records the data write status of the write failure data as being in a writing state at the location corresponding to the flash memory physical address in the write cache table. Therefore, when it is necessary to re-write the write failure data and read the corresponding data later, the write cache table can be accessed according to the recorded in-writing state flag to quickly obtain the write failure data that needs to be rewritten from the write cache table, thereby improving data read and write performance and data processing efficiency in the event of data write failure, thereby achieving the purpose of improving the service quality of data processing.

[0148] An embodiment of the present invention further provides a data writing device, which is applied to a partitioned namespace solid-state drive, comprising:

[0149] A data writing request obtaining module is used to obtain a data writing request;

[0150] a data write failure processing module configured to, when data in the data write request fails to be written, store the data in the data write request in a write cache table at a location corresponding to the flash memory physical address corresponding to the target logical address in the data write request, and record in the write cache table, at the location corresponding to the flash memory physical address, a data write status of the write-failed data as being in a writing state;

[0151] The write cache table is pre-set in the partition namespace solid state drive and includes table entries corresponding to respective flash memory physical addresses, so as to store the write failure data and the data write status in the table entries.

[0152] In one embodiment, the data writing device further includes:

[0153] a data write request processing module, configured to write the data into the flash memory physical address corresponding to the target logical address in the data write request, and record the writing status at the flash memory physical address position corresponding to the write cache table;

[0154] The data write failure processing module is configured to record, in the write cache table, the data write status of the write failed data as being in a writing state at the physical address position of the flash memory, and includes:

[0155] In the write cache table, the data write status of the write-failed data corresponding to the flash memory physical address position is kept as a writing status.

[0156] In one embodiment, the data writing device further includes:

[0157] A data writing module is used to write the data in the data writing request into a pre-applied physical super block of the partition namespace solid-state hard disk corresponding to the flash memory physical address corresponding to the target logical address in the data writing request, wherein the physical super block is a pre-applied physical super block set in the partition namespace solid-state hard disk, and the physical super block has a one-to-one correspondence with the write cache table.

[0158] In one embodiment, the data processing device may further include:

[0159] The data write success processing module is used to record the data write status of the data as a write completion status at the flash memory physical address position in the write cache table when the data is written successfully.

[0160] In one embodiment, the data processing device may further include:

[0161] A failure count acquisition module is used to acquire the number of failures of writing the data;

[0162] A physical address remapping module is used to migrate the data in the super cache block corresponding to the write cache table that reaches the write threshold to another super cache block, perform physical address remapping, and set a physical address remapping flag in the write cache table when the number of failures corresponding to the same write cache table reaches the write threshold.

[0163] In one embodiment, the data writing device may further include:

[0164] The data write failure signal sending module is used to send the data write failure signal to the host.

[0165] In one embodiment, the data write status recorded in the write cache table further includes a no data write status.

[0166] The data writing device provided by an embodiment of the present invention has a write cache table pre-set in a partitioned namespace solid-state drive. Therefore, when the partitioned namespace solid-state drive executes an acquired data write request and writes the data in the data write request to the target address, i.e., the flash memory physical address, if the data write fails, the data that failed to be written at this time can be directly stored in the write cache table as write-failed data according to the flash memory physical address corresponding to the data write failure. Since the write cache table includes entries corresponding to the flash memory physical addresses, the data can be stored in the write cache table entries based on the flash memory physical addresses. In addition, when storing the write-failed data, the embodiment of the present invention records the data write status of the write-failed data as being in a writing state in the write cache table at the location corresponding to the flash memory physical address. Therefore, when the write-failed data needs to be rewritten later and the corresponding data needs to be read, the write cache table can be accessed according to the recorded in-writing state flag to quickly obtain the write-failed data that needs to be rewritten from the write cache table. This improves data read and write performance in the event of a data write failure, enhances data processing efficiency, and thereby achieves the purpose of improving the service quality of data processing.

[0167] An embodiment of the present invention further provides a data reading device, comprising:

[0168] The data read request acquisition module is used to obtain data read requests.

[0169] a data read request processing module, which obtains, according to the flash memory physical address corresponding to the target logical address in the data read request, the data write status and the physical address remapping flag at the position corresponding to the flash memory physical address in the write cache table;

[0170] The first data reading module is used to read the data stored in the write cache table at the position corresponding to the flash memory physical address when the data writing state is in the writing state and there is no physical address remapping flag at the position corresponding to the flash memory physical address in the write cache table.

[0171] In one embodiment, the data reading device further includes:

[0172] A second data reading module is used to determine the remapped flash memory physical address according to the flash memory physical address and the physical address remapping flag when the data write status is in the writing status and there is a physical address remapping flag at the position corresponding to the flash memory physical address in the write cache table, and read the data requested by the data read request according to the remapped flash memory physical address.

[0173] In one embodiment, the allocation status of the partition namespace solid-state hard drive is recorded through a space resource table, which includes the correspondence between each space resource, each write cache table, and the physical first address in the flash memory physical address of each physical super block of the partition namespace solid-state hard drive, and the write cache table includes a write cache table in a set state and a write cache table in a non-set state.

[0174] In a data reading device provided by an embodiment of the present invention, a write cache table is pre-set in a partitioned namespace solid-state drive. Therefore, when the partitioned namespace solid-state drive executes an acquired data write request and writes the data in the data write request to a target address, i.e., a flash memory physical address, if the data write fails, the data that failed to be written at this time can be directly stored in the write cache table as write-failed data according to the flash memory physical address corresponding to the data write failure. Since the write cache table includes entries corresponding to flash memory physical addresses, the data can be stored in the write cache table entries based on the flash memory physical addresses. In addition, when storing the write-failed data, the embodiment of the present invention records the data write status of the write-failed data as being in a writing state at the location corresponding to the flash memory physical address in the write cache table. Therefore, when the write-failed data needs to be rewritten later and the corresponding data needs to be read, the write cache table can be accessed according to the recorded in-writing state flag to quickly obtain the write-failed data that needs to be rewritten from the write cache table. This improves data read and write performance in the event of a data write failure, enhances data processing efficiency, and thereby achieves the purpose of improving the service quality of data processing.

[0175] An embodiment of the present invention further provides a data processing device, applied to a host, and the device may include:

[0176] A data write failure signal receiving module, used for receiving a data write failure signal;

[0177] A write failure data reading module, configured to read, according to the flash memory physical address in the data write failure signal, the write failure data stored in the write cache table at a position corresponding to the flash memory physical address;

[0178] The write-failed data rewriting module is used to use the write-failed data as data to rewrite the data.

[0179] In one embodiment, the data processing device may further include:

[0180] A data write request sending module is used to obtain a data write signal; based on the data write signal, apply to write the cache table and the super physical block of the partition namespace solid state drive, and record the write cache table and multiple super physical blocks corresponding to the partition namespace solid state drive; and send a data write request formed based on the data write signal.

[0181] In a data processing device provided by an embodiment of the present invention, a write cache table is pre-set in a partitioned namespace solid-state drive. Therefore, when the partitioned namespace solid-state drive executes an acquired data write request and writes the data in the data write request to a target address, i.e., a flash memory physical address, if the data write fails, the data that failed to be written at this time can be directly stored in the write cache table as write-failed data according to the flash memory physical address corresponding to the data write failure. Since the write cache table includes entries corresponding to flash memory physical addresses, the data can be stored in the write cache table entries based on the flash memory physical addresses. In addition, when storing the write-failed data, the embodiment of the present invention records the data write status of the write-failed data as being in a writing state in the write cache table at the location corresponding to the flash memory physical address. Therefore, when the write-failed data needs to be rewritten later and the corresponding data needs to be read, the write cache table can be accessed according to the recorded in-writing state flag to quickly obtain the write-failed data that needs to be rewritten from the write cache table. This improves data read and write performance in the event of a data write failure, improves data processing efficiency, and thereby achieves the purpose of improving the service quality of data processing.

[0182] An embodiment of the present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a program, and the processor calls the program stored in the memory to execute the data writing method described in any of the foregoing embodiments, or executes the data reading method described in any of the foregoing embodiments, or executes the data processing method described in any of the foregoing embodiments.

[0183] Optionally, Figure 10 is an architectural diagram of an electronic device provided in an embodiment of the present invention, such as a server device or a terminal device; referring to Figure 10, the electronic device may include: at least one processor 41, at least one communication interface 42, at least one memory 43 and at least one communication bus 44.

[0184] In the embodiment of the present application, there is at least one processor 41 , communication interface 42 , memory 43 , and communication bus 44 , and the processor 41 , communication interface 42 , and memory 43 communicate with each other through the communication bus 44 .

[0185] Optionally, the communication interface 42 may be an interface of a communication module for performing network communication.

[0186] Optionally, the processor 41 may be a CPU (central processing unit), a GPU (Graphics Processing Unit), an NPU (embedded neural network processor), an FPGA (Field Programmable Gate Array), a TPU (tensor processing unit), an AI chip, an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement an embodiment of the present application.

[0187] The memory 43 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0188] As an optional implementation of the disclosure of the embodiments of the present invention, the memory 43 may store a program, and the processor 41 may call the program to execute the data writing method, data reading method, or data processing method provided by the above embodiments of the present invention.

[0189] An embodiment of the present invention also provides a storage medium storing a program, which, when executed, implements the data writing method described in the aforementioned embodiment, or implements the data reading method described in any one of the aforementioned embodiments, or implements the data processing method described in any one of the aforementioned embodiments.

[0190] An embodiment of the present invention further provides a computer program, which, when executed, implements the data writing method described in the aforementioned embodiment, or implements the data reading method described in the aforementioned embodiment, or implements the data processing method described in the aforementioned embodiment.

[0191] The above describes multiple embodiment schemes provided by the embodiments of the present application. The various optional methods introduced in each embodiment scheme can be combined and cross-referenced with each other without conflict, thereby extending a variety of possible embodiment schemes, which can all be considered as embodiment schemes disclosed and open in the embodiments of the present application.

[0192] Although the embodiments of the present application are disclosed above, the present application is not limited thereto. Any person skilled in the art may make various changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims.

Claims

1. A data writing method, applied to a partition namespace solid state drive, characterized in that: The method comprises: Get data write request; When the writing of data in the data writing request fails, according to the flash memory physical address corresponding to the target logical address in the data writing request, the data in the data writing request is stored in the write cache table at a position corresponding to the flash memory physical address, and in the write cache table, the data writing state of the write-failed data is recorded as a writing state at the position corresponding to the flash memory physical address; The write cache table is pre-set in the partition namespace solid state drive and includes table entries corresponding to each flash memory physical address, so as to store the write failure data and the data write status in the table entries.

2. The data writing method according to claim 1, characterized in that: Before the step of when the data writing in the data writing request fails, the method further includes: According to the flash memory physical address corresponding to the target logical address in the data write request, write the data into the data cache table at the flash memory physical address corresponding to the flash memory physical address, and record the writing status at the flash memory physical address position corresponding to the write cache table; In the write cache table, the data write state corresponding to the flash memory physical address position recording the write-failed data is a writing state, including: In the write cache table, the data write status of the write-failed data corresponding to the flash memory physical address position is kept as a writing status.

3. The data writing method according to claim 2, characterized in that: Before the step of when the data writing in the data writing request fails, the method further includes: According to the flash memory physical address corresponding to the target logical address in the data write request, the data in the data write request is written to the pre-applied physical super block of the partition namespace solid state drive corresponding to the flash memory physical address, wherein the physical super block is a pre-applied physical super block set in the partition namespace solid state drive, and the physical super block corresponds one-to-one to the write cache table.

4. The data writing method according to claim 3, characterized in that: The method further comprises: When the data is written successfully, in the write cache table, the data write status of the data recorded at the flash memory physical address position corresponding to the data is a write completion status.

5. The data writing method according to claim 4, characterized in that: The method further comprises: Obtain the number of failures in writing the data; When the number of failures corresponding to the same write cache table reaches a write threshold, the data in the super cache block corresponding to the write cache table that reaches the write threshold is migrated to another super cache block, and physical address remapping is performed, and a physical address remapping flag is set in the write cache table.

6. The data writing method according to any one of claims 1 to 5, characterized in that: After the step of recording the data write status of the write-failed data at the location corresponding to the flash memory physical address in the write cache table, the method further comprises: Send data write failure signal to the host.

7. The data writing method according to any one of claims 1 to 5, characterized in that: The data writing state also includes a no data writing state.

8. A data reading method, applied to a partition namespace solid state drive, characterized in that: include: Get data read request; According to the flash memory physical address corresponding to the target logical address in the data read request, obtaining the data write status and physical address remapping flag at the position corresponding to the flash memory physical address in the write cache table; When the data writing state is in the writing state and there is no physical address remapping mark at the position corresponding to the flash memory physical address in the write cache table, the data stored at the position corresponding to the flash memory physical address in the write cache table is read.

9. The data reading method according to claim 8, characterized in that: The method further comprises: When the data write status is in the writing status and there is a physical address remapping flag at the position corresponding to the flash memory physical address in the write cache table, the remapped flash memory physical address is determined according to the flash memory physical address and the physical address remapping flag, and the data requested by the data read request is read according to the remapped flash memory physical address.

10. The data reading method according to claim 9, characterized in that: The allocation status of the partition namespace solid state drive is recorded through a space resource table, which includes the correspondence between each space resource, each write cache table and the physical first address in the flash memory physical address of each physical super block of the partition namespace solid state drive, and the write cache table includes a write cache table in a set state and a write cache table in a non-set state.

11. A data processing method, applied to a host, characterized in that: include: When a data write failure signal is obtained, a message containing the data is generated and sent to the partition namespace solid state drive. The data stored in the write cache table is acquired according to the data read request of the write failure signal, and the data is rewritten.

12. The data processing method according to claim 11, characterized in that: The method further comprises: Get the user's regional activation signal; According to the area activation signal, a write cache table and a super physical block of a partition namespace solid state drive are allocated to the user, and the partition namespace solid state drive is requested to record the write cache table and the super physical block corresponding thereto.

13. An electronic device, characterized in that: It includes a memory and a processor, the memory stores a program, the processor calls the program stored in the memory, executes the data writing method as described in any one of claims 1 to 7, or executes the data reading method as described in any one of claims 8 to 10, or executes the data processing method as described in any one of claims 11 to 12.

14. A storage medium, characterized in that: The storage medium stores a program, and when the program is executed, it implements the data writing method as described in any one of claims 1 to 7, or implements the data reading method as described in any one of claims 8 to 10, or implements the data processing method as described in any one of claims 11 to 12.

Citation Information

Patent Citations

  • Storage device with power-off protection function, power-off protection method and computing system

    CN105630707A

  • Method for eliminating multi-plane programming failure of TLC flash

    CN108549588A

  • Memory system and operating method thereof

    CN110364196A

  • Data access system, data access method and storage medium

    CN115756312A

  • Storage control chip, solid state disk and related method

    CN116382576A

Cited By

  • Data recovery method and system

    CN120872694A

  • Data recovery method and system

    CN120872694B