Data reading method, electronic equipment and storage medium

By accumulating the number of success times of gear voltage in the ambient gear in the storage device and using these gear voltages for reading when the threshold is reached, the problem of low reading success rate of storage devices in special environments is solved, and the reading efficiency and success rate are improved.

CN120045120APending Publication Date: 2025-05-27SHANGHAI LONGSYS DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311591520.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-24
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

The storage device has a low read success rate in some special environments, resulting in frequent repeated readings and data transfers, thereby reducing performance.

Method used

The number of times the memory device is read successfully continuously by accumulating the gear voltage in the ambient gear is. If the setting read fails and the accumulated times reach the preset threshold, the memory device is read sequentially based on the gear voltages in the target environment gear.

Benefits of technology

It improves the read success rate of the storage device in a specific environment, reduces the number of repeated reads, reduces the time spent on reading, and improves the read performance of the storage device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045120A_ABST
    Figure CN120045120A_ABST
Patent Text Reader

Abstract

The invention discloses a data reading method, electronic equipment and a storage medium. The data reading method comprises the following steps: performing set reading on preset data in a target storage block in the storage equipment; if the set reading fails and a preset threshold value of which the target environment accumulation frequency is not less than the corresponding target environment gear exists in response to the environment accumulation frequency, reading the storage device in sequence based on each gear voltage in the target environment gear; wherein the accumulated frequency of each environment is the frequency of continuously and successfully reading the storage device by accumulatively adopting the gear voltage in the corresponding environment gear. According to the scheme, the reading frequency of the storage device in the repeated reading process can be reduced, the reading success rate of the storage device in the environment gear can be increased, then the reading efficiency is improved, the reading time is greatly shortened, and the reading performance of the storage device is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage technologies, and particularly to a method for reading data, an electronic device, and a storage medium. Background Art

[0002] A storage device is a device used to store information. Usually, the information is digitized and then stored using media such as electricity, magnetism, or optics.

[0003] For data reading of a storage device, in some special environments, affected by environmental factors, the reading success rate of the storage device will decrease, thus frequently entering the repeated reading stage (read retry), and at the same time, more data transfer operations will be triggered, resulting in a sharp decline in the performance of the storage device. Summary of the Invention

[0004] The main technical problem to be solved by this application is to provide a method for reading data, an electronic device, and a storage medium to solve the problem of low reading success rate of a storage device in some special environments.

[0005] To solve the above problems, this application provides a method for reading data, including performing a set reading on preset data in a target storage block in a storage device; if the set reading fails, and in response to the existence of a target environmental accumulation number not less than a preset threshold corresponding to a target environmental gear in the environmental accumulation numbers, reading the storage device in sequence with the gear voltages in the target environmental gear; wherein, each environmental accumulation number is respectively: the number of consecutive successful readings of the storage device using the gear voltage in the corresponding environmental gear.

[0006] Wherein, the number of environmental gears is at least two; before the step of performing a set reading on preset data in a target storage block in the storage device, it includes: obtaining a gear voltage table of the storage device, where the gear voltage table includes multiple gear voltages; classifying the multiple gear voltages to obtain the gear voltages of various environmental gears.

[0007] Among them, the environmental gear includes a first environmental gear and a second environmental gear, and the environmental accumulation times correspondingly include a first environmental accumulation time and a second environmental accumulation time; in response to the existence of a target environmental accumulation time not less than the preset threshold corresponding to the target environmental gear among the environmental accumulation times, the steps of sequentially reading the storage device based on the gear voltages within the target environmental gear include: in response to the first environmental accumulation time not less than the first preset threshold of the first environmental gear, sequentially reading the storage device based on the gear voltages within the first environmental gear; in response to the second environmental accumulation time not less than the second preset threshold of the second environmental gear, sequentially reading the storage device based on the gear voltages within the second environmental gear; where the first environmental accumulation time is the number of times of continuously and successfully reading the storage device by accumulating the gear voltages within the first environmental gear; the second environmental accumulation time is the number of times of continuously and successfully reading the storage device by accumulating the gear voltages within the second environmental gear.

[0008] Among them, the data reading method further includes: in response to the non-existence of a target environmental accumulation time not less than the preset threshold corresponding to the target environmental gear among the environmental accumulation times, sequentially reading the storage device based on the gear voltages in the gear voltage table and / or performing a soft read and soft decoding on the storage device.

[0009] Among them, after the steps of sequentially reading the storage device based on the gear voltages within the target environmental gear in response to the existence of a target environmental accumulation time not less than the preset threshold corresponding to the target environmental gear among the environmental accumulation times, it includes: in response to the failure of sequentially reading the storage device based on the gear voltages within the target environmental gear, clearing the environmental accumulation times; sequentially reading the storage device based on the gear voltages in the gear voltage table and / or performing a soft read and soft decoding on the storage device.

