Storage device classification method, electronic equipment and storage medium
By acquiring and comparing the initial and current data of the storage device, classifying the storage device, solving the problem that the storage device cannot be fully utilized and achieving more efficient storage capacity utilization.
Patent Information
- Application Number
- CN202311456687.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-02
- Publication Date
- 2025-05-06
AI Technical Summary
The prior art cannot fully utilize the storage capabilities of the storage device because it is impossible to effectively distinguish storage devices with different data holding capabilities, resulting in storage devices with better data holding capabilities being unable to fully utilize them.
By acquiring the initial and current data of the storage device, preset aging process is performed, and the storage device is classified based on these data to classify storage devices with similar data retention capabilities.
It is realized that storage devices with similar data retention capabilities are classified, which is convenient for application in different demand scenarios, so that various types of storage devices can fully utilize their storage capabilities and improve the effective utilization rate of storage devices.
Smart Images

Figure CN119939298A_ABST
Abstract
Description
Technical Field
[0001] The present application is applied to the technical field of storage device classification, in particular to a storage device classification method, an electronic device, and a storage medium. Background Art
[0002] The reliability requirements of a storage device include not only the data retention capability at the early stage of its life, but also the data retention capability at the late stage of its life.
[0003] Generally, different storage devices will have different data retention capabilities after a certain period of aging and wear. The data retention capabilities of some storage devices after wear are close to a critical level, while some storage devices still have strong data retention capabilities. The better storage devices can continue to be erased and written a considerable number of times.
[0004] The current use of storage devices limits the use of all storage devices within the rated wear life, without distinguishing particles with different data retention capabilities, resulting in storage devices with better data retention capabilities being unable to fully utilize their storage capabilities. Summary of the invention
[0005] The present application provides a classification method for storage devices, an electronic device, and a storage medium to solve the problem that some storage devices cannot fully utilize their storage capacity.
[0006] To solve the above technical problems, the present application provides a storage device classification method, comprising: obtaining the data retention time of the storage device; and classifying the storage device based on the data retention time to obtain the category of the storage device.
[0007] Among them, the steps of obtaining the initial data retention period of the storage device; performing a preset aging process on the storage device and obtaining the current data retention period of the storage device; and classifying the storage device based on the data retention period to obtain the category of the storage device include: classifying the storage device based on the initial data retention period and / or the current data retention period to obtain the category of the storage device.
[0008] Obtain the length of time that initial data of the storage device can be retained; perform preset aging processing on the storage device, and obtain the length of time that current data of the storage device can be retained; classify the storage device based on the length of time that the initial data can be retained and / or the length of time that the current data can be retained.
[0009] Among them, the steps of performing a preset aging process on the storage device and obtaining the length of time that the current data of the storage device can be retained include: performing a preset period of erasing and writing operations on the storage device to perform a preset aging process; and testing the storage device to obtain the length of time that the current data of the storage device can be retained.
[0010] Among them, the step of testing the storage device to obtain the length of time that the current data of the storage device can be retained includes: baking the storage device within a preset temperature range for a preset time, reading the storage device to obtain a current voltage distribution diagram of the storage device, the voltage distribution diagram has voltage as the horizontal axis and threshold voltage as the vertical axis, and the voltage distribution diagram includes multiple waveforms; based on the spacing between two adjacent waveforms in the current voltage distribution diagram, determining the length of time that the current data of the storage device can be retained.
[0011] Among them, based on the spacing between two adjacent waveforms in the current voltage distribution diagram, the step of determining the length of time that the current data of the storage device can be retained includes: setting a preset voltage threshold; determining a first spacing between two adjacent waveforms at the preset voltage threshold in the voltage distribution diagram; obtaining a second spacing based on the first spacing and the valley depth between the valley bottoms of the two adjacent waveforms; multiplying the first spacing, the second spacing and a preset coefficient in sequence to obtain a spacing product; determining the length of time that the current data can be retained based on the spacing product, wherein the spacing product is proportional to the length of time that the initial data can be retained.
[0012] Among them, the step of obtaining the length of time that the initial data of the storage device can be retained includes: testing the storage device to obtain the length of time that the initial data of the storage device can be retained; or determining the length of time that the initial data of the storage device can be retained from a retainable time table based on the type of the storage device, wherein the retainable time table is obtained in advance by establishing a correspondence between the type of the storage device and the length of time that the initial data obtained by the test can be retained.
[0013] Among them, the storage device is classified based on the initial data retainable time and / or the current data retainable time, and the step of obtaining the category of the storage device includes: performing a first classification of the storage device based on the initial data retainable time to obtain the main category of the storage device; using the current data retainable time, the initial data retainable time and the preset period to calculate the erase and write change slope of the storage device; under the main category of the storage device, the storage device is classified a second time based on the erase and write change slope to obtain a subcategory of the storage device.
[0014] Among them, the step of calculating the erase change slope of the storage device using the current data retention time, the initial data retention time and the preset period includes: subtracting the initial data retention time from the current data retention time to obtain the target difference, dividing the absolute value of the target difference by the preset period, and calculating the erase change slope of the storage device.
[0015] Among them, the storage device is first classified based on the length of time that the initial data can be retained, and the step of obtaining the main category of the storage device includes: determining whether the length of time that the initial data can be retained is greater than a first threshold; when the length of time that the initial data can be retained is greater than the first threshold, determining that the main category of the storage device is the first main category; when the length of time that the initial data can be retained is not greater than the first threshold, determining that the main category of the storage device is the second main category.
[0016] Among them, under the main category of the storage device, the storage device is classified for the second time based on the erase change slope, and the step of obtaining the subcategory of the storage device includes: in response to the main category of the storage device being the first main category, judging whether the erase change slope is greater than the second threshold; when the erase change slope is not greater than the second threshold, determining the subcategory of the storage device as the first subcategory; when the erase change slope is greater than the second threshold, determining the subcategory of the storage device as the second subcategory; in response to the main category of the storage device being the second main category, judging whether the erase change slope is greater than the third threshold; when the erase change slope is not greater than the third threshold, determining the subcategory of the storage device as the third subcategory; when the erase change slope is greater than the third threshold, determining the subcategory of the storage device as the fourth subcategory.
[0017] To solve the above technical problems, the present invention further provides an electronic device, comprising a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement a classification method of a storage device as described in any one of the above items.
[0018] In order to solve the above technical problems, the present invention further provides a computer-readable storage medium on which program instructions are stored. When the program instructions are executed by a processor, the classification method of the storage device as described in any one of the above items is implemented.
[0019] To solve the above technical problems, the present application discloses a classification method for storage devices by obtaining the length of time that the initial data of the storage device can be retained; performing a preset aging process on the storage device, and obtaining the length of time that the current data of the storage device can be retained; and classifying the storage devices based on the length of time that the initial data can be retained and the length of time that the current data can be retained, so as to classify storage devices with similar data retention capabilities, thereby facilitating the application of different categories of storage devices in different demand scenarios, so that storage devices of each category can give full play to their storage capabilities and improve the effective utilization rate of the storage devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flow chart of an embodiment of a classification method for a storage device of the present application;
[0021] Figure 2 is a flow chart of another embodiment of the classification method of the storage device of the present application;
[0022] Figure 3 is a flow chart of another embodiment of the classification method of the storage device of the present application;
[0023] Figure 4 is a voltage distribution diagram of an implementation method in the reading result;
[0024] Figure 5 is a schematic diagram of a type 1 implementation of a storage device;
[0025] Figure 6 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;
[0026] Figure 7 A schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0028] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0029] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0030] See also Figure 1 , Figure 1 It is a flowchart of an embodiment of a classification method for a storage device of the present application.
[0031] Step S11: Obtain the storage time of the data in the storage device.
[0032] The storage device may include but is not limited to storage particles, storage chips, various types of Nand Flash non-volatile memories, solid-state drives, memory cards, NOR FLASH non-volatile memories, etc.
[0033] Due to the working principle of the storage device itself, the data stored in the storage unit gradually changes during use. When the number of data errors reaches a certain level and exceeds the error correction capability of the storage device, the data will be completely damaged and can no longer be read. It takes a certain amount of time from data writing to data complete damage. The length of this time is the length of time the data in this embodiment can be retained. That is, the length of time the storage device effectively stores data.
[0034] This step first obtains the data retentive time of the storage device. The data retentive time characterizes the data retention capability of the storage device. The data retentive time of this embodiment may include the initial data retentive time and / or the erase / write change slope of the data retentive time and other parameters related to the data retentive time. Among them, the initial data retentive time and / or the erase / write change slope of the data retentive time of different types of storage devices may be different, so this embodiment can classify the storage devices based on the initial data retentive time and / or the erase / write change slope of the data retentive time.
[0035] Step S12: Classify the storage devices based on the data retention time to obtain the category of the storage devices.
[0036] In a specific application scenario, this embodiment can classify storage devices according to the difference between the initial data retention time periods of the data retention time periods to obtain the categories of the storage devices.
[0037] In a specific application scenario, if the initial data retention time of storage devices of different categories is the same, this embodiment can classify the storage devices according to the difference between the erase and write change slopes of the data retention time to obtain the category of the storage devices.
[0038] In a specific application scenario, this embodiment can also classify the storage device by the difference between the initial data retention time and the erase / write change slope of the data retention time to obtain the category of the storage device.
[0039] After obtaining the category of the storage device, the storage devices of the same category can be uniformly applied and applied to storage scenarios corresponding to the requirements based on their storage capabilities.
[0040] Through the above steps, the classification method of the storage device of the present embodiment obtains the data retention time of the storage device; based on the data retention time, the storage device is classified to obtain the category of the storage device, so as to classify the storage devices with similar data retention capabilities, so as to facilitate the application of different categories of storage devices in different demand scenarios, so that the storage devices of each category can give full play to their storage capacity and improve the effective utilization rate of the storage devices.
[0041] See also Figure 2 , Figure 2 It is a flowchart of another embodiment of the classification method of the storage device of the present application.
[0042] Step S21: Obtain the initial data retention time of the storage device.
[0043] In a specific application scenario, the initial data retention time of the storage device can be determined from the retention time table based on the type of the storage device. The retention time table is obtained by pre-concentrating the initial data retention time tests on various types of storage devices, and then establishing a corresponding relationship between each type of storage device and each initial data retention time after obtaining the initial data retention time of each type of storage device.
[0044] In a specific application scenario, the storage device may also be tested to obtain the initial data retention time of the storage device. For example, the initial data retention time of the storage device may be obtained by testing the current characteristics of the storage device; the data retention capability of the storage device may also be tested by using the BCH (Bose Chaudhuri Hocquenghem) error correction code to obtain the initial data retention time of the storage device; the storage device may also be read to obtain a voltage distribution diagram of the storage device, and the initial data retention time of the storage device may be obtained based on the spacing of the waveforms in the voltage distribution diagram. The specific test method is not limited here.
[0045] Step S22: performing a preset aging process on the storage device, and obtaining the retention time of the current data of the storage device.
[0046] In a specific application scenario, the preset aging process can perform a small number of preset period erase and write operations on the storage device. The erase and write operations will cause a small amount of aging wear to the storage device, so that the data retention time of the storage device changes. Therefore, the storage device is tested and the current data retention time of the storage device is obtained. The value of the current data retention time can reflect the aging wear of the storage device under the influence of the preset period erase and write operations, and then the classification is performed.
[0047] In a specific application scenario, the preset aging process can be performed by changing the environment of the storage device, such as temperature or humidity. After the environment of the storage device changes, the data retention time of the storage device may change, and then the current data retention time of the storage device is obtained. The environmental anti-interference ability of the storage device can be reflected by the value of the current data retention time, and then classified. The preset aging process can be any operation process that affects the data retention time of the storage device.
[0048] Step S23: Classify the storage devices based on the initial data retainable time length and / or the current data retainable time length.
[0049] The data retention capability of a storage device can be measured by two parameters: one is the initial data retention capability of the storage device, and the other is the current data retention capability after a preset aging process.
[0050] In a specific application scenario, this embodiment can measure the initial data retention of the storage device by the initial data retention time, and use the current data retention time of the storage device after a preset period of erase and write operations to measure the wear rate of the data retention of the storage device.
[0051] In a specific application scenario, this embodiment can also measure the initial data retention of the storage device by the initial data retention time, and use the current data retention time of the storage device after the environment changes to measure the environmental interference resistance of the data retention of the storage device.
[0052] After obtaining the initial data retainable time length and the current data retainable time length, the storage devices are classified based on the initial data retainable time length and the current data retainable time length.
[0053] In a specific application scenario, the data retention of the storage device can be initially classified based on the specific value of the initial data retention time and the corresponding classification threshold. The specific value of the current data retention time can be compared with the corresponding classification threshold to further classify and obtain the category of the storage device.
[0054] In a specific application scenario, the data retention capacity of the storage device may be divided based on a comparison between the current data retention time and a preset current value.
[0055] In a specific application scenario, the difference between the length of time the initial data can be retained and the length of time the current data can be retained can also be calculated. The wear of the storage device after a preset aging process is measured by the length difference, and compared with the corresponding wear threshold, so as to classify the data retention of the storage device and obtain the category of the storage device.
[0056] Through the above steps, the classification method of the storage device of the present embodiment obtains the initial data retention time of the storage device; performs preset aging processing on the storage device, and obtains the current data retention time of the storage device; classifies the storage device based on the initial data retention time and the current data retention time, so as to classify the storage devices with similar data retention capabilities, so as to facilitate the application of different categories of storage devices in different demand scenarios, so that each category of storage devices can give full play to its storage capacity and improve the effective utilization rate of the storage devices.
[0057] See also Figure 3 , Figure 3 It is a flowchart of another embodiment of the classification method of the storage device of the present application.
[0058] Step S31: Obtain the retention time of the initial data in the storage device.
[0059] In a specific application scenario, the storage device may be tested to obtain the initial data retention time of the storage device. In a specific application scenario, the initial data retention time of the storage device may be determined from a retention time table based on the type of the storage device, wherein the retention time table is obtained by establishing a correspondence in advance between the type of the storage device and the initial data retention time obtained by the test.
[0060] Among them, the test of the storage device can be carried out by baking the storage device within a preset temperature range for a preset time, simulating the data retention scenario of the storage device, reading the storage device, obtaining the reading result, and determining the initial data retention time of the storage device based on the reading result. The preset temperature range and the preset time can be determined based on the specific type of the storage device. For example: the preset temperature range can include 40-150 degrees Celsius, specifically 40 degrees Celsius, 45 degrees Celsius, 55 degrees Celsius, 60 degrees Celsius, 67 degrees Celsius, 80 degrees Celsius, 90 degrees Celsius, 100 degrees Celsius, 120 degrees Celsius, 125 degrees Celsius, 136 degrees Celsius, 145 degrees Celsius or 150 degrees Celsius, etc., and the preset time can include 1 minute-20 minutes, specifically 1 minute, 2 minutes, 3 minutes, 5 minutes, 6 minutes, 8 minutes, 9 minutes, 10 minutes, 12 minutes, 14 minutes, 15 minutes, 16 minutes, 17 minutes, 19 minutes or 20 minutes, etc. This is not limited here.
[0061] Wherein, the reading result includes a voltage distribution diagram of the storage device, the voltage distribution diagram uses voltage as the horizontal axis and threshold voltage as the vertical axis, and the voltage distribution diagram includes multiple waveforms, then based on the spacing between two adjacent waveforms in the voltage distribution diagram, the initial data of the storage device can be determined to be retained. Wherein, the spacing between two adjacent waveforms reflects the data retention time of the storage device. The specific calculation of the spacing can use the spacing between two adjacent waveforms at a certain threshold voltage to calculate the data retention time, or it can use the spacing between two adjacent waveforms at a certain voltage threshold and the product of the valley depth between the valley bottoms to calculate the data retention time. The specific spacing calculation is not limited here.
[0062] The step of determining the duration for which the initial data of the storage device can be retained based on the spacing between two adjacent waveforms in the voltage distribution diagram specifically includes: setting a preset voltage threshold; determining a first spacing between two adjacent waveforms at the preset voltage threshold in the voltage distribution diagram; obtaining a second spacing based on the first spacing and the valley depth between the valley bottoms of the two corresponding adjacent waveforms; multiplying the first spacing, the second spacing, and the preset coefficient in sequence to obtain a spacing product; determining the duration for which the initial data can be retained based on the spacing product, wherein the spacing product is proportional to the duration for which the initial data can be retained. The valley bottom is the intersection between the two corresponding adjacent waveforms, and the valley depth is the distance between the intersection and the preset voltage threshold.
[0063] See also Figure 4 , Figure 4 is a voltage distribution diagram of an implementation method in the reading result.
[0064] The voltage distribution diagram of this embodiment is described using two waveforms as an example. When the reading result of the storage device includes multiple waveforms, any two adjacent waveforms can be selected for calculation. The calculation of the data retention time is similar to that of this embodiment.
[0065] The two waveforms of this embodiment include a first waveform 31 and a second waveform 32. A preset voltage threshold T is set, wherein the preset voltage threshold T is set based on manual experience, and can also be adaptively adjusted based on the type of storage device.
[0066] First, determine the first spacing W between the first waveform 31 and the second waveform 32 at the preset voltage threshold T, that is, first determine the first intersection A between the side of the first waveform 31 close to the second waveform 32 and the preset voltage threshold T, and determine the second intersection B between the side of the second waveform 32 close to the first waveform 31 and the preset voltage threshold T, then the spacing between the first intersection A and the second intersection B is the first spacing W.
[0067] Then, based on the first spacing W and the valley depth between the valley bottoms S of the two corresponding adjacent waveforms, the second spacing D is obtained; the first spacing W, the second spacing D and the preset coefficient ρ are multiplied in sequence to obtain the spacing product H. That is, the calculation formula of the spacing product H is:
[0068] H=ρ*W*D (1)
[0069] Among them, the preset coefficient ρ can be determined based on the type of storage device and / or the page read. In a specific application scenario, the TLC type NAND FLASH is used as an example for explanation. According to the TLC principle, the storage unit can be divided into high page up page, middle page mid page and low page low page types. Among them, the high page up page is read twice and has 2 waveforms, the middle page mid page is read 3 times and has 3 waveforms, and the low page low page is read twice and has 2 waveforms. The number of times read in each page is different, and the LdpC low-density parity check code is also different. The more it is read, the larger the LdpC low-density parity check code, that is, the larger the second spacing D, the smaller ρ should be, so as to ensure the normalization between each page or each type of storage device. That is, the calculation of the spacing product H of the 3 waveforms of the middle page mid page, the preset coefficient ρ should be reduced, and the calculation of the spacing product H of the 2 waveforms of the high page up page, the preset coefficient ρ should be increased. The setting of the preset coefficient ρ is like this, and it will not be repeated.
[0070] Finally, the length of time the initial data can be retained is determined based on the spacing product H, where the spacing product H is proportional to the length of time the initial data can be retained, that is, the larger the spacing product H is, the longer the data can be retained, and the smaller the spacing product H is, the shorter the data can be retained. The specific coefficient between the spacing product H and the length of time the data can be retained is set based on actual conditions.
[0071] The initial data retention time of the storage device can be obtained through the above-mentioned test method. Based on different embodiments, the above-mentioned test method can be performed when the retention time table is established in advance, or it can be performed after the classification method starts, which is not limited here.
[0072] Step S32: performing a preset period of erase and write operation on the storage device to perform a preset aging process.
[0073] After determining the initial data retention time of the storage device, the storage device is subjected to a preset cycle of erase / write operations, wherein the erase / write operation is Program / Erase, that is, a cycle of erase / write operations includes one data storage operation and one data erase operation.
[0074] The preset cycle may include but is not limited to a small number of cycles such as 3 cycles, 5 cycles, 6 cycles, 9 cycles or 10 cycles, and can be set based on actual conditions. A small number of preset cycles can reduce the impact of classification testing on the data retention of the storage device.
[0075] Step S33: testing the storage device to obtain the time length for which the current data of the storage device can be retained.
[0076] Specifically, the storage device is baked within a preset temperature range for a preset time, and the storage device is read to obtain a current voltage distribution diagram of the storage device, the voltage distribution diagram including multiple waveforms; based on the spacing between two adjacent waveforms in the current voltage distribution diagram, the duration for which the current data of the storage device can be retained is determined.
[0077] The method for reading the current data retention time in this step is the same as the method for reading the initial data retention time in step S21, which is to bake the storage device within a preset temperature range for a preset time, read the storage device, obtain a voltage distribution diagram, and determine the data retention time of the storage device based on the voltage distribution diagram. Please refer to the previous text for details, which will not be repeated here.
[0078] Among them, the testing method for the storage device in this step is the same as the aforementioned step S21, that is, the method used to test the current data retention time is the same as the method used to test the initial data retention time, so as to measure the initial data retention time and the current data retention time of the storage device under the same measurement system, improve the accuracy of the initial data retention time and the current data retention time, as well as the relative accuracy between the initial data retention time and the current data retention time, thereby improving the accuracy and reliability of subsequent storage device classification.
[0079] Step S34: Perform a first classification of the storage device based on the initial data retention time to obtain a main category of the storage device.
[0080] In a specific application scenario, before classifying the storage devices, this embodiment first determines that there are 4 types of storage devices in total, and the data retention capabilities of the 4 types of storage devices are different.
[0081] See also Figure 5 , Figure 5 This diagram shows a type 1 embodiment of a storage device. The number of erase / write operations PE is used as the horizontal axis, and the data retention time C is used as the vertical axis.
[0082] The categories of the storage devices in this embodiment include: first subcategory a1, second subcategory a2, third subcategory b1 and fourth subcategory b2. PE is the number of erase and write operations, C is the data retention time, and E is the minimum required value for the data retention time of the storage device in use. PEn is the rated number of erase and write operations of the storage device.
[0083] The starting point of the data retention time of the first subcategory a1 and the second subcategory a2 is the same, both L. The starting point of the data retention time of the third subcategory b1 and the fourth subcategory b2 is the same, both F, and is smaller than the starting point L of the data retention time of the first subcategory a1 and the second subcategory a2.
[0084] The initial data retention time L of the first subcategory a1 is relatively large. As PE increases, the data retention time decreases slowly. At the rated PEn, the data retention time is still relatively large.
[0085] The second subcategory a2 has a relatively large initial data retention time L, but as PE increases, the data retention time decreases rapidly; at the rated PEn, the data retention time is close to the minimum required value E and cannot be used reliably.
[0086] The third subcategory b1 has a relatively small initial data retention time F, but as PE increases, the data retention time decreases slowly; at the rated PEn, the data retention time is still relatively large.
[0087] The fourth subcategory b2 has a relatively short initial data retention time F, and as PE increases, the data retention time decreases rapidly; at rated PEn, the data retention time is close to the minimum required value E and cannot be used reliably any more.
[0088] Based on the differences in the initial values of the data retention time of the storage devices of the above subcategories and the differences in the trends of the data retention time as the PE increases, the subcategories of the storage devices can be classified. In other embodiments, when the subcategories of the storage devices include multiple types, the classification method can also be based on the differences in the initial values of the data retention time and the differences in the trends of the data retention time as the PE increases, which will not be repeated.
[0089] When classifying the storage devices, the storage devices are first classified based on the length of time that the initial data can be retained to obtain the main category of the storage devices.
[0090] Specifically, it is determined whether the initial data can be retained for a period greater than a first threshold; when the initial data can be retained for a period greater than the first threshold, the main category of the storage device is determined to be the first main category; when the initial data can be retained for a period not greater than the first threshold, the main category of the storage device is determined to be the second main category. The first main category is a storage device type whose initial data can be retained for a period of L, and the second main category is a storage device type whose initial data can be retained for a period of F.
[0091] The first threshold is a value between L and F, so that different initial data retaining time lengths can be distinguished by comparing the first threshold with the initial data retaining time lengths.
[0092] Step S35: Calculate the erase / write change slope of the storage device using the current data retention time, the initial data retention time and the preset period.
[0093] Specifically, the current data retention time is subtracted from the initial data retention time to obtain the target difference, and the absolute value of the target difference is divided by the preset period to calculate the erase and write change slope of the storage device. That is, the calculation formula of the erase and write change slope of the storage device is as follows:
[0094] θ=|C2-C1| / P (2)
[0095] θ is the erase / write change slope, P is the preset period, C2 is the time the current data can be retained, and C1 is the time the initial data can be retained.
[0096] Step S26: Under the main category of storage devices, the storage devices are secondarily classified based on the erase / write change slope to obtain subcategories of the storage devices.
[0097] In a specific application scenario, in response to the main category of the storage device being the first main category, it is determined whether the erase / write change slope is greater than a second threshold. When the erase / write change slope is greater than the second threshold, the subcategory of the storage device is determined to be the second subcategory a2; when the erase / write change slope is not greater than the second threshold, the subcategory of the storage device is determined to be the first subcategory a1.
[0098] The second threshold is any value between the erase change slope of the first subcategory a1 and the erase change slope of the second subcategory a2, and is used to distinguish the first subcategory a1 and the second subcategory a2 in the first main category. The erase change slope of the first subcategory a1 and the erase change slope of the second subcategory a2 can be calculated based on the above formula (2) after performing erase operations on the first subcategory a1 and the second subcategory a2 for a preset period of time.
[0099] In a specific application scenario, in response to the main category of the storage device being the second main category, it is determined whether the erase-write change slope is greater than a third threshold; when the erase-write change slope is greater than the third threshold, the subcategory of the storage device is determined to be the fourth subcategory b2; when the erase-write change slope is not greater than the third threshold, the subcategory of the storage device is determined to be the third subcategory b1.
[0100] The third threshold is any value between the erasure change slope of the third subcategory b1 and the erasure change slope of the fourth subcategory b2, and is used to distinguish the third subcategory b1 and the fourth subcategory b2 in the second main category. The erasure change slope of the third subcategory b1 and the erasure change slope of the fourth subcategory b2 can be calculated based on the above formula (2) after performing an erasure operation on the third subcategory b1 and the fourth subcategory b2 for a preset period of time.
[0101] The type of storage device can be determined by comparing and classifying the above thresholds. The classified storage devices can be used in storage products with different specifications to improve the storage capacity of the storage devices. For example, all storage devices of the first subcategory a1 are selected to prepare storage products with the same specifications, and all storage devices of the fourth subcategory b2 are selected to prepare storage products with another specifications, and so on.
[0102] Through the above steps, the classification method of the storage device of the present embodiment obtains the initial data retention time of the storage device; performs a preset period of erasing and writing operations on the storage device to perform a preset aging process, and tests the storage device to obtain the current data retention time of the storage device; uses the current data retention time, the initial data retention time and the preset period to calculate the erasing change slope of the storage device, and performs a first classification of the storage device based on the initial data retention time to obtain the main category of the storage device. Under the main category of the storage device, the storage device is secondly classified based on the erasing change slope to obtain the subcategory of the storage device, and then the storage device is classified based on the data retention of the storage device, so as to facilitate the application of different categories of storage devices in different demand scenarios, so that each category of storage devices can give full play to its storage capacity and improve the effective utilization rate of the storage device.
[0103] See also Figure 6 , Figure 66 is a schematic diagram of a framework of an embodiment of an electronic device of the present application. The electronic device 60 includes a memory 61 and a processor 62 coupled to each other, and the processor 62 is used to execute program instructions stored in the memory 61 to implement the steps of the above method embodiment. In a specific implementation scenario, the electronic device 60 may include but is not limited to: a microcomputer, a server, and in addition, the electronic device 60 may also include a laptop, a tablet computer, Nand Flash, etc., which are not limited here.
[0104] Specifically, the processor 62 is used to control itself and the memory 61 to implement the steps of any of the above method embodiments. The processor 62 can also be called a CPU (Central Processing Unit). The processor 62 may be an integrated circuit chip with signal processing capabilities. The processor 62 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 62 can be implemented by an integrated circuit chip.
[0105] The above scheme can classify storage devices based on their data retention capabilities, making it easier to apply different types of storage devices to different demand scenarios, so that each type of storage device can fully utilize its storage capacity and improve the effective utilization rate of the storage device.
[0106] See also Figure 7 , Figure 7 The schematic diagram of the framework of an embodiment of a computer-readable storage medium of the present application is as follows: The computer-readable storage medium 70 stores program instructions 701 that can be executed by a processor, and the program instructions 701 are used to implement the steps of any of the above method embodiments.
[0107] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0109] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0110] 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 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 storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0111] The above are only implementation methods of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A storage device classification method, characterized in that: The storage device classification method comprises: How long the data acquired from the storage device can be retained; Based on the time length for which the data can be retained, the storage device is classified to obtain a category of the storage device.
2. The storage device classification method according to claim 1, characterized in that: The step of obtaining the storage device's data retention time comprises: How long the initial data acquired from the storage device can be retained; Performing a preset aging process on the storage device, and obtaining the time length for which the current data of the storage device can be retained; The step of classifying the storage device based on the data retention time to obtain the category of the storage device comprises: Based on the length of time that the initial data can be retained and / or the length of time that the current data can be retained, the storage device is classified to obtain a category of the storage device.
3. The storage device classification method according to claim 2, characterized in that: The step of performing a preset aging process on the storage device and obtaining the time length for which the current data of the storage device can be retained includes: Performing a preset period of erasing and writing operations on the storage device to perform the preset aging process; The storage device is tested to obtain a time length for which current data of the storage device can be retained.
4. The storage device classification method according to claim 3, characterized in that: The step of testing the storage device to obtain the duration for which current data of the storage device can be retained comprises: Bake the storage device within a preset temperature range for a preset time, read the storage device, and obtain a current voltage distribution diagram of the storage device, wherein the voltage distribution diagram has voltage as the abscissa and threshold voltage as the ordinate, and the voltage distribution diagram includes a plurality of waveforms; Based on the interval between two adjacent waveforms in the current voltage distribution diagram, the duration for which current data of the storage device can be retained is determined.
5. The storage device classification method according to claim 4, characterized in that: The step of determining the duration for which current data of the storage device can be retained based on the distance between two adjacent waveforms in the current voltage distribution diagram comprises: Setting a preset voltage threshold; Determine a first spacing between two adjacent waveforms at the preset voltage threshold in the voltage distribution diagram; Obtaining a second spacing based on the first spacing and the valley depth between the valley bottoms of the two adjacent waveforms; Multiplying the first spacing, the second spacing, and a preset coefficient in sequence to obtain a spacing product; The duration for which the current data can be retained is determined based on the distance product, wherein the distance product is proportional to the duration for which the initial data can be retained.
6. The storage device classification method according to claim 2, characterized in that: The step of obtaining the initial data storage device can retain the length of time includes: Testing the storage device to obtain a time length for which initial data of the storage device can be retained; or The initial data retainable time of the storage device is determined from a retainable time table based on the type of the storage device, wherein the retainable time table is obtained by establishing a correspondence in advance between the type of the storage device and the initial data retainable time obtained by testing.
7. The storage device classification method according to any one of claims 2 to 6, characterized in that: The step of classifying the storage device based on the initial data retention time and / or the current data retention time to obtain the category of the storage device comprises: Performing a first classification on the storage device based on the retention time of the initial data to obtain a main category of the storage device; The erase / write change slope of the storage device is calculated by using the current data retention time, the initial data retention time and the preset period; Under the main category of the storage device, the storage device is secondarily classified based on the erase / write change slope to obtain a subcategory of the storage device.
8. The storage device classification method according to claim 7, characterized in that: The step of calculating the erase / write change slope of the storage device by using the current data retention time, the initial data retention time and the preset period comprises: The target difference is obtained by subtracting the initial data retention time from the current data retention time, and the absolute value of the target difference is divided by the preset period to calculate the erase / write change slope of the storage device.
9. The storage device classification method according to claim 7, characterized in that: The step of performing a first classification of the storage device based on the retention time of the initial data to obtain the main category of the storage device comprises: Determining whether the initial data can be retained for a period of time greater than a first threshold; When the initial data retention time is longer than the first threshold, determining that the main category of the storage device is the first main category; When the initial data retainable time length is not greater than the first threshold, it is determined that the main category of the storage device is the second main category.
10. The storage device classification method according to claim 9, characterized in that: The step of performing a second classification on the storage device based on the erase / write change slope under the main category of the storage device to obtain a subcategory of the storage device comprises: In response to the main category of the storage device being the first main category, determining whether the erase / write change slope is greater than a second threshold; When the erase / write change slope is not greater than the second threshold, the subcategory of the storage device is determined to be the first subcategory; when the erase / write change slope is greater than the second threshold, the subcategory of the storage device is determined to be the second subcategory; In response to the main category of the storage device being the second main category, determining whether the erase / write change slope is greater than a third threshold; When the erase / write change slope is not greater than the third threshold, the subcategory of the storage device is determined to be the third subcategory; when the erase / write change slope is greater than the third threshold, the subcategory of the storage device is determined to be the fourth subcategory.
11. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the classification method of the storage device according to any one of claims 1 to 10.
12. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the classification method for the storage device according to any one of claims 1 to 10 is implemented.