Fault detection method, storage device and electronic device

By parsing the checksum and communication protocol of the preset instructions, the location of the module to be tested in the storage device can be directly determined and feedback data can be obtained, which solves the problem of low timeliness of storage device fault detection and realizes rapid fault location and efficient detection.

CN122050472APending Publication Date: 2026-05-15HUIYI MICROELECTRONICS (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411559778.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

The fault detection of existing storage devices is not timely, especially when the monitoring software is not working properly, which makes it difficult to locate the fault in time, resulting in low detection efficiency.

Method used

By parsing the checksum of the preset command, the location information of the module to be tested is determined using the preset communication protocol, and the fault type is determined based on the feedback data. This avoids the software parsing process of the preset command and allows for direct read and write operations to obtain the module's feedback data.

Benefits of technology

It improves the timeliness of storage device fault detection, enables rapid location of faulty modules, and enhances the efficiency of fault detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122050472A_ABST
    Figure CN122050472A_ABST
Patent Text Reader

Abstract

The invention provides a fault detection method, storage equipment and electronic equipment, and the method comprises the steps: analyzing a received preset instruction according to a preset communication protocol, and obtaining a check code of the preset instruction; under the condition that the check code is the same as a default code of the storage equipment, determining position information of a to-be-detected module from the plurality of modules according to the preset instruction; the feedback data executes the preset instruction according to the position information to obtain the feedback data of the to-be-detected module; and determining the fault type of the to-be-detected module according to the feedback data. The invention relates to the technical field of fault detection of storage equipment, and can improve the fault detection efficiency of the storage equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of fault detection technology, and in particular to a fault detection method, storage device, and electronic device. Background Technology

[0002] Currently, with the development of data technology, more and more organizations and individuals tend to use storage devices to store business data, thereby providing corresponding services to users based on large amounts of business data. To promptly detect problems during the operation of storage devices, monitoring software is typically used to monitor the operational status of each module within the storage device. However, real-time operation of the monitoring software can place a high load on the storage device itself when processing data. Furthermore, when the monitoring software malfunctions due to hardware abnormalities in the storage device, preventing it from functioning properly or intervening in the monitoring process, it cannot pinpoint the fault within the storage device, resulting in low timeliness of fault detection. Summary of the Invention

[0003] In view of the above, it is necessary to propose a fault detection method, storage device, and electronic device to solve the technical problem of low timeliness in fault detection of storage devices.

[0004] This application provides a fault detection method applied to a storage device, the storage device comprising multiple modules. The method includes: parsing a received preset instruction according to a preset communication protocol to obtain a checksum of the preset instruction; if the checksum is the same as the default encoding of the storage device, determining the location information of a module to be detected from the multiple modules according to the preset instruction; executing the preset instruction according to the location information to obtain feedback data of the module to be detected, the feedback data including status information, debugging information, and register information; and determining the fault type of the module to be detected based on the feedback data.

[0005] In some embodiments, the method further includes: before determining the location information of the module to be detected from the plurality of modules according to the preset instruction, parsing the preset instruction according to the preset communication protocol to obtain the communication type and instruction type of the preset instruction, wherein the communication type includes direct communication and indirect communication, and the instruction type includes reading and writing.

[0006] In some embodiments, the method further includes: when the communication type is direct communication and the instruction type is read, acquiring multiple preset instructions; and determining the location information of the module to be detected from the multiple modules according to the multiple preset instructions.

[0007] In some embodiments, the method further includes: when the communication type is direct communication and the instruction type is write, acquiring multiple preset instructions; and determining the location information of the module to be detected from the multiple modules according to the multiple preset instructions.

[0008] In some embodiments, the method further includes: when the communication type is indirect communication and the instruction type is read, parsing the preset instruction according to the preset communication protocol to obtain the index of the module to be detected; and determining the location information of the module to be detected from the preset mapping relationship according to the index.

[0009] In some embodiments, determining the location information of the module to be detected from the plurality of modules according to the plurality of preset instructions includes: if the checksum corresponding to each of the plurality of preset instructions is the same as the default encoding of the storage device, parsing the plurality of preset instructions according to the preset communication protocol to obtain the location information of the module to be detected.

[0010] In some embodiments, the method further includes: if the check code corresponding to any one of the plurality of preset instructions is different from the default encoding of the storage device, outputting pre-stored first response information.

[0011] In some embodiments, the method further includes: running the plurality of preset instructions to obtain second response information corresponding to the plurality of preset instructions; receiving a plurality of read instructions when the second response information is obtained; and running the plurality of read instructions to obtain feedback data of the module to be detected.

[0012] This application also provides a storage device in which a computer program stored in the storage device implements the fault detection method when executed by a processor.

[0013] This application also provides an electronic device, which includes: a memory storing at least one instruction; and a processor executing the instructions stored in the memory to implement the fault detection method.

[0014] As can be seen from the above technical solutions, the embodiments of this application parse the received preset instructions according to the preset communication protocol to obtain the check code of the preset instructions. Based on the check code, it is determined whether the preset instructions are used to perform read and write operations on various modules in the storage device. If the check code is the same as the default encoding of the storage device, it is determined that the preset instructions are used to perform read and write operations on various modules in the storage device. Then, based on the preset instructions, the location information of the module to be tested is determined from multiple modules, and the feedback data of the module to be tested is determined based on the location information. Finally, the fault type of the module to be tested is determined based on the feedback data. In this way, fault detection can be performed on any module in the storage device using one or more preset instructions without the need for software programs to parse the preset instructions, which can improve the timeliness of fault detection in the storage device. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of a storage device provided in an embodiment of this application.

[0016] Figure 2 This is a flowchart of a fault detection method provided in an embodiment of this application.

[0017] Figure 3 This is a schematic diagram of a preset instruction provided in an embodiment of this application.

[0018] Figure 4 This is a flowchart of a method for determining the location information of a module to be detected according to an embodiment of this application.

[0019] Figure 5 This is a flowchart of a method for determining the location information of a module to be detected, provided in another embodiment of this application.

[0020] Figure 6 This is a flowchart of a method for determining the location information of a module to be detected, provided in another embodiment of this application.

[0021] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0022] To better understand the purpose, features, and advantages of this application, a detailed description of the application is provided below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of this application can be combined with each other. Numerous specific details are set forth in the following description to provide a thorough understanding of this application; the described embodiments are only a part of the embodiments of this application, and not all of them.

