A method and apparatus for adjusting the read threshold of NAND flash memory based on temperature compensation

By constructing a temperature-compensated NAND flash memory read threshold adjustment method, the problems of read misjudgment and data loss caused by temperature fluctuations in the existing technology are solved, and high reliability and accurate threshold adjustment are achieved in complex environments.

CN121657949BActive Publication Date: 2026-06-30SHEN ZHEN XINCUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHEN ZHEN XINCUN TECH CO LTD
Filing Date
2026-01-22
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing methods for adjusting NAND flash memory read thresholds cannot adapt to temperature fluctuations in complex environments, leading to a high risk of read misjudgments and data loss, making it difficult to meet high reliability requirements.

Method used

By collecting real-time temperature data and read threshold data from flash memory devices, aligning them by timestamp, extracting time series features, performing temperature segmentation and threshold change magnitude calculation, clustering to divide offset patterns, constructing a prediction model, monitoring temperature fluctuations in real time and correcting read thresholds, and generating optimized threshold configurations.

Benefits of technology

It enables accurate capture of threshold change patterns over a wide temperature range, reduces the false reading rate, provides data loss risk assessment, and meets the high reliability requirements in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121657949B_ABST
    Figure CN121657949B_ABST
Patent Text Reader

Abstract

This invention relates to the field of smart chip technology, and discloses a method and apparatus for adjusting the read threshold of NAND flash memory based on temperature compensation. The method includes: acquiring real-time flash memory temperature and corresponding read threshold data, aligning timestamps to obtain an initial associated dataset; segmenting the dataset into fixed windows and calculating the temperature change rate and threshold change amplitude; dividing different threshold offset patterns through clustering and associating them with storage; constructing a prediction model based on an error rate index; monitoring temperature fluctuations and predicting the threshold offset if it exceeds the threshold, and calculating correction parameters; correcting the initial threshold to obtain the read standard; generating a threshold set by fusing risk assessment and offset patterns; and batch verifying and filtering read thresholds with low error rates to obtain an optimized threshold configuration. This method can achieve dynamic and precise adjustment of the NAND flash memory read threshold under temperature fluctuations, meeting the high reliability requirements of storage devices in complex environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart chip technology, and in particular to a method and apparatus for adjusting the read threshold of NAND flash memory based on temperature compensation. Background Technology

[0002] Currently, in the field of smart chips, with the continuous growth in demand for high-density storage and the diversification of device operating environments, NAND flash memory, as a core storage component, has its read reliability directly related to data integrity and device operating stability.

[0003] Existing methods for adjusting NAND flash memory read thresholds in the industry primarily rely on static preset standards or single-temperature point calibration. For example, they address temperature changes by using a fixed threshold range or setting a read baseline based solely on historical experience. However, this approach is clearly insufficient in complex operating environments. Static standards cannot adapt to dynamic temperature fluctuations and struggle to capture the non-linear changes in threshold drift. They are susceptible to issues such as read misjudgments at high temperatures and threshold redundancy at low temperatures due to the wide temperature range of the device's operation. Furthermore, single-temperature point calibration lacks auxiliary features such as historical read error rates, failing to quantify the risk of data loss and resulting in insufficient adjustment accuracy. This is particularly problematic in scenarios where servers and other devices experience a wide temperature range from low-temperature startup to high-temperature full-load operation, making real-time and accurate threshold adaptation difficult.

[0004] In summary, existing technologies cannot achieve dynamic and precise adjustment of the NAND flash memory read threshold under temperature fluctuations, and cannot meet the high reliability requirements of storage devices in complex environments. Summary of the Invention

[0005] This invention provides a method for adjusting the read threshold of NAND flash memory based on temperature compensation, which enables dynamic and precise adjustment of the read threshold of NAND flash memory under temperature fluctuations, meeting the high reliability requirements of storage devices in complex environments.

[0006] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a method for adjusting the read threshold of NAND flash memory based on temperature compensation, comprising:

[0007] Collect real-time temperature data and corresponding read threshold data of flash memory devices, align them by timestamps, extract time series features, and obtain the initial associated dataset;

[0008] The initial associated dataset is segmented by temperature according to a fixed time window, and the rate of temperature change and the magnitude of change of the reading threshold are calculated for each temperature segment interval.

[0009] Based on the temperature change rate and the change amplitude, different threshold offset patterns are divided by clustering, and the threshold offset patterns corresponding to each temperature segment interval are associated and then stored in a structured manner to obtain an associated dataset;

[0010] The correspondence between the temperature segment intervals and the threshold offset pattern is extracted from the associated dataset. At the same time, the error rate index of each temperature segment interval is calculated. The correspondence is associated with the error rate index to obtain the prediction model of the threshold offset.

[0011] The fluctuation amplitude of the current temperature sequence is monitored in real time. If the fluctuation amplitude exceeds the preset fluctuation amplitude threshold, the fluctuation amplitude is input into the prediction model to predict the corresponding threshold offset. Combined with the initial read threshold of the flash controller and the pre-acquired historical correction data, the matching correction parameters are calculated.

[0012] The initial reading threshold is corrected based on the correction parameters to obtain the updated reading standard;

[0013] Based on the reading standard and the error rate indicator, an assessment result of the data loss risk is generated, and then the assessment result is integrated with the adaptation requirements of the threshold offset mode to generate a set of reading thresholds;

[0014] The flash memory cells are batch read and verified according to the set of read thresholds. Read thresholds with read error rates lower than the preset error rate threshold are selected and integrated to obtain an optimized threshold configuration.

[0015] In one optional implementation, the real-time temperature data and corresponding read threshold data of the acquisition flash memory device are aligned by timestamps and time-series features are extracted to obtain an initial associated dataset, including:

[0016] Real-time temperature data inside the flash memory device is collected, and the corresponding read threshold data is recorded synchronously.

[0017] The real-time temperature data and the reading threshold data are aligned according to the timestamps to obtain time-aligned data;

[0018] The time-series features are extracted from the time-aligned data and integrated to obtain the initial associated dataset.

[0019] In one optional implementation, the step of segmenting the initial associated dataset into temperature segments according to a fixed time window and calculating the temperature change rate and the change magnitude of the reading threshold for each temperature segment interval includes:

[0020] The temperature sequence in the initial associated dataset is split according to a fixed time window to obtain multiple temperature segment intervals;

[0021] Calculate the rate of temperature change within each temperature segment interval, and simultaneously calculate the change amplitude of the reading threshold for the corresponding interval.

[0022] In one optional implementation, the step of clustering different threshold offset patterns based on the temperature change rate and the change amplitude, and then associating the threshold offset patterns corresponding to each temperature segment interval before structurally storing them to obtain an associated dataset includes:

[0023] Based on the temperature change rate and the change magnitude, different threshold offset patterns are divided by clustering.

[0024] The temperature segmentation intervals are associated with the corresponding threshold offset patterns to form pattern association data;

[0025] The pattern-related data is structured and stored to obtain the associated dataset.

[0026] In one optional implementation, the step of extracting the correspondence between the temperature segment intervals and the threshold offset pattern from the associated dataset, simultaneously calculating the error rate index for each temperature segment interval, and associating the correspondence with the error rate index to obtain a prediction model for the threshold offset includes:

[0027] Extract the correspondence between each temperature segment interval and the threshold offset pattern in the associated dataset;

