A method and device for predicting the lifespan of solid-state drives based on predictive wear leveling

By constructing a wear trend state space reconstruction model and dynamically adjusting the wear threshold, a dynamic wear balancing strategy is generated, which solves the problem of the separation between wear balancing scheduling and prediction in the existing technology and achieves more accurate wear balancing management.

CN122024807BActive Publication Date: 2026-07-03GUIZHOU UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610470094.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-04-10
Publication Date
2026-07-03
Estimated Expiration
2046-04-10

Smart Images

  • Figure CN122024807B_ABST
    Figure CN122024807B_ABST
Patent Text Reader

Abstract

This invention provides a method and device for predicting the lifespan of a solid-state drive (SSD) based on predictive wear leveling. The method acquires a snapshot sequence of the SSD's wear state and a historical wear leveling scheduling record. It performs a wear trend state space reconstruction operation on the acquired data, iteratively injecting historical migration operation information as a state perturbation factor into the state transition matrix to obtain a set of wear evolution correction trajectories including a deviation correction factor. Based on the deviation correction factor, it dynamically adjusts the wear threshold to generate a set of imbalance tolerance thresholds at the storage unit level. It compares the predicted wear index value sequence with the imbalance tolerance thresholds to identify predictive wear imbalance units. Based on the identification results, it generates a set of dynamic wear leveling strategies. This method integrates historical wear leveling operations as perturbation factors into the wear prediction process, enabling early identification and targeted intervention of wear imbalance units.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of data processing and solid-state storage, and more specifically, to a method and device for predicting the lifespan of a solid-state drive based on predictive wear leveling. Background Technology

[0002] As solid-state drive (SSD) storage density continues to increase, wear leveling and lifespan prediction of storage cells have become key technologies for ensuring device reliability. Existing methods typically rely on real-time collected wear status data, triggering data migration when wear exceeds a preset threshold, or inputting wear status data into a predictive model to estimate future wear trends. However, in these methods, the triggering decision for wear leveling scheduling is disconnected from wear trend prediction. The predictive model fails to consider the impact of historical scheduling operations on wear evolution, leading to discrepancies between the predicted results and the actual trajectory after scheduling intervention. Leveling strategies based on such predictive information struggle to accurately match actual wear development, affecting the accuracy of scheduling timing and the effectiveness of resource allocation. Summary of the Invention

[0003] This invention provides a method and device for predicting the lifespan of a solid-state drive based on predictive wear leveling.

[0004] In a first aspect, embodiments of the present invention provide a method for predicting the lifespan of a solid-state drive based on predictive wear leveling, the method comprising:

[0005] Obtain the wear state snapshot sequence and wear leveling scheduling history of the solid-state drive. The wear state snapshot sequence contains multiple wear state snapshot units, and the wear leveling scheduling history contains the timestamps of the data migration operations that have been performed and the amount of data migrated.

[0006] A wear trend state space reconstruction operation is performed on the wear state snapshot sequence and the wear leveling scheduling history. The migration operation information in the wear leveling scheduling history is used as a state perturbation factor and iteratively injected into the state transition matrix of the wear trend prediction process to obtain the wear evolution correction trajectory set corresponding to each wear state snapshot unit. The wear evolution correction trajectory set contains the deviation correction factor of the wear index prediction value sequence and the wear index actual observation value sequence of the storage unit.

[0007] Dynamic wear threshold adjustment is performed based on the deviation correction factor of each memory cell in the wear evolution correction trajectory set, and the cumulative effect of the deviation correction factor is mapped to the unbalanced tolerance threshold set at the memory cell level.

[0008] The wear index prediction sequence of each storage cell in the wear evolution correction trajectory set is compared with the corresponding threshold in the imbalance tolerance threshold set, and the storage cell whose wear index prediction value exceeds the corresponding threshold is identified as the predictive wear imbalance cell.

[0009] A dynamic wear leveling strategy set is generated based on the predictive wear imbalance unit. The dynamic wear leveling strategy set includes the migration operation execution time point and migration data volume allocation scheme for each predictive wear imbalance unit.

[0010] In a second aspect, embodiments of the present invention provide an electronic device, comprising:

[0011] Memory, which stores computer programs;

[0012] The processor is used to load computer programs to implement the above-mentioned method for predicting the lifespan of solid-state drives based on predictive wear leveling.

[0013] This invention iteratively injects the wear leveling scheduling history as a state disturbance factor into the state transition matrix of the wear trend prediction process, enabling the deviation correction factor to adaptively reflect the actual impact of historical migration operations on wear evolution, thus achieving dynamic embedding and recursive correction of the scheduling intervention effect. The cumulative effect of the deviation correction factor is mapped to a set of imbalance tolerance thresholds at the storage unit level, allowing wear triggering conditions to be configured differently based on the evolution characteristics of the deviation factors in each unit. The predicted trajectory after state disturbance correction is compared with the personalized tolerance thresholds to identify predictive wear imbalance units, and the corrected prediction information is fused with the personalized thresholds to avoid misjudgments and omissions. Based on the identification results, a dynamic wear leveling strategy is generated, including migration execution time points and migration data allocation schemes, elevating wear leveling management from a passive response to an active prediction mode, enhancing the foresight and accuracy of wear leveling scheduling. Attached Figure Description

[0014] Figure 1 This is a flowchart of a solid-state drive life prediction method based on predictive wear leveling provided in an embodiment of the present invention.

[0015] Figure 2 This is a schematic diagram of the composition of an electronic device provided in an embodiment of the present invention. Detailed Implementation

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

[0017] Please see Figure 1 , Figure 1A flowchart of a solid-state drive (SSD) lifespan prediction method based on predictive wear leveling is provided for embodiments of the present invention. This method can be executed by an electronic device and may include the following steps:

[0018] Step S100: Obtain the wear state snapshot sequence and wear leveling scheduling history of the solid-state drive. The wear state snapshot sequence contains multiple wear state snapshot units, and the wear leveling scheduling history contains the timestamps of executed data migration operations and the amount of migrated data.

[0019] Wear state snapshot sequences are structured datasets obtained by sampling the wear state of the entire address space of a solid-state drive (SSD) at discrete time points. Each wear state snapshot unit corresponds to a sampling time, and internally, the unit stores, for example, the actual observed wear index values ​​of each storage cell in the SSD at that time in vector form. The granularity of the storage cell division is consistent with the underlying physical management unit of the SSD, which can be a physical block, and its address is located through a mapping table from logical block address to physical address. The actual observed wear index values ​​can be obtained by polling the wear count register corresponding to each physical block through register read instructions of the SSD controller chip. This register records the cumulative number of program erase cycles executed since the physical block was manufactured, and this number is a direct physical quantity for measuring the degree of wear of the flash memory cells. Wear leveling scheduling history is log data written to the non-volatile storage area by the solid-state drive firmware layer when running wear leveling algorithms. Each record corresponds to one executed data migration operation. The record structure can adopt a fixed-length format, and for example, it contains four fields: the operation timestamp field occupies 8 bytes, recording the time when the operation occurred; the source storage unit identifier field occupies 4 bytes, recording the physical block address from which the data was migrated; the target storage unit identifier field occupies 4 bytes, recording the physical block address into which the data was migrated; and the migrated data volume field occupies 4 bytes, recording the amount of data migrated in logical block sectors.

[0020] The wear leveling algorithm deployed in the solid-state drive (SSD) can employ a threshold-triggered dynamic migration mechanism. This algorithm includes a wear leveling scheduler that maintains a global wear leveling trigger threshold, measured in programmable erase cycles. The initial value is set by the SSD at the factory based on the physical characteristics of the storage units. The scheduler periodically scans the current programmable erase cycle count of all storage units, calculates the difference between the maximum and minimum wear values, and triggers wear leveling when this difference exceeds the threshold. During wear leveling, the scheduler first identifies the set of storage units with the highest wear values ​​as data migration sources and the set of storage units with the lowest wear values ​​as data migration destinations. Then, it selects storage units storing cold data from the migration sources and reads the data into a buffer. Finally, it writes the data from the buffer to the migration destination and updates the mapping table from logical block addresses to physical addresses. After each migration operation, the scheduler writes relevant information to a log file in the non-volatile storage area, resulting in a wear leveling scheduling history. Each record contains four fields: operation timestamp, source storage unit identifier, target storage unit identifier, and the amount of data migrated.

[0021] Step S200: Perform a wear trend state space reconstruction operation on the wear state snapshot sequence and the wear leveling scheduling history. Iteratively inject the migration operation information in the wear leveling scheduling history as a state perturbation factor into the state transition matrix of the wear trend prediction process to obtain the wear evolution correction trajectory set corresponding to each wear state snapshot unit. The wear evolution correction trajectory set contains the deviation correction factor of the wear index prediction value sequence and the wear index actual observation value sequence of the storage unit.

[0022] In this embodiment of the invention, the wear trend state space reconstruction operation constructs a discrete-time linear dynamic system. This system uses the wear index value of the storage unit as the state variable and the data migration operation as the external control input. The state vector is defined as an N-dimensional column vector, where N is the total number of storage units in the solid-state drive, and the nth component of the vector corresponds to the wear index value of the nth storage unit at the current moment. The state transition matrix is ​​defined as an N-dimensional square matrix, where the diagonal elements represent the natural growth rate of the wear index of each storage unit per unit time, and the off-diagonal elements represent the coupling strength between storage units. This coupling strength is determined by the redistribution pattern of the write load during data migration by the wear leveling algorithm. The construction of the state transition matrix is ​​based on statistical learning of historical wear state snapshot sequences: collecting the state changes between multiple consecutive snapshot units, and fitting the optimal state transition matrix using the least squares regression method to minimize the sum of squared prediction errors. Using the migration operation information in the wear leveling scheduling history as a state perturbation factor means that each migration operation is regarded as an impulse input to the state vector, and the intensity of this impulse is quantified by the storage unit wear model. The perturbation factor is injected as follows: after applying the state transition matrix for state prediction, the predicted state vector is superimposed with the perturbation vectors generated by all migration operations. When calculating the perturbation vector, for each migration operation, a positive perturbation term is calculated based on the amount of data migrated from the source storage unit, indicating that its wear growth is suppressed; a negative perturbation term is calculated based on the amount of data written to the target storage unit, indicating that its wear growth is accelerated. The iterative injection process repeats the above operation at each prediction step. After multiple iterations, each wear state snapshot unit generates a corresponding wear evolution correction trajectory. This trajectory is a two-dimensional data structure, with the first dimension being the time axis and the second dimension being the storage unit index. Each cell stores the predicted wear index value of that storage unit at that time point. The deviation correction factor is a feature extracted from this trajectory. It is calculated by performing an exponentially weighted moving average on the prediction error sequence of each storage unit to obtain a cumulative correction coefficient reflecting systematic deviation. This coefficient is used for dynamic threshold adjustment in subsequent steps.

[0023] In some embodiments, step S200 can be implemented as steps S210~S260:

[0024] Step S210: Extract the original dataset of wear indicators corresponding to the current wear state snapshot unit from the wear state snapshot sequence, and extract the set of migration operation records within the preset time window before the current wear state snapshot unit from the wear leveling scheduling history.

[0025] The position of the current wear state snapshot unit in the wear state snapshot sequence is determined by an iterative index pointer, which initially points to the first unit of the sequence and increments with each iteration. The extraction operation is implemented by parsing the snapshot unit's data structure, which can be stored in a compact binary format. For example, the header field occupies 16 bytes, with the first 8 bytes recording the snapshot timestamp and the last 8 bytes recording the total number of storage units. The body field, starting from the 17th byte, stores the wear index values ​​of each storage unit in ascending order of storage address, with each value occupying 4 bytes. The extraction process reads 4-byte values ​​sequentially from the body field to obtain the original wear index dataset, which is a one-dimensional array of length [length missing]. The preset time window is defined as a left-closed, right-open interval between the timestamp of the previous wear state snapshot unit and the timestamp of the current wear state snapshot unit. When extracting the migration operation record set from the wear leveling scheduling history, all entries in the history file are traversed. For each record, its timestamp field is read, and it is determined whether the timestamp falls within the preset time window. If so, the entire record is copied to the migration operation record set. After extraction, the records in the set are sorted in ascending order of timestamp.

[0026] Step S220: Based on the migration data volume allocation scheme in the migration operation record set, determine the total amount of data migrated out of each storage unit within the preset time window, and analyze the amount of wear evolution suppression caused by migration operations in each storage unit within the preset time window based on the total amount of data migrated out.

[0027] Each record in the migration operation record set contains a migration data volume field indicating the amount of data migrated from the source storage unit in this operation. The process of determining the total data migration amount first constructs a hash map table with the storage unit identifier as the key. This hash table uses open addressing to resolve collisions, and its initial capacity is set to twice the total number of storage units. The migration operation record set is traversed. For each record, its source storage unit identifier field and migration data volume field are extracted. Using the source storage unit identifier as the key, the corresponding bucket is searched in the hash table. If the bucket is empty, a new key-value pair is created, and the migration data volume is used as the initial value. If the bucket already exists, the migration data volume is added to the existing value. After the traversal is complete, the value corresponding to each key in the hash table is the total data migration amount for that storage unit within a preset time window. The analysis process for the wear evolution suppression amount is based on a storage unit wear model, which uses a piecewise linear function to describe the relationship between the total data migration amount and the wear evolution suppression amount. Piecewise linear functions can be obtained through experimental calibration. For example, in an experimental environment, a batch of storage cells of the same model are selected and divided into multiple experimental groups. Each experimental group undergoes a different amount of data migration operations, with the migration amount starting from 0 and increasing in fixed steps until it reaches the storage cell capacity. After completing the data migration operations, the same programmable erase cycle load is applied to all experimental groups. The total number of programmable erase cycles experienced by each experimental group's storage cells when they reach a preset wear threshold is recorded. The increase in the number of programmable erase cycles compared to the control group is defined as the wear evolution suppression amount. A two-dimensional mapping table is constructed by linking the data migration amount with the corresponding wear evolution suppression amount. This table can be stored using a binary search tree structure, with the key being the data migration amount and the value being the wear evolution suppression amount. During parsing, the total data migration amount for each storage cell is used as the query key. A search is performed in the binary search tree to find the two nodes with the closest key values, and linear interpolation is used to calculate the corresponding wear evolution suppression amount.

