A method for managing bad blocks and predicting lifespan of solid-state drives

By establishing a closed-loop management system for fault classification and health assessment, the problem of misjudging false bad blocks in solid-state drive (SSD) bad block management has been solved, enabling accurate identification and adaptive adjustment, and improving the efficiency and accuracy of SSD lifespan management.

CN123114874APending Publication Date: 2026-11-17TOPDISK ENTERPRISE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611609914.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-19
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing SSD bad block management methods lack fine-grained differentiation of failure root causes, leading to misjudgments of false bad blocks and unnecessary consumption of reserved space. Furthermore, health assessments rely on device-level absolute SMART values ​​that cannot be adaptively adjusted, affecting the accuracy of lifespan predictions.

Method used

By detecting the spatial coordinates and event vectors when physical block operations fail, fault classification is performed, a spatial topology identification and diffusion pattern is constructed, a health score is assessed in combination with an individualized health baseline, and a firmware parameter configuration set is generated to trigger a gradient decommissioning mechanism, thus forming a closed-loop management link.

Benefits of technology

It achieves accurate identification and recovery of pseudo-bad blocks, reduces the false judgment rate, eliminates the impact of process technology differences, provides early fault warning and adaptive parameter adjustment, and improves the efficiency of SSD lifespan management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114874A_ABST
    Figure CN123114874A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of solid-state drive (SSD) fault prediction and health management technology. It discloses a method for SSD bad block management and lifespan prediction, comprising: when a physical block operation fails, collecting spatial coordinates and event vectors to generate block-level status markers; constructing a spatial topology and identifying diffusion patterns to obtain acceleration states and classifying warning levels; extracting degradation indicators for each die, evaluating health scores, and extrapolating and estimating remaining usable time; generating a firmware parameter configuration set; triggering a gradient retirement mechanism based on health scores and warning levels to generate a retirement action instruction set; in an array scenario, evaluating lifespan dispersion based on the estimated remaining usable time of each disk and generating an IO weight allocation scheme according to the health score ratio; issuing and executing the firmware parameter configuration set, retirement action instruction set, and IO weight allocation scheme; writing back the block state changes and bad block counts generated after execution, updating the block-level status markers and health scores, forming a closed-loop management link.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of solid-state drive (SSD) fault prediction and health management technology, and more specifically, to a method for managing bad blocks and predicting the lifespan of a solid-state drive. Background Technology

[0002] Solid-state drives (SSDs) are widely used in enterprise-level storage. NAND flash memory has multiple failure modes, such as read interference, data retention degradation, and oxide layer breakdown. However, existing bad block management methods generally lack fine differentiation of the root causes of failure, which leads to a large number of recoverable transient failures being misjudged as permanent bad blocks, accelerating the consumption of reserved space and causing SSDs to fail prematurely.

[0003] Existing solutions mostly employ a binary classification strategy that marks a bad block upon a single operation failure. They lack identification and recovery mechanisms for pseudo-bad blocks caused by abnormal power outages or sudden temperature changes. Furthermore, health assessments rely on device-level absolute SMART values, which are greatly affected by differences in manufacturing processes. Firmware parameters remain fixed and cannot be adaptively adjusted according to the actual degradation state. Some solutions introduce machine learning models for lifetime prediction, but this approach suffers from drawbacks such as poor interpretability, high computational overhead, and difficulty in generalizing across different models. Summary of the Invention

[0004] To overcome the aforementioned deficiencies of the prior art and to achieve the above objectives, the present invention provides the following technical solution: a method for managing bad blocks and predicting lifespan of a solid-state drive, comprising: S1: When a physical block operation failure is detected, the spatial coordinates and event vector of the block are collected, the fault is classified, and a block-level status marker is generated. S2: Based on the block-level status markers and spatial coordinates of each block, construct the spatial topology and identify the diffusion pattern, read the number of bad blocks in each die, obtain the acceleration status, and then combine the diffusion pattern and acceleration status to classify the warning level; S3: Call the individualized health baseline set at the factory for each die, extract the degradation index of each die relative to the individualized health baseline, and then evaluate and obtain a health score; at the same time, extrapolate the estimated remaining usable time based on the acceleration status. S4: Adjust firmware parameters based on health score, and combine warning level and diffusion mode for superimposed correction to generate firmware parameter configuration set; trigger gradient retirement mechanism based on health score and warning level to generate retirement action instruction set; in array scenario, assess lifetime dispersion based on the estimated remaining available time of each disk, and generate IO weight allocation scheme according to health score ratio. S5: Deploy and execute the firmware parameter configuration set, decommissioning action instruction set, and IO weight allocation scheme; write back the block status changes and bad block counts generated after execution, update the block-level status flags and health scores, and form a closed-loop management link.

[0005] Furthermore, the method for generating block-level state markers includes: When a physical block operation failure is detected, the spatial coordinates of the block are collected, and the triggering stress type and electrical characteristic parameters of the operation failure event are extracted simultaneously to form an event vector. Then, based on the joint matching rules of triggering stress type and electrical characteristic parameters, fault classification is performed to generate block-level status markers.

[0006] Furthermore, the method of constructing spatial topology and identifying diffusion patterns includes: Extract the block-level state markers and spatial coordinates of all abnormal physical blocks to form an abnormal block set; Using abnormal blocks as graph nodes, spatial coordinates as attributes, and spatial adjacency relationships between nodes as edges, a spatial topology graph is constructed using dies as units. Based on the spatial topology graph, diffusion patterns are identified through connected component analysis and local density statistics, including point degradation, linear diffusion, or area bursts.