[0028] Retrieve historical read error records for each of the pre-acquired temperature segment intervals corresponding to the time period, calculate the percentage of erroneous reads in the total number of reads, and obtain the error rate index;

[0029] By associating the correspondence with the error rate index, and fitting the correspondence between the temperature segmentation interval, the threshold offset pattern, and the erroneous reading, a prediction model for the threshold offset is obtained.

[0030] In one optional implementation, the real-time monitoring of the fluctuation amplitude of the current temperature sequence, if the fluctuation amplitude exceeds a preset fluctuation amplitude threshold, inputs the fluctuation amplitude into the prediction model to predict the corresponding threshold offset. Combining the initial read threshold of the flash memory controller and pre-acquired historical correction data, matching correction parameters are calculated, including:

[0031] Real-time monitoring of the current temperature sequence, and calculation of fluctuation amplitude within a fixed window;

[0032] The fluctuation amplitude is compared with a preset fluctuation judgment threshold. If it exceeds the threshold, the fluctuation amplitude is input into the prediction model and the corresponding threshold offset is output.

[0033] The initial read threshold of the flash memory controller and the previously acquired historical correction data are retrieved, and the matching correction parameters are calculated by combining them with the predicted threshold offset.

[0034] In one optional implementation, the step of correcting the initial read threshold according to the correction parameter to obtain the updated read standard includes:

[0035] Determine the preset initial read threshold of the flash memory controller, and use the correction parameters to perform a correction operation on the initial read threshold to obtain the corrected read threshold;

[0036] The revised reading threshold is used as the updated reading standard.

[0037] In one optional implementation, the step of generating an assessment result of data loss risk based on the reading standard and the error rate indicator, and then integrating the assessment result with the adaptation requirements of the threshold offset mode to generate a set of reading thresholds, includes:

[0038] Based on the reading criteria and the error rate index, data loss risk levels are divided according to preset risk level thresholds, which serve as the risk assessment results.

[0039] Based on the evaluation results, the adjustment range of the reading standard is determined. Combining the characteristics of the threshold offset mode, multiple candidate thresholds are selected within the adjustment range, and all candidate thresholds are integrated to generate a set of reading thresholds.

[0040] In one optional implementation, the step of performing batch read verification on flash memory cells according to the set of read thresholds, filtering read thresholds with read error rates lower than a preset error rate threshold, and integrating them to obtain an optimized threshold configuration includes:

[0041] Batch read tests were performed on the flash memory cells using each threshold in the set of read thresholds, and the read error rate corresponding to each threshold was statistically analyzed.

[0042] The read error rate is compared with a preset error rate threshold, and a suitable read threshold is obtained by filtering.

[0043] By integrating the required reading thresholds, an optimized threshold configuration is obtained.

[0044] Secondly, the present invention provides a temperature-compensated NAND flash memory read threshold adjustment device, comprising:

[0045] The data acquisition module is used to collect real-time temperature data and corresponding read threshold data of the flash memory device, extract time series features after aligning by timestamp, and obtain the initial associated dataset.

[0046] The segmented calculation module is used to segment the initial associated dataset into temperature segments according to a fixed time window, and calculate the temperature change rate and the change range of the reading threshold for each temperature segment interval.

[0047] The pattern correspondence module is used to divide different threshold offset patterns by clustering according to the temperature change rate and the change amplitude, and then associate the threshold offset patterns corresponding to each temperature segment interval and store them in a structured manner to obtain an associated dataset.

[0048] The model building module is used to extract the correspondence between the temperature segment intervals and the threshold offset pattern from the associated dataset, calculate the error rate index of each temperature segment interval, associate the correspondence with the error rate index, and obtain the prediction model of the threshold offset.

[0049] The parameter calculation module is used to monitor the fluctuation range of the current temperature sequence in real time. If the fluctuation range exceeds the preset fluctuation range threshold, the fluctuation range is input into the prediction model to predict the corresponding threshold offset. Combined with the initial read threshold of the flash controller and the pre-acquired historical correction data, the matching correction parameters are calculated.

[0050] The threshold update module is used to correct the initial reading threshold according to the correction parameters to obtain the updated reading standard;

[0051] The threshold set generation module is used to generate an assessment result of data loss risk based on the reading standard and the error rate indicator, and then integrate the assessment result with the adaptation requirements of the threshold offset mode to generate a reading threshold set.

[0052] The configuration optimization module is used to perform batch read verification of flash memory cells according to the set of read thresholds, filter read thresholds with read error rates lower than the preset error rate threshold and integrate them to obtain the optimized threshold configuration.

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

[0054] (1) This invention collects historical correction data, real-time temperature data and corresponding reading threshold data of flash memory devices, extracts time series features by aligning with timestamps to obtain an initial associated dataset, calculates the temperature change rate and threshold change amplitude by segmenting according to fixed time windows, and obtains an associated dataset by clustering different threshold offset patterns and storing them in a structured manner. This invention breaks through the limitations of traditional static preset standards that cannot adapt to dynamic temperature fluctuations, fully explores the linkage characteristics between temperature and threshold, eliminates interference from non-critical temperature ranges, provides high-precision data support for threshold drift prediction, effectively improves the capture rate of threshold change patterns under wide temperature spans, and solves the problem that existing technologies cannot accurately capture the influence of temperature on thresholds.

[0055] (2) This invention extracts the correspondence between temperature segment intervals and threshold offset patterns from the associated dataset, integrates the error rate index calculated from the historical reading error records of each interval to construct a prediction model, monitors the temperature fluctuation amplitude in real time when it exceeds the threshold, inputs the fluctuation amplitude into the model to predict the offset, calculates the matching correction parameters by combining the initial reading threshold and historical correction data, and obtains the updated reading standard after correcting the benchmark. This invention breaks through the limitations of traditional single temperature point calibration without the integration of auxiliary features, accurately captures the nonlinear change law of threshold drift, provides multi-dimensional basis for threshold adjustment, significantly reduces the reading misjudgment rate caused by temperature fluctuation, and makes up for the deficiency of insufficient adjustment accuracy in the existing technology.

[0056] (3) This invention generates data loss risk assessment results based on the updated reading standards and error rate indicators, integrates threshold offset mode adaptation requirements to generate a set of reading thresholds, verifies and filters thresholds that meet the error rate standards through batch reading, and integrates them to obtain optimized threshold configuration. It breaks through the limitations of traditional adjustment lacking risk quantification and continuous optimization mechanisms, provides operation and maintenance personnel with accurate threshold configuration and risk prevention basis, solves the problems of difficult threshold adaptation and high data loss risk under wide temperature range, takes into account reading reliability and operation and maintenance efficiency, and meets the high reliability requirements of storage devices in complex environments. Attached Figure Description

[0057] Figure 1 This is a schematic diagram of a method for adjusting the read threshold of NAND flash memory based on temperature compensation, provided in the first embodiment of the present invention.

[0058] Figure 2 This is a schematic diagram of a temperature-compensated NAND flash memory read threshold adjustment device provided in the second embodiment of the present invention. Detailed Implementation

[0059] 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.

[0060] Reference Figure 1 The first embodiment of the present invention provides a method for adjusting the read threshold of NAND flash memory based on temperature compensation, including the following steps:

[0061] S101: Collect real-time temperature data and corresponding read threshold data of the flash memory device, align them by timestamp, extract time series features, and obtain the initial associated dataset;