[0010] Among them, after the steps of sequentially reading the storage device based on the gear voltages within the target environmental gear in response to the existence of a target environmental accumulation time not less than the preset threshold corresponding to the target environmental gear among the environmental accumulation times, it further includes: in response to the success of sequentially reading the storage device based on the gear voltages within the target environmental gear, relocating the preset data to other storage blocks; the steps of sequentially reading the storage device based on the gear voltages in the gear voltage table and / or performing a soft read and soft decoding on the storage device include: in response to the success of sequentially reading the storage device based on the gear voltages in the gear voltage table, relocating the preset data to other storage blocks; in response to the success of performing a soft read and soft decoding on the storage device, relocating the preset data to other storage blocks.

[0011] Among them, the steps of performing setting reading on preset data in a target storage block in a storage device include: obtaining the successful accumulation count of the storage device; where the successful accumulation count is the count of consecutive successful reads of the storage device by cumulatively using a target gear voltage; in response to the successful accumulation count of the storage device being not less than the corresponding success threshold, using the target gear voltage as the read voltage for setting reading, and performing setting reading on the preset data in the target storage block of the storage device.

[0012] Among them, the steps of performing setting reading on preset data in a target storage block in a storage device further include: in response to the successful accumulation count of the storage device being less than the corresponding success threshold, using the reference gear voltage of the storage device as the read voltage for setting reading, and performing setting reading on the preset data in the target storage block of the storage device.

[0013] Among them, if the setting reading fails, and in response to there being a target environmental accumulation count in the environmental accumulation counts that is not less than the preset threshold corresponding to the target environmental gear, the steps of sequentially reading the storage device based on the gear voltages within the target environmental gear further include: if the setting reading fails, performing re-reading on the preset data in the target storage block in the storage device based on a preset gear; if the re-reading fails, and in response to there being a target environmental accumulation count in the environmental accumulation counts that is not less than the preset threshold corresponding to the target environmental gear, sequentially reading the storage device based on the gear voltages within the target environmental gear.

[0014] To solve the above technical problems, the present invention also provides an electronic device, including a memory and a processor coupled to each other, where the processor is configured to execute program instructions stored in the memory to implement the data reading method as described in any one of the above.

[0015] To solve the above technical problems, the present invention also provides a computer-readable storage medium, on which program instructions are stored, and when the program instructions are executed by a processor, the data reading method as described in any one of the above is implemented.

[0016] The beneficial effect of the present invention is: Different from the prior art situation, in this application, by cumulatively using the gear voltages within the environmental gear to count the number of consecutive successful reads of the storage device, and then when the setting reading of the preset data in the target storage block in the storage device fails and in response to the environmental accumulation count being not less than the preset threshold corresponding to the environmental gear, sequentially reading the storage device based on the gear voltages within the environmental gear, it is possible to, when the storage device is in the environment corresponding to the environmental gear, specifically limit the traversal range of the read voltage to the gear voltages within the environmental gear, which can not only reduce the number of reads during the repeated reading process of the storage device, but also improve the reading success rate of the storage device in the environmental gear, thereby accelerating the reading efficiency, significantly reducing the reading time spent, and improving the read performance of the storage device. Description of the Drawings

[0017] Figure 1 is a schematic flowchart of an embodiment of the method for reading data of the present application;

[0018] Figure 2 is a schematic flowchart of another embodiment of the method for reading data of the present application;

[0019] Figure 3 is a schematic flowchart of yet another embodiment of the method for reading data of the present application;

[0020] Figure 4 is a schematic framework diagram of an embodiment of an electronic device of the present application;

[0021] Figure 5 is a schematic framework diagram of an embodiment of a computer-readable storage medium of the present application. Detailed Description of the Embodiments

[0022] The following describes the solutions of the embodiments of the present application in detail with reference to the accompanying drawings of the specification.

[0023] In the following description, specific details such as specific system architectures, interfaces, and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the present application.

[0024] The terms "system" and "network" are often used interchangeably in this document. The term "and / or" in this document merely describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally represents an "or" relationship between the associated objects before and after. In addition, "multiple" in this document means two or more than two.

[0025] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of an embodiment of the method for reading data of the present application. The method for reading data in this embodiment specifically includes the following steps:

[0026] Step S11: Perform a set read on the preset data in the target storage block in the storage device.

[0027] The storage device includes but is not limited to hard disks, solid-state drives, external hard drives, USB flash drives, memory cards, non-volatile memories (NAND FLASH), optical discs, and cloud storage, etc.

[0028] The set read is the initial default read (default read) of the storage device.

[0029] When reading data from a storage device, first perform a set reading on the storage device. Herein, the data reading in this embodiment can be any number of data readings on the storage device, including the first reading or any subsequent readings, which is not limited herein.

[0030] Step S12: If the set reading fails and in response to the existence of a target environmental cumulative count in the environmental cumulative counts that is not less than the preset threshold corresponding to the target environmental gear, read the storage device successively according to the voltages of each gear within the target environmental gear.

