Solid state disk data inspection method and system, electronic device and storage medium

CN122547709APending Publication Date: 2026-08-11HUIRONG ELECTRONIC SYST ENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-16
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0005]为了解决传统巡检方式往往按照逻辑地址区间顺序读取数据,并基于该逻辑地址区间的整体读取结果进行判断,导致容易出现的风险遗漏问题,第一方面,本发明提出一种固态硬盘数据巡检方法,所述方法包括:

Benefits of technology

[0009]In summary, the solid-state drive (SSD) data inspection method proposed in this application can solve the problem of logical continuity masking physical differences. Traditional inspection methods tend to assume that data with consecutive logical addresses have similar health conditions, but off-site writes, garbage collection, wear leveling, and mapping updates within the SSD render this assumption invalid. This solution, by acquiring flash memory translation layer mapping information and physical page carrying information, can identify intergenerational mixing of physical pages within the same logical address range. SSD data failures are often not due to the entire logical range deteriorating simultaneously, but rather a small number of physical pages or blocks experiencing increased error correction pressure, increased read retries, or increased data retention risk first. If the average result is still calculated for the entire logical range, a small number of abnormal pages can easily be diluted by a large number of normal pages. This solution divides the logical address range to be inspected into multiple physical risk subsets, allowing high-risk pages to be statistically analyzed and evaluated in independent subsets. In this way, even if the proportion of high-risk pages is low, they can still be identified in the inspection results of the corresponding subset. Furthermore, it enhances early risk detection capabilities. Before uncorrectable errors occur, SSDs typically exhibit early anomaly signals, such as increased error correction intensity, increased read retries, longer read latency, and increased read reference voltage adjustments. These signals may not be obvious when analyzed at the overall logical range level; however, they are more easily detected when analyzed at the level of physical risk subsets. Traditional inspection methods, if they detect a risk in a logical range, often only require refreshing, migrating, or increasing the inspection frequency of the entire logical range, easily causing unnecessary read/write overhead. This solution can pinpoint which physical risk subset the risk originates from, thus allowing measures to be taken only for the logical pages corresponding to the high-risk subset.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122547709A_ABST
    Figure CN122547709A_ABST
Patent Text Reader

Abstract

This invention discloses a method, system, electronic device, and storage medium for solid-state drive (SSD) data inspection. The method includes: determining the physical page carrying information corresponding to each logical page within the logical address range to be inspected based on the flash memory translation layer mapping information of the SSD; determining the physical mapping generational dispersion corresponding to the logical address range to be inspected based on the physical page carrying information; dividing the logical address range to be inspected into multiple physical risk subsets when the physical mapping generational dispersion meets a preset dispersion condition; performing data inspection on each of the multiple physical risk subsets to obtain the inspection results corresponding to each physical risk subset; and determining the data health status of the logical address range to be inspected based on the inspection results corresponding to each physical risk subset. This method solves the problem of potential risk omissions that often occur in traditional inspection methods, which typically read data sequentially according to the logical address range and make judgments based on the overall reading results of that logical address range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of solid-state drive (SSD) data inspection, and more specifically, to a SSD data inspection method, system, electronic device, and storage medium. Background Technology

[0002] Solid-state drives (SSDs) present a contiguous logical address space to the host. When reading or writing data, the host typically only sees logical block addresses or logical page addresses. For example, the host might perceive a file segment as occupying a contiguous logical address range, or a database tablespace as located within a contiguous logical address range. However, internally, within an SSD, logical addresses are not directly equivalent to fixed physical storage locations. The SSD controller maintains the mapping between logical pages and physical pages through a flash translation layer. Each time the host writes data, the SSD typically does not overwrite the original physical location; instead, it writes the new data to a new free physical page and updates the logical-to-physical address mapping.

[0003] Therefore, a logically continuous range of addresses to be inspected may correspond to multiple different physical blocks, physical blocks with different erase / write cycles, physical pages with different write times within a solid-state drive (SSD), and may even be distributed across different channels, different chips, or different planes. In other words, the continuity of logical addresses does not necessarily indicate the consistency of their physical state. Summary of the Invention

[0004] The summary section introduces a series of simplified concepts, which will be further explained in detail in the detailed description section. The summary section of this invention is not intended to limit the key features and essential technical features of the claimed technical solution, nor is it intended to determine the scope of protection of the claimed technical solution.

[0005] To address the issue that traditional inspection methods often read data sequentially according to logical address ranges and make judgments based on the overall read results of those ranges, which can easily lead to missed risks, this invention proposes a solid-state drive (SSD) data inspection method, comprising: Based on the flash memory translation layer mapping information of the solid-state drive, the physical page carrying information corresponding to each logical page in the logical address range to be inspected is determined. The physical page carrying information includes the physical block information where the physical page is located, the write generation information, and the erase / write generation information. Based on the physical page carrying information, the physical mapping generational dispersion corresponding to the logical address range to be inspected is determined. The physical mapping generational dispersion is used to characterize the difference in carrying status between physical pages corresponding to different logical pages within the same logical address range to be inspected. When the physical mapping generational dispersion meets the preset dispersion condition, the logical address range to be inspected is divided into multiple physical risk subsets, wherein the physical pages corresponding to the logical pages in the same physical risk subset have the same or similar write generation information and erase generation information. Data inspections are performed on the multiple physical risk subsets respectively to obtain the inspection results corresponding to each physical risk subset. Based on the inspection results corresponding to each physical risk subset, the data health status of the logical address range to be inspected is determined.

[0006] Secondly, the present invention also proposes a solid-state drive data inspection system, the system comprising: The determining unit is used to determine, based on the flash translation layer mapping information of the solid-state drive, the physical page carrying information corresponding to each logical page within the logical address range to be inspected, wherein the physical page carrying information includes the physical block information, write generation information, and erase / write generation information of the physical page; and based on the physical page carrying information, to determine the physical mapping generation dispersion corresponding to the logical address range to be inspected, wherein the physical mapping generation dispersion is used to characterize the difference in carrying status between the physical pages corresponding to different logical pages within the same logical address range to be inspected; The partitioning unit is used to divide the logical address range to be inspected into multiple physical risk subsets when the physical mapping generation dispersion meets the preset dispersion conditions. The physical pages corresponding to the logical pages in the same physical risk subset have the same or similar write generation information and erase generation information. The inspection unit is used to perform data inspection on the multiple physical risk subsets respectively, obtain the inspection results corresponding to each physical risk subset, and determine the data health status of the logical address range to be inspected based on the inspection results corresponding to each physical risk subset.

[0007] Thirdly, an electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program stored in the memory to implement the steps of the solid-state drive data inspection method as described in any of the first aspects above.

[0008] Fourthly, the present invention also proposes a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the solid-state hard disk data inspection method of any of the above claims in the first aspect.