[0028] In some embodiments, step S220 can be implemented as steps S221 to S226:

[0029] Step S221: Parse each migration operation record in the migration operation record set, extract the source storage unit identifier and the amount of data migrated from the source storage unit contained in each migration operation record, and collect and accumulate the migration data corresponding to each source storage unit identifier to obtain the total amount of data migrated out of each storage unit within the preset time window.

[0030] Migration operation records can be stored in a fixed-length binary format. For example, each record is 32 bytes long, where bytes 0 to 7 are timestamps, bytes 8 to 11 are source storage unit identifiers, bytes 12 to 15 are target storage unit identifiers, bytes 16 to 19 are the migration data amount, and the remaining 12 bytes are reserved fields. The parsing process loads the record set into memory using a memory-mapped file. Then, it iterates through the starting address of each record, reading the 4 bytes at offset 8 as the source storage unit identifier and the 4 bytes at offset 16 as the migration data amount. The aggregation and accumulation operation is implemented by constructing an accumulation array indexed by the source storage unit identifiers. The length of this array is equal to the total number of storage units, and all elements are initialized to zero. For each parsed record, the migration data amount is accumulated into the array element corresponding to its source storage unit identifier as the array index. After traversing all records, the value stored at each index in the accumulation array represents the total amount of data migrated out of the corresponding storage unit within a preset time window.

[0031] Step S222: Obtain the storage cell wear model of the solid-state drive. The storage cell wear model defines the inhibition relationship between migration operations and the wear evolution process of storage cells.

[0032] The storage cell wear model is stored as a lookup table in the read-only memory area of ​​the solid-state drive (SSD). This lookup table is generated by the manufacturer through accelerated aging experiments during the factory testing phase. The lookup table's data structure is an array of key-value pairs. For example, each key-value pair contains a data migration amount field and a wear evolution suppression amount field, each occupying 4 bytes. The lookup table is sorted in ascending order by the data migration amount field to facilitate binary search. During the lookup table construction, a batch of storage cells of the same model are selected and divided into M experimental groups, each containing the same number of storage cells. For the k-th experimental group, the data migration amount is set to D. kThe step size starts from 0 and increases incrementally until it reaches twice the storage cell capacity to cover the saturation range. A specified amount of data migration is performed on the storage cells of each experimental group. This migration is achieved by writing data to the storage cell and then marking it as invalid. After the migration is complete, the same program-erase cycle load is applied to the storage cells of all experimental groups, simulating a mixed read / write mode in real-world usage. During the load application, the current number of program-erase cycles for each storage cell is measured at fixed time intervals, and the total number of program-erase cycles experienced by each experimental group's storage cells when they first reach the preset wear threshold is recorded. The average total number of program-erase cycles for each experimental group is calculated. This average is then subtracted from the average of the experimental groups (where the data migration amount in the control group is 0) to obtain the wear evolution suppression amount corresponding to that data migration amount. Data migration amounts and corresponding wear evolution suppression amounts for all experimental groups are paired, sorted by data migration amount, and written to the read-only storage area.

[0033] Step S223: Map and match the total amount of data migrated out of each storage unit with the suppression relationship in the storage unit wear model to obtain the total amount of wear evolution suppression for each storage unit within a preset time window.

[0034] The mapping and matching operation is performed in the lookup table of the storage cell wear model using a binary search algorithm. For each storage cell, its total data migration amount is obtained as the lookup key. A binary search is then performed in the lookup table: the left pointer is initialized to point to the beginning of the lookup table, and the right pointer to point to the end of the lookup table. The middle position is calculated, and the data migration amount at the middle position is compared with the lookup key. If the lookup key is less than the middle value, the right pointer is moved to the middle position and the value is decreased by one. If the lookup key is greater than the middle value, the left pointer is moved to the middle position and the value is increased by one. If they are equal, the wear evolution suppression amount at the middle position is directly returned. When no exact match is found at the end of the binary search, the left pointer points to the first position greater than the lookup key, and the right pointer points to the last position less than the lookup key. If both the left and right pointers are within the lookup table range, a general linear interpolation method can be used to calculate the total wear evolution suppression amount. If the lookup key is less than the minimum data migration amount in the lookup table, an extrapolation method is used, and the total suppression amount is equal to the suppression amount corresponding to the minimum data migration amount multiplied by the ratio of the lookup key to the minimum data migration amount. If the query key is greater than the maximum data migration amount in the lookup table, saturation processing is used, and the total amount of suppression is equal to the suppression amount corresponding to the maximum data migration amount.

[0035] Step S224: Obtain the duration of the preset time window, distribute the total amount of wear evolution suppression for each storage cell according to the duration of the time window, and obtain the wear evolution suppression rate of each storage cell per unit time.

[0036] The duration of the preset time window is obtained by calculating the difference between the timestamp of the current wear state snapshot unit and the timestamp of the previous wear state snapshot unit. The calculation result is in hours and can be stored as a double-precision floating-point number. During distributed processing, for each storage unit, its total wear evolution suppression is divided by the duration of the preset time window. The quotient is the wear evolution suppression rate of that storage unit per unit time. This rate represents the average amount of wear index growth reduced per hour for that storage unit by migration operations within the preset time window.

[0037] Step S225: Use the wear evolution suppression rate as the wear evolution suppression amount for each memory cell. The wear evolution suppression amount is used to represent the correction rate of the migration operation on the predicted value of the memory cell wear index per unit time.

[0038] The wear evolution suppression amount is a scalar value with the same units as the wear index and a time dimension of hours. In the subsequent prediction process of state space reconstruction, this suppression amount is directly used to correct the prediction results generated by the state transition matrix. Specifically, when it is necessary to calculate the predicted wear index value from time point A to time point B, the state transition matrix is ​​first applied to evolve the wear index value at time point A to obtain the uncorrected predicted value. Then, the time difference between A and B is calculated, and the wear evolution suppression amount is multiplied by this time difference to obtain the cumulative suppression amount. Finally, the cumulative suppression amount is subtracted from the uncorrected predicted value to obtain the corrected predicted value. This correction process ensures that the suppression effect of the migration operation is accurately reflected in the prediction.

[0039] Step S226: Arrange the wear evolution suppression amount of each memory cell in the order of memory address to generate a wear evolution suppression amount vector. The length of the wear evolution suppression amount vector is equal to the total number of memory cells.

[0040] The storage address order is defined as the ascending order of the physical addresses of the storage units, which is consistent with the physical address space layout of the solid-state drive. When constructing the wear evolution suppression vector, a contiguous memory space of length N is allocated, where N is the total number of storage units. All elements in this memory space are initialized to zero. All storage units are traversed. For each storage unit, its physical address offset is obtained. This offset ranges from 0 to N-1. This offset is used as the vector index, and the wear evolution suppression amount calculated in step S225 is written to the corresponding index position in the memory space. After the vector is constructed, its i-th element corresponds to the wear evolution suppression amount of the storage unit with the physical address offset of . The vector structure is an N-dimensional one-dimensional array.

[0041] Step S230: Obtain the wear evolution prediction trajectory corresponding to the previous wear state snapshot unit, and correlate and fuse the wear index prediction value of each storage unit in the wear evolution prediction trajectory with the wear evolution suppression amount to obtain the preliminary corrected wear prediction value.

[0042] The wear evolution prediction trajectory storage area is maintained using a circular buffer structure. This buffer has a fixed capacity, and each cell stores the complete prediction trajectory data for one time point. The circular buffer is maintained by two pointers: a write pointer points to the next writable position, and a read pointer points to the current read position. When retrieving the wear evolution prediction trajectory corresponding to the previous wear state snapshot cell, the previous index is obtained by subtracting 1 from the current iteration index. The actual storage position of this index in the circular buffer is calculated as the index modulo the buffer capacity, and the stored prediction trajectory data is read from this position. This prediction trajectory data is a two-dimensional array. The first dimension is the storage cell index, and the second dimension is the time step index, storing the predicted wear index value for each time step from the start time point to the previous snapshot acquisition time. The correlation and fusion process first extracts the predicted value of each storage cell at the last time step from the prediction trajectory as the baseline predicted wear value, which is located at the last index position of the second dimension of the two-dimensional array. Then, the time interval from the previous snapshot acquisition time to the current snapshot acquisition time is calculated, and this time interval is multiplied by the wear evolution suppression amount to obtain the cumulative wear evolution suppression amount. Finally, the difference between the baseline predicted wear value and the cumulative amount of wear evolution suppression is calculated to obtain the preliminary corrected wear prediction value. This difference calculation reflects the suppressive effect of migration operations on the wear evolution process, that is, the actual wear growth should be slower than the natural growth without migration interference.

[0043] In some embodiments, step S230 can be implemented as steps S231 to S235:

[0044] Step S231: Read the wear evolution prediction trajectory corresponding to the previous wear state snapshot unit from the wear evolution prediction trajectory storage area. The wear evolution prediction trajectory contains a sequence of wear index prediction values ​​for each storage unit from the preset start time point to the acquisition time point of the previous wear state snapshot unit.

[0045] The data in the wear evolution prediction trajectory storage area is organized chronologically in a circular buffer. Data for each time point is stored as a structure containing an 8-byte timestamp field and a predicted value array field. The predicted value array is a one-dimensional array of length 1, with each element occupying 4 bytes, and the array elements are arranged in memory address order. The read operation uses the timestamp of the previous wear state snapshot unit as the lookup key. Starting from the read pointer position, the system traverses the circular buffer, comparing the timestamp field of each structure with the lookup key. When a matching timestamp is found, the predicted value array in that structure is completely copied into memory to form the wear evolution prediction trajectory dataset. Each predicted value sequence in this dataset is an ordered set in the time dimension, and the length of the sequence is equal to the number of prediction steps contained between the preset start time point and the previous snapshot acquisition time point.

[0046] Step S232: For each storage cell, extract the wear index prediction value corresponding to the last time point in the wear index prediction value sequence as the benchmark predicted wear value.

[0047] The predicted wear index sequence is stored in memory as a two-dimensional array. The first dimension index is the memory cell address, and the second dimension index is the time step. The second dimension index corresponding to the last time point is equal to the sequence length minus one. For each memory cell, the corresponding row in the first dimension of the two-dimensional array is located using its memory address offset. The value is read from the position in the second dimension index of that row, which is the sequence length minus one. This value is the baseline predicted wear value. This value represents the prediction model's estimate of the wear degree of that memory cell at the time of the previous wear state snapshot cell.

[0048] Step S233: Based on the time interval between the previous wear state snapshot unit and the current wear state snapshot unit, and the wear evolution suppression amount of each storage unit, calculate the cumulative amount of wear evolution suppression caused by migration operations within the time interval.

[0049] The time interval between the previous wear state snapshot and the current wear state snapshot is obtained by subtracting their timestamp fields. The result is calculated in hours and stored as a double-precision floating-point number. For each storage cell, its wear evolution suppression amount is obtained, which represents the suppression rate per unit time. Multiplying the time interval by the wear evolution suppression amount yields the cumulative wear evolution suppression amount due to migration operations within that time interval. This cumulative amount represents the total increase in wear metrics reduced for that storage cell by migration operations from the previous snapshot time to the current snapshot time.

[0050] Step S234: Perform a difference calculation between the baseline predicted wear value and the cumulative amount of wear evolution suppression for each memory cell to obtain the preliminary corrected wear prediction value for each memory cell.

[0051] During the interpolation calculation, for each memory cell, the accumulated amount of wear evolution suppression is subtracted from the baseline predicted wear value. The resulting difference is the preliminary corrected wear prediction value. This calculation is based on the physical logic that the baseline predicted wear value assumes the natural growth of wear without migration operation interference. However, in reality, migration operations suppress some wear, therefore the actual wear value should be less than the baseline predicted value. The amount subtracted is the suppression contribution from the migration operation. If the baseline predicted wear value is less than the accumulated amount of wear evolution suppression, the preliminary corrected wear prediction value may be negative. In this case, it is set to 0, indicating that wear has not yet started or is in its initial state.

[0052] Step S235: Arrange the preliminary corrected wear prediction values ​​of each storage cell in the order of storage address to generate a preliminary corrected wear prediction value vector. The vector dimension of the preliminary corrected wear prediction value vector is equal to the total number of storage cells.

[0053] The method for constructing the preliminary corrected wear prediction value vector is the same as in step S226. A contiguous memory space of length is allocated, all memory cells are traversed, and the physical address offset of each memory cell is obtained as the vector index. The preliminary corrected wear prediction value calculated in step S234 is written into the corresponding index position in the memory space. After the vector is constructed, its structure is an N-dimensional one-dimensional array, with array elements arranged in memory address order.

[0054] Step S240: Compare the deviation between the preliminary corrected wear prediction value and the actual observed wear index value of the corresponding storage unit in the current wear state snapshot unit, and generate a single-step correction deviation value for each storage unit in the current wear state snapshot unit.