[0023] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0025] This application provides a fault detection method that can be applied to one or more electronic devices. An electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0026] Electronic devices can be any electronic product that allows human-computer interaction with a customer, such as personal computers, tablets, smartphones, personal digital assistants (PDAs), game consoles, interactive network television (IPTV), smart wearable devices, etc.

[0027] Electronic devices may also include network devices and / or client devices. The network devices include, but are not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of hosts or network servers.

[0028] The networks in which electronic devices are located include, but are not limited to, the Internet, wide area networks, metropolitan area networks, local area networks, and virtual private networks (VPNs).

[0029] like Figure 1The diagram shown is a schematic of a storage device according to an embodiment of this application. The fault detection method provided in this application can be applied to storage device 100. Storage device 100 can be a device with data storage function applied in any electronic device, such as an embedded multimedia card (EMMC). Storage device 100 includes multiple modules, for example... Figure 1 The interactive module 110 shown is, for example, Figure 1 The logic execution module 120 shown is, for example, Figure 1 The flash memory control module 130 shown is, for example, Figure 1 The central processing unit 140 shown is, for example, Figure 1 The external storage module 150 is shown. When performing fault detection on each module in the storage device 100, the user inputs a preset command into the interaction module 110 of the storage device 100 via the host 200. The preset command represents the user's need to query the operating status of each module in the storage device 100 via the host 200. For example, when the user needs to perform fault detection on the flash memory control module 130, they can send a preset command to the interaction module 110 via the host 200. The interaction module 110 parses the preset command to obtain the location information of the flash memory control module 130, obtains feedback data from the flash memory control module 130 based on the location information, and sends the feedback data to the host 200. The location information represents the communication address of the flash memory control module 130 within the storage device 100.