[0062] S102, the initial associated dataset is divided into temperature segments according to a fixed time window, and the temperature change rate and the change range of the reading threshold are calculated for each temperature segment interval.

[0063] S103, based on the temperature change rate and the change amplitude, different threshold offset patterns are divided by clustering, and the threshold offset patterns corresponding to each temperature segment interval are associated and then stored in a structured manner to obtain an associated dataset;

[0064] S104, extract the correspondence between the temperature segment intervals and the threshold offset pattern from the associated dataset, calculate the error rate index of each temperature segment interval, associate the correspondence with the error rate index, and obtain the prediction model of the threshold offset.

[0065] S105, monitor the fluctuation amplitude of the current temperature sequence in real time. If the fluctuation amplitude exceeds the preset fluctuation amplitude threshold, input the fluctuation amplitude into the prediction model to predict the corresponding threshold offset. Combine the initial read threshold of the flash controller and the pre-acquired historical correction data to calculate the matching correction parameters.

[0066] S106, Correct the initial reading threshold according to the correction parameters to obtain the updated reading standard;

[0067] S107, Generate an assessment result of data loss risk based on the reading standard and the error rate indicator, and then integrate the assessment result with the adaptation requirements of the threshold offset mode to generate a set of reading thresholds;

[0068] S108, perform batch read verification on the flash memory cells according to the set of read thresholds, filter read thresholds with read error rates lower than the preset error rate threshold and integrate them to obtain an optimized threshold configuration.

[0069] In step S101, real-time temperature data and corresponding read threshold data of the flash memory device are collected, and time series features are extracted after alignment by timestamps to obtain an initial associated dataset, including:

[0070] Real-time temperature data inside the flash memory device is collected, and the corresponding read threshold data is recorded synchronously.

[0071] The real-time temperature data and the reading threshold data are aligned according to the timestamps to obtain time-aligned data;

[0072] The time-series features are extracted from the time-aligned data and integrated to obtain the initial associated dataset.

[0073] It should be noted that, firstly, when acquiring real-time temperature data from within the flash memory device, the DS18B20 digital temperature sensor built into the flash memory device is used. This sensor is a commonly used high-precision temperature acquisition device in storage devices, with a sampling frequency set to 1Hz. The sampling frequency is set based on the temperature change response characteristics of the flash memory device, balancing data integrity and device power consumption. After tens of thousands of synchronous acquisition tests, it can completely capture dynamic temperature changes under different scenarios, and the acquisition error does not exceed 0.5℃ within the operating temperature range of -40℃ to 85℃. When synchronously recording the corresponding read threshold data, it is read in real-time through the threshold register of the flash memory controller, ensuring complete synchronization with the temperature data acquisition time and avoiding data mismatch caused by time deviation. For example, if the temperature sensor acquires data every second and obtains 25℃, at the same time, the threshold register reads the read threshold of 1.2V, completing a set of synchronous data acquisitions.

[0074] Next, when aligning temperature data and read threshold data by timestamp, a precise timestamp matching algorithm is used. This algorithm compares the acquisition timestamps of the two sets of data (accurate to the millisecond level) and pairs data with the same timestamp or a time difference within 10 milliseconds. The 10-millisecond time difference threshold is set based on sensor and register acquisition latency tests. After thousands of alignment verifications, the alignment accuracy at this threshold can meet the needs of different load scenarios. For high-precision scenarios, the time difference threshold can be lowered to 5 milliseconds, and for ordinary scenarios, it can be increased to 15 milliseconds. For example, if the temperature data timestamp is 1699999999000 milliseconds and the read threshold data timestamp is 1699999999008 milliseconds, the time difference of 8 milliseconds is within the threshold, forming a set of time-aligned data.

[0075] When extracting time-series features from time-aligned data, a sliding window feature extraction method is used, with a window size of 10 data points. The window size is set based on the temperature and threshold change period; 10 data points correspond to a 10-second duration, effectively extracting trend features. Testing with multiple temperature threshold sequences showed that the features extracted by this window size can cover over 90% of temperature-related factors affecting threshold changes. The extracted time-series features include the mean and variance of the temperature within the window, the mean of the reading threshold, and the range of the reading threshold change. The range of the reading threshold change is calculated using the range, i.e., the difference between the maximum and minimum reading threshold values ​​within the window. This calculation method intuitively reflects the fluctuation range of the threshold and is suitable for the needs of temperature correlation analysis. These features are integrated to obtain the initial correlation data. For example, in the 10 aligned data points, the mean temperature is 28℃, the variance is 2℃², the mean reading threshold is 1.3V, and the range of the reading threshold change is 0.2V. Integrating these features forms one record in the initial correlation dataset. By integrating all features according to the previous steps, the complete initial correlation dataset can be obtained.

[0076] In step S102, the initial associated dataset is segmented by temperature according to a fixed time window, and the temperature change rate and the change amplitude of the reading threshold for each temperature segment interval are calculated, including:

[0077] The temperature sequence in the initial associated dataset is split according to a fixed time window to obtain multiple temperature segment intervals;

[0078] Calculate the rate of temperature change within each temperature segment interval, and simultaneously calculate the change amplitude of the reading threshold for the corresponding interval.

[0079] It should be noted that, firstly, when splitting the temperature sequence in the initial correlated dataset into a fixed time window, the fixed time window is set to 30 seconds. This window size is based on the typical periodic statistical setting of temperature fluctuations in flash memory devices over the past year. 30 seconds is sufficient to fully capture a single temperature fluctuation process without causing confusion between adjacent fluctuation characteristics due to an excessively long window. Through testing with temperature sequences in multiple different scenarios, the segmented intervals after splitting by this window size accurately reflect the correlation between temperature and threshold values. In scenarios with rapid temperature changes, such as the device startup phase, the window can be reduced to 15 seconds, while in scenarios with slow changes, such as the steady-state operation phase, it can be expanded to 60 seconds. For example, if the temperature sequence in the initial correlated dataset is 5 minutes long, splitting it into 30-second windows yields 10 temperature segment intervals, each containing continuous temperature data within 30 seconds.

[0080] Next, when calculating the rate of temperature change within each temperature segment interval, a linear regression method is used to fit a linear trend line of the temperature data within the interval; the slope of this line represents the rate of temperature change for that interval. Simultaneously, when calculating the change in the reading threshold for the corresponding interval, the difference between the maximum and minimum reading threshold values ​​within the interval is taken. Verified with tens of thousands of sets of temperature and threshold data, this calculation method accurately quantifies the rate of temperature change and the degree of threshold deviation, and the calculation results highly match the threshold adjustment patterns in actual hardware operation. For example, if the temperature linearly increases from 25℃ to 28℃ within a 30-second temperature segment interval, the rate of temperature change calculated using linear regression is 0.1℃ / s, and the corresponding reading threshold increases from 1.2V to 1.3V, a change of 0.1V.

[0081] In step S103, based on the temperature change rate and the change amplitude, different threshold offset patterns are defined by clustering, and the threshold offset patterns corresponding to each temperature segment interval are associated and then stored in a structured manner to obtain an associated dataset, including:

[0082] Based on the temperature change rate and the change magnitude, different threshold offset patterns are divided by clustering.

[0083] The temperature segmentation intervals are associated with the corresponding threshold offset patterns to form pattern association data;