[0055] Specifically, the actual observed value vector of wear indicators in the current wear state snapshot unit is obtained. This vector is constructed in the same way as the initial corrected wear prediction value vector, but the values ​​are derived from the actual values ​​read from the solid-state drive wear counter register, rather than the predicted values. An element-wise subtraction operation is performed on the two vectors; that is, for each storage cell, the initial corrected wear prediction value is subtracted from the actual observed value. The difference is the single-step correction bias value. This bias value reflects the difference between the actual suppression effect of the migration operation and the theoretical suppression effect of the model at the current prediction step. A positive value indicates that the actual wear is higher than the corrected prediction value, i.e., the actual suppression effect is less than the theoretical suppression effect; a negative value indicates that the actual wear is lower than the corrected prediction value, i.e., the actual suppression effect is greater than the theoretical suppression effect. The absolute value of this bias value reflects the current error level of the prediction model.

[0056] Step S250: The single-step correction deviation value is embedded into the state transition matrix of the wear trend prediction process through the state perturbation injection mechanism to generate the deviation correction factor corresponding to each storage unit. The deviation correction factor is then integrated with the wear evolution prediction trajectory to obtain the wear evolution correction trajectory set corresponding to the current wear state snapshot unit.

[0057] For example, the state perturbation injection mechanism is implemented using an adaptive Kalman filter framework. The state transition matrix is ​​used as the system matrix, and the single-step correction bias value is used as the observation residual. The parameters of the state transition matrix are dynamically adjusted through the Kalman gain matrix. Specifically, the diagonal elements of the state transition matrix represent the wear growth rate of each memory cell, which is dynamically adjusted based on the single-step correction bias value. The adjustment algorithm uses a recursive least squares method with a forgetting factor. It fuses the single-step correction bias value of the current step size with the historical cumulative bias value using a certain learning rate to generate a smooth bias correction factor. The bias correction factor is a scalar, with a value range, for example, between 0 and 2. Specifically, the original estimate of the bias correction factor is first calculated, which is the weighted sum of the exponentially weighted moving average of the historical cumulative bias value and the current bias value. Then, the original estimate is limited to the range of 0 to 2. When the bias correction factor is greater than 1, it indicates that the actual wear growth is faster than the model prediction, requiring an increase in the growth rate in subsequent predictions; when the bias correction factor is less than 1, it indicates that the actual wear growth is slower than the model prediction, requiring a decrease in the growth rate in subsequent predictions. The method for collaboratively integrating the deviation correction factor with the wear evolution prediction trajectory involves constructing an extended trajectory record structure. This structure comprises four parts: a timestamp field, a predicted value vector field, a deviation correction factor field, and an observed value vector field. This extended record is appended to the end of the wear evolution correction trajectory set to obtain new trajectory points. After this step, the wear evolution correction trajectory set corresponding to the current wear state snapshot unit is updated, containing complete prediction information for all time points from the start time to the current time, as well as the deviation correction factor for each time point.

[0058] Step S260: Store the wear evolution correction trajectory set corresponding to the current wear state snapshot unit to the wear evolution correction trajectory storage area, and synchronously store the deviation correction factor to the deviation correction factor historical record library.

[0059] For example, the wear evolution correction trajectory storage area uses persistent storage, writing trajectory data to a reserved area on the solid-state drive. The storage operation first obtains the timestamp of the current wear state snapshot unit as the index key, then serializes the extended trajectory record generated in step S250 and writes it to the storage area. The serialization process converts the predicted value vector, observed value vector, and deviation correction factor into a continuous byte stream, and adds header information to record the data length and checksum. The header information occupies 16 bytes, containing a 4-byte version number, a 4-byte data length, a 4-byte timestamp, and a 4-byte checksum. The deviation correction factor historical record library is maintained using an independent data structure. This structure uses storage units as rows and the time points of wear state snapshot units as columns, resulting in a two-dimensional table. This table is organized in a columnar storage format, meaning that the deviation correction factors of all storage units at the same time point are stored consecutively to improve the locality of time-series access. For each storage unit, the synchronous storage operation locates the corresponding row index based on its storage address and the corresponding column index based on the timestamp of the current wear state snapshot unit, writing the deviation correction factor into that cell. The write operation adopts a batch commit method. After processing each worn state snapshot unit, the deviation correction factor in the buffer is batch-flushed to the non-volatile storage medium.

[0060] Step S300: Perform dynamic wear threshold adjustment processing based on the deviation correction factor of each storage cell in the wear evolution correction trajectory set, and map the cumulative effect of the deviation correction factor to the unbalanced tolerance threshold set at the storage cell level.

[0061] The core of dynamic wear threshold adjustment processing lies in extracting wear behavior features of each storage unit from the temporal evolution of the deviation correction factor and quantifying these features into threshold adjustment coefficients. This processing employs a three-stage architecture: feature extraction, pattern recognition, and threshold mapping. The feature extraction stage reads complete temporal data for each storage unit from the deviation correction factor historical record library to construct a deviation correction factor sequence. The pattern recognition stage performs temporal structure analysis on this sequence, decomposing it into oscillation and drift components. Oscillation component extraction uses an adaptive filtering method based on empirical mode decomposition (EMD), which decomposes the deviation correction factor sequence into multiple intrinsic mode functions (IMFs) and a residual term. Oscillation mode features are extracted from the high-frequency IMFs, including oscillation amplitude and period parameters. Drift component extraction uses a locally weighted regression scatter smoothing method, which performs local polynomial fitting on the deviation correction factor sequence to obtain a smooth trend curve. Drift mode features are extracted from this trend curve, including drift direction and drift velocity indicators. The threshold mapping stage maps the extracted pattern features to threshold adjustment coefficients using a multilayer perceptron neural network. The neural network comprises an input layer, hidden layers, and an output layer. The input layer has four nodes, corresponding to four input features: oscillation amplitude parameter, oscillation period parameter, drift direction indicator, and drift velocity indicator. The hidden layer contains eight nodes, employing a hyperbolic tangent activation function. The output layer contains one node, employing a linear activation function, with the output value being a threshold adjustment coefficient. The weight parameters of the neural network are obtained through offline training, with the training dataset consisting of optimized thresholds marked in historical operating data. The base wear leveling trigger threshold is multiplied by this adjustment coefficient to obtain the imbalance tolerance threshold for each memory cell. After the above processing, each memory cell obtains a personalized imbalance tolerance threshold, and these thresholds are arranged in memory address order to form an imbalance tolerance threshold set.

[0062] In some embodiments, step S300 can be implemented as steps S310~S370:

[0063] Step S310: Extract the deviation correction factor sequence of each storage cell from the wear evolution correction trajectory set. The deviation correction factor sequence contains the deviation correction factor corresponding to each wear state snapshot cell.

[0064] The wear evolution correction trajectory set stores the extended trajectory record corresponding to each wear state snapshot unit, and each record contains a deviation correction factor field. The extraction operation is implemented by traversing the time points of all wear state snapshot units: a two-dimensional array is maintained, with the number of rows equal to the number of storage units and the number of columns equal to the number of wear state snapshot units, initialized to zero for all elements. For each wear state snapshot unit's time index, the deviation correction factor vector for that time point is read from the extended trajectory record. This vector is a one-dimensional array of length , where each element corresponds to the deviation correction factor of a storage unit. Each element in this vector is written into the current column position of the corresponding row in the two-dimensional array according to its storage address order; that is, for the storage unit with a storage address offset of , the deviation correction factor is written into the row and column of the two-dimensional array. After traversal, each row of the two-dimensional array is a sequence of deviation correction factors for a storage unit, with the sequence length equal to the number of wear state snapshot units, and the elements in the sequence arranged in chronological order.

[0065] Step S320: Input the deviation correction factor sequence of each storage unit into the deviation pattern recognizer. The deviation pattern recognizer performs time structure analysis on the deviation correction factor sequence to identify the oscillation mode features and drift mode features present in the deviation correction factor sequence.

[0066] The deviation pattern recognizer employs a multi-resolution temporal decomposition architecture, which consists of a time-domain segmentation layer, a frequency-domain analysis layer, and a trend extraction layer. The time-domain segmentation layer divides the input long sequence into multiple consecutive time-series segments according to a preset time window length. Each segment contains a fixed number of deviation correction factor data points. The frequency-domain analysis layer performs local spectral analysis on each segment, extracting the main oscillation frequency components and corresponding amplitudes of the deviation correction factors within the segment. Specifically, the frequency-domain analysis uses the Welch method to estimate the power spectral density. This method divides the segment data into multiple overlapping segments, applies a Hamming window to each segment, performs a Fast Fourier Transform, calculates the average power spectrum of each segment, and obtains a smoothed power spectral density estimate. Peak values ​​are detected on the power spectral density curve. The peak frequency with an amplitude exceeding a preset threshold is taken as the main oscillation frequency, the period corresponding to this frequency is taken as the oscillation period parameter, and the peak amplitude is taken as the oscillation amplitude parameter. The trend extraction layer performs local trend fitting on each sub-segment, employing the Theil-Sen estimator to calculate the slope of the bias correction factor within the sub-segment over time. This estimator obtains a robust slope estimate by calculating the median of the slopes between all data point pairs, making it insensitive to outliers. The sign and magnitude of the slope represent the drift direction and drift velocity, respectively. Sub-segments with an absolute slope value less than a preset threshold are considered to have no significant drift, and the drift direction indicator is set to zero.

[0067] In some embodiments, step S320 can be implemented as the following steps S321~S326:

[0068] Step S321: Input the deviation correction factor sequence of each storage unit into the temporal segmentation layer of the deviation pattern recognizer. The temporal segmentation layer divides the deviation correction factor sequence into multiple consecutive temporal sub-segments according to the preset time window length. Each temporal sub-segment corresponds to a set of deviation correction factors within a time window.

[0069] The temporal segmentation layer maintains a fixed-length time window, the length of which is configured via system parameters, typically set to cover the time span of 10 wear state snapshot units. The segmentation operation uses a sliding window approach, starting from the first element of the sequence and moving one step at a time, usually equal to the time interval of one wear state snapshot unit. At each window position, deviation correction factor data points within the window length are extracted, resulting in a temporal sub-segment. If the end of the window exceeds the sequence range, the last sub-segment is truncated, retaining only the data points within the sequence. After segmentation, each temporal sub-segment corresponds to a set of deviation correction factors within a time window. Adjacent sub-segments overlap, with the overlap length equal to the window length minus the step size. The temporal segmentation layer outputs a list of sub-segments, each a one-dimensional array storing the deviation correction factor values ​​within that time window.

[0070] Step S322: Input the time series sub-segments into the oscillation feature extraction layer of the deviation pattern recognizer. The oscillation feature extraction layer performs extreme point detection on each time series sub-segment, extracts the local maxima and local minima of the deviation correction factor in each time series sub-segment, generates an oscillation period parameter based on the frequency of alternation between local maxima and local minima, generates an oscillation amplitude parameter based on the difference between local maxima and local minima, and combines the oscillation period parameter and the oscillation amplitude parameter into an oscillation pattern feature.

[0071] The oscillation feature extraction layer can use a three-neighborhood extremum detection algorithm to identify peaks and valleys in time-series segments. This algorithm iterates through every data point in the time-series segment except for the beginning and end points. For each data point, it compares its size with its immediate neighbors. If the data point is greater than both the preceding and following points, it is marked as a local maximum; if it is less than both, it is marked as a local minimum. After extracting all local extrema, they are arranged in chronological order to form an extremum sequence, which alternates between maxima and minima. When calculating the oscillation period parameter, the median of the time interval sequence between two adjacent maxima is taken as the oscillation period parameter; simultaneously, the median of the time interval sequence between two adjacent minima is calculated for verification. If the number of maxima is less than two, the oscillation period parameter is set to the default value corresponding to the sequence length. When calculating the oscillation amplitude parameter, for each maximum point, find its two adjacent minimum points, and calculate the average of the differences between the maximum and the two minimum points as the oscillation amplitude corresponding to that maximum point; take the median of the oscillation amplitudes corresponding to all maximum points as the oscillation amplitude parameter. Pack the calculated oscillation period parameter and oscillation amplitude parameter into a structure containing two fields, which is the oscillation mode feature of this time series sub-segment.

[0072] Step S323: Input the time series sub-segments into the drift feature extraction layer of the deviation pattern recognizer. The drift feature extraction layer performs endpoint value capture on each time series sub-segment, obtains the start deviation correction factor value and end deviation correction factor value of each time series sub-segment, generates a drift direction indicator based on the difference between the end deviation correction factor value and the start deviation correction factor value, and generates a drift speed indicator based on the ratio of the absolute value of the difference between the end deviation correction factor value and the start deviation correction factor value to the time window length. The drift direction indicator and the drift speed indicator are combined into a drift pattern feature.

[0073] The drift feature extraction layer directly accesses the first and last elements of the time-series sub-segment array via pointer offsets. The address of the first element is the base address of the sub-segment array, and the starting deviation correction factor value is obtained by dereferencing this address. The address of the last element is obtained by adding an offset to the base address. The offset is equal to the sub-segment length minus one multiplied by the number of bytes occupied by each element. The ending deviation correction factor value is obtained by dereferencing this address. Direction determination is achieved by calculating the difference between the ending and starting values. The difference is input into a sign function; if the difference is positive, it outputs +1; if the difference is negative, it outputs -1; and if the difference is zero, it outputs 0. Velocity calculation involves dividing the absolute value of the difference by the time window length, which is obtained by multiplying the number of data points in the sub-segment by the time interval between adjacent snapshot units. The quotient is the drift velocity indicator. The direction determination result and the velocity calculation result are combined into a structure containing a direction field and a velocity field, which represents the drift pattern feature of the time-series sub-segment.