[0030] like Figure 2 The diagram shown is a flowchart of a fault detection method according to an embodiment of this application. The order of the steps in the flowchart can be changed, and some steps can be omitted, depending on different requirements. The fault detection method provided in this embodiment includes the following steps.

[0031] S20: Parse the received preset instruction according to the preset communication protocol to obtain the verification code of the preset instruction.

[0032] In one embodiment of this application, in order to directly obtain feedback data from each module in the storage device, a preset instruction sent by the host can be obtained. Subsequently, read and write operations are performed on each module in the storage device according to the preset instruction to obtain the feedback data from each module. The preset instruction can be a pre-written instruction for reading feedback data from each module or writing data to each module.

[0033] In one embodiment of this application, the preset instruction includes multiple bits, and these multiple bits include a checksum of the preset instruction. The checksum is used to characterize the function of the preset instruction. Specifically, when the checksum is the same as the default encoding of the storage device, it indicates that the preset instruction is used to perform read and write operations on various modules of the storage device; when the checksum is different from the default encoding of the storage device, it indicates that the preset instruction is used to call various modules in the storage device to implement other functions. For example, the preset instruction can be used to call the central processing module to parse data in the storage device. The default encoding of the storage device can be an encoding assigned to the storage device during the manufacturing process, used to characterize the identity information of the storage device.

[0034] like Figure 3 The diagram shows a preset instruction. The preset instruction comprises 48 bits of data: bit 48 is the start bit; bit 47 is the transition bit; bits 41 to 46 are the command index; and bits 9 to 40 represent the parameters in the preset instruction. Specifically, bits 25 to 40 are the checksum of the preset instruction, which represents its identity information; bit 24 represents the instruction type, including read and write types; bit 23 represents the communication type, including direct and indirect communication; bits 18 to 22 represent the module information of the module to be detected corresponding to the preset instruction; and bits 9 to 17 represent the location information of the module to be detected corresponding to the preset instruction.

[0035] S21, if the verification code is the same as the default encoding of the storage device, determine the location information of the module to be detected from the plurality of modules according to the preset instruction.

[0036] In one embodiment of this application, when the check code is the same as the default code of the storage device, it indicates that the preset instruction is used to perform read and write operations on each module of the storage device, and after the read and write operations are performed, the corresponding response information is obtained, and the feedback data of the module to be tested among multiple modules is determined based on the response information.

[0037] In one embodiment of this application, since the information in the preset instruction can characterize the function and communication method of the preset instruction, in order to improve efficiency, the preset instruction can be parsed according to a preset communication protocol to determine the function corresponding to the preset instruction. Specifically, the method further includes: before determining the location information of the module to be detected from the plurality of modules according to the preset instruction, parsing the preset instruction according to the preset communication protocol to obtain the communication type and instruction type of the preset instruction, wherein the communication type includes direct communication and indirect communication, and the instruction type includes reading and writing.

[0038] In one embodiment of this application, when the communication type of the preset instruction is direct communication, it indicates that the preset instruction is used to directly store the location information of the module to be detected. Since the location information of the module to be detected includes 32 bits, when the communication type of the preset instruction is direct communication, multiple preset instructions are needed to represent the location information of the module to be detected.

[0039] In one embodiment of this application, when the communication type of the preset instruction is indirect communication, it indicates that the preset instruction is used to store the index of the module to be detected. Specifically, the index of the module to be detected is used to characterize the location information of the module to be detected.

[0040] In one embodiment of this application, when the instruction type of the preset instruction is "read," it indicates that the preset instruction is used to read the location information of the module to be detected. Therefore, the response information corresponding to the preset instruction is used to record the location information of the module to be detected.

[0041] In one embodiment of this application, when the instruction type of the preset instruction is write, it indicates that the preset instruction is used to write data into the storage device, and the response information corresponding to the preset instruction is used for recording.