[0007] Furthermore, the methods for classifying early warning levels include: Read the number of bad blocks in each die, obtain the growth rate in time sequence, and then derive the growth acceleration of the number of bad blocks; Based on the growth acceleration, the current acceleration state is determined through acceleration state determination rules; A joint early warning rule matrix is ​​pre-constructed, with diffusion patterns as rows, acceleration states as columns, and early warning levels as matrix elements. Based on the current diffusion pattern and acceleration state of the Die, the current warning level is determined by looking up a table using a joint warning rule matrix.

[0008] Furthermore, the assessment yields a health score in the following ways: Call the individualized health baseline calibrated at the factory for each die, extract the wear increment and error rate increment, and obtain the bad block ratio as a degradation indicator; Based on degradation indicators, a comprehensive assessment is conducted through a health assessment mechanism to generate a health score for each die.

[0009] Furthermore, the method for obtaining the estimated remaining available time includes: After generating a health score, the reserved block consumption status, current bad block growth rate and acceleration status of each die are extracted, and the estimated remaining available time of the die is obtained through a segmented extrapolation mechanism.

[0010] Furthermore, the method for generating the firmware parameter configuration set includes: Based on the health score, the basic firmware parameters corresponding to Die are obtained from the preset parameter mapping relationship; Then, based on the parameter correction rules and the matching correction conditions between the warning level and the diffusion mode, the corresponding correction actions are superimposed on the basic firmware parameters to generate a firmware parameter configuration set.

[0011] Furthermore, the method for generating the retirement action instruction set includes: Based on health scores and early warning levels, retirement trigger conditions are determined step by step according to preset cascading rules. When the triggering conditions are met, the retirement actions of single block retirement, die-level degradation, die-level active retirement, or disk-level security protection are triggered in sequence, generating the corresponding retirement action instruction set.

[0012] Furthermore, the method for generating the IO weight allocation scheme includes: In an array scenario, the estimated remaining available time of each member disk in the array is collected to obtain the array's lifetime dispersion. Based on lifetime dispersion, a hierarchical scheduling strategy is used to generate a differentiated IO weight allocation scheme according to the proportion of the estimated remaining available time of each disk, tilting the write load towards healthy disks.

[0013] Furthermore, the method of updating the block-level status markers and health scores to form a closed-loop management link includes: The firmware parameter configuration set, decommissioning action instruction set, and IO weight allocation scheme are sent to the firmware for execution; the block status changes and bad block counts generated after execution are obtained, and the block-level status flags and health scores are written back and updated. When a new event is written, the evaluation cycle is reached, or the health score changes, the entire process is iteratively executed, forming a closed-loop management chain.

[0014] The technical effects and advantages of the solid-state drive bad block management and lifespan prediction method of this invention are as follows: This invention focuses on the full lifecycle health management of solid-state drives, achieving adaptive closed-loop control of firmware parameters while accurately identifying the root cause of failure.

[0015] By collecting the trigger stress type and electrical characteristic parameters when the operation fails, the fault is accurately classified based on the joint matching rules. A reliable recovery process including stress elimination, state reset and dual verification is performed on the pseudo-bad blocks, which can significantly reduce the false judgment rate of pseudo-bad blocks and reduce the ineffective consumption of reserved space. By using a factory baseline correction mechanism, the degradation increment of each die relative to its initial state is used instead of the absolute threshold for health assessment, thereby eliminating the assessment bias caused by process differences. By combining spatial diffusion patterns and growth acceleration in a dual-dimensional early warning system, the qualitative inflection point can be captured before the number of bad blocks reaches its peak, thus enabling early warning of avalanche failures. Through health score-driven parameter adaptive adjustment and gradient retirement strategy, a complete closed loop from perception to execution is formed; all logic is implemented through condition judgment and state transition, without relying on any machine learning model, and can run efficiently on SSD main controller chip with extremely low computational overhead, with strong interpretability and cross-model generalization ability. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of a solid-state drive bad block management and lifespan prediction method according to the present invention; Figure 2 This is a schematic diagram of a solid-state drive bad block management and lifespan prediction system according to the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Example 1 Please see Figure 1 As shown in the figure, this embodiment of a solid-state drive bad block management and lifespan prediction method includes: S1: When a physical block operation failure is detected, the spatial coordinates and event vector of the block are collected, the fault is classified, and a block-level status marker is generated. S2: Based on the block-level status markers and spatial coordinates of each block, construct the spatial topology and identify the diffusion pattern, read the number of bad blocks in each die, obtain the acceleration status, and then combine the diffusion pattern and acceleration status to classify the warning level; S3: Call the individualized health baseline set at the factory for each die, extract the degradation index of each die relative to the individualized health baseline, and then evaluate and obtain a health score; at the same time, extrapolate the estimated remaining usable time based on the acceleration status. S4: Adjust firmware parameters based on health score, and combine warning level and diffusion mode for superimposed correction to generate firmware parameter configuration set; trigger gradient retirement mechanism based on health score and warning level to generate retirement action instruction set; in array scenario, assess lifetime dispersion based on the estimated remaining available time of each disk, and generate IO weight allocation scheme according to health score ratio. S5: Deploy and execute the firmware parameter configuration set, decommissioning action instruction set, and IO weight allocation scheme; write back the block status changes and bad block counts generated after execution, update the block-level status flags and health scores, and form a closed-loop management link.

