A data processing method and apparatus
By using environment- and operating mode-dependent offset voltage adjustment in NAND flash memory, the problem of slow data reading caused by threshold voltage offset after high-temperature power loss was solved, thereby improving read speed and device reliability.
Patent Information
- Application Number
- CN202411194785.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-08-28
AI Technical Summary
After prolonged high-temperature power loss, the threshold voltage deviation of NAND flash memory causes slow data read speed, which may trigger NVMe command timeout and lead to blue screen crashes, especially during OOBE.
By obtaining the target instruction, the target data page is read according to the first threshold voltage. If the reading fails, the first offset voltage is obtained from the first data table. The data page is reread based on the offset voltage and the threshold voltage. The order of the offset voltages in the data table is related to the device's usage environment, duration, and operating mode.
It improves the accuracy and stability of data reading, reduces reading errors, optimizes the performance and reliability of electronic devices, and reduces reading time.
Smart Images

Figure CN119356596B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of storage technology, and in particular to a data processing method and apparatus. Background Art
[0002] Solid-state drives (SSDs) are non-volatile memory (NAND) used to store data.
[0003] After prolonged storage under high temperatures and power outages, electrons stored in the NAND flash memory can be lost, causing a significant shift in the threshold voltage (Vth) for data retrieval. This can result in either delayed data retrieval or excessively slow retrieval speeds. Upon powering on, this may lead to prolonged startup times or a Blue Screen of Death (BSoD) error in Windows due to NVMe (Non-Volatile Memory Express) command timeouts. This is particularly noticeable during the user's first use of the device (Out-of-Box Experience).
[0004] Specifically, high temperatures may cause data retention issues in SSDs. During the OOBE process, there are a large number of read operations, which may require multiple read retries due to threshold voltage (Vth) offset. This can slow down data reading speed, cause NVMe command timeouts, and ultimately lead to a blue screen crash. Summary of the Invention
[0005] This disclosure provides a data processing method, apparatus, electronic device, and storage medium to at least solve the above-mentioned technical problems existing in the prior art.
[0006] According to a first aspect of this disclosure, a data processing method is provided, comprising:
[0007] Obtain the target instruction; the target instruction is used to read the target data page in the target flash memory;
[0008] In response to the target instruction, the target data page is read according to the first threshold voltage;
[0009] If the read fails, a first offset voltage is obtained from a first data table; the first data table includes multiple offset voltages with a variable traversal order, the first offset voltage being the voltage of the first traversal, the traversal order being related to the target parameters of the electronic device; the target parameters characterize the usage environment, usage duration, and / or operating mode of the electronic device.
[0010] The target data page is reread based on the first offset voltage and the first threshold voltage.
[0011] According to a second aspect of this disclosure, a data processing apparatus is provided, the apparatus comprising:
[0012] The acquisition module is used to acquire target instructions; the target instructions are used to read target data pages from target flash memory.
[0013] The first reading module is used to respond to the target instruction and read the target data page according to the first threshold voltage.
[0014] The second reading module is used to obtain a first offset voltage from a first data table if the reading fails; the first data table includes multiple offset voltages with a variable traversal order, the first offset voltage being the voltage of the first traversal, and the traversal order being related to the target parameters of the electronic device; the target parameters characterize the usage environment, usage duration, and / or operating mode of the electronic device.
[0015] The target data page is reread based on the first offset voltage and the first threshold voltage.
[0016] According to a third aspect of this disclosure, an electronic device is provided, comprising:
[0017] At least one processor; and
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the methods described in this disclosure.
[0020] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the methods described in this disclosure. Attached Figure Description
[0021] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings, in which several embodiments of the present disclosure are shown by way of example and not limitation, wherein:
[0022] In the drawings, the same or corresponding reference numerals denote the same or corresponding parts.
[0023] Figure 1 A flowchart illustrating a data processing method provided in an embodiment of this disclosure is shown.
[0024] Figure 2 A flowchart illustrating a data processing method provided in an embodiment of this disclosure is shown.
[0025] Figure 3 A schematic diagram of the structure of a data processing apparatus provided in an embodiment of this disclosure is shown;
[0026] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure is shown. Detailed Implementation
[0027] To make the purposes, features, and advantages of the present disclosure more apparent and understandable, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present disclosure without creative work shall fall within the scope of protection of the present disclosure.
[0028] Figure 1 A flowchart illustrating a data processing method provided in an embodiment of this disclosure is shown; as follows: Figure 1 As shown, the data processing methods include:
[0029] Step 101: Obtain the target instruction; the target instruction is used to read the target data page in the target flash memory;
[0030] Step 102: In response to the target instruction, read the target data page according to the first threshold voltage;
[0031] Step 103: If the read fails, obtain the first offset voltage from the first data table; the first data table includes multiple offset voltages with variable traversal order, the first offset voltage is the voltage of the first traversal, and the traversal order is related to the target parameters of the electronic device; the target parameters characterize the usage environment, usage duration and / or operating mode of the electronic device.
[0032] Step 104: Reread the target data page based on the first offset voltage and the first threshold voltage.
[0033] In some embodiments, the method can be applied to any electronic device with target flash memory, such as mobile phones, smartphones, laptops, computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (PADs), portable multimedia players (PMPs), wearable devices (such as smart bracelets, smartwatches, etc.), navigation devices, etc.
[0034] Within the target flash memory, data can be written and read in units of data pages; that is, data is read in units of data pages. Multiple data pages (e.g., hundreds to thousands) form a data block. Multiple data blocks form a plan, multiple plans form a die, and multiple dies can be combined to form a flash memory, such as on a solid-state drive (SSD) or flash memory card.
[0035] A single target command can be used to read multiple data sets, and each set of data to be read can be distributed across different data pages, different data blocks, different faces, or even different chips.
[0036] When a threshold voltage (Vth) offset occurs, a reread (also known as a read retry) can be used to try reading the data with different read voltages. Specifically, different read voltages can be obtained from the offset voltages and threshold voltages in the first data table.
[0037] The first data table provides various offset voltages. During read retry, each offset voltage needs to be tried sequentially based on the traversal order. This traversal order is related to the target parameters of the electronic device, which characterize the electronic device's operating environment, usage duration, and / or operating mode. The value of each offset voltage can be any value from a few mV to several hundred mV. There are no limitations on the value of the offset voltage or the number of offset voltages in the first data table.
[0038] The usage environment refers to the physical environmental conditions in which the electronic device is located. For example, the electronic device operates in a high-temperature or low-temperature environment, or is used in a high-humidity environment.
[0039] Usage duration refers to the cumulative operating time of an electronic device. For example, if an electronic device has been running for several months or years, this may affect the durability of flash memory and its data retention capabilities.
[0040] Operating mode refers to how an electronic device is used or how frequently it is operated. For example, frequent data read / write operations, high-load tasks, or continuous high-intensity operations may affect the performance of flash memory.
[0041] Different traversal orders can cover different application scenarios, such as read disturbance, programming disturbance, high temperature data retention, and low temperature data retention.
[0042] Rereading the target data page based on the first offset voltage and the first threshold voltage may result in two outcomes: successful rereading of the target data page based on the first offset voltage and the first threshold voltage, or failure to reread the target data page based on the first offset voltage and the first threshold voltage. If the rereading fails, the next offset voltage can be determined based on the traversal order, and the target data page can be reread based on the next offset voltage and the first threshold voltage, and so on, until the target data page is successfully reread using a certain offset voltage and the first threshold voltage.
[0043] Thus, using the first data table for read retry can effectively improve the accuracy and stability of data reading and reduce read errors. Furthermore, considering that the electrical characteristics of electronic devices may vary under different conditions (such as different usage environments, different operating modes, and different usage durations), the offset voltage in the first data table is adjusted according to these factors. By retrying these offset voltages, different usage environments, operating modes, and / or usage durations can be adapted to, thereby increasing the probability of successful reads, reducing read time, and ultimately optimizing the performance and reliability of electronic devices.
[0044] In some embodiments, if the read fails, the method further includes:
[0045] Identify at least one first data page in the target flash memory that has the first threshold voltage;
[0046] Based on the first threshold voltage and the offset voltage in the first data table, each of the at least one first data pages is reread, and a second offset voltage corresponding to each first data page is determined. The second offset voltage is the offset voltage used when the first data page is successfully reread.
[0047] The first data table is updated based on the second offset voltage corresponding to each of the first data pages.
[0048] Here, considering that data pages with the same threshold voltage may have the same characteristics and need to use the same offset voltage, a threshold voltage for data pages that fail to be read is proposed, and read retry is performed on data pages with the same threshold voltage so as to update the first data table based on the statistical results.
[0049] Specifically, the target data page is reread based on the first offset voltage and the first threshold voltage. If the reread is successful, the first offset voltage is determined to be the offset voltage used when the target data page is successfully reread, i.e., the second offset voltage. If the reread fails, the target data page is reread based on the traversal order using the next offset voltage and the first threshold voltage, and so on, until the reread is successful. When the reread is successful, the offset voltage used when the reread is successful is determined as the second offset voltage.
[0050] Similar to the target data page rereading process, for each first data page, a rereading is performed based on the first threshold voltage and the offset voltages in the first data table to determine the second offset voltage corresponding to each first data page. Therefore, based on the second offset voltage corresponding to each data page with the first threshold voltage in the target flash memory, the first data table is updated so that subsequent reads of data pages with the first threshold voltage can be performed using the updated first data table, improving the probability of successful reads, reducing read time, and mitigating the risk of read disturb.
[0051] Here, to improve the efficiency of updating the first data table, only a portion of the first data pages can be reread, and the first data table can be updated based on the results of the reread. Based on this, in some embodiments, the method further includes:
[0052] Select a first number of first data pages from the at least one first data page;
[0053] Accordingly, the step of rereading each of the at least one first data page based on the first threshold voltage and the offset voltage in the first data table includes:
[0054] Based on the first threshold voltage and the offset voltage in the first data table, each of the first data pages in the first number of first data pages is reread.
[0055] Here, the specific value of the first quantity can be set according to the design requirements of the electronic device, and there is no limitation on the value.
[0056] In some embodiments, updating the first data table according to the second offset voltage corresponding to each first data page includes:
[0057] A third offset voltage is determined based on the second offset voltage corresponding to each of the first data pages, wherein the third offset voltage is the second offset voltage whose occurrence count satisfies the first condition;
[0058] Update the traversal order of the third offset voltage in the first data table to the first one;
[0059] The method further includes:
[0060] Read other data pages corresponding to the first threshold voltage based on the first threshold voltage and the third offset voltage.
[0061] Here, the first condition for the number of times can be that the number of times exceeds a certain threshold. The threshold can be set based on actual needs, such as 10 or 20, and there is no limit to the value.
[0062] Here, updating the first data table based on the second offset voltage corresponding to each of the first data pages can be done by updating the traversal order of the offset voltages.
[0063] For example, the first data table has offset voltage 1, offset voltage 2, offset voltage 3, and offset voltage 4. The traversal order is from front to back. If it is determined that offset voltage 3 has the highest number of successful rereads, the traversal order in the first data table can be updated to: offset voltage 3, offset voltage 1, offset voltage 2, and offset voltage 4.
[0064] Of course, if the offset voltages are ranked from highest to lowest based on the number of successful rereads, then the first data table can be updated by updating the traversal order of the above four offset voltages as: offset voltage 3, offset voltage 2, offset voltage 4, offset voltage 1.
[0065] After updating the traversal order, when rereading data pages with the first threshold voltage, the reading can be performed according to the new traversal order. For example, other data pages corresponding to the first threshold voltage can be read based on the first threshold voltage and the third offset voltage (such as offset voltage 3).
[0066] In this way, in subsequent data reading, there is no need to perform multiple read retries. The reading action can be completed in one go, greatly reducing the number of read retries, saving reading time, and improving performance.
[0067] In some embodiments, the first data table includes: at least one combination of offset voltages corresponding to a scenario, wherein the scenario is related to the target parameter;
[0068] The method further includes:
[0069] Based on the data page reread records, the offset voltage combination corresponding to the target scenario is determined; the data page reread records include: the offset voltage used when multiple data pages are reread; the offset voltage combination corresponding to the target scenario includes: the second threshold voltage whose occurrence count satisfies the second condition and the offset voltage corresponding to each second threshold voltage;
[0070] The first data table is updated based on the offset voltage combination corresponding to the target scenario.
[0071] Here, the number of times can satisfy the second condition if the number of times is greater than a certain threshold. The threshold can be set based on actual needs, such as 10 or 20, and there is no limit to the value.
[0072] Here, the first data table includes multiple scenarios, each corresponding to different target parameters. Based on multiple reread records, the most frequent combinations of scenarios where data retention occurs can be identified, allowing the offset voltages of these scenario combinations to be traversed first during rereads. Data retention refers to the storage medium's ability to retain data when there is no power supply or during long-term storage. Poor data retention can lead to data instability, resulting in more errors during reads and necessitating read retries to recover the data.
[0073] Here, by identifying the frequently occurring offset voltage combinations and updating them in the first data table, subsequent data pages with the same threshold voltage (such as the second threshold voltage) do not require multiple read retries, allowing for rapid completion of the read operation, saving read time, and improving performance.
[0074] The following is an example of a first data table.
[0075] Scenario 1 (High Temperature) Vth1 Offset voltage 1 Offset voltage 2 Vth2 Offset voltage 3 Offset voltage 4 Scenario 2 (Used for 1 year) Vth1 Offset voltage 5 Offset voltage 6 Vth2 Offset voltage 7 Offset voltage 8 Scenario 3 (Used for 2 years) Vth1 Offset voltage 9 Offset voltage 10 Vth2 Offset voltage 11
[0076] Table 1
[0077] In Table 1, Vth represents the threshold voltage, and each threshold voltage can correspond to multiple offset voltages. The table provides various scenarios, such as high-temperature scenarios, long-term use (1 year) scenarios, and long-term use (2 years) scenarios. The offset voltage used for the same threshold voltage can be different in different scenarios.
[0078] In some embodiments, determining the offset voltage combination corresponding to the target scene based on the data page reread record includes:
[0079] The target model is used to identify the reread records of the data page and determine the offset voltage combination corresponding to the target scene.
[0080] Here, a preset target model can be used for learning to determine the offset voltage combination for new scenarios.
[0081] Data page reread records may include: a threshold voltage, a first offset voltage, a second offset voltage, etc., of at least one reread data page.
[0082] The target model is used to identify and classify reread records in data pages to determine the offset voltage combinations for different scenarios. It can be any existing model or pre-trained model that achieves the aforementioned functionality; no specific limitations are imposed here. For example, a method for training the target model is provided, which involves collecting a large amount of reread record data, including multiple threshold voltages and their respective offset voltages, and selecting a suitable machine learning algorithm (such as support vector machines, neural networks, etc.) for training, enabling it to identify and predict offset voltage combinations under different scenarios.
[0083] In some embodiments, the method further includes:
[0084] Based on the data page reread record, at least one risky data page is identified; the second offset voltage of the risky data page exceeds a threshold.
[0085] Within the target time period, data migration is performed on at least one risk data page; and / or,
[0086] Based on the at least one risk data page, at least one first data block is determined, the first data block comprising more than a second number of risk data pages; data migration is performed on each first data block within a target time period; the target time period is a device idle time period or a specified time period.
[0087] Here, considering that updating the first data table may lead to data pages with high write risk (the risk of errors occurring when writing or reading data pages), such as error bits (data bits or bits affected when errors occur in memory or communication) or data pages with large threshold voltage offsets, they can be read quickly without read retry. However, these data pages may actually pose a risk. To avoid this risk, data migration can be performed on data pages with second offset voltages exceeding the threshold.
[0088] Additionally, data blocks may pose a risk if they contain a number of data pages with high offset voltages; therefore, data migration can also be performed on these data blocks.
[0089] Here, the target time period is either the device's idle time period or a specified time period, which can be specified by the user. During the target time period, the data is moved to a new data page or data block in the background garbage collection (BG GC).
[0090] In some embodiments, the method further includes:
[0091] Based on the data page reread record, at least one second data page is determined; the second data page is a data page that failed to be reread but was successfully decoded by software; or, a data page that failed to be reread, failed to be decoded by software, but was successfully recovered by data.
[0092] Data migration is performed on at least one second data page; and / or,
[0093] Based on the at least one second data page, at least one second data block is determined, the second data block comprising more than a third number of second data pages; data migration is performed on each second data block.
[0094] Here, "retry read" means attempting to read the data page again using the threshold voltage and offset voltage after the initial read failure. If the retry read fails, software decoding can be attempted.
[0095] Software decoding refers to performing error correction decoding on the read data to recover the original data. If successful, the data can be read; if it fails, further attempts can be made to recover the data.
[0096] Data recovery can be achieved using RAID (Redundant Array of Independent Disks) technology. If data recovery is successful, the data can be read. The recovery mechanism in RAID technology can repair data loss or corruption.
[0097] The aforementioned re-reading, software decoding, and data recovery all serve the same purpose: to improve the reliability and success rate of data reading.
[0098] Here, data that requires software decoding or data recovery to be successfully read is considered to have a high risk and low reading efficiency. In order to improve the reading efficiency of this data in the future, this data can be migrated.
[0099] In addition, for data blocks, if they have a certain number of second data pages, the other data pages they contain may also have the same problem. Therefore, data migration can also be performed on these data blocks.
[0100] If data page rereading fails, software decoding fails, and data recovery fails, it indicates that the data page is corrupted, and it can be marked as a bad data page. Based on this, in some embodiments, the method further includes:
[0101] Based on the data page reread record, at least one third data page is identified; the third data page is a data page that failed to be reread, failed to be soft decoded, and failed to recover data.
[0102] Mark the at least one third data page as a bad data page; and / or,
[0103] Based on the at least one third data page, at least one third data block is determined, the third data block comprising more than a fourth number of third data pages; each of the third data blocks is marked as a bad data block.
[0104] It should be noted that the first, second, third, and fourth quantities mentioned above can be set based on the actual design and requirements of the electronic product, and there are no restrictions on their values.
[0105] For example, the first quantity can be: 10, 20, etc.;
[0106] The second quantity can be: 5, 10, etc.;
[0107] The third quantity can be: 5, 10, etc.;
[0108] The fourth quantity can be: 1, 2, etc.
[0109] Figure 2 The diagram illustrates a flow chart of a data processing method provided in an embodiment of this disclosure; as shown. Figure 2 As shown, the data processing methods include:
[0110] Step 201: Obtain a read instruction, and in response to the read instruction, read at least one data page according to the threshold voltage; here, the target instruction is used to read at least one data page in the target flash memory;
[0111] Step 202: Determine whether the data page was read successfully. If it fails, proceed to step 203; if it succeeds, proceed to step 208.
[0112] Here, during data reading, the threshold voltage determines whether data can be read. If the threshold voltage shifts, it may lead to reading errors. In this case, hardware decoding of the data page can be performed. Hardware decoding is used to provide protection and correction when data errors caused by threshold voltage changes occur. If hardware decoding fails, a read retry can be attempted.
[0113] Here, each data page can be read sequentially, and the following steps can be performed depending on the specific situation.
[0114] Step 203: Perform a read retry on the data page and record the offset voltage used in the read retry;
[0115] Here, a first data table is provided, which includes: multiple offset voltages with a variable traversal order, the traversal order being related to the target parameters of the electronic device; the target parameters characterize the usage environment, usage duration, and / or operating mode of the electronic device.
[0116] Step 204: Determine if the retry was successful. If it failed, proceed to step 205. If it was successful, proceed to step 208.
[0117] Here, the read retry for the data page can be performed by selecting the offset voltage based on the traversal order of the first data table. If the first offset voltage fails, the next offset voltage is selected for read retry until the offset voltage used for successful reading is determined, and then proceed to step 208. Alternatively, if the read retry fails, proceed to step 205.
[0118] Step 205: Determine if software decoding was successful. If it failed, proceed to step 206. If it was successful, proceed to step 207.
[0119] Step 206: Determine if data recovery was successful. If it failed, mark the data page as a bad data page. If it was successful, proceed to step 207. RAID technology can be used for data recovery here.
[0120] Step 207: Migrate data to a new data page;
[0121] Step 208: Calculate the offset voltage used for successful read retry for each data page with the same threshold voltage;
[0122] Step 209: If the number of successful reads for a certain offset voltage (let’s say offset voltage A) exceeds a certain threshold, proceed to step 210; otherwise, return to step 202 to continue reading the next data page.
[0123] Step 210: Update the first data table;
[0124] Here, the traversal order of offset voltage A can be adjusted to be the first, so that subsequent data pages with the same threshold voltage can be directly read using the read voltage obtained from offset voltage A and the threshold voltage, thus improving read efficiency. If multiple offset voltages have a certain number of successful reads that meet a certain threshold, the traversal order can be adjusted sequentially from high to low based on the number of successful reads.
[0125] After updating the first data table, step 203 uses the updated first data table accordingly.
[0126] Step 211: Move the data to the new data page;
[0127] Here, at least one risky data page can be identified based on the data page reread record. The offset voltage used when the risky data page is successfully reread exceeds a certain voltage threshold. For the risky data page, data migration can be performed in BG GC within the target time period.
[0128] Of course, based on the at least one risk data page, at least one risk data block can also be determined, and the risk data block includes more than a second number of risk data pages; for the risk data block, data migration can also be performed in BG GC within a target time period; wherein, the target time period is a device idle time period or a specified time period.
[0129] This disclosure also provides a verification method. Verification shows that the method provided can quickly find the correct read voltage and promptly transfer data within the Risk data page, simultaneously improving performance and data security. The verification method may include: out-of-the-box (OOBE) user experience, boot time, and SSD full disk read time. Furthermore, it can evaluate the processing of pre-loaded OS images and hardcopy images, and analyze the read retry efficiency of different types of NAND flash memory (such as Single-Level Cell (SLC), Dual-Level Cell (DSLC), Triple-Level Cell (TLC), and Quad-Level Cell (QLC)).
[0130] Figure 3 A schematic diagram of the structure of a data processing apparatus provided in an embodiment of this disclosure is shown; as follows: Figure 3 As shown, the data processing device includes:
[0131] The acquisition module is used to acquire target instructions; the target instructions are used to read target data pages from target flash memory.
[0132] The first reading module is used to respond to the target instruction and read the target data page according to the first threshold voltage.
[0133] The second reading module is used to obtain a first offset voltage from a first data table if the reading fails; the first data table includes multiple offset voltages with a variable traversal order, the first offset voltage being the voltage of the first traversal, and the traversal order being related to the target parameters of the electronic device; the target parameters characterize the usage environment, usage duration, and / or operating mode of the electronic device.
[0134] The target data page is reread based on the first offset voltage and the first threshold voltage.
[0135] In some embodiments, the apparatus further includes: a first processing module; the first processing module is configured to determine, if a read fails, at least one first data page in the target flash memory having the first threshold voltage;
[0136] The second reading module is configured to reread each of the at least one first data pages based on the first threshold voltage and the offset voltage in the first data table, and determine the second offset voltage corresponding to each first data page, wherein the second offset voltage is the offset voltage used when the first data page is successfully reread;
[0137] The first processing module is configured to update the first data table based on the second offset voltage corresponding to each of the first data pages.
[0138] In some embodiments, the first processing module is configured to select a first number of first data pages from the at least one first data page;
[0139] The second reading module is configured to reread each of the first data pages in the first number of first data pages based on the first threshold voltage and the offset voltage in the first data table.
[0140] In some embodiments, the first processing module is configured to determine a third offset voltage based on a second offset voltage corresponding to each first data page, wherein the third offset voltage is a second offset voltage whose occurrence count satisfies a first condition;
[0141] Update the traversal order of the third offset voltage in the first data table to the first one;
[0142] The second reading module is further configured to read other data pages corresponding to the first threshold voltage based on the first threshold voltage and the third offset voltage.
[0143] In some embodiments, the first data table includes: at least one combination of offset voltages corresponding to a scenario, wherein the scenario is related to the target parameter;
[0144] The device further includes a second processing module, used to determine the offset voltage combination corresponding to the target scene based on the data page reread record; the data page reread record includes: the offset voltage used when multiple data pages are reread; the offset voltage combination corresponding to the target scene includes: a second threshold voltage whose occurrence count satisfies the second condition and the offset voltage corresponding to each second threshold voltage;
[0145] The first data table is updated based on the offset voltage combination corresponding to the target scenario.
[0146] In some embodiments, the second processing module is used to identify the data page reread records using the target model and determine the offset voltage combination corresponding to the target scene.
[0147] In some embodiments, the second processing module is configured to determine at least one risky data page based on the data page reread record; the second offset voltage of the risky data page exceeds a threshold.
[0148] Within the target time period, data migration is performed on at least one risk data page; and / or,
[0149] Based on the at least one risk data page, at least one first data block is determined, the first data block comprising more than a second number of risk data pages; data migration is performed on each first data block within a target time period; the target time period is a device idle time period or a specified time period.
[0150] In some embodiments, the second processing module is configured to determine at least one second data page based on the data page reread record; the second data page is a data page that failed to be reread but was successfully decoded by software; or, a data page that failed to be reread, failed to be decoded by software, but was successfully recovered by data.
[0151] Data migration is performed on at least one second data page; and / or,
[0152] Based on the at least one second data page, at least one second data block is determined, the second data block comprising more than a third number of second data pages; data migration is performed on each second data block.
[0153] In some embodiments, the second processing module is configured to determine at least one third data page based on the data page reread record; the third data page is a data page that failed to be reread, failed to be soft decoded, and failed to recover data.
[0154] Mark the at least one third data page as a bad data page; and / or,
[0155] Based on the at least one third data page, at least one third data block is determined, the third data block comprising more than a fourth number of third data pages; each of the third data blocks is marked as a bad data block.
[0156] It is understood that, when implementing the corresponding data processing method, the data processing apparatus provided in the above embodiments can allocate the processing to different program modules as needed to complete all or part of the processing described above. Furthermore, the apparatus and the corresponding method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0157] This disclosure provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are executed by a processor, which triggers the processor to execute the data processing method provided in this disclosure.
[0158] In some embodiments, the computer-readable storage medium may be a ferroelectric random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), flash memory, magnetic surface memory, optical disc, or CD-ROM, etc.; or it may be a device that includes one or any combination of the above-mentioned memories.
[0159] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, model, subroutine, or other unit suitable for use in a computing environment.
[0160] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.
[0161] This disclosure provides a computer program product, which includes a computer program / instruction. When the computer program / instruction is executed by a processor, it implements the data processing method described in this disclosure.
[0162] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Figure 4 As shown, the electronic device 40 includes: a processor 401 and a memory 402 for storing computer programs that can run on the processor; when the processor 401 runs the computer program, it executes the data processing method provided in the embodiments of this disclosure.
[0163] In practical applications, the electronic device 40 may further include at least one network interface 403. The various components of the electronic device 40 are coupled together via a bus system 404. It is understood that the bus system 404 is used to implement communication between these components. In addition to a data bus, the bus system 404 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 4Various buses are labeled as bus system 404. The number of processors 401 can be at least one. Network interface 403 is used for wired or wireless communication between electronic device 40 and other devices.
[0164] The memory 402 in this embodiment is used to store various types of data to support the operation of the electronic device 40.
[0165] The methods disclosed in the above embodiments of this disclosure can be applied to processor 401, or implemented by processor 401. Processor 401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 401 or by instructions in the form of software. The processor 401 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 401 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this disclosure can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory 402. Processor 401 reads the information in memory 402 and, in conjunction with its hardware, completes the steps of the aforementioned method.
[0166] In some embodiments, the electronic device 40 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned methods.
[0167] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0168] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise explicitly specified.
[0169] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A data processing method, comprising: Obtain the target instruction; The target instruction is used to read the target data page in the target flash memory; In response to the target instruction, the target data page is read according to the first threshold voltage; If the read fails, a first offset voltage is obtained from a first data table; the first data table includes multiple offset voltages with a variable traversal order, the first offset voltage being the voltage of the first traversal, the traversal order being related to the target parameters of the electronic device; The target parameters characterize the electronic device's usage environment, usage duration, and / or operating mode; The target data page is reread based on the first offset voltage and the first threshold voltage; The first data table includes: at least one combination of offset voltages corresponding to a scenario, wherein the scenario is related to the target parameter; The method further includes: Based on the data page reread records, the offset voltage combination corresponding to the target scenario is determined; the data page reread records include: the offset voltage used when multiple data pages are reread; the offset voltage combination corresponding to the target scenario includes: the second threshold voltage whose occurrence count satisfies the second condition and the offset voltage corresponding to each second threshold voltage; The first data table is updated based on the offset voltage combination corresponding to the target scenario.
2. The method according to claim 1, if the read fails, the method further includes: Identify at least one first data page in the target flash memory that has the first threshold voltage; Based on the first threshold voltage and the offset voltage in the first data table, each of the at least one first data pages is reread, and a second offset voltage corresponding to each first data page is determined. The second offset voltage is the offset voltage used when the first data page is successfully reread. The first data table is updated based on the second offset voltage corresponding to each of the first data pages.
3. The method according to claim 2, further comprising: Select a first number of first data pages from the at least one first data page; Accordingly, the step of rereading each of the at least one first data page based on the first threshold voltage and the offset voltage in the first data table includes: Based on the first threshold voltage and the offset voltage in the first data table, each of the first data pages in the first number of first data pages is reread.
4. The method according to claim 2, wherein updating the first data table according to the second offset voltage corresponding to each first data page comprises: A third offset voltage is determined based on the second offset voltage corresponding to each of the first data pages, wherein the third offset voltage is the second offset voltage whose occurrence count satisfies the first condition; Update the traversal order of the third offset voltage in the first data table to the first one; The method further includes: Read other data pages corresponding to the first threshold voltage based on the first threshold voltage and the third offset voltage.
5. The method according to claim 1, wherein determining the offset voltage combination corresponding to the target scene based on the data page reread record includes: The target model is used to identify the reread records of the data page and determine the offset voltage combination corresponding to the target scene.
6. The method according to claim 1, further comprising: Based on the data page reread records, at least one risky data page is identified; The second offset voltage of the risk data page exceeds the threshold. Data migration is performed on at least one risk data page within the target time period; And / or, Based on the at least one risk data page, at least one first data block is determined, the first data block comprising more than a second number of risk data pages; Within the target time period, data migration is performed on each of the first data blocks; The target time period is either the device's idle time period or a specified time period.
7. The method according to claim 1, further comprising: Based on the data page reread records, at least one second data page is determined; The second data page is the data page that failed to be reread but was successfully decoded by software; Alternatively, reread the data page that failed to read, failed software decoding, but was successfully recovered; Data migration is performed on at least one second data page; And / or, Based on the at least one second data page, at least one second data block is determined, the second data block comprising more than a third number of second data pages; data migration is performed on each second data block.
8. The method according to claim 1, further comprising: Based on the data page reread records, at least one third data page is identified; The third data page is the data page that failed to be reread, failed to be software decoded, and failed to recover data. Mark the at least one third data page as a bad data page; and / or, Based on the at least one third data page, at least one third data block is determined, the third data block comprising more than a fourth number of third data pages; each of the third data blocks is marked as a bad data block.
9. A data processing apparatus, the apparatus comprising: The acquisition module is used to obtain the target instruction; The target instruction is used to read the target data page in the target flash memory; The first reading module is used to respond to the target instruction and read the target data page according to the first threshold voltage. The second reading module is used to obtain a first offset voltage from a first data table if the reading fails; the first data table includes multiple offset voltages with a variable traversal order, the first offset voltage being the voltage of the first traversal, and the traversal order being related to the target parameters of the electronic device. The target parameters characterize the electronic device's usage environment, usage duration, and / or operating mode; The target data page is reread based on the first offset voltage and the first threshold voltage; The first data table includes: at least one combination of offset voltages corresponding to a scenario, wherein the scenario is related to the target parameter; The device further includes a second processing module, used to determine the offset voltage combination corresponding to the target scene based on the data page reread record; the data page reread record includes: the offset voltage used when multiple data pages are reread; the offset voltage combination corresponding to the target scene includes: a second threshold voltage whose occurrence count satisfies the second condition and the offset voltage corresponding to each second threshold voltage; The first data table is updated based on the offset voltage combination corresponding to the target scenario.
Citation Information
Patent Citations
Updating read voltages
CN105074831A
Multi-scene flash memory data offset method and device, electronic equipment and medium
CN115938442A