[0009] In summary, the solid-state drive (SSD) data inspection method proposed in this application can solve the problem of logical continuity masking physical differences. Traditional inspection methods tend to assume that data with consecutive logical addresses have similar health conditions, but off-site writes, garbage collection, wear leveling, and mapping updates within the SSD render this assumption invalid. This solution, by acquiring flash memory translation layer mapping information and physical page carrying information, can identify intergenerational mixing of physical pages within the same logical address range. SSD data failures are often not due to the entire logical range deteriorating simultaneously, but rather a small number of physical pages or blocks experiencing increased error correction pressure, increased read retries, or increased data retention risk first. If the average result is still calculated for the entire logical range, a small number of abnormal pages can easily be diluted by a large number of normal pages. This solution divides the logical address range to be inspected into multiple physical risk subsets, allowing high-risk pages to be statistically analyzed and evaluated in independent subsets. In this way, even if the proportion of high-risk pages is low, they can still be identified in the inspection results of the corresponding subset. Furthermore, it enhances early risk detection capabilities. Before uncorrectable errors occur, SSDs typically exhibit early anomaly signals, such as increased error correction intensity, increased read retries, longer read latency, and increased read reference voltage adjustments. These signals may not be obvious when analyzed at the overall logical range level; however, they are more easily detected when analyzed at the level of physical risk subsets. Traditional inspection methods, if they detect a risk in a logical range, often only require refreshing, migrating, or increasing the inspection frequency of the entire logical range, easily causing unnecessary read / write overhead. This solution can pinpoint which physical risk subset the risk originates from, thus allowing measures to be taken only for the logical pages corresponding to the high-risk subset. Attached Figure Description

[0010] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit this specification. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a schematic flowchart of a solid-state drive data inspection method provided in an embodiment of this application; Figure 2 This application provides a schematic diagram of a solid-state drive data inspection system structure. Figure 3 This is a schematic diagram of a solid-state drive data inspection electronic device provided in an embodiment of this application. Detailed Implementation

[0011] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus. The technical solutions of the embodiments of this application will now be clearly and completely described in conjunction with the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them.

[0012] Understandably, some inspection methods often read data sequentially according to logical address ranges and make judgments based on the overall read results of that logical address range. For example, after reading a continuous logical address range, the average read latency, average error correction strength, and the presence of uncorrectable errors are statistically analyzed to determine whether the range is healthy. However, if most of the logical pages in that logical address range correspond to physical pages in relatively new physical blocks, while a few logical pages correspond to physical pages in physical blocks with high erase / write cycles or earlier write generations, the overall average metrics may still appear normal, and the risks of a few high-risk physical pages may be masked.

[0013] To address the issue of potential data omissions caused by traditional inspection methods that often read data sequentially according to logical address ranges and make judgments based on the overall read results of those ranges, a new solid-state drive (SSD) data inspection method is provided. Please refer to [link / reference]. Figure 1 , Figure 1 This is a schematic flowchart of a solid-state drive data inspection method provided in an embodiment of this application. In some examples, the method further includes steps S110 to S140.

[0014] S110, based on the flash memory conversion layer mapping information of the solid-state drive, determine the physical page carrying information corresponding to each logical page in the logical address range to be inspected. The physical page carrying information includes the physical block information where the physical page is located, the write generation information, and the erase / write generation information. S120, based on the physical page carrying information, determine the physical mapping generational dispersion corresponding to the logical address range to be inspected, the physical mapping generational dispersion is used to characterize the difference in carrying status between physical pages corresponding to different logical pages within the same logical address range to be inspected. S130, when the physical mapping generational dispersion meets the preset dispersion condition, the logical address range to be inspected is divided into multiple physical risk subsets, wherein the physical pages corresponding to the logical pages in the same physical risk subset have the same or similar write generation information and erase generation information.

[0015] S140, perform data inspection on the multiple physical risk subsets respectively, obtain the inspection results corresponding to each physical risk subset, and determine the data health status of the logical address range to be inspected based on the inspection results corresponding to each physical risk subset.

[0016] Understandably, before inspecting the logical address range, the flash memory translation layer mapping information can be read or obtained to determine the physical page carrying information corresponding to each logical page within the logical address range. Then, based on the differences in write generation, erase generation, and physical block distribution among the physical pages, the intergenerational dispersion of the physical mapping corresponding to the logical address range can be calculated. If the dispersion is high, it indicates that although the logical address range is logically continuous, the internal physical carrying state varies greatly, and it is not suitable to use it as a whole inspection unit for average judgment. Therefore, the logical address range is divided into multiple physical risk subsets according to the same or similar physical carrying states, and then inspection is performed on each physical risk subset separately.

[0017] For example, the logical address range to be inspected can be determined by the host inspection program, the storage management module, or the internal inspection module of the solid-state drive controller. If the inspection is initiated by the host, the host can obtain the logical block address range corresponding to a certain file or partition based on the file system metadata and send an inspection request to the solid-state drive. If the inspection is initiated internally by the solid-state drive, the controller can select a certain range of logical pages as the logical address range to be inspected based on the internal inspection plan. For example, in a database server, the inspection system can first determine the logical address range corresponding to the database index file. This logical address range may be represented at the host level as a data range starting from a certain logical block address and having a length of several megabytes. As another example, in industrial edge devices, the inspection system can select a configuration backup file that has not been read by the business for a long time as the inspection object and obtain the logical page range corresponding to the configuration backup file based on the file system mapping relationship. The obtained logical address information may include the starting logical page number, ending logical page number, number of logical pages, logical page size, the identifier of the file or data object to which it belongs, the most recent read time, the most recent write time, etc. The starting logical page number, ending logical page number, and number of logical pages are used to determine the inspection scope; the file or data object identifier can be used to generate an inspection report; the most recent read time and most recent write time can be used to help determine whether the interval belongs to cold data or data that has not been accessed for a long time.

[0018] For example, if the inspection method is executed inside the SSD controller, the controller can directly access the flash translation layer mapping table to obtain physical location information such as the physical page number, physical block number, channel number, chip number, and plane number corresponding to each logical page in the logical address range to be inspected. The controller can also obtain information such as the number of erase / write operations, bad block replacement status, and recent garbage collection operations of physical blocks from the block management table, wear leveling table, or metadata records. If the inspection method is executed by the host-side management module, mapping summary information can be obtained through the management interface, telemetry interface, or extended commands provided by the manufacturer, without directly exposing the complete physical address. For example, the SSD can return the physical bearer level corresponding to each logical page to the host, instead of returning the complete physical address. This physical bearer level can include low erase / write level, medium erase / write level, and high erase / write level, and can also include write generation grouping, migration generation grouping, or physical block risk level. This supports inspection decisions while avoiding excessive exposure of the internal implementation details of the SSD. Write generation information can be implemented in various ways. For example, the controller can assign an incrementing write sequence number to each write operation when writing data to a physical page; it can also generate write generations according to time windows, such as data written within a day belonging to the same write generation, data written within a maintenance cycle belonging to the same write generation; it can also record the write generation after migration according to the number of garbage collection relocations. Erase / write generation information can be the actual number of erase / write operations on a physical block, or a lifespan level determined by the number of erase / write operations. For example, the logical address range to be inspected contains 10,000 logical pages. After querying the mapping table, the controller finds that 8,000 logical pages are mapped to physical blocks with approximately 1,000 erase / write operations, and 2,000 logical pages are mapped to physical blocks with approximately 5,000 erase / write operations; some of these logical pages were written in the last week, while others were written six months ago and have not been refreshed since. At this point, although these logical pages belong to the same logical address range on the host side, their internal physical bearer states are already significantly different.