[0019] Methods for generating block-level state flags include: When the firmware detects that a physical block has failed to be read, programmed, or erased, it acquires the spatial coordinates of that block. The spatial coordinates are composed of five-dimensional location information, including the flash memory channel number to which the block belongs, the logical number of the die (referring to a bare die, i.e., a single flash memory chip unit) within the channel, the partition number of the plane (referring to an independent storage unit partition within the die) within the die, the row number of the physical block within the plane, and the vertical layer number in the three-dimensional stacking structure. The spatial coordinate code obtained by splicing the five parts can uniquely identify the precise location of any physical block within the solid-state drive; The event vector of the operation failure event is collected synchronously, including the trigger stress type and electrical characteristic parameters; Among them, the determination of the trigger stress type is executed in order of priority from high to low. The determination is terminated and the corresponding stress type code is generated when the first condition is met. Priority 1 (highest): Read the abnormal power failure flag and the cumulative running time since the current power-on. If the abnormal power failure flag is true and the cumulative running time does not exceed 30 minutes, it is determined to be a power failure damage type. Priority 2: Read the temperature sampling sequence on the die within the most recent minute to obtain the temperature change rate; when the absolute value of the temperature change rate exceeds 5°C per minute, it is determined to be a temperature shock type; this temperature threshold is determined according to the maximum allowable value of the operating temperature change rate of NAND flash memory in the JEDEC standard. Priority 3: If the operation failure type is read failure, read the total number of times the word line where the physical block is located and the adjacent word lines have been read since the last erase; if the cumulative number of reads of the adjacent word lines exceeds the read interference threshold, it is determined to be read interference type. Priority 4: If the operation failure type is programming failure or read failure, read the cumulative number of programming operations of adjacent physical blocks of the physical block in the last 24 hours. If it exceeds the programming interference threshold, it is determined to be a programming interference type. Priority 5: If a read fails, read the data residence time of the block since the last successful write operation. If it exceeds the data retention time threshold, it is determined to be a data retention type. Priority 6 (default): If none of the above five priority conditions are met, it is judged by default as the erase / write fatigue type; It should be noted that the above-mentioned read interference threshold, programming interference threshold, and data retention time threshold were all calibrated through accelerated stress experiments on this model of NAND flash memory. While determining the trigger stress type, the electrical characteristic parameters of the physical block are extracted simultaneously: the number of ECC error correction bits is read from the decoder error correction bit register; the read retry voltage offset that enables a successful read is obtained from the flash interface reference voltage adjustment register; the number of programming verification steps experienced during the most recent successful programming is recorded from the incremental step pulse programming state machine; after the erase operation is completed, the minimum threshold voltage verification read is performed to obtain the erase saturation voltage; the spatial distribution pattern of error bits (random scattering or local clustering) is identified by statistically analyzing the dispersion of the physical locations of all error bits within the page; and the number of consecutive failures is read from the block's consecutive operation failure counter. After completing the event vector acquisition, based on the joint matching rules of triggering stress type and electrical characteristic parameters, faults are classified one by one according to the following priority: Rule R4: Stress type = power failure damage type, ECC error correction bits ≤ 50% of the upper limit of ECC error correction, and consecutive failure count = 1; Rule R5: Stress type = temperature shock type, and the voltage offset direction is consistent with the temperature change direction; Rule R3: Stress type = data retention type, voltage offset < negative retention drift judgment threshold, and error distribution = random distribution; The actual calibration method for the negative hold drift judgment threshold is as follows: a data hold acceleration experiment is performed on the NAND flash memory sample, and the average threshold voltage offset when the first correctable error occurs is recorded as the judgment threshold. Rule R1: Stress type = reading interference type, and voltage offset > positive reading interference offset judgment threshold; The actual calibration method for the positive read interference offset judgment threshold is as follows: in the accelerated read interference experiment, the average positive threshold voltage offset when the first correctable error occurs is recorded as the judgment threshold. Rule R2: Stress type = programmed interference type, and voltage offset > positive programmed interference offset judgment threshold; The actual calibration method for the forward programming interference offset judgment threshold is as follows: in the repeated programming experiments of adjacent physical blocks, the average forward threshold voltage offset when the target physical block first appears a correctable error is recorded as the judgment threshold. Rule R6: Stress type = erase fatigue type, consecutive failures ≥ 3, and programming verification step increase > 1.5 times the factory baseline; Rule R0: If none of the above rules are matched, the mechanism is classified as unknown. Based on the fault classification results, generate the block-level status flag for this physical block: For physical blocks classified as power-off pseudo-bad blocks or temperature pseudo-bad blocks, first check whether the cumulative number of programming erases is less than 90% of the manufacturer's stated maximum value. If it fails, mark it as permanently decommissioned. After successful recovery, the following reliable recovery steps are performed: Stress relief phase (for power-down damage, the die temperature returns to the normal operating range after the next full power-on cycle; for temperature shock damage, the die temperature returns to the normal operating range, typically 15°C to 55°C); State reset phase (complete erasure); Mild verification phase (using a programming voltage lower than the corresponding standard value and a pulse width longer than the corresponding standard value to perform full block write and readback verification); Standard verification phase (using standard parameters to perform full block write and readback verification again). If both rounds of verification pass, it is marked as being in a downgraded usage state; if either fails, it is marked as being in a permanently retired state. For blocks classified as data retention decay, read interference, or programming interference, they are directly marked as degraded use state; for blocks with oxide layer breakdown or unknown mechanisms, they are directly marked as permanently decommissioned state. Physical blocks marked as permanently retired are considered bad blocks; After completing the diagnosis and handling of a single physical block, a common cause fault escalation check is performed simultaneously: the total number of degraded and bad blocks in the same die in the past 24 hours is counted; if more than 3 are in the same die, more than 5 are in the same plane, or more than 2 are across dies in the same word line layer, the area is marked as a common cause high-risk area, new data writing to the area is suspended, an alarm is reported, and a full area inspection is triggered; the threshold here is set based on the reliability statistics of this model of NAND flash memory, and under normal working conditions, the upper limit of the 99% confidence interval for the number of newly added bad blocks in a single die in 24 hours is 2.