[0074] Step S324: Input the oscillation mode characteristics of adjacent time series segments into the oscillation mode correlation analysis unit. The oscillation mode correlation analysis unit calculates the changes in the oscillation period parameter and the oscillation amplitude parameter between adjacent time series segments, and generates an oscillation evolution trajectory describing the evolution law of the oscillation mode on the time axis.

[0075] The oscillation mode correlation analysis unit receives a list of time-series sub-segments. For each pair of adjacent segments with indices ranging from 0 to the number of segments minus 2, it extracts the oscillation period and amplitude parameters of the i-th segment, as well as the oscillation period and amplitude parameters of the (i+1)-th segment. The period change is calculated by subtracting the period parameter of the i-th segment from the period parameter of the (i+1)-th segment. The amplitude change is calculated by subtracting the amplitude parameter of the i-th segment from the amplitude parameter of the (i+1)-th segment. The time boundary corresponding to each pair of adjacent segments, the calculated period change, and the amplitude change are stored sequentially in an array, which constitutes the oscillation evolution trajectory. Each element of the oscillation evolution trajectory is a triplet: the first element is the time boundary identifier, the second element is the period change, and the third element is the amplitude change.

[0076] Step S325: Input the drift pattern features of adjacent time series segments into the drift pattern association analysis unit. The drift pattern association analysis unit calculates the connection relationship between the drift direction indication and the drift speed indication between adjacent time series segments, and generates a drift evolution trajectory describing the evolution law of the drift pattern on the time axis.

[0077] The drift pattern correlation analysis unit receives a list of time-series sub-segments. For each adjacent segment pair with an index from 0 to the segment number minus 2, it extracts the drift direction and drift velocity indicators of the i-th segment, as well as the drift direction and drift velocity indicators of the (i+1)-th segment. The direction connection relationship is determined by comparing two direction indicators: if both are +1 or both are -1, the connection relationship is marked as 1, indicating consistent direction; if the two direction indicators are +1 and -1 or -1 and +1 respectively, the connection relationship is marked as -1, indicating reversed direction; if one direction indicator is 0 and the other is not 0, the connection relationship is marked as 0, indicating the appearance of a new direction; if both direction indicators are 0, the connection relationship is marked as 2, indicating no drift. The velocity connection relationship is determined by calculating the ratio of the subsequent velocity indicator to the preceding velocity indicator. If the preceding velocity indicator is 0, the ratio is directly set to equal the subsequent velocity indicator. The time boundary corresponding to each adjacent segment pair, the calculated direction connection relationship, and the velocity ratio are stored sequentially in an array, which represents the drift evolution trajectory. Each element of the drift evolution trajectory is a triplet: the first element is the time boundary marker, the second element is the directional connection relationship, and the third element is the velocity ratio.

[0078] Step S326: Input the oscillation evolution trajectory and the drift evolution trajectory into the mode fusion layer of the deviation pattern recognizer. The mode fusion layer performs time-series alignment of the oscillation evolution trajectory and the drift evolution trajectory to generate a fused mode descriptor. The fused mode descriptor contains the correspondence information between the oscillation mode features and the drift mode features in different time windows.

[0079] The pattern fusion layer first obtains the time boundary identifier sequences of the oscillating evolution trajectory and the drift evolution trajectory. Since the two trajectories originate from the same temporal sub-segment division, their time boundary identifier sequences are naturally consistent. The pattern fusion layer creates a new array with a length equal to the trajectory length. It iterates through each position in the time boundary identifier sequence, reading the period change and amplitude change from the oscillating evolution trajectory, and the direction connection relationship and velocity ratio from the drift evolution trajectory. These four values ​​are combined into a quadruple and stored in the corresponding position of the new array. After the iteration is complete, the new array is the fused pattern descriptor. Each element of this descriptor is a structure containing four fields: period change, amplitude change, direction connection relationship, and velocity ratio.

[0080] Step S330: Classify the oscillation intensity of each memory cell according to the fluctuation amplitude distribution information in the oscillation mode characteristics to obtain the oscillation intensity level identifier; determine the drift direction of each memory cell according to the cumulative offset direction information in the drift mode characteristics to obtain the drift direction symbol identifier.

[0081] Oscillation intensity grading is based on the distribution of oscillation amplitude parameters for each storage cell across all time segments. The amplitude distribution information includes statistics such as the maximum, minimum, average, and standard deviation of the oscillation amplitude parameters. Oscillation intensity levels are determined by comparing the average oscillation amplitude with multiple preset threshold intervals. These preset threshold intervals are determined based on historical operating data of the solid-state drive and are divided into three levels: low oscillation, medium oscillation, and high oscillation. The low oscillation interval corresponds to an average oscillation amplitude less than the first percentile; the medium oscillation interval corresponds to an average oscillation amplitude between the first and second percentiles; and the high oscillation interval corresponds to an average oscillation amplitude greater than the second percentile. When the average oscillation amplitude falls within the low oscillation interval, the oscillation intensity level is marked as 0; when it falls within the medium oscillation interval, it is marked as 1; and when it falls within the high oscillation interval, it is marked as 2. Drift direction determination is based on the cumulative result of the drift direction indication for each storage cell across all time segments. The cumulative offset direction information is obtained by statistically analyzing the occurrence counts of +1, -1, and 0 in the drift direction indication sequence. If +1 appears significantly more often than -1, the drift direction sign is positive; if -1 appears significantly more often than +1, the drift direction sign is negative; if the occurrences of both are close or 0 predominates, the drift direction sign is zero. A binomial test is used to determine significance, and a significance level of 0.05 is used to determine whether the difference in the number of occurrences of positive and negative directions is statistically significant.

[0082] In some embodiments, step S330 can be implemented as steps S331 to S336:

[0083] Step S331: Extract the oscillation amplitude parameters of each memory cell on all time-series sub-segments from the fusion mode descriptor to obtain the oscillation amplitude parameter set. Perform oscillation amplitude accumulation calculation on the oscillation amplitude parameter set to obtain the cumulative oscillation amplitude of each memory cell. Determine the oscillation intensity level identifier of each memory cell based on the position of the cumulative oscillation amplitude in the preset oscillation level division interval.

[0084] The oscillation amplitude parameter set is a numerical set formed by extracting the oscillation amplitude parameters corresponding to all time windows from the fused mode descriptor sequence. The cumulative oscillation amplitude is calculated using the root mean square method. First, each value in the oscillation amplitude parameter set is squared. Then, the arithmetic mean of all squared values ​​is calculated. Finally, the square root of the mean is taken to obtain the cumulative oscillation amplitude. This cumulative amplitude comprehensively reflects the overall intensity level of the oscillation amplitude throughout the entire observation period. The preset oscillation level division intervals are dynamically adjusted by the system based on historical data. Specifically, the cumulative oscillation amplitude of all storage units under normal operating conditions of the solid-state drive is collected, and its distribution quantiles are calculated. The 30th percentile is used as the boundary between the low-oscillation and medium-oscillation intervals, and the 70th percentile is used as the boundary between the medium-oscillation and high-oscillation intervals. The calculated cumulative oscillation amplitude is compared with these two boundary points to determine the interval to which it belongs, and the corresponding oscillation intensity level is assigned to the storage unit.

[0085] Step S332: Extract the drift direction indication of each storage cell on all time-series sub-segments from the fusion mode descriptor to obtain the drift direction indication sequence. Perform drift direction continuity analysis on the drift direction indication sequence. If the number of consecutive occurrences of the same direction in the drift direction indication sequence exceeds a preset number threshold, then the direction is used as the drift direction symbol identifier.

[0086] The drift direction indicator sequence is a symbol sequence formed by extracting drift direction indicators corresponding to all time windows from the fusion mode descriptor sequence. Each element in the sequence takes a value of +1, -1, or 0. Drift direction continuity analysis is achieved by traversing this sequence and counting the occurrences of consecutive identical non-zero directions. The traversal process maintains a current direction counter and a current direction variable. Starting from the first element of the sequence, each element is checked sequentially. If the direction of the current element is the same as the current direction variable and is non-zero, the counter is incremented by 1; if it is different but non-zero, the consecutive occurrences of the current direction variable are recorded, the current direction variable is updated to the new direction, and the counter is reset to 1; if the current element is zero, the consecutive occurrences of the current direction variable are recorded, and then the current direction variable and counter are reset. A preset threshold for the number of occurrences is determined according to a certain proportion of the total sequence length, set to one-third of the sequence length. When the consecutive occurrences of a certain direction exceed this threshold, that direction is used as the drift direction symbol identifier.

[0087] Step S333: If no direction appears consecutively more than a preset threshold in the drift direction indication sequence, the dominant drift direction is determined as the drift direction symbol identifier based on the proportion of the total number of occurrences of each direction.

[0088] When the consecutive occurrences of all directions do not exceed a preset threshold, a majority voting mechanism is used to determine the dominant drift direction. The total number of occurrences of +1, -1, and 0 in the drift direction indication sequence is counted, and the percentage of each direction's occurrences is calculated. The direction with the highest percentage is selected as the dominant drift direction. If +1 has the highest percentage, the drift direction sign is positive; if -1 has the highest percentage, the drift direction sign is negative; if 0 has the highest percentage, the drift direction sign is zero. If +1 and -1 have equal percentages and both are higher than 0, a more conservative direction is selected as the sign based on the system configuration; typically, a positive direction is chosen to trigger more timely intervention.

[0089] Step S334: Based on the oscillation intensity level identifier and drift direction symbol identifier of each storage cell, perform a matching query in the preset threshold adjustment strategy mapping table. The threshold adjustment strategy mapping table contains adjustment strategy codes corresponding to different combinations of oscillation intensity level identifiers and different drift direction symbol identifiers. Obtain the matching adjustment strategy code.

[0090] The threshold adjustment strategy mapping table is a two-dimensional lookup table stored as an array in read-only memory. The array is 3 rows by 3 columns. The row index represents the oscillation intensity level (0, 1, 2), and the column index represents the drift direction sign (positive, negative, zero), mapping to column indices 0, 1, 2 respectively. Each cell in the mapping table stores an adjustment strategy code, an integer value ranging from 0 to 5, used to index specific adjustment parameters in subsequent steps. The contents of the mapping table are determined through offline optimization using a genetic algorithm. Historical data is used as samples, with migration operation count and wear leveling as optimization objectives to search for the optimal combination of adjustment strategy codes. For combinations with high oscillation levels and positive drift, the adjustment strategy code points to a larger threshold reduction coefficient; for combinations with high oscillation levels and negative drift, the adjustment strategy code points to a larger threshold increase coefficient; and for combinations with low oscillation levels, the adjustment strategy code points to no adjustment.

[0091] Step S335: Associate and bind the adjustment strategy code with the storage address of the storage unit to generate the threshold adjustment mode code for each storage unit.

[0092] The threshold adjustment pattern encoding is a composite data structure containing a storage address field and an adjustment strategy encoding field. The storage address field occupies 4 bytes and records the physical address offset of the storage unit, with a value ranging from 0 to [value missing]. The adjustment strategy encoding field occupies 1 byte and stores the encoded value obtained from the matching query in step S334. This encoding is generated as follows: traverse all storage units; for each storage unit, shift its storage address left by 8 bits and perform a bitwise OR operation with the adjustment strategy encoding to obtain a 32-bit integer. The high 24 bits of this integer represent the storage address, and the low 8 bits represent the adjustment strategy encoding. This encoding method ensures that the threshold adjustment pattern encoding for each storage unit is a unique integer value, facilitating subsequent fast lookup and parsing.

[0093] Step S336: Establish a correlation between the threshold adjustment mode encoding of each storage cell and the imbalance tolerance threshold of the corresponding storage cell.

[0094] The association is established by maintaining a hash map in memory. The keys of this map are storage unit addresses, and the values ​​are the wear-leveling tolerance thresholds. The map can be implemented using open addressing; for example, the initial capacity can be set to 1.5 times the total number of storage units to reduce hash collisions. For each storage unit, its threshold adjustment mode code is parsed. The storage address is obtained by right-shifting by 8 bits, and the adjustment strategy code is obtained by bitwise ANDing with 0xFF. In subsequent threshold reconstruction, when a personalized threshold needs to be calculated for a storage unit, the corresponding threshold adjustment mode code is first looked up in the hash map based on its storage address. This is then decoded to obtain the adjustment strategy code. The specific threshold adjustment coefficient is then determined based on the adjustment strategy code. Finally, the base wear-leveling trigger threshold is multiplied by the adjustment coefficient to obtain the wear-leveling tolerance threshold for that storage unit.

[0095] Step S340: Combine and encode the oscillation intensity level identifier and the drift direction symbol identifier to generate the threshold adjustment mode code for each storage cell.

[0096] For example, the combined encoding uses binary encoding. The oscillation intensity level identifier has a value range of 0, 1, and 2, represented by 2 bits. Binary 00 represents a low oscillation level, 01 represents a medium oscillation level, and 10 represents a high oscillation level. The drift direction symbol identifier has a value range of positive, negative, and zero, represented by 2 bits. Binary 01 represents a positive direction, 10 represents a negative direction, and 00 represents a zero direction. The bits of the two identifiers are concatenated, with the 2 bits of the oscillation intensity level identifier as the high two bits and the 2 bits of the drift direction symbol identifier as the low two bits, resulting in a 4-bit threshold adjustment mode code. This code has a value range of 0 to 15 and serves as an index for subsequent threshold reconstruction operations. The combined code for a high oscillation level and a positive drift direction is binary 1001 (decimal 9), the combined code for a high oscillation level and a negative drift direction is binary 1010 (decimal 10), and the combined code for a medium oscillation level and a positive drift direction is binary 0101 (decimal 5).

