Data reading method of memory and memory control device and system
By obtaining the ratio of the memory's operating voltage to the number of blocks, the memory's read speed is optimized, solving the problem of unintelligent memory read speed control and achieving more efficient read speed adaptation.
Patent Information
- Application Number
- CN202510793807.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-10-17
Smart Images

Figure CN120803344A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer technology or data access technology, and in particular relates to a data reading method of a memory, a memory control device and system. BACKGROUND
[0002] With the rapid development of information technology, storage demand has become the focus of the market. At present, especially with the rapid development of artificial intelligence, the pursuit of computing power has led to higher requirements for processors. The memory is a component used to store programs and data. For a computer, it has a memory function and can work normally. However, the current reading method of the memory is relatively single, and the control of the reading speed is not intelligent enough. Therefore, how to improve the reading speed control intelligence of the memory is an urgent problem to be solved. SUMMARY
[0003] The embodiments of the present application provide a data reading method of a memory, a memory control device and system, which can improve the reading speed control intelligence of the memory.
[0004] In a first aspect, the embodiments of the present application provide a data reading method of a memory, applied to an electronic device, wherein the electronic device comprises a memory, and the method comprises:
[0005] obtaining working voltages of the memory in a preset time period to obtain a plurality of working voltages;
[0006] determining a first reading speed of the memory according to the plurality of working voltages;
[0007] obtaining a good block quantity of the memory and a bad block quantity of the memory;
[0008] determining a first ratio between the good block quantity and the bad block quantity;
[0009] determining a target reading speed according to the first ratio and the first reading speed.
[0010] In a second aspect, the embodiments of the present application provide a memory control device, applied to an electronic device, wherein the electronic device comprises a memory, and the device comprises a first obtaining unit, a first determining unit, a second obtaining unit and a second determining unit, wherein:
[0011] the first obtaining unit is configured to obtain working voltages of the memory in a preset time period to obtain a plurality of working voltages;
[0012] the first determining unit is configured to determine a first reading speed of the memory according to the plurality of working voltages;
[0013] The second obtaining unit is configured to obtain a number of good blocks of the memory and a number of bad blocks of the memory.
[0014] The second determining unit is configured to determine a first ratio between the number of good blocks and the number of bad blocks, and determine a target reading speed according to the first ratio and the first reading speed.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for performing the steps in the first aspect of the present application.
[0016] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, and the computer program causes a computer to perform some or all of the steps described in the first aspect of the present application.
[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps described in the first aspect of the present application. The computer program product can be a software installation package.
[0018] In a sixth aspect, an embodiment of the present application provides a memory data reading system, which includes the memory control device described in the second aspect, or is configured to perform the memory data reading method described in the first aspect.
[0019] By implementing the embodiments of the present application, the following beneficial effects are achieved:
[0020] It can be seen that the data reading method of the memory, the memory control device and the system provided in the embodiments of the present application are applied to an electronic device including a memory, the working voltage of the memory in a preset time period is obtained, a plurality of working voltages are obtained, the first reading speed of the memory is determined according to the plurality of working voltages, the number of good blocks of the memory and the number of bad blocks of the memory are obtained, the first ratio between the number of good blocks and the number of bad blocks is determined, and the target reading speed is determined according to the first ratio and the first reading speed. That is, the first ratio determines the overall performance of the memory to a certain extent, and the first reading speed reflects the reading speed adapted to the current working state of the memory to a certain extent. Therefore, the reading speed adapted to the current working state of the memory can be optimized based on the overall performance of the memory, so that the final target reading speed is deeply adapted to the working stability and the overall performance of the memory, and the intelligent reading speed control of the memory can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0022] Figure 1 is a flow diagram of a data reading method of a memory provided by an embodiment of the present application;
[0023] Figure 2 is a structural diagram of an electronic device provided by an embodiment of the present application;
[0024] Figure 3 is a structural diagram of an access device provided by an embodiment of the present application;
[0025] Figure 4 is a structural diagram of another electronic device provided by an embodiment of the present application;
[0026] Figure 5 is a functional unit composition block diagram of a data reading device of an access device provided by an embodiment of the present application;
[0027] Figure 6 is a structural diagram of a data reading system of an access device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0028] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.
[0029] The terms "first", "second", etc. in the specification and claims of the present application and the above drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed or can optionally include other steps or units inherent to the process, method, product or device.
[0030] In this document, the term "embodiment" means that a specific feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The phrase appears at various places in the specification does not necessarily all refer to the same embodiment, nor is it necessarily mutually exclusive of other embodiments. It is explicitly and implicitly understood that the embodiments described herein can be combined with other embodiments.
[0031] In the embodiments of the present application, the electronic device can be a device with storage capability, which can include various handheld devices with storage functions, smart home devices, wearable devices (smart glasses, smart bracelets, Internet of Things devices (such as smart refrigerators, smart washing machines, smart televisions), smart watches, etc.), vehicle-mounted devices (driving recorders, in-vehicle cameras, vehicle-mounted speakers, etc.), computing devices or other processing devices connected to wireless modems, and various forms of user equipment (User Equipment, UE), mobile stations (Mobile Station, MS), terminal devices, etc.
[0032] In a specific implementation, a good storage block, referred to as a good block, specifically refers to a storage block that can normally perform read or write operations.
[0033] In a specific implementation, a bad storage block, referred to as a bad block, specifically refers to a storage block that cannot normally perform read or write operations in the storage medium.
[0034] In a specific implementation, an idle good block is a storage block that has not been allocated to any data storage task, and the storage block has not been marked as a bad block.
[0035] The embodiments of the present application are described in detail below.
[0036] Please refer to Figure 1 , Figure 1 is a flowchart of a data reading method of a memory provided by an embodiment of the present application, applied to an electronic device, the electronic device comprising a memory, and the data reading method of the memory comprising:
[0037] 101, obtaining the working voltage of the memory in a preset time period, to obtain a plurality of working voltages.
[0038] In the embodiments of the present application, the preset time period can be pre-set or system default. For example, the preset time period is a time period before the current time, which can include the current time, or can not include the current time. As shown in Figure 2 The electronic device can comprise an access device. The access device can be used to implement data reading operation. Of course, the electronic device can also comprise an access device and a temperature control module. The temperature control module can be used to regulate the temperature of the memory, so that the temperature of the memory is maintained within a certain range to ensure the performance of the memory.
[0039] In specific implementation, the working voltage of the memory in the preset time period can be detected every preset time interval to obtain a plurality of working voltages, and the preset time interval can be pre-set or system default.
[0040] 102, determining the first reading speed of the memory according to the plurality of working voltages.
[0041] In the embodiments of the present application, the working voltage reflects the working state of the memory, and then the corresponding reading speed can be determined based on the real-time working state to ensure the performance of the memory and further improve the intelligent reading speed control of the memory. The first reading speed reflects the reading speed adapted to the current working state of the memory to a certain extent.
[0042] In specific implementation, there is a close relationship between the data reading speed of the memory and the working voltage of the memory. Specifically, increasing the voltage can increase the speed and accuracy of reading data.
[0043] Specifically, by gradually increasing the voltage of the selected word line, the accurate reading of the target data can be ensured, which can significantly improve the speed and accuracy of reading data and improve the reading speed.
[0044] Of course, in the phase change memory, the measured difference of the phase change resistance in the polycrystalline state and the amorphous state has a tendency to increase with the increase of the read voltage, which means that the increase of the read voltage can increase the window value of the phase change resistance in the high resistance and the low resistance, thereby being more conducive to the accuracy of data reading and increasing the reading accuracy.
[0045] In summary, there is a positive correlation between the data reading speed of the memory and the voltage, and by optimizing the voltage control, the speed and accuracy of data reading can be improved. Of course, the voltage also needs to be kept within a certain range, and too high voltage will cause the current to be too large, such as changing the state of the phase change resistance due to excessive current, thereby destroying the data retention.
[0046] In a specific implementation, a balance point needs to be found to achieve the best reading performance to ensure the speed and accuracy of data reading.
[0047] Optionally, the step 102 of determining the first reading speed of the memory according to the plurality of working voltages can be implemented in the following manner:
[0048] According to the plurality of working voltages, a first fitting straight line and a first fitting curve segment of the preset time period are obtained by fitting;
[0049] An absolute value of the slope of the first fitting straight line is determined to obtain a first absolute value;
[0050] A mean value of the first fitting curve segment is determined to obtain a first mean value;
[0051] A first standard deviation is obtained by calculating the standard deviation according to the first fitting curve segment;
[0052] The first reading speed is determined according to the first mean value, the first absolute value and the first standard deviation.
[0053] In a specific implementation, since each working voltage in the plurality of working voltages corresponds to a detection time, the plurality of working voltages and the corresponding detection times can be regarded as a plurality of coordinate points, and the plurality of coordinate points are mapped in a preset coordinate system, the horizontal axis of the preset coordinate system is time, and the vertical axis is voltage value.
[0054] Next, a first fitting straight line can be obtained by linear fitting based on the plurality of coordinate points, and a first fitting curve segment of a preset time period can also be obtained by curve fitting based on the plurality of coordinate points.
[0055] Further, an absolute value of the slope of the first fitting straight line can be determined to obtain a first absolute value, and the size of the first absolute value reflects the working stability of the memory to a certain extent.
[0056] Further, a mean value of the first fitting curve segment can be determined, to obtain a first mean value, which can be understood as an overall working state of the current memory.
[0057] Next, a standard deviation calculation can be performed according to the first fitting curve segment, to obtain a first standard deviation. Specifically, the first fitting curve segment can be sampled to obtain a preset number of sampling points, voltages of the preset number of sampling points can be obtained, and a standard deviation operation can be performed based on the preset number of voltages, to obtain the first standard deviation. The first standard deviation also reflects the working stability of the memory to a certain extent.
[0058] The preset number can be pre-set or system default. The preset number is related to the first mean value.
[0059] Finally, the first reading speed can be determined according to the first mean value, the first absolute value, and the first standard deviation, that is, the corresponding reading speed can be determined based on the overall working state of the current memory and the working stability of the memory, so that the first reading speed preliminarily meets the working condition, and thus the intelligent reading speed control of the memory can be improved.
[0060] Optionally, the step of determining the first reading speed according to the first mean value, the first absolute value, and the first standard deviation can be implemented in the following manner:
[0061] determining a reference reading speed corresponding to the first mean value;
[0062] determining a first stability evaluation parameter corresponding to the first absolute value;
[0063] determining a second stability evaluation parameter corresponding to the first standard deviation;
[0064] determining a first weight pair corresponding to the first absolute value;
[0065] determining a target stability evaluation parameter according to the first stability evaluation parameter, the second stability evaluation parameter, and the first weight pair;
[0066] determining a first adjustment parameter corresponding to the target stability evaluation parameter;
[0067] adjusting the reference reading speed according to the first adjustment parameter to obtain the first reading speed.
[0068] In a specific implementation, a mapping relationship between a preset mean value and a reading speed can be pre-stored, and then the reference reading speed corresponding to the first mean value can be determined based on the mapping relationship. Since the first mean value reflects the overall working state of the current memory, the corresponding reading speed can be preliminarily determined based on the overall working state of the current memory.
[0069] Next, the mapping relationship between the preset absolute value and the stability evaluation parameter can also be pre-stored, and then the first stability evaluation parameter corresponding to the first absolute value can be determined based on the mapping relationship. Correspondingly, the mapping relationship between the preset standard deviation and the stability evaluation parameter is pre-stored, and then the second stability evaluation parameter corresponding to the first standard deviation can be determined based on the mapping relationship.
[0070] The scoring mechanism of the first stability evaluation parameter and the second stability evaluation parameter can be the same, for example, the scoring mechanism can be a percentage system (with a value range of 0-100), or a one-point system (with a value range of 0-1).
[0071] Of course, the mapping relationship between the preset absolute value and the weight pair can also be pre-stored. The weight pair can include a first weight and a second weight, the sum of the first weight and the second weight is 1, the first weight is the weight corresponding to the first stability evaluation parameter, and the second weight is the weight corresponding to the second stability evaluation parameter. Then, the first weight pair corresponding to the first absolute value can be determined based on the mapping relationship. Then, the target stability evaluation parameter is obtained by performing weighted operation according to the first stability evaluation parameter, the second stability evaluation parameter, and the first weight pair. The target stability evaluation parameter = first weight * first stability evaluation parameter + second weight * second stability evaluation parameter. The target stability evaluation parameter comprehensively reflects the working stability of the memory.
[0072] Next, the mapping relationship between the preset stability evaluation parameter and the adjustment parameter can be pre-stored. The value range of the adjustment parameter can be pre-set or system default, for example, the value range of the adjustment parameter can be related to the attribute information of the memory, and for example, the value range of the adjustment parameter can be -0.1-0.1. Then, the first adjustment parameter corresponding to the target stability evaluation parameter can be determined based on the mapping relationship. Finally, the reference read speed can be adjusted according to the first adjustment parameter to obtain the first read speed, that is, the first read speed = reference read speed * (1+first adjustment parameter). In this way, the corresponding read speed can be determined based on the overall working state of the current memory and the working stability of the memory, so that the first read speed preliminarily meets the working condition.
[0073] The attribute information of the memory can include at least one of the following: the model of the memory, the material of the memory, the memory size of the memory, the structure of the memory, and the like, which is not limited here.
[0074] Optionally, the above step of determining the reference read speed corresponding to the first mean value can be implemented in the following manner:
[0075] The first attribute information of the data to be read is obtained.
[0076] determining a reading speed set corresponding to the first attribute information, the reading speed set including a plurality of reading speeds, each reading speed corresponding to a working voltage;
[0077] selecting a working voltage corresponding to the first mean value from the working voltages corresponding to the plurality of reading speeds, to obtain a first working voltage;
[0078] obtaining a reading speed corresponding to the first working voltage, to obtain the reference reading speed.
[0079] In the embodiments of the present application, the first attribute information of the data to be read can include at least one of the following: data size, data format, data structure, etc., which is not limited here. The first attribute information of the data to be read reflects the data characteristics of the data to be read to some extent.
[0080] In specific implementation, the first attribute information of the data to be read can be obtained, and a mapping relationship between the attribute information of the data to be read and a reading speed set can also be stored in advance. The reading speed set can include a plurality of reading speeds, each reading speed corresponding to a working voltage, and then the mapping relationship can be used to determine the reading speed set corresponding to the first attribute information.
[0081] Then, a working voltage corresponding to the first mean value can be selected from the working voltages corresponding to the plurality of reading speeds, to obtain a first working voltage, and a reading speed corresponding to the first working voltage can be obtained, to obtain the reference reading speed. In this way, the reading speed corresponding to the data to be read can be preliminarily determined based on the data characteristics of the data to be read and the overall working state of the current memory based on the data characteristics of the data to be read, so as to ensure that the reading speed is adapted to the actual environment, and thus the intelligent performance of the reading speed control of the memory can be improved.
[0082] 103、obtaining the number of good blocks of the memory and the number of bad blocks of the memory.
[0083] In the embodiments of the present application, the number of good blocks of the memory and the number of bad blocks of the memory can be obtained. The relationship between the number of good blocks and the number of bad blocks can affect the performance of the memory to some extent. The relationship between the number of good blocks and the number of bad blocks of the memory directly affects the reading speed. Maintaining a high good block ratio and controlling the number of bad blocks is the key to ensuring the performance of the memory. Figure 3 As shown in the figure, the memory can include a plurality of good blocks, and can also include a plurality of bad blocks.
[0084] In specific implementation, the more good blocks in the memory, the larger the storage area that can effectively work, and the more smoothly the reading and writing operations of data can be performed, thereby improving the reading speed.
[0085] Correspondingly, too many bad blocks can reduce the overall performance of the memory, because the controller needs to spend more time to bypass these bad blocks, or needs to reallocate data when using wear leveling technology, which will affect the read speed.
[0086] In a specific implementation, in order to prolong the service life of the memory, the storage device can also use wear leveling technology to ensure that each storage unit is used approximately the same number of times. This means that even if there are bad blocks, the memory can still maintain performance using the remaining good blocks. However, if the number of bad blocks is too large, the pressure of wear leveling will increase, which may cause the read speed to decrease.
[0087] 104. Determine a first ratio between the number of good blocks and the number of bad blocks.
[0088] In the embodiments of the present application, a first ratio between the number of good blocks and the number of bad blocks can be determined. The first ratio can be: first ratio = number of good blocks / (number of good blocks + number of bad blocks), or the first ratio can also be: first ratio = number of good blocks / number of bad blocks.
[0089] 105. Determine a target read speed according to the first ratio and the first read speed.
[0090] In the embodiments of the present application, a target read speed can be determined according to the first ratio and the first read speed. The first ratio determines the overall performance of the memory to some extent, and the first read speed reflects the read speed adapted to the current working state of the memory to some extent. Therefore, the read speed adapted to the current working state of the memory can be optimized based on the overall performance of the memory, so that the final target read speed is deeply adapted to its own working stability and its own overall performance, thereby improving the intelligent control of the read speed of the memory.
[0091] Optionally, the step 105 of determining a target read speed according to the first ratio and the first read speed can be implemented in the following manner:
[0092] Determine a first adjustment parameter corresponding to the first ratio.
[0093] Obtain available free good blocks of the memory to obtain a plurality of available free good blocks.
[0094] Determine the remaining erase count of each available free good block in the plurality of available free good blocks to obtain a plurality of remaining erase counts.
[0095] Determine a second mean value of the plurality of remaining erase counts.
[0096] Determine a first fine tuning parameter corresponding to the second mean value.
[0097] The target read speed is determined according to the first adjustment parameter, the first fine adjustment parameter and the first read speed.
[0098] In the embodiments of the present application, a mapping relationship between preset mean values and adjustment parameters can be pre-stored, and then a first adjustment parameter corresponding to a first ratio can be determined based on the mapping relationship.
[0099] In a specific implementation, a number of available free good blocks of the memory can also be obtained, and then a remaining erase count of each available free good block of the plurality of available free good blocks is determined to obtain a plurality of remaining erase counts. The greater the remaining erase count is, the better the performance of the storage block is, and vice versa. The available free good block clearly locates the performance of the storage block to be used.
[0100] Furthermore, a mean value of the plurality of remaining erase counts can be determined to obtain a second mean value. A mapping relationship between preset mean values and fine adjustment parameters can also be pre-stored, and a first fine adjustment parameter corresponding to the second mean value can be determined based on the mapping relationship. Finally, the target read speed can be determined according to the first adjustment parameter, the first fine adjustment parameter and the first read speed, that is, the target read speed = the first read speed * (1 + the first adjustment parameter) * (1 + the first fine adjustment parameter). The first ratio determines the overall performance of the memory to some extent, and the first read speed reflects the read speed adapted to the current working state of the memory to some extent. Therefore, the read speed adapted to the current working state of the memory can be optimized based on the overall performance of the memory and the performance of the storage block to be used, so that the final target read speed is deeply adapted to the working stability and the overall performance of the memory, and the read speed control intelligence of the memory is improved.
[0101] Optionally, the electronic device further includes a temperature control module, and can further include the following steps:
[0102] The working temperature of the memory is obtained.
[0103] It is detected whether the working temperature is in a preset range.
[0104] When the working temperature is not in the preset range, a target deviation degree between the working temperature and the preset range is determined.
[0105] A first working parameter corresponding to the target deviation degree is determined.
[0106] The temperature control module is controlled to work at the first working parameter to adjust the working temperature of the memory.
[0107] The preset range can be pre-set or system default.
[0108] In specific implementation, as shown in Figure 2 The electronic device can further include a temperature control module.
[0109] Specifically, the working temperature of the memory can be acquired, which can be the working temperature at the current moment, or can also be the average working temperature of the memory in a preset time period.
[0110] If the working temperature is in the preset range, it means that the memory works in the normal temperature range, that is, in this temperature range, the temperature has little effect on the memory, which can basically be ignored. Conversely, if the working temperature is not in the preset range, it means that the memory does not work in the normal temperature range, that is, at this time, the temperature has a greater effect on the memory, which cannot be ignored.
[0111] Next, it can also be detected whether the working temperature is in the preset range, and when the working temperature is not in the preset range, the target deviation between the working temperature and the preset range can be determined, wherein the preset range can include an upper threshold and a lower threshold, and when the working temperature is less than the lower threshold, the target deviation = (lower threshold - working temperature) / lower threshold, and correspondingly, when the working temperature is greater than the upper threshold, the target deviation = (working temperature - upper threshold) / upper threshold. The mapping relationship between the preset deviation and the working parameter can be stored in advance, specifically, when the working temperature is less than the lower threshold, the first mapping relationship between the preset deviation and the working parameter can be stored in advance, and the first working parameter corresponding to the target deviation is determined based on the first mapping relationship. Finally, the temperature control module can be controlled to work at the first working parameter to adjust the working temperature of the memory, that is, the temperature control module can be controlled to heat the memory to make the working temperature of the memory return to the preset range to ensure the reading performance of the memory. Correspondingly, when the working temperature is greater than the upper threshold, the second mapping relationship between the preset deviation and the working parameter can be stored in advance, and the first working parameter corresponding to the target deviation is determined based on the second mapping relationship. Finally, the temperature control module can be controlled to work at the first working parameter to adjust the working temperature of the memory, that is, the temperature control module can be controlled to cool the memory to make the working temperature of the memory return to the preset range to ensure the reading performance of the memory.
[0112] The target deviation reflects the deviation between the actual working temperature and the normal temperature range.
[0113] The first working parameter can include at least one of the following: working mode, working current, working voltage, working power, working resistance, etc., without limitation. The working mode can include at least one of the following: cooling mode or heating mode.
[0114] It can be seen that the data reading method of the memory described in the embodiments of the present application is applied to an electronic device, the electronic device includes a memory, the working voltage of the memory in a preset time period is obtained, a plurality of working voltages are obtained, a first reading speed of the memory is determined according to the plurality of working voltages, the number of good blocks of the memory and the number of bad blocks of the memory are obtained, a first ratio between the number of good blocks and the number of bad blocks is determined, and a target reading speed is determined according to the first ratio and the first reading speed. The first ratio determines the overall performance of the memory to some extent, and the first reading speed reflects the reading speed adapted to the current working state of the memory to some extent. Therefore, the reading speed adapted to the current working state of the memory can be deeply optimized based on the overall performance of the memory, so that the final target reading speed deeply adapts to the working stability and the overall performance of itself, and thus the intelligent reading speed control of the memory can be improved.
[0115] Please refer to Figure 4 , Figure 4 is another structural schematic diagram of an electronic device provided by the embodiments of the present application, the electronic device includes a processor, a memory, a communication interface and one or more programs, the one or more programs are stored in the memory and are configured to be executed by the processor, and the program includes instructions for performing the following steps in the embodiments of the present application:
[0116] obtaining the working voltage of the memory in a preset time period to obtain a plurality of working voltages;
[0117] determining a first reading speed of the memory according to the plurality of working voltages;
[0118] obtaining the number of good blocks of the memory and the number of bad blocks of the memory;
[0119] determining a first ratio between the number of good blocks and the number of bad blocks;
[0120] determining a target reading speed according to the first ratio and the first reading speed.
[0121] Optionally, in the aspect of determining the first reading speed of the memory according to the plurality of working voltages, the program includes instructions for performing the following steps:
[0122] fitting according to the plurality of working voltages to obtain a first fitting straight line and a first fitting curve segment of the preset time period;
[0123] determining the absolute value of the slope of the first fitting straight line to obtain a first absolute value;
[0124] determining the mean value of the first fitting curve segment to obtain a first mean value;
[0125] performing a standard deviation calculation according to the first fitted curve segment, to obtain a first standard deviation;
[0126] determining the first reading speed according to the first mean value, the first absolute value and the first standard deviation.
[0127] Optionally, in the aspect of determining the first reading speed according to the first mean value, the first absolute value and the first standard deviation, the above program includes instructions for performing the following steps:
[0128] determining a reference reading speed corresponding to the first mean value;
[0129] determining a first stability evaluation parameter corresponding to the first absolute value;
[0130] determining a second stability evaluation parameter corresponding to the first standard deviation;
[0131] determining a first weight pair corresponding to the first absolute value;
[0132] determining a target stability evaluation parameter according to the first stability evaluation parameter, the second stability evaluation parameter and the first weight pair;
[0133] determining a first adjustment parameter corresponding to the target stability evaluation parameter;
[0134] adjusting the reference reading speed according to the first adjustment parameter, to obtain the first reading speed.
[0135] Optionally, in the aspect of determining the reference reading speed corresponding to the first mean value, the above program includes instructions for performing the following steps:
[0136] obtaining first attribute information of data to be read;
[0137] determining a reading speed set corresponding to the first attribute information, the reading speed set including a plurality of reading speeds, each reading speed corresponding to a working voltage;
[0138] selecting a working voltage corresponding to the first mean value from working voltages corresponding to the plurality of reading speeds, to obtain a first working voltage;
[0139] obtaining a reading speed corresponding to the first working voltage, to obtain the reference reading speed.
[0140] Optionally, in the aspect of determining the target reading speed according to the first ratio and the first reading speed, the above program includes instructions for performing the following steps:
[0141] determining a first adjustment parameter corresponding to the first ratio;
[0142] obtaining available free good blocks of the memory, to obtain a plurality of available free good blocks;
[0143] determining a remaining erase count of each available free good block in the plurality of available free good blocks, to obtain a plurality of remaining erase counts;
[0144] determining a mean value of the plurality of remaining erase counts, to obtain a second mean value;
[0145] determining a first fine tuning parameter corresponding to the second mean value;
[0146] determining the target read speed according to the first adjustment parameter, the first fine tuning parameter and the first read speed.
[0147] Optionally, the electronic device further comprises a temperature control module, and the program further comprises instructions for performing the following steps:
[0148] obtaining an operating temperature of the memory;
[0149] detecting whether the operating temperature is in a preset range;
[0150] when the operating temperature is not in the preset range, determining a target deviation degree between the operating temperature and the preset range;
[0151] determining a first operating parameter corresponding to the target deviation degree;
[0152] controlling the temperature control module to operate with the first operating parameter, to adjust the operating temperature of the memory.
[0153] It can be seen that the electronic device described in the embodiments of the present application comprises a memory, the operating voltage of the memory in a preset time period is obtained, to obtain a plurality of operating voltages, the first read speed of the memory is determined according to the plurality of operating voltages, the number of good blocks of the memory and the number of bad blocks of the memory are obtained, the first ratio between the number of good blocks and the number of bad blocks is determined, and the target read speed is determined according to the first ratio and the first read speed, that is, the first ratio determines the overall performance of the memory to a certain extent, and the first read speed reflects the read speed adapted to the current working state of the memory to a certain extent, and then the read speed adapted to the current working state of the memory can be deeply optimized based on the overall performance of the memory, so that the final target read speed deeply adapts to its own working stability and its own overall performance, and thus the intelligent control of the read speed of the memory can be improved.
[0154] Figure 51 is a functional unit block diagram of a memory control device 500 involved in an embodiment of the present application. The memory control device 500 is applied to an electronic device, and the electronic device includes a memory. The memory control device 500 includes: a first acquisition unit 501, a first determination unit 502, a second acquisition unit 503, and a second determination unit 504, wherein:
[0155] The first acquiring unit 501 is configured to acquire the operating voltage of the memory within a preset time period to obtain a plurality of operating voltages;
[0156] The first determining unit 502 is configured to determine a first reading speed of the memory according to the multiple operating voltages;
[0157] The second acquiring unit 503 is configured to acquire the number of good blocks and the number of bad blocks of the memory;
[0158] The second determining unit 504 is configured to determine a first ratio between the number of good blocks and the number of bad blocks; and determine a target reading speed according to the first ratio and the first reading speed.
[0159] Optionally, in determining the first reading speed of the memory according to the multiple operating voltages, the first determining unit 502 is specifically configured to:
[0160] Performing fitting according to the multiple operating voltages to obtain a first fitting straight line and a first fitting curve segment for the preset time period;
[0161] determining an absolute value of the slope of the first fitting straight line to obtain a first absolute value;
[0162] Determining a mean of the first fitting curve segment to obtain a first mean;
[0163] Calculating a standard deviation based on the first fitting curve segment to obtain a first standard deviation;
[0164] The first reading speed is determined according to the first mean, the first absolute value, and the first standard deviation.
[0165] Optionally, in determining the first reading speed according to the first mean, the first absolute value, and the first standard deviation, the first determining unit 502 is specifically configured to:
[0166] determining a reference reading speed corresponding to the first mean value;
[0167] determining a first stability evaluation parameter corresponding to the first absolute value;
[0168] determining a second stability evaluation parameter corresponding to the first standard deviation;
[0169] determining a first weight pair corresponding to the first absolute value;
[0170] determining a target stability evaluation parameter according to the first stability evaluation parameter, the second stability evaluation parameter and the first weight pair;
[0171] determining a first adjustment parameter corresponding to the target stability evaluation parameter;
[0172] adjusting the reference read speed according to the first adjustment parameter to obtain the first read speed.
[0173] Optionally, in the determination of the reference read speed corresponding to the first mean value, the first determination unit 502 is specifically configured to:
[0174] obtain first attribute information of the data to be read;
[0175] determine a read speed set corresponding to the first attribute information, the read speed set including a plurality of read speeds, each read speed corresponding to a working voltage;
[0176] select a working voltage corresponding to the first mean value from the working voltages corresponding to the plurality of read speeds to obtain a first working voltage;
[0177] obtain a read speed corresponding to the first working voltage to obtain the reference read speed.
[0178] Optionally, in the determination of the target read speed according to the first ratio and the first read speed, the second determination unit 504 is specifically configured to:
[0179] determine a first adjustment parameter corresponding to the first ratio;
[0180] obtain available free good blocks of the memory to obtain a plurality of available free good blocks;
[0181] determine a remaining erase count of each available free good block in the plurality of available free good blocks to obtain a plurality of remaining erase counts;
[0182] determine a second mean value of the plurality of remaining erase counts;
[0183] determine a first fine adjustment parameter corresponding to the second mean value;
[0184] determine the target read speed according to the first adjustment parameter, the first fine adjustment parameter and the first read speed.
[0185] Optionally, the electronic device further includes a temperature control module, and the memory control apparatus 500 is further specifically configured to:
[0186] acquire a working temperature of the memory;
[0187] detect whether the working temperature is in a preset range;
[0188] when the working temperature is not in the preset range, determine a target deviation degree between the working temperature and the preset range;
[0189] determine a first working parameter corresponding to the target deviation degree;
[0190] control the temperature control module to work with the first working parameter to adjust the working temperature of the memory.
[0191] It can be seen that the memory control apparatus described in the embodiments of the present application is applied to an electronic device, the electronic device includes a memory, the working voltage of the memory in a preset time period is acquired to obtain a plurality of working voltages, the first read speed of the memory is determined according to the plurality of working voltages, the number of good blocks of the memory and the number of bad blocks of the memory are acquired, the first ratio between the number of good blocks and the number of bad blocks is determined, and the target read speed is determined according to the first ratio and the first read speed. That is, the first ratio determines the overall performance of the memory to a certain extent, and the first read speed reflects the read speed adapted to the current working state of the memory to a certain extent. Therefore, the read speed adapted to the current working state of the memory can be optimized based on the overall performance of the memory, so that the final target read speed is deeply adapted to the working stability and the overall performance of the memory, and the intelligent control of the read speed of the memory is improved.
[0192] It can be understood that the functions of the program modules of the memory control apparatus of the embodiments can be specifically implemented according to the methods in the above method embodiments, and the specific implementation process can be referred to the related description of the above method embodiments, which will not be described here.
[0193] Figure 6 is a structural schematic diagram of a data reading system of a memory involved in the embodiments of the present application. The data reading system of the memory includes a memory control apparatus as shown in Figure 5 , and can also be used to implement any method in the data reading method of the memory as described in Figure 1 .
[0194] The embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program causes a computer to execute part or all steps of any method recorded in the above method embodiments.
[0195] The embodiment of the present application further provides a computer program product, which comprises a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps of any method described in the above method embodiments. The computer program product can be a software installation package.
[0196] It should be noted that, for the above-mentioned method embodiments, in order to simply describe, they are all described as a series of action combinations, but those skilled in the art should know that the present application is not limited to the action sequence described, because according to the present application, some steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.
[0197] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0198] In several embodiments provided by the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic. The division of the above units is only a logical function division. There can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical or other forms.
[0199] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0200] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0201] If the above-mentioned 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 memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0202] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0203] The above is a detailed introduction to the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present application.
Claims
1. A method for reading data from a memory, characterized in that: Applied to an electronic device, the electronic device includes a memory, and the method includes: Obtaining the operating voltage of the memory within a preset time period to obtain multiple operating voltages; determining a first read speed of the memory according to the multiple operating voltages; Obtaining the number of good blocks and the number of bad blocks of the memory; determining a first ratio between the number of good blocks and the number of bad blocks; A target reading speed is determined according to the first ratio and the first reading speed.
2. The method according to claim 1, characterized in that Determining a first read speed of the memory according to the multiple operating voltages includes: Performing fitting according to the multiple operating voltages to obtain a first fitting straight line and a first fitting curve segment for the preset time period; determining an absolute value of the slope of the first fitting straight line to obtain a first absolute value; Determining a mean of the first fitting curve segment to obtain a first mean; Calculating a standard deviation based on the first fitting curve segment to obtain a first standard deviation; The first reading speed is determined according to the first mean, the first absolute value, and the first standard deviation.
3. The method according to claim 2, characterized in that The determining the first reading speed according to the first mean, the first absolute value, and the first standard deviation includes: determining a reference reading speed corresponding to the first mean value; determining a first stability evaluation parameter corresponding to the first absolute value; determining a second stability evaluation parameter corresponding to the first standard deviation; determining a first weight pair corresponding to the first absolute value; determining a target stability evaluation parameter according to the first stability evaluation parameter, the second stability evaluation parameter, and the first weight pair; determining a first adjustment parameter corresponding to the target stability evaluation parameter; The reference reading speed is adjusted according to the first adjustment parameter to obtain the first reading speed.
4. The method according to claim 3, characterized in that The determining a reference reading speed corresponding to the first mean value includes: Obtaining first attribute information of the data to be read; determining a reading speed set corresponding to the first attribute information, the reading speed set including a plurality of reading speeds, each reading speed corresponding to an operating voltage; Selecting an operating voltage corresponding to the first average value from among the multiple operating voltages corresponding to the reading speeds to obtain a first operating voltage; A reading speed corresponding to the first operating voltage is obtained to obtain the reference reading speed.
5. The method according to any one of claims 1 to 4, characterized in that The determining the target reading speed according to the first ratio and the first reading speed includes: determining a first adjustment parameter corresponding to the first ratio; Obtaining available free good blocks of the memory to obtain a plurality of available free good blocks; Determine the remaining number of erasures of each of the plurality of available free good blocks to obtain a plurality of remaining erasure numbers; Determine an average of the plurality of remaining erasure times to obtain a second average; determining a first fine-tuning parameter corresponding to the second mean; The target reading speed is determined according to the first adjustment parameter, the first fine-tuning parameter, and the first reading speed.
6. The method according to any one of claims 1 to 4, characterized in that The electronic device further includes a temperature control module, and the method further includes: Obtaining an operating temperature of the memory; detecting whether the operating temperature is within a preset range; When the operating temperature is not within the preset range, determining a target deviation between the operating temperature and the preset range; Determining a first operating parameter corresponding to the target deviation; The temperature control module is controlled to operate at the first operating parameter to adjust the operating temperature of the memory.
7. A memory control device, characterized in that: Applied to an electronic device, the electronic device includes a memory, the device includes: a first acquisition unit, a first determination unit, a second acquisition unit, and a second determination unit, wherein: The first acquiring unit is configured to acquire the operating voltage of the memory within a preset time period to obtain a plurality of operating voltages; The first determining unit is configured to determine a first reading speed of the memory according to the multiple operating voltages; The second acquiring unit is configured to acquire the number of good blocks and the number of bad blocks of the memory; The second determining unit is configured to determine a first ratio between the number of good blocks and the number of bad blocks; and determine a target reading speed according to the first ratio and the first reading speed.
8. The device according to claim 7, characterized in that In determining the first reading speed of the memory according to the multiple operating voltages, the first determining unit is specifically configured to: Performing fitting according to the multiple operating voltages to obtain a first fitting straight line and a first fitting curve segment for the preset time period; determining an absolute value of the slope of the first fitting straight line to obtain a first absolute value; Determining a mean of the first fitting curve segment to obtain a first mean; Calculating a standard deviation based on the first fitting curve segment to obtain a first standard deviation; The first reading speed is determined according to the first mean, the first absolute value, and the first standard deviation.
9. The device according to claim 8, characterized in that In determining the first reading speed according to the first mean, the first absolute value, and the first standard deviation, the first determining unit is specifically configured to: determining a reference reading speed corresponding to the first mean value; determining a first stability evaluation parameter corresponding to the first absolute value; determining a second stability evaluation parameter corresponding to the first standard deviation; determining a first weight pair corresponding to the first absolute value; determining a target stability evaluation parameter according to the first stability evaluation parameter, the second stability evaluation parameter, and the first weight pair; determining a first adjustment parameter corresponding to the target stability evaluation parameter; The reference reading speed is adjusted according to the first adjustment parameter to obtain the first reading speed.
10. A data reading system for a memory, characterized in that: The memory data reading system includes the memory control device according to any one of claims 7 to 9, or the memory data reading system is used to execute the memory data reading method according to any one of claims 1 to 6.