[0019] For example, the physical mapping generational dispersion can be determined based on write generational differences and erase generational differences. Write generational differences can be determined by the difference between the maximum and minimum write generations within the logical address range to be inspected, or by the variance, standard deviation, or quantile difference of the write generational distribution. Erase generational differences can be determined by the difference between the maximum and minimum erase counts of the physical block containing each physical page, or by the proportion of pages with different erase levels. For instance, the erase counts of the physical blocks corresponding to each logical page within the logical address range to be inspected can be divided into low erase range, medium erase range, and high erase range. If a large number of low erase range pages and a small number of high erase range pages exist simultaneously within the same range, the physical mapping generational dispersion is high. Alternatively, the proportion of high erase range pages in the range can be calculated; if the proportion is not high but its erase count is much higher than the range average, it can also be considered a high dispersion state. As another example, write generational information can be converted into the interval between the write time and the current time. If, within the same logical address range, some logical pages were recently written while others have been stored for over a year, the difference in write generation is significant. If these long-stored logical pages happen to be located in high-erase-repeat physical blocks, the intergenerational dispersion of the physical mapping within that logical range should be further increased. In practical implementations, the intergenerational dispersion of the physical mapping can be a comprehensive score. For example, the controller can generate a dispersion score based on the difference in erase-repeat generations, the difference in write generations, the number of physical blocks distributed, and the proportion of high-risk pages. The higher the score, the more inconsistent the physical bearer status within the same logical range. This score does not need to expose the specific physical address to the user, but it can serve as a basis for inspection scheduling and risk assessment.

[0020] For example, logical pages within the logical address range to be inspected can be grouped according to their write generation and erase generation. For instance, logical pages whose physical block erase counts are below a first threshold are assigned to a first physical risk subset; logical pages whose erase counts are between the first and second thresholds are assigned to a second physical risk subset; and logical pages whose erase counts are above the second threshold are assigned to a third physical risk subset. For each erase range, logical pages can be further subdivided according to their write generation. For example, the logical address range to be inspected contains 100,000 logical pages. After querying the physical page carrying information, it is found that 70,000 logical pages correspond to low-erasure physical blocks, 20,000 logical pages correspond to medium-erasure physical blocks, and 10,000 logical pages correspond to high-erasure physical blocks. If most of the logical pages in these high-erasure physical blocks belong to earlier write generations, they can be divided into a high-risk subset; low-erasure logical pages that have been recently written are divided into a low-risk subset; and medium-erasure logical pages that have been written for a longer period are divided into an intermediate-risk subset. During subsequent inspections, inspection results are output for each subset. The preset dispersion conditions can be set according to the actual application scenario. For example, when the difference between the maximum and minimum erase / write generations within the same logical address range exceeds a preset difference, the preset dispersion condition is considered met; or when the proportion of high-risk physical pages exceeds a preset ratio, the preset dispersion condition is considered met; or when the write generation span exceeds a preset time range, and the erase / write generation difference exceeds a preset difference, the preset dispersion condition is considered met. It should be noted that even if the proportion of high-risk pages is very low, it may not be negligible. For example, in the system boot sector, database metadata area, or configuration file area, even if only a small number of logical pages are in high-risk physical blocks, it may cause the entire business to become unavailable. Therefore, the preset dispersion conditions can be further set in conjunction with data importance or business scenario. For highly important data, a lower dispersion trigger threshold can be used; for rebuildable cached data, a higher trigger threshold can be used.

[0021] For example, data can be read from logical pages in each physical risk subset, and inspection metrics during the reading process can be recorded. Inspection metrics may include whether the read was successful, whether uncorrectable errors occurred, read latency, number of read retries, error correction bits, number of error correction iterations, number of read reference voltage adjustments, and page verification results. For high-risk subsets, a more stringent inspection method can be adopted. For example, multiple read verifications can be performed on high-write-generation subsets to observe the stability of the read results; end-to-end verification can be performed on early-write-generation subsets to determine if the read data matches the original verification value; and for subsets with a large number of read reference voltage adjustments, the changing trend in subsequent inspections can be recorded. For low-risk subsets, a normal read verification method can be used to reduce inspection resource consumption. For example, after dividing a logical address range into three physical risk subsets, the inspection system can first perform a full verification on the high-write-generation subset, recording the error correction bits and read retries for each logical page; then perform sampling verification or normal reading on the medium-write-generation subset; and finally perform a lightweight inspection on the low-write-generation subset. This approach prioritizes the identification of high-risk areas without over-inspecting the entire logical address range. Inspection results can be output as subsets of physical risks. For example, if the first physical risk subset is successfully read and has low error correction strength, it is considered normal; if the second physical risk subset is successfully read but the error correction strength is close to the threshold, it is considered cautionary; if the third physical risk subset shows multiple read retries, it is considered to have local bearer risk. This approach provides more detailed results than simply stating that the logical range is normal or abnormal.

[0022] For example, a subset health assessment result can be generated for each physical risk subset. The subset health assessment result can be determined based on a combination of read success rate, uncorrectable errors, error correction strength, read retries, read latency, erase / write generations, and write generations. If all physical risk subsets fail to meet the risk conditions, the logical address range to be inspected can be considered healthy. If a subset shows increased error correction strength but has not yet reached the level of uncorrectable errors, the overall status can be determined as having local bearer risk. If a subset experiences uncorrectable errors or end-to-end verification inconsistencies, the overall status can be determined as abnormal, triggering data recovery or migration. For example, a logical address range to be inspected is divided into low-risk, medium-risk, and high-risk subsets. The low-risk subset reads normally, the medium-risk subset reads normally but with slightly higher error correction strength, and the high-risk subset reads successfully but experiences multiple read retries. In this case, traditional overall inspection might determine that the logical range is normal; however, this solution will determine the data health status of the logical range as having local bearer risk and can indicate in the inspection report that the risk originates from the high erase / write generation subset. In another implementation, the data health status can output not only the overall level but also the location information of risk subsets. For example, the report can record the logical page range corresponding to the risk subset, the source of the risk, the corresponding physical bearer level, and the recommended handling method. Due to security or vendor protection considerations, the report may not necessarily need to expose the actual physical address; it can only output the logical page set and its risk type.

[0023] In some examples, determining the physical mapping generational dispersion corresponding to the logical address range to be inspected based on the physical page bearer information includes: Based on the write generation information of the physical pages corresponding to each logical page within the logical address range to be inspected, the write generation difference value is determined. Based on the erase / write generation information of the physical block where the physical page corresponding to each logical page in the logical address range to be inspected is located, the erase / write generation difference value is determined. The generational dispersion of the physical mapping is determined based on the write generation difference value and the erase generation difference value.