[0031] After performing a set reading on the preset data in the target storage block of the storage device, determine whether the set reading is successful. In a specific application scenario, it can be determined by judging whether the error rate of the read data in the set reading exceeds the error correction ability of the storage device. If it exceeds, the reading fails; if it does not exceed, the reading is successful. In a specific application scenario, it can also be determined whether the reading is successful by judging whether the preset data can be read out in the set reading.

[0032] When the set reading fails and in response to the existence of a target environmental cumulative count in the environmental cumulative counts that is greater than or equal to the preset threshold corresponding to the target environmental gear, read the storage device successively according to the voltages of each gear within the target environmental gear.

[0033] Each environmental cumulative count is respectively: the number of times of continuously reading the storage device successfully by accumulating the gear voltages within the corresponding environmental gear. That is, in the historical reading process of the storage device, if the read voltage was the voltage of a certain gear within an environmental gear when the previous reading was successful and the read voltage is also the voltage of this environmental gear when the current reading is successful, the environmental cumulative count is incremented by one.

[0034] The preset threshold of the environmental gear can be set based on experiments or experience. For example: 5, 10, 13, 15, 20, etc., which is not limited herein. In a specific application scenario, when the preset threshold is 5, if the set reading fails and in response to the existence of a certain target environmental cumulative count reaching 5 times during this data reading, which is equal to the preset threshold, read the storage device successively according to the voltages of each gear within the target environmental gear. In a specific application scenario, when the preset thresholds of each environmental gear are all 5, if the set reading fails and in response to the non-existence of a certain environmental cumulative count reaching 5 times during this data reading, do not read the storage device successively according to the voltages of each gear within any environmental gear, but adopt conventional or other means for reading.

[0035] The environmental gears can include multiple environments, and the corresponding cumulative environmental times can also include multiple, which can be specifically divided based on the actual situation. For example, the environmental gears can include a normal environmental gear and a harsh environmental gear; the environmental gears can also include a low-temperature environmental gear, a normal-temperature environmental gear, and a high-temperature environmental gear; the environmental gears can also include a humid environmental gear and a dry environmental gear. And so on, classified based on various environmental factors that affect the performance parameters of the storage device. Environmental factors include but are not limited to: temperature, humidity, static electricity, etc.

[0036] The voltages of each gear within the environmental gear are determined before reading. The voltages of each gear within the environmental gear can be obtained from the manufacturer of the storage device. It can also be based on the actual reading situation to divide the multiple gear voltages in the gear voltage table of the storage device. For example, if it is found during reading that in a certain environment, mostly one or several target gear voltages are successfully read, then these one or several target gear voltages are divided into the gear voltages within the environmental gear corresponding to this environment.

[0037] Since the cumulative times for each environment are respectively: the number of times of continuously and successfully reading the storage device by accumulating and using the gear voltages within the corresponding environmental gear, when the target environmental cumulative time is not less than the preset threshold of the corresponding target environmental gear, it indicates that the storage device is in the environment corresponding to the target environmental gear at this time. Therefore, directly reading the storage device in sequence based on the gear voltages within the target environmental gear can greatly improve the reading success rate of the storage device in the environment corresponding to the target environmental gear. And because in this embodiment, under repeated reading in this case, only the gear voltages within the target environmental gear are used to read the storage device, it also reduces the number of reading times of the storage device during the repeated reading process, thereby reducing the reading time of the storage device and improving the reading efficiency.

[0038] Through the above steps, the data reading method of this embodiment accumulates the number of times of continuously and successfully reading the storage device by using the gear voltages within the environmental gear respectively, then sets the preset data in the target storage block in the storage device to read failure, and in response to the existence of a target environmental cumulative time not less than the preset threshold of the corresponding target environmental gear among the environmental cumulative times, reads the storage device in sequence based on the gear voltages within the target environmental gear. When the storage device is in the environment corresponding to the target environmental gear, by specifically limiting the traversal range of the read voltage to the gear voltages within the target environmental gear, it can both reduce the number of reading times of the storage device during the repeated reading process and improve the reading success rate of the storage device in the target environmental gear, thereby accelerating the reading efficiency, significantly reducing the reading time spent, and improving the read performance of the storage device.

[0039] Please refer to Figure 2 , Figure 2It is a schematic flowchart of another embodiment of the data reading method of the present application. The data reading method in this embodiment specifically includes the following steps:

[0040] Step S21: Obtain the gear voltage table of the storage device, where the gear voltage table includes multiple gear voltages; classify the multiple gear voltages to obtain the gear voltages of various environmental gears.

[0041] The gear voltage table refers to the read retry table (RRT), which can be obtained from the manufacturer of the storage device. The gear voltage table includes multiple gear voltages, specifically, it can be 50, 60, 80, 100, etc., which are not limited here.

