Solid state disk life prediction and equalization method based on multi-dimensional feature deep learning

CN122593713APending Publication Date: 2026-08-18SICHUAN WEIXIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611079538.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0007]本发明的目的在于提供基于多维特征深度学习的固态硬盘寿命预测及均衡方法,本发明要解决的技术问题是:固态硬盘长期运行中,现有寿命预测方法难以表达预测不确定度,寿命预测结果也不能连续驱动固件磨损均衡策略,导致局部闪存块磨损不均、垃圾回收触发滞后,或者后台迁移与用户输入输出产生冲突

Benefits of technology

[0047] This invention utilizes multi-source degradation data, including health parameters, write amplification data, bad block growth data, input/output load data, and temperature data, which reduces the masking effect of a single average write/erase cycle on the actual degradation state. By extracting time-domain degradation features and frequency-domain periodic features within the same sliding window, the model can identify trends in write/erase cycles, error counts, and bad block growth, as well as temperature cycles, business cycles, and background garbage collection cycles. The lifetime prediction model outputs a probability distribution of remaining lifetime and further derives the relative uncertainty, enabling firmware to distinguish between low-risk reliable predictions and high-risk uncertain predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122593713A_ABST
    Figure CN122593713A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of solid state disk health management, flash wear leveling, residual service life prediction, and discloses a solid state disk life prediction and leveling method based on multi-dimensional feature deep learning, which comprises: obtaining solid state disk multi-source degradation data, extracting time domain degradation features and frequency domain periodic features, and performing self-attention fusion according to index feature units; the life prediction module outputs the residual service life probability distribution, the overall uncertainty and the relative uncertainty; the closed-loop decision module generates continuous wear leveling strategy parameters according to the relative uncertainty, the flash block erase count discrete degree and the input / output idle degree, so as to update the hot and cold data classification threshold, the write allocation weight and the garbage collection trigger threshold. The present application aims to solve the technical problem that the solid state disk life prediction result cannot effectively drive the firmware to complete wear leveling control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of solid-state drive health management, flash memory wear leveling, and remaining lifespan prediction, specifically to a method for solid-state drive lifespan prediction and leveling based on multi-dimensional feature deep learning. Background Technology

[0002] Solid-state drives (SSDs) are used in data center servers, industrial control equipment, edge computing devices, and embedded storage devices to continuously store logs, transaction records, model parameters, control data, or field-collected data. The input / output load of devices containing SSDs typically includes random writes, sequential writes, periodic backups, batch reads, and background garbage collection requests. Flash memory blocks experience varying degrees of wear and tear during long-term erasing and writing processes. Some flash memory blocks approach their lifespan earlier due to differences in write frequency, data temperature distribution, temperature location, read / write disturbances, and the number of times they are moved in the background.

[0003] Current SSD lifespan estimates typically rely on percentage of lifespan already used, average write cycles, cumulative writes, spare block availability, or a few self-monitoring health parameters. While these metrics reflect the overall usage of the SSD, they fail to capture the differences in degradation rates between individual blocks. Under mixed loads, factors such as write amplification factor, bad block growth rate, error growth rate, queue depth, I / O idle duration, and temperature fluctuations all contribute to lifespan degradation. If only linear extrapolation is performed based on average write cycles, degradation fluctuations caused by temperature cycling, business cycles, and background garbage collection are easily treated as ordinary noise, resulting in insufficient response to actual degradation stage changes in the predicted lifespan.

[0004] Some solutions use machine learning or deep learning models to predict the failure status or remaining lifespan of SSDs. While these models can handle multiple input metrics, their outputs are often just a single remaining lifespan value or health level. SSD firmware control requires more than just a central estimate of remaining lifespan; it also needs to determine the reliability of the prediction. For example, two SSDs may have the same mean remaining lifespan, one with a narrower lifespan distribution and the other with a wider distribution. If the firmware cannot recognize prediction uncertainty, it cannot increase conservatism in advance under high uncertainty conditions, nor can it distinguish whether immediate cold data migration, early garbage collection, or maintaining the normal write strategy is necessary.

[0005] Existing wear leveling strategies typically execute based on write / erase thresholds, hot / cold data thresholds, available block ratios, or fixed garbage collection thresholds. Fixed thresholds are easy to implement under stable loads, but exhibit response lag when load changes, temperature variations, or degradation phase transitions occur. If the threshold is set too low, garbage collection and data migration may be delayed, causing some flash blocks to continue being written to and prematurely fail; if the threshold is set too high, background migrations increase write amplification and consume user I / O bandwidth. Fixed thresholds also struggle to continuously change based on lifetime prediction confidence levels; the strategy switching between the two thresholds can easily lead to sudden increases or decreases in background operations.

[0006] After long-term deployment of solid-state drives (SSDs), the distribution of degraded data will drift depending on the usage stage and operating environment. Early degradation is mainly characterized by a slow accumulation of write cycles and slight fluctuations in write amplification; mid-stage degradation may involve changes in the rate of bad block growth and the influence of temperature cycles; in late-stage degradation, error growth, spare block consumption, and the risk of uncorrectable errors become the main factors. If an offline-trained lifetime prediction model is not updated for a long period, it will gradually deviate from the current device state; directly fine-tuning it with new data may weaken the lifetime prediction model's ability to retain historical degradation patterns. Summary of the Invention

[0007] The purpose of this invention is to provide a method for predicting and balancing the lifespan of solid-state drives (SSDs) based on multi-dimensional feature deep learning. The technical problem to be solved by this invention is that during the long-term operation of SSDs, existing lifespan prediction methods are difficult to express the prediction uncertainty, and the lifespan prediction results cannot continuously drive firmware wear leveling strategies, resulting in uneven wear of local flash memory blocks, delayed garbage collection triggering, or conflicts between background migration and user input / output.

[0008] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0009] Solid-state drive (SSD) lifetime prediction and balancing methods based on multi-dimensional feature deep learning include:

[0010] Acquire multi-source degradation data during the operation of solid-state drives and form a degradation time series with timestamps;

[0011] The degradation time series is subjected to anomaly processing, missing data completion, and normalization. Temporal degradation features and frequency periodic features are extracted. The temporal degradation features and frequency periodic features corresponding to the same original degradation index are combined into index feature units and then self-attention fusion is performed to obtain a fused degradation feature sequence.

[0012] The fused degradation feature sequence is input into the lifetime prediction model to generate a remaining lifetime probability distribution, and the remaining lifetime mean, overall uncertainty and relative uncertainty are obtained based on the remaining lifetime probability distribution.

[0013] Continuous wear leveling strategy parameters are generated based on the relative uncertainty, the dispersion of flash memory block erase / write cycles, and the input / output idle time.

[0014] The cold and hot data classification threshold, flash block write allocation weight, and garbage collection trigger threshold are updated according to the continuous wear leveling strategy parameters, and the wear feedback data after execution is used for subsequent updates of the continuous wear leveling strategy parameters and lifetime prediction model.

[0015] As a preferred embodiment of the present invention, the multi-source degradation data includes self-monitoring health data, write amplification data, bad block growth data, error growth data, input / output load data, and temperature data. The self-monitoring health data includes at least the average number of erase / write cycles, spare block balance, percentage of service life, media error count, and uncorrectable error count. The input / output load data includes at least the read / write ratio, random access ratio, average input / output size, queue depth, and idle duration.

[0016] As a preferred embodiment of the present invention, the anomaly processing, missing data completion, and normalization processing of the degraded time series include:

[0017] Anomalies are marked for sampled values ​​that deviate from the statistical range within the sliding window;

[0018] Interpolate and impute short-term missing data;

[0019] Generate missing identifiers for consecutive missing data;

[0020] Convert cumulative count data into unit time increments or growth rates;

[0021] Data of different dimensions are normalized to obtain a unified degradation time series for feature extraction.

[0022] As a preferred embodiment of the present invention, extracting the time-domain degradation features and the frequency-domain periodic features includes:

[0023] Within the same sliding window, the mean, dispersion, skewness, kurtosis, trend slope, and maximum rate of change are extracted from each original degradation index as the time-domain degradation features. A fast Fourier transform is performed on each original degradation index, and the dominant frequency, spectral energy concentration, and spectral dispersion are extracted as the frequency-domain periodic features. The time-domain degradation features and frequency-domain periodic features corresponding to the same original degradation index are combined into an index feature unit and input into the attention fusion layer to obtain the fused degradation feature sequence.