[0024] For example, the solid-state drive controller or inspection management module can first obtain the physical page carrying information corresponding to each logical page within the logical address range to be inspected. For each logical page, the write generation information of its corresponding physical page and the erase generation information of the physical block to which the physical page is located are recorded. The write generation information can be represented by an incremental number. For example, each time the solid-state drive completes a data page write or valid data transfer, a write sequence number is recorded for the corresponding physical page. A smaller write sequence number indicates an earlier write, and a larger write sequence number indicates a later write. The write generation information can also be represented by a time window, for example, marking data written within a day as the same write generation, and marking data written within a maintenance cycle as the same write generation. For inspection, it is not necessary to record the precise write time, as long as the differences in the order of writes of each logical page within the same logical address range can be distinguished. The erase generation information can be represented by the actual number of erases and writes of the physical block, or by the erase level. For example, physical blocks with low write cycles are marked as the first lifespan level, those with intermediate write cycles as the second lifespan level, and those with high write cycles as the third lifespan level. For SSDs where it's inconvenient to directly expose the actual write cycles, only the write generation range or write level can be provided to the inspection module. When determining the write generation difference, the difference between the maximum and minimum write generations can be used. For example, if the earliest write generation in a certain logical address range to be inspected is generation 100 and the latest write generation is generation 900, then the write generation span is large. Alternatively, the dispersion of write generations can be used for calculation, such as calculating the deviation of each logical page's write generation from the average write generation, or calculating the proportion of early and late written logical pages. When determining the write generation difference, the difference between the maximum and minimum write cycles of the corresponding physical block can be used. For example, within the same logical address range, some logical pages may reside in physical blocks with a write / erase count of several hundred, while others may reside in physical blocks with a write / erase count of several thousand. In such cases, the write / erase generation difference value will be high. This can also be determined by methods such as the proportion of pages in high-write-count physical blocks, the span of the write / erase level distribution, and the write / erase level variance. After obtaining the write / erase generation difference values, the physical mapping generation dispersion can be determined according to preset weights. For example, for archived data, more attention is paid to write time and data retention risk, so the write / erase generation difference value can have a higher weight; for frequently updated data, more attention is paid to physical block wear, so the write / erase generation difference value can have a higher weight. Alternatively, when both difference values ​​are large, the dispersion score can be increased to indicate the simultaneous existence of early write risk and high wear risk.

[0025] In some examples, when the intergenerational dispersion of the physical mapping meets a preset dispersion condition, the logical address range to be inspected is divided into multiple physical risk subsets, including: When the physical mapping generational dispersion is greater than a preset dispersion threshold, the logical pages in the logical address range to be inspected are divided into different physical risk subsets according to the erase / write generation range of the physical block where the corresponding physical page is located. The physical risk subsets corresponding to higher erase / write generation ranges are configured to have higher inspection priority than the physical risk subsets corresponding to lower erase / write generation ranges.

[0026] For example, a preset discrete threshold is first set. This threshold can be set based on the SSD type, NAND type, business importance, historical error rate, or device lifespan stage. For instance, for enterprise-grade SSDs, the discrete threshold can be set lower to detect local risks earlier; for ordinary cache data areas, the discrete threshold can be set higher to reduce unnecessary inspections. When the calculated physical mapping generational dispersion is greater than the preset discrete threshold, it indicates that the physical carrying capacity within the logical address range to be inspected varies significantly, requiring subset partitioning. In this case, groups can be formed according to the erase / write generation range of the physical block to which each logical page belongs. For example, logical pages with erase / write counts below the first threshold are classified into the low erase / write risk subset, logical pages with erase / write counts between the first and second thresholds are classified into the medium erase / write risk subset, and logical pages with erase / write counts above the second threshold are classified into the high erase / write risk subset. If the SSD does not directly use the actual erase / write count but uses erase / write levels, it can also be partitioned according to erase / write levels. For example, logical pages with a low wear level are assigned to the first subset, logical pages with a medium wear level to the second subset, and logical pages with a high wear level to the third subset. During the partitioning process, logical pages within the same physical risk subset are not required to be logically contiguous. For instance, if the 10th, 300th, and 9000th logical pages in a given logical address range all correspond to high-write-risk physical blocks, they can be grouped together into the high-write-risk subset. Thus, the inspection grouping is based on physical bearer status, not on host-side logical address contiguousness. When setting inspection priorities, the high-write-risk subset can be configured as the highest priority, the medium-write-risk subset as the second highest priority, and the low-write-risk subset as the normal priority. The inspection system can inspect the high-write-risk subset first, then the medium-write-risk subset, and finally the low-write-risk subset. The inspection cycle can also be differentiated. For example, the high-risk subset is executed every inspection cycle, the medium-risk subset is executed every few inspection cycles, and the low-risk subset is executed only during full inspection.

[0027] In some examples, the step of performing data inspections on the multiple physical risk subsets respectively to obtain the inspection results corresponding to each physical risk subset includes: Read the data corresponding to the logical pages in each physical risk subset, and record the error correction strength information, read retry information and read delay information generated during the reading process; Based on the error correction intensity information, the read retry information, and the read delay information, the subset health evaluation result corresponding to each physical risk subset is determined, wherein the error correction intensity information includes at least one of the following: error correction bit length, error correction iteration number, or read reference voltage adjustment number.

[0028] For example, the inspection system initiates a read operation on logical pages within each subset of physical risks. For each read, the SSD controller or inspection module records the read metrics corresponding to that logical page. Error correction strength information may include at least one of the following: error correction bit length, number of error correction iterations, or number of read reference voltage adjustments. Error correction bit length indicates how many error bits were actually corrected by the ECC (Error Correction Code) during data reading. Error correction iterations indicate how many rounds of calculation the controller performed to complete error correction when using iterative error correction or soft-decision reading. The number of read reference voltage adjustments indicates how many times the controller adjusted the read reference voltage to correctly read the NAND cell state. Generally, the more error correction bits, the more error correction iterations, and the more read reference voltage adjustments, the closer the data page is to a difficult-to-read state. Read retry information may include the number of read retries, the read parameters used for retries, and whether the read was switched from normal to enhanced reading. For example, if a logical page fails to meet the verification requirements on the first read, the controller may reread it one or more times until the data is finally read. Although the final result is a successful read, the multiple retries themselves indicate that the reliability of the page has decreased. Read latency information can include single-page read time, subset average read time, read latency percentile, or the increase relative to historical read latency. Increased read latency may stem from increased error correction iterations, increased read retries, or internal controller adjustments to read parameters. Therefore, read latency can serve as an indirect but easily statistically significant risk indicator. When determining subset health assessment results, the above indicators can be statistically analyzed for each physical risk subset. For example, the subset's average number of error correction bits, maximum number of error correction bits, percentage of retried pages, average read latency, and percentage of high-latency pages can be calculated. If a subset's error correction strength is significantly higher than other subsets, even without uncorrectable errors, the subset can be assessed as a high-risk or high-probability subset. If a subset shows a sustained increase in read retries, it can be assessed as exhibiting a degradation trend. If a subset's read latency suddenly increases, it can be assessed as requiring close monitoring.