[0042] In this embodiment, the gear voltages of various environmental gears can be obtained by classifying the multiple gear voltages. Experiments can be conducted on the storage device. By placing it in the environment corresponding to different environmental gears, the gear voltages that can correctly read the storage device are obtained, and then these gear voltages are classified into the corresponding environmental gears. In a specific application scenario, if the storage device is placed in the environment corresponding to the first environmental gear and it is found that the gear voltages with arrangement serial numbers 1-25 in the gear voltage table can correctly read the storage device, then the gear voltages with arrangement serial numbers 1-25 are classified into the first environmental gear. If the storage device is placed in the environment corresponding to the second environmental gear and it is found that the gear voltages with arrangement serial numbers 26-50 in the gear voltage table can correctly read the storage device, then the gear voltages with arrangement serial numbers 26-50 are classified into the second environmental gear. In other embodiments, the gear voltages of various environmental gears can also be obtained from the manufacturer of the storage device. Among them, all different environments in which the storage device is located need to be corresponded to various environmental gears, which are not limited here specifically.

[0043] In other application scenarios, still taking the number of gear voltages in the gear voltage table as 50 as an example, for example, the gear voltages with arrangement serial numbers 1-20, 30-40, 43-50 belong to the first environmental gear, and the gear voltages with arrangement serial numbers 21-30, 41, 42 belong to the second environmental gear. The division of the gear voltages is specifically set based on the actual situation and is not limited here.

[0044] Step S22: Obtain the successful cumulative count of the storage device.

[0045] The successful cumulative count is the number of consecutive successful reads of the storage device by accumulating the use of the target gear voltage. That is, if the storage device is continuously read successfully using the target gear voltage, then the number of consecutive successful reads is the successful cumulative count. If the read voltage is the target gear voltage when the previous read is successful and the read voltage is also the target gear voltage when the current read is successful, then the successful cumulative count is incremented by one.

[0046] Step S23: In response to the successful accumulation count of the storage device being not less than the corresponding success threshold, use the target gear voltage as the read voltage for setting the read, and perform a setting read on the preset data in the target storage block of the storage device.

[0047] When the successful accumulation count is not less than the corresponding success threshold, it indicates that in multiple previous reads, the read voltages for successful reads are all the target gear voltage, which means that the recent reads of the storage device may be for data on the same storage block and / or data stored on the storage device simultaneously. Therefore, the read voltages of each data are the same. Then, use the target gear voltage as the read voltage for setting the read, and perform a setting read on the preset data in the target storage block of the storage device, which can improve the success rate of the setting read in this case. The success threshold can include, but is not limited to, 5, 10, 15, 20, or 23, etc., and is specifically set based on the actual situation and is not limited here.

[0048] In a specific application scenario, if the success threshold is 10, and the gear voltage 9 is used, and the number of consecutive successful reads of the storage device is greater than or equal to 10 times, then the read voltage for setting the read during the next read is the gear voltage 9.

[0049] Among them, even for data on the same storage block or data stored on the storage device simultaneously, due to the storage characteristics of the storage device, during storage, there may be fluctuations in the storage device, causing the read voltages of the data corresponding to the fluctuations to change. Therefore, in this example, a fluctuation threshold is additionally set. In a specific application scenario, during the continuous accumulation process of the successful accumulation count, if a successful read of the storage device is performed using a non-target gear voltage, and the number of such cases does not exceed the fluctuation threshold, then the continuous accumulation process of the successful accumulation count does not interrupt and continues to accumulate on the original basis. However, if a successful read of the storage device is performed using a non-target gear voltage, and the number of such cases exceeds the fluctuation threshold, then the continuous accumulation process of the successful accumulation count is interrupted, the successful accumulation count is cleared, and the successful accumulation count starts to be counted again. The fluctuation threshold can be set based on the size of each storage block. For example: if the size of a storage block is 1000 pages and one page is read each time, the fluctuation threshold can be set between 2 - 5. If the size of a storage block is 2000 pages and one page is read each time, the fluctuation threshold can be set between 2 - 10, and so on, without limitation.

[0050] Step S24: In response to the successful accumulation count of the storage device being less than the corresponding success threshold, use the reference gear voltage of the storage device as the read voltage for setting the read, and perform a setting read on the preset data in the target storage block of the storage device.

[0051] When the number of successful accumulations is less than the corresponding success threshold, it cannot be determined that the recent reads of the storage device are for data on the same storage block and / or data stored on the storage device simultaneously. Therefore, the reference gear voltage of the storage device is still used as the read voltage for the set read, and the preset data in the target storage block of the storage device is read as set. Among them, the reference gear voltage of the storage device can be obtained from the manufacturer and is the conventional default parameter for reading the storage device.

[0052] In a specific application scenario, if the set read fails, the preset data in the target storage block in the storage device can be read again based on a preset gear; if the re-read fails, and in response to the existence of a target environmental accumulation number not less than the preset threshold corresponding to the target environmental gear in the environmental accumulation numbers, the storage device is read in sequence based on the gear voltages of each gear within the target environmental gear. That is, an additional read of a preset gear is set between step S24 and step S25. Among them, the preset gear is the gear voltage with a relatively high success rate obtained based on experience. By adding an additional read of a preset gear between the set read and the repeated read, the read success rate of the storage device is improved.