[0084] The pattern-related data is structured and stored to obtain the associated dataset.

[0085] It should be noted that, firstly, when classifying different threshold offset patterns based on the temperature change rate and threshold change amplitude, to eliminate the influence of the difference in dimensions of different feature data on the clustering distance calculation, the temperature change rate and threshold change amplitude need to be Z-score standardized to convert data with different dimensions into dimensionless standard scores. After processing, the K-means clustering algorithm is used for pattern division. This algorithm is a commonly used unsupervised classification technique in data mining that can automatically group data based on data similarity. The number of clusters is set to 3, corresponding to slow offset, medium offset, and fast offset patterns, respectively. This number is determined based on the statistical data of threshold offset of flash memory devices under different temperature scenarios over the past year. After testing and verification with multiple sets of flash memory devices of different capacities, the 3-class division can cover more than 92% of the actual offset situations, and the distinction between each category is obvious. During clustering, the temperature change rate (normalized by Z-score) and the threshold change magnitude are used as two-dimensional feature variables. The K-means++ algorithm is used to initialize cluster centers, prioritizing data points farther from previously selected centers to avoid local optima caused by random initialization. During iteration, the cluster centers are continuously updated until the center change after two iterations is less than 0.001℃ / s and 0.001V respectively when mapped back to the original feature space, or until the iteration count reaches 50. The iteration stopping condition is calibrated based on the distribution characteristics of nearly ten thousand sets of flash memory threshold offset data, which can control computational costs while ensuring clustering accuracy. Cluster centers are determined by calculating the Euclidean distance between data points, ultimately obtaining the feature range of each pattern. For example, the clustering results show that for the slow offset pattern, the temperature change rate is ≤0.05℃ / s and the threshold change magnitude is ≤0.05V; for the medium offset pattern, 0.05℃ / s < temperature change rate ≤0.2℃ / s and 0.05V < threshold change magnitude ≤0.15V; and for the fast offset pattern, the temperature change rate >0.2℃ / s and the threshold change magnitude >0.15V. For example, a temperature change rate of 0.1℃ / s and a threshold change amplitude of 0.1V in a certain temperature segment interval are classified into a medium offset mode after K-means clustering.

[0086] Next, when establishing associations between segmented intervals and their corresponding threshold offset patterns, a binding is performed using segment IDs and pattern identifiers. Each temperature segmented interval is assigned a unique segment ID, which includes a timestamp and interval sequence information, ensuring the uniqueness and traceability of the association. During the association process, data association mapping technology is used to map segment IDs one-to-one with the threshold offset pattern types (slow / medium / fast offset) obtained from clustering, forming pattern association data containing segment ID, temperature change rate, threshold change amplitude, and threshold offset pattern. For example, the temperature segmented interval numbered 20240520-03, with a temperature change rate of 0.15℃ / s and a threshold change amplitude of 0.12V, corresponds to a medium offset pattern, forming a complete pattern association data.

[0087] Finally, when storing the associated data in a structured manner, a relational database table structure is used. Table fields include segment ID, temperature change rate, threshold change amplitude, threshold offset mode type, interval start time, and interval end time. This storage format is designed based on the needs of subsequent mathematical fitting and model training, facilitating rapid querying and extraction of data for specific patterns or time periods. After storing tens of thousands of associated data entries, this structure improved data retrieval efficiency by more than 50% compared to unstructured storage, and supports filtering by conditions such as threshold offset mode and temperature change rate range. For example, a stored data entry might have the following characteristics: Segment ID 20240520-03, Temperature Change Rate 0.15℃ / s, Threshold Change Amplitude 0.12V, Threshold Offset Mode Medium Offset, Start Time 1699999999000 milliseconds, End Time 1699999999030 milliseconds. All data is stored in order according to the table fields, resulting in the associated dataset.

[0088] In step S104, the correspondence between the temperature segment intervals and the threshold offset pattern is extracted from the associated dataset. Simultaneously, the error rate index for each temperature segment interval is calculated. The correspondence is then correlated with the error rate index to obtain a prediction model for the threshold offset, including:

[0089] Extract the correspondence between each temperature segment interval and the threshold offset pattern in the associated dataset;

[0090] Retrieve historical read error records for each of the pre-acquired temperature segment intervals corresponding to the time period, calculate the percentage of erroneous reads in the total number of reads, and obtain the error rate index;

[0091] By associating the correspondence with the error rate index, and fitting the correspondence between the temperature segmentation interval, the threshold offset pattern, and the erroneous reading, a prediction model for the threshold offset is obtained.

[0092] It should be noted that, firstly, when extracting the correspondence between temperature segment intervals and offset patterns in the associated dataset, precise association is performed by segment ID. Each temperature segment interval ID uniquely corresponds to the offset pattern (slow / medium / fast offset) obtained from clustering, ensuring the uniqueness and traceability of data associations. During the extraction process, data mapping technology is used to bind features such as the temperature change rate and interval duration of the segments to the offset pattern type, forming a correspondence table containing "segment ID - temperature feature - offset pattern". To eliminate the interference of different physical units such as the temperature change rate (degrees per second), interval duration (seconds), and error rate (percentage units) on the regression model weights, and to ensure the convergence speed of model training, continuous variables need to be Z-score standardized. For discrete variables, i.e., threshold offset patterns, a numerical quantization encoding method is used, setting slow offset to 1, medium offset to 2, and fast offset to 3. This quantization value characterizes the intensity level of the offset trend. Subsequently, the constructed dataset is randomly divided into training and test sets in an 8:2 ratio. The training set is used for parameter fitting, and the test set is used for generalization ability evaluation. For example, the temperature segment interval with segment ID 20240520-05 has a temperature change rate of 0.5 after standardization. The corresponding medium offset pattern is encoded as the value 2, forming a standardized feature record.

[0093] Next, when retrieving historical read error records for each temperature segment interval, this is achieved through the log storage module of the flash memory device. The start and end times of each temperature segment interval are used as search criteria to match all read error records within the same time period. The total number of reads and the number of erroneous reads within that time period are then calculated, and the error rate is calculated as the percentage of erroneous reads to the total number of reads. After multiple log retrieval tests for different time periods, this matching method accurately locates error records for the corresponding time periods, and the calculated results are highly consistent with actual hardware error reports. For example, if a temperature segment interval is from 1699999999030 milliseconds to 1699999999060 milliseconds, a total of 1000 reads and 10 erroneous reads were found within that time period, resulting in an error rate of 1% calculated using the formula.

[0094] Finally, when correlating the correspondence with the error rate index and fitting the model to obtain the prediction model, a multiple linear regression algorithm is used to establish the mathematical model. The mathematical expression of the model is as follows:

[0095] ;

[0096] in, This is the predicted threshold offset. The standardized rate of temperature change The duration of the temperature segment intervals. This represents the quantized threshold offset mode intensity value. The standardized error rate metric For the intercept term, to The regression coefficients for each characteristic variable are: This represents the random error term. The model parameters are solved by minimizing the mean squared error loss function to find the optimal parameter combination. The definition is as follows:

[0097] ;