[0029] In some examples, determining the data health status of the logical address range to be inspected based on the inspection results corresponding to each subset of physical risks includes: If the inspection result corresponding to any physical risk subset meets the preset risk conditions, the data health status of the logical address range to be inspected is determined to have local bearer risk. The preset risk conditions include at least one of the following: the error correction intensity information of the physical risk subset exceeds the preset error correction threshold, the read retry information exceeds the preset retry threshold, the read latency information exceeds the preset latency threshold, or the erase / write generation information of the physical block corresponding to the physical risk subset exceeds the preset erase / write threshold.

[0030] For example, the system can set preset risk conditions for each physical risk subset. Preset error correction thresholds can be set based on ECC capability, historical error correction distribution, NAND type, or device lifespan stage. For instance, if the average number of error correction bits for a subset exceeds a preset value, or exceeds the historical normal range of the device, then the subset is considered to meet the error correction risk conditions. The maximum number of error correction bits or the proportion of pages with high error correction can also be used as the judgment criteria. Preset retry thresholds can be set based on the number of read retries or the proportion of retry pages. For instance, if more than a certain proportion of logical pages in a subset require read retries, or if any logical page is retried multiple times consecutively, then the subset is considered to meet the read retry risk conditions. Read retries usually indicate that the normal read parameters are insufficient to stably read the data page, thus having a strong risk indication significance. Preset latency thresholds can be set based on the absolute value or relative change in read latency. For instance, if the average read latency of a subset exceeds several times that of the normal subset, or shows a significant increase compared to the last inspection, then the subset can be considered to meet the read latency risk conditions. While increased read latency doesn't necessarily indicate a direct data error, it often reflects a more complex error correction and retry process. Preset erase / write thresholds can be set based on the number of erase / write cycles of physical blocks or their lifespan levels. For example, when the erase / write cycles of physical blocks corresponding to a subset of physical risks exceed the device's preset lifespan risk range, this subset can be considered to meet the risk conditions even if the current read metrics are not abnormal. This allows for early identification of data pages whose media lifespan is approaching the risk boundary. When determining the overall data health status, if any subset of physical risks meets any of the above risk conditions, the data health status of the logical address range to be inspected can be determined to have localized bearer risk. For example, if a logical address range to be inspected is divided into three subsets, the first and second subsets are normal, and the third subset, although containing only a few logical pages, has read retries exceeding the preset retry threshold, then the entire logical address range should not be considered completely healthy but should be considered to have localized bearer risk. This health status can also include a description of the risk source. For example, outputting that the logical address range has localized bearer risk, the risk source is a high-erasing-cycle subset, and the risk manifests as error correction intensity exceeding the threshold. This allows the subsequent system to refresh, migrate, or increase the inspection frequency only for that subset.

[0031] In some cases, garbage collection or wear leveling can alter the physical page where data resides, making it appear as if the data has been rewritten to a new physical block. However, this data may have originated from a weak page that was difficult to read before the migration. If the migration process doesn't preserve this weak page origin information, subsequent inspections might treat this data as ordinary newly written data, thus underestimating its risk. During garbage collection, SSDs read still-valid data from the old physical block and then write it to the new physical block. Superficially, after migrating the data to the new physical page, its current physical condition seems improved. However, if the old physical page exhibits high error correction strength, multiple read retries, read reference voltage adjustments, or a poor original physical block lifespan, it indicates that the data was already close to read limits before the migration. Even if it is eventually read and written to the new block, the risk cannot be simply assumed to have completely disappeared. On the one hand, high error correction strength before migration indicates that there are already many data errors in the old physical page, and the controller only recovered the data through the error correction mechanism. On the other hand, if the read process approaches the boundary of the error correction capability, there is a risk of boundary-based false correction, silent content deviation, or failure to perform timely upper-level verification after migration. If subsequent inspections are based solely on the number of erase / write cycles and write times of the new physical page, it may incorrectly classify the data as low-risk data. Based on this, some examples also include: During the process of garbage collection or wear leveling migration of solid-state drives, the pre-migration read quality information generated when the migrated data pages are read from the original physical pages is obtained. The pre-migration read quality information includes at least one of the following: pre-migration error correction strength information, pre-migration read retry information, pre-migration read reference voltage adjustment information, and original physical block lifetime status information. If the quality information read before the migration meets the preset weak page source conditions, a weak page source mark is added to the logical page corresponding to the data page to be migrated; After the moved data page is written to the new physical page, the weak page source mark is associated with the new physical page carrying information of the logical page and stored, so that when determining the generational dispersion of the physical mapping or performing data inspection, the weak page source mark can be used as the basis for risk assessment of the logical page.

[0032] In some examples, it also includes: When performing data inspection on logical pages with the attached weak page source marker, the inspection intensity is higher than that for logical pages without the attached weak page source marker. This higher inspection intensity includes shortening the inspection cycle of the logical page, increasing the number of data read verifications of the logical page, performing end-to-end verification on the logical page, comparing the data corresponding to the logical page with the redundant replica for consistency, or migrating the data corresponding to the logical page to at least one of the following when the inspection result of the logical page meets the preset migration conditions:

[0033] For example, when a solid-state drive (SSD) performs garbage collection relocation or wear leveling relocation, the controller reads valid data from the original physical pages. During the reading process, the controller records read quality information before migration. This pre-migration read quality information may include at least one of the following: pre-migration error correction strength information, pre-migration read retry information, pre-migration read reference voltage adjustment information, and original physical block lifetime status information. Pre-migration error correction strength information may include the number of error correction bits, the number of error correction iterations, or the proportion of error correction capability used when reading the original physical pages. A high number of error correction bits indicates that the original physical page data has many error bits. Pre-migration read retry information may include whether a retrieval occurred when reading the original physical page, the number of retries, and whether an enhanced read method was used. Pre-migration read reference voltage adjustment information may include the number of times the read reference voltage was adjusted or the adjustment range used to read the original physical page data. Original physical block lifetime status information may include the number of times the original physical block has been erased / written, the bad block proximity status, the historical error rate, or whether it belongs to the high-risk physical block range. The controller can set preset weak page source conditions. For example, if the number of error correction bits exceeds a preset error correction threshold, the number of read retries exceeds a preset retry threshold, the number of read reference voltage adjustments exceeds a preset adjustment threshold, or the original physical block lifetime reaches a high-risk level, the data page to be migrated is determined to originate from a weak page. Once the conditions are met, the controller adds a weak page source tag to the logical page. This weak page source tag can be stored in flash conversion layer metadata, a logical page risk table, data page extension metadata, or an inspection management table. This tag is associated with the new physical page carrying information of the logical page. Thus, even if the logical page is written to a new low-write physical block, subsequent queries of its physical page carrying information will still reveal that the data originated from a difficult-to-read original physical page. In subsequent inspections, logical pages with added weak page source tags can be inspected with a higher intensity than ordinary logical pages. For example, the inspection cycle of the logical page can be shortened, the number of read verifications increased, end-to-end verification performed, the data corresponding to the logical page compared with redundant copies for consistency, or the data corresponding to the logical page can be migrated to a low-risk physical block when the inspection results meet the migration conditions. For example, a valid data page is read from a high-write-rate physical block during garbage collection. The controller fails to read it on the first attempt, but succeeds on the second attempt after adjusting the read reference voltage, and the error correction bits are close to the preset threshold. A typical SSD might simply write the corrected data to the new physical block and consider the migration complete. This solution, however, records the poor read quality of the data page before migration and adds a weak page source marker to it. During subsequent inspections, even if the data is located in a new physical block, it will be prioritized for verification.