[0097] Step S350: Obtain the basic wear leveling trigger threshold of the solid-state drive. Perform differentiated reconstruction of the basic wear leveling trigger threshold according to the threshold adjustment mode code. For storage cells with a positive drift direction symbol and an oscillation intensity level symbol higher than the preset oscillation level threshold, query the preset threshold raising coefficient mapping table according to the oscillation intensity level symbol to obtain the corresponding threshold raising coefficient. Multiply the basic wear leveling trigger threshold by the threshold raising coefficient to obtain the raised unbalanced tolerance threshold.

[0098] The basic wear leveling trigger threshold is a globally default threshold set at the factory for the solid-state drive (SSD) and stored in the read-only memory (ROM). This threshold is measured in units of the number of programmed erase cycles. The preset oscillation level threshold is set to 1, meaning that storage cells with an oscillation intensity level identifier of 0 do not undergo threshold adjustment, while storage cells with an oscillation intensity level identifier of 1 or 2 do. The threshold escalation coefficient mapping table is a one-dimensional lookup table stored as an array. The array index is the oscillation intensity level identifier minus 1, i.e., index 0 corresponds to a medium oscillation level, and index 1 corresponds to a high oscillation level. The escalation coefficient is greater than 1, and the specific value is determined through offline experiments. The escalation coefficient corresponding to a medium oscillation level is set to 1.2, and the escalation coefficient corresponding to a high oscillation level is set to 1.5. For storage cells that meet the conditions, the corresponding escalation coefficient is first looked up in the threshold escalation coefficient mapping table based on its oscillation intensity level identifier. Then, a multiplication operation is performed, multiplying the basic wear leveling trigger threshold by the escalation coefficient. The product is used as the personalized wear leveling tolerance threshold for that storage cell. The raised threshold means that the storage cell can tolerate a higher degree of wear unevenness before triggering a migration operation, which applies to storage cells where the actual wear evolution is slower than expected.

[0099] Step S360: For memory cells with a negative drift direction sign and an oscillation intensity level higher than the preset oscillation level threshold, query the preset threshold reduction coefficient mapping table according to the oscillation intensity level, obtain the corresponding threshold reduction coefficient, multiply the basic wear equalization trigger threshold by the threshold reduction coefficient, and obtain the reduced imbalance tolerance threshold.

[0100] The threshold reduction coefficient mapping table is also a one-dimensional lookup table, stored in array form. The array index is the oscillation intensity level identifier minus 1, i.e., index 0 corresponds to the medium oscillation level, index 1 corresponds to the high oscillation level. The reduction coefficient is less than 1, and the specific value is determined through offline experiments. For example, the reduction coefficient corresponding to the medium oscillation level is set to 0.8, and the reduction coefficient corresponding to the high oscillation level is set to 0.6. For a storage cell that meets the conditions, the corresponding reduction coefficient is looked up in the threshold reduction coefficient mapping table according to its oscillation intensity level identifier. The basic wear leveling trigger threshold is multiplied by the reduction coefficient, and the product is used as the personalized wear leveling tolerance threshold for that storage cell. The reduced threshold means that the storage cell's tolerance for wear leveling is reduced, and the migration operation needs to be triggered earlier. This is suitable for storage cells where the actual wear evolution is faster than expected.

[0101] Step S370: For memory cells whose oscillation intensity level indicator does not exceed the preset oscillation level threshold, the basic wear leveling trigger threshold is used as the unbalanced tolerance threshold for the memory cell. The unbalanced tolerance thresholds of each memory cell are arranged in the order of memory address to generate a set of unbalanced tolerance thresholds at the memory cell level.

[0102] For memory cells with an oscillation intensity level of 0, it indicates that the fluctuation amplitude of their deviation correction factor is small and the wear evolution process is stable. No threshold adjustment is required, and the basic wear leveling trigger threshold can be directly used as their imbalance tolerance threshold. Arranging the imbalance tolerance thresholds of all memory cells in ascending order of memory address yields a one-dimensional array. The i-th element of the array corresponds to the personalized threshold of the memory cell with a memory address offset of . This array is the set of imbalance tolerance thresholds at the memory cell level.

[0103] Step S400: Compare the wear index prediction value sequence of each storage cell in the wear evolution correction trajectory set with the corresponding threshold in the imbalance tolerance threshold set, and identify the storage cells whose wear index prediction value exceeds the corresponding threshold as predictive wear imbalance cells.

[0104] For example, the comparison operation can be implemented through trajectory cross-analysis. The predicted wear index sequence for each storage cell is considered as a trajectory changing over time, and its corresponding imbalance tolerance threshold sequence is considered as another trajectory. The intersection of the two trajectories is detected. When the predicted value trajectory crosses the threshold trajectory from below, it indicates that the storage cell will enter an uneven wear state after the crossing time point. By identifying all crossing points and analyzing the persistence and frequency of crossings, storage cells requiring early intervention can be screened. Specifically, for each storage cell, its imbalance tolerance threshold is first expanded along the time axis to generate a threshold reference sequence aligned with the time points of the predicted value sequence. Then, the predicted value is compared with the threshold at each time point, and all time points where the predicted value is greater than the threshold are recorded. Continuity analysis is performed on the recorded time points. If the duration of continuous exceedance exceeds a preset duration threshold, the storage cell is marked as a continuously exceeding unit. The frequency of crossing the threshold is further analyzed for continuously exceeding units. If the number of crossings per unit time exceeds a preset frequency threshold, it is marked as a high-frequency crossing unit. For high-frequency crossing cells, the deviation between the predicted value and the threshold is calculated for each crossing. The deviation is accumulated. If the accumulated deviation exceeds the preset accumulated threshold, the storage cell is finally identified as a predictive wear-dissipation cell.

[0105] In some embodiments, step S400 can be implemented as steps S410~S460:

[0106] Step S410: Extract the wear index prediction value sequence for each storage cell from the wear evolution correction trajectory set. The wear index prediction value sequence contains wear index prediction values ​​corresponding to multiple time points. Obtain the imbalance tolerance threshold corresponding to each storage cell from the imbalance tolerance threshold set. Expand the imbalance tolerance threshold of each storage cell along the time axis to generate a threshold reference sequence that is time-aligned with the wear index prediction value sequence.

[0107] The wear index prediction sequence is a sequence of predicted values ​​changing over time for each storage unit in the wear evolution correction trajectory set. The extraction operation involves iterating through the predicted value vectors at all time points in the trajectory set and reorganizing them according to the storage unit dimension, ultimately forming a two-dimensional array. The first dimension is the storage unit index, and the second dimension is the time point index. Each storage unit in the imbalance tolerance threshold set corresponds to a static threshold. This static threshold is copied to the same number of time points as the predicted value sequence to obtain the threshold reference sequence. That is, for each storage unit, an array of the same length as the predicted value sequence is generated, and all elements of the array are equal to the imbalance tolerance threshold of that storage unit.

[0108] Step S420: Input the wear index prediction sequence of each storage cell and the corresponding threshold reference sequence into the trajectory cross-analyzer. The trajectory cross-analyzer performs spatial overlay comparison on the wear index prediction sequence and the threshold reference sequence, detects the cross-point formed when the wear index prediction sequence crosses from below to above the threshold reference sequence, and records the cross-time stamp corresponding to each cross-point and the difference between the wear index prediction value and the imbalance tolerance threshold at the cross-point as the cross-offset amount.

[0109] For example, a trajectory cross-analyzer can employ a state machine architecture. The state machine maintains a current state variable representing the positional relationship of the predicted value relative to a threshold. A state variable value of -1 indicates that the predicted value is less than or equal to the threshold, and a value of 1 indicates that the predicted value is greater than the threshold. The initial state is determined based on the comparison result at the first time point of the sequence. The state machine traverses each time point of the two sequences in chronological order, comparing the predicted value with the threshold at each time point. If the predicted value is greater than the threshold and the current state is -1, a cross-crossing event from bottom to top is triggered, this time point is recorded as the cross-crossing point, and the difference between the predicted value and the threshold is calculated as the cross-crossing deviation. Then, the state switches to 1. If the predicted value is less than or equal to the threshold and the current state is 1, a cross-crossing event from top to bottom is triggered, and the state switches to -1. Only cross-crossing points from bottom to top are recorded; these points mark the beginning of the memory cell entering an uneven wear state.

[0110] In some embodiments, step S420 can be implemented as steps S421 to S424:

[0111] Step S421: Input the wear index prediction sequence of each storage cell and the corresponding threshold reference sequence into the sequence alignment layer of the trajectory cross-analyzer. The sequence alignment layer pairs each time point in the wear index prediction sequence with the threshold of the same time point in the threshold reference sequence to generate a time point aligned prediction-threshold pair set.

[0112] For example, the sequence alignment layer consists of a timestamp indexer and a pairing constructor. The timestamp indexer first extracts a list of time points from the wear index predicted value sequence. This list is an ordered array where each element is a timestamp represented by a 64-bit integer. The array length is equal to the number of time points contained in the predicted value sequence, denoted as . The pairing constructor iterates through each timestamp in the time point list, retrieving the timestamp value corresponding to each position with an index from 0 to -1. In the wear index predicted value sequence, the predicted values ​​are stored in the same order as the time point list, so the predicted value corresponding to the index position is the value at that index position in the predicted value array. Similarly, in the threshold reference sequence, since the threshold reference sequence copies the imbalance tolerance threshold of each storage cell to an array with the same number of time points, the threshold corresponding to the index position is the value at that index position in the array. The threshold at all time points is equal to the imbalance tolerance threshold of that storage cell. The pairing builder combines the current timestamp, the predicted value obtained from the predicted value sequence, and the threshold obtained from the threshold reference sequence into a triple. This triple is stored in memory as a structure containing three fields: a timestamp field (8 bytes), a predicted value field (4 bytes), and a threshold field (4 bytes). All triples generated at all time points are stored in an array in ascending order of timestamp; this array is the time-point aligned prediction-threshold pairing set.

[0113] Step S422: Input the prediction-threshold pair set into the trajectory cross-analyzer's detection layer, traverse the time-point aligned prediction-threshold pairs in the detection layer, and compare the size relationship between the predicted wear index value and the imbalance tolerance threshold at each time point in turn, generating a size relationship label sequence. Each label in the size relationship label sequence is used to indicate whether the predicted wear index value at the corresponding time point is greater than or less than or equal to the imbalance tolerance threshold.

[0114] For example, the pass-through detection layer consists of a comparator and a label sequence generator. The comparator iterates through the prediction-threshold pair set array. For each triple in the array, it reads the predicted value field and the threshold field and performs a numerical comparison operation. The comparison operation uses floating-point comparison instructions. First, it checks whether the predicted value is greater than the threshold. If the predicted value is greater than the threshold, the comparison result is true; if the predicted value is less than or equal to the threshold, the comparison result is false. The label sequence generator generates the corresponding label value based on the comparison result: a label value of 1 is generated when the comparison result is true, and a label value of 0 is generated when the comparison result is false. The label sequence generator maintains a dynamic array. After processing each triple, the generated label value is appended to the end of the array. After the traversal is complete, the label value sequence stored in the dynamic array is the size relationship label sequence. The length of the sequence is equal to the length of the prediction-threshold pair set, and each element is 0 or 1. 0 indicates that the predicted value at the corresponding time point is less than or equal to the threshold, and 1 indicates that the predicted value at the corresponding time point is greater than the threshold.

[0115] Step S423: Input the size relationship marker sequence into the intersection point localization layer of the trajectory cross-analyzer. The intersection point localization layer scans the changes of adjacent markers in the size relationship marker sequence. When an adjacent marker changes from a marker representing less than or equal to a marker representing greater than, the interval between the two time points corresponding to the adjacent marker is determined as the cross interval. The intersection point of the wear index prediction value sequence and the threshold reference sequence within the cross interval is extracted as the cross point.

[0116] The intersection point localization layer traverses the sequence of size relationship markers. For each adjacent marker pair with an index from 1 to 1, it checks whether the marker value changes from 0 to 1. When this change is detected, the time interval of the change is determined to be between the (i-1)th time point and the ith time point. Within this interval, the predicted value changes from less than or equal to the threshold to greater than the threshold, thus an intersection point exists. The intersection point position is determined by linear interpolation, with the (i-1)th time point as the left endpoint and the ith time point as the right endpoint. The difference between the predicted value at the left endpoint and the threshold is negative, while the difference between the predicted value at the right endpoint and the threshold is positive. By calculating the proportional position corresponding to the zero-crossing point of the difference, the precise timestamp of the intersection point is obtained. The calculation formula is: intersection point timestamp equals left endpoint timestamp plus right endpoint timestamp minus left endpoint timestamp multiplied by the absolute value of the left endpoint difference divided by the sum of the absolute values ​​of the left endpoint difference and the right endpoint difference. The precise timestamp of the intersection point is the intersection timestamp.

[0117] Step S424: Input all identified intersections into the intersection feature recording layer of the trajectory intersection analyzer. The intersection feature recording layer obtains the start and end time points of the intersection interval where each intersection point is located. Calculate the precise timestamp of the intersection point based on the start and end time points. Calculate the difference between the predicted wear index value and the imbalance tolerance threshold at the intersection point as the intersection deviation. Link and store the intersection timestamp and the intersection deviation.