[0053] If the set read is successful, the data is read and the preset data is not migrated.

[0054] Step S25: If the set read fails, and in response to the first environmental accumulation number not less than the first preset threshold of the first environmental gear, the storage device is read in sequence based on the gear voltages of each gear within the first environmental gear.

[0055] In this embodiment, the environmental gear includes the first environmental gear and the second environmental gear, and the environmental accumulation numbers correspondingly include the first environmental accumulation number and the second environmental accumulation number as an example for the description of environmental gear reading. In other embodiments, the environmental gear and the corresponding environmental accumulation numbers can also be other quantities.

[0056] The first environmental accumulation number is the number of times of continuously successful reads of the storage device using the gear voltages within the first environmental gear. In a specific application scenario, the first environmental gear can be the environmental gear corresponding to the normal working environment of the storage device.

[0057] The specific value of the first preset threshold can be set based on the actual situation and is not limited here.

[0058] In a specific application scenario, if the gear voltages with serial numbers 1-25 in the gear voltage table are classified into the first environmental gear, then when the set read fails, and in response to the first environmental accumulation number being equal to or greater than the first preset threshold of the first environmental gear, the storage device is read in sequence based on the gear voltages with serial numbers 1-25 within the first environmental gear.

[0059] By determining that the first environmental cumulative count is not less than the first preset threshold of the first environmental gear, it can be determined that the storage device is in the normal working environment corresponding to the first environmental gear. Then, by sequentially applying the voltages of each gear within the first environmental gear to read the storage device, the reading success rate of the storage device in the environment corresponding to the environmental gear can be significantly improved. Moreover, since in this embodiment, only the voltages of each gear within the first environmental gear are used to read the storage device during repeated reading in this case, the number of reading times of the storage device during the repeated reading process is also reduced, thereby reducing the reading time of the storage device and improving the reading efficiency.

[0060] If the reading is successful when sequentially applying the voltages of each gear within the first environmental gear to read the storage device, the data is read, and considering the reliability of the data, the preset data can be relocated to other storage blocks.

[0061] Step S26: If the set reading fails and in response to the second environmental cumulative count being not less than the second preset threshold of the second environmental gear, sequentially apply the voltages of each gear within the second environmental gear to read the storage device.

[0062] The second environmental cumulative count is the number of times of continuously successful reading of the storage device by cumulatively using the gear voltages within the second environmental gear. In a specific application scenario, the second environmental gear can be the environmental gear corresponding to the abnormal working environment of the storage device.

[0063] The specific value of the second preset threshold can be set based on the actual situation and is not limited here.

[0064] In a specific application scenario, if the gear voltages with arrangement serial numbers 26 - 50 in the gear voltage table are classified into the second environmental gear, then when the set reading fails and in response to the second environmental cumulative count being equal to or greater than the second preset threshold of the second environmental gear, sequentially apply the gear voltages with arrangement serial numbers 26 - 50 within the second environmental gear to read the storage device.

[0065] By determining that the second environmental cumulative count is not less than the second preset threshold of the second environmental gear, it can be determined that the storage device is in the abnormal working environment corresponding to the second environmental gear. Then, by sequentially applying the voltages of each gear within the second environmental gear to read the storage device, the reading success rate of the storage device in the environment corresponding to the environmental gear can be significantly improved. Moreover, since in this embodiment, only the voltages of each gear within the second environmental gear are used to read the storage device during repeated reading in this case, the number of reading times of the storage device during the repeated reading process is also reduced, thereby reducing the reading time of the storage device and improving the reading efficiency.

[0066] If the storage device is successfully read in sequence based on the voltages of each gear within the second environmental gear, the data is read, and considering the reliability of the data, the preset data can be relocated to other storage blocks.

[0067] In a specific application scenario, considering that there may be fluctuations in the storage device, there may be a situation where even though the storage device is in the same environment, the correct read voltage for it may be the voltage of the gear of another environment. To reduce the impact of this fluctuation characteristic on reading, this application scenario can also set corresponding environmental fluctuation thresholds for each environmental gear. Specifically, during the continuous accumulation process of the first environmental accumulation times or the second environmental accumulation times, if the storage device is successfully read using the voltage of a gear that is not in the current environmental gear, and the number of such cases does not exceed the corresponding environmental fluctuation threshold, the continuous accumulation process of the environmental accumulation times is not interrupted and continues to accumulate on the original basis. However, if the storage device is successfully read using the voltage of a gear that is not in the current environmental gear, and the number of such cases exceeds the corresponding environmental fluctuation threshold, the continuous accumulation process of the environmental accumulation times is interrupted, the corresponding environmental accumulation times are cleared, and the statistical calculation of the environmental accumulation times starts over. The value of the environmental fluctuation threshold needs to be small to prevent confusion with real environmental changes and can be between 1 and 5.