[0034] In some cases, considering compression, deduplication, snapshots, cloning, virtual disks, container image layers, or backup systems, an underlying data block may be referenced by multiple logical objects. In this case, although the underlying data block corresponds to only one copy of the data on the physical medium, it may correspond to multiple files, multiple snapshot versions, multiple virtual disk blocks, multiple container image layers, or multiple backup objects in the upper-layer business logic. If the underlying data block experiences media degradation or read anomalies, its impact is not the same as that of a normal data block, but may simultaneously affect a large number of logical objects. Ordinary SSD inspections typically focus on physical media health, such as write cycles, error correction strength, read retries, and read latency; ordinary file system inspections focus on whether a file or object can be read and whether it is consistent. However, the physical risk of an underlying data block is not consistent with the scope of upper-layer logical references. A seemingly ordinary physical page, if referenced by multiple snapshots or multiple virtual disks, will have amplified consequences if it is damaged; another physical page, even if its media condition is similar, but it is only referenced by a rebuildable cache file, will have a smaller impact if it is damaged. Based on this, some examples also include: Obtain logical reference information for data blocks corresponding to each logical page within the logical address range to be inspected. The logical reference information includes at least one of the following: the number of data blocks referenced by files, snapshots, virtual disks, container image layers, or backup objects. Based on the logical reference information, determine the logical reference amplification factor corresponding to the data block; If the logical reference amplification factor corresponding to the data block meets the preset reference amplification condition, increase the inspection priority of the physical risk subset where the data block is located, or increase the inspection intensity of the logical page corresponding to the data block in the physical risk subset.

[0035] For example, the host-side storage management module, file system, object storage system, virtualization platform, or container image management system can statistically analyze the logical reference information of the data blocks corresponding to each logical page within the logical address range to be inspected. Logical reference information can include how many files reference the data block, how many snapshots reference it, how many virtual disks reference it, how many container image layers reference it, or how many backup objects reference it. For storage systems that support deduplication, the reference count corresponding to each underlying data block can be recorded in the deduplication index table. For example, if the same data block is hit by multiple backup versions, the deduplication index table can record the number of references to that data block. For file systems that support snapshots, the snapshot metadata can record which snapshot versions share a certain data block. For virtualization platforms, the virtual disk mapping layer can record whether a certain underlying block is jointly referenced by multiple virtual machine templates, clone disks, or differential disks. For container image repositories, the number of image versions or container instances that depend on a certain image layer data block can be statistically analyzed. After obtaining the logical reference information, the logical reference amplification factor can be determined. The logical reference amplification factor is not necessarily equal to the number of references; it can also be calculated by considering the importance of the referenced object, the difficulty of recovery, and the business criticality. For example, even with ten references, if all originating from temporary cache objects, the impact might be less than that of a data block referenced by a key backup file, a database base image, and multiple production virtual machines. Therefore, the logical reference amplification factor can be determined based on the number of references and the weight of the referenced objects. During inspection execution, the logical reference amplification factor can be associated with the aforementioned physical risk subset. For example, if a data block belongs to a physical risk subset with a medium erase / write generation, but its logical reference amplification factor is high, the inspection priority for that subset can be increased, or a more intensive inspection can be performed on the logical page corresponding to that data block within that subset. More intensive inspections can manifest as more frequent read verification, stricter end-to-end verification, more read stability tests, or prioritizing consistency comparisons with redundant copies. For example, an enterprise backup system performs incremental backups on multiple servers. Due to the large number of identical system file contents, the deduplication system only saves one copy of the underlying data block. This underlying data block is referenced by hundreds of backup objects. A normal inspection might consider the physical page containing this block to have low current error correction strength and not require priority processing. However, this solution will identify data blocks with a high logical reference amplification factor, and therefore classify them as high-priority inspection targets even if their media risk is only slightly increased.

[0036] In some cases, considering that after an abnormal power outage, the data that truly poses a consistency risk is not necessarily all recently written data, but often concentrated in boundary-state data where flash translation layer mapping changes have not yet been stably committed, or have just been committed but have not yet undergone sufficient verification. When SSDs process host writes, they don't simply write data to physical pages. This typically involves data page writing, intra-page verification, mapping log writing, mapping table updates, old physical page invalidation, and garbage collection metadata updates. During these processes, the data itself and the logical-to-physical mapping relationship need to remain consistent. If an abnormal power outage occurs in the middle of a commit phase, situations may arise where a data page has been written but the mapping table has not yet pointed to that page, or the mapping table has pointed to a new page but the new page verification has not yet been completed, or an old page has been marked as invalid but the new mapping has not yet been stably saved. Inspections after a typical abnormal power outage may take two approaches. One is to scan all recently written data, which covers a large area and incurs high inspection costs; the other relies solely on the SSD's own recovery mechanism, which may not be able to perform more detailed health checks on data in boundary states. Neither of these approaches accurately captures the true concentration of risk after an abnormal power outage. Based on this, some examples also include: After detecting an abnormal power failure event of the solid-state drive, the mapping change records within a preset time range before the abnormal power failure event are obtained. The mapping change records include at least one of the following: logical page corresponding data page write status, page in-verification status, mapping log write status, mapping table effective status, and old physical page failure status. Based on the mapping change record, the target logical page that is in the mapping submission boundary state is determined; The target logical page is divided into a power outage risk inspection subset, and priority inspection is performed on the power outage risk inspection subset to determine the data health status corresponding to the target logical page.

[0037] For example, a solid-state drive (SSD) controller can record mapping change records during normal operation. These records can include information such as logical page number, old physical page number, new physical page number, data page write status, page checksum status, mapping log write status, mapping table active status, and old physical page invalidation status. For instance, when the host writes a logical page, the controller first writes the data to the new physical page, recording the data page write phase; after writing, it performs page checksum verification, recording the page checksum status; then, it writes the mapping relationship from the logical page to the new physical page to the mapping log, recording the mapping log write status; next, it points the logical page in the mapping table to the new physical page, recording the mapping table active status; finally, it marks the old physical page as invalid, recording the old physical page invalidation status. When an abnormal power outage event is detected, such as based on a power failure flag, power recovery record, abnormal shutdown count, or controller reset reason, the controller reads the mapping change records within a preset time range before the power outage during the recovery process. This preset time range can be determined based on the controller's cache flush cycle, mapping log commit cycle, power failure protection capability, and service write rate. For example, mapping change records from milliseconds to seconds before a power outage can be read, as well as mapping change records not yet marked as stable commits. Based on these mapping change records, target logical pages in a mapping commit boundary state can be identified. For instance, if a logical page's data page write status is "written," but its internal verification status is "incomplete," then that logical page is in a risky state. If a logical page's new mapping log only contains partial content, or if the mapping table's effective status differs from the mapping log's status, it can also be determined to be in a mapping commit boundary state. If an old physical page has been marked as invalid, but the new physical page has not yet undergone post-power outage verification, then that logical page can also be listed as a target logical page. After identifying the target logical pages, these target logical pages are divided into a power outage risk inspection subset. During inspection, the corresponding new and old physical pages can be read, and the internal checksum, write sequence number, version number, mapping log status, and logical page content checksum can be compared. If the new physical page data is complete and the mapping log matches the mapping table, the new mapping is confirmed to be valid. If the new physical page verification fails but the old physical page remains valid, it can be rolled back to the old physical page. If both the new and old physical pages have anomalies, a request can be made to restore from the upper-layer copy or backup. For example, an industrial control device experiences an abnormal power outage while recording its operation log. Before the power outage, several logical pages were being written, and some data pages had already been written to the new physical page, but the mapping log had not yet been fully committed. After the device is powered back on, this solution will not perform an inefficient full scan, but will instead read the mapping change records before the power outage, identify these logical pages that have not yet been stably committed, and form a subset for power outage risk inspection. By reading the new and old physical pages and their corresponding mapping states, it can be determined which data can use the new page and which data should be rolled back to the old page.

