Test method of storage device, electronic device, and storage medium
Patent Information
- Application Number
- CN202510541332.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2026-10-27
AI Technical Summary
[0005]本发明提供了存储设备的测试方法、电子设备以及存储介质,以解决异常分析效率和项目进度较低的问题
[0016]为解决上述技术问题,本发明的存储设备的测试方法通过测试机对存储设备进行预设测试,并实时将存储设备的状态数据存储在存储设备的预设存储区域内;响应于存储设备发生测试异常,通过测试机从存储设备的预设存储区域内获取存储设备的状态数据,以基于状态数据进行异常定位,得到存储设备的测试结果,能够通过实时存储状态数据,记录存储设备在预设测试过程中所经历的状态及其变更,从而帮助异常回溯时,能够准确反应存储设备在发生异常时的状态,基于该状态即可进行异常分析,无需后续反复实验确定存储设备的状态,从而提高异常定位效率和加快测试项目进度。
Smart Images

Figure CN122991246A_ABST
Abstract
Description
Technical Field
[0001] This invention applies to the technical field of device testing, and in particular to a testing method for storage devices, electronic devices, and storage media. Background Technology
[0002] During the testing of storage devices, sample storage devices are often reused, for example, different firmware is used to perform corresponding tests in different testing phases.
[0003] However, due to human factors during version iteration or testing, the status of sample storage devices can easily be lost or incompletely recorded, and even tracing through test records cannot fully guarantee accuracy.
[0004] Therefore, in the analysis of abnormal test results, it is often necessary to repeatedly experiment to determine the status of the sample storage device, which seriously affects the efficiency of abnormal analysis and project progress. Summary of the Invention
[0005] This invention provides a testing method, electronic device, and storage medium for storage devices to address the problems of low efficiency in anomaly analysis and low project progress.
[0006] To address the aforementioned technical problems, the first aspect of this invention provides a testing method for a storage device, comprising: a testing machine performing a preset test on the storage device and storing the status data of the storage device in a preset storage area of the storage device in real time; in response to a test anomaly occurring in the storage device, the testing machine acquiring the status data of the storage device from the preset storage area of the storage device, performing anomaly location based on the status data, and obtaining the test result of the storage device.
[0007] The preset test includes at least one test phase, which stores the status data of the storage device in a preset storage area of the storage device in real time. This includes: in response to an anomaly occurring in the storage device during the current test phase or the storage device completing the current test phase, establishing a correspondence between the current status data and the current test phase; and storing the status data after establishing the correspondence in the preset storage area of the storage device. The status data in the preset storage area is arranged sequentially according to the timeline, with each test phase as a unit.
[0008] The process of performing a preset test on the storage device using a test machine includes: obtaining the corresponding initial state data of the storage device based on the type of preset test using the test machine; the initial state data includes the current state data of the storage device; determining whether the current state data meets the test requirements of the preset test; and if the current state data meets the test requirements of the preset test, performing the preset test on the storage device.
[0009] The initial state data also includes historical state data; determining whether the initial state data meets the test requirements of the preset test also includes: determining the type of at least one test stage in the preset test based on the type of test stage corresponding to the historical state data in the initial state data; wherein the type of test stage in the preset test is different from the type of test stage corresponding to the historical state data.
[0010] The process involves obtaining initial state data of the storage device through a test machine based on a preset test type, and storing the initial state data in a preset storage area of the storage device. This includes: dividing a blank preset storage area in the private storage space of the storage device; encapsulating the initial state data and the unique identifier of the storage device into a data block; and storing the data block in the preset storage area for the test machine to retrieve.
[0011] The preset tests include a destructive wear record test, which locates anomalies based on state data to obtain test results for the storage device. This includes: locating anomalies in the storage device based on data retention time, read interference data, PE cycle count, and maximum wear value; or a preset test includes an ultra-stable test, which locates anomalies in the storage device based on state data. This includes: locating anomalies in the storage device based on data retention time, read interference data, PE cycle count, maximum wear value, number of bad blocks, number of abnormal power outages, whether it has passed through a high-temperature boiler, and write amplification index. The state data includes one or more of the following: PE cycle count, maximum wear value, data retention time, read interference data, number of bad blocks, number of abnormal power outages, whether it has passed through a high-temperature boiler, and write amplification index.
[0012] To address the aforementioned technical problems, a second aspect of the present invention provides a testing method for a storage device, comprising: the storage device receiving a test instruction from a tester to perform a preset test; receiving a storage instruction sent by the tester in real time to store the status data of the storage device in a preset storage area of the storage device; and, in response to a test anomaly occurring in the storage device, receiving an acquisition instruction from the tester and sending the status data in the preset storage area to the tester, so that the tester can locate the anomaly based on the status data and obtain the test result of the storage device.
[0013] The method includes receiving the status data of the storage device sent by the test machine in real time and storing it in the preset storage area of the storage device. It also includes receiving the status data corresponding to the third-party test steps in response to the preset test, and storing the status data corresponding to the third-party test steps in the preset storage area of the storage device in sequence.
[0014] To address the aforementioned technical problems, a third aspect of the present invention also provides an electronic device, comprising: a processor and a memory, wherein the memory stores program data, and the processor is used to execute a testing method for a storage device as described in any of the preceding claims.
[0015] To address the aforementioned technical problems, a fourth aspect of the present invention provides a computer-readable storage medium storing program data that can be executed to implement a testing method for a storage device as described in any of the preceding claims.
[0016] To address the aforementioned technical problems, the storage device testing method of the present invention performs preset tests on the storage device using a testing machine and stores the storage device's status data in a preset storage area of the storage device in real time. In response to a test anomaly, the testing machine retrieves the storage device's status data from the preset storage area to locate the anomaly based on the status data, thereby obtaining the test results of the storage device. By storing status data in real time, the method records the states and changes experienced by the storage device during the preset test process, thus accurately reflecting the storage device's state at the time of the anomaly during anomaly backtracking. Anomaly analysis can be performed based on this state without the need for repeated experiments to determine the storage device's state, thereby improving anomaly location efficiency and accelerating the testing project progress. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the first embodiment of the testing method for the storage device provided by the present invention;
[0018] Figure 2 This is a flowchart illustrating the second embodiment of the testing method for storage devices provided by the present invention;
[0019] Figure 3 This is a flowchart illustrating the third embodiment of the testing method for storage devices provided by the present invention;
[0020] Figure 4 yes Figure 3 A schematic diagram of the transmission network structure in a typical application scenario;
[0021] Figure 5 yes Figure 4 A data flow diagram of data transmission between terminals in a transmission network within an application scenario;
[0022] Figure 6 This is a schematic diagram of the structure of an embodiment of the electronic device provided by the present invention;
[0023] Figure 7 This is a schematic diagram of an embodiment of the computer-readable storage medium provided by the present invention. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] Please see Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the testing method for a storage device provided by the present invention. This embodiment is applied to the testing machine.
[0026] Step S11: The test machine performs a preset test on the storage device and stores the status data of the storage device in the preset storage area of the storage device in real time.
[0027] Storage devices include, but are not limited to, storage chips, various types of DDR (Double Data Rate) and LPDDR (Low Power Dual Data Rate) such as CK memory, CA (Caches) memory, CS (Code Segment) memory or DQ memory, hard drives, solid-state drives, portable hard drives, USB flash drives, memory cards, non-volatile memory (NAND FLASH), optical discs, etc.
[0028] The testing machine is a computer device with strong data processing and control capabilities. It implements its testing functions by installing corresponding testing tool software. In a specific application scenario, the testing tool software includes, but is not limited to, debugging tools, production tools, or after-sales tools. In other words, the testing method for storage devices using the testing machine in this embodiment can be applied to the entire lifecycle of the storage device, including but not limited to the product debugging stage, product manufacturing stage, and product after-sales stage.
[0029] Preset tests can be set based on actual needs, including but not limited to one or more of the following: data read test, data write test, data erase test, performance test, aging test, wear test, power consumption test, current test, etc., without any limitation.
[0030] The test machine stores the status data of the storage device in real time within a preset storage area of the storage device. The preset storage area is a dedicated storage area within the storage device for storing status data.
[0031] The specific status data type of the storage device can be set according to the preset test type, such as PE (Program / Erase Cycle) cycle count, maximum wear value, data retention time, read disturbance data, number of bad blocks, number of abnormal power outages, whether it has been through a high-temperature boiler, and write amplification index (WAI value), etc. The specific status data type can be set according to the status data involved in the preset test, or it can include all of the above status data, and the status data not involved will not be changed.
[0032] In a specific application scenario, the step of storing the state data of the storage device in a preset storage area of the storage device in real time can be to store the new state data when the state data changes, or to store the state data in real time at a certain frequency. The specific method is not limited here.
[0033] By storing the state data of the storage device in a preset storage area in real time, all state data and its changes during the life cycle of the storage device can be accurately recorded, facilitating subsequent state backtracking and anomaly analysis.
[0034] Step S12: In response to a test anomaly in the storage device, the test machine obtains the status data of the storage device from the preset storage area of the storage device, and performs anomaly location based on the status data to obtain the test results of the storage device.
[0035] When a storage device experiences a test anomaly, the test machine retrieves the storage device's status data from a preset storage area. However, backtracking to address test anomalies may occur after the test has ended, at which point the test environment may not remain unchanged. Therefore, troubleshooting based on the storage device after the test often requires repeated experiments to determine the storage device's state at the time of the anomaly. This application, however, stores status data in real-time during testing and can directly retrieve the storage device's status data from the preset storage area when troubleshooting after a test anomaly occurs. This status data accurately reflects the storage device's state at the time of the anomaly and can be used for anomaly localization at any time, eliminating the need for repeated experiments to determine the storage device's state. This improves anomaly localization efficiency and accelerates the testing project's progress.
[0036] If no test anomalies occur in the storage device, the test results of the storage device are obtained based on the test results of the preset test, without the need for anomaly backtracking.
[0037] Through the above steps, this embodiment performs preset tests on the storage device using a testing machine and stores the storage device's status data in a preset storage area of the storage device in real time. In response to a test anomaly in the storage device, the testing machine retrieves the storage device's status data from the preset storage area of the storage device to locate the anomaly based on the status data, thereby obtaining the test results of the storage device. By storing status data in real time, the system records the states and changes experienced by the storage device during the preset test, which helps to accurately reflect the state of the storage device when the anomaly occurs during anomaly backtracking. Anomaly analysis can be performed based on this state without the need for repeated experiments to determine the state of the storage device, thereby improving the efficiency of anomaly location and accelerating the progress of the test project.
[0038] Please see Figure 2 , Figure 2 This is a flowchart illustrating a second embodiment of the testing method for a storage device provided by the present invention. This embodiment is applied to the storage device side.
[0039] Step S21: The storage device receives the test command from the test machine to perform a preset test.
[0040] Storage devices include, but are not limited to, storage chips, various types of DDR (Double Data Rate) and LPDDR (Low Power Dual Data Rate) such as CK memory, CA (Caches) memory, CS (Code Segment) memory or DQ memory, hard drives, solid-state drives, portable hard drives, USB flash drives, memory cards, non-volatile memory (NAND FLASH), optical discs, etc.
[0041] The storage device includes a main controller and storage units. The storage units are used to store data, and the main controller is used to perform steps such as interacting with the test machine, controlling the internal data storage of the storage device, and acquiring status data.
[0042] The testing machine can be a computer device with strong data processing capabilities and control functions, on which corresponding testing software is installed to realize the testing functions. In a specific application scenario, the testing machine includes, but is not limited to, debugging tools, production tools, or after-sales tools. That is to say, the testing method for storage devices using the testing machine in this embodiment can be applied to the entire life cycle of storage devices, including but not limited to the product debugging stage, product production stage, and product after-sales stage.
[0043] Preset tests can be set based on actual needs, including but not limited to one or more of the following: data read test, data write test, data erase test, performance test, aging test, wear test, power consumption test, current test, etc., without any limitation.
[0044] Test commands are sent from the test machine to the storage device based on the specific type of preset test.
[0045] Step S22: Receive storage instructions sent by the test machine in real time to store the status data of the storage device in the preset storage area of the storage device.
[0046] The preset storage area is a storage area specifically allocated within the storage device for storing status data.
[0047] The specific status data type of the storage device can be set according to the preset test type, such as PE (Program / Erase Cycle) cycle count, maximum wear value, data retention time, read disturbance data, number of bad blocks, number of abnormal power outages, whether it has been through a high-temperature boiler, and write amplification index, etc. The specific status data type can be set according to the status data involved in the preset test, or it can include all of the above status data, and the status data not involved will not be changed.
[0048] The storage device receives storage instructions sent by the test machine in real time and stores the status data in the preset storage area.
[0049] Step S23: In response to a test anomaly in the storage device, the system receives an acquisition instruction from the test machine and sends the status data within the preset storage area to the test machine so that the test machine can locate the anomaly based on the status data and obtain the test results of the storage device.
[0050] When a storage device experiences a test anomaly, it receives an acquisition command from the test machine and sends the status data within the preset storage area to the test machine for anomaly backtracking to obtain the test results of the storage device.
[0051] When no test anomalies occur in the storage device, the test results of the storage device are obtained based on the test results of the preset test, without the need for anomaly backtracking.
[0052] This application stores status data in real time during testing and can directly retrieve the status data of the storage device from a preset storage area when performing anomaly backtracking after a test anomaly occurs. This status data contains the status data of the storage device when the anomaly occurs, which can accurately reflect the status of the storage device when the anomaly occurs. Moreover, the status data of the storage device obtained from the preset storage area can be used for anomaly localization at any time, without the need for repeated experiments to determine the status of the storage device, thereby improving the efficiency of anomaly localization and accelerating the progress of the test project.
[0053] In some embodiments, in response to the preset test including a third-party test step, which is a test performed on the storage device by a non-testing machine, the status data corresponding to the third-party test step is received, and the status data corresponding to the third-party test step is sequentially stored in a preset storage area of the storage device.
[0054] Third-party testing procedures include, but are not limited to, manual testing, power consumption testing, current testing, high-temperature boiler testing, or random and sequential read / write operations using third-party tools for performance testing. This refers to testing procedures performed on the storage device by third-party tools (not the testing machine). These tools sequentially store the corresponding status data within a pre-defined storage area of the storage device, thereby improving the information integrity and reliability of the entire testing process. This facilitates subsequent anomaly backtracking and analysis, improving anomaly analysis efficiency.
[0055] Please see Figure 3 , Figure 3 This is a flowchart illustrating the third embodiment of the testing method for storage devices provided by the present invention. This embodiment is applied to the testing machine.
[0056] Step S31: The test machine obtains the corresponding initial state data from the storage device based on the preset test type.
[0057] Before testing the storage device, a blank, pre-defined storage area is first partitioned within the device's private storage space. This private storage space is the non-user storage space within the storage device, specifically used to store data related to maintaining the device's functionality. This status data includes one or more of the following: PE cycle count, maximum wear value, data retention time, read interference data, number of bad blocks, number of abnormal power outages, whether the device has been exposed to a high-temperature boiler, and write amplification index. The specific settings are based on actual needs and are not limited here.
[0058] Initial state data and the unique identifier of the storage device are encapsulated into data blocks, which are then stored in a preset storage area for retrieval by the test machine. Encapsulating the initial state data and the unique identifier establishes a unique correspondence between the storage device and the initial state data, preventing data corruption during batch testing, improving data accuracy, and ultimately enhancing test reliability. The unique identifier includes, but is not limited to, the storage device's UID (User Identification ID), device barcode, or device QR code, etc.
[0059] The types of status data can be varied and can be set based on the status information that needs to be considered in the preset test. In a specific application scenario, status data such as the number of PE (Program / Erase Cycle) cycles, data retention time, and read disturbance data, as well as device ID information such as FlashID, can be encapsulated into data blocks and stored in a preset storage area.
[0060] Initial state data includes the storage device's current state data and historical state data. Historical state data includes past changes in the storage device's state and the testing phase at which those changes occurred. In other words, historical state data reflects the testing phases the storage device has undergone and the corresponding state changes. Current state data reflects the storage device's current state.
[0061] Please refer to the table below, which is an illustration of one embodiment of status data. This table is for illustrative purposes only and is not intended to be limiting.
[0062] Table 1
[0063] Data retention time Read interference data ...... Phase 1 of Testing A1 B1 ...... Second testing phase A2 B2 ...... ...... ...... Current stage An Bn ......
[0064] The table above illustrates that the types of status data at least include data retention time and read interference data. However, in practical applications, the types of status data can include various types, and can be set based on the status information that needs to be focused on in the preset test. The table above can be used to illustrate the initial status data before the preset test, or it can be used to illustrate the status data after the preset test. The specific data parameters may differ, but the data format is the same. In other embodiments, the storage format of status data can also take the form of text, charts (including line charts, bar charts, etc.), videos, etc., which are not limited here.
[0065] The test machine obtains the initial state data of the storage device based on the preset test type. If the storage device has not been tested before, it is obtained directly from the state generation point; if the storage device has been tested before, it can be obtained from the preset storage area.
[0066] Step S32: Determine whether the current state data of the initial state data meets the test requirements of the preset test; if the current state data meets the test requirements of the preset test, perform the preset test on the storage device.
[0067] Before the preset test, the test tool on the test machine reads the data block to obtain the initial state data and determines whether the current state data in the initial state data meets the test requirements of the preset test.
[0068] The test requirements for preset tests are set based on the type of preset test. In a specific application scenario, if the preset test is a performance test, it checks whether the current maximum wear value in the status data exceeds the corresponding threshold. If it does, the storage device is not suitable for performance testing, and performance testing will not be performed. If it does not exceed the threshold, the storage device is suitable for performance testing, and performance testing will be performed. In a specific application scenario, if the preset test is a data retention test, it checks whether the current status data has passed through a high-temperature boiler. If not, data retention testing will not be performed on the storage device; if so, data retention testing will be performed. And so on, without limitation. The above judgment can improve the compatibility between preset tests and storage devices, reducing the occurrence of test failures due to hardware problems.
[0069] Among them, the testing of storage devices often involves replacing different firmware on sample storage devices to test various firmware-related capabilities. When a storage device is not suitable for the preset test, it does not mean that the storage device is not suitable for other tests. Based on its status data, corresponding judgments can be made to conduct other tests.
[0070] In a specific application scenario, the type of at least one test phase in the preset test can be determined based on the type of test phase corresponding to the historical state data within the initial state data. Specifically, the type of test phase in the preset test differs from the type of test phase corresponding to the historical state data.
[0071] For example, if the test phase corresponding to the historical state data within the initial state data includes performance testing, it means that the storage device has already undergone performance testing. Therefore, this preset test does not need to repeat the performance test. Instead, a non-performance test type should be selected for testing to reduce redundant and invalid operations.
[0072] The method of determining the type of at least one test phase in the preset test based on the test phase type corresponding to historical state data can be applied to multi-party joint testing. By storing its state data in the preset storage area of the storage device itself, the tester can obtain the state data through the test machine, determine the historical state data, historical test phases and current state data of the storage device, improve the information clarity of the storage device and the tester's understanding of the storage device, and facilitate the subsequent preset test and anomaly backtracking.
[0073] Step S33: The test machine performs a preset test on the storage device. In response to the change in the status data of the storage device during the current test phase, it establishes a correspondence between the changed status data and the current test phase, and stores the status data after establishing the correspondence in the preset storage area of the storage device.
[0074] The testing machine performs preset tests on the storage device. These preset tests include at least one test phase, and may specifically include one or more test phases. In a specific application scenario, the preset tests may sequentially include data read tests, data write tests, wear tests, and performance tests. This application scenario is for illustrative purposes only and is not intended to be limiting.
[0075] In response to an anomaly occurring in the storage device during the current testing phase or the completion of the current testing phase, a correspondence is established between the current status data and the current testing phase. This correspondence is then stored in a preset storage area of the storage device. The status data within the preset storage area is arranged sequentially along a timeline, with each testing phase as a unit. The storage of status data is detailed in Table 1 above and will not be elaborated upon here.
[0076] In a specific application scenario, assuming the preset test is a wear test with a target of 1000 cycles, when the storage device successfully completes the preset test, its PE Cycle (program / erase cycle count) is 1000. The current state data then shows the PE cycle count as PE 1000. A mapping is established between the PE cycle count of PE 1000 and the current wear test result, and the resulting state data is stored in the storage device's preset storage area. If the storage device encounters an anomaly at the 300th test cycle, its PE Cycle (program / erase cycle count) is 300. The current state data then shows the PE cycle count as PE 300. This mapping is again established between the PE cycle count of PE 300 and the current wear test result, and the resulting state data is stored in the storage device's preset storage area. This application scenario uses one type of state data as an example; however, in practical applications, the preset test may require storing multiple types of state data.
[0077] Step S34: In response to a test anomaly in the storage device, the test machine obtains the status data of the storage device from the preset storage area of the storage device, and performs anomaly location based on the status data to obtain the test results of the storage device.
[0078] When a storage device experiences a test anomaly, the testing machine retrieves the storage device's status data from a preset storage area. This status data is then used for anomaly localization to obtain the storage device's test results. However, backtracking to address test anomalies may occur after the test has ended, at which point the test environment may not remain unchanged. Therefore, anomaly localization based on the storage device after the test often requires repeated experiments to determine the storage device's state at the time of the anomaly. This application, however, stores status data in real-time during testing. When performing anomaly localization after a test anomaly, it can directly retrieve the storage device's status data from the preset storage area. This status data contains the storage device's state at the time of the anomaly, accurately reflecting its state at that moment. Furthermore, anomaly localization can be performed at any time using the status data retrieved from the preset storage area, eliminating the need for repeated experiments to determine the storage device's state. This improves anomaly localization efficiency and accelerates the testing project's progress.
[0079] If no test anomalies occur in the storage device, the test results of the storage device are obtained based on the test results of the preset test, without the need for anomaly backtracking.
[0080] In a specific application scenario, pre-set tests may include performing operations that disrupt wear records. For example, physical aging tests or recovery IDA (Incremental Difference Analysis) tests, etc., involve anomaly localization based on state data to obtain the test results of the storage device. The steps include: localizing anomalies in the storage device based on data retention time, read interference data, PE cycle count, and maximum wear value to obtain the test results of the storage device.
[0081] In a specific application scenario, the preset tests may include ultra-stable testing. The steps for anomaly localization based on state data to obtain the storage device's test results include: anomaly localization based on data retention time, read interference data, PE cycle count, maximum wear value, number of bad blocks, number of abnormal power outages, and write amplification index, to obtain the storage device's test results. The types of preset tests and corresponding state data are not limited here.
[0082] Through the above steps, this embodiment comprehensively defines and integrates status data and the unique identification information of storage devices, and directly embeds these data and information into the preset storage area of the storage device. This ensures that the status data can be written, monitored, and analyzed historically using relevant testing tools. Specifically, by storing status data in real time, the system records the states and changes experienced by the storage device during preset testing processes. This records all key status changes and important test events experienced by the module throughout the entire product lifecycle, from R&D testing and production testing to after-sales testing. This helps to accurately reflect the state of the storage device at the time of the anomaly and its historical state during anomaly backtracking. Anomaly analysis can be performed based on this status data without the need for repeated experiments to determine the state of the storage device, thereby improving anomaly localization efficiency and accelerating the testing project progress. This achieves full lifecycle management, tracking, and backtracking of the storage device's test status. Furthermore, the method of determining the type of at least one test stage in the preset test based on the test stage type corresponding to historical state data can be applied to multi-party joint testing. By storing its state data in the preset storage area of the storage device itself, the tester can obtain the state data through the test machine, determine the historical state data, historical test stages and current state data of the storage device, improve the information clarity of the storage device and the tester's understanding of the storage device, reduce repeated testing, facilitate the subsequent preset test and anomaly backtracking, and improve the efficiency of anomaly location.
[0083] Please see Figure 4-5 , Figure 4 yes Figure 3 A schematic diagram of the transmission network structure in a certain application scenario. Figure 5 yes Figure 4 A data flow diagram showing the data transmission direction of each terminal in the transmission network in the application scenario.
[0084] The transmission network 40 in this application scenario includes a storage device 41, a testing machine 42, and a third-party testing tool 43. The storage device 41 is connected to both the testing machine 42 and the third-party testing tool 43 to receive test commands from either the testing machine 42 or the third-party testing tool 43 and perform corresponding tests. The third-party testing tool 43 is connected to the testing machine 42 to store the corresponding status data of the third-party test in a preset storage area using the testing tools on the testing machine 42. The testing machine 42 is equipped with testing tools to perform tests on the storage device 41.
[0085] Before testing, the test machine 42 sends a packaging instruction to the storage device 41. The storage device 41 divides the storage area based on the packaging instruction and stores the initial state information in the preset storage area. The test machine 42 sends a state acquisition instruction to the storage device 41. The storage device 41 sends the initial state information to the test machine 42 based on the state acquisition instruction. The test machine 42 determines the type of preset test and judges whether the initial state data meets the test requirements of the preset test based on the initial state information.
[0086] When the test requirements are not met, the storage device 41 is not subjected to preset tests; when the test requirements are met, the test begins. The test machine 42 sends a test command to the storage device 41. The storage device 41 performs preset tests based on the test commands. In response to an exception occurring during the preset test, the storage device 41 sends an exception message to the test machine 42; or in response to the completion of the preset test, the storage device 41 sends a test completion message to the test machine 42. The test machine 42 sends a storage command to the storage device 41, and the storage device 41 stores the current status information to the preset storage area based on the storage command.
[0087] The third-party testing tool 43 sends test commands to the storage device 41, which performs tests based on the commands and then sends the test results back to the third-party testing tool 43. The third-party testing tool 43 then sends the test results to the testing machine 42, which stores the corresponding status data in a preset storage area.
[0088] During anomaly localization, the test machine 42 retrieves status data from a preset storage area and performs anomaly analysis based on the status data.
[0089] For specific details of the above steps, please refer to the foregoing embodiments. Through these steps, this embodiment can record the states and changes experienced by the storage device during a preset test process by storing state data in real time. This helps to accurately reflect the state of the storage device when an anomaly occurs during anomaly backtracking. Anomaly analysis can be performed based on this state without the need for repeated experiments to determine the storage device's state, thereby improving anomaly localization efficiency and accelerating the test project progress. Furthermore, the method of determining the type of at least one test stage in the preset test based on the test stage type corresponding to historical state data is applicable to multi-party joint testing. By storing its state data within a preset storage area of the storage device itself, the tester can obtain the state data through the test machine, determine the storage device's historical state data, historical test stages, and current state data, improve the clarity of information about the storage device and the tester's understanding of the storage device, reduce redundant testing, facilitate subsequent preset tests and anomaly backtracking, and improve anomaly localization efficiency.
[0090] Based on the same inventive concept, the present invention also proposes an electronic device capable of executing a test method for a storage device implementing any of the above embodiments. Please refer to [link to relevant documentation]. Figure 6 , Figure 6 This is a schematic diagram of an embodiment of the electronic device provided by the present invention. The electronic device includes a processor 61 and a memory 62.
[0091] The processor 61 executes the program instructions stored in the memory 62 to implement the steps of any of the above-described feature comparison methods. In a specific implementation scenario, the electronic device may include, but is not limited to, a microcomputer or a server. In addition, the electronic device may also include mobile devices such as laptops and tablets, which are not limited here.
[0092] Specifically, processor 61 controls itself and memory 62 to implement the steps of any of the above embodiments. Processor 61 may also be referred to as a CPU (Central Processing Unit). Processor 61 may be an integrated circuit chip with signal processing capabilities. Processor 61 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor. Furthermore, processor 61 may be implemented using integrated circuit chips.
[0093] The above solution can record the state and changes of the storage device during the preset test process by storing state data in real time. This helps to accurately reflect the state of the storage device when an anomaly occurs during anomaly backtracking. Anomaly analysis can be performed based on this state without the need for repeated experiments to determine the state of the storage device, thereby improving the efficiency of anomaly localization and accelerating the progress of the test project.
[0094] Based on the same inventive concept, the present invention also proposes a computer-readable storage medium, please refer to [link to relevant documentation]. Figure 7 , Figure 7This is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. The computer-readable storage medium 70 stores at least one program data 71, which is used to implement any of the methods described above. In one embodiment, the computer-readable storage medium 70 includes various media capable of storing program code, such as a USB flash drive, a portable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0095] In the several embodiments provided by this invention, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0096] The units described as separate components may or may not be physically separate. The components shown as units 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 units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0097] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0098] If the integrated unit is implemented as 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 invention, in essence, 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, which is stored in a storage medium.
[0099] The above are merely embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
[0100] The above are merely embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A testing method for a storage device, characterized in that, include: The testing machine performs preset tests on the storage device and stores the status data of the storage device in real time within the preset storage area of the storage device; In response to a test anomaly occurring in the storage device, the test machine acquires the status data of the storage device from a preset storage area of the storage device, and performs anomaly localization based on the status data to obtain the test results of the storage device.
2. The testing method for the storage device according to claim 1, characterized in that, The preset test includes at least one test phase, and the real-time storage of the state data of the storage device within the preset storage area of the storage device includes: In response to an anomaly occurring in the storage device during the current testing phase or the storage device completing the current testing phase, a correspondence is established between the current status data and the current testing phase. The state data after the correspondence is established is stored in the preset storage area of the storage device, wherein the state data in the preset storage area is arranged sequentially according to the time axis, with the test phase as the unit.
3. The testing method for the storage device according to claim 1, characterized in that, Prior to performing a preset test on the storage device using a testing machine, the following steps are included: The test machine acquires the corresponding initial state data in the storage device based on the preset test type; the initial state data includes the current state data of the storage device. Determine whether the current state data meets the test requirements of the preset test; When the current state data meets the test requirements of the preset test, the storage device is subjected to the preset test.
4. The testing method for the storage device according to claim 3, characterized in that, The initial state data also includes historical state data; the step of determining whether the initial state data meets the test requirements of the preset test further includes: The type of at least one test stage in the preset test is determined based on the type of the test stage corresponding to the historical state data within the initial state data; wherein the type of the test stage in the preset test is different from the type of the test stage corresponding to the historical state data.
5. The testing method for the storage device according to claim 3, characterized in that, The step of obtaining initial state data of the storage device through the testing machine based on the preset test type, and storing the initial state data in a preset storage area of the storage device, includes: A blank, pre-defined storage area is partitioned within the private storage space of the storage device; The initial state data and the unique identifier of the storage device are encapsulated into a data block, and the data block is stored in the preset storage area for the test machine to retrieve.
6. The testing method for a storage device according to claim 1, characterized in that, The preset test includes a damage and wear record test. The anomaly localization based on the state data to obtain the test results of the storage device includes: Anomalies in the storage device are located based on data retention time, read interference data, PE cycle count, and maximum wear value, resulting in test results for the storage device; or The preset test includes an ultra-stable test, and the anomaly localization based on the state data to obtain the test results of the storage device includes: Anomalies in the storage device are located based on data retention time, read interference data, PE cycle count, maximum wear value, number of bad blocks, number of abnormal power outages, whether it has been exposed to a high-temperature boiler, and write amplification index, and the test results of the storage device are obtained. The status data includes one or more of the following: PE cycle count, maximum wear value, data retention time, read interference data, number of bad blocks, number of abnormal power outages, whether it has passed through a high-temperature boiler, and write amplification index.
7. A testing method for a storage device, characterized in that, include: The storage device receives test commands from the test machine to perform preset tests; The device receives storage instructions sent by the test machine in real time to store the status data of the storage device in the preset storage area of the storage device. In response to a test anomaly occurring in the storage device, the device receives an acquisition instruction from the test machine and sends the status data within the preset storage area to the test machine, so that the test machine can locate the anomaly based on the status data and obtain the test results of the storage device.
8. The testing method for a storage device according to claim 7, characterized in that, The real-time reception of status data from the storage device sent by the test machine and storage of it in a preset storage area of the storage device further includes: In response to the preset test including a third-party test step, the status data corresponding to the third-party test step is received, and the status data corresponding to the third-party test step is sequentially stored in a preset storage area of the storage device.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory, wherein the memory stores program data, and the processor is used to execute the test method for the storage device as described in any one of claims 1-6 or the test method for the storage device as described in claim 7 or 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program data that can be executed to implement the test method for the storage device as described in any one of claims 1-6 or the test method for the storage device as described in claim 7 or 8.