[0042] In one embodiment of this application, when the communication type is direct communication and the instruction type is read, the method for determining the location information of the module to be detected is described in the following article. Figure 4 For detailed explanations, please refer to the following: When the communication type is direct communication and the instruction type is write, the method for determining the location information of the module to be detected is as follows: Figure 5 For detailed instructions, please refer to the following: When the communication type is indirect communication and the instruction type is read, the method for determining the location information of the module to be detected is... Figure 6 The corresponding detailed explanation.

[0043] S22, execute the preset instruction according to the location information to obtain the feedback data of the module to be detected.

[0044] In one embodiment of this application, the feedback data includes status information, debugging information, and register information. After determining the location information of the module to be tested from multiple modules according to a preset instruction, the feedback data of the module to be tested can be determined based on the location information. Specifically, a preset instruction can be executed according to the location information to perform a read operation or a write operation on the module to be tested, obtaining feedback data corresponding to the read operation or write operation. The feedback data is used to record the status information, debugging information, and register information of the module to be tested. For example, the status information can be a sleep state, a data interaction state, or a standby state. This application does not limit the content of the data body of the feedback data. For example, the debugging information can be the operation result obtained when the preset operation is performed on the module to be tested according to the preset instruction. When the preset instruction is used to write data into the register of the module to be tested, the debugging information can be the data value written to the register and whether the write operation was successfully completed. When the preset instruction is used to read data from the register, the debugging information can characterize whether the read function of the register of the module to be tested is normal.

[0045] S23, determine the fault type of the module to be tested based on the feedback data.

[0046] In one embodiment of this application, feedback data can be used to characterize the current operating state of the registers of the module under test. For example, when the feedback data is in a sleep state, it indicates that the registers of the module under test are in a sleep state, meaning the module under test is not currently running, and the fault type of the module under test can be determined to be hibernation; when the feedback data is in a data interaction state, it indicates that the registers of the module under test are in a data interaction state with the registers of other modules, and the operating state of the module under test can be determined to be normal.

[0047] like Figure 4 The diagram shown is a flowchart of a method for determining the location information of a module to be detected according to an embodiment of this application. The order of the steps in this flowchart can be changed, and some steps can be omitted, depending on different requirements. The method for determining the location information of a module to be detected according to an embodiment of this application includes the following steps.

[0048] S30, when the communication type is direct communication and the instruction type is read, acquire multiple preset instructions.

[0049] In one embodiment of this application, when the communication type of the preset instruction is direct communication, it indicates that the preset instruction is used to directly store the location information of the module to be detected. Since the location information of the module to be detected includes 32 bits, when the communication type of the preset instruction is direct communication, multiple preset instructions are obtained, and these multiple preset instructions are used to characterize the location information of the module to be detected.

[0050] S31, determine the position information of the module to be detected from the multiple modules according to the multiple preset instructions.

[0051] In one embodiment of this application, since the location information of the module to be detected includes 32 bits, and the space used to store the location information of the module to be detected in the preset instruction is also 32 bits, one preset instruction can be used to store the location information of one module to be detected. For example, in the first preset instruction among multiple preset instructions received by the storage device, bits 8 to 39 can be used to store the location information of the module to be detected.

[0052] In one embodiment of this application, determining the location information of the module to be detected from the plurality of modules according to the plurality of preset instructions includes: if the checksum corresponding to each preset instruction in the plurality of preset instructions is the same as the default encoding of the storage device, parsing the plurality of preset instructions according to the preset communication protocol to obtain the location information of the module to be detected. Wherein, if the checksum corresponding to each preset instruction in the plurality of preset instructions is the same as the default encoding of the storage device, it indicates that each preset instruction is used to directly operate on the module to be detected, such as performing a read or write operation on the module to be detected.

[0053] In one embodiment of this application, the method further includes: outputting pre-stored first response information when the checksum corresponding to any one of the plurality of preset instructions differs from the default encoding of the storage device. Wherein, when the checksum corresponding to any one of the plurality of preset instructions differs from the default encoding of the storage device, it indicates that the preset instruction is not intended for direct operation of the module under test, and the storage device can output the pre-stored first response information. The first response information is used to indicate that the storage device has recognized that the preset instruction is not intended for direct operation of the module under test. For example, the preset instruction may be a data transfer instruction, and the first response information is used to indicate that the storage device has recognized from the plurality of preset instructions that the preset instruction is used to transfer data to an application in the storage device.