[0038] In some cases, considering that modern solid-state drive controllers adjust the read reference voltage to improve read success rate, this adaptive read capability, while improving short-term read success rate, may mask early signs of gradual instability in the NAND threshold voltage distribution. NAND Flash represents data through the threshold voltage state of storage cells. With increased write cycles, longer data storage time, increased temperature exposure, or accumulated read disturbances, the threshold voltage distribution of storage cells may drift or spread. To correctly read data, the controller adjusts the read reference voltage to distinguish data states under different threshold voltage distributions. A routine inspection that only checks if data was read successfully might assume everything is normal. However, in reality, some physical pages may require continuous adjustment of the read reference voltage to be read correctly. A continuous shift in the read reference voltage, or a change in the optimal read reference voltage for the same physical risk subset across multiple inspections, indicates that the threshold voltage distribution corresponding to that subset may be becoming unstable. Based on this, in some examples, the data inspection performed on the multiple physical risk subsets to obtain the inspection results for each physical risk subset includes: When reading the data corresponding to the logical page in each physical risk subset, record the reading reference voltage information of the corresponding physical page; Based on the reading reference voltage information recorded in multiple inspections for the same physical risk subset, the reading reference voltage drift trajectory corresponding to the physical risk subset is determined; If the read reference voltage drift trajectory meets the preset drift risk conditions, the inspection results corresponding to the physical risk subset are determined to have threshold distribution instability risk.

[0039] For example, the inspection system performs read operations on a subset of physical risks. The solid-state drive controller records the read reference voltage information used by each physical page or each physical block during the read operation. The read reference voltage information may include the initial read reference voltage, the read reference voltage at the time of successful read, the number of read reference voltage adjustments, the adjustment direction, the adjustment magnitude, and the reference voltage sequence corresponding to different read attempts. For each inspection, the system can generate a read reference voltage summary for each physical risk subset. For example, it records the average value, maximum offset value, consistency of offset direction, degree of inter-page difference, and change compared to the previous inspection for each physical page in the subset. After multiple inspections, the read reference voltage drift trajectory of the physical risk subset can be formed. The preset drift risk conditions may include various situations. For example, the read reference voltage of a physical risk subset continuously shifts in the same direction in several consecutive inspections; or the offset magnitude of the read reference voltage exceeds the preset drift threshold; or the difference in the optimal read reference voltage between different physical pages within the same subset gradually increases; or the read reference voltage drift is accompanied by an increase in the number of error correction bits, an increase in the number of error correction iterations, or an increase in the number of read retries. If one or more of the above conditions are met, it can be determined that the subset has a risk of threshold distribution instability.

[0040] In some cases, logical pages marked as canceled may not necessarily be without inspection value. A typical inspection might assume that since some logical pages have been TRIMed or canceled and currently do not hold valid data, these areas can be skipped to reduce meaningless reads. However, in some scenarios, these logical pages, while currently invalid, have a high probability of being reassigned and may re-carry important data in the future. For example, database temporary tablespaces, log rotation areas, sparse virtual disk areas, snapshot release and rewrite areas, and object storage cache areas may frequently undergo allocation, cancellation, and reassignment. If the inspection system skips these canceled areas for an extended period, the health status of the underlying candidate physical blocks may remain unverified for a long time. When these logical pages are reassigned and carry new data, if the underlying candidate physical blocks have degraded, the newly written data may quickly face read risks. Based on this, some examples also include: Obtain historical allocation information corresponding to logical pages marked as canceled within the logical address range to be inspected. The historical allocation information includes at least one of the following: the time interval between the cancellation and reallocation of the logical page, the data type after reallocation, the write frequency, and historical inspection anomaly information. Based on the historical allocation information, the redistribution probability corresponding to the logical page is determined; If the redistribution probability meets the preset redistribution conditions, a pre-inspection is performed on the candidate physical block corresponding to the logical page, or a health verification is performed on the candidate physical block before the logical page is redistributed.

[0041] For example, the system first acquires logical pages marked as canceled within the logical address range to be inspected. The canceled state can be triggered by the host through operations such as TRIM commands, unmapping commands, file deletion, snapshot release, sparse file hole punching, or object deletion. The solid-state drive controller or host storage management module records the historical allocation information of these logical pages. Historical allocation information may include at least one of the following: the time interval between canceled and reassigned logical pages, the data type after reassignment, the write frequency, and historical inspection anomaly information. The reassignment time interval is used to determine whether the logical page is frequently and quickly reused. The data type after reassignment is used to determine whether the area may carry temporary data, log data, database index data, virtual disk data, or other business data in the future. The write frequency is used to determine whether the area belongs to a frequently reused area. Historical inspection anomaly information is used to determine whether the area or its candidate physical blocks have ever experienced media risks. Based on the historical allocation information, the reassignment probability corresponding to the logical page can be determined. For example, if a logical page is canceled multiple times in the past and is usually reassigned within a very short time, its reassignment probability is high. If a logical page belongs to the database's temporary space and is released and reused daily, its reassignment probability is considered high. If a logical page is canceled and not used for a long period, its reassignment probability is low. When the reassignment probability meets the preset reassignment conditions, a pre-inspection can be performed on the candidate physical blocks corresponding to the logical page. Candidate physical blocks can be free physical blocks that the SSD controller is preparing to allocate for future writes to the logical page, or they can be potential carrying areas determined based on wear leveling strategies, free block pool status, and address allocation strategies. Pre-inspection can include checking the erase / write generations, historical error rate, bad block proximity status, read verification records, and write verification status of the candidate physical blocks. In another implementation, a health check can be performed before the logical page is reassigned. For example, when the host is about to write new data to the logical page, the controller first checks whether the physical block to be allocated meets the health conditions. If the candidate physical block's health status is poor, it is replaced with a low-risk physical block; if the candidate physical block's status is normal, writing is allowed. This reduces carrying risk before new data is written.