[0118] The intersection feature recording layer receives the intersection list output by the intersection localization layer. Each intersection point contains information such as the left endpoint timestamp, right endpoint timestamp, predicted value of the left endpoint, predicted value of the right endpoint, left endpoint threshold, and right endpoint threshold. The precise timestamp has already been calculated in step S423 and is directly used as the intersection timestamp. The intersection deviation is calculated as the difference between the predicted value at the intersection point and the threshold. Since the predicted value at the intersection point is equal to the threshold, the actual calculation uses the difference between the predicted value at the first time point after the intersection point and the threshold as the intersection deviation to reflect the degree to which the predicted value exceeds the limit after crossing. The intersection timestamp and the intersection deviation are combined into a record pair and stored in the intersection feature record list of this storage unit.

[0119] Step S430: Based on the time interval between adjacent intersections in the wear index prediction value sequence of each storage cell, determine the duration of the predicted value exceeding the standard for each storage cell, and mark the storage cell whose predicted value exceeds the standard for a duration exceeding a preset duration threshold as a continuously exceeding standard cell.

[0120] The calculation of the duration of predicted value exceeding the threshold is based on a list of crossover point feature records. For each storage cell, all time periods where the predicted value is greater than the threshold are identified from the wear indicator prediction value sequence. These time periods begin at a crossover point that crosses from bottom to top and end at the first crossover point that crosses from top to bottom after that crossover point. For each exceeding time period, its duration is calculated as the timestamp of the ending crossover point minus the timestamp of the starting crossover point. If the duration of any exceeding time period exceeds a preset duration threshold, which is set to 24 hours based on the application scenario of the solid-state drive, then the storage cell is marked as a continuously exceeding unit.

[0121] Step S440: Perform cross-point density analysis on the continuously exceeding units, calculate the frequency of cross-point occurrence for each continuously exceeding unit within a preset time window, and mark the continuously exceeding units whose cross-point occurrence frequency exceeds the preset frequency threshold as high-frequency crossing units based on the comparison results between the cross-point occurrence frequency and the preset frequency threshold.

[0122] Crossover density analysis can employ a sliding time window method to analyze the crossover characteristic record list for each continuously exceeding-limit cell. At each window position, the number of crossovers falling within that window is counted, and the frequency of crossover occurrence within that window is obtained by dividing the number of crossovers by the window length. The maximum frequency across all windows is taken as the crossover occurrence frequency of that storage cell. For example, a preset frequency threshold is set to 0.5 times per day, meaning a crossover occurs on average once every two days. If the crossover occurrence frequency exceeds this threshold, the storage cell is marked as a high-frequency crossing cell.

[0123] In some embodiments, step S440 can be implemented as steps S441 to S446:

[0124] Step S441: Obtain the cross point record set of all continuously exceeding units. The cross point record set contains the cross timestamps corresponding to all cross points of each continuously exceeding unit.

[0125] Retrieve the identifier for each unit from the list of continuously exceeding limits, and then read the corresponding crosspoint record from the crosspoint feature record library based on the identifier. Each crosspoint record contains two fields: crosspoint timestamp and crosspoint deviation. Summarize the crosspoint records of all continuously exceeding limits to obtain a crosspoint record set.

[0126] Step S442: For each continuously exceeding the standard unit, based on the cross timestamps in its cross timestamp record set, arrange the cross timestamps in chronological order to generate the cross timestamp sequence of the continuously exceeding standard unit.

[0127] For each continuously exceeding unit, extract the cross timestamp field of all records in its cross point record set, and sort these timestamps in ascending order to obtain an increasing timestamp sequence. The sorting algorithm uses quicksort, with a time complexity of O(n log n), where n is the number of cross points. After sorting, the cross timestamp sequence is the ordered list of the occurrence times of all cross points for that unit.

[0128] Step S443: Set a sliding time window on the cross timestamp sequence, and move the sliding time window along the time axis with a preset step size. Count the number of cross points falling into the sliding time window at each sliding time window position to generate the cross point count sequence of the continuously exceeding unit at different time window positions.

[0129] The window starts at the first intersection timestamp minus the window length and ends at the last intersection timestamp. For each window start position, the window end position is calculated as the start position plus the window length. The intersection timestamp sequence is traversed, and the number of intersections falling within each interval is counted; this count is used as the count value for that window position. All window position counts are arranged in chronological order to obtain the intersection count sequence.

[0130] Step S444: Perform peak detection on the crossover point counting sequence, extract the peak count value in the crossover point counting sequence, divide the peak count value by the length of the sliding time window, and obtain the frequency of crossover points of the continuously exceeding unit within the time window corresponding to the peak.

[0131] Peak detection involves iterating through the crossover count sequence and identifying the maximum value as the peak count. If multiple identical maximum values ​​exist, the first one is selected. The peak count is then divided by the length of the sliding time window; the quotient represents the frequency of crossovers occurring within the corresponding time window for the continuously exceeding unit. This frequency indicates the average number of crossovers per day during the period when crossovers are most concentrated in that unit.

[0132] Step S445: Compare the frequency of crossover points of each continuously exceeding the limit with a preset frequency threshold. If the frequency of crossover points is greater than the preset frequency threshold, mark the continuously exceeding limit unit as a high-frequency crossing unit.

[0133] Step S446: Pack the frequency of intersections, peak counts, and time window information corresponding to the peaks of the high-frequency crossing units to generate a high-frequency crossing unit feature record. The high-frequency crossing unit feature record is used for subsequent deep crossing unit identification and processing.

[0134] Step S450: Perform cross deviation accumulation analysis on the high-frequency crossing units, accumulate the cross deviation of all cross points of each high-frequency crossing unit to obtain the cross deviation accumulation, and mark the high-frequency crossing units whose cross deviation accumulation exceeds the preset accumulation threshold as deep crossing units.

[0135] The crossover deviation accumulation analysis iterates through the crossover feature record list of each high-frequency crossing cell, extracts the crossover deviation field from each record, and sums these deviations to obtain the cumulative crossover deviation of that cell. A preset cumulative threshold is set based on the wear index of the solid-state drive, for example, set to 100 program erase cycles. The cumulative crossover deviation is compared with the preset cumulative threshold. If the cumulative deviation exceeds the threshold, the high-frequency crossing cell is further marked as a deep crossing cell. A deep crossing cell indicates that the storage cell not only frequently crosses the threshold, but also has a large deviation each time it crosses, indicating a more severe uneven wear condition.

[0136] Step S460: Identify the deep crossing units as predictive wear imbalance units, and package the intersection distribution characteristics, cumulative intersection deviation, and duration of exceeding the standard for each deep crossing unit to generate a predictive wear imbalance unit feature record.

[0137] All storage cells marked as deep traversal cells are identified as predictive wear imbalance cells. For each predictive wear imbalance cell, its crossover point distribution characteristics, cumulative crossover deviation, and out-of-limit duration information are collected. The crossover point distribution characteristics include the number of crossover points, the crossover timestamp sequence, and the crossover deviation sequence. The cumulative crossover deviation is the cumulative sum calculated in step S450. The out-of-limit duration is the maximum out-of-limit duration identified in step S430. This information is packaged into a predictive wear imbalance cell feature record, which contains fields such as storage cell identifier, number of crossover points, crossover point timestamp list, crossover deviation list, cumulative crossover deviation, and maximum out-of-limit duration. The feature records of all predictive wear imbalance cells are combined into a list for the subsequent generation of dynamic wear leveling strategies.

[0138] Step S500: Generate a dynamic wear leveling strategy set based on the predictive wear imbalance unit. The dynamic wear leveling strategy set includes the migration operation execution time point and migration data volume allocation scheme for each predictive wear imbalance unit.

[0139] In some embodiments, step S500 can be implemented as steps S510~S560:

[0140] Step S510: Obtain the storage address, current predicted wear value, excess deviation, and intersection distribution characteristics of all predictive wear imbalance units, construct a feature map of predictive wear imbalance units, and organize each predictive wear imbalance unit into a connected domain structure according to the spatial adjacency relationship of its storage address.

[0141] The predictive wear unevenness cell feature map is a graph data structure where nodes represent predictive wear unevenness cells, and edges indicate that two cells are adjacent in the memory address space. Adjacency is defined as the difference in physical addresses between two cells equal to the size of the memory cell. The graph construction process is as follows: First, a node list is created using the memory addresses of all predictive wear unevenness cells as node identifiers. Then, the node list is traversed. For each node, the addresses corresponding to incrementing and decrementing its memory address by one exist in the node list. If they exist, an undirected edge is added between the two nodes. After the graph is constructed, a depth-first search algorithm is used to traverse all nodes, dividing nodes within a connected component into subgraphs, each subgraph corresponding to a connected component structure.

[0142] Step S520: Perform spatial clustering analysis on the predictive wear unevenness cell feature map to identify predictive wear unevenness cell clusters with continuous storage addresses and spatially continuous deviations. Divide the predictive wear unevenness cells in the clusters into the same wear hotspot region and generate wear hotspot region division results. Each wear hotspot region contains multiple predictive wear unevenness cells with continuous storage addresses.

[0143] Spatial clustering analysis is based on the connected component structure of the graph and the spatial continuity of out-of-range deviations. For each connected component, its internal nodes are traversed, and the difference in out-of-range deviations between adjacent nodes is calculated. If the difference exceeds a preset gradient change threshold, the connected component is divided into independent sub-connected components at that location. Each sub-connected component corresponds to a candidate clustering region. Candidate clustering regions are then filtered, retaining those whose mean and standard deviation of out-of-range deviations meet preset conditions as wear hotspot regions. The wear hotspot region partitioning result is a list, where each element corresponds to a wear hotspot region and contains a list of storage addresses for all predictive wear imbalance units within that region.

[0144] In some embodiments, step S520 can be implemented as the following steps S521~S525:

[0145] Step S521: Input the feature map of the predictive wear imbalance unit into the address neighborhood scan layer of the spatial aggregation analyzer. The address neighborhood scan layer traverses all predictive wear imbalance units in ascending order of storage address and identifies predictive wear imbalance units with adjacent storage addresses to form initial connected components.

[0146] The address neighborhood scanning layer first sorts all predictive wear imbalance cells according to their memory addresses, resulting in an ordered list. Then, it iterates through this list, checking if the address difference between the current cell and the next cell equals the memory cell size. If they do, the current cell and the next cell are grouped into the same initial connected component. Simultaneously, for each cell, it checks if the cell corresponding to its address minus one exists in the list; if so, the two cells are merged using a disjoint-set data structure. After this traversal, each initial connected component corresponds to a set of predictive wear imbalance cells with consecutive memory addresses.

[0147] Step S522: Input the initial connectivity component into the deviation continuity detection layer of the spatial aggregation analyzer. The deviation continuity detection layer extracts the excess deviation of each predictive wear imbalance unit in the initial connectivity component, calculates the difference of excess deviation between predictive wear imbalance units of adjacent memory addresses, and generates a gradient sequence of deviation changes.

[0148] Specifically, the deviation continuity detection layer traverses each initially connected component, obtaining the out-of-range deviation of each unit within the component in ascending order of storage address. For two adjacent units within the component, the out-of-range deviation of the latter unit is subtracted from the out-of-range deviation of the former unit to obtain the deviation change gradient. The change gradients between all adjacent units are arranged in order to obtain the deviation change gradient sequence. The length of this sequence is equal to the number of units within the component minus one.

[0149] Step S523: Input the deviation change gradient sequence into the cluster boundary delineation layer of the spatial cluster analyzer. The cluster boundary delineation layer scans the deviation change gradient sequence. When the deviation change gradient exceeds the preset gradient change threshold, the initial connected component is divided into independent sub-connected components at that position. Each sub-connected component corresponds to a candidate cluster region.

[0150] The cluster boundary delineation layer traverses the gradient sequence of deviation changes. For each gradient value, it checks whether its absolute value exceeds a preset gradient change threshold. This preset threshold is, for example, set to 0.5 times the average deviation. When a gradient absolute value exceeds the threshold, a split point is set at the corresponding gradient location, dividing the initial connected component into two sub-connected components. The split point is located between the two units corresponding to the gradient. After traversal, the original connected component is divided into multiple sub-connected components, and the deviation change gradient within each sub-connected component does not exceed the threshold, meaning the deviation within the component exhibits spatial continuity.

[0151] Step S524: Input the candidate clusters into the region integration layer of the spatial cluster analyzer. The region integration layer obtains the start and end boundaries of the storage address of each candidate cluster, obtains the out-of-standard deviation of all predictive wear imbalance units in the candidate cluster, and calculates the mean and standard deviation of the out-of-standard deviation of the candidate cluster.

[0152] The region integration layer traverses each candidate cluster, obtaining the storage addresses of all predictive wear imbalance units within the cluster, determining the minimum address as the starting boundary and the maximum address as the ending boundary. It extracts the out-of-range deviations of all units within the cluster, calculates the arithmetic mean of these deviations as the mean out-of-range deviation, and calculates the sample standard deviation of these deviations as the standard deviation of the out-of-range deviation. The mean out-of-range deviation reflects the overall severity of wear imbalance within the cluster, while the standard deviation reflects the dispersion of wear imbalance within the cluster.

[0153] Step S525: Identify candidate clusters where the mean deviation exceeds a preset mean threshold and the standard deviation is lower than a preset standard deviation threshold as wear hotspot regions. Divide all predictive wear imbalance units within the identified wear hotspot regions into the same wear hotspot region and generate wear hotspot region division results.

[0154] The preset mean threshold can be set, for example, to 0.2 times the basic wear leveling trigger threshold, and the preset standard deviation threshold can be set to 0.3 times the mean deviation. For each candidate cluster, it is determined whether its mean deviation exceeds the preset mean threshold and whether its standard deviation is less than the preset standard deviation threshold. If both conditions are met, the candidate cluster is identified as a wear hotspot region. Predictive wear imbalance units within all identified wear hotspot regions are then assigned to their corresponding wear hotspot regions, resulting in a list of wear hotspot region assignments.