[0024] As a preferred embodiment of the present invention, the lifetime prediction model includes a time attention layer, a bidirectional long short-term memory network layer, and a probability output layer. The time attention layer generates time weights based on the degradation contribution of different time slices in the fused degradation feature sequence. The bidirectional long short-term memory network layer generates a degradation state representation based on the weighted fused degradation feature sequence. The probability output layer generates the remaining lifetime probability distribution based on the degradation state representation.

[0025] As a preferred embodiment of the present invention, the probability output layer adopts a Gaussian mixture output layer, which outputs the mean, standard deviation and mixture weight of multiple lifetime components, and obtains the mean of remaining lifetime, the overall uncertainty, the confidence interval and the relative uncertainty from the multiple lifetime components.

[0026] As a preferred embodiment of the present invention, the dispersion of the number of erase / write cycles of the flash memory blocks is determined based on the standard deviation and mean of the number of erase / write cycles of the flash memory blocks participating in wear leveling. The input / output idleness is determined based on the continuous idle time, the recent average queue depth, and the recent input / output arrival rate. The continuous wear leveling strategy parameters include the erase / write cycle penalty intensity, the bad page risk penalty intensity, the temperature risk penalty intensity, and the garbage collection trigger threshold. The continuous wear leveling strategy parameters are generated based on the relative uncertainty, the dispersion of the number of erase / write cycles of the flash memory blocks, and the input / output idleness.

[0027] As a preferred embodiment of the present invention, updating the flash memory block write allocation weight includes:

[0028] For each candidate flash memory block, obtain the current erase / write cycles, bad page risk value, and temperature deviation.

[0029] The write probability of high-write-cycle flash memory blocks is reduced based on the write-cycle penalty intensity.

[0030] The probability of writing to flash memory blocks with a high risk of bad pages is reduced based on the severity of the bad page risk penalty.

[0031] The probability of writing to flash memory blocks with high temperature deviations is reduced based on the aforementioned temperature risk penalty intensity.

[0032] The write probability of candidate flash blocks is normalized and then used to select the target flash block for a new write request.

[0033] As a preferred embodiment of the present invention, the write / erase cycle penalty intensity is continuously updated according to the degradation slope of the average remaining lifetime, the bad page risk penalty intensity is continuously updated according to the relative uncertainty, the temperature risk penalty intensity is continuously updated according to the temperature-accelerated degradation factor, and the write / erase cycle penalty intensity, the bad page risk penalty intensity, and the temperature risk penalty intensity are all subject to corresponding engineering upper and lower limits.

[0034] As a preferred technical solution of the present invention, updating the garbage collection trigger threshold includes: increasing the conservatism of garbage collection when the relative uncertainty increases; triggering wear leveling related garbage collection in advance when the dispersion of flash block erase / write counts increases; increasing background garbage collection execution opportunities when the input / output idleness increases; and after the garbage collection trigger threshold is updated, determining whether to retain the updated garbage collection trigger threshold based on the write amplification factor and input / output latency.

[0035] As a preferred embodiment of the present invention, updating the hot and cold data classification threshold includes: obtaining a hot and cold access score based on the access frequency and recent access time of the logical data block; adjusting the classification boundaries of hot data, warm data, and cold data based on the relative uncertainty and the dispersion of the flash memory block erase / write counts; preferentially allocating newly written data and hot data to flash memory blocks with low erase / write counts, low bad page risk, and normal temperature; migrating cold data to flash memory blocks with higher erase / write counts that still meet the bad page risk condition; and excluding flash memory blocks that exceed the bad page risk condition from the migration target set.

[0036] As a preferred embodiment of the present invention, updating the lifetime prediction model includes:

[0037] When the incremental data buffer meets the update conditions, the remaining lifetime degradation stage switches, the dispersion of the flash memory block erase / write counts does not improve continuously, or the relative uncertainty continues to increase, incremental training based on elastic weight consolidation is triggered. During incremental training, the underlying time-series feature extraction parameters of the lifetime prediction model are frozen, and the upper-level time-series feature extraction parameters, time attention parameters, and probability output parameters are updated. When the validation loss, relative uncertainty, write amplification factor, or input / output latency degradation after incremental training exceeds the corresponding threshold, the model parameters before incremental training are rolled back to the stable model parameters before incremental training.

[0038] In addition, the present invention also discloses an adaptive wear leveling system for solid-state drives based on probabilistic lifetime prediction, including a data acquisition module, a time-frequency domain feature engineering module, a lifetime prediction module, a closed-loop decision module, a dynamic wear leveling execution module, and an online model update module.

[0039] The data acquisition module acquires multi-source degradation data during the operation of the solid-state drive and forms a degradation time series with timestamps;

[0040] The time-frequency domain feature engineering module receives the degraded time series, performs anomaly processing, missing data completion, and normalization on the degraded time series, extracts time-domain degradation features and frequency-domain periodic features, and performs self-attention fusion on the time-domain degradation features and the frequency-domain periodic features to obtain a fused degradation feature sequence.

[0041] The lifetime prediction module receives the fused degradation feature sequence, inputs the fused degradation feature sequence into the lifetime prediction model, generates a remaining lifetime probability distribution, and obtains the remaining lifetime mean, overall uncertainty, and relative uncertainty based on the remaining lifetime probability distribution.

[0042] The closed-loop decision module calculates the dispersion of flash memory block erase / write cycles and the idle degree of input / output, and combines the relative uncertainty and wear feedback data to generate and correct the continuous wear leveling strategy parameters.

[0043] The dynamic wear leveling execution module updates the hot and cold data classification threshold, flash block write allocation weight, and garbage collection trigger threshold according to the continuous wear leveling strategy parameters, and outputs the wear feedback data after execution.

[0044] The online model update module determines whether the life prediction model update conditions are met based on the wear feedback data, and updates the life prediction model when the life prediction model update conditions are met, so that the updated life prediction model can be used to generate the probability distribution of the remaining useful life.

[0045] The present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the adaptive wear leveling method for solid-state drives based on probabilistic lifetime prediction as described above.

[0046] Compared with the prior art, the present invention has the following beneficial effects:

[0047] This invention utilizes multi-source degradation data, including health parameters, write amplification data, bad block growth data, input / output load data, and temperature data, which reduces the masking effect of a single average write / erase cycle on the actual degradation state. By extracting time-domain degradation features and frequency-domain periodic features within the same sliding window, the model can identify trends in write / erase cycles, error counts, and bad block growth, as well as temperature cycles, business cycles, and background garbage collection cycles. The lifetime prediction model outputs a probability distribution of remaining lifetime and further derives the relative uncertainty, enabling firmware to distinguish between low-risk reliable predictions and high-risk uncertain predictions.

[0048] This invention incorporates relative uncertainty, the dispersion of flash memory block erase / write cycles, and the idle time of input / output into a continuous control flow, making write allocation weights, hot / cold data classification thresholds, and garbage collection trigger thresholds independent of fixed-level switching. Wear feedback data after strategy execution is used to update control parameters and trigger incremental updates to the lifetime prediction model, establishing a feedback relationship between lifetime prediction results and wear leveling execution results, thus reducing the impact of feature drift on prediction results during long-term deployment. Attached Figure Description

[0049] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained from these drawings without creative effort.

[0050] Figure 1 This is a structural environment diagram of the system described in this invention.

[0051] Figure 2 This is a flowchart illustrating the data flow of this invention.

[0052] Figure 3 This is the main flowchart of the method of the present invention.

[0053] Figure 4 This is a flowchart of the degraded time series preprocessing and feature extraction sub-process of the present invention.

[0054] Figure 5 This is a flowchart of the lifetime prediction model processing sub-process of the present invention.

[0055] Figure 6 This is a flowchart of the online update branch of the lifetime prediction model of this invention. Detailed Implementation

[0056] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the embodiments of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.

[0057] The following is in conjunction with the appendix Figures 1-6 The embodiments of the present invention will be described in detail below.

[0058] Example 1: This example discloses an adaptive wear leveling system for solid-state drives based on probabilistic lifetime prediction, including a data acquisition module, a time-frequency domain feature engineering module, a lifetime prediction module, a closed-loop decision module, a dynamic wear leveling execution module, and an online model update module.

[0059] The data acquisition module acquires multi-source degradation data during the operation of the solid-state drive and forms a degradation time series with timestamps;

[0060] The time-frequency domain feature engineering module receives the degraded time series, performs anomaly processing, missing data completion, and normalization on the degraded time series, extracts time-domain degradation features and frequency-domain periodic features, and performs self-attention fusion on the time-domain degradation features and the frequency-domain periodic features to obtain a fused degradation feature sequence.

