Processing method of storage device, electronic equipment and storage medium
By performing wear tests on storage devices and marking bad blocks when electronic devices are idle, the problems of heavy pre-shipment testing tasks and data loss of storage devices are solved, thereby reducing testing costs and early failure rates.
Patent Information
- Application Number
- CN202411070934.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2026-02-06
AI Technical Summary
Existing technologies require aging tests before storage devices leave the factory, which increases the workload of production testing and makes it difficult to effectively identify bad blocks, easily leading to data loss and premature failure.
After the storage devices leave the factory, wear testing is performed by the electronic devices during idle time. By conducting wear tests on all storage blocks and marking bad blocks, data is prevented from being written to bad blocks.
This reduces testing tasks at the production testing end, lowers testing costs for storage devices, effectively avoids data loss, and reduces the early failure rate of storage devices.
Smart Images

Figure CN121483347A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of memory device testing, in particular to a memory device processing method, an electronic device and a storage medium. BACKGROUND
[0002] Before being shipped, a memory device needs to be tested for performance, so as to ensure that the performance of the memory device used by an electronic device is in an optimal state after the memory device is installed in the electronic device. For example, a manufacturer uses a production test terminal to perform aging test (wear test) on the memory device, so as to reduce the early failure rate of the electronic device when using the memory device after the memory device is installed in the electronic device.
[0003] However, the aging test will increase the workload of the production test terminal. SUMMARY
[0004] The present application provides a memory device processing method, an electronic device and a storage medium, which can perform wear test on the memory device after the memory device is shipped, and the wear test task is performed by the electronic device, so as to reduce the test task of the production test terminal, and in the wear test process, the bad blocks in the memory device can be marked, so as to avoid data loss caused by writing data into the bad blocks.
[0005] To solve the above technical problems, the present application provides a memory device processing method, the memory device is set in an electronic device after being shipped, and the processing method comprises: performing wear test on all storage blocks in the memory device when the electronic device is idle; wherein the memory device has not been subjected to the wear test before being shipped; and in the wear test process, in response to failure of executing a test instruction on any storage block, marking the corresponding storage block as a bad block.
[0006] In some embodiments, performing wear test on all storage blocks in the memory device comprises: obtaining a wear frequency corresponding to the memory device; and performing wear test on all storage blocks in the memory device according to the wear frequency.
[0007] In some embodiments, performing wear test on all storage blocks in the memory device according to the wear frequency comprises: obtaining an actual wear frequency performed in the current wear test process; and updating the wear frequency by using the actual wear frequency.
[0008] In some embodiments, obtaining the wear frequency corresponding to the memory device comprises: obtaining a current wear task, and obtaining the wear frequency corresponding to the memory device from the current wear task.
[0009] In some embodiments, before performing wear testing on all memory blocks in the memory device, the method further includes: obtaining the wear test power consumption requirements corresponding to the electronic device; dividing the total number of wear cycles of the memory device into at least two wear tasks according to the wear test power consumption requirements, with each wear task corresponding to a number of wear cycles to be performed; and setting a task execution time period for each wear task.
[0010] In some embodiments, the power consumption consumed in performing at least two wear tasks is less than or equal to the power consumption required by the wear test power consumption requirements.
[0011] In some embodiments, before performing wear testing on all memory blocks in the storage device, the method further includes: obtaining product parameters of the electronic device; and determining the total number of wear cycles of the storage device based on the product parameters.
[0012] In some embodiments, determining the total number of wear cycles for a storage device based on product parameters includes: obtaining a default number of wear cycles corresponding to the storage device type; wherein the default number of wear cycles is determined based on the early failure characteristics of the storage device of the storage device type; and adjusting the default number of wear cycles based on product parameters to obtain the total number of wear cycles.
[0013] To address the aforementioned technical problems, this application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned processing method of the memory device.
[0014] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, is used to implement the aforementioned processing method of the storage device.
[0015] The memory device processing method provided in some embodiments of this application applies to memory devices installed in electronic devices after they have left the factory. The processing method includes: performing wear tests on all memory blocks in the memory device when the electronic device is idle; wherein the wear test was not performed on the memory device before it left the factory; during the wear test, in response to a failure to execute a test instruction on any memory block, the corresponding memory block is marked as a bad block. Through this method, wear testing is performed on the memory device in the electronic device after it has left the factory, thereby reducing the testing tasks on the memory device at the production testing end and effectively reducing the testing cost of the memory device. Furthermore, during the wear test, bad blocks in the memory device can be marked to avoid writing data to bad blocks and causing data loss. Also, performing wear testing at the electronic device end can effectively reduce the early failure rate of the memory device to a certain extent. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0017] Figure 1 This is a flowchart illustrating the processing method of the storage device in some embodiments of this application;
[0018] Figure 2 This is a schematic diagram of the process for obtaining the number of wear cycles based on wear tasks in some embodiments of this application;
[0019] Figure 3 This is a schematic diagram of the process for obtaining the total number of wear cycles in some embodiments of this application;
[0020] Figure 4 This is a schematic diagram of the process for performing wear testing on all memory blocks in a storage device according to some embodiments of this application;
[0021] Figure 5 This is a flowchart illustrating the processing method of the storage device in some embodiments of this application;
[0022] Figure 6 This is a flowchart illustrating the processing method of the storage device in some embodiments of this application;
[0023] Figure 7 This is a flowchart illustrating the processing method of the storage device in some embodiments of this application;
[0024] Figure 8 This is a flowchart illustrating the processing method of the storage device in some embodiments of this application;
[0025] Figure 9 These are schematic diagrams of the electronic devices in some embodiments of this application;
[0026] Figure 10 This is a schematic diagram of the structure of a computer-readable storage medium in some embodiments of this application. Detailed Implementation
[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0028] See Figure 1, Figure 1 This is a flowchart illustrating the processing method of a storage device in some embodiments of this application. The storage device is installed in the electronic device after leaving the factory. The storage device can be a read-only memory (ROM), a random access memory (RAM), a flash memory, or others, and there are no restrictions here.
[0029] Methods for processing storage devices include:
[0030] Step 11: When the electronic device is idle, perform a wear test on all memory blocks in the memory device; wherein the memory device was not subjected to the wear test before leaving the factory.
[0031] In some embodiments, the storage device is disposed in the electronic device. In order to ensure that the wear test of the storage device can be carried out smoothly, it is necessary to confirm whether the electronic device is in an idle state, so as to avoid the wear test affecting the normal operation of the electronic device.
[0032] The idle state of an electronic device refers to its non-operating state, such as standby. Considering the need to address the early failure rate of storage devices, wear tests can be performed within a preset time after the electronic device is activated to address this issue as quickly as possible during the early stages of use. The preset time could be 10, 15, or 20 days after activation. The specific time can be set according to the actual needs of the electronic device.
[0033] In the early stages of use of storage devices in electronic devices, before wear testing is conducted, the failure of memory blocks due to design and manufacturing defects is easily exposed during use, resulting in a high early failure rate. Therefore, this application proposes performing wear testing on storage devices when the electronic device is idle. This proactive approach detects defects in the storage devices, and after the wear test is completed, the failure rate can be kept relatively constant during subsequent use.
[0034] In some embodiments, before performing wear tests on all memory blocks in a storage device, it is also necessary to obtain the number of times the storage device is to be worn, and then perform wear tests on all memory blocks in the storage device according to the number of times the storage device is to be worn.
[0035] In some embodiments, the current wear task can be obtained, and the number of times the storage device needs to be worn can be obtained from the current wear task. Specifically, such as Figure 2 As shown, obtaining the number of wear cycles based on the wear task can include the following execution flow:
[0036] Step 21: Obtain the wear test power consumption requirements for the electronic device.
[0037] It's understandable that different electronic devices have different power consumption requirements for wear testing. The wear count of storage devices can be determined based on factors such as the specific product form of the electronic device. For example, the wear count can be determined according to the power supply method of the electronic device. If the electronic device uses continuous charging, its power consumption requirement is lower, so the wear count of the storage device can be higher. If the electronic device uses a fixed power supply, its power consumption requirement is higher, so the wear count of the storage device can be lower, or the wear count can be adjusted when the electronic device changes from a fixed power supply to continuous charging.
[0038] Step 22: According to the wear test power consumption requirements, divide the total number of wear cycles of the storage device into at least two wear tasks, and each wear task corresponds to a number of wear cycles to be completed.
[0039] It's understandable that wear testing incurs some power consumption. Wear testing can be segmented based on actual power consumption. For example, if an electronic device's daily power consumption falls into the first tier (lower power requirements), the number of wear tests on storage devices can be higher to lower the average daily power consumption. Conversely, if the electronic device's daily power consumption falls into the second tier (higher power requirements), the number of wear tests on storage devices can be lower to higher the average daily power consumption. The power consumption data for the first and second tiers are determined based on the actual situation of the electronic device.
[0040] Step 23: Set the task execution time period for each wear task.
[0041] In some embodiments, the wear test power consumption and time have a linear relationship. In this case, the corresponding task execution time period can be set for each wear task based on the relationship between wear test power consumption and time.
[0042] For example, based on the relationship between wear test power consumption and time, it can be determined that 20 wear tests can be performed in a day, and a wear task includes 30 wear tests. In this case, the task execution period corresponding to a wear task can be determined to be 1.5 days.
[0043] In some embodiments, since additional wear test power consumption is actually generated during the execution of wear tasks, after determining the relationship between wear test power consumption and time, it is also necessary to determine whether the actual wear test power consumption consumed in executing the wear task is less than or equal to the wear test power consumption corresponding to the wear test, thereby determining the task execution time period. It is worth noting that the power consumption consumed in executing at least two wear tasks is less than or equal to the power consumption required by the wear test power consumption requirement.
[0044] For example, if the maximum daily wear test power consumption of an electronic device is determined to be A, and the electronic device needs to perform 20 wear tests on the storage device, and these 20 wear tests are to be completed over 10 days, then it is necessary to verify whether the power consumption generated by completing 20 wear tests over 10 days (including the original wear test power consumption and the additional wear test power consumption) is greater than A. If it is greater than A, then it can be determined that the corresponding test cycle (i.e., 10 days) does not meet the requirements, and the test cycle needs to be further extended to reduce the daily power consumption value until the wear test power consumption and task execution time period that meet the conditions are obtained.
[0045] In some embodiments, before performing wear tests on all memory blocks in the storage device, product parameters of the electronic device can be obtained, and the total number of wear cycles of the storage device can be determined based on these product parameters. Specifically, such as Figure 3 As shown, obtaining the total number of wear cycles can include the following process:
[0046] Step 31: Obtain the product parameters of the electronic device.
[0047] The product parameters of electronic devices include read / write speed, storage capacity, reliability, and power consumption.
[0048] Step 32: Obtain the default wear count corresponding to the storage device type; wherein, the default wear count is determined based on the early failure status of the storage device of the storage device type.
[0049] In some embodiments, while performing thorough wear tests on all memory blocks in the storage device, it is also necessary to limit the number of times the electronic device performs wear tests on all memory blocks in the storage device in order to reduce DPPM (Defective Parts Per Million) to a preset range, thereby avoiding excessive wear and reducing the lifespan of the storage device and electronic device.
[0050] The preset range is determined by the instructions input by the user on the electronic device. Alternatively, the preset range is determined by the DPPM requirements of the electronic device. It is understandable that different electronic devices have different DPPM requirements; for example, consumer-grade electronic devices have a DPPM of 200–500, while automotive-grade products have a DPPM of less than or equal to 10.
[0051] In some embodiments, the early failure characteristics of a storage device include at least the initial failure duration and the specific failure type. The initial failure duration is the time corresponding to the first stage (rapidly decreasing failure rate stage) of the "bathtub curve" obtained from wear testing of a storage device of the same type as the storage device; the specific failure type includes read errors, write errors, and erase errors.
[0052] It is understandable that the early failure rate (i.e., initial failure rate) of storage devices decreases with the increase of the number of wear cycles (corresponding to the first stage of the "bathtub curve"). After a certain number of tests, the failure rate will be in a stable stage (corresponding to the second stage of the "bathtub curve"). Therefore, the default number of wear cycles corresponding to the type of storage device can be determined based on the early failure characteristics of storage devices of the same type.
[0053] Step 33: Based on the product parameters, adjust the default wear count to obtain the total wear count.
[0054] It is understandable that different storage devices have different total wear counts. After obtaining the default wear count for storage devices of the same type, since different electronic devices have their own requirements for the wear level of storage devices, the default wear count can be adjusted again according to the product parameters of the electronic device to obtain the total wear count corresponding to the storage device.
[0055] In some embodiments, wear testing of all memory blocks in a storage device can be performed as follows: Figure 4 As shown, it includes:
[0056] Step 41: Obtain the number of wear cycles corresponding to the storage device.
[0057] Step 42: Obtain the actual number of wear cycles performed during this wear test.
[0058] Step 43: Update the number of times to be worn using the actual number of wear cycles.
[0059] It is understandable that after determining the number of wear cycles, each wear test requires updating the number of wear cycles, so that as the wear test progresses, the number of wear cycles continuously decreases until it reaches 0, at which point the wear test on the storage device ends.
[0060] Step 12: During the wear test, in response to the failure to execute the test command on any memory block, the corresponding memory block is marked as a bad block.
[0061] In some embodiments, the test instructions include write test instructions, read test instructions, and erase test instructions. During each wear test, if it is determined that any memory block cannot execute the corresponding instruction normally, a write error, read error, and / or erase error has occurred on the corresponding memory block. This memory block can be marked as a bad block and added to the bad block list. Bad blocks will not participate in subsequent wear tests. Furthermore, bad blocks will not be used during the operation of the electronic device, thus avoiding data loss and other problems caused by writing data to bad blocks.
[0062] In some embodiments, after each wear test is completed, the memory blocks to be tested in the storage device (i.e., memory blocks that can execute test instructions normally) need to be updated to screen out bad blocks, reduce the number of test samples, and thus reduce test costs.
[0063] The storage device processing method provided in some embodiments of this application performs wear testing on all storage blocks in the storage device when the electronic device is idle; wherein, the storage device was not subjected to the wear test before leaving the factory; during the wear test, in response to the failure of executing a test instruction on any storage block, the corresponding storage block is marked as a bad block. Through the above method, wear testing of the storage device is performed on the electronic device after it leaves the factory, thereby reducing the testing tasks on the storage device at the production testing end and effectively reducing the testing cost of the storage device. In addition, bad blocks in the storage device can be marked during the wear test to avoid writing data to bad blocks and causing data loss. Furthermore, performing wear testing on the electronic device can effectively reduce the early failure rate of the storage device to a certain extent.
[0064] See Figure 5 , Figure 5 This is a flowchart illustrating a processing method for a storage device in some embodiments of this application. The storage device is installed in an electronic device after leaving the factory, and the processing method includes:
[0065] Step 51: When the electronic device is idle, obtain the number of wear tests required for the storage device; the storage device was not subjected to wear testing before leaving the factory.
[0066] Step 52: Obtain the actual number of wear cycles performed during this wear test.
[0067] Step 53: Update the number of times to be worn using the actual number of wear cycles.
[0068] Step 54: During the wear test, in response to the failure to execute the test command on any memory block, the corresponding memory block is marked as a bad block.
[0069] The storage device processing methods provided in some embodiments of this application can perform wear tests on the storage devices in electronic devices after they leave the factory, thereby reducing the testing tasks of the production testing end and effectively reducing the testing cost of the storage devices. In addition, during the wear test, bad blocks in the storage devices can be marked to avoid writing data into bad blocks and causing data loss. Storage blocks marked as bad blocks are screened out and no longer participate in subsequent wear tests, which can reduce the number of test samples and reduce testing costs.
[0070] See Figure 6 , Figure 6This is a flowchart illustrating a processing method for a storage device in some embodiments of this application. The storage device is installed in an electronic device after leaving the factory, and the processing method includes:
[0071] Step 61: When the electronic device is idle, obtain the current wear task and get the number of wear cycles corresponding to the storage device from the current wear task; wherein, the storage device has not undergone wear testing before leaving the factory.
[0072] Step 62: Obtain the actual number of wear cycles performed during this wear test.
[0073] Step 63: Update the number of times to be worn using the actual number of wear cycles.
[0074] Step 64: During the wear test, in response to the failure to execute the test command on any memory block, the corresponding memory block is marked as a bad block.
[0075] The storage device processing method provided in some embodiments of this application can perform wear testing on the storage device in the electronic device after it leaves the factory, thereby reducing the testing tasks of the storage device at the production testing end and effectively reducing the testing cost of the storage device. Furthermore, performing wear testing on the storage device only when the electronic device is in an idle state can reduce the impact of the electronic device processing other tasks on the wear testing, and also reduce the impact of wear testing on the electronic device processing other tasks. In addition, during the wear testing process, bad blocks in the storage device can be marked to avoid writing data to bad blocks and causing data loss. Storage blocks marked as bad blocks are also filtered out and no longer participate in subsequent wear testing, which can reduce testing tasks and thus reduce testing costs.
[0076] See Figure 7 , Figure 7 This is a flowchart illustrating a method for processing storage devices according to some embodiments of this application, including:
[0077] Step 71: Obtain the wear test power consumption requirements for the electronic device.
[0078] Step 72: According to the wear test power consumption requirements, divide the total number of wear cycles of the storage device into at least two wear tasks, and each wear task corresponds to a number of wear cycles to be completed.
[0079] Step 73: Set the task execution time period for each wear task.
[0080] Step 74: When the electronic device is idle, obtain the current wear task and get the number of wear cycles corresponding to the storage device from the current wear task.
[0081] Step 75: Obtain the actual number of wear cycles performed during this wear test.
[0082] Step 76: Update the number of times to be worn using the actual number of wear cycles.
[0083] Step 77: During the wear test, in response to the failure to execute the test command on any memory block, the corresponding memory block is marked as a bad block.
[0084] The storage device processing method provided in some embodiments of this application can perform wear testing on the storage device in the electronic device after it leaves the factory, thereby reducing the testing tasks of the storage device at the production testing end and effectively reducing the testing cost of the storage device. Furthermore, performing wear testing on the storage device only when the electronic device is in an idle state can, on the one hand, reduce the impact of the electronic device processing other tasks simultaneously on the wear testing, and on the other hand, reduce the impact of wear testing on the electronic device processing other tasks.
[0085] Furthermore, multiple wear tests can be segmented according to the wear power consumption requirements of the electronic device, resulting in multiple wear tasks. This can reduce power consumption and minimize the impact of excessive power consumption on the performance of the electronic device. Additionally, during the wear test, bad blocks in the storage device can be marked to prevent data loss caused by writing data to bad blocks. Storage blocks marked as bad are then removed from subsequent wear tests, reducing the number of test samples and lowering testing costs.
[0086] See Figure 8 , Figure 8 This is a flowchart illustrating a method for processing storage devices according to some embodiments of this application, including:
[0087] Step 801: Obtain the product parameters of the electronic device.
[0088] Step 802: Obtain the default wear count corresponding to the storage device type; wherein the default wear count is determined based on the early failure status of the storage device of the storage device type.
[0089] Step 803: Based on the product parameters, adjust the default wear count to obtain the total wear count.
[0090] Step 804: Obtain the wear test power consumption requirements for the storage device.
[0091] Step 805: According to the wear test power consumption requirements, divide the total number of wear cycles of the memory device into at least two wear tasks, and each wear task corresponds to a number of wear cycles to be completed.
[0092] Step 806: Set the task execution time period for each wear task.
[0093] Step 807: When the electronic device is idle, obtain the current wear task and get the number of wear cycles corresponding to the storage device from the current wear task.
[0094] Step 808: Obtain the actual number of wear cycles performed during this wear test.
[0095] Step 809: Update the number of times to be worn using the actual number of wear cycles.
[0096] Step 810: During the wear test, in response to the failure to execute the test instruction on any memory block, the corresponding memory block is marked as a bad block.
[0097] The storage device processing method provided in some embodiments of this application can perform wear testing on the storage device in the electronic device after the storage device leaves the factory, thereby reducing the testing tasks of the storage device at the production testing end and reducing the testing cost of the storage device to a certain extent. Furthermore, performing wear testing on the storage device only when the electronic device is in an idle state can, on the one hand, reduce the impact of the electronic device processing other tasks simultaneously on the wear testing, and on the other hand, reduce the impact of wear testing on the electronic device processing other tasks.
[0098] Furthermore, the total number of wear cycles corresponding to the storage devices can be determined based on the product parameters of the electronic device. This allows for segmentation of multiple wear tests according to the wear power consumption requirements of the electronic device, resulting in multiple wear tasks. This reduces power consumption and minimizes the impact of excessive power consumption on the performance of the electronic device. Additionally, during the wear test, bad blocks in the storage devices can be marked to prevent data loss caused by writing data to bad blocks. Storage blocks marked as bad are then excluded from subsequent wear tests, reducing the number of test samples and lowering testing costs.
[0099] See Figure 9 , Figure 9 This is a schematic diagram of the structure of an electronic device in some embodiments of this application. The electronic device 10 includes a memory 101 and a processor 102. The memory 101 stores a computer program, and the processor 102 is used to execute the computer program to implement the processing method of the memory device described in any of the above embodiments, which will not be described again here.
[0100] In some embodiments, memory 101 includes a storage device, which may be a read-only memory (ROM), a random access memory (RAM), a flash memory (e.g., NAND flash memory) or others, without limitation.
[0101] In some embodiments, electronic device 10 may be a smartphone, laptop, desktop computer, smart wearable device, or others, without limitation.
[0102] See Figure 10 , Figure 10 This is a schematic diagram of the structure of a computer-readable storage medium in some embodiments of this application. The computer-readable storage medium 100 stores a computer program 1001. When the computer program 1001 is executed by the processor 102, it is used to implement the processing method of the storage device described in any of the above embodiments, which will not be described again here.
[0103] The processor 102 involved in this application may be referred to as a CPU (Central Processing Unit), which may be an integrated circuit chip, or a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), off-the-shelf programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component.
[0104] The computer-readable storage medium 100 used in this application includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), or optical discs.
[0105] In summary, the storage device processing methods provided in some embodiments of this application can perform wear testing on the storage device in the electronic device 10 after the storage device leaves the factory, which can reduce the testing tasks of the storage device at the production testing end and effectively reduce the testing cost of the storage device. Furthermore, performing wear testing on the storage device only when the electronic device 10 is in an idle state can, on the one hand, reduce the impact of the electronic device 10 processing other tasks simultaneously on the wear testing, and on the other hand, reduce the impact of wear testing on the electronic device 10 processing other tasks.
[0106] In addition, multiple wear tests can be segmented according to the wear power consumption requirements corresponding to the electronic device 10 to obtain multiple wear tasks, which can reduce power consumption and reduce the impact of excessive power consumption on the performance of the electronic device 10.
[0107] Furthermore, during the wear test, bad blocks in the storage device can be marked to avoid writing data into bad blocks and causing data loss. Storage blocks marked as bad blocks are screened out and no longer participate in subsequent wear tests, which can reduce the number of test samples and thus reduce testing costs.
[0108] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for processing a storage device, characterized in that, The storage device is installed in the electronic device after it leaves the factory, and the method includes: When the electronic device is idle, wear tests are performed on all storage blocks in the storage device; wherein the wear test was not performed on the storage device before it left the factory. During the wear test, in response to the failure to execute a test instruction on any of the storage blocks, the corresponding storage block is marked as a bad block.
2. The method according to claim 1, characterized in that, The wear test performed on all memory blocks in the storage device includes: Obtain the number of wear cycles corresponding to the storage device; Wear tests are performed on all memory blocks in the storage device according to the stated number of wear cycles.
3. The method according to claim 2, characterized in that, The wear test performed on all memory blocks in the storage device according to the number of wear cycles includes: Obtain the actual number of wear cycles performed during this wear test; The number of times to be worn is updated using the actual number of wears.
4. The method according to claim 2, characterized in that, The step of obtaining the number of times the storage device is to be worn includes: Obtain the current wear task, and from the current wear task, obtain the number of times the storage device needs to be worn.
5. The method according to claim 4, characterized in that, Before performing wear testing on all memory blocks in the storage device, the method further includes: Obtain the wear test power consumption requirements corresponding to the electronic device; According to the wear test power consumption requirements, the total number of wear cycles of the storage device is divided into at least two wear tasks, and each wear task corresponds to a number of wear cycles to be completed. Set the task execution time period for each wear task.
6. The method according to claim 5, characterized in that, The power consumption consumed in performing the at least two wear tasks is less than or equal to the power consumption required by the wear test power consumption requirements.
7. The method according to claim 1, characterized in that, Before performing wear testing on all memory blocks in the storage device, the method further includes: Obtain the product parameters of the electronic device; Based on the product parameters, the total number of wear cycles for the storage device is determined.
8. The method according to claim 7, characterized in that, Determining the total number of wear cycles of the storage device based on the product parameters includes: Obtain the default wear count corresponding to the storage device type; wherein the default wear count is determined based on the early failure characteristics of the storage device of the storage device type; Based on the product parameters, the default wear count is adjusted to obtain the total wear count.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, is used to implement the method according to any one of claims 1-8.