[0054] like Figure 5 The diagram shown is a flowchart of a method for determining the location information of a module to be detected according to an embodiment of this application. The order of the steps in this flowchart can be changed, and some steps can be omitted, depending on different requirements. The method for determining the location information of a module to be detected according to an embodiment of this application includes the following steps.

[0055] S40, when the communication type is direct communication and the instruction type is write, obtain multiple preset instructions.

[0056] In one embodiment of this application, when the communication type of the preset instruction is direct communication, it indicates that the preset instruction is used to directly store the location information of the module to be detected. Since the location information of the module to be detected includes 32 bits, when the communication type of the preset instruction is direct communication, multiple preset instructions are obtained, and these multiple preset instructions are used to characterize the location information of the module to be detected.

[0057] S41, determine the position information of the module to be detected from the multiple modules according to the multiple preset instructions.

[0058] In one embodiment of this application, since the location information of the module to be detected includes 32 bits, and the space used to store the location information of the module to be detected in the preset instruction is also 32 bits, one preset instruction can be used to store the location information of one module to be detected. For example, in the first preset instruction among multiple preset instructions received by the storage device, bits 8 to 39 can be used to store the location information of the module to be detected.

[0059] In one embodiment of this application, determining the location information of the module to be detected from the plurality of modules according to the plurality of preset instructions includes: if the checksum corresponding to each preset instruction in the plurality of preset instructions is the same as the default encoding of the storage device, parsing the plurality of preset instructions according to the preset communication protocol to obtain the location information of the module to be detected. Wherein, if the checksum corresponding to each preset instruction in the plurality of preset instructions is the same as the default encoding of the storage device, it indicates that each preset instruction is used to directly operate on the module to be detected, such as performing a read or write operation on the module to be detected.

[0060] In one embodiment of this application, the method further includes: if the check code corresponding to any one of the plurality of preset instructions is different from the default encoding of the storage device, outputting pre-stored first response information.

[0061] In one embodiment of this application, the method further includes: running the plurality of preset instructions to obtain second response information corresponding to the plurality of preset instructions; receiving a plurality of read instructions upon obtaining the second response information; and running the plurality of read instructions to obtain feedback data from the module under test. The second response information characterizes the response information obtained after the storage device runs the plurality of preset instructions. For example, when the plurality of preset instructions are used to perform a write operation on the module under test, the second response information can be used to characterize that the write operation has been completed. To determine whether the result after the write operation on the module under test meets the user's requirements, a read instruction can be run after the write operation is completed to obtain the feedback data from the module under test. The read instruction can be a preset instruction of type read. This allows determination, based on the response information corresponding to the read instruction, whether the data written to the module under test through the plurality of preset instructions meets the user's requirements.

[0062] like Figure 6 The diagram shown is a flowchart of a method for determining the location information of a module to be detected according to an embodiment of this application. The order of the steps in this flowchart can be changed, and some steps can be omitted, depending on different requirements. The method for determining the location information of a module to be detected according to an embodiment of this application includes the following steps.

[0063] S50, when the communication type is indirect communication and the instruction type is read, the preset instruction is parsed according to the preset communication protocol to obtain the index of the module to be detected.

[0064] In one embodiment of this application, when multiple preset instructions are used to read or write to the module under test, the storage device will run the preset instructions multiple times, thereby reducing the efficiency of obtaining feedback data from the module under test. Therefore, in order to improve the efficiency of obtaining feedback data from the module under test, the number of preset instructions can be reduced. For example, a single preset instruction can be used to complete the read operation of the module under test, thereby improving the efficiency of obtaining feedback data from the module under test. Since the location information of the module under test includes 32 bits, and the space used to store the location information of the module under test in the preset instructions is also 32 bits, an index can be used in the preset instructions to represent the location information of the module under test. The space occupied by the index in the preset instructions is much smaller than the space occupied by the location information in the preset instructions. For example, the index can be a numerical value or a character, and this application does not limit this.