[0061] The lifetime prediction module receives the fused degradation feature sequence, inputs the fused degradation feature sequence into the lifetime prediction model, generates a remaining lifetime probability distribution, and obtains the remaining lifetime mean, overall uncertainty, and relative uncertainty based on the remaining lifetime probability distribution.

[0062] The closed-loop decision module calculates the dispersion of flash memory block erase / write cycles and the idle degree of input / output, and combines the relative uncertainty and wear feedback data to generate and correct the continuous wear leveling strategy parameters.

[0063] The dynamic wear leveling execution module updates the hot and cold data classification threshold, flash block write allocation weight, and garbage collection trigger threshold according to the continuous wear leveling strategy parameters, and outputs the wear feedback data after execution.

[0064] The online model update module determines whether the life prediction model update conditions are met based on the wear feedback data, and updates the life prediction model when the life prediction model update conditions are met, so that the updated life prediction model can be used to generate the probability distribution of the remaining useful life.

[0065] In practical implementation, this embodiment focuses on the operational scenario of an enterprise-level non-volatile memory fast interface solid-state drive (SSD) in a data center server. The SSD has a capacity of 960GB, uses 3D three-layer cell NAND flash memory, and has a rated erase / write cycle life of 3000 times. The server runs database transaction processing, log writing, random writes, sequential writes, and periodic backup tasks. A flash translation layer is set up in the SSD controller, which maintains a mapping table from logical addresses to physical addresses, a free block pool, an available block pool, a bad block table, and an erase / write cycle table. A health management service is deployed on the host side, collecting data through the non-volatile memory fast interface health log, firmware extension interface, and input / output monitoring interface. When the controller has neural network inference capabilities, the lifetime prediction model is deployed on the controller side; when the controller's computing power is limited, the lifetime prediction model is deployed on the host side. The controller side performs write allocation, hot and cold data migration, and garbage collection scheduling based on continuous wear leveling strategy parameters.

[0066] Step S101: System initialization. Configure the sampling period, circular buffer capacity, sliding window length, feature sequence length, lifetime prediction model parameters, initial continuous wear leveling strategy parameters, and strategy rollback conditions. The sampling period is set to 5 minutes, and the circular buffer stores the most recent 30 days of sampled data. The sliding window length is set to 48 sampling points, corresponding to 4 hours of running data. The feature sequence length is set to 12 fused degradation features, corresponding to the most recent 12 window outputs. The initial garbage collection trigger threshold is set to 10% of the available blocks, with a lower engineering limit of 7% and an upper engineering limit of 25%. The initial write / erase cycle penalty intensity, bad page risk penalty intensity, and temperature risk penalty intensity are determined by the device's factory test data.

[0067] In step S102, the data acquisition module periodically acquires multi-source degradation data. This multi-source degradation data includes self-monitoring health data, write amplification data, bad block growth data, error growth data, input / output load data, and temperature data. The self-monitoring health data includes average write / erase cycles, write / erase cycles for each flash memory block, spare block availability, percentage of usable life, media error count, uncorrectable error count, power-on time, and number of unsafe shutdowns.

[0068] Write amplification data includes host write volume, actual NAND flash write volume, write amplification factor, and write amplification factor change rate. Bad block growth data includes the number of newly added bad blocks, bad block growth rate, number of bad pages, erase failure rate, and programming failure rate. Input / output load data includes read / write ratio, random access ratio, sequential access ratio, average I / O size, queue depth, throughput, I / O operations per second, continuous idle time, and recent I / O arrival rate. Temperature data includes controller temperature, NAND flash area temperature, overall disk average temperature, temperature change rate, and temperature cycle fluctuation amplitude. The write amplification factor can be calculated using the following formula:

[0069]

[0070] in, To write the magnification factor, This represents the actual amount of data written to the NAND flash memory during the statistical period. This represents the amount of data written to the SSD by the host during the statistical period. If the host write volume is zero during a certain statistical period, the data acquisition module does not calculate the write amplification factor for the current period. Instead, it maintains the previous valid write amplification factor and sets an idle flag. This method of maintaining the previous valid write amplification factor and setting an idle flag avoids division-by-zero anomalies and also avoids erroneously amplifying the impact of background writes during periods with no writes.

[0071] In step S103, the data acquisition module writes the multi-source degradation data into a circular buffer according to timestamps. Each sampling record in the circular buffer includes the sampling time, the original indicator value, the firmware event identifier, and the data confidence identifier. The firmware event identifier is used to record power-off recovery, garbage collection initiation, bad block replacement, temperature control frequency reduction, firmware upgrade, and log reset. The data confidence identifier is used to distinguish between normal sampling, short-term missing data completion, continuous missing data completion, and counter wraparound correction, and enters the subsequent self-attention fusion process along with the completed sampling value to adjust the contribution weight of the corresponding indicator feature unit.

[0072] In step S104, the time-frequency domain feature engineering module performs exception handling. For each original degradation index, the window mean and window standard deviation are calculated within a sliding window. When a single sampled value deviates from the window statistical range, the time-frequency domain feature engineering module further reads the firmware event identifier. When the temperature suddenly rises and is accompanied by a sudden increase in input / output load, the time-frequency domain feature engineering module retains the sampled value as a valid high-load event; when the error count suddenly drops and the firmware event identifier shows a log reset, the time-frequency domain feature engineering module marks the sampled value as a counter reset event, and subsequent incremental calculations restart from the reset baseline; when a single point deviates from the statistical range and there is no corresponding firmware event, the time-frequency domain feature engineering module replaces it with the window mean or adjacent valid values ​​through interpolation.

[0073] Step S105: The time-frequency domain feature engineering module performs missing data imputation. Short-term missing data is imputed using linear interpolation; continuous missing data is imputed using forward valid values ​​and a missing data identifier is generated; for indicators whose missing length exceeds the configured threshold, the imputed value is not used as a high-confidence input, but the contribution of the corresponding indicator feature unit is reduced during the self-attention fusion stage. If the solid-state drive is powered off during continuous missing data, the power outage time is not included in the runtime degradation window.

[0074] Step S106: The time-frequency domain feature engineering module performs incremental conversion on the cumulative count type indicators. Media error count, uncorrectable error count, erase failure count, programming failure count, bad block count, and write volume are all cumulative count type indicators. If the cumulative value is directly input, the model easily learns the device uptime rather than the degradation rate. This embodiment converts the cumulative count type indicators into unit time increments or growth rates, while retaining the long-term state characteristics corresponding to the cumulative values, allowing the model to simultaneously obtain the total degradation degree and the recent degradation rate.

[0075] Step S107: The time-frequency domain feature engineering module normalizes data of different dimensions. Erasing / writing counts, spare block capacity, error growth rate, write amplification factor, queue depth, temperature, and idle time are normalized according to device model, training set statistical range, or engineering upper limit, respectively. Long-tailed distribution indicators such as error growth rate and bad block growth rate are first normalized using... After performing natural logarithmic compression, the process proceeds to normalization. The values ​​represent the original, non-negative index values ​​to be compressed. The normalized index range is limited to 0 to 1. During field testing, if an index value exceeds the training range, the normalized value is capped at 1, and an out-of-bounds flag is input into the model. The out-of-bounds flag enters the self-attention fusion layer along with the corresponding index feature unit. As the number of out-of-bounds flags increases, the self-attention fusion layer reduces the contribution weight of the corresponding index feature unit, and the probability output layer increases the lower bound of the lifetime component standard deviation or the standard deviation output bias, causing the relative uncertainty to increase with the increase of out-of-bounds inputs.

[0076] In step S108, the time-frequency domain feature engineering module selects 16 raw degradation indicators as the base time series. These 16 raw degradation indicators include average write / erase cycles, standard deviation of write / erase cycles, spare block availability, percentage of used life, media error growth rate, uncorrectable error growth rate, current device temperature, temperature change rate, write amplification factor, write amplification factor change rate, number of newly added bad blocks, bad block growth rate, erase failure growth rate, programming failure growth rate, recent average queue depth, and raw input / output idle time. If a specific indicator cannot be provided for a particular SSD model, the time-frequency domain feature engineering module uses a similar indicator as a substitute and sets a missing indicator. If more than 16 indicators can be collected, the time-frequency domain feature engineering module retains the 16 indicators that contribute significantly to lifetime degradation through feature selection or linear mapping.