[0068] Step S27: In response to the failure of sequentially reading the storage device based on the voltages of each gear within the target environmental gear, clear the environmental accumulation times, and sequentially read the storage device based on the voltages of each gear in the gear voltage table and / or perform a soft read and soft decoding on the storage device.

[0069] In a specific application scenario, when the sequential reading of the storage device based on the voltages of each gear within the first environmental gear fails, clear the first environmental accumulation times, and then sequentially read the storage device based on the voltages of each gear in the gear voltage table or perform a soft read and soft decoding on the storage device. Among them, if the sequential reading of the storage device based on the voltages of each gear in the gear voltage table fails, a soft read and soft decoding can also be performed on the storage device again.

[0070] In a specific application scenario, when the sequential reading of the storage device based on the voltages of each gear within the second environmental gear fails, clear the second environmental accumulation times, and then sequentially read the storage device based on the voltages of each gear in the gear voltage table or perform a soft read and soft decoding on the storage device. Among them, if the sequential reading of the storage device based on the voltages of each gear in the gear voltage table fails, a soft read and soft decoding can also be performed on the storage device again.

[0071] Due to the cumulative continuity of the first environment cumulative count and the second environment cumulative count, and the setting of clearing the corresponding read failure, at the same moment, only one of the first environment cumulative count and the second environment cumulative count will be not less than the corresponding preset threshold. As a result, in the same environment, the storage device will only enter the read process of one environment gear, avoiding the occurrence of read chaos and improving the read specification.

[0072] Among them, in response to successful soft reading and soft decoding of the storage device, the preset data is relocated to other storage blocks. In response to successful reading of the storage device in sequence based on the voltages of each gear in the gear voltage meter, the preset data is relocated to other storage blocks.

[0073] Although the soft decoding is successful in the last read of this time or the reading based on the voltages of each gear in the gear voltage meter is successful, since all reads fail during traversing and reading in the environment gear this time, it indicates that there is already a certain error rate of the preset data on the target storage block. Then, the preset data is relocated to other storage blocks to ensure the accuracy and reliability of the preset data.

[0074] If the reading of the storage device in sequence based on the voltages of each gear in the gear voltage meter fails, then soft reading and soft decoding of the storage device are performed. If the soft reading and soft decoding of the storage device also fail, then this read fails and the next read is performed.

[0075] Step S28: In response to the non-existence of a target environment cumulative count in the environment cumulative count that is not less than the preset threshold corresponding to the target environment gear, read the storage device in sequence based on the voltages of each gear in the gear voltage meter and / or perform soft reading and soft decoding on the storage device.

[0076] When the first environment cumulative count is less than the first preset threshold of the first environment gear and the second environment cumulative count is less than the second preset threshold of the second environment gear, the environment in which the storage device is located cannot be determined temporarily. Therefore, the storage device is read in sequence based on the voltages of each gear in the gear voltage meter and / or soft reading and soft decoding of the storage device are performed.

[0077] In response to successful soft reading and soft decoding of the storage device, the preset data is relocated to other storage blocks. In response to successful reading of the storage device in sequence based on the voltages of each gear within the target environment gear, the preset data is relocated to other storage blocks to ensure the accuracy and reliability of the preset data.

[0078] If the reading of the storage device in sequence based on the voltages of each gear in the gear voltage meter fails, then soft reading and soft decoding of the storage device are performed. If the soft reading and soft decoding of the storage device also fail, then this read fails and the next read is performed.

[0079] Through the above steps, the data reading method of this embodiment first accumulates the successful accumulation times. When the successful accumulation times are not less than the corresponding success thresholds, the target gear voltage is used as the read voltage to be set for setting and reading the preset data in the target storage block of the storage device. Based on the continuity of data storage, the gear voltages with successful historical readings are used to improve the success rate of the current setting and reading, reduce subsequent repeated reading steps, and accelerate the reading efficiency. Moreover, this embodiment also accumulates the first environmental accumulation times and the second environmental accumulation times respectively. When the first environmental accumulation times or the second environmental accumulation times are not less than the corresponding preset thresholds, the gear voltages in their corresponding environmental gears are used to read the storage device in sequence, so as to determine the environment where the storage device is located by comparing the environmental accumulation times with the preset thresholds, and then the traversal range of the read voltage is specifically limited to the gear voltages in the environmental gear corresponding to this environment. This can not only specifically improve the reading success rate of the storage device in the environmental gear, but also reduce the number of readings of the storage device during the repeated reading process, thereby accelerating the reading efficiency, significantly reducing the reading time spent, and improving the reading performance of the storage device.

[0080] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of another embodiment of the data reading method of this application. The data reading method in this embodiment specifically includes the following steps:

[0081] Step S301: Obtain the successful accumulation times of the storage device.

[0082] Step S302: Determine whether the successful accumulation times are not less than the corresponding success thresholds.