[0020] Methods for constructing spatial topology and identifying diffusion patterns include: The spatial diffusion identification process is triggered when each evaluation cycle arrives. The evaluation cycle is set to 1 hour because the hourly inspection frequency can detect the fault diffusion trend in a timely manner without causing excessive occupation of firmware computing resources. Spatial diffusion identification process: Extract all physical blocks or bad blocks that are currently in a degraded state as abnormal blocks, and integrate their block-level state flags and spatial coordinates to form an abnormal block set; Based on the set of abnormal blocks, an abnormal block is used as a graph node, the spatial coordinates carried by each node are used as attributes, the spatial adjacency relationship between nodes is used as edges, and a spatial topology graph is constructed with Die as the unit. Among them, the spatial adjacency relationship is defined as follows: two physical blocks are considered to be directly adjacent when the Manhattan distance in the coordinate space is equal to 1; the Manhattan distance is defined as the sum of the absolute values ​​of the coordinate differences of the two blocks in the five dimensions of the spatial coordinates; isolated nodes (abnormal blocks that are not adjacent to any other nodes) are retained as single-node connected components in the graph; Based on the spatial topology graph, diffusion patterns are identified through connected component analysis and local density statistics, including three types: point degradation, linear diffusion, or area burst. Specifically, the judgment logic of connected component analysis and local density statistics mechanism is as follows: If the number of nodes in all connected components of the spatial topology graph does not exceed 2, the diffusion mode is determined to be point-like degradation. If not satisfied, check in connected components with more than 3 nodes whether there is a group of nodes that are consecutively arranged in the physical block number dimension of the spatial coordinates while the other four dimensions are the same. If there are at least 3 such nodes, it is determined to be a linear spread, indicating that the fault spreads along the word line. If the conditions are still not met, all physical blocks within the Die are divided into grid cells of a fixed size. The ratio of the number of anomalous blocks in each grid cell to the total number of physical blocks in that grid cell is used as the local density. If the local density of at least one grid cell exceeds 30%, it is determined to be a planar burst. The 30% density threshold is set based on the fact that the anomalous block density of any grid cell in a single die during the normal degradation phase is usually no more than 15%, and when it exceeds 30%, the probability of a systemic collapse increases significantly. If none of the above three conditions are met, it is judged by default as point-like degradation.

[0021] The methods for classifying warning levels include: The firmware uses a 24-hour sampling period to record the cumulative number of bad blocks for each die at each sampling time, forming a time sequence. Based on this time series, the growth rate = (number of bad blocks in the current sampling period - number of bad blocks in the previous period) ÷ sampling period; Therefore, the growth rate of bad blocks = (current cycle growth rate - previous cycle growth rate) ÷ sampling period; Based on the value and duration of the increasing acceleration, the current acceleration state is determined according to the acceleration state determination rules: A preset acceleration threshold is set. If the increasing acceleration is less than the negative value of the acceleration threshold, the state is determined to be deceleration; if the absolute value of the increasing acceleration is less than or equal to the acceleration threshold, the state is uniform; if the increasing acceleration is greater than the acceleration threshold and this condition is met for three consecutive sampling periods, the state is determined to be acceleration. If the current period is already in an accelerating state and the ratio of the current cycle's growth acceleration to the previous cycle exceeds 1.5, it is determined to be in an exponential acceleration state. The acceleration threshold was calibrated through a full life cycle accelerated aging experiment, taking 100 die samples and determining the lower limit of the 95% confidence interval of the growth acceleration at the inflection point of bad block growth; The duration of the sampling period is set to 3 to eliminate instantaneous fluctuations; the acceleration ratio threshold of 1.5 is set based on the fact that the doubling time of the growth acceleration in the exponential acceleration phase is significantly shorter than that in the linear acceleration phase. Based on the current diffusion pattern and acceleration state of the die, the current warning level is determined by looking up a table using a joint warning rule matrix. The joint early warning rule matrix is ​​a preset two-dimensional mapping table, with rows corresponding to three diffusion modes, columns corresponding to four acceleration states, and matrix elements representing early warning levels (normal, attention, warning, and emergency). The specific mapping relationship is as follows: [Diffusion mode, deceleration, constant speed, acceleration, exponential acceleration]; [Pitted degeneration, normal, normal, attention, warning]; [Linear diffusion, normal, attention, warning, emergency]; [Area-like outbreak, attention, warning, emergency, emergency]; It should be noted that the mapping relationship is set based on the fact that the warning level comprehensively reflects the severity and urgency of the fault; the principle for assigning values ​​to matrix elements is that the severity of the diffusion mode increases, the urgency of the acceleration state increases, and the warning level increases monotonically. If the Die is determined to be in an emergency, it immediately suspends new data writing and sends an emergency data migration request to the host layer.