[0077] Step S109: The time-frequency domain feature engineering module extracts time-domain degradation features within a sliding window. For each original degradation index, the mean, dispersion, skewness, kurtosis, trend slope, and maximum rate of change are calculated. The mean is used to express the average state within the window; the dispersion is used to express the fluctuation amplitude within the window; the skewness is used to identify local abrupt changes; the kurtosis is used to identify peak events; the trend slope is used to express the direction of continuous rise or fall of the degradation index; and the maximum rate of change is used to capture short-term degradation acceleration. Six types of time-domain degradation features are extracted from the 16 original degradation indices, resulting in 96-dimensional time-domain degradation features.

[0078] In step S110, the time-frequency domain feature engineering module extracts frequency-domain periodic features within the same sliding window. The module uses Fast Fourier Transform (FFT) to transform the time series of each original degradation index within the sliding window to obtain the energy distribution of different frequency components. From the frequency domain results, the module extracts the dominant frequency, spectral energy concentration, and spectral dispersion. The dominant frequency represents the main periodic fluctuations within the window; the spectral energy concentration indicates whether the periodicity is concentrated; and the spectral dispersion indicates whether the fluctuations are dispersed. Temperature diurnal cycles, business backup cycles, and background garbage collection cycles may be masked by noise in the time domain, but they will form frequency components with concentrated energy in the frequency domain. Three types of frequency-domain periodic features are extracted from the 16 original degradation indices, resulting in 48-dimensional frequency-domain periodic features.

[0079] Step S111: The time-frequency domain feature engineering module performs self-attention fusion. Each original degradation index is composed of 6 time-domain degradation features and 3 frequency-domain periodic features to form an index feature unit. These 16 index feature units constitute an index feature sequence, with the index feature sequence forming a dimension of [missing information]. The indicator feature matrix. The self-attention fusion layer generates a query matrix, key matrix, and value matrix based on the indicator feature matrix, and calculates the attention matrix:

[0080]

[0081] in, For the indicator feature matrix, For querying the matrix, The key matrix, For value matrices, To query the mapping weight matrix, The key-mapped weight matrix, The value is mapped to the weight matrix.

[0082]

[0083] in, For attention matrix, For normalized exponential functions, For attention mapping dimension, This is the matrix transpose symbol.

[0084]

[0085] in, It is a 64-dimensional fusion degradation feature. It is a fully connected mapping function. This is a vectorized function. In the early degradation stage, the average number of erases / writes, write amplification factor, and temperature change rate may have higher weights; in the mid-degradation stage, the bad block growth rate and spare block availability change may have higher weights; in the late degradation stage, the uncorrectable error growth rate and erase failure growth rate may have higher weights. Each sliding window outputs a fused degradation feature, and multiple consecutive windows form a fused degradation feature sequence.

[0086] In step S112, the lifetime prediction module performs temporal attention processing on the fused degradation feature sequence. The temporal attention layer assigns temporal weights based on the contribution of the most recent windows to the current remaining lifetime prediction. The temporal attention weights are calculated as follows:

[0087]

[0088] in, For the first Time attention score for each window To merge the window numbers in the degenerate feature sequence, For time attention vectors, This is the time attention weight matrix. For the first The fusion degradation features corresponding to each window For the time attention bias vector, It is the hyperbolic tangent function.

[0089]

[0090] in, For the first Time attention weights for each window It is an exponential function. For window numbering in time attention normalization summation, The total number of windows for fusing degenerate feature sequences, For the first Time attention score for each window.

[0091]

[0092] in, For the first The temporal attention layer assigns a weighted fusion degradation feature to each window. When a recent window experiences an increase in the error rate, a sudden increase in the write amplification factor, or an abnormal temperature cycle, the temporal attention layer increases the contribution of the corresponding window. Conversely, when a window has many missing values ​​or is associated with firmware anomalies, the temporal attention layer reduces the contribution of the corresponding window based on data confidence indicators. The temporal attention layer outputs a weighted fusion degradation feature sequence, which serves as the input to the bidirectional long short-term memory network layer.

[0093] In step S113, the lifetime prediction module inputs the weighted fused degradation feature sequence into the bidirectional long short-term memory (LSTM) network layer. The bidirectional LSM network layer comprises a first temporal layer and a second temporal layer. The first temporal layer extracts the underlying degradation trend, and the second temporal layer extracts stage-specific changes and short-term acceleration features. Random deactivation and residual connections are set between the two layers to reduce training overfitting. The bidirectional LSM network layer outputs a representation of the current degradation state. The current degradation state representation includes the recent degradation rate, the impact of load cycles, the error growth trend, and the effect of temperature.

[0094] In step S114, the lifetime prediction module generates a probability distribution of remaining lifetime through the probability output layer. In this embodiment, the probability output layer is a Gaussian mixture output layer. The Gaussian mixture output layer outputs three lifetime components, corresponding to a conservative lifetime estimate, a most likely lifetime estimate, and a optimistic lifetime estimate, respectively. Each lifetime component includes the lifetime mean, lifetime standard deviation, and mixture weights. The mixture weights are normalized to ensure that the sum of the weights is 1. The lifetime standard deviation is subjected to non-negativity constraints to avoid negative standard deviations. The lifetime mean is subjected to non-negativity constraints to avoid outputting negative lifetimes.

[0095] Step S115: The lifetime prediction module calculates the mean remaining lifetime, overall uncertainty, confidence interval, and relative uncertainty based on the remaining lifetime probability distribution. The Gaussian mixture output layer includes... When there are 1 lifetime component, the mean remaining lifetime is:

[0096]

[0097] in, The remaining lifespan is the average. The total number of lifetime components. Number the lifetime components. For the first The mixed weights of the lifetime components, For the first The lifetime mean of each lifetime component. The overall uncertainty is:

[0098]

[0099] in, For the overall uncertainty, For the first The lifetime standard deviation of each lifetime component. The relative uncertainty is:

[0100]

[0101] in, For relative uncertainty, To prevent the denominator from being zero when calculating the stability constant for lifespan, the mean remaining lifespan is used as the central estimate of the current remaining lifespan of the SSD. The overall uncertainty represents the width of the probability distribution. Confidence intervals are used for health reports and maintenance plans. Relative uncertainty is used for subsequent firmware adaptive wear leveling control. When both the mean remaining lifespan and the overall uncertainty are large, the relative uncertainty increases, indicating that the prediction, while optimistic, is not reliable enough. Conversely, when the mean remaining lifespan is small but the distribution is narrow, the relative uncertainty is low, indicating that the predicted risk is more clearly defined, and the system can execute a more certain conservative strategy.

[0102] Step S116: The closed-loop decision module calculates the dispersion of flash memory block erase / write cycles. The dispersion of flash memory block erase / write cycles measures the degree of wear unevenness among flash memory blocks participating in wear leveling. During the calculation, factory-defective blocks, retired defective blocks, unallocatable blocks, and flash memory blocks in error isolation are excluded. The dispersion of flash memory block erase / write cycles can be calculated using the following formula:

[0103]

[0104] in, To determine the dispersion of flash memory block erase / write cycles, The standard deviation of the number of erase / write cycles for flash memory blocks participating in wear leveling. This represents the average number of erase / write cycles for the flash memory blocks participating in wear leveling. To prevent the calculation of the stability constant from being based on erase / write cycles with a denominator of zero, the subscript... This indicates the number of erase / write cycles. Increased dispersion in the number of erase / write cycles for flash memory blocks indicates that some flash memory blocks have significantly higher erase / write cycles than others. If new write requests continue to be allocated according to the normal write strategy, flash memory blocks with high erase / write cycles may continue to be used, thereby increasing the risk of localized failures.

[0105] Step S117: The closed-loop decision module calculates the input / output idle level. The input / output idle level is used to determine whether it is suitable to perform background garbage collection, cold data migration, and static wear leveling. This embodiment uses continuous idle time, recent average queue depth, and recent input / output arrival rate to jointly calculate the input / output idle level.

[0106]

[0107] in, For input / output idle time, For continuous idle time, For reference, free time This represents the recent average queue depth. For reference queue depth, To select the smaller value function, the reference idle time and reference queue depth are determined by SSD factory test data or benchmark values ​​from business scenarios. In one feasible configuration, the reference idle time ranges from 60s to 300s, and the reference queue depth ranges from 16 to 64. When the continuous idle time is long and the recent average queue depth is low, the input / output idle level is close to 1; when the queue depth is high or input / output requests arrive continuously, the input / output idle level is close to 0. The closed-loop decision module will not immediately perform a large number of migrations simply because the flash block erase / write count has a high dispersion, but will instead control the timing of background operations based on the input / output idle level to reduce the impact of background operations on peak user input / output periods.