[0042] Please see Figure 2 One embodiment of the solid-state drive data inspection system in this application includes: The determining unit 21 is used to determine, based on the flash memory translation layer mapping information of the solid-state drive, the physical page carrying information corresponding to each logical page in the logical address range to be inspected, wherein the physical page carrying information includes the physical block information, write generation information, and erase / write generation information of the physical page; and based on the physical page carrying information, to determine the physical mapping generation dispersion corresponding to the logical address range to be inspected, wherein the physical mapping generation dispersion is used to characterize the difference in carrying status between the physical pages corresponding to different logical pages in the same logical address range to be inspected; The partitioning unit 22 is used to divide the logical address range to be inspected into multiple physical risk subsets when the physical mapping generation dispersion meets the preset dispersion conditions. The physical pages corresponding to the logical pages in the same physical risk subset have the same or similar write generation information and erase generation information. Inspection unit 23 is used to perform data inspection on the multiple physical risk subsets respectively, obtain the inspection results corresponding to each physical risk subset, and determine the data health status of the logical address range to be inspected based on the inspection results corresponding to each physical risk subset.

[0043] like Figure 3 As shown, this application embodiment also provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor. When the processor 320 executes the computer program 311, it implements the steps of any of the above-described methods for solid-state drive data inspection.

[0044] Since the electronic device described in this embodiment is the device used to implement a solid-state drive data inspection system in this application embodiment, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the method described in this application embodiment. Therefore, how the electronic device implements the method in this application embodiment will not be described in detail here. Any device used by those skilled in the art to implement the method in this application embodiment is within the scope of protection of this application.

[0045] In practical implementation, when the computer program 311 is executed by the processor, it can achieve the following: Figure 1 Any of the corresponding implementation methods in the embodiments.

[0046] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

Claims

1. A method for inspecting data on a solid-state drive, characterized in that, include: Based on the flash memory translation layer mapping information of the solid-state drive, the physical page carrying information corresponding to each logical page in the logical address range to be inspected is determined. The physical page carrying information includes the physical block information where the physical page is located, the write generation information, and the erase / write generation information. Based on the physical page carrying information, the physical mapping generational dispersion corresponding to the logical address range to be inspected is determined. The physical mapping generational dispersion is used to characterize the difference in carrying status between physical pages corresponding to different logical pages within the same logical address range to be inspected. When the physical mapping generational dispersion meets the preset dispersion condition, the logical address range to be inspected is divided into multiple physical risk subsets, wherein the physical pages corresponding to the logical pages in the same physical risk subset have the same or similar write generation information and erase generation information. Data inspections are performed on the multiple physical risk subsets respectively to obtain the inspection results corresponding to each physical risk subset. Based on the inspection results corresponding to each physical risk subset, the data health status of the logical address range to be inspected is determined.

2. The method as described in claim 1, characterized in that, The step of determining the physical mapping generational dispersion corresponding to the logical address range to be inspected based on the physical page carrying information includes: Based on the write generation information of the physical pages corresponding to each logical page within the logical address range to be inspected, the write generation difference value is determined. Based on the erase / write generation information of the physical block where the physical page corresponding to each logical page in the logical address range to be inspected is located, the erase / write generation difference value is determined. The generational dispersion of the physical mapping is determined based on the write generation difference value and the erase generation difference value.

3. The method as described in claim 1, characterized in that, When the intergenerational dispersion of the physical mapping meets a preset dispersion condition, the logical address range to be inspected is divided into multiple physical risk subsets, including: When the physical mapping generational dispersion is greater than a preset dispersion threshold, the logical pages in the logical address range to be inspected are divided into different physical risk subsets according to the erase / write generation range of the physical block where the corresponding physical page is located. The physical risk subsets corresponding to higher erase / write generation ranges are configured to have higher inspection priority than the physical risk subsets corresponding to lower erase / write generation ranges.

4. The method as described in claim 1, characterized in that, The step of performing data inspections on the multiple physical risk subsets to obtain inspection results for each physical risk subset includes: Read the data corresponding to the logical pages in each physical risk subset, and record the error correction strength information, read retry information and read delay information generated during the reading process; Based on the error correction intensity information, the read retry information, and the read delay information, the subset health evaluation result corresponding to each physical risk subset is determined, wherein the error correction intensity information includes at least one of the following: error correction bit length, error correction iteration number, or read reference voltage adjustment number.

5. The method according to any one of claims 1 to 4, characterized in that, The process of determining the data health status of the logical address range to be inspected based on the inspection results corresponding to each physical risk subset includes: If the inspection result corresponding to any physical risk subset meets the preset risk conditions, the data health status of the logical address range to be inspected is determined to have local bearer risk. The preset risk conditions include at least one of the following: the error correction intensity information of the physical risk subset exceeds the preset error correction threshold, the read retry information exceeds the preset retry threshold, the read latency information exceeds the preset latency threshold, or the erase / write generation information of the physical block corresponding to the physical risk subset exceeds the preset erase / write threshold.

6. The method as described in claim 1, characterized in that, Also includes: During the process of garbage collection or wear leveling migration of solid-state drives, the pre-migration read quality information generated when the migrated data pages are read from the original physical pages is obtained. The pre-migration read quality information includes at least one of the following: pre-migration error correction strength information, pre-migration read retry information, pre-migration read reference voltage adjustment information, and original physical block lifetime status information. If the quality information read before the migration meets the preset weak page source conditions, a weak page source mark is added to the logical page corresponding to the data page to be migrated; After the moved data page is written to the new physical page, the weak page source mark is associated with the new physical page carrying information of the logical page and stored, so that when determining the generational dispersion of the physical mapping or performing data inspection, the weak page source mark can be used as the basis for risk assessment of the logical page.

7. The method as described in claim 6, characterized in that, Also includes: When performing data inspection on logical pages with the attached weak page source marker, the inspection intensity is higher than that for logical pages without the attached weak page source marker. This higher inspection intensity includes shortening the inspection cycle of the logical page, increasing the number of data read verifications of the logical page, performing end-to-end verification on the logical page, comparing the data corresponding to the logical page with the redundant replica for consistency, or migrating the data corresponding to the logical page to at least one of the following when the inspection result of the logical page meets the preset migration conditions:

8. A solid-state drive data inspection system, characterized in that, include: The determining unit is used to determine, based on the flash translation layer mapping information of the solid-state drive, the physical page carrying information corresponding to each logical page within the logical address range to be inspected, wherein the physical page carrying information includes the physical block information, write generation information, and erase / write generation information of the physical page; and based on the physical page carrying information, to determine the physical mapping generation dispersion corresponding to the logical address range to be inspected, wherein the physical mapping generation dispersion is used to characterize the difference in carrying status between the physical pages corresponding to different logical pages within the same logical address range to be inspected; The partitioning unit is used to divide the logical address range to be inspected into multiple physical risk subsets when the physical mapping generation dispersion meets the preset dispersion conditions. The physical pages corresponding to the logical pages in the same physical risk subset have the same or similar write generation information and erase generation information. The inspection unit is used to perform data inspection on the multiple physical risk subsets respectively, obtain the inspection results corresponding to each physical risk subset, and determine the data health status of the logical address range to be inspected based on the inspection results corresponding to each physical risk subset.

9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program stored in the memory, implements the steps of the solid-state drive data inspection method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the solid-state drive data inspection method as described in any one of claims 1-7.