[0022] The methods for obtaining a health score include: After completing the acceleration status assessment and warning level determination, the firmware calls the individualized health baseline calibrated and stored in each die during the factory initialization phase, taking the die as the unit. This baseline is collected during SSD factory testing or initial power-on initialization and persistently stored in non-volatile memory. A separate copy is saved for each die, containing three parameters: Initial cumulative program / erase count (P / E count) baseline (the cumulative number of program / erase cycles of the die when the factory test is completed), initial raw bit error rate baseline (the average raw bit error rate of the die measured under the initial P / E count conditions), and initial threshold voltage distribution peak baseline (the main peak position of the threshold voltage distribution of the memory cells in the die in the initial state). The three baseline parameters are stored independently for each die, and the baseline values ​​can be different between different dies to eliminate the initial deviation caused by process differences in subsequent evaluation; Based on individualized health baselines, current degradation metrics for each die are extracted, including wear increment, error rate increment, and bad block ratio. Among them, wear increment = (current average P / E count - initial P / E count baseline) ÷ manufacturer's nominal maximum P / E count, with a value range of 0 to 1, is used to reflect the degree of wear accumulated since the die left the factory due to programming erasure operations; Error rate increment = (current average raw bit error rate - initial raw bit error rate baseline) ÷ ECC maximum correctable raw bit error rate. If the current value is lower than the baseline, it is 0. The value range is 0 to 1, which is used to reflect the degree of error rate degradation. Bad block ratio = current number of bad blocks ÷ total number of physical blocks in the die, with a value range of 0 to 1, used to reflect the degree of physical damage; The wear increment, error rate increment, and bad block ratio, along with the local density maximum value in all grid cells within the die, are comprehensively evaluated through a health assessment mechanism to generate a health score for each die. Specifically, the scoring logic of the health assessment mechanism is to deduct the weighted contribution of each degradation indicator from the full score benchmark of 100; that is, the three degradation indicators and the local density maximum value are each multiplied by their corresponding weight coefficients and then summed to obtain the total deduction value. The total deduction value is then subtracted from the full score benchmark to obtain the preliminary health score. Example weighting coefficients: wear increment weight is 0.25, error rate increment weight is 0.3, bad block ratio weight is 0.3, local density maximum value is 0.15, and the sum of the four weights is 1; the weighting coefficients are allocated based on: principal component analysis of accelerated life test data of this model of SSD sample, and the normalized proportion of each index to the remaining lifetime variance is used as the weight value. The initial health score ranges from 0 to 100. If the accumulated deductions exceed 100, the score is truncated to 0. If the deductions are negative, the score is truncated to 100. Finally, the preliminary health scores from the most recent 24 assessment periods are taken as the arithmetic average to obtain the final health score, in order to filter out hourly instantaneous fluctuations and not delay the response to deterioration trends.

[0023] Methods for obtaining the estimated remaining available time include: After generating a health score, a quantitative estimated remaining available time is provided for each die for reference during subsequent array-level scheduling. The specific estimation logic is as follows: Extract the total number of reserved blocks, the current number of bad blocks and their growth rate for each die, and combine them with the acceleration status. Then, use a segmented extrapolation mechanism to estimate the estimated remaining available time of the die. The prediction logic of the segmented extrapolation mechanism is as follows: When the acceleration state is deceleration or constant speed, the basic extrapolation method is used: estimated remaining available time = (total number of reserved blocks - current number of bad blocks) ÷ growth rate; during the deceleration or constant speed degradation stage, the bad block generation rate remains stable or tends to slow down, and extrapolation using the current growth rate can give a reasonable estimate of the remaining time. When the acceleration state is acceleration or exponential acceleration, a penalty correction is added to the basic extrapolation method: estimated remaining available time = (total number of reserved blocks - current number of bad blocks) ÷ (bad block growth rate + acceleration penalty term). Wherein, acceleration penalty term = absolute value of increasing acceleration × penalty coefficient; penalty coefficient is calibrated through accelerated life test: record the actual time from acceleration state to the exhaustion of reserved space, compare it with the basic extrapolated estimated time, and take the average deviation ratio; It should be noted that the purpose of introducing the penalty correction is that linear extrapolation during the accelerated degradation phase would seriously overestimate the remaining time, so a conservative correction is needed. If the number of available reserved blocks is less than or equal to 0, the estimated remaining available time is directly 0, and retirement is triggered; if the current bad block growth rate is 0 and the number of available reserved blocks is positive, the estimated remaining available time is directly the maximum upper limit, indicating that the exact exhaustion time cannot be estimated in the current state.