[0108] In step S118, the closed-loop decision module generates continuous wear leveling strategy parameters based on relative uncertainty, the dispersion of flash memory block erase / write cycles, and the idle state of inputs and outputs. These parameters include erase / write cycle penalty intensity, bad page risk penalty intensity, temperature risk penalty intensity, and garbage collection trigger threshold. The closed-loop decision module writes these parameters into the continuous wear leveling strategy parameters, which are then read and executed by the dynamic wear leveling execution module.

[0109] Step S119: The closed-loop decision module continuously updates the write / erase cycle penalty intensity, bad page risk penalty intensity, and temperature risk penalty intensity. The temperature-accelerated degradation factor is determined by the normalized deviation of the NAND flash memory's average temperature from a reference temperature.

[0110]

[0111] in, Temperature is a factor that accelerates degradation. This represents the average temperature of NAND flash memory over the most recent statistical period. For reference safe temperature, For temperature normalization interval, To obtain a larger value function, the remaining lifetime degradation slope can be determined by the following formula:

[0112]

[0113] in, The remaining lifetime degradation slope. This represents the average remaining lifespan at the previous statistical time point. This represents the average remaining lifespan at the current statistical moment. For the current statistical time, This represents the time interval between two consecutive lifetime predictions. The write / erase cycle penalty, bad page risk penalty, and temperature risk penalty are continuously updated according to the following rules:

[0114]

[0115] in, The severity of the penalty for each erase / write cycle. This is a function that cuts off the upper and lower limits. The initial value for the write / erase penalty intensity is [value]. This is the adjustment factor for the penalty intensity of the number of erase / write cycles. This represents the lower limit of the penalty intensity for each erase / write cycle. This represents the maximum penalty strength for each erase / write cycle.

[0116]

[0117] in, The severity of the penalty for bad page risk, This is the initial value for the penalty intensity against bad pages. This is an adjustment coefficient for the severity of the penalty for bad pages. This represents the lower limit of the penalty intensity for bad page risk. This represents the upper limit of the penalty intensity for bad page risk.

[0118]

[0119] in, The intensity of the temperature risk penalty, This is the initial value for the temperature risk penalty intensity. This is the adjustment coefficient for the intensity of temperature risk penalty. This represents the lower limit of the penalty intensity for temperature risk. This sets the upper limit for temperature risk penalty intensity. The faster the average remaining lifetime decreases, the higher the write / erase cycle penalty intensity, and the more likely new write requests will be made to write to flash blocks with low write / erase cycles. The higher the relative uncertainty, the higher the bad page risk penalty intensity, and the lower the probability of writing to flash blocks with high bad page risk. The higher the temperature-accelerated degradation factor, the higher the temperature risk penalty intensity, and the lower the probability of writing to flash blocks in high-temperature regions. Engineering upper and lower limits are set for write / erase cycle penalty intensity, bad page risk penalty intensity, and temperature risk penalty intensity to avoid excessive amplification of control parameters, which could lead to an overly narrow writable block set.

[0120] In one feasible configuration, the lower limits of the write / erase cycle penalty, bad page risk penalty, and temperature risk penalty are all greater than zero, while the upper limits are given by the SSD's factory verification data and fall back to the previous stable value when the write amplification factor or I / O latency exceeds the corresponding engineering threshold. The garbage collection trigger threshold is continuously updated according to the following rules:

[0121]

[0122] in, The threshold for triggering garbage collection, This is the initial value for the garbage collection trigger threshold. This is the relative uncertainty adjustment coefficient. This is a coefficient for adjusting the dispersion of flash memory block erase / write cycles. This is an adjustment coefficient for the input / output idle level. This is the lower limit of the threshold for triggering waste recycling. This is the upper limit of the threshold for triggering garbage collection.

[0123] Step S120: The dynamic wear leveling execution module updates the flash memory block write allocation weights. For each candidate flash memory block, the dynamic wear leveling execution module reads the current erase / write count, bad page risk value, and temperature deviation. The candidate flash memory block write allocation weights can be calculated using the following formula:

[0124]

[0125] in, Candidate flash memory blocks Write allocation weight, Number the candidate flash memory blocks. Candidate flash memory blocks Normalized erase / write count, Candidate flash memory blocks The normalized bad page risk value, Candidate flash memory blocks The degree of temperature deviation, It is a natural constant.

[0126] When calculating write allocation weights, the normalized erase / write count and normalized bad page risk value are limited to between 0 and 1. When the bad page risk value of a candidate flash block exceeds the retirement threshold, the dynamic wear leveling execution module excludes the candidate flash block from the normal write candidate set. The write allocation weights of all candidate flash blocks are normalized to write selection probabilities. When a new write request arrives, the flash conversion layer selects the target flash block based on the write selection probability. Through the normalization of write allocation weights and probabilistic selection, flash blocks with high erase / write counts, high bad page risk, and high temperature deviations receive lower write probabilities.

[0127] Step S121: The dynamic wear leveling execution module updates the hot and cold data classification thresholds. For logical data blocks, the dynamic wear leveling execution module calculates the hot and cold access score. The hot and cold access score is determined by the access frequency and the most recent access time.

[0128]

[0129] in, For logical data blocks Hot and cold visit ratings Number the logical data blocks. For access frequency weighting coefficients, For logical data blocks Normalized access frequency within the access statistics window For logical data blocks The most recent access time score. The most recent access time score can be determined by the following formula:

[0130]

[0131] in, For logical data blocks The time interval since the most recent access. Let be the access time decay constant. The classification adjustment coefficient can be determined by the following formula:

[0132]

[0133] in, For classification adjustment coefficients, This is the classification adjustment coefficient corresponding to the relative uncertainty. This refers to the classification adjustment coefficient corresponding to the dispersion of flash memory block erase / write cycles. The cold data classification threshold and hot data classification threshold can be adjusted according to the following rules:

[0134]

[0135] in, The threshold for classifying cold data. This is the initial value for the cold data classification threshold. This is an adjustment coefficient for the cold data classification threshold. This is the lower limit of the threshold for classifying cold data. The upper limit of the classification threshold for cold data.

[0136]

[0137] in, Threshold for classifying hot data This is the initial value for the hot data classification threshold. This is an adjustment coefficient for the threshold of thermal data classification. This is the lower limit of the threshold for classifying hot data. This is the upper limit of the hot data classification threshold. When... Logical data blocks are not higher than the cold data classification threshold. Classified as cold data; when Logical data blocks when not lower than the hot data classification threshold Classified as hot data; when When the logical data block is between the cold data classification threshold and the hot data classification threshold, It is classified as warm data. The input for calculating the hot and cold access score comes from the access frequency statistics and logical address access timestamps in the input and output load data. The classification result enters the migration target selection process in step S122.

[0138] In step S122, the dynamic wear leveling execution module implements a migration strategy combining dynamic and static wear leveling. Newly written data and hot data are preferentially allocated to flash memory blocks with low write cycles, low bad page risk, and normal temperature, reducing subsequent writes to high-wear areas. Cold data is preferentially migrated to flash memory blocks with higher write cycles but still meeting the bad page risk condition, ensuring that high-write-cycle flash memory blocks store data with low update frequency, thereby freezing the subsequent write growth of high-wear blocks. If a high-write-cycle flash memory block simultaneously has excessive bad page risk, abnormal error growth rate, or abnormal temperature, it is not considered a cold data migration target but instead enters the protection set or retirement candidate set. The logic of excluding high-risk flash memory blocks from the cold data migration target set prevents cold data from being migrated to physical locations with existing reliability risks.

[0139] Step S123: The dynamic wear leveling execution module updates the garbage collection trigger threshold. The garbage collection trigger threshold continuously changes based on relative uncertainty, the dispersion of flash memory block erase / write cycles, and the idle state of input / output. When relative uncertainty increases, the system increases the conservatism of garbage collection to retain more available blocks; when the dispersion of flash memory block erase / write cycles increases, the system triggers garbage collection related to wear leveling earlier; when the idle state of input / output increases, the system increases the opportunity for background garbage collection execution, reducing the probability of conflicts with user input / output. The garbage collection trigger threshold is constrained by engineering upper and lower limits to prevent it from being too low, resulting in insufficient free blocks, or too high, resulting in excessive background migration. When the proportion of available blocks is lower than the updated garbage collection trigger threshold, and the idle state of input / output meets the background execution conditions, the dynamic wear leveling execution module triggers garbage collection scheduling.