[0155] Step S530: Based on the current predicted wear value distribution characteristics of the predictive wear imbalance unit within each wear hotspot area, determine the regional wear centroid coordinates and regional wear diffusion gradient of the wear hotspot area. The regional wear centroid coordinates are used to indicate the spatial location where the wear degree is most concentrated within the wear hotspot area, and the regional wear diffusion gradient is used to indicate the attenuation rate of the wear degree spreading from the centroid location to the periphery.

[0156] The calculation of the regional wear centroid coordinates can be performed using a weighted average method. The storage address is converted into spatial coordinates, and the current predicted wear value is used as the weight to calculate the weighted average position. The calculation of the regional wear diffusion gradient starts from the centroid coordinates and extends along both increasing and decreasing address directions. At each extension step, the current predicted wear value at that position is calculated, resulting in a wear value decay sequence. This sequence is then fitted with an exponential decay function, and the decay coefficient of the fitting function is the regional wear diffusion gradient.

[0157] In some embodiments, step S530 can be implemented as the following steps S531~S536:

[0158] Step S531: For each wear hotspot region, obtain the storage address and current predicted wear value of all predictive wear imbalance units in the wear hotspot region, convert the storage address into spatial coordinates, each storage address corresponds to a spatial coordinate point, and assign the current predicted wear value corresponding to the storage address as a weight value to each spatial coordinate point.

[0159] The conversion from storage address to spatial coordinates uses a linear mapping, directly treating the storage address offset as the one-dimensional spatial coordinate value. For each wear hotspot region, the storage address offsets and corresponding current predicted wear values ​​of all predictive wear imbalance cells within the region are extracted to obtain a coordinate-weight pair list. The coordinate value is the storage address offset, and the weight value is the current predicted wear value.

[0160] Step S532: Weight the coordinate values ​​of each spatial coordinate point with their corresponding current predicted wear value, accumulate the weighted coordinate values ​​of all spatial coordinate points, divide the accumulated result by the sum of all current predicted wear values ​​to obtain the regional wear centroid coordinates. The regional wear centroid coordinates are used to represent the spatial location of the weighted average wear degree within the wear hotspot area.

[0161] The formula for calculating the centroid coordinates of a region's wear zone is: the centroid coordinate equals the sum of the products of all coordinate values ​​multiplied by their corresponding weight values, divided by the sum of all weight values. Specifically, the weighted sum variable and the weight sum variable are initialized to 0. All coordinate-weight pairs within the region are iterated through, with the coordinate values ​​multiplied by their weight values ​​and accumulated into the weighted sum variable, and the weight values ​​accumulated into the weight sum variable. After the iteration is complete, the weighted sum variable is divided by the weight sum variable to obtain the centroid coordinate value. The centroid coordinate value is a one-dimensional numerical value representing the spatial location where wear is most concentrated.

[0162] Step S533: Using the coordinates of the regional wear centroid as the origin, expand outwards along the increasing and decreasing directions of the storage address respectively. Calculate the current predicted wear value of the predictive wear imbalance cell at the spatial location corresponding to each expansion step, and obtain the wear value decay sequence distributed along the two directions.

[0163] The expansion step size is set to the size of a memory cell, i.e., the difference between adjacent addresses. Expanding in the address-increasing direction with the centroid coordinates as the center, the step size starts from 1 and increases. At each step size, the address is checked to see if it belongs to a predictive wear imbalance cell within the current wear hotspot region. If it does, the current predicted wear value of that cell is recorded; otherwise, the expansion is skipped and continues until the region boundary is reached or multiple consecutive step sizes are empty. Similarly, expansion is performed in the address-decreasing direction to obtain a wear value sequence in that direction. The wear value sequences in both directions describe the change in wear values ​​from the centroid towards both sides.

[0164] Step S534: Input the wear value decay sequence into the diffusion gradient calculator. The diffusion gradient calculator fits the decay trend of the wear value decay sequence and fits the decay function of the wear value as the expansion step size changes. The regional wear diffusion gradient is determined according to the derivative of the decay function. The regional wear diffusion gradient is used to represent the decay rate of the wear degree from the center position to the periphery.

[0165] The diffusion gradient calculator can fit the wear value decay sequence using an exponential decay model. The form of the exponential decay model is: , where is the wear value, is the expansion step size, is the initial wear value, and is the decay coefficient. The fitting process uses a nonlinear least squares method, and iterative optimization minimizes the sum of squared fitting errors. After fitting, the decay coefficient is the regional wear diffusion gradient. A larger diffusion gradient indicates that the wear value decays faster with increasing distance, and the wear concentration is higher; a smaller diffusion gradient indicates a more uniform wear distribution.

[0166] Step S535: Compare the calculated regional wear diffusion gradient with the preset gradient threshold. If the regional wear diffusion gradient is greater than the preset gradient threshold, mark the scheduling urgency level of the wear hotspot region as high urgency level. If the regional wear diffusion gradient is less than or equal to the preset gradient threshold, mark the scheduling urgency level of the wear hotspot region as low urgency level.

[0167] The preset gradient threshold is determined through historical data statistics and is set as the median of the diffusion gradients of all wear hotspot areas. For each wear hotspot area, its diffusion gradient is compared with the preset gradient threshold. If the diffusion gradient is greater than the threshold, it indicates that the wear concentration in that area is high and requires priority processing, and the scheduling urgency level is marked as high urgency level; if the diffusion gradient is less than or equal to the threshold, it indicates that the wear distribution is relatively uniform, and the scheduling urgency level is marked as low urgency level.

[0168] Step S536: Link and store the regional wear centroid coordinates, regional wear diffusion gradients, and scheduling urgency levels of each wear hotspot region to generate a wear hotspot region feature description set. The wear hotspot region feature description set is used for the allocation of subsequent migration operation execution time windows.

[0169] The wear hotspot region feature description set is a list, with each element corresponding to a wear hotspot region and containing four fields: region identifier, region wear centroid coordinates, region wear propagation gradient, and scheduling urgency level. The region identifier is generated by combining the region's start and end addresses.

[0170] Step S540: Compare the regional wear diffusion gradient of each wear hotspot area with the preset gradient threshold, and determine the scheduling urgency level of each wear hotspot area based on the comparison results. The larger the regional wear diffusion gradient, the higher the scheduling urgency level of the wear hotspot area.

[0171] The urgency level of dispatch is determined based on a comparison between the regional wear diffusion gradient and a preset gradient threshold. The preset gradient threshold is set as the average diffusion gradient of all wear hotspot regions. Wear hotspot regions are sorted from largest to smallest diffusion gradient; regions with diffusion gradients greater than the average are marked as high urgency levels, and regions with diffusion gradients less than or equal to the average are marked as low urgency levels. For regions with diffusion gradients significantly greater than the average, the level can be further subdivided; for example, regions with diffusion gradients 1.5 times greater than the average are marked as urgent.

[0172] Step S550: Based on the scheduling urgency level of each wear hotspot area, allocate a corresponding migration operation execution time window to each wear hotspot area. The higher the scheduling urgency level of the wear hotspot area, the earlier the start time of the execution time window allocated to it.

[0173] The allocation of migration operation execution time windows adopts a priority-based scheduling strategy. First, all wear hotspot regions are sorted according to their scheduling urgency level, with urgency level taking precedence over high urgency level, and high urgency level taking precedence over low urgency level. Within the same level, regions are sorted from largest to smallest wear diffusion gradient. Execution time windows are then allocated to the sorted regions sequentially. The execution time window allocated to the first region starts at the current time plus a preset preparation time, and the window length is set to a fixed value, such as 1 hour. The start time of subsequent regions is the start time of the previous region plus the window length, increasing sequentially. In this way, regions with higher urgency levels receive earlier execution time windows.

[0174] Step S560: Based on the proportion of the current predicted wear value of each predicted wear imbalance unit in each wear hotspot area to the sum of the current predicted wear values ​​of all predicted wear imbalance units in that wear hotspot area, determine the migration data volume allocation weight of each predicted wear imbalance unit in that wear hotspot area, and combine the migration operation execution time window and the migration data volume allocation weight to generate a dynamic wear leveling strategy set.

[0175] For each wear hotspot region, the sum of the current predicted wear values ​​of all predictive wear imbalance units within the region is calculated. For each unit within the region, its current predicted wear value is divided by the sum to obtain the migration data allocation weight for that unit. The weight reflects the degree of contribution of the unit to the wear imbalance in the region; a larger weight indicates a more severe wear condition in the unit, and a correspondingly larger amount of data needs to be migrated. The migration operation execution time window allocated in step S550 and the migration data allocation weight for each unit are combined to generate a dynamic wear leveling strategy record for each predictive wear imbalance unit, containing the unit identifier, execution time window, and migration data allocation weight. All records are summarized to obtain the dynamic wear leveling strategy set.

[0176] Please see Figure 2 , Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 100 includes at least a processor 101, a communication interface 102, and a memory 103. The processor 101, communication interface 102, and memory 103 can be connected via a bus or other means. The processor 101 (or Central Processing Unit, CPU) is the computing and control core of the electronic device, capable of parsing various instructions and processing various data within the electronic device. The communication interface 102 may optionally include a standard wired interface or a wireless interface (such as Wi-Fi, mobile communication interface, etc.), and can be used to send and receive data under the control of the processor 101; the communication interface 102 can also be used for data transmission and interaction within the electronic device. The memory 103 is a storage device in the electronic device used to store programs and data. It is understood that the memory 103 here can include the built-in memory of the electronic device, or it can include extended memory supported by the electronic device. The memory 103 provides storage space, which stores the operating system of the electronic device; this invention does not limit this.

[0177] In one embodiment, the processor 101 executes the solid-state drive life prediction method based on predictive wear leveling provided in the above embodiments of the present invention by running a computer program in the memory 103.

Claims

1. A method for predicting the life of a solid state drive based on predictive wear leveling, characterized by, The method includes: Obtain a wear state snapshot sequence and wear leveling scheduling history of the solid-state drive. The wear state snapshot sequence contains multiple wear state snapshot units, and the wear leveling scheduling history contains timestamps of executed data migration operations and the amount of migrated data. A wear trend state space reconstruction operation is performed on the wear state snapshot sequence and the wear leveling scheduling history. The migration operation information in the wear leveling scheduling history is used as a state disturbance factor and iteratively injected into the state transition matrix of the wear trend prediction process to obtain the wear evolution correction trajectory set corresponding to each wear state snapshot unit. The wear evolution correction trajectory set includes the deviation correction factor of the wear index prediction value sequence and the wear index actual observation value sequence of the storage unit. Dynamic wear threshold adjustment is performed on the deviation correction factors of each storage unit in the wear evolution correction trajectory set, mapping the cumulative effect of the deviation correction factors to a set of unbalanced tolerance thresholds at the storage unit level. Specifically, this includes: extracting the deviation correction factor sequence of each storage unit from the wear evolution correction trajectory set, where the deviation correction factor sequence contains the deviation correction factor corresponding to each wear state snapshot unit; inputting the deviation correction factor sequence of each storage unit into a deviation pattern recognizer, where the deviation pattern recognizer performs time-series structure parsing on the deviation correction factor sequence to identify oscillation mode features and drift mode features present in the deviation correction factor sequence, where the oscillation mode features include the fluctuation amplitude distribution information and fluctuation period length information of the deviation correction factor in the time dimension, and the drift mode features include the cumulative offset direction information and offset velocity information of the deviation correction factor in the time dimension; classifying the oscillation intensity of each storage unit according to the fluctuation amplitude distribution information in the oscillation mode features to obtain an oscillation intensity level identifier; determining the drift direction of each storage unit according to the cumulative offset direction information in the drift mode features to obtain a drift direction symbol identifier; and comparing the oscillation intensity level identifier with the... The drift direction symbol is combined and encoded to generate a threshold adjustment mode code for each storage cell. The basic wear leveling trigger threshold of the solid-state drive is obtained. Based on the threshold adjustment mode code, the basic wear leveling trigger threshold is reconstructed differentially. For storage cells with a positive drift direction symbol and an oscillation intensity level higher than a preset oscillation level threshold, a preset threshold increase coefficient mapping table is consulted based on the oscillation intensity level to obtain the corresponding threshold increase coefficient. The basic wear leveling trigger threshold is multiplied by this threshold increase coefficient to obtain the increased imbalance tolerance threshold. For storage cells with a negative drift direction symbol and an oscillation intensity level higher than a preset oscillation level threshold, a preset threshold decrease coefficient mapping table is consulted based on the oscillation intensity level to obtain the corresponding threshold decrease coefficient. The basic wear leveling trigger threshold is multiplied by this threshold decrease coefficient to obtain the decreased imbalance tolerance threshold. For storage cells whose oscillation intensity level does not exceed the preset oscillation level threshold, the basic wear leveling trigger threshold is used as the imbalance tolerance threshold for that storage cell. The imbalance tolerance thresholds of each storage cell are arranged in storage address order to generate a set of imbalance tolerance thresholds at the storage cell level. The wear index prediction sequence of each storage unit in the wear evolution correction trajectory set is compared with the corresponding threshold in the imbalance tolerance threshold set, and the storage unit whose wear index prediction value exceeds the corresponding threshold is identified as the predictive wear imbalance unit. A dynamic wear leveling strategy set is generated based on the predictive wear imbalance unit. The dynamic wear leveling strategy set includes the migration operation execution time point and migration data volume allocation scheme for each predictive wear imbalance unit.