[0065] S51, determine the location information of the module to be detected from the preset mapping relationship according to the index.

[0066] In one embodiment of this application, the location information of the module to be detected can be determined from a preset mapping relationship based on an index. The preset mapping relationship is a pre-set mapping relationship between an index and location information. For example, the index can be a natural number such as 1, 2, or 3, and the location information can be a string of multiple bits such as "location information 1", "location information 2", or "location information 3". Therefore, the preset mapping relationship includes index 1 corresponding to "location information 1", index 2 corresponding to "location information 2", and index 3 corresponding to "location information 3".

[0067] Please see Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 700 includes a storage device 100 and a processor 300. The storage device 100 is used to store computer-readable instructions, and the processor 300 executes the computer-readable instructions stored in the storage device to implement a fault detection method as described in any of the above embodiments.

[0068] In one embodiment of this application, the electronic device 700 further includes a bus and a computer program stored in the storage device 100 and executable on the processor 300, such as a fault detection program.

[0069] Figure 7 Only an electronic device 700 having a storage device 100 and a processor 300 is shown; those skilled in the art will understand that... Figure 7 The structure shown does not constitute a limitation on the electronic device 700, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0070] Combination Figure 2 The storage device 100 in the electronic device 700 stores a plurality of computer-readable instructions to implement the fault detection method. The processor 300 can execute the plurality of instructions to: parse a received preset instruction according to a preset communication protocol to obtain a check code of the preset instruction; if the check code is the same as the default encoding of the storage device, determine the location information of the module to be detected from the plurality of modules according to the preset instruction; execute the preset instruction according to the location information to obtain feedback data of the module to be detected, the feedback data including status information, debugging information and register information; and determine the fault type of the module to be detected according to the feedback data.

[0071] Specifically, the processor 300's implementation method for the above instructions can be found in [reference needed]. Figure 2 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.

[0072] Those skilled in the art will understand that the schematic diagram is merely an example of the electronic device 700 and does not constitute a limitation on the electronic device 700. The electronic device 700 can be a bus-type structure or a star-type structure. The electronic device 700 may also include more or fewer other hardware or software than shown in the diagram, or different component arrangements. For example, the electronic device 700 may also include input / output devices, network access devices, etc.

[0073] It should be noted that electronic device 700 is only an example. Other existing or future electronic products that are applicable to this application should also be included within the scope of protection of this application and are incorporated herein by reference.

[0074] The storage device 100 includes at least one type of readable storage medium, which can be non-volatile or volatile. The readable storage medium includes flash memory, portable hard drives, multimedia cards, card-type memories (e.g., SD or DX memories), magnetic storage, magnetic disks, optical disks, etc. In some embodiments, the storage device 100 can be an internal storage unit of the electronic device 700, such as the portable hard drive of the electronic device 700. In other embodiments, the storage device 100 can also be an external storage device of the electronic device 700, such as a plug-in portable hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 700. The storage device 100 can be used not only to store application software and various types of data installed on the electronic device 700, such as the code of a fault detection program, but also to temporarily store data that has been output or will be output.

[0075] In some embodiments, the processor 300 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 300 is the control unit of the electronic device 700, connecting various components of the electronic device 700 via various interfaces and lines. It executes programs or modules stored in the storage device 100 (e.g., executing fault detection programs) and calls data stored in the storage device 100 to perform various functions of the electronic device 700 and process data.

[0076] The processor 300 executes the operating system of the electronic device 700 and various installed applications. The processor 300 executes the applications to implement the steps in the various fault detection method embodiments described above, for example... Figure 2 The steps are shown.

[0077] For example, the computer program may be divided into one or more modules / units, which are stored in the storage device 100 and executed by the processor 300 to complete this application. The one or more modules / units may be a series of computer-readable instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device 700.