[0140] In step S124, the dynamic wear leveling execution module writes the continuous wear leveling strategy parameters into the firmware strategy table. Before writing, the dynamic wear leveling execution module smoothly merges the new strategy parameters with the previous stable strategy parameters. Only when the parameter change exceeds the minimum change threshold and the minimum update interval has been exceeded since the last update, the dynamic wear leveling execution module updates the firmware strategy table using atomic writing. Atomic writing is used to prevent the firmware from reading partially updated strategy parameters during the writing process.

[0141] In step S125, the firmware performs write allocation, hot and cold data migration, and garbage collection scheduling according to the updated firmware policy table. Write allocation occurs when a new write request arrives; hot and cold data migration occurs when the background migration thread has an execution opportunity; and garbage collection scheduling occurs when the proportion of available blocks is lower than the updated garbage collection trigger threshold and the input / output idle level meets the conditions. After a peak in user input / output, the background migration thread pauses or reduces its migration rate to minimize the impact on foreground request latency.

[0142] Step S126: The dynamic wear leveling execution module collects wear feedback data. This data includes the updated dispersion of flash memory block erase / write counts, write amplification factor, average input / output latency, tail latency, change in available block percentage, error growth rate, and background migration amount. The closed-loop decision module determines the effectiveness of the strategy based on the wear feedback data. If the dispersion of flash memory block erase / write counts decreases and the write amplification factor and latency do not exceed limits, the closed-loop decision module retains the current strategy. If the dispersion of flash memory block erase / write counts does not decrease but the write amplification factor increases, the closed-loop decision module reduces the migration intensity and postpones some background operations. If latency exceeds limits, the dynamic wear leveling execution module rolls back to the previous stable strategy parameters. If the error growth rate increases abnormally, the closed-loop decision module adds the relevant flash memory blocks to the protection set.

[0143] Step S127: The online model update module determines whether to trigger a lifetime prediction model update. Triggering conditions include: the incremental data buffer reaching the amount of data from the most recent 24 hours; a switch in the remaining lifetime degradation stage; the dispersion of flash memory block erase / write counts failing to improve for three consecutive feedback cycles; a continuous increase in relative uncertainty; or verification based on delayed lifetime proxy labels formed from subsequent running data showing that the prediction error exceeds a threshold. Delayed lifetime proxy labels are real lifetime proxy labels formed from subsequent running data based on the actual increase in erase / write counts, spare block consumption, bad block growth, and error growth. The online model update module does not perform training in every sampling cycle to avoid frequent updates causing fluctuations in model output and firmware strategy.

[0144] Step S128: The online model update module constructs incremental training samples. The incremental training samples include recently run data, the corresponding fused degradation feature sequence, and conservative surrogate labels. The conservative surrogate labels do not directly predict the model's own output based on lifetime; instead, they are obtained by taking the minimum value from multiple lifetime margins.

[0145]

[0146] in, For conservative agent labels, This refers to the remaining number of erase / write cycles. This is the spare life margin for the spare block. This is to allow for an extended lifespan for bad blocks. To allow for additional write / erase cycles, the write / erase cycle life margin can be determined using the following formula:

[0147]

[0148] in, For the rated erase / write life, This represents the current average number of erase / write cycles. The remaining lifespan of the spare block can be determined using the following formula:

[0149]

[0150] in, This represents the current reserve block balance. This serves as the lower limit for backup block alarms. This represents the initial spare block reserve. Calculate the stability constant for the spare block. The margin for extended bad block lifetime can be determined by the following formula:

[0151]

[0152] in, This is the upper limit for the number of bad blocks. This represents the current number of bad blocks. This represents the rate of increase in bad block volume per unit time. Calculate the stability constant for bad block growth. This is the normalized lifetime reference duration. Error-increased lifetime margin can be determined using the following formula:

[0153]

[0154] in, This is the upper limit for the number of errors. This represents the current number of errors. The rate of increase per unit time for errors. A stability constant is calculated to account for error growth. When multiple metrics provide inconsistent lifetime margins, the online model update module uses the smallest lifetime margin as a conservative surrogate label to prevent the model from self-reinforcing itself with its own predictions.

[0155] Step S129: The online model update module calculates parameter importance and performs constrained incremental training. This embodiment uses an elastic weight consolidation method. The online model update module calculates the importance of model parameters based on old data or historical representative samples, setting stronger constraints on parameters that contribute more to historical degradation patterns. Parameter importance can be calculated using the following formula:

[0156]

[0157] in, For model parameters The importance of the parameters, Number the model parameters. The number of historically representative samples. Numbering historically representative samples This represents the conditional probability of lifetime labels for historical representative samples under the parameters of the old stable model. Input as a historically representative sample, For historically representative sample lifetime labels, For the parameter set of the old stable model, The first in the parameter set of the old stable model The model parameters are as follows. During incremental training, the underlying temporal feature extraction parameters of the bidirectional long short-term memory network layers are frozen, and only the upper-layer temporal feature extraction parameters, temporal attention parameters, and probability output parameters are updated. The incremental training loss can be expressed as:

[0158]

[0159] in, This represents the total loss during incremental training. The negative log-likelihood loss is the probability distribution of the remaining useful life. To reinforce the constraint coefficients for elastic weights, This represents the total number of model parameters. For the first time after incremental training Each model parameter.

[0160] Step S130: The online model update module verifies the updated lifetime prediction model. Validation data comes from the most recent data segments not involved in incremental training and representative historical data segments. The online model update module calculates the validation loss, remaining lifetime prediction error, change in relative uncertainty, and confidence interval coverage. If the validation loss increases beyond a threshold, or the relative uncertainty remains higher than before the update, or the updated model causes frequent changes in the firmware strategy, the online model update module rolls back to the stable model parameters before incremental training. After successful validation, the online model update module deploys the updated lifetime prediction model as a new stable model and saves the model version, updated data range, and validation metrics.

[0161] Step S131: The system generates a health report. The health report includes the average remaining lifetime, confidence interval, relative uncertainty, trend of flash memory block erase / write cycles dispersion, write amplification trend, temperature risk, bad block growth trend, recommended maintenance time window, and a policy execution summary. The health report is used for display on the operations and maintenance interface and does not directly replace firmware control. Firmware control still relies on the continuous wear leveling strategy parameters.

[0162] In this embodiment, the data acquisition module outputs a degradation time series; the time-frequency domain feature engineering module converts the degradation time series into a fused degradation feature series; the lifetime prediction module converts the fused degradation feature series into a remaining lifetime probability distribution and relative uncertainty; the closed-loop decision module combines the relative uncertainty with the dispersion of flash memory block erase / write cycles and the input / output idle time to output continuous wear leveling strategy parameters; the dynamic wear leveling execution module converts the continuous wear leveling strategy parameters into firmware execution actions; and the wear feedback data after execution enters the next round of decision-making and online model updates. The outputs of each stage are used in subsequent stages, forming a continuous technology chain.

[0163] Example 2: This example is a further optimization based on Example 1. In this example, the solid-state drive (SSD) is deployed in industrial control equipment or an edge computing gateway. The input / output load in the industrial control equipment or edge computing gateway is periodic, with high sampling and writing frequency during the day and a long idle window at night. The ambient temperature fluctuates due to the influence of the factory or outdoor environment. Triggering garbage collection when the available block ratio is below 10% may initiate background migration and increase control log write latency during high daytime load periods; if garbage collection is postponed to nighttime, write blocking may occur due to insufficient available blocks during the day. This example illustrates the specific methods by which input / output idle time and temperature cycle characteristics are used in control.

[0164] In step S201, the data acquisition module acquires input / output load data and temperature data at a 5-minute sampling period. Input / output load data includes continuous idle time, average queue depth, recent input / output arrival rate, and background migration time. Temperature data includes controller temperature, NAND flash memory area temperature, and temperature change rate. For industrial control equipment, temperature sampling also includes the ambient temperature of the equipment enclosure. When the solid-state drive does not provide block-level temperature, the data acquisition module uses the temperature corresponding to the NAND die or channel as an approximation of the flash memory block temperature within the corresponding area.

[0165] In step S202, the time-frequency domain feature engineering module extracts frequency domain periodic features from the temperature data and input / output load data. When the temperature data has energy concentration within a 24-hour period, the intensity of spectral energy concentration increases; when the scheduled backup task starts at a fixed time each day, the main frequency of the input / output load data corresponds to the backup period. After the frequency domain periodic features enter the self-attention fusion layer, the lifetime prediction module can identify the impact of periodic high temperatures and periodic background writes on lifetime degradation, rather than treating periodic fluctuations as random noise.