[0098] In the formula For the sample size, These are the model's predicted values. The data are actual observations. The weights are iteratively updated until the loss function converges, yielding the final prediction model. To verify the model's high accuracy and reliability, a comprehensive validation scheme combining 10-fold cross-validation and residual normality testing is employed. This scheme divides the dataset into 10 parts, alternately selecting one part as the validation set and the remaining nine parts as the training set, performing 10 training and testing iterations, and calculating the determination coefficients of the 10 test results. The average of the root mean square error (RMSE). The average of the acceptance criteria settings. The threshold value must be greater than 0.9. This threshold is set based on the statistical standard for strong correlation, indicating that the model can explain more than 90% of the threshold variation differences. Simultaneously, the average RMSE must be less than 0.005V. This threshold is set based on the minimum step precision of the flash memory read voltage, ensuring that the prediction deviation is much smaller than the minimum unit of hardware adjustment. Furthermore, this threshold can be adjusted downwards according to the precision requirements of different flash memory processes. In the residual analysis stage, the residuals of the prediction results are statistically analyzed. If the residual distribution conforms to a normal distribution, i.e., most residuals are concentrated around 0, it proves that the model has fully extracted the patterns in the data. For example, with inputs of a standardized temperature change rate of 0.1, an interval duration of 30 seconds, quantization offset mode 2, and a standardized error rate index of 0.01, the model outputs a predicted value of 0.100V, with a deviation of only 0.002V from the actual value of 0.102V, meeting the high-precision prediction requirements.

[0099] In step S105, the fluctuation amplitude of the current temperature sequence is monitored in real time. If the fluctuation amplitude exceeds a preset fluctuation amplitude threshold, the fluctuation amplitude is input into the prediction model to predict the corresponding threshold offset. Combined with the initial read threshold of the flash memory controller and pre-acquired historical correction data, matching correction parameters are calculated, including:

[0100] Real-time monitoring of the current temperature sequence, and calculation of fluctuation amplitude within a fixed window;

[0101] The fluctuation amplitude is compared with a preset fluctuation judgment threshold. If it exceeds the threshold, the fluctuation amplitude is input into the prediction model and the corresponding threshold offset is output.

[0102] The initial read threshold of the flash memory controller and the previously acquired historical correction data are retrieved, and the matching correction parameters are calculated by combining the threshold offset.

[0103] It should be noted that, firstly, when monitoring the current temperature sequence in real time, a sliding window monitoring method is used, with a fixed window size of 20 seconds. This window size is set based on the typical response time of flash memory device temperature fluctuations over the past year. 20 seconds is sufficient to fully capture a single valid fluctuation and avoids misjudgment of instantaneous fluctuations. After tens of thousands of temperature monitoring tests, the fluctuation amplitude calculated within the window has shown no missed or misjudged occurrences in relation to the actual temperature change trend. The fluctuation amplitude is obtained by calculating the difference between the highest and lowest temperatures within the window. This calculation method intuitively reflects the intensity of temperature changes and is adaptable to fluctuation monitoring needs in different scenarios. For example, within the 20-second window of the current temperature sequence, with a highest temperature of 30℃ and a lowest temperature of 25℃, the calculated fluctuation amplitude is 5℃.

[0104] Subsequently, when comparing the fluctuation amplitude with the preset fluctuation judgment threshold, the preset threshold is set based on the degree of influence of temperature fluctuation on the reading threshold offset. The threshold offset under different fluctuation amplitudes over the past year is statistically analyzed, and the smallest fluctuation amplitude with an impact exceeding 0.05V is taken as the threshold for each scenario. For the normal temperature scenario (20-30℃), the threshold is set to 4℃; for the high temperature scenario (30-45℃), the threshold is set to 3℃; and for the low temperature scenario (0-20℃), the threshold is set to 5℃ (temperature range division uses left-open and right-closed). Threshold verification for different scenarios shows that this setting can cover more than 90% of the temperature fluctuation scenarios requiring adjustment and supports scenario-based adjustment. If the fluctuation amplitude exceeds the threshold, the device calls the previously constructed multiple linear regression prediction model to calculate the threshold offset. The calculation process follows the formula... Execution involves feeding real-time features into the model. For example, let the model intercept be... 0.005V, standardized temperature change rate It is 0.5 and the corresponding coefficient 0.1V, interval duration 30 seconds and coefficient 0.001V / second, quantization mode It is 2 and the coefficient The normalized error rate is 0.005V. It is 0.5 and the coefficient It is 0.01V. If the value is 0V, then the predicted offset Y is calculated as 0.005 + 0.5 × 0.1 + 30 × 0.001 + 2 × 0.005 + 0.5 × 0.01 + 0, and finally summed to obtain the predicted threshold offset of 0.1V.

[0105] Finally, the initial read threshold and historical calibration data of the flash memory controller are retrieved. A weighted fusion algorithm is used to calculate the matching calibration parameters, with the weight of the predicted threshold offset set to 0.7 and the weight of the historical calibration offset set to 0.3. This weighting ratio is set according to the principle of prioritizing real-time perception. The calibration parameter is calculated by adding the weighted total offset to the initial threshold and then dividing by the initial threshold. For example, with an initial read threshold of 1.2V, a predicted offset of 0.1V, and a historical average offset of 0.02V, the numerator is 1.2 + 0.1 × 0.7 + 0.02 × 0.3, which equals 1.2 + 0.07 + 0.006 = 1.276V. Dividing 1.276V by the initial threshold of 1.2V yields a calibration parameter of approximately 1.0633. It should be noted that the historical calibration data covers the calibration coefficient, adjustment time, calibration offset, and corresponding temperature scenario for each threshold adjustment within the past three months. It can be retrieved in timestamp order through the firmware storage module of the flash memory device, ensuring data integrity and traceability.

[0106] In step S106, the initial reading threshold is corrected according to the correction parameters to obtain the updated reading standard, including:

[0107] Determine the preset initial read threshold of the flash memory controller, and use the correction parameters to perform a correction operation on the initial read threshold to obtain the corrected read threshold;

[0108] The revised reading threshold is used as the updated reading standard.

[0109] It should be noted that, firstly, when correcting the initial read threshold using the calibration parameters, the initial read threshold is the factory-preset base read threshold of the flash controller, such as 1.2V. The correction method is to calculate by multiplying the initial reference by the calibration parameters. This calculation logic is based on the correlation test settings of the calibration parameters and threshold correction effects over the past year. After tens of thousands of correction verifications in different scenarios, the corrected threshold can accurately match the read requirements under current temperature fluctuations and maintain stable adaptation in high and low temperature environments and under different load conditions. The initial reference supports scenario-based adjustment. High-performance flash memory devices can have the reference increased to 1.3V, while low-power scenarios can have it decreased to 1.1V. For example, if the initial read threshold is 1.2V and the calibration parameter is 1.08, the corrected read threshold is 1.296V after multiplication.

[0110] It is worth noting that to prevent calculated voltages from exceeding hardware limits due to model prediction bias or abnormal parameters, a voltage saturation clamping mechanism is required. A maximum safe voltage threshold for the flash memory cell is pre-set. This threshold is determined by the smaller of the flash memory chip's oxide breakdown voltage and the controller's maximum output capability, typically set to 1.5V or according to the specific chip datasheet. During calculation, the undetermined threshold obtained from multiplication is compared with the maximum safe voltage threshold. If the undetermined threshold exceeds the maximum safe voltage threshold, the corrected read threshold is forcibly determined as the maximum safe voltage threshold to prevent permanent hardware damage due to overvoltage; if it does not exceed the threshold, the undetermined threshold is directly used as the corrected read threshold. For example, if the initial read threshold is 1.2V and the maximum safe voltage threshold is set to 1.5V, and the calculated correction parameter is 1.0633, multiplication yields 1.276V, which is less than 1.5V, so 1.276V is output as the correction result. If an extreme anomaly causes the calibration parameter to be calculated as 1.3, and the multiplication operation results in 1.56V, which exceeds the safety limit of 1.5V, the device will force an output of 1.5V as the final corrected reading threshold to ensure hardware safety.

