Storage device testing method, electronic device and storage medium
By performing preset times on the storage device, abnormal physical blocks are identified, and the problem of inefficient testing of storage devices is solved and efficient and accurate test results are achieved.
Patent Information
- Application Number
- CN202410040076.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2025-07-11
AI Technical Summary
Existing storage device testing methods are inefficient and cannot effectively identify functional failure defects, especially in full-disk wear tests.
Using preset times for the storage device, the abnormal physical block is identified through Flash Write operation, and the curves of the erase test and wear test are constructed to determine the test results.
Improve the testing efficiency and accuracy of storage devices, ensure product quality, and avoid unreasonable testing settings caused by different equipment types.
Smart Images

Figure CN120299500A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of testing technologies, and in particular, to a method for testing a storage device, an electronic device, and a storage medium. Background Art
[0002] Due to problems such as process fluctuations, storage devices (such as NAND flash memories) may have defects in which their functions fail. In order to ensure the ex-factory quality of storage devices, tests are usually performed before the storage devices leave the factory.
[0003] Currently, the full-disk wear method is usually adopted to perform ex-factory tests on storage devices. However, since this method requires multiple erasures of the storage device and the time spent on each erasure is relatively long, the test efficiency is low. Summary of the Invention
[0004] In view of the above, it is necessary to provide a method for testing a storage device, an electronic device, and a storage medium, which can solve the technical problem of how to improve the test efficiency of a storage device while ensuring the ex-factory quality of the storage device.
[0005] On the one hand, this application proposes a method for testing a storage device, which is applied to an electronic device. The electronic device includes a storage device. The method for testing the storage device includes: performing an erasure test on the storage device or a first risk physical block in the storage device that meets a first preset condition for a preset number of times, identifying a first abnormal physical block and a second risk physical block that meets a second preset condition from the storage device or the first risk physical block, where the erasure test includes a Flash Write operation; performing a wear test on the second risk physical block, and identifying a second abnormal physical block from the second risk physical block; determining the test result of the storage device according to the number of the first abnormal physical block and the second abnormal physical block.
[0006] According to an embodiment of this application, before performing an erasure test on a first risk physical block in the storage device that meets a first preset condition for a preset number of times, the method further includes: performing a wear test on the storage device, and identifying a physical block that meets the first preset condition from the storage device as the first risk physical block.
[0007] According to an embodiment of the present application, before performing a wear test on the storage device and identifying a physical block that meets the first preset condition from the storage device as the first risky physical block, the method further includes: obtaining a test requirement, where the test requirement includes an expected test duration; if the test requirement does not include a package test on the storage device, comparing the expected test duration with a preset duration; if the expected test duration is less than the preset duration or if the test requirement includes the package test, performing a wear test on the storage device and identifying a physical block that meets the first preset condition from the storage device as the first risky physical block; or if the expected test duration is greater than or equal to the preset duration, not performing a wear test on the storage device.
[0008] According to an embodiment of the present application, performing a wear test on the storage device and identifying a physical block that meets the first preset condition from the storage device as the first risky physical block includes: performing the wear test on each physical block in the storage device; determining a physical block that passes the wear test as the first risky physical block that meets the first preset condition.
[0009] According to an embodiment of the present application, the method further includes: performing multiple rounds of write - erase tests on a first storage device and multiple rounds of wear tests on a second storage device, where the device types of the first storage device and the second storage device are the same as the device type of the storage device; performing a baking process on the first storage device after each round of write - erase test and reading a first correctable error parameter of the first storage device after each baking process; performing a baking process on the second storage device after each round of wear test and reading a second correctable error parameter of the second storage device after each baking process; generating a first curve of the write - erase test based on multiple first correctable error parameters and the number of write - erase times of the first storage device, and generating a second curve of the wear test based on multiple second correctable error parameters and the number of wear times of the second storage device.
[0010] According to an embodiment of the present application, the method further includes: determining a first configuration time from the first curve according to a target correctable error parameter value, and determining a second configuration time from the second curve according to the target correctable error parameter value; determining a proportionality factor between the write - erase test and the wear test according to a ratio of the first configuration time to the second configuration time.
[0011] According to an embodiment of the present application, the determining factor of the preset number includes the proportionality factor.
[0012] According to an embodiment of the present application, determining the test result of the storage device according to the quantities of the first abnormal physical block and the second abnormal physical block includes: counting the quantities of the first abnormal physical block and the second abnormal physical block as the total number of abnormalities; if the total number of abnormalities is greater than or equal to the preset quantity, determining that the storage device is an abnormal device; or if the total number of abnormalities is less than the preset quantity, determining that the storage device is a normal device.
[0013] On the other hand, the present application also provides a storage device testing apparatus running on an electronic device, where the electronic device includes a storage device, and the storage device testing apparatus includes: a testing unit configured to perform a preset number of erase-write tests on the storage device or a first risk physical block in the storage device that meets a first preset condition, and identify a first abnormal physical block and a second risk physical block that meets a second preset condition from the storage device or the first risk physical block, where the erase-write test includes a Flash Write operation; the testing unit is further configured to perform a wear test on the second risk physical block and identify a second abnormal physical block from the second risk physical block; and a determination unit configured to determine the test result of the storage device according to the quantities of the first abnormal physical block and the second abnormal physical block.
[0014] On the other hand, the present application also provides an electronic device, which includes: a storage device storing computer-readable instructions; and a processor configured to execute the computer-readable instructions stored in the storage device to implement the storage device testing method.
[0015] On the other hand, the present application also provides a storage medium storing computer-readable instructions, where the computer-readable instructions are executed by a processor in an electronic device to implement the storage device testing method.
[0016] It can be seen from the above technical solutions that in the embodiment of the present application, by performing an erase-write test on the storage device or the first risk physical block, since the Flash Write operation writes all word lines of the entire physical block in the storage device at the same time, the erase-write efficiency of the storage device can be improved, thereby improving the test efficiency of the storage device. In addition, by further performing a wear test on the second risk physical block, the second abnormal physical block can be accurately identified, thereby improving the accuracy of the test result to ensure the product quality of the storage device. Therefore, the embodiment of the present application realizes improving the test efficiency of the storage device while ensuring the product quality of the storage device. Description of the Drawings
[0017] Figure 1 is a schematic structural diagram of an electronic device for implementing the storage device testing method provided by an embodiment of the present application.
[0018] Figure 2 is a flowchart of a storage device testing method provided by an embodiment of the present application.
[0019] Figure 3 is a schematic diagram of a first curve and a second curve provided by an embodiment of the present application.
[0020] Figure 4 is a voltage schematic diagram of a write-erase test and a wear test provided by an embodiment of the present application.
[0021] Figure 5 is a flowchart of a storage device testing method provided by another embodiment of the present application.
[0022] Figure 6 is a functional module diagram of a storage device testing apparatus provided by an embodiment of the present application. Detailed Embodiments
[0023] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0024] It should be noted that, in the present application, "at least one" means one or more, and "a plurality" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. Terms such as "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0025] In the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0026] As Figure 1 shown, is a schematic structural diagram of an electronic device for implementing the storage device testing method provided by an embodiment of the present application.
[0027] In the embodiments of the present application, the storage device testing method is applied to one or more electronic devices 1. An electronic device 1 is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored computer-readable instructions. Its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.
[0028] The electronic device 1 can be any electronic product that can interact with users. For example, a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an Internet Protocol Television (IPTV), a smart wearable device, etc.
[0029] The electronic device 1 may include a network device and / or a user device. Among them, the network device includes, but is not limited to, a single network electronic device, a group of electronic devices composed of multiple network electronic devices, or a cloud composed of a large number of hosts or network electronic devices based on cloud computing (Cloud Computing).
[0030] The network where the electronic device 1 is located includes, but is not limited to: the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.
[0031] In the embodiments of the present application, the electronic device 1 includes, but is not limited to, a storage device 12, a processor 13, and computer-readable instructions stored in the storage device 12 and executable on the processor 13, such as a storage device testing program.
[0032] Those skilled in the art can understand that the schematic diagram is only an example of the electronic device 1 and does not constitute a limitation on the electronic device 1. It may include more or fewer components than shown in the figure, or combine some components, or different components. For example, the electronic device 1 may also include input / output devices, network access devices, buses, etc.
[0033] The processor 13 can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or a processor, or any conventional processor, etc. The processor 13 is the computing core and control center of the electronic device 1, connecting various parts of the entire electronic device 1 through various interfaces and lines, and executing the operating system of the electronic device 1 and various installed application programs, program codes, etc.
[0034] The storage device 12 can be an external storage device and / or an internal storage device of the electronic device 1. Further, the storage device 12 can be a storage device in physical form, such as a memory stick, a Trans-flash Card (TF card), etc.
[0035] Combined with Figure 2 , the storage device 12 in the electronic device 1 stores computer-readable instructions, and the processor 13 can execute the computer-readable instructions stored in the storage device 12 to implement the storage device test method as Figure 2 shown.
[0036] As Figure 2 shown, it is a flowchart of the storage device test method provided by an embodiment of the present application. The storage device test method is applied to an electronic device (such as the electronic device 1 in Figure 1 ). The electronic device runs a storage device. According to different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.
[0037] 201. Perform a preset number of erase and write tests on the storage device, and identify the first abnormal physical block and the second risky physical block that meets the second preset condition from the storage device.
[0038] In at least one embodiment of the present application, the storage device can be a NAND flash memory (Solid State Drive, SSD). The NAND flash memory has a larger capacity than the NOR flash memory. The NAND flash memory can include multiple blocks, and each block can include multiple word lines (WLs). For example, block1 includes WL0, WL1, WL2,..., WLn.
[0039] In at least one embodiment of the present application, the preset number of times is generally less than a certain number of times. For example, the preset number of times is less than 100 times. By limiting the value of the preset number of times, the lifespan of the storage device can be ensured. The determining factors of the preset number of times include: the expected test duration, the efficiency of the erase-write test on the storage device, and the proportionality factor of the erase-write test to the wear test.
[0040] The proportionality factor indicates the effect ratio of the erase-write test to the wear test. The electronic device determines the first configuration times from the first curve according to the target correctable error parameter value, and determines the second configuration times from the second curve according to the target correctable error parameter value. Further, the electronic device determines the proportionality factor of the erase-write test to the wear test according to the ratio of the first configuration times to the second configuration times. Among them, the target correctable error parameter value can be set according to the user's test requirements for the storage device. For example, the target correctable error parameter value can be set to 40. Combined with Figure 3 the determination of the proportionality factor is described. If the target correctable error parameter value is 40, then the first configuration times determined from the first curve is 225, and the second configuration times determined from the second curve is 180. After determination, the proportionality factor is 1.25, that is, the effect of 1.25 times of the erase-write test is equivalent to the effect of 1 time of full disk wear. Through the constructed first curve and second curve of the present application, the first configuration times and the second configuration times can be quickly determined, thereby improving the determination efficiency of the proportionality factor.
[0041] Specifically, the electronic device performs multiple rounds of erase-write tests on the first storage device and multiple rounds of wear tests on the second storage device. The device types of the first storage device and the second storage device are the same as the device type of the storage device respectively. Further, the electronic device performs baking treatment on the first storage device after each round of erase-write test, and reads the first correctable error parameter of the first storage device after each baking treatment. At the same time, the electronic device performs baking treatment on the second storage device after each round of wear test, and reads the second correctable error parameter of the second storage device after each baking treatment. Furthermore, the electronic device generates the first curve of the erase-write test according to multiple first correctable error parameters and the number of erase-write times of the first storage device, and generates the second curve of the wear test according to multiple second correctable error parameters and the number of wear times of the second storage device. The electronic device can control the baking device to perform baking treatment on the first storage device after the erase-write test and the second storage device after the wear test. The electronic device can control the baking temperature of the baking device to be 125 °C and the baking duration to be 3 hours. Combined with Figure 3 the first curve and the second curve are described. The abscissas of the first curve and the second curve are the number of tests, and the ordinates are the correctable error parameters.
[0042] By controlling the device types of the first storage device and the second storage device to be the same as the device type of the storage device respectively, this application can avoid the problem of unreasonable preset number of times caused by different device types. By baking the first storage device after each round of write-erase test and the second storage device after wear test, the first correctable parameter and the second correctable parameter can be expanded simultaneously, thereby avoiding the inability to accurately generate the first curve and the second curve due to the reading error of the first correctable parameter and the second correctable parameter, and improving the generation accuracy of the first curve and the second curve.
[0043] In at least one embodiment of this application, the write-erase test includes a Flash Write operation and an erase operation. The erase operation instructs to perform a character erase operation on the storage device, and the Flash Write operation instructs to perform a character write operation on the storage device. When writing virtual data to the storage device, the Flash Write operation can ensure that the storage device will not be damaged. The second preset condition can be set as the physical block that passes the write-erase test. The second risky physical block is the physical block that can successfully execute the erase operation and the Flash Write operation, and the first abnormal physical block is the physical block that cannot successfully execute the erase operation or the Flash Write operation.
[0044] In another embodiment, the scaling factor can also be determined according to the ratio of the number of times corresponding to the same voltage value in the write-erase test and the wear test. Combine Figure 4 Describe the voltage schematic diagrams of the write-erase test and the wear test. As Figure 4 shown, Figure 4 shows the voltage conditions after programming and erasing in the full-disk SLC wear test of the storage device, Figure 4 and also shows the voltage conditions after the Flash Write operation on the storage device. Among them, the voltage after the Flash Write operation is between the erase state and the programming state in the full-disk SLC wear test.
[0045] 202, perform a wear test on the second risky physical block, and identify the second abnormal physical block from the second risky physical block.
[0046] In at least one embodiment of the present application, the wear test includes an erase operation, a write operation, and a read operation. The wear test includes a single-chip wear test and a multi-chip wear test. Among them, according to the actual production situation, a full SLC wear test is performed on the second risky physical block, or a full TLC wear test is performed on the second risky physical block. The number of wear tests can be set according to the expected test duration of the storage device. For example, the number of wear tests can usually be set to 1 or 2. The second abnormal physical block is a physical block that cannot successfully execute an erase operation, a write operation, or a read operation. By further performing a wear test on the second risky physical block, the present application can avoid missing the second abnormal physical block due to the inability of the erase / write test to comprehensively identify bad blocks, and improve the comprehensiveness of bad block identification in the storage device.
[0047] Specifically, when the electronic device performs a wear test on the second risky physical block and identifies the second abnormal physical block from the second risky physical block, it includes: the electronic device performs a character erase operation on the second risky physical block. If the character erase operation on the second risky physical block is successful, a preset character is written into the second risky physical block. If the writing of the preset character into the second risky physical block is successful, the character is read from the second risky physical block; if the reading of the character from the second risky physical block is successful, the read character is compared with the preset character. If the read character is the same as the preset character, it is determined that the second risky physical block is a normal physical block. If the read character is different from the preset character, the number of characters that do not match the preset character is counted. If this number is greater than or equal to the ECC threshold, it is determined that the second risky physical block is the second abnormal physical block.
[0048] In one embodiment, the electronic device performs a full wear test on the second risky physical block and identifies the second abnormal physical block from the second risky physical block. By performing a full wear test on the second risky physical block, the present application can improve the accuracy of identifying the second abnormal physical block.
[0049] In another embodiment, the electronic device performs a full-disk wear test on the second risky physical block.
[0050] 203. Determine the test result of the storage device according to the number of the first abnormal physical blocks and the second abnormal physical blocks.
[0051] In at least one embodiment of the present application, the test results include: the storage device is an abnormal device, and the storage device is a normal device.
[0052] In at least one embodiment of the present application, the electronic device determines the test result of the storage device according to the quantities of the first abnormal physical block and the second abnormal physical block, including: The electronic device counts the quantities of the first abnormal physical block and the second abnormal physical block as the total number of abnormalities. If the total number of abnormalities is greater than or equal to a preset quantity, the electronic device determines that the storage device is an abnormal device. If the total number of abnormalities is less than the preset quantity, the electronic device determines that the storage device is a normal device. Wherein, the preset quantity can be set according to actual requirements. For example, the preset quantity is 20.
[0053] As can be seen from the above technical solutions, in the embodiment of the present application, by performing a write-erase test on the storage device, since the Flash Write operation writes to all word lines of the entire physical block in the storage device at the same time, the write-erase efficiency of the storage device can be improved, thereby improving the test efficiency of the storage device. In addition, by further performing a wear test on the second risky physical block, the second abnormal physical block can be accurately identified, thereby improving the accuracy of the test result to ensure the product quality of the storage device. Therefore, the embodiment of the present application realizes improving the test efficiency of the storage device while ensuring the product quality of the storage device.
[0054] As Figure 5 shown, it is a flowchart of a storage device test method provided by another embodiment of the present application. The storage device test method is applied to an electronic device (such as Figure 1 the electronic device 1 therein). The electronic device runs a storage device. According to different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.
[0055] 501, perform a wear test on the storage device, and identify the physical blocks that meet the first preset condition from the storage device as the first risky physical blocks.
[0056] In at least one embodiment of the present application, the first preset condition can be set as the physical blocks that pass the wear test, and the first risky physical blocks are the physical blocks in the storage device that pass the wear test.
[0057] In at least one embodiment of the present application, before performing a wear test on a storage device and identifying a physical block that meets the first preset condition from the storage device as a first risk physical block, the electronic device obtains a test requirement, the test requirement includes an expected test duration, if the test requirement includes a packaging test of the storage device, the electronic device performs a wear test on the storage device, and identifies a physical block that meets the first preset condition from the storage device as a first risk physical block. If the test requirement does not include a packaging test, the electronic device compares the expected test duration with the preset duration, if the expected test duration is less than the preset duration, the electronic device performs a wear test on the storage device, and identifies a physical block that meets the first preset condition from the storage device as a first risk physical block. If the expected test duration is greater than or equal to the preset duration, the electronic device does not perform a wear test on the storage device. Among them, the expected test duration is an estimated duration for testing the storage device, the expected test duration can be determined based on the duration of the actual erase and write test of the storage device in the past, and the preset duration is set by the user according to actual needs, for example, the expected test duration can be set to 100s, and the preset duration can be set to 120s. When the test requirements include packaging testing of storage devices, the present application can identify physical blocks with packaging problems from the storage devices by performing wear testing on the storage devices. When the test requirements do not include packaging testing, by comparing the expected test duration with the preset duration, and then performing wear testing on the storage devices when the expected test duration is less than the preset duration, more abnormal physical blocks can be identified from the storage devices when the test time is relatively sufficient, thereby improving the accuracy of the test results.
[0058] In at least one embodiment of the present application, the electronic device performs a wear test on the storage device, and identifying a physical block that meets a first preset condition from the storage device as a first risk physical block includes:
[0059] The electronic device performs a wear test on all physical blocks in the storage device, and determines the physical blocks that pass the wear test as first risk physical blocks that meet the first preset condition. Specifically, the manner in which the electronic device performs a wear test on each physical block in the storage device can refer to the above Figure 2 The manner in which the electronic device performs a wear test on the second risk physical block will not be described again here.
[0060] 502 , performing a preset number of erase and write tests on the first risk physical block, and identifying a first abnormal physical block and a second risk physical block meeting a second preset condition from the first risk physical block.
[0061] 503 , perform a wear test on the second risk physical block, and identify a second abnormal physical block from the second risk physical block.
[0062] 504 , determining a test result of the storage device according to the number of the first abnormal physical blocks and the number of the second abnormal physical blocks.
[0063] For details of steps 502-504, please refer to the above Figure 2 The detailed description of steps 201-203 is not repeated here.
[0064] By performing a wear test on the storage device, the embodiment of the present application can identify more abnormal physical blocks from the storage device when there is sufficient test time or there is a need for packaging test of the storage device, so as to improve the accuracy of the test result.
[0065] like Figure 6 , which is a functional module diagram of a storage device testing device provided in an embodiment of the present application. The storage device testing device 11 runs on an electronic device, and the electronic device runs a storage device. The storage device testing device 11 includes a testing unit 110, a determining unit 111, an acquiring unit 112, a comparing unit 113, a reading unit 114, and a generating unit 115. The module / unit referred to in the present application refers to a series of computer-readable instruction segments that can be acquired by the processor 13 and can complete a fixed function, which are stored in the storage device 12.
[0066] The test unit 110 is used to perform a preset number of erase and write tests on the storage device or a first risk physical block in the storage device that meets the first preset condition, identify a first abnormal physical block and a second risk physical block that meets the second preset condition from the storage device or the first risk physical block, and the erase and write test includes a Flash Write operation; the test unit 110 is also used to perform a wear test on the second risk physical block and identify a second abnormal physical block from the second risk physical block; the determination unit 111 is used to determine the test result of the storage device according to the number of the first abnormal physical blocks and the second abnormal physical blocks.
[0067] The testing unit 110 is further configured to perform a wear test on the storage device, and identify a physical block that meets a first preset condition from the storage device as a first risk physical block.
[0068] The acquisition unit 112 is used to acquire the test requirement, which includes the expected test duration; the comparison unit 113 is used to compare the expected test duration with the preset duration if the test requirement does not include a packaging test on the storage device; the test unit 110 is also used to perform a wear test on the storage device if the expected test duration is less than the preset duration or if the test requirement includes a packaging test, and identify a physical block that meets the first preset condition from the storage device as a first risk physical block; or the test unit 110 is also used to not perform a wear test on the storage device if the expected test duration is greater than or equal to the preset duration.
[0069] The test unit 110 is further configured to perform multiple rounds of erase-write tests on the first storage device and multiple rounds of wear tests on the second storage device, where the device types of the first storage device and the second storage device are the same as the device type of the storage device; the reading unit 114 is configured to perform baking processing on the first storage device after each round of erase-write test and read the first correctable error parameter of the first storage device after each baking processing; the reading unit 114 is further configured to perform baking processing on the second storage device after each round of wear test and read the second correctable error parameter of the second storage device after each baking processing; the generating unit 115 is configured to generate a first curve of the erase-write test according to multiple first correctable error parameters and the number of erase-write times of the first storage device, and generate a second curve of the wear test according to multiple second correctable error parameters and the number of wear times of the second storage device.
[0070] The obtaining unit 111 is configured to determine a first configuration time from the first curve according to the target correctable error parameter value and determine a second configuration time from the second curve according to the target correctable error parameter value; the determining unit 111 is further configured to determine a scale factor of the erase-write test and the wear test according to the ratio of the first configuration time to the second configuration time.
[0071] If the modules / units integrated in the electronic device 1 are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, all or part of the processes of implementing the methods in the above embodiments of the present application can also be completed by instructing relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium. When the computer-readable instructions are executed by a processor, the steps of the above various method embodiments can be implemented.
[0072] Among them, the computer-readable instructions include computer-readable instruction codes, and the computer-readable instruction codes can be in the form of source code, object code, executable files or some intermediate forms, etc. The computer-readable medium can include: any entity or device capable of carrying the computer-readable instruction code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory).
[0073] The storage device 12 can be used to store computer-readable instructions and / or modules. The processor 13 realizes various functions of the electronic device 1 by running or executing the computer-readable instructions and / or modules stored in the storage device 12 and by calling the data stored in the storage device 12. The storage device 12 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the electronic device. The storage device 12 can include non-volatile and volatile storage devices, such as: hard disks, memories, plug-in hard disks, smart media cards (SMCs), secure digital (SD) cards, flash cards, at least one magnetic disk storage device, flash device, or other storage devices.
[0074] Exemplarily, the computer-readable instructions can be divided into one or more modules / units. One or more modules / units are stored in the storage device 12 and executed by the processor 13 to complete this application. One or more modules / units can be a series of computer-readable instruction segments capable of completing specific functions, and the computer-readable instruction segments are used to describe the execution process of the computer-readable instructions in the electronic device 1. For example, the computer-readable instructions can be divided into a test unit 110, a determination unit 111, an acquisition unit 112, a comparison unit 113, a reading unit 114, and a generation unit 115.
[0075] For the detailed content of the functions of each module / unit, reference can be made to the detailed description above Figure 2 - 6 and will not be described repeatedly here.
[0076] In the embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division, and there can be other division methods in actual implementation.
[0077]
[0078] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0079] In addition, in each embodiment of the present application, the various functional modules may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0080] Therefore, from any perspective, the embodiments should be regarded as exemplary and non-limiting. The scope of the present application is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be encompassed within the present application. Any appended drawing reference signs in the claims should not be regarded as limiting the claimed rights.
[0081] In addition, it is obvious that the word "including" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices can also be implemented by one unit or device through software or hardware. Words such as first, second, etc. are used to denote names and do not denote any particular order.
[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit them. Although the present application has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present application can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present application.
Claims
1. A storage device testing method, applied to an electronic device, characterized in that The electronic device includes a storage device, and the storage device testing method includes: Performing a preset number of erase-write tests on the storage device or a first risky physical block in the storage device that meets a first preset condition, identifying a first abnormal physical block and a second risky physical block that meets a second preset condition from the storage device or the first risky physical block, where the erase-write test includes a Flash Write operation; Performing a wear test on the second risky physical block and identifying a second abnormal physical block from the second risky physical block; Determining the test result of the storage device according to the quantities of the first abnormal physical block and the second abnormal physical block.
2. The storage device testing method according to claim 1, wherein Before performing the preset number of erase-write tests on the first risky physical block in the storage device that meets the first preset condition, the method further includes: Performing a wear test on the storage device and identifying a physical block that meets the first preset condition in the storage device as the first risky physical block.
3. The storage device testing method according to claim 2, wherein Before performing the wear test on the storage device and identifying a physical block that meets the first preset condition in the storage device as the first risky physical block, the method further includes: Obtaining a test requirement, where the test requirement includes an expected test duration; If the test requirement does not include a package test for the storage device, comparing the expected test duration with a preset duration; If the expected test duration is less than the preset duration or if the test requirement includes the package test, performing a wear test on the storage device and identifying a physical block that meets the first preset condition in the storage device as the first risky physical block; or If the expected test duration is greater than or equal to the preset duration, not performing a wear test on the storage device.
4. The storage device testing method according to claim 2, wherein The performing a wear test on the storage device and identifying a physical block that meets the first preset condition in the storage device as the first risky physical block includes: Performing the wear test on each physical block in the storage device; Determining the physical blocks that pass the wear test as the first risky physical blocks that meet the first preset condition.
5. The storage device testing method according to claim 1, wherein, The method further includes: Performing multiple rounds of erase-write tests on a first storage device and performing multiple rounds of wear tests on a second storage device, where the device types of the first storage device and the second storage device are the same as the device type of the storage device; Performing a baking process on the first storage device after each round of erase-write tests and reading a first error-correcting parameter of the first storage device after each baking process; Performing a baking process on the second storage device after each round of wear tests and reading a second error-correcting parameter of the second storage device after each baking process; Generating a first curve of the erase-write test according to multiple of the first error-correcting parameters and the number of erase-write times of the first storage device, and generating a second curve of the wear test according to multiple of the second error-correcting parameters and the number of wear times of the second storage device.
6. The storage device testing method according to claim 5, wherein, The method further includes: Determine a first configuration time from the first curve according to the target correctable parameter value, and determine a second configuration time from the second curve according to the target correctable parameter value; Determine a scale factor of the erase test and the wear test according to a ratio of the first configuration time to the second configuration time.
7. The storage device testing method according to claim 6, wherein The determining factor of the preset number of times includes the scale factor.
8. The storage device testing method according to claim 1, characterized in that, The determining the test result of the storage device according to the number of the first abnormal physical blocks and the number of the second abnormal physical blocks includes: Count the number of the first abnormal physical blocks and the number of the second abnormal physical blocks as the total number of abnormalities; If the total number of abnormalities is greater than or equal to the preset number, determine that the storage device is an abnormal device; or If the total number of abnormalities is less than the preset number, determine that the storage device is a normal device.
9. An electronic device, characterized in that, The electronic device includes: A storage device storing computer-readable instructions; and A processor that executes the computer-readable instructions stored in the storage device to implement the storage device test method according to any one of claims 1 to 8.
10. A storage medium, characterized in that: Computer-readable instructions are stored in the storage medium, and the computer-readable instructions are executed by a processor in an electronic device to implement the storage device test method according to any one of claims 1 to 8.