[0166] In step S203, the lifetime prediction module outputs the probability distribution of remaining lifetime. When the temperature cycle is stable over a long period and the input / output load cycle is stable, the probability distribution is narrow and the relative uncertainty is low; when abnormally high temperatures occur, the backup window is extended, or the write amplification factor suddenly increases, the probability distribution widens and the relative uncertainty increases. Based on this, the closed-loop decision module increases the penalty intensity for bad page risk and temperature risk, thereby reducing the write probability of flash memory blocks in high-temperature areas.

[0167] In step S204, the closed-loop decision module generates a garbage collection execution window based on the idle time of inputs and outputs. When the current time is during a high-load daytime period, with a high average queue depth and high input / output arrival rate, the idle time of inputs and outputs is low. Even if the flash memory block erase / write counts have a high dispersion, the closed-loop decision module only increases the write allocation protection strength and does not immediately initiate large-scale cold data migration. When the current time enters the idle nighttime period, with increased continuous idle time and a decreased average queue depth, the idle time of inputs and outputs increases, and the closed-loop decision module triggers background garbage collection and cold data migration in advance. The background migration thus shifts from peak user input / output periods to idle windows.

[0168] In step S205, the dynamic wear leveling execution module selects migration objects according to the updated hot and cold data classification thresholds. For industrial log data, historical logs with a long recent access time, low access frequency, and no updates for a long time are identified as cold data. The dynamic wear leveling execution module migrates cold data to flash memory blocks with a high number of erase / write cycles but a low risk of bad pages and normal temperature, thereby reducing the probability of high-erasure-cycle flash memory blocks being erased in the future. Control parameters, real-time cache, and log segments being written are identified as hot or warm data and allocated to flash memory blocks with a low number of erase / write cycles and normal temperature.

[0169] In step S206, the dynamic wear leveling execution module collects write amplification factor and latency data after background garbage collection. When nighttime background migration causes the write amplification factor to exceed the engineering limit, the dynamic wear leveling execution module reduces the number of cold data migrations in the next round of control; when tail latency exceeds the limit during high load periods in the daytime, the dynamic wear leveling execution module suspends unnecessary background migrations; when the dispersion of flash block erase / write counts is not improved, the closed-loop decision module increases the erase / write count penalty intensity and expands the cold data migration candidate set in subsequent idle windows.

[0170] In step S207, the online model update module determines whether to trigger incremental training based on whether the dispersion of flash memory block erase / write cycles has not improved continuously. Industrial site temperatures and load cycles may differ from the factory training data. If the dispersion of flash memory block erase / write cycles has not improved for three consecutive feedback cycles, and the relative uncertainty continues to increase, the online model update module adds the most recent 24 hours of data to the incremental training buffer. Incremental training focuses on fine-tuning the time attention parameters and probability output parameters to make the model more sensitive to the current industrial site temperature and load cycles. The underlying time-series feature extraction parameters are frozen to preserve historical degradation patterns.

[0171] In this embodiment, the input / output idle level is not a simple idle marker, but rather a continuous variable used to control the garbage collection trigger threshold and migration timing. Relative uncertainty and the dispersion of flash block erase / write cycles determine whether to increase protection strength, while the input / output idle level determines the timing of background operations. If only the dispersion of flash block erase / write cycles is used, the system may perform migrations during high load periods; if only the input / output idle level is used, the system may perform unnecessary migrations during idle periods; if only the average remaining lifetime is used, the system cannot identify the risks arising from insufficient prediction confidence.

[0172] Example 3: This example is based on the same principles as Example 1, except that it provides an alternative implementation of the probability output layer and an enhanced implementation of the strategy rollback, which are used to cover implementation paths that do not use a Gaussian mixture output layer.

[0173] In step S301, the lifetime prediction module still receives the fused degradation feature sequence and generates a current degradation state representation through a temporal attention layer and a bidirectional long short-term memory network layer. The current degradation state representation does not directly output a single remaining lifetime value; instead, it is input to the quantile probability output layer. The quantile probability output layer outputs multiple remaining lifetime quantiles, including low quantile lifetime, median lifetime, and high quantile lifetime. The low quantile lifetime is used to represent a conservative lifetime estimate, the median lifetime is used to represent a central lifetime estimate, and the high quantile lifetime is used to represent a optimistic lifetime estimate.

[0174] In step S302, the lifetime prediction module calculates the approximate mean of the remaining lifetime and the distribution width based on multiple remaining lifetime quantiles. A larger distribution width indicates a higher degree of uncertainty in the model regarding the current lifetime state. The lifetime prediction module normalizes the distribution width and the approximate mean of the remaining lifetime to obtain the relative uncertainty. The meaning of the relative uncertainty is the same as in Example 1, and it is still used by the closed-loop decision module to generate continuous wear balancing strategy parameters. When using a quantile probability output layer, the low quantile lifetime, median lifetime, and high quantile lifetime form the lower bound, intermediate estimate, and upper bound of the remaining lifetime probability distribution, respectively. The closed-loop decision module receives the relative uncertainty calculated from the aforementioned quantiles.

[0175] In step S303, in another alternative approach, the lifetime prediction module uses a neural network sampling output that preserves the randomness of inference. During the training phase, a random deactivation layer is set, and during the inference phase, random deactivation is maintained, resulting in multiple inferences to obtain multiple remaining lifetime samples. The lifetime prediction module calculates the center estimate, distribution width, and relative uncertainty based on these multiple remaining lifetime samples. The neural network sampling output that preserves the randomness of inference is suitable for controllers or host management software where deploying a Gaussian mixture output layer is inconvenient. Regardless of whether a Gaussian mixture output layer, a quantile probability output layer, or inference sampling output is used, the core quantities received by the closed-loop decision module are the remaining lifetime center estimate and relative uncertainty.

[0176] In step S304, the dynamic wear leveling execution module performs a dual security check before writing the strategy parameters into the firmware strategy table. The first check is a parameter change check. If the difference between the new erase / write cycle penalty intensity, bad page risk penalty intensity, temperature risk penalty intensity, or garbage collection trigger threshold and the previous stable parameter is too large, the dynamic wear leveling execution module will not write directly, but will update gradually over multiple control cycles. The second check is a resource cost check. The dynamic wear leveling execution module predicts the updated background migration volume, the possible increase in NAND flash memory write volume, and the I / O latency risk. When the resource cost exceeds the engineering threshold, the dynamic wear leveling execution module only adjusts the write allocation weight and does not immediately initiate cold data migration. The resource cost is jointly determined by the background migration data volume, write amplification factor, and I / O latency in the most recent feedback cycle.

[0177] Step S305: After deploying the new strategy, the dynamic wear leveling execution module performs an observation period evaluation. The observation period can be set to three feedback cycles. During the observation period, the system continuously records the dispersion of flash block erase / write counts, write amplification factor, average input / output latency, tail latency, and error growth rate. When the dispersion of flash block erase / write counts improves and the write amplification factor and latency do not exceed the threshold, the new strategy is saved as a stable strategy; when the dispersion of flash block erase / write counts does not improve and the write amplification factor increases, the dynamic wear leveling execution module reduces the number of cold data migration candidates; when the tail latency exceeds the threshold, the dynamic wear leveling execution module rolls back to the previous stable strategy; when the error growth rate increases abnormally, the closed-loop decision module excludes the relevant flash blocks from the write candidate set and the cold data migration target set.

[0178] In step S306, the online model update module performs an observation period evaluation after updating the lifetime prediction model. The new model first enters the gray-scale inference state. During gray-scale inference, the new model only outputs the lifetime prediction results and suggested policy parameters, while the firmware still uses the policy parameters generated by the old stable model. The closed-loop decision module compares the validation loss, relative uncertainty, and policy stability of the new model and the old stable model on the same input. When the new model outputs a lower validation loss and the policy parameters change more smoothly for several consecutive cycles, the online model update module switches the new model to the stable model; when the confidence interval of the new model outputs becomes abnormally wide or the policy parameters change frequently, the online model update module discards the new model and retains the old stable model.

[0179] This embodiment expands the probability output format from Gaussian mixture to quantile output and sampled distribution output, and incorporates model updates and policy updates into the observation period rollback process. This embodiment does not change the main lines of data acquisition, time-frequency domain feature fusion, lifetime probability prediction, and adaptive wear equalization in Embodiment 1, but only adds a probability output alternative and engineering safety boundaries.

[0180] In some embodiments, the data acquisition module is deployed within the solid-state drive controller firmware, the time-frequency domain feature engineering module, the lifetime prediction module, and the closed-loop decision module are deployed within the host-side management software, and the dynamic wear leveling execution module is deployed within the solid-state drive controller firmware. The host-side management software periodically sends continuous wear leveling strategy parameters to the firmware, and the firmware updates the strategy table atomically. This deployment method is suitable for scenarios where the controller has limited computing power but the host has management software.