[0024] Methods for generating firmware parameter configuration sets include: The firmware obtains the basic firmware parameters corresponding to each die from the preset parameter mapping relationship based on the health score of each die. The parameter mapping relationship defines the firmware operating parameters corresponding to different health score ranges. The basic firmware parameters include: Bad block determination threshold: The upper limit of the original bit error rate; the threshold is relaxed if the health score is high and tightened if it is low. Write weight coefficient: The value ranges from 0 to 1, which represents the weight ratio of Die when allocating write requests in the wear leveling process. A higher health score results in a higher weight. Garbage collection trigger threshold: Effective page percentage threshold, indicating that garbage collection is triggered when the percentage of effective pages in the die is lower than this threshold; the lower the health score, the lower the threshold, resulting in earlier garbage collection; ECC protection level: indicates the strength of the error correction coding scheme used by the die; the lower the health score, the higher the level. Incremental Programming Steps: This represents the additional number of programming verification loops on top of the standard programming steps; a lower health score results in a larger increment. Data residency time limit: This indicates the maximum allowed retention time for data written to this die. The lower the health score, the shorter the limit. The calibration method for the parameter mapping relationship of the six basic firmware parameters is as follows: conduct parameter scanning experiments on the SSD sample of this model at different wear stages, record the performance and reliability indicators under each parameter combination, and optimize the goal of maximizing the total write volume while keeping the uncorrectable error rate below the target value, and establish a mapping table between health score and basic firmware parameter configuration. When the health score changes and the basic firmware parameter configuration needs to be switched, the transition is carried out in a step-by-step manner. The step size of a single adjustment is the difference between two adjacent parameter levels divided by the number of transition steps. The number of transition steps is 6, the interval between each step is 10 minutes, and the total transition time is 1 hour. If the health score changes by more than two levels, the confirmation mode is triggered: an alarm is sent to the host layer and confirmation is waited for. After a timeout of 30 minutes, the parameters are automatically switched. Based on the basic firmware parameters, through parameter correction rules, and based on the correction conditions matching the warning level and the diffusion mode, the corresponding correction actions are superimposed on the basic firmware parameters to generate a firmware parameter configuration set. The correction logic for the parameter correction rules is as follows: When the diffusion mode is linear diffusion, the ECC protection level of all physical blocks on the word line is increased by one level, and new data writing on the word line is suspended until the inspection is completed and no new bad blocks are added. When a surface burst occurs, the write weight coefficient of the die is halved, and the garbage collection trigger threshold is adjusted to the minimum value. When the warning level is at the attention level, the inspection and scanning cycle of the die is shortened by half and the data refresh frequency is increased by two times. When the alert level is warning level, perform a full block scan on the die and migrate its high-frequency access data to other healthy dies; When the warning level is emergency, a forced full data migration is triggered for this die, and then it is set to read-only isolation state after completion. When a high-risk area for common causes is identified, all new writes to that area are paused and a full area inspection is initiated. When multiple correction conditions are met simultaneously, all correction actions are executed cumulatively. If the cumulative parameters exceed the allowable range, the boundary value of the allowable range is taken. For example, if the cumulative write weight coefficient is lower than the lower limit, the lower limit is taken to ensure the minimum write capability.

[0025] Methods for generating retirement action instruction sets include: Based on health scores and warning levels, the retirement trigger conditions are determined step by step according to the preset four-level cascading rules, and the corresponding retirement actions are triggered in sequence. Specifically, the logic for determining cascading rules is as follows: The first level is single-block retirement, which is triggered when the physical block is marked as a bad block. The retirement process involves migrating the valid data of the block to a free block in the reserved block pool; adding the block's physical address to the bad block table and then removing it; updating the cumulative bad block count of the die to which it belongs; and not affecting read and write operations on other normal blocks within the same die. The second level is used for Die-level downgrade. Its retirement trigger condition is that the Die health score is continuously below 40 points for more than the continuous observation period. The continuous observation period is set to 7 days by default, because a sudden drop in a single score may be caused by occasional factors within the evaluation period. If it is continuously below the threshold for 7 consecutive days, occasional fluctuations can be ruled out. The retirement action is as follows: Die enters read-only priority mode, prohibits new writes; retains data read capability; enables background data migration; and reports a degradation alarm. If the Die remains in a downgraded state for more than 30 days and its health score does not recover to 40 points, it will automatically trigger Level 3 retirement. The third level is the Die-level voluntary retirement, which is triggered when the Die warning level is emergency, or the health score is consistently below 20 points, or when it is triggered by the second level downgrade status. The retirement process involves initiating a full data migration of the affected die to another healthy die; upon completion, it is marked as a retired die, removed, and power-isolated; its physical space is returned to the reserved block pool; read and write operations are paused during the migration, and it is completely isolated upon completion. Level 4 is disk-level security protection. Its retirement trigger conditions are: the reserved space consumption rate (equal to the total number of bad blocks ÷ the total number of reserved blocks) exceeds 80%; or the cumulative number of dies that have entered Level 3 retirement reaches more than 2; or the average health score of the entire disk dies is less than 30. The logic behind setting the 80% threshold is as follows: when only 20% of the reserved space remains, the remaining bad block replacement capability is severely insufficient, and new writing must be stopped to preserve existing data; the simultaneous retirement of two or more dies indicates that the disk has experienced large-scale systemic degradation; when most dies on the entire disk are in a low health state of 30 points, continuing to write will accelerate the aging of the entire disk, and entering write protection in advance can maximize data preservation time. The retirement action is as follows: the entire disk enters write-protected mode, all dies are prohibited from new writes; a disk-level retirement emergency alarm is sent; read functionality is maintained; the disk is switched to read-only mode. The above four-level decommissioning rules are judged in descending order of priority: the fourth-level disk-level security protection conditions are checked first, and the first-level single-block decommissioning is executed last; after each judgment, the triggered decommissioning actions are summarized and a decommissioning action instruction set is generated; the instruction set includes the execution object, action type and action parameters, and is sent to the firmware decommissioning execution unit; Single-block retirement commands are executed immediately; die-level degradation commands require modification of the die's access permissions; die-level proactive retirement commands require initiating a background migration task, which will automatically isolate the die upon completion; disk-level security protection commands immediately interrupt all write requests once triggered.