[0083] If the successful accumulation times are not less than the corresponding success thresholds, execute Step S304; if the successful accumulation times are less than the corresponding success thresholds, execute Step S303.

[0084] Step S303: Perform setting and reading on the preset data in the target storage block of the storage device through the reference gear voltage.

[0085] Step S304: Perform setting and reading on the preset data in the target storage block of the storage device through the target gear voltage.

[0086] Step S305: Determine whether the setting and reading are successful.

[0087] If the setting and reading are successful, execute Step S306; if the setting and reading are not successful, execute Step S307.

[0088] Step S306: Read the data.

[0089] Step S307: Determine whether there is a cumulative number of target environments that is not less than the preset threshold corresponding to the target environment gear.

[0090] If both the cumulative number of the first environment and the cumulative number of the second environment are less than the preset threshold corresponding to the environment gear, execute step S313; if there is a cumulative number of the first environment or the cumulative number of the second environment that is not less than the preset threshold of the environment gear, then there is a cumulative number of target environments that is not less than the preset threshold corresponding to the target environment gear, and execute step S308.

[0091] Step S308: Determine whether the cumulative number of the first environment is not less than the preset threshold of the first environment gear.

[0092] If the cumulative number of the first environment is not less than the preset threshold of the first environment gear, execute step S310; if the cumulative number of the first environment is less than the preset threshold of the first environment gear, execute step S319.

[0093] Step S309: Read the storage device successively based on the voltages of each gear within the second environment gear.

[0094] Step S310: Read the storage device successively based on the voltages of each gear within the first environment gear.

[0095] Step S311: Determine whether the reading is successful.

[0096] If the reading is successful, execute step S312; if the reading fails, implement step S313.

[0097] Step S312: Read the data and relocate the preset data to other storage blocks.

[0098] Step S313: Read the storage device successively based on the voltages of each gear in the gear voltage table.

[0099] Step S314: Perform a soft read and soft decoding on the storage device.

[0100] For the specific details of the above steps of this embodiment, reference can be made to the foregoing Figure 2 embodiment, which will not be elaborated here.

[0101] Through the above steps, the data reading method of this embodiment first accumulates the successful accumulation times. When the successful accumulation times are not less than the corresponding success threshold, the target gear voltage is used as the read voltage to be set for setting and reading the preset data in the target storage block of the storage device. Based on the continuity of data storage, the gear voltages that were successfully read historically are used to improve the success rate of the current setting and reading, reduce subsequent repeated reading steps, and accelerate the reading efficiency. In addition, this embodiment also accumulates the first environmental accumulation times and the second environmental accumulation times respectively. When the first environmental accumulation times or the second environmental accumulation times are not less than the corresponding preset thresholds, the gear voltages within their corresponding environmental gears are used to read the storage device in sequence, so as to determine the environment where the storage device is located by comparing the environmental accumulation times with the preset thresholds, and then the traversal range of the read voltage is specifically limited to the gear voltages within the environmental gear corresponding to this environment. This can not only specifically improve the reading success rate of the storage device in the environmental gear, but also reduce the number of readings during the repeated reading process of the storage device, thereby accelerating the reading efficiency, significantly reducing the reading time spent, and improving the reading performance of the storage device.

[0102] Please refer to Figure 4 , Figure 4 which is a schematic framework diagram of an embodiment of an electronic device of the present application. The electronic device 400 includes a mutually coupled memory 401 and a processor 402. The processor 402 is configured to execute program instructions stored in the memory 401 to implement the steps of the above method embodiment. In a specific implementation scenario, the electronic device 400 may include, but is not limited to: a microcomputer, a server. In addition, the electronic device 400 may also include a laptop computer, a tablet computer, a solid-state drive, a memory card, a Nand Flash, etc., which are not limited herein.

[0103] Specifically, the processor 402 is configured to control itself and the memory 401 to implement the steps of any of the above method embodiments. The processor 402 may also be referred to as a CPU (Central Processing Unit). The processor 402 may be an integrated circuit chip with signal processing capabilities. The processor 402 may also be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Additionally, the processor 402 may be implemented jointly by integrated circuit chips.

[0104] The above solution can not only reduce the number of reads during the repeated reading process of the storage device, but also improve the read success rate of the storage device under the environmental gear, thereby accelerating the read efficiency, significantly reducing the time spent on reading, and improving the read performance of the storage device.

[0105] Please refer to Figure 5 , Figure 5 which is a schematic framework diagram of an embodiment of the computer-readable storage medium of the present application. The computer-readable storage medium 500 stores program instructions 501 that can be run by a processor, and the program instructions 501 are used to implement the steps of any of the above method embodiments.

[0106] In several embodiments provided by the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.

[0107] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0108] In addition, the functional units in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0109] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods in various embodiments of this application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.