[0111] When calculating the difference between the corrected read threshold and the initial read threshold, the precise threshold offset is directly obtained by subtracting the initial reference from the corrected threshold. This calculation method intuitively reflects the actual magnitude of the threshold adjustment required. Verified through testing with multiple sets of different correction parameters, the error between the difference result and the actual threshold drift requirement is controlled within 0.01V, providing a precise basis for subsequent read standard updates. For example, subtracting the initial reference of 1.2V from the corrected read threshold of 1.296V yields a precise threshold offset of 0.096V, which can be directly used to update the flash memory controller's read standard.

[0112] In step S107, an assessment result of data loss risk is generated based on the reading standard and the error rate indicator. Then, the assessment result is integrated with the adaptation requirements of the threshold offset mode to generate a set of reading thresholds, including:

[0113] Based on the reading criteria and the error rate index, data loss risk levels are divided according to preset risk level thresholds, which serve as the risk assessment results.

[0114] Based on the evaluation results, the adjustment range of the reading standard is determined. Combining the characteristics of the threshold offset mode, multiple candidate thresholds are selected within the adjustment range, and all candidate thresholds are integrated to generate a set of reading thresholds.

[0115] It should be noted that, firstly, the corrected read threshold calculated in step S106 is directly used as the current central reference voltage. When classifying data loss risk levels based on the precise threshold offset and error rate index corresponding to this central reference voltage, a maximum risk priority principle is adopted for full coverage classification to address the problem of mixed scenarios involving traditional single logical omissions. The preset risk level thresholds are set based on the JEDEC storage device reliability specifications and the fault statistics of flash memory devices over the past year, and are divided into three levels: low, medium, and high. If the error rate is greater than 1.5% or the precise offset is greater than 0.2V, either condition is directly judged as high risk. This range indicates that the device is in an extremely unstable state, and the search range needs to be expanded to the maximum extent. If the high risk condition is not met, but the error rate is greater than 0.5% or the precise offset is greater than 0.1V, it is judged as medium risk. This range covers mixed situations of single indicator abnormalities or slight abnormalities in two indicators, indicating that the device has potential read / write risks. If neither of the above conditions is met, i.e., the error rate is less than or equal to 0.5% and the precise offset is less than or equal to 0.1V, it is judged as low risk. Through regression testing on tens of thousands of sets of complex operating data, this classification logic eliminates blind spots and ensures that all operating states have corresponding risk labels. For example, a precision threshold offset of 0.15V is considered a medium offset, but an error rate of 0.2% is considered a low error rate. Based on the principle of prioritizing the highest risk, the device classifies this operating condition as medium risk because the offset triggers the activation condition, thus obtaining the risk assessment result.

[0116] Next, the threshold offset patterns (slow, medium, or fast offset) corresponding to the temperature segment interval determined by clustering in step S103 are retrieved. Combined with the risk assessment results, a set of reading thresholds is generated. An adaptive step search algorithm is used, determining the total search bandwidth (adjustment amplitude) based on the risk level and the search precision (step size) based on the threshold offset pattern. The adjustment amplitude is set as follows: low risk corresponds to ±0.01V, medium risk to ±0.02V, and high risk to ±0.03V. This amplitude is set based on the statistical distribution range of effective thresholds under different risks, ensuring coverage of over 95% of the optimal reading points. The step size is set as follows: slow offset mode corresponds to a step size of 0.005V, primarily for high-precision fine-tuning; medium offset mode corresponds to a step size of 0.01V; and fast offset mode corresponds to a step size of 0.015V, primarily for rapidly tracking changing trends. Finally, based on the determined center reference voltage, adjustment amplitude, and step size, a candidate threshold set is constructed using an arithmetic sequence generation algorithm. The mathematical expression is a set... And satisfy ,in The corrected reading threshold obtained in step S106 R is the step size, and R is the adjustment range. Integer indices are used. The device iterates through and calculates all conditions that satisfy the criteria. The values ​​are calculated, and duplicates and boundary checks are performed to generate the final set of reading thresholds. This generation method ensures that the threshold points are evenly distributed within the feasible region, avoiding the blindness of random point selection. For example, if the risk assessment result is medium risk, the corresponding adjustment magnitude R is 0.02V; if the threshold offset mode is medium threshold offset mode, the corresponding step size is... 0.01V; center reference voltage It is 1.296V. ​​Calculated according to the formula, The values ​​are -2, -1, 0, 1, and 2, and the generated candidate thresholds are 1.276V, 1.286V, 1.296V, 1.306V, and 1.316V, respectively. These five values ​​are integrated to form a set of reading thresholds.

[0117] In step S108, the flash memory cells are batch read and verified according to the set of read thresholds. Read thresholds with read error rates lower than a preset error rate threshold are filtered and integrated to obtain an optimized threshold configuration, including:

[0118] Batch read tests were performed on the flash memory cells using each threshold in the set of read thresholds, and the read error rate corresponding to each threshold was statistically analyzed.

[0119] The read error rate is compared with a preset error rate threshold, and a suitable read threshold is obtained by filtering.

[0120] By integrating the required reading thresholds, an optimized threshold configuration is obtained.

[0121] It should be noted that, firstly, when performing batch read tests on flash memory cells using the various thresholds in the read threshold set, a parallel batch read test technique is employed. This technique can simultaneously execute read operations corresponding to multiple thresholds, covering all logical blocks and physical pages of the flash memory cell, ensuring the comprehensiveness of the test data. Each threshold corresponds to 1000 consecutive read operations, and the number of errors in each read is counted. The error rate is calculated as the proportion of erroneous reads to the total number of reads. Verified through testing on multiple flash memory devices, this test method accurately reflects the actual read performance of each threshold, and its testing efficiency is more than 3 times higher than that of serial testing. The test results show good consistency under high and low temperature environments. For example, the read threshold set includes five thresholds: 1.276V, 1.286V, 1.296V, 1.306V, and 1.316V. Each threshold is used to test 10 reads of each of the 100 physical pages of the flash memory cell. The resulting error rates for each threshold are 0.12%, 0.09%, 0.07%, 0.11%, and 0.15%, respectively.