[0026] The methods for generating IO weight allocation schemes include: If the current scenario is a RAID array, the array controller collects the estimated remaining availability time of each solid-state drive in the array to obtain the array's lifetime dispersion; the lifetime dispersion is defined as the ratio of the standard deviation to the average of the estimated remaining availability time of each drive. The smaller the lifetime dispersion, the closer the degradation rate of each disk is, and the more balanced the array lifetime is; the larger the dispersion, the more significant the difference in the remaining lifetime of each disk, with some disks nearing the end of their lifetime while others still have a lot of remaining lifetime, posing a risk of associated failures. Based on lifetime dispersion, an IO weight allocation scheme is generated using a hierarchical scheduling strategy: When the lifetime dispersion is lower than the first allocation threshold, a uniform allocation strategy is matched: the IO allocation weight of each disk is equal, and the write load is evenly distributed among each member disk. When the lifetime dispersion is between the first allocation threshold and the second allocation threshold, the matching proportional allocation strategy is adopted: the IO allocation weight of each disk is proportional to its estimated remaining available time; When the lifetime dispersion exceeds the second allocation threshold, a squared ratio allocation strategy is matched: the IO allocation weight of each disk is proportional to the square of the estimated remaining available time, further tilting the write load towards healthy disks, and accelerating the widening of the write volume gap between healthy disks and sub-healthy disks. The first allocation threshold is 0.1 by default. When the standard deviation of the remaining lifespan of each disk does not exceed 10% of the mean, the array can be considered to be in a balanced state. The second allocation threshold is 0.3 by default. When the lifespan dispersion exceeds 0.3, the lifespan difference has reached a level that requires active intervention. The actual calibration method for the first and second allocation thresholds is as follows: In the array-level accelerated aging experiment, the probability of array-related failures under different lifetime dispersions is monitored; associated failures are defined as multiple disks failing successively within 72 hours; the lifetime dispersion value at which the failure probability begins to rise significantly is taken as the first allocation threshold, and the lifetime dispersion value exceeding the upper limit of the acceptable level is taken as the second allocation threshold. The generated IO weight allocation scheme is sent to the IO scheduling unit of the array controller. The scheduling unit distributes the write requests sent from the upper layer to each member disk according to the weight ratio of each disk. The disk with the higher weight gets more processing opportunities in the request queue, and the disk with the lower weight reduces the write load accordingly. The IO weight allocation scheme is regenerated after each update of the estimated remaining available time or after changes in array members, in order to adapt to changes in the degradation rate of each disk; It should be noted that the purpose of IO weight allocation is to optimize performance and resource utilization by redistributing write load resources to each disk based on the importance of different input / output (I / O) operations.

[0027] The methods for updating block-level status markers and health scores to form a closed-loop management chain include: The firmware parameter configuration set, decommissioning action instruction set, and IO weight allocation scheme are distributed to each functional unit of the firmware for execution. Specifically, the wear leveling unit adjusts write allocation according to the write weight coefficient, the garbage collection unit adjusts the collection timing according to the collection threshold, the bad block management unit adjusts bad block detection according to the judgment threshold, the decommissioning execution unit executes the corresponding level of decommissioning operation according to the decommissioning instruction, and the array scheduling unit distributes write requests according to the IO weight scheme. After the firmware execution layer runs according to the new parameters, it continuously generates new operation results and state changes, and writes back the generated block state changes and the number of bad blocks to the corresponding storage area. After the write-back is completed, update the block-level status flags of the corresponding physical blocks and the health scores of each die; Among them, block state changes include: newly detected operation failure events and their corresponding spatial coordinates, new bad block marking events, average raw bit error rate samples of each Die in the current evaluation period, and average number of program erases samples of each Die in the current evaluation period. Whenever a new operation failure event is written, the fault classification and status flag update of the block is immediately triggered in real time; When each assessment cycle arrives, the spatial diffusion identification and early warning level determination process is triggered to iterate, which in turn triggers the generation of health scores and the estimation of the remaining available time. When the health score changes by more than ±5 points, or when the warning level is raised, the firmware parameter configuration set and retirement action instruction set will be regenerated immediately. This ultimately forms a complete closed-loop management chain from perception and data collection to execution feedback and re-perception. The latest data used in each iteration comes from the results of the previous round of execution feedback, thereby ensuring that decisions at each level are always based on the current real state of the SSD.

[0028] Example 2 Please see Figure 2 As shown, parts not described in detail in this embodiment are described in Embodiment 1. A solid-state drive bad block management and lifespan prediction system is provided, including: Event Acquisition and Fault Classification Module: When a physical block operation failure is detected, the spatial coordinates and event vector of the block are acquired, the fault is classified, and a block-level status marker is generated. Diffusion monitoring and early warning assessment module: Based on the block-level status markers and spatial coordinates of each block, construct spatial topology and identify diffusion patterns, read the number of bad blocks in each die, obtain acceleration status, and then combine diffusion patterns and acceleration status to classify early warning levels; Health and lifespan assessment module: It calls the individualized health baseline set at the factory for each die, extracts the degradation index of each die relative to the individualized health baseline, and then evaluates and obtains a health score; at the same time, it extrapolates the estimated remaining usable time based on the acceleration status. Strategy and Decommissioning Scheduling Module: Adjust firmware parameters based on health scores, and combine them with early warning levels and diffusion modes for superimposed correction to generate a firmware parameter configuration set; trigger a gradient decommissioning mechanism based on health scores and early warning levels to generate a decommissioning action instruction set; in array scenarios, assess lifetime dispersion based on the estimated remaining available time of each disk, and generate an IO weight allocation scheme according to the health score ratio. Execution and closed-loop feedback module: It issues the firmware parameter configuration set, decommissioning action instruction set and IO weight allocation scheme for execution; it writes back the block status changes and bad block count generated after execution, updates the block-level status flag and health score, and forms a closed-loop management link.

[0029] Example 3 This embodiment discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the operation mode of the solid-state drive bad block management and life prediction system described above.

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

[0031] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters and thresholds in the formulas are set by those skilled in the art according to the actual situation.