[0110] The above are only the embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A method for reading data, characterized in that, the method for reading data includes: performing set reading on preset data in a target storage block in a storage device; if the set reading fails, and in response to the existence of a target environmental accumulation count not less than a preset threshold corresponding to a target environmental gear in the environmental accumulation counts, reading the storage device in sequence based on the gear voltages of each gear within the target environmental gear; wherein, each of the environmental accumulation counts is: the number of times of continuously and successfully reading the storage device by using the gear voltage within the corresponding environmental gear.

2. The method for reading data according to claim 1, characterized in that, the number of the environmental gears is at least two; before the step of performing set reading on preset data in a target storage block in a storage device, it includes: acquiring a gear voltage table of the storage device, and the gear voltage table includes a plurality of gear voltages; classifying the plurality of gear voltages to obtain the gear voltages of various environmental gears.

3. The method for reading data according to claim 2, characterized in that, the environmental gear includes a first environmental gear and a second environmental gear, and the environmental accumulation counts correspondingly include a first environmental accumulation count and a second environmental accumulation count; the step of, in response to the existence of a target environmental accumulation count not less than a preset threshold corresponding to a target environmental gear in the environmental accumulation counts, reading the storage device in sequence based on the gear voltages of each gear within the target environmental gear includes: in response to the first environmental accumulation count not less than a first preset threshold of the first environmental gear, reading the storage device in sequence based on the gear voltages of each gear within the first environmental gear; in response to the second environmental accumulation count not less than a second preset threshold of the second environmental gear, reading the storage device in sequence based on the gear voltages of each gear within the second environmental gear; wherein, the first environmental accumulation count is the number of times of continuously and successfully reading the storage device by using the gear voltage within the first environmental gear; the second environmental accumulation count is the number of times of continuously and successfully reading the storage device by using the gear voltage within the second environmental gear.

4. The method for reading data according to claim 2, characterized in that, the method for reading data further includes: in response to the non-existence of a target environmental accumulation count not less than a preset threshold corresponding to a target environmental gear in the environmental accumulation counts, reading the storage device in sequence based on the gear voltages in the gear voltage table and / or performing soft reading and soft decoding on the storage device.

5. The method for reading data according to claim 2, characterized in that, after the step of, in response to the existence of a target environmental accumulation count not less than a preset threshold corresponding to a target environmental gear in the environmental accumulation counts, reading the storage device in sequence based on the gear voltages of each gear within the target environmental gear, it includes: in response to the failure of reading the storage device in sequence based on the gear voltages of each gear within the target environmental gear, clearing the environmental accumulation counts. Read the storage device in sequence based on the voltages of each gear in the gear voltmeter and / or perform a soft read and soft decoding on the storage device.

6. The data reading method according to claim 5, wherein, after the step of reading the storage device in sequence based on the voltages of each gear within the target environment gear in response to the presence of a target environment accumulation count not less than a preset threshold corresponding to the target environment gear in the environment accumulation count, the method further includes: in response to successfully reading the storage device in sequence based on the voltages of each gear within the target environment gear, relocate the preset data to other storage blocks; The step of reading the storage device in sequence based on the voltages of each gear in the gear voltmeter and / or performing a soft read and soft decoding on the storage device includes: in response to successfully reading the storage device in sequence based on the voltages of each gear in the gear voltmeter, relocate the preset data to other storage blocks; in response to successfully performing a soft read and soft decoding on the storage device, relocate the preset data to other storage blocks.

7. The data reading method according to any one of claims 1-6, wherein, the step of performing a set read on the preset data in the target storage block in the storage device includes: obtain the successful accumulation count of the storage device; wherein, the successful accumulation count is the number of consecutive successful reads of the storage device using the target gear voltage; in response to the successful accumulation count of the storage device being not less than the corresponding success threshold, use the target gear voltage as the read voltage for the set read, and perform a set read on the preset data in the target storage block of the storage device.

8. The data reading method according to claim 7, wherein, the step of performing a set read on the preset data in the target storage block in the storage device further includes: in response to the successful accumulation count of the storage device being less than the corresponding success threshold, use the reference gear voltage of the storage device as the read voltage for the set read, and perform a set read on the preset data in the target storage block of the storage device.

9. The data reading method according to claim 1, wherein, the step of, if the set read fails and in response to the presence of a target environment accumulation count not less than a preset threshold corresponding to the target environment gear in the environment accumulation count, reading the storage device in sequence based on the voltages of each gear within the target environment gear further includes: if the set read fails, perform a re-read on the preset data in the target storage block in the storage device based on a preset gear; if the re-read fails and in response to the presence of a target environment accumulation count not less than a preset threshold corresponding to the target environment gear in the environment accumulation count, read the storage device in sequence based on the voltages of each gear within the target environment gear.

10. An electronic device, wherein, comprises a memory and a processor coupled to each other, and the processor is configured to execute program instructions stored in the memory to implement the data reading method according to any one of claims 1 to 9.

11. A computer-readable storage medium having program instructions stored thereon, characterized in that, when the program instructions are executed by a processor, a method for reading data as described in any one of claims 1 to 9 is implemented.