[0181] In some embodiments, the data acquisition module, time-frequency domain feature engineering module, lifetime prediction module, closed-loop decision module, dynamic wear leveling execution module, and online model update module are all deployed within the solid-state drive controller. This deployment method is suitable for enterprise-grade solid-state drives or controllers equipped with neural network inference acceleration units. To reduce controller resource consumption, the lifetime prediction model can operate using quantized parameters, fixed-point inference, or low-frequency inference methods, and the continuous wear leveling strategy parameters are updated once every multiple sampling periods.

[0182] In some embodiments, the closed-loop decision module also considers the spare block consumption rate and the uncorrectable error growth rate. When the spare block consumption rate exceeds the spare block risk threshold, the closed-loop decision module increases the penalty for bad page risk and reduces the probability of writing flash blocks with error growth. When the uncorrectable error growth rate exceeds the error risk threshold, the dynamic wear leveling execution module excludes the relevant flash blocks from the normal write candidate set and triggers a data migration or block retirement process.

[0183] In some embodiments, the online model update module does not employ elastic weight consolidation, but instead uses a combination of retained sample replay and parameter drift constraints. The online model update module retains a small number of historically representative samples, uses both new data and historically representative samples during incremental training, and limits the magnitude of changes in model parameters relative to the previous stable model. Retained sample replay and parameter drift constraints are used to reduce the risk of forgetting historical degradation patterns while adapting to new degraded data.

[0184] In some embodiments, the hot / cold data classification threshold is based not only on access frequency and recent access time, but also on the business type to which the logical data block belongs. Log data, model files, configuration files, and temporary database data can have different initial hot / cold classification parameters. The closed-loop decision module still continuously adjusts the classification threshold based on relative uncertainty and the dispersion of flash memory block erase / write cycles. The business type is only used as an initial classification reference and does not change the main process of probabilistic lifetime prediction participating in firmware wear leveling feedback control.

[0185] In some embodiments, the garbage collection trigger threshold is maintained separately for different flash memory regions. When the temperature deviation of a certain NAND die or channel is high, the closed-loop decision module increases the temperature risk penalty intensity of the corresponding region, the dynamic wear leveling execution module reduces the write probability of the corresponding region, and prioritizes the reclamation of recyclable blocks in the normally temperatured region during the free window. This approach can reduce the impact of local temperature stress on lifespan degradation in solid-state drives with uneven temperatures across multiple regions.

[0186] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0187] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. It should be noted that any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for predicting and balancing the lifespan of solid-state drives based on multi-dimensional feature deep learning, characterized in that, include: Acquire multi-source degradation data during the operation of solid-state drives and form a degradation time series with timestamps; The degradation time series is subjected to anomaly processing, missing data completion, and normalization. Temporal degradation features and frequency periodic features are extracted. The temporal degradation features and frequency periodic features corresponding to the same original degradation index are combined into index feature units and then self-attention fusion is performed to obtain a fused degradation feature sequence. The fused degradation feature sequence is input into the lifetime prediction model to generate a remaining lifetime probability distribution, and the remaining lifetime mean, overall uncertainty and relative uncertainty are obtained based on the remaining lifetime probability distribution. Continuous wear leveling strategy parameters are generated based on the relative uncertainty, the dispersion of flash memory block erase / write cycles, and the input / output idle time. The cold and hot data classification threshold, flash block write allocation weight, and garbage collection trigger threshold are updated according to the continuous wear leveling strategy parameters, and the wear feedback data after execution is used for subsequent updates of the continuous wear leveling strategy parameters and lifetime prediction model.

2. The solid-state drive lifetime prediction and balancing method based on multi-dimensional feature deep learning according to claim 1, characterized in that, The multi-source degradation data includes self-monitoring health data, write amplification data, bad block growth data, error growth data, input / output load data, and temperature data. The self-monitoring health data includes at least the average number of erase / write cycles, spare block balance, percentage of service life, media error count, and uncorrectable error count. The input / output load data includes at least the read / write ratio, random access ratio, average input / output size, queue depth, and idle duration.

3. The solid-state drive lifetime prediction and balancing method based on multi-dimensional feature deep learning according to claim 1, characterized in that, The anomaly handling, missing data imputation, and normalization processes performed on the degraded time series include: Anomalies are marked for sampled values ​​that deviate from the statistical range within the sliding window; Imput short-term missing data by interpolation; Generate missing identifiers for consecutive missing data; Convert cumulative count data into unit time increments or growth rates; Data of different dimensions are normalized to obtain a unified degradation time series for feature extraction.

4. The solid-state drive lifetime prediction and balancing method based on multi-dimensional feature deep learning according to claim 1, characterized in that, Extracting the time-domain degradation features and the frequency-domain periodic features includes: Within the same sliding window, the mean, dispersion, skewness, kurtosis, trend slope, and maximum rate of change are extracted from each original degradation index as the time-domain degradation features. A fast Fourier transform is performed on each original degradation index, and the dominant frequency, spectral energy concentration, and spectral dispersion are extracted as the frequency-domain periodic features. The time-domain degradation features and frequency-domain periodic features corresponding to the same original degradation index are combined into an index feature unit and input into the attention fusion layer to obtain the fused degradation feature sequence.

5. The solid-state drive lifetime prediction and balancing method based on multi-dimensional feature deep learning according to claim 1, characterized in that, The lifetime prediction model includes a time attention layer, a bidirectional long short-term memory network layer, and a probability output layer. The time attention layer generates time weights based on the degradation contribution of different time slices in the fused degradation feature sequence. The bidirectional long short-term memory network layer generates a degradation state representation based on the weighted fused degradation feature sequence. The probability output layer generates the remaining lifetime probability distribution based on the degradation state representation.

6. The solid-state drive lifetime prediction and balancing method based on multi-dimensional feature deep learning according to claim 5, characterized in that, The probability output layer adopts a Gaussian mixture output layer, which outputs the mean, standard deviation and mixture weight of multiple lifetime components, and obtains the mean of remaining lifetime, the overall uncertainty, the confidence interval and the relative uncertainty from the multiple lifetime components.

7. The solid-state drive lifetime prediction and balancing method based on multi-dimensional feature deep learning according to claim 1, characterized in that, The dispersion of flash block erase / write counts is determined based on the standard deviation and mean of the erase / write counts of flash blocks participating in wear leveling. The input / output idleness is determined based on continuous idle time, recent average queue depth, and recent input / output arrival rate. The continuous wear leveling strategy parameters include erase / write count penalty intensity, bad page risk penalty intensity, temperature risk penalty intensity, and the garbage collection trigger threshold. The continuous wear leveling strategy parameters are generated based on the relative uncertainty, the dispersion of flash block erase / write counts, and the input / output idleness.

8. The solid-state drive lifetime prediction and balancing method based on multi-dimensional feature deep learning according to claim 7, characterized in that, Updating the flash block write allocation weights includes: For each candidate flash memory block, obtain the current erase / write cycles, bad page risk value, and temperature deviation. The write probability of high-write-cycle flash memory blocks is reduced based on the write-cycle penalty intensity. The probability of writing to flash memory blocks with a high risk of bad pages is reduced based on the severity of the bad page risk penalty. The probability of writing to flash memory blocks with high temperature deviations is reduced based on the aforementioned temperature risk penalty intensity. The write probability of candidate flash blocks is normalized and then used to select the target flash block for a new write request.

9. The solid-state drive lifetime prediction and balancing method based on multi-dimensional feature deep learning according to claim 7, characterized in that, The write / erase cycle penalty intensity is continuously updated based on the degradation slope of the mean remaining lifetime, the bad page risk penalty intensity is continuously updated based on the relative uncertainty, and the temperature risk penalty intensity is continuously updated based on the temperature-accelerated degradation factor. Furthermore, the write / erase cycle penalty intensity, the bad page risk penalty intensity, and the temperature risk penalty intensity are all constrained by corresponding engineering upper and lower limits.

10. The solid-state drive lifetime prediction and balancing method based on multi-dimensional feature deep learning according to claim 1, characterized in that, Updating the garbage collection trigger threshold includes: increasing the conservatism of garbage collection when the relative uncertainty increases; triggering wear leveling-related garbage collection earlier when the dispersion of flash block erase / write cycles increases; increasing background garbage collection execution opportunities when the input / output idleness increases; and after the garbage collection trigger threshold is updated, determining whether to retain the updated garbage collection trigger threshold based on the write amplification factor and input / output latency.