[0032] The above description is merely a preferred embodiment of the present invention, and the scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for users of ordinary technical skills, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A method for managing bad blocks and predicting life of a solid state disk, characterized in that, include: S1: When a physical block operation failure is detected, the spatial coordinates and event vector of the block are collected, the fault is classified, and a block-level status marker is generated. S2: Based on the block-level status markers and spatial coordinates of each block, construct the spatial topology and identify the diffusion pattern, read the number of bad blocks in each die, obtain the acceleration status, and then combine the diffusion pattern and acceleration status to classify the warning level; S3: Call the individualized health baseline set at the factory for each die, extract the degradation index of each die relative to the individualized health baseline, and then evaluate and obtain a health score; at the same time, extrapolate the estimated remaining usable time based on the acceleration status. S4: Adjust firmware parameters based on health score, and combine warning level and diffusion mode for superimposed correction to generate firmware parameter configuration set; trigger gradient retirement mechanism based on health score and warning level to generate retirement action instruction set; in array scenario, assess lifetime dispersion based on the estimated remaining available time of each disk, and generate IO weight allocation scheme according to health score ratio. S5: Deploy and execute the firmware parameter configuration set, decommissioning action instruction set, and IO weight allocation scheme; write back the block status changes and bad block counts generated after execution, update the block-level status flags and health scores, and form a closed-loop management link.

2. The method for managing bad blocks and predicting lifespan of a solid-state drive according to claim 1, characterized in that, The methods for generating block-level state markers include: When a physical block operation failure is detected, the spatial coordinates of the block are collected, and the triggering stress type and electrical characteristic parameters of the operation failure event are extracted simultaneously to form an event vector. Then, based on the joint matching rules of triggering stress type and electrical characteristic parameters, fault classification is performed to generate block-level status markers.

3. The method for managing bad blocks and predicting lifespan of a solid-state drive according to claim 2, characterized in that, The methods for constructing spatial topology and identifying diffusion patterns include: Extract the block-level state markers and spatial coordinates of all abnormal physical blocks to form an abnormal block set; Using abnormal blocks as graph nodes, spatial coordinates as attributes, and spatial adjacency relationships between nodes as edges, a spatial topology graph is constructed using dies as units. Based on the spatial topology graph, diffusion patterns are identified through connected component analysis and local density statistics, including point degradation, linear diffusion, or area bursts.

4. The method for managing bad blocks and predicting lifespan of a solid-state drive according to claim 3, characterized in that, The methods for classifying early warning levels include: Read the number of bad blocks in each die, obtain the growth rate in time sequence, and then derive the growth acceleration of the number of bad blocks; Based on the growth acceleration, the current acceleration state is determined through acceleration state determination rules; A joint early warning rule matrix is ​​pre-constructed, with diffusion patterns as rows, acceleration states as columns, and early warning levels as matrix elements. Based on the current diffusion pattern and acceleration state of the Die, the current warning level is determined by looking up a table using a joint warning rule matrix.

5. The method for managing bad blocks and predicting lifespan of a solid-state drive according to claim 2, characterized in that, The assessment yields a health score in the following ways: Call the individualized health baseline calibrated at the factory for each die, extract the wear increment and error rate increment, and obtain the bad block ratio as a degradation indicator; Based on degradation indicators, a comprehensive assessment is conducted through a health assessment mechanism to generate a health score for each die.

6. The method for managing bad blocks and predicting lifespan of a solid-state drive according to claim 5, characterized in that, The methods for obtaining the estimated remaining available time include: After generating a health score, the reserved block consumption status, current bad block growth rate and acceleration status of each die are extracted, and the estimated remaining available time of the die is obtained through a segmented extrapolation mechanism.

7. The method for managing bad blocks and predicting lifespan of a solid-state drive according to claim 6, characterized in that, The methods for generating firmware parameter configuration sets include: Based on the health score, the basic firmware parameters corresponding to Die are obtained from the preset parameter mapping relationship; Then, based on the parameter correction rules and the matching correction conditions between the warning level and the diffusion mode, the corresponding correction actions are superimposed on the basic firmware parameters to generate a firmware parameter configuration set.

8. The method for managing bad blocks and predicting lifespan of a solid-state drive according to claim 7, characterized in that, The methods for generating retirement action instruction sets include: Based on health scores and early warning levels, retirement trigger conditions are determined step by step according to preset cascading rules. When the triggering conditions are met, the retirement actions of single block retirement, die-level degradation, die-level active retirement, or disk-level security protection are triggered in sequence, generating the corresponding retirement action instruction set.

9. A method for managing bad blocks and predicting lifespan of a solid-state drive according to claim 8, characterized in that, The methods for generating the IO weight allocation scheme include: In an array scenario, the estimated remaining available time of each member disk in the array is collected to obtain the array's lifetime dispersion. Based on lifetime dispersion, a hierarchical scheduling strategy is used to generate a differentiated IO weight allocation scheme according to the proportion of the estimated remaining available time of each disk, tilting the write load towards healthy disks.

10. A method for managing bad blocks and predicting lifespan of a solid-state drive according to claim 9, characterized in that, The methods for updating block-level status markers and health scores to form a closed-loop management chain include: The firmware parameter configuration set, decommissioning action instruction set, and IO weight allocation scheme are sent to the firmware for execution; the block status changes and bad block counts generated after execution are obtained, and the block-level status flags and health scores are written back and updated. When a new event is written, the evaluation cycle is reached, or the health score changes, the entire process is iteratively executed, forming a closed-loop management chain.