2. The method of claim 1, wherein, The wear trend state space reconstruction operation is performed on the wear state snapshot sequence and the wear leveling scheduling history. The transition operation information in the wear leveling scheduling history is iteratively injected into the state transition matrix of the wear trend prediction process as a state perturbation factor, resulting in a set of wear evolution correction trajectories corresponding to each wear state snapshot unit, including: Extract the original dataset of wear indicators corresponding to the current wear state snapshot unit from the wear state snapshot sequence, and extract the set of migration operation records within a preset time window before the current wear state snapshot unit from the wear leveling scheduling history. Based on the migration data volume allocation scheme in the migration operation record set, determine the total amount of data migrated out of each storage unit within the preset time window, and analyze the amount of wear evolution suppression caused by migration operation in each storage unit within the preset time window based on the total amount of data migrated out. Obtain the wear evolution prediction trajectory corresponding to the previous wear state snapshot unit, and correlate and fuse the wear index prediction value of each storage unit in the wear evolution prediction trajectory with the wear evolution suppression amount to obtain the preliminary corrected wear prediction value; The initial corrected wear prediction value is compared with the actual observed wear index value of the corresponding storage unit in the current wear state snapshot unit to generate a single-step corrected deviation value for each storage unit in the current wear state snapshot unit. The single-step correction deviation value is embedded into the state transition matrix of the wear trend prediction process through the state perturbation injection mechanism to generate the deviation correction factor corresponding to each storage unit. The deviation correction factor is then integrated with the wear evolution prediction trajectory to obtain the wear evolution correction trajectory set corresponding to the current wear state snapshot unit. The wear evolution correction trajectory set corresponding to the current wear state snapshot unit is stored in the wear evolution correction trajectory storage area, and the deviation correction factor is synchronously stored in the deviation correction factor historical record library.

3. The method of claim 2, wherein, The step of determining the total amount of data migrated out of each storage unit within the preset time window based on the migration data volume allocation scheme in the migration operation record set, and analyzing the wear evolution suppression amount generated by the migration operation in each storage unit within the preset time window based on the total amount of data migrated out, includes: Each migration operation record in the migration operation record set is parsed, and the source storage unit identifier and the amount of data migrated from the source storage unit are extracted from each migration operation record. The migration data corresponding to each source storage unit identifier is aggregated and accumulated to obtain the total amount of data migrated out of each storage unit within the preset time window. Obtain the storage cell wear model of the solid-state drive, wherein the storage cell wear model defines the inhibition relationship between migration operations and the wear evolution process of storage cells; The total amount of data migrated out of each storage unit is mapped and matched with the inhibition relationship in the wear model of the storage unit to obtain the total amount of wear evolution inhibition of each storage unit within the preset time window. The duration of the preset time window is obtained, and the total amount of wear evolution suppression of each storage unit is distributed according to the duration of the time window to obtain the wear evolution suppression rate of each storage unit per unit time. The wear evolution suppression rate is used as the wear evolution suppression amount for each memory cell. The wear evolution suppression amount is used to represent the correction rate of the migration operation on the predicted value of the wear index of the memory cell per unit time. The wear evolution suppression values ​​of each memory cell are arranged in order of memory address to generate a wear evolution suppression value vector. The length of the wear evolution suppression value vector is equal to the total number of memory cells.

4. The method of claim 3, wherein, The step of obtaining the wear evolution prediction trajectory corresponding to the previous wear state snapshot unit, and then correlating and fusing the wear index prediction value of each storage unit in the wear evolution prediction trajectory with the wear evolution suppression amount to obtain a preliminary corrected wear prediction value, including: The wear evolution prediction trajectory corresponding to the previous wear state snapshot unit is read from the wear evolution prediction trajectory storage area. The wear evolution prediction trajectory contains a sequence of wear index prediction values ​​for each storage unit from a preset start time point to the acquisition time point of the previous wear state snapshot unit. For each storage unit, the wear index prediction value corresponding to the last time point in the wear index prediction value sequence is extracted as the benchmark predicted wear value. Based on the time interval between the previous wear state snapshot unit and the current wear state snapshot unit, and the wear evolution suppression amount of each storage unit, calculate the cumulative amount of wear evolution suppression caused by migration operations within this time interval; The difference between the baseline predicted wear value of each memory cell and the cumulative amount of wear evolution suppression is calculated to obtain the preliminary corrected wear prediction value of each memory cell. The preliminary corrected wear prediction values ​​of each storage cell are arranged in order of storage address to generate a preliminary corrected wear prediction value vector. The vector dimension of the preliminary corrected wear prediction value vector is equal to the total number of storage cells.

5. The method according to claim 1, characterized in that, The deviation correction factor sequence of each storage unit is input into the deviation pattern recognizer. The deviation pattern recognizer performs time-series structure analysis on the deviation correction factor sequence to identify the oscillation mode features and drift mode features present in the deviation correction factor sequence, including: The deviation correction factor sequence of each storage unit is input into the temporal segmentation layer of the deviation pattern recognizer. The temporal segmentation layer divides the deviation correction factor sequence into multiple consecutive temporal sub-segments according to a preset time window length. Each temporal sub-segment corresponds to a set of deviation correction factors within a time window. The time series sub-segments are input into the oscillation feature extraction layer of the deviation pattern recognizer. The oscillation feature extraction layer performs extreme point detection on each time series sub-segment, extracts the local maxima and local minima of the deviation correction factor in each time series sub-segment, generates an oscillation period parameter based on the frequency of alternation between local maxima and local minima, generates an oscillation amplitude parameter based on the difference between local maxima and local minima, and combines the oscillation period parameter and oscillation amplitude parameter into an oscillation pattern feature. The time-series sub-segments are input into the drift feature extraction layer of the deviation pattern recognizer. The drift feature extraction layer performs endpoint value capture on each time-series sub-segment, obtains the start deviation correction factor value and the end deviation correction factor value of each time-series sub-segment, generates a drift direction indication based on the direction of the difference between the end deviation correction factor value and the start deviation correction factor value, and generates a drift speed indication based on the ratio of the absolute value of the difference between the end deviation correction factor value and the start deviation correction factor value to the length of the time window. The drift direction indication and the drift speed indication are combined into a drift pattern feature. The oscillation mode characteristics of adjacent time series segments are input into the oscillation mode correlation analysis unit. The oscillation mode correlation analysis unit calculates the changes in the oscillation period parameter and the oscillation amplitude parameter between adjacent time series segments, and generates an oscillation evolution trajectory describing the evolution law of the oscillation mode on the time axis. The drift pattern features of adjacent time series segments are input into the drift pattern association analysis unit. The drift pattern association analysis unit calculates the connection relationship between the drift direction indication and the drift speed indication between adjacent time series segments, and generates a drift evolution trajectory describing the evolution law of the drift pattern on the time axis. The oscillation evolution trajectory and the drift evolution trajectory are input into the pattern fusion layer of the deviation pattern recognizer. The pattern fusion layer performs time-series alignment of the oscillation evolution trajectory and the drift evolution trajectory to generate a fused pattern descriptor. The fused pattern descriptor contains the correspondence information between the oscillation pattern features and the drift pattern features in different time windows.

6. The method according to claim 5, characterized in that, The process of classifying the oscillation intensity of each memory cell based on the fluctuation amplitude distribution information in the oscillation mode characteristics to obtain an oscillation intensity level identifier, and determining the drift direction of each memory cell based on the cumulative offset direction information in the drift mode characteristics to obtain a drift direction symbol identifier, includes: The oscillation amplitude parameters of each storage cell on all time segments are extracted from the fusion mode descriptor to form an oscillation amplitude parameter set. The oscillation amplitude accumulation calculation is performed on the oscillation amplitude parameter set to obtain the oscillation amplitude accumulation of each storage cell. Based on the position of the oscillation amplitude accumulation in the preset oscillation level division interval, the oscillation intensity level identifier of each storage cell is determined. The drift direction indications of each storage unit on all time-series sub-segments are extracted from the fusion mode descriptor to form a drift direction indication sequence. Drift direction continuity analysis is performed on the drift direction indication sequence. If the number of consecutive occurrences of the same direction in the drift direction indication sequence exceeds a preset threshold, then the direction is used as a drift direction symbol identifier. If no direction appears consecutively more than a preset threshold in the drift direction indication sequence, the dominant drift direction is determined as the drift direction symbol identifier based on the proportion of the total number of occurrences of each direction. Based on the oscillation intensity level identifier and drift direction symbol identifier of each storage unit, a matching query is performed in the preset threshold adjustment strategy mapping table. The threshold adjustment strategy mapping table contains adjustment strategy codes corresponding to different combinations of oscillation intensity level identifiers and different drift direction symbol identifiers, and the matching adjustment strategy code is obtained. The adjustment strategy code is associated and bound with the storage address of the storage unit to generate the threshold adjustment mode code for each storage unit; The threshold adjustment mode encoding of each storage cell is correlated with the imbalance tolerance threshold of the corresponding storage cell.

7. The method according to claim 1, characterized in that, The step of comparing the predicted wear index values ​​of each storage unit in the wear evolution correction trajectory set with the corresponding thresholds in the imbalance tolerance threshold set, and identifying storage units whose predicted wear index values ​​exceed the corresponding thresholds as predictive wear imbalance units, includes: The wear index prediction value sequence for each storage unit is extracted from the wear evolution correction trajectory set. The wear index prediction value sequence contains wear index prediction values ​​corresponding to multiple time points. The imbalance tolerance threshold corresponding to each storage unit is obtained from the imbalance tolerance threshold set. The imbalance tolerance threshold of each storage unit is expanded along the time axis to generate a threshold reference sequence that is time-aligned with the wear index prediction value sequence. The wear index prediction sequence of each storage unit and the corresponding threshold reference sequence are input into the trajectory cross-analyzer. The trajectory cross-analyzer performs spatial overlay comparison of the wear index prediction sequence and the threshold reference sequence, detects the cross point formed when the wear index prediction sequence crosses from below to above the threshold reference sequence, and records the cross timestamp corresponding to each cross point and the difference between the wear index prediction value and the imbalance tolerance threshold at the cross point as the cross deviation amount. Based on the time interval between adjacent intersections in the wear index prediction value sequence of each storage cell, the duration of predicted value exceeding the standard for each storage cell is determined, and storage cells whose predicted value exceeding the standard for a duration exceeding a preset duration threshold are marked as continuously exceeding standard cells. Crosspoint density analysis is performed on the continuously exceeding units to calculate the frequency of crosspoint occurrence for each continuously exceeding unit within a preset time window. Based on the comparison between the crosspoint occurrence frequency and a preset frequency threshold, continuously exceeding units whose crosspoint occurrence frequency exceeds the preset frequency threshold are marked as high-frequency crossing units. Perform cross-deviation accumulation analysis on the high-frequency crossing unit, accumulate the cross-deviation of all cross points of each high-frequency crossing unit to obtain the cross-deviation accumulation, and mark the high-frequency crossing unit whose cross-deviation accumulation exceeds the preset accumulation threshold as a deep crossing unit. The deep traversal units are identified as predictive wear imbalance units, and the intersection point distribution characteristics, cumulative intersection deviation, and duration of exceeding the standard for each deep traversal unit are packaged to generate a predictive wear imbalance unit feature record.

8. The method according to claim 7, characterized in that, The wear index prediction sequence of each storage unit and the corresponding threshold reference sequence are input into the trajectory cross-analyzer. The trajectory cross-analyzer performs spatial overlay comparison of the wear index prediction sequence and the threshold reference sequence, detects the crossover point formed when the wear index prediction sequence crosses from below to above the threshold reference sequence, and records the crossover timestamp corresponding to each crossover point and the difference between the wear index prediction value and the imbalance tolerance threshold at the time of crossover as the crossover deviation, including: The wear index prediction sequence of each storage cell is input into the sequence alignment layer of the trajectory cross-analyzer along with the corresponding threshold reference sequence. The sequence alignment layer pairs each time point in the wear index prediction sequence with the threshold of the same time point in the threshold reference sequence to generate a time point aligned prediction-threshold pair set. The prediction-threshold pairing set is input into the traverse detection layer of the trajectory cross-analyzer. The traverse detection layer traverses the time-point aligned prediction-threshold pairings and compares the size relationship between the predicted wear index value and the imbalance tolerance threshold at each time point in turn, generating a size relationship label sequence. Each label in the size relationship label sequence is used to indicate whether the predicted wear index value at the corresponding time point is greater than or less than or equal to the imbalance tolerance threshold. The size relationship marker sequence is input into the intersection point localization layer of the trajectory cross-analyzer. The intersection point localization layer scans the changes of adjacent markers in the size relationship marker sequence. When an adjacent marker changes from a marker representing less than or equal to a marker representing greater than, the interval between the two time points corresponding to the adjacent marker is determined as the cross interval. The intersection point of the wear index prediction value sequence and the threshold reference sequence within the cross interval is extracted as the cross point. All identified intersections are input into the intersection feature recording layer of the trajectory intersection analyzer. The intersection feature recording layer obtains the start and end time points of the intersection interval where each intersection point is located. Based on the start and end time points, the precise timestamp of the intersection point is calculated. The difference between the predicted wear index value and the imbalance tolerance threshold at the intersection point is calculated as the intersection deviation. The intersection timestamp and the intersection deviation are stored together.

9. An electronic device, characterized in that, include: A memory, wherein a computer program is stored; A processor for loading the computer program to implement the solid-state drive life prediction method based on predictive wear leveling as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Fault prediction method for solid state disk

    CN119479767A

  • Solid state disk wear leveling global optimization method and system based on multi-granularity data features

    CN121209787A