[0122] Next, when comparing each error rate with a preset error rate threshold, the preset error rate threshold is set based on the upper limit of the error correction capability of the built-in LDPC error correction engine in the flash memory controller, with an initial threshold of 0.3%. This value was determined through joint simulation testing of bit error rate and error correction success rate. When the error rate is below 0.3%, the error correction engine can successfully recover data with a probability of 99.99%. During the comparison process, a value-by-value comparison algorithm is used. If there are candidate thresholds with a read error rate lower than the preset error rate threshold, they are directly included in the set of acceptable thresholds. For example, if the preset error rate threshold is 0.3%, and the error rates of the above five thresholds are all lower than this threshold, they are all selected as acceptable thresholds. In the special case where the read error rate of all candidate thresholds is higher than the preset error rate threshold, the device automatically triggers a minimum error rate backoff mechanism. This mechanism no longer performs hard threshold filtering, but instead sorts the read error rates corresponding to all candidate thresholds in the read threshold set numerically, forcibly selecting one or more candidate thresholds with the smallest read error rate as acceptable read thresholds, and simultaneously generating a low reliability warning label. This processing logic is based on the soft-decision error correction principle. That is, when the ideal low bit error rate requirement cannot be met, the lowest possible original bit error rate is prioritized to maximize the likelihood of the error correction engine working and prevent direct failure of the read operation. For example, if the preset error rate threshold is 0.3%, but the measured error rates of the five candidate thresholds are 0.35%, 0.42%, 0.32%, 0.55%, and 0.45%, respectively, all exceeding the threshold, the device triggers a backoff mechanism. After sorting, the threshold corresponding to the lowest error rate of 0.32% is selected as the final result, and it is marked as requiring the activation of strong error correction mode.

[0123] When integrating compliant read thresholds to obtain an optimized threshold configuration, the threshold values ​​are sorted in ascending order, and the error rate and suitable temperature range for each threshold are labeled, forming a structured optimized threshold configuration. This integration method is designed for ease of use in subsequent practical applications, allowing the flash memory controller to quickly select the optimal threshold based on real-time temperature and load. Multiple practical applications have verified that the integrated configuration can improve the controller's threshold switching efficiency by more than 40% and effectively reduce read errors caused by improper threshold selection. For example, the selected thresholds of 1.276V (0.12%), 1.286V (0.09%), 1.296V (0.07%), 1.306V (0.11%), and 1.316V (0.15%) are sorted by value and labeled with a suitable temperature range of 20-30℃ to form an optimized threshold configuration.

[0124] In summary, this invention discloses a method for adjusting the read threshold of NAND flash memory based on temperature compensation, comprising: collecting real-time temperature data and corresponding read threshold data of the flash memory device; extracting time series features after aligning by timestamps to obtain an initial associated dataset; dividing the initial associated dataset into temperature segments according to a fixed time window, and calculating the temperature change rate and read threshold change amplitude of each temperature segment interval; based on the temperature change rate and the change amplitude, dividing different threshold offset patterns by clustering, and associating the threshold offset patterns corresponding to each temperature segment interval before structured storage to obtain an associated dataset; extracting the correspondence between the temperature segment interval and the threshold offset pattern from the associated dataset, and simultaneously calculating the error rate index of each temperature segment interval, and associating the corresponding temperature segment interval with the threshold offset pattern. Based on the relationship with the error rate index, a threshold offset prediction model is obtained. The fluctuation amplitude of the current temperature sequence is monitored in real time. If the fluctuation amplitude exceeds a preset fluctuation amplitude threshold, the fluctuation amplitude is input into the prediction model to predict the corresponding threshold offset. Combined with the initial read threshold of the flash memory controller and pre-acquired historical correction data, matching correction parameters are calculated. The initial read threshold is corrected according to the correction parameters to obtain an updated read standard. An assessment result of data loss risk is generated based on the read standard and the error rate index. This assessment result is then integrated with the adaptation requirements of the threshold offset mode to generate a read threshold set. Batch read verification of flash memory cells is performed based on the read threshold set. Read thresholds with read error rates lower than the preset error rate threshold are selected and integrated to obtain an optimized threshold configuration. This method can achieve dynamic and precise adjustment of NAND flash memory read thresholds under temperature fluctuations, meeting the high reliability requirements of storage devices in complex environments.

[0125] This invention enables dynamic and precise adjustment of the NAND flash memory read threshold under temperature fluctuations.

[0126] Reference Figure 2 The second embodiment of the present invention provides a temperature-compensated NAND flash memory read threshold adjustment device, comprising:

[0127] The data acquisition module is used to collect real-time temperature data and corresponding read threshold data of the flash memory device, extract time series features after aligning by timestamp, and obtain the initial associated dataset.

[0128] The segmented calculation module is used to segment the initial associated dataset into temperature segments according to a fixed time window, and calculate the temperature change rate and the change range of the reading threshold for each temperature segment interval.

[0129] The pattern correspondence module is used to divide different threshold offset patterns by clustering according to the temperature change rate and the change amplitude, and then associate the threshold offset patterns corresponding to each temperature segment interval and store them in a structured manner to obtain an associated dataset.

[0130] The model building module is used to extract the correspondence between the temperature segment intervals and the threshold offset pattern from the associated dataset, calculate the error rate index of each temperature segment interval, associate the correspondence with the error rate index, and obtain the prediction model of the threshold offset.

[0131] The parameter calculation module is used to monitor the fluctuation range of the current temperature sequence in real time. If the fluctuation range exceeds the preset fluctuation range threshold, the fluctuation range is input into the prediction model to predict the corresponding threshold offset. Combined with the initial read threshold of the flash controller and the pre-acquired historical correction data, the matching correction parameters are calculated.

[0132] The threshold update module is used to correct the initial reading threshold according to the correction parameters to obtain the updated reading standard;

[0133] The threshold set generation module is used to generate an assessment result of data loss risk based on the reading standard and the error rate indicator, and then integrate the assessment result with the adaptation requirements of the threshold offset mode to generate a reading threshold set.

[0134] The configuration optimization module is used to perform batch read verification of flash memory cells according to the set of read thresholds, filter read thresholds with read error rates lower than the preset error rate threshold and integrate them to obtain the optimized threshold configuration.

[0135] It should be noted that the temperature-compensated NAND flash memory read threshold adjustment device provided in this embodiment of the invention is used to execute all the process steps of the temperature-compensated NAND flash memory read threshold adjustment method in the above embodiment. The working principle and beneficial effects of the two are one-to-one, so they will not be described again.

[0136] This invention also provides an electronic device. The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a configuration optimization program. When the processor executes the computer program, it implements the steps in the various temperature-compensated NAND flash memory read threshold adjustment method embodiments described above, for example... Figure 1 The step S101 shown. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above-described device embodiments, such as the verification and screening module.

[0137] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.

[0138] The electronic device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. It may include more or fewer components than described above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.

[0139] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.

[0140] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating device and applications required for at least one function (such as sound playback function, image playback function, etc.). The data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory and non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0141] Wherein, if the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0142] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0143] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A temperature-compensation-based NAND flash read threshold adjustment method, characterized in that, include: Collect real-time temperature data and corresponding read threshold data of flash memory devices, align them by timestamps, extract time series features, and obtain the initial associated dataset; The initial associated dataset is segmented by temperature according to a fixed time window, and the rate of temperature change and the magnitude of change of the reading threshold are calculated for each temperature segment interval. Based on the temperature change rate and the change amplitude, different threshold offset patterns are divided by clustering, and the threshold offset patterns corresponding to each temperature segment interval are associated and then stored in a structured manner to obtain an associated dataset; The correspondence between the temperature segment intervals and the threshold offset pattern is extracted from the associated dataset. At the same time, the error rate index of each temperature segment interval is calculated. The correspondence is associated with the error rate index to obtain the prediction model of the threshold offset. The fluctuation amplitude of the current temperature sequence is monitored in real time. If the fluctuation amplitude exceeds the preset fluctuation amplitude threshold, the fluctuation amplitude is input into the prediction model to predict the corresponding threshold offset. Combined with the initial read threshold of the flash controller and the pre-acquired historical correction data, the matching correction parameters are calculated. The initial reading threshold is corrected based on the correction parameters to obtain the updated reading standard; Based on the reading standard and the error rate indicator, an assessment result of the data loss risk is generated, and then the assessment result is integrated with the adaptation requirements of the threshold offset mode to generate a set of reading thresholds; The flash memory cells are batch read and verified according to the set of read thresholds. Read thresholds with read error rates lower than the preset error rate threshold are selected and integrated to obtain an optimized threshold configuration.

