Detection Method, Device, Terminal Device and Computer Medium of Storage Hardware
By building a mirror device array of storage hardware and outputting test instructions, obtaining command streams and running data to confirm the cause of exceptions, complex detection problems in the prior art are solved, and fast and efficient abnormal state detection is achieved.
Patent Information
- Application Number
- CN202210787448.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-05
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2042-07-05
AI Technical Summary
The prior art detects abnormal states generated during the operation of storage hardware in a complex way, making it difficult to achieve rapid detection.
By building an array of mirrored devices, including the storage hardware to be tested and standard storage hardware, and outputting test instructions to obtain command streams and running data, confirming the cause of the abnormality of the storage hardware to be tested based on these data.
The detection process of storage hardware abnormal states is simplified, the abnormal cause is quickly identified, and the detection efficiency is improved.
Smart Images

Figure CN115269240B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of memory technology, and in particular to a storage hardware detection method, device, terminal equipment and computer-readable storage medium. Background Art
[0002] Storage hardware is one of the most commonly used storage media, and is widely used in personal computers, servers and other computer devices. Accordingly, it is becoming more and more common for personal computers, servers and other computer devices to experience blue screens, black screens and inability to enter the system due to abnormal conditions generated during the operation of storage hardware. Currently, the detection methods for abnormal conditions generated during the operation of storage hardware mainly include reproduction testing, competitive product testing and process verification testing.
[0003] Among them, the reproduction test mainly uses the process of making the target storage hardware appear abnormal again, and in this process, the target storage hardware is tested to determine the abnormal state of the target storage hardware; the competitive product test mainly uses the process of comparing other storage hardware with the same configuration with the target storage hardware to determine the abnormal state of the target storage hardware; and the process verification test mainly uses the inspection of the target storage hardware workflow to determine the abnormal state of the target storage hardware.
[0004] Thus, existing methods for detecting abnormal conditions generated during the operation of storage hardware require complex operations to obtain detection results, and how to quickly detect abnormal conditions generated during the operation of storage hardware has become a technical problem that needs to be solved urgently in the industry. Summary of the invention
[0005] The embodiments of the present invention provide a storage hardware detection method, an apparatus, a terminal device, and a computer-readable storage medium, aiming to simplify the detection process of abnormal states generated during the operation of storage hardware.
[0006] The present invention provides a storage hardware detection method, the storage hardware detection method comprising the following steps:
[0007] Outputting a test instruction to a mirror device array, wherein the mirror device array is composed of storage hardware to be tested and standard storage hardware;
[0008] Calling the mirror device array to obtain the command stream generated by the test instruction and various operation data generated by the mirror device array when running according to the test instruction;
[0009] The abnormal cause corresponding to the storage hardware to be tested is confirmed based on the command stream and each of the operation data.
[0010] Further, the step of invoking the mirror device array to obtain the command stream generated by the test instruction includes:
[0011] Invoking the storage hardware under test within the mirror device array to construct a record form;
[0012] Inputting each command generated by the test instruction into the record form to obtain the command stream.
[0013] Further, the operation data includes: operation data under test and standard operation data. The step of confirming the abnormal cause corresponding to the storage hardware under test based on the command stream and each operation data includes:
[0014] Comparing each operation data under test with each standard operation data to determine the abnormal operation data in each operation data under test;
[0015] Determining the abnormal cause corresponding to the storage hardware under test according to the abnormal operation data and the command stream.
[0016] Further, the step of comparing each operation data under test with each standard operation data to determine the abnormal operation data in each operation data under test includes:
[0017] Sequentially comparing each operation data under test with each standard operation data to determine whether there is target operation data in each operation data under test that is inconsistent with each standard operation data;
[0018] If so, marking the target operation data as the abnormal operation data.
[0019] Further, the step of determining the abnormal cause corresponding to the storage hardware under test according to the abnormal operation data and the command stream includes:
[0020] Determining the abnormal command in the command stream according to the abnormal operation data;
[0021] Inputting the abnormal command into a preset abnormal cause database and screening the abnormal cause database to obtain a target abnormal cause that matches the abnormal command, and marking the target abnormal cause as the abnormal cause corresponding to the storage hardware under test.
[0022] Further, the method further includes:
[0023] Constructing the abnormal cause database, wherein the abnormal cause database contains various abnormal causes during the operation of the storage hardware.
[0024] Further, the step of constructing the abnormal cause database includes:
[0025] Obtain various abnormal feature data during the operation of the storage hardware;
[0026] Bind each of the abnormal feature data to each of the corresponding abnormal causes of each of the abnormal feature data to construct the abnormal cause database.
[0027] In addition, to achieve the above object, the present invention further provides a detection device for a storage hardware, the device includes:
[0028] An instruction output module, configured to output a test instruction to an image device array, where the image device array is composed of a storage hardware to be tested and a standard storage hardware;
[0029] A data recording module, configured to call the image device array to obtain the command stream generated by the test instruction and each operation data generated when the image device array operates according to the test instruction;
[0030] A cause confirmation module, configured to confirm the abnormal cause corresponding to the storage hardware to be tested based on the command stream and each operation data.
[0031] In addition, to achieve the above object, the present invention further provides a terminal device, the terminal device includes: a memory, a processor, and a detection program for the storage hardware stored on the memory and executable on the processor, and when the processor executes the detection program for the storage hardware, the steps of the detection method for the storage hardware as described above are implemented.
[0032] In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, on which a detection program for the storage hardware is stored, and when the detection program for the storage hardware is executed by a processor, the steps of the detection method for the storage hardware as described above are implemented.
[0033] The detection method, device, terminal device, and computer-readable storage medium for the storage hardware provided by the embodiments of the present invention output a test instruction to an image device array, where the image device array is composed of a storage hardware to be tested and a standard storage hardware; call the image device array to obtain the command stream generated by the test instruction and each operation data generated when the image device array operates according to the test instruction; and confirm the abnormal cause corresponding to the storage hardware to be tested based on the command stream and each operation data.
[0034] In this embodiment, when the terminal device is running, it first forms a mirror device array with the storage hardware to be tested and the standard storage hardware. Then, the terminal device outputs a test instruction to the mirror device array. The terminal device calls the mirror device array to record the command stream generated by the test instruction. At the same time, the terminal device obtains each piece of operation data generated during the process of the mirror device array running the test instruction. Finally, abnormal operation data is screened out from the operation data, and abnormal commands in the command stream are determined based on the abnormal operation data, thereby determining the cause of the abnormality of the storage hardware to be tested.
[0035] In this way, the present invention constructs the storage hardware to be tested and the standard storage hardware into a mirror device array, outputs a test instruction to the mirror device array to obtain the target abnormal data between the storage hardware to be tested and the standard storage hardware, and then determines the cause of the abnormality of the storage hardware to be tested based on the target abnormal data, achieving the technical effect of simplifying the detection process of the abnormal state generated during the operation of the storage hardware. Brief Description of the Drawings
[0036] Figure 1 It is a schematic structural diagram of the terminal device in the hardware operating environment related to the solution of the embodiment of the present invention;
[0037] Figure 2 It is a schematic flowchart of an embodiment of the detection method of the storage hardware of the present invention;
[0038] Figure 3 It is a schematic flowchart of the refinement of step S20 in an embodiment of the detection method of the storage hardware of the present invention;
[0039] Figure 4 It is a schematic flowchart of the refinement of step S30 in an embodiment of the detection method of the storage hardware of the present invention;
[0040] Figure 5 It is a schematic diagram of the functional modules involved in an embodiment of the detection method of the storage hardware of the present invention.
[0041] The realization, functional features, and advantages of the object of the present invention will be further described in conjunction with the embodiments with reference to the drawings. Detailed Embodiments
[0042] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0043] Please refer to Figure 1 , Figure 1 It is a schematic structural diagram of the terminal device in the hardware operating environment related to the solution of the embodiment of the present invention.
[0044] It should be noted that the terminal device in the embodiment of the present invention can be a test computer for testing a memory based on NAND flash as a storage medium. Of course, the terminal device can specifically be a mobile terminal, a data storage control terminal, a PC, or a portable computer, etc.
[0045] As Figure 1 shown, the terminal device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wireless-Fidelity (WI-FI) interface). The memory 1005 may be a high-speed Random Access Memory (RAM) memory, or a stable Non-Volatile Memory (NVM), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0046] Those skilled in the art can understand that Figure 1 the structure shown in
[0047] As Figure 1 shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module, and a detection program for storage hardware.
[0048] In Figure 1 the terminal device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with users; the processor 1001 and the memory 1005 in the terminal device of the present invention may be arranged in the terminal device. The terminal device calls the detection program for storage hardware stored in the memory 1005 through the processor 1001, and the terminal device calls the detection program for storage hardware stored in the memory 1005 through the processor 1001 and performs the following operations:
[0049] Output test instructions to the mirror device array, where the mirror device array is composed of the storage hardware to be tested and standard storage hardware;
[0050] Call the mirror device array to obtain the command stream generated by the test instructions and the respective operation data generated when the mirror device array operates according to the test instructions;
[0051] Based on the command stream and the respective operation data, confirm the abnormal cause corresponding to the storage hardware to be tested.
[0052] Further, the processor 1001 can call the detection program of the storage hardware stored in the memory 1005 and further perform the following operations:
[0053] Call the storage hardware to be tested within the mirror device array to construct a record table;
[0054] Input each command generated by the test instructions into the record table to obtain the command stream.
[0055] Further, the operation data includes: operation data to be tested and standard operation data. The processor 1001 can call the detection program of the storage hardware stored in the memory 1005 and further perform the following operations:
[0056] Compare each operation data to be tested with each standard operation data to determine the abnormal operation data among each operation data to be tested;
[0057] Based on the abnormal operation data and the command stream, determine the abnormal cause corresponding to the storage hardware to be tested.
[0058] Further, the processor 1001 can call the detection program of the storage hardware stored in the memory 1005 and further perform the following operations:
[0059] Compare each operation data to be tested with each standard operation data in sequence to determine whether there is target operation data in each operation data to be tested that is inconsistent with each standard operation data;
[0060] If so, mark the target operation data as the abnormal operation data.
[0061] Further, the processor 1001 can call the detection program of the storage hardware stored in the memory 1005 and further perform the following operations:
[0062] Based on the abnormal operation data, determine the abnormal command in the command stream;
[0063] The abnormal command is input into a preset abnormal cause database and the abnormal cause database is screened to obtain a target abnormal cause matching the abnormal command, and the target abnormal cause is marked as the abnormal cause corresponding to the storage hardware to be tested.
[0064] Further, the processor 1001 may call a detection program of storage hardware stored in the memory 1005, and further perform the following operations:
[0065] The abnormality cause database is constructed, wherein the abnormality cause database contains various abnormal causes of the storage hardware during operation.
[0066] Further, the processor 1001 may call a detection program of storage hardware stored in the memory 1005, and further perform the following operations:
[0067] Acquire various abnormal characteristic data during the operation of the storage hardware;
[0068] Each of the abnormal feature data is bound to each of the abnormal causes corresponding to each of the abnormal feature data to construct the abnormal cause database.
[0069] Based on the above structure, various embodiments of the storage hardware detection method of the present invention are proposed.
[0070] It should be noted that, in this embodiment, storage hardware is one of the most commonly used storage media, and is widely used in personal computers, servers and other computer devices. Accordingly, it is increasingly common that abnormal states generated during the operation of storage hardware cause blue screens, black screens and inability to enter the system in personal computers, servers and other computer devices, and the current detection methods for abnormal states generated during the operation of storage hardware mainly include reproduction testing, competitive product testing and process verification testing.
[0071] Among them, the reproduction test mainly uses the process of making the target storage hardware reproduce the abnormal state, and in this process, the target storage hardware is tested to determine the abnormal state of the target storage hardware; the competitive product test mainly uses the method of comparing other storage hardware with the same configuration with the target storage hardware to determine the abnormal state of the target storage hardware; and the process verification test mainly uses the method of inspecting the workflow of the target storage hardware to determine the abnormal state of the target storage hardware.
[0072] Thus, existing methods for detecting abnormal conditions generated during the operation of storage hardware require complex operations to obtain detection results, and how to quickly detect abnormal conditions generated during the operation of storage hardware has become a technical problem that needs to be solved urgently in the industry.
[0073] In view of the above phenomenon, the present application provides a detection method, device, terminal device and computer-readable storage medium for storage hardware. By outputting a test instruction to an array of mirror devices, where the array of mirror devices is composed of a storage hardware to be tested and a standard storage hardware; calling the array of mirror devices to obtain the command stream generated by the test instruction and each operation data generated when the array of mirror devices operates according to the test instruction; and confirming the abnormal cause corresponding to the storage hardware to be tested based on the command stream and each operation data.
[0074] In this embodiment, when the terminal device is running, it first forms an array of mirror devices with the storage hardware to be tested and the standard storage hardware. Then, the terminal device outputs a test instruction to the array of mirror devices. The terminal device calls the array of mirror devices to record the command stream generated by the test instruction. At the same time, the terminal device obtains each operation data generated during the process of the array of mirror devices running the test instruction. Finally, the terminal device filters out abnormal operation data from the each operation data and determines the abnormal command in the command stream according to the abnormal operation data, and further determines the abnormal cause of the storage hardware to be tested.
[0075] In this way, the present invention constructs the storage hardware to be tested and the standard storage hardware into an array of mirror devices, and outputs a test instruction to the array of mirror devices to obtain the target abnormal data between the storage hardware to be tested and the standard storage hardware. Then, by determining the abnormal cause of the storage hardware to be tested according to the target abnormal data, the technical effect of simplifying the detection process of the abnormal state generated during the operation of the storage hardware is achieved.
[0076] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of the first embodiment of the detection method for the storage hardware of the present invention.
[0077] It should be understood that although the logical order is shown in the flowchart, in some cases, the detection method for the storage hardware of the present invention can of course be executed in an order different from that shown or described here.
[0078] In this embodiment, when the detection method for the storage hardware of the present invention is applied to a terminal device to confirm that the built-in storage hardware has an abnormality during operation, the storage hardware is detected to determine the abnormal cause of the storage hardware. The detection method for the storage hardware of the present invention includes the following steps:
[0079] Step S10: Output a test instruction to an array of mirror devices, where the array of mirror devices is composed of a storage hardware to be tested and a standard storage hardware;
[0080] In this embodiment, when the terminal device is running, it first detects whether the built-in storage hardware of the terminal device has an abnormality during the running process. When the terminal device detects an abnormality in the storage hardware, it marks the storage hardware as a hardware to be tested. At the same time, the terminal device reads the built-in standard storage hardware, links the storage hardware to be tested with the standard storage hardware to form a mirror device array, and outputs a test instruction preset by the user to the mirror device array.
[0081] Exemplarily, for example, during the running process, the terminal device detects whether the built-in storage hardware of the terminal device has an abnormal state through the internally integrated control system. When the control system detects an abnormal state of the storage hardware, the control system marks the storage hardware as a storage hardware to be tested. At the same time, the terminal device reads the remaining built-in storage hardware, and selects one of the storage hardware in a normal state from the remaining storage hardware and marks it as the standard storage hardware. The terminal device forms a mirror device array with the storage hardware to be tested and the standard storage hardware through the control system, and sets the control system to output an instruction to the storage hardware to be tested and the standard storage hardware in the mirror device array at the same time when outputting the instruction, and sets the storage hardware to be tested and the standard storage hardware in the mirror device array to execute the instruction at the same time. Finally, after the above settings are completed, the terminal device inputs the test instruction preset by the user to the mirror device array.
[0082] It can be understood that in this embodiment, the storage hardware to be tested can also form other types of device arrays with multiple standard storage hardware, including but not limited to the ways of device arrays such as raid 1, raid 3, and raid 10. The present invention does not limit this aspect in order to better achieve the technical effect of quickly detecting the abnormal state generated during the running process of the storage hardware.
[0083] Step S20: Invoke the mirror device array to obtain the command stream generated by the test instruction and each running data generated when the mirror device array runs according to the test instruction;
[0084] In this embodiment, the terminal device invokes the storage hardware to be tested and the standard storage hardware in the mirror device array through the above control system to simultaneously receive the test instruction and run according to the test instruction. At the same time, the terminal device invokes the storage hardware to be tested through the control system to record the command stream composed of each command generated by the test instruction and each running data generated when the mirror device array runs the test instruction, and inputs the command stream and the each running data into a storage device for storage.
[0085] Exemplarily, for example, before the terminal device outputs a test instruction to the above mirror device array, it can first output a user-predefined trim instruction to format the mirror device array. Then, the storage hardware under test and the standard storage hardware within the mirror device array simultaneously receive and execute the trim instruction to complete the formatting operation, thereby achieving the effect that the storage hardware under test and the standard storage hardware are in the same state. After that, the memory is read to obtain the test instruction pre-stored by the user in the memory. The terminal device outputs the test instruction to the above mirror device array, and through the above control system, the storage hardware under test and the standard storage hardware in the mirror device array are called to simultaneously receive the test instruction and operate according to the test instruction. The terminal device controls the storage hardware under test through the control system to record each command generated by the test instruction, and forms a command stream from the commands and uploads the command stream to the control system.
[0086] Further, please refer to Figure 3 , Figure 3 which is a schematic diagram of the detailed process of step S20 in an embodiment of the detection method for the storage hardware of the present invention. In a feasible embodiment, the step of "invoking the mirror device array to obtain the command stream generated by the test instruction" in the above step S20 may specifically include:
[0087] Step S201: Invoke the storage hardware under test within the mirror device array to construct a record table;
[0088] In this embodiment, the terminal device constructs a table in the storage hardware under test in the above mirror device array through the above control system, and marks the table as a record table.
[0089] Step S202: Input each command generated by the test instruction into the record table to obtain the command stream;
[0090] In this embodiment, the terminal device inputs each command generated by the above test instruction into the above record table, and forms a command stream from the commands according to the recording time of the commands.
[0091] Exemplarily, for example, the terminal device constructs a table on the flash memory in the storage hardware under test in the above mirror device array through the above control system and marks the table as a record table. Then, the terminal device inputs each command generated by the above test instruction into the record table in the storage hardware under test through the control system, summarizes the commands, sorts the commands in the record table, and sequentially extracts the commands in the table according to the order to form the above command stream.
[0092] It can be understood that in this embodiment, in addition to obtaining the above command stream in the form of the above record table, it is also possible to achieve the effect of recording the command stream and each running data by externally connecting a storage hardware dedicated to storing each command stream and each running data. The present invention does not limit the recording method of how to record each data in the test process.
[0093] Step S30: Confirm the abnormal cause corresponding to the storage hardware to be tested based on the command stream and each running data;
[0094] In this embodiment, the terminal device reads and inputs the above command stream and the above each running data into the data analysis device. The data analysis device first determines the abnormal running data in the storage hardware to be tested in the each running data, and then determines the abnormal cause of the storage hardware to be tested according to the abnormal running data and the command stream.
[0095] Exemplarily, for example, the terminal device inputs the above command stream and the above each running data into the data analysis device. The data analysis device compares the each running data associated with the storage hardware to be tested and the each running data associated with the standard storage hardware in the each running data, and confirms the abnormal running data in the each running data according to whether the each data is consistent. After that, the data analysis device confirms the target abnormal command in the command stream according to the matching relationship between the abnormal running data and the above command stream, and further determines the abnormal cause of the storage hardware to be tested.
[0096] Further, please refer to Figure 4 , Figure 4 which is a schematic diagram of the refined process of step S30 involved in an embodiment of the detection method of the storage hardware of the present invention. In a feasible embodiment, the above step S30 may specifically include:
[0097] Step S301: Compare each of the running data to be tested and each of the standard running data to determine the abnormal running data in each of the running data to be tested;
[0098] In this embodiment, the terminal device inputs the above each running data into the data processing device built in the terminal device. The data processing device divides the each running data into running data to be tested and standard running data. After that, the data processing device compares each of the running data to be tested with each of the standard running data in turn to determine the abnormal running data in each of the running data to be tested.
[0099] Step S302: Determine the abnormal cause corresponding to the storage hardware to be tested according to the abnormal running data and the command stream;
[0100] In this embodiment, after the terminal device determines the above-mentioned target abnormal data, the terminal device finds the abnormal command in the above-mentioned command stream corresponding to the abnormal operation data according to the abnormal operation data, and then determines the corresponding abnormal cause of the storage hardware to be tested according to the abnormal command.
[0101] Exemplarily, for example, the terminal device inputs the above-mentioned operation data into the data processing device built in the terminal device. Through the data processing device, the operation data is divided into the operation data to be tested generated during the operation of the storage hardware to be tested, and the standard operation data during the operation of the standard storage hardware. After that, the data processing device compares each piece of the operation data to be tested with each piece of the standard operation data in turn to determine the abnormal operation data in each piece of the operation data to be tested. After the terminal device determines the abnormal operation data, the terminal device finds the abnormal command in the above-mentioned command stream corresponding to the abnormal operation data, and then determines the corresponding abnormal cause of the storage hardware to be tested according to the abnormal command.
[0102] It should be noted that, in this embodiment, the above-mentioned abnormal operation data is the operation data corresponding to each abnormal situation when the above-mentioned storage hardware to be tested causes abnormal situations such as the PC having a blue screen, a black screen, or entering the BIOS during operation.
[0103] Further, in a feasible embodiment, the above step S301 may specifically include:
[0104] Step S3011: Compare each piece of the operation data to be tested with each piece of the standard operation data in turn to determine whether there is target operation data in each piece of the operation data to be tested that is inconsistent with each piece of the standard operation data;
[0105] Step S3012: If so, mark the target operation data as the abnormal operation data;
[0106] Exemplarily, for example, the terminal device inputs the above-mentioned standard operation data into the above-mentioned data comparison device. The data comparison device compares each piece of the standard operation data with each piece of the above-mentioned operation data to be tested one by one, and determines whether each comparison result is consistent, so as to screen out target operation data in each piece of the operation data to be tested that is inconsistent with each piece of the standard operation data. If the data comparison device screens out target operation data in each piece of the operation data to be tested that is inconsistent with each piece of the standard operation data, the data comparison device marks the target operation data as abnormal operation data and uploads the abnormal operation data to the control system of the terminal device.
[0107] Further, in a feasible embodiment, the above step S302 may specifically include:
[0108] Step S3021: Determine the abnormal commands in the command stream according to the abnormal operation data;
[0109] Step S3022: Input the abnormal commands into a preset abnormal cause database, screen the abnormal cause database to obtain target abnormal causes matching the abnormal commands, and mark the target abnormal causes as the abnormal causes corresponding to the storage hardware to be tested;
[0110] In this embodiment, the terminal device inputs the above abnormal operation data into a data comparison device in the terminal device through the above control system. The data comparison device screens out abnormal commands corresponding to the operation data in the command stream according to the abnormal operation data. Then, the terminal device calls the control system to compare the abnormal commands with the abnormal feature data corresponding to each abnormal cause in the abnormal cause database and determines whether target abnormal feature data matching the abnormal commands is included in the respective abnormal feature data. When the terminal device detects that the target abnormal feature data is included, it marks the abnormal cause corresponding to the abnormal feature data as the abnormal cause corresponding to the storage hardware to be tested.
[0111] Further, in a feasible embodiment, the detection method of the storage hardware of the present invention may further include:
[0112] Step S40: Construct the abnormal cause database, where the abnormal cause database contains various abnormal causes during the operation of the storage hardware;
[0113] In this embodiment, the terminal device receives various abnormal causes input by the user and abnormal feature data matching the various abnormal causes. The terminal device binds the various abnormal causes and the various abnormal feature data to form an abnormal cause database.
[0114] Exemplarily, for example, before the user performs a detection on the storage hardware, the user pre-tests different storage hardwares to obtain various abnormal states during the operation of the storage hardware and the corresponding abnormal causes for each of the abnormal states. At the same time, the user determines abnormal feature data corresponding to each of the abnormal causes and records them. Then, the user outputs the record to the terminal device. After receiving the record, the terminal device binds the various abnormal causes in the record and the various abnormal feature data through the internal control system, so that each abnormal cause matches the corresponding abnormal feature data, thereby constructing the above abnormal cause database.
[0115] Further, in a feasible embodiment, the above step S40 may specifically include:
[0116] Step S401: Obtain various abnormal feature data during the operation of the storage hardware;
[0117] Step S402: Bind each of the abnormal feature data to each of the corresponding abnormal causes to construct the abnormal cause database;
[0118] In this embodiment, the terminal device pre-receives an instruction triggered by the user to record the above abnormal feature data. The terminal device receives this instruction and tests different storage hardware in the terminal device. At the same time, it records each abnormal state that appears during the operation of each storage hardware and the abnormal feature data corresponding to each abnormal state. After that, the terminal device calls the construction tool in the control system to bind each abnormal state and each abnormal feature data to construct the above abnormal cause database, and stores the abnormal cause database in the memory of the terminal device for the terminal device to directly obtain the abnormal cause through the abnormal state database when detecting the memory later.
[0119] In this embodiment, when the terminal device is running, it first detects whether the built-in storage hardware in the terminal device has an abnormality during operation. When the terminal device detects an abnormality in the storage hardware, it marks the storage hardware as the hardware to be tested. At the same time, the terminal device reads the built-in standard storage hardware, links the storage hardware to be tested with the standard storage hardware to form a mirror device array, and outputs a test instruction preset by the user to the mirror device array. After that, the terminal device calls the storage hardware to be tested and the standard storage hardware in the mirror device array through the above control system to simultaneously receive the test instruction and run according to the test instruction. At the same time, the terminal device calls the storage hardware to be tested through the control system to record the command stream composed of each command generated by the test instruction and each operation data generated when the mirror device array runs the test instruction, and inputs the command stream and the operation data into the storage device for storage. Finally, the terminal device reads and inputs the command stream and the operation data into the data analysis device. The data analysis device first determines the abnormal operation data in the storage hardware to be tested from the operation data, and then determines the abnormal cause of the storage hardware to be tested according to the abnormal operation data and the command stream.
[0120] In this way, the present invention constructs the storage hardware to be tested and the standard storage hardware into a mirror device array, outputs a test instruction to the mirror device array to obtain the target abnormal data between the storage hardware to be tested and the standard storage hardware, and then determines the abnormal cause of the storage hardware to be tested according to the target abnormal data, achieving the technical effect of simplifying the detection process of the abnormal state generated during the operation of the storage hardware.
[0121] In addition, the present invention also provides a detection device for storage hardware. Please refer to Figure 5, the present invention also provides a detection device for storage hardware. The detection device for storage hardware of the present invention includes:
[0122] An instruction output module, configured to output a test instruction to an image device array, where the image device array is composed of a storage hardware to be tested and a standard storage hardware;
[0123] A data recording module, configured to call the image device array to obtain a command stream generated by the test instruction and various operation data generated when the image device array operates according to the test instruction;
[0124] A cause confirmation module, configured to confirm an abnormal cause corresponding to the storage hardware to be tested based on the command stream and the various operation data.
[0125] Further, the data recording module includes:
[0126] A table construction unit: configured to call the storage hardware to be tested in the image device array to construct a record table;
[0127] A command recording unit: configured to input each command generated by the test instruction into the record table to obtain the command stream.
[0128] Further, the operation data includes: operation data to be tested and standard operation data. The data recording module includes:
[0129] A data comparison unit: configured to compare each operation data to be tested with each standard operation data to determine abnormal operation data in each operation data to be tested;
[0130] An abnormality determination unit: configured to determine an abnormal cause corresponding to the storage hardware to be tested according to the abnormal operation data and the command stream.
[0131] Further, the data comparison unit includes:
[0132] A data matching subunit: configured to compare each operation data to be tested with each standard operation data in sequence to determine whether there is target operation data in each operation data to be tested that is inconsistent with each standard operation data;
[0133] A data marking subunit: configured to, if it is determined that there is target operation data in each operation data to be tested that is inconsistent with each standard operation data, mark the target operation data as the abnormal operation data.
[0134] Further, the abnormality determination unit includes:
[0135] A command tracing subunit: configured to determine an abnormal command in the command stream according to the abnormal operation data;
[0136] Cause determination subunit: configured to input the abnormal command into a preset abnormal cause database, screen the abnormal cause database to obtain a target abnormal cause that matches the abnormal command, and mark the target abnormal cause as the abnormal cause corresponding to the storage hardware to be tested.
[0137] Further, the cause confirmation module further includes:
[0138] Data construction unit: configured to construct the abnormal cause database, where the abnormal cause database contains various abnormal causes during the operation of the storage hardware.
[0139] Further, the data construction unit includes:
[0140] Data acquisition subunit: configured to acquire various abnormal feature data during the operation of the storage hardware;
[0141] Data binding subunit: configured to bind each of the abnormal feature data to each of the abnormal causes corresponding to the respective abnormal feature data to construct the abnormal cause database;
[0142] In addition, the present invention further provides a terminal device, on which there is a detection program for the storage hardware that can run on a processor. When the terminal device executes the detection program for the storage hardware, the steps of the detection method for the storage hardware described in any of the above embodiments are implemented.
[0143] The specific embodiments of the terminal device of the present invention are basically the same as those of the above embodiments of the detection method for the storage hardware, and will not be elaborated here.
[0144] In addition, the present invention further provides a computer-readable storage medium, on which there is a detection program for the storage hardware. When the detection program for the storage hardware is executed by a processor, the steps of the detection method for the storage hardware described in any of the above embodiments are implemented.
[0145] The specific embodiments of the computer-readable storage medium of the present invention are basically the same as those of the above embodiments of the detection method for the storage hardware, and will not be elaborated here.
[0146] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or system including that element.
[0147] The serial numbers of the embodiments of the present invention above are only for description and do not represent the superiority or inferiority of the embodiments.
[0148] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions for causing a terminal device (which can be a test computer for testing a memory based on nand flash as a storage medium. Of course, the terminal device can specifically be a mobile terminal, a data storage control terminal, a PC, or a portable computer, etc.) to execute the methods described in various embodiments of the present invention.
[0149] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A detection method for storage hardware, characterized in that, the detection method for the storage hardware comprises the following steps: Output a test instruction to an image device array, wherein the image device array is composed of a storage hardware to be tested and a standard storage hardware, the storage hardware to be tested is marked when the terminal device detects that the built-in storage hardware of the terminal device is in an abnormal state, and the standard storage hardware is marked by the terminal device selecting one of the remaining normal-state storage hardware in the built-in storage hardware; Output a preset trim instruction to perform a formatting operation on the image device array, so that the storage hardware to be tested and the standard storage hardware are in the same state, call the image device array to obtain the command stream generated by the test instruction and each operation data generated when the image device array runs according to the test instruction; Based on the command stream and each operation data, confirm the abnormal cause corresponding to the storage hardware to be tested.
2. The detection method for storage hardware according to claim 1, characterized in that, the step of calling the image device array to obtain the command stream generated by the test instruction includes: Call the storage hardware to be tested in the image device array to construct a record form; Input each command generated by the test instruction into the record form to obtain the command stream.
3. The detection method for storage hardware according to claim 1, characterized in that, the operation data includes: operation data to be tested and standard operation data, and the step of confirming the abnormal cause corresponding to the storage hardware to be tested based on the command stream and each operation data includes: Compare each operation data to be tested with each standard operation data to determine the abnormal operation data in each operation data to be tested; According to the abnormal operation data and the command stream, determine the abnormal cause corresponding to the storage hardware to be tested.
4. The detection method for storage hardware according to claim 3, characterized in that, the step of comparing each operation data to be tested with each standard operation data to determine the abnormal operation data in each operation data to be tested includes: Compare each operation data to be tested with each standard operation data in turn to determine whether there is target operation data in each operation data to be tested that is inconsistent with each standard operation data; If so, mark the target operation data as the abnormal operation data.
5. The detection method for storage hardware according to claim 3, characterized in that, the step of determining the abnormal cause corresponding to the storage hardware to be tested according to the abnormal operation data and the command stream includes: Determine the abnormal command in the command stream according to the abnormal operation data; Input the abnormal command into a preset abnormal cause database and screen the abnormal cause database to obtain a target abnormal cause matching the abnormal command, and mark the target abnormal cause as the abnormal cause corresponding to the storage hardware to be tested.
6. The detection method for storage hardware according to claim 5, characterized in that, the method further includes: Construct the abnormal cause database, wherein the abnormal cause database contains various abnormal causes during the operation of the storage hardware.
7. The detection method of the storage hardware according to claim 6, characterized in that the step of constructing the abnormal cause database includes: obtain various abnormal feature data during the operation of the storage hardware; bind each of the abnormal feature data to each of the corresponding abnormal causes of each of the abnormal feature data to construct the abnormal cause database.
8. A detection device for storage hardware, characterized in that the device includes: an instruction output module, configured to output a test instruction to the mirror device array, wherein the mirror device array is composed of a storage hardware to be tested and a standard storage hardware, the storage hardware to be tested is marked when the terminal device detects that the built-in storage hardware of the terminal device is in an abnormal state, and the standard storage hardware is selected and marked by the terminal device from the remaining built-in storage hardware as a storage hardware in a normal state; a data recording module, configured to output a preset trim instruction to perform a formatting operation on the mirror device array, so that the storage hardware to be tested and the standard storage hardware are in the same state, and call the mirror device array to obtain the command stream generated by the test instruction and each operation data generated when the mirror device array operates according to the test instruction; a cause confirmation module, configured to confirm the abnormal cause corresponding to the storage hardware to be tested based on the command stream and each of the operation data.
9. A terminal device, characterized in that the terminal device includes: a memory, a processor, and a detection program for storage hardware stored on the memory and executable on the processor, and when the detection program for storage hardware is executed by the processor, the steps of the detection method of the storage hardware according to any one of claims 1 to 7 are implemented.
10. A computer storage medium, characterized in that a detection program for storage hardware is stored on the computer storage medium, and when the detection program for storage hardware is executed by a processor, the steps of the detection method of the storage hardware according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
A memory array monitor system and method
CN109460194A
Monitoring method, system and device of distributed storage system and medium
CN111858240A