[0078] The integrated unit implemented as a software functional module described above can be stored in a computer-readable storage medium. This software functional module, stored in a storage medium, includes several instructions to cause a computer device (which may be a personal computer, computer equipment, or network device, etc.) or processor to execute portions of the fault detection method described in the various embodiments of this application.

[0079] If the modules / units integrated in the electronic device 700 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware devices. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above.

[0080] The computer program includes computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory, and other memory.

[0081] Furthermore, the computer-readable storage medium may primarily include a stored program area and a stored data area, wherein the stored program area may store the operating system, an application program required for at least one function, etc.; and the stored data area may store data created based on the use of blockchain nodes, etc.

[0082] The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, in... Figure 7 The symbol is represented by only one arrow, but this does not mean that there is only one bus or one type of bus. The bus is configured to enable communication between the storage device 100 and at least one processor 300, etc.

[0083] This application also provides a computer-readable storage medium (not shown), which stores computer-readable instructions that are executed by a processor in an electronic device to implement the fault detection method described in any of the above embodiments.

[0084] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0085] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0086] Furthermore, the functional modules in the various embodiments of this application 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 in the form of hardware plus software functional modules.

[0087] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices described in the specification may also be implemented by a single unit or device through software or hardware. Terms such as "first," "second," etc., are used to indicate names and do not indicate any specific order.

[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.

Claims

1. A fault detection method applied to a storage device, the storage device comprising multiple modules, characterized in that, The method includes: The received preset instruction is parsed according to the preset communication protocol to obtain the verification code of the preset instruction; If the verification code is the same as the default encoding of the storage device, the location information of the module to be detected is determined from the plurality of modules according to the preset instruction; The preset instruction is executed according to the location information to obtain feedback data of the module to be detected. The feedback data includes status information, debugging information and register information. The fault type of the module to be tested is determined based on the feedback data.

2. The fault detection method as described in claim 1, characterized in that, The method further includes: Before determining the location information of the module to be detected from the plurality of modules according to the preset instruction, the preset instruction is parsed according to the preset communication protocol to obtain the communication type and instruction type of the preset instruction, wherein the communication type includes direct communication and indirect communication, and the instruction type includes reading and writing.

3. The fault detection method as described in claim 2, characterized in that, The method further includes: When the communication type is direct communication and the instruction type is read, multiple preset instructions are obtained; The location information of the module to be detected is determined from the multiple modules according to the multiple preset instructions.

4. The fault detection method as described in claim 2, characterized in that, The method further includes: When the communication type is direct communication and the instruction type is write, multiple preset instructions are obtained; The location information of the module to be detected is determined from the multiple modules according to the multiple preset instructions.

5. The fault detection method as described in claim 2, characterized in that, The method further includes: When the communication type is indirect communication and the instruction type is read, the preset instruction is parsed according to the preset communication protocol to obtain the index of the module to be detected; The location information of the module to be detected is determined from the preset mapping relationship based on the index.

6. The fault detection method according to any one of claims 3 to 4, characterized in that, The step of determining the location information of the module to be detected from the multiple modules according to the multiple preset instructions includes: If the checksum corresponding to each of the multiple preset instructions is the same as the default encoding of the storage device, the multiple preset instructions are parsed according to the preset communication protocol to obtain the location information of the module to be detected.

7. The fault detection method according to any one of claims 3 to 4, characterized in that, The method further includes: If the checksum corresponding to any one of the preset instructions is different from the default encoding of the storage device, the pre-stored first response information is output.

8. The fault detection method as described in claim 4, characterized in that, The method further includes: Execute the multiple preset instructions to obtain the second response information corresponding to the multiple preset instructions; Upon receiving the second response information, multiple read commands are received; The multiple read instructions are executed to obtain the feedback data from the module under test.

9. A storage device, characterized in that, The computer program stored in the storage device implements the fault detection method as described in any one of claims 1 to 8 when executed by the processor.

10. An electronic device, characterized in that, The electronic device includes a storage device as described in claim 9 and a processor, the processor being configured to implement the fault detection method as described in any one of claims 1 to 8 when executing a computer program stored in the storage device.