2. The NAND flash memory read threshold adjustment method based on temperature compensation according to claim 1, characterized in that, The real-time temperature data and corresponding read threshold data of the acquired flash memory device are aligned by timestamps, and time-series features are extracted to obtain an initial associated dataset, including: Real-time temperature data inside the flash memory device is collected, and the corresponding read threshold data is recorded synchronously. The real-time temperature data and the reading threshold data are aligned according to the timestamps to obtain time-aligned data; The time-series features are extracted from the time-aligned data and integrated to obtain the initial associated dataset.

3. The method for adjusting the NAND flash memory read threshold based on temperature compensation according to claim 1, characterized in that, The step of segmenting the initial associated dataset into temperature segments according to a fixed time window and calculating the temperature change rate and the change magnitude of the reading threshold for each temperature segment interval includes: The temperature sequence in the initial associated dataset is split according to a fixed time window to obtain multiple temperature segment intervals; Calculate the rate of temperature change within each temperature segment interval, and simultaneously calculate the change amplitude of the reading threshold for the corresponding interval.

4. The method for adjusting the NAND flash memory read threshold based on temperature compensation according to claim 1, characterized in that, The process involves clustering different threshold offset patterns based on the temperature change rate and the change amplitude, associating the threshold offset patterns corresponding to each temperature segment interval, and then storing the association data in a structured manner to obtain an associated dataset, including: Based on the temperature change rate and the change magnitude, different threshold offset patterns are divided by clustering. The temperature segmentation intervals are associated with the corresponding threshold offset patterns to form pattern association data; The pattern-related data is structured and stored to obtain the associated dataset.

5. The NAND flash memory read threshold adjustment method based on temperature compensation according to claim 1, characterized in that, The step of extracting the correspondence between the temperature segment intervals and the threshold offset pattern from the associated dataset, calculating the error rate index for each temperature segment interval, and associating the correspondence with the error rate index to obtain a prediction model for the threshold offset includes: Extract the correspondence between each temperature segment interval and the threshold offset pattern in the associated dataset; Retrieve historical read error records for each of the pre-acquired temperature segment intervals corresponding to the time period, calculate the percentage of erroneous reads in the total number of reads, and obtain the error rate index; By associating the correspondence with the error rate index, and fitting the correspondence between the temperature segmentation interval, the threshold offset pattern, and the erroneous reading, a prediction model for the threshold offset is obtained.

6. The method for adjusting the NAND flash memory read threshold based on temperature compensation according to claim 1, characterized in that, The system monitors the fluctuation amplitude of the current temperature sequence in real time. If the fluctuation amplitude exceeds a preset fluctuation amplitude threshold, the fluctuation amplitude is input into the prediction model to predict the corresponding threshold offset. Combined with the initial read threshold of the flash memory controller and pre-acquired historical correction data, matching correction parameters are calculated, including: Real-time monitoring of the current temperature sequence, and calculation of fluctuation amplitude within a fixed window; The fluctuation amplitude is compared with a preset fluctuation judgment threshold. If it exceeds the threshold, the fluctuation amplitude is input into the prediction model and the corresponding threshold offset is output. The initial read threshold of the flash memory controller and the previously acquired historical correction data are retrieved, and the matching correction parameters are calculated by combining the threshold offset.

7. The method for adjusting the NAND flash memory read threshold based on temperature compensation according to claim 1, characterized in that, The step of correcting the initial reading threshold according to the correction parameter to obtain the updated reading standard includes: Determine the preset initial read threshold of the flash memory controller, and use the correction parameters to perform a correction operation on the initial read threshold to obtain the corrected read threshold; The revised reading threshold is used as the updated reading standard.

8. The method for adjusting the NAND flash memory read threshold based on temperature compensation according to claim 1, characterized in that, The process involves generating an assessment result of data loss risk based on the reading criteria and the error rate indicator, and then integrating the assessment result with the adaptation requirements of the threshold offset mode to generate a set of reading thresholds, including: Based on the reading criteria and the error rate index, data loss risk levels are divided according to preset risk level thresholds, which serve as the risk assessment results. Based on the evaluation results, the adjustment range of the reading standard is determined. Combining the characteristics of the threshold offset mode, multiple candidate thresholds are selected within the adjustment range, and all candidate thresholds are integrated to generate a set of reading thresholds.

9. The NAND flash memory read threshold adjustment method based on temperature compensation according to claim 1, characterized in that, The step of performing batch read verification on flash memory cells based on the set of read thresholds, filtering read thresholds with read error rates lower than a preset error rate threshold, and integrating them to obtain an optimized threshold configuration includes: Batch read tests were performed on the flash memory cells using each threshold in the set of read thresholds, and the read error rate corresponding to each threshold was statistically analyzed. The read error rate is compared with a preset error rate threshold, and a suitable read threshold is obtained by filtering. By integrating the required reading thresholds, an optimized threshold configuration is obtained.

10. A temperature-compensated NAND flash memory read threshold adjustment device, characterized in that, include: The data acquisition module is used to collect real-time temperature data and corresponding read threshold data of the flash memory device, extract time series features after aligning by timestamp, and obtain the initial associated dataset. The segmented calculation module is used to segment the initial associated dataset into temperature segments according to a fixed time window, and calculate the temperature change rate and the change range of the reading threshold for each temperature segment interval. The pattern correspondence module is used to divide different threshold offset patterns by clustering according to the temperature change rate and the change amplitude, and then associate the threshold offset patterns corresponding to each temperature segment interval and store them in a structured manner to obtain an associated dataset. The model building module is used to extract the correspondence between the temperature segment intervals and the threshold offset pattern from the associated dataset, calculate the error rate index of each temperature segment interval, associate the correspondence with the error rate index, and obtain the prediction model of the threshold offset. The parameter calculation module is used to monitor the fluctuation range of the current temperature sequence in real time. If the fluctuation range exceeds the preset fluctuation range threshold, the fluctuation range is input into the prediction model to predict the corresponding threshold offset. Combined with the initial read threshold of the flash controller and the pre-acquired historical correction data, the matching correction parameters are calculated. The threshold update module is used to correct the initial reading threshold according to the correction parameters to obtain the updated reading standard; The threshold set generation module is used to generate an assessment result of data loss risk based on the reading standard and the error rate indicator, and then integrate the assessment result with the adaptation requirements of the threshold offset mode to generate a reading threshold set. The configuration optimization module is used to perform batch read verification of flash memory cells according to the set of read thresholds, filter read thresholds with read error rates lower than the preset error rate threshold and integrate them to obtain the optimized threshold configuration.

Citation Information

Patent Citations

  • NAND FLASH life prediction and management method and related equipment

    CN119473169A

  • Solid state disk data reading method and system, storage medium and program product

    CN119536657A