Information viewing method of storage device, electronic device and storage medium
By receiving information viewing commands in the operation interface, obtaining and displaying BGA SSD information, the problem that users cannot view independently is solved, local independent detection and fault repair are realized, and the reliability of storage devices is improved.
Patent Information
- Application Number
- CN202510539986.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-04-27
AI Technical Summary
In the prior art, users cannot view the information of BGA SSDs independently, and need to send it back to the original factory and rely on professional personnel to operate, resulting in cumbersome processes.
It provides a method for viewing information of a storage device. When receiving the information viewing command in the operation interface, it obtains and displays the information of the storage device, including device information, self-monitoring information and operation information, judges the fault type and generates fault repair suggestions.
Users can view the information of storage devices locally, which improves the flexibility and accuracy of fault detection, reduces the probability of data errors in storage devices during subsequent use, improves the reliability of storage devices, and provides troubleshooting suggestions.
Smart Images

Figure CN120429153A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of chip technology, and in particular to a method for viewing information of a storage device, an electronic device, and a storage medium. Background Art
[0002] With the rapid development of storage device technology, solid-state drives (SSDs) have become widely used. When an SSD experiences read / write anomalies, storage unit failures, or compatibility issues, it is often necessary to update the SSD's firmware to enable it to continue functioning properly.
[0003] A BGA (Ball Grid Array) SSD is a solid-state drive that uses ball grid array packaging technology. The flash memory and controller are typically packaged together in a BGA SSD. Sometimes, when users need to understand the configuration or device status of a BGA SSD, they need to view BGA SSD information.
[0004] However, the current method for checking BGA SSD information is for users to send the BGA SSD back to the original manufacturer, and this method is highly dependent on professional personnel, making it impossible for users to check the information independently. The entire process is very troublesome. Summary of the Invention
[0005] In response to the shortcomings of the existing technology, the present application provides a storage device information viewing method, electronic device and storage medium. When a connection with a storage device is detected and an information viewing command is received in the operation interface, the information of the storage device corresponding to the information viewing command is obtained and the corresponding information is displayed, so that the user can independently view the information of the storage device locally.
[0006] In order to solve the above problems, the present invention provides the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a method for viewing information on a storage device, comprising: setting a system startup sequence to preferentially start from the information viewing storage device;
[0008] When starting up, the system starts up from the information viewing storage device and enters the initial interface of the information viewing system;
[0009] In the information viewing system, in response to receiving an unlock command and obtaining an unlock password, unlocking the information viewing operation permission;
[0010] In response to receiving the execution command, executing the target executable file in the information viewing system according to the execution command to enter the operation interface;
[0011] When a connection with a storage device is detected and an information viewing command is received in the operation interface, information of the storage device corresponding to the information viewing command is obtained and the corresponding information is displayed, the information including at least one of device information, self-monitoring information, and operation information;
[0012] When a fault detection command is received, determining a fault type of the storage device based on information about the storage device, the fault type including a temporary software conflict, a hardware error, and a data check error;
[0013] Generate a fault repair suggestion based on the fault type of the storage device.
[0014] In some embodiments, the device information includes fault information, the command to view device information includes a command to view fault information, and when a connection with a storage device is detected and an information viewing command is received in the operation interface, obtaining information of the storage device corresponding to the information viewing command and displaying the corresponding information includes:
[0015] When a connection with a storage device is detected and a command to view fault information is received in the operation interface, a fault detection mode is determined according to the command to view fault information, the fault detection mode including a quick detection mode and a comprehensive detection mode;
[0016] When the fault detection mode is the fast detection mode, determining the detection range to be all storage units in the storage device that have stored data;
[0017] When the fault detection mode is the comprehensive detection mode, determining the detection range to be all storage units in the storage device;
[0018] Performing fault detection on the storage units within the detection range to obtain the fault information;
[0019] The status and location of all storage units are displayed in a graphical interface representing all storage units according to the fault information.
[0020] In some embodiments, performing fault detection on the storage units within the detection range to obtain the fault information includes:
[0021] Acquiring electrical data of each storage unit within the detection range, and identifying a faulty storage unit based on the electrical data of each storage unit and a preset numerical range of electrical data of normal storage units;
[0022] Writing test data into each of the storage units in sequence according to a preset algorithm, and then reading the stored data in each of the storage units to perform fault detection to identify the faulty storage unit;
[0023] The addresses and quantities of all the faulty storage units are recorded to obtain the fault information.
[0024] In some embodiments, the method further comprises:
[0025] Determining a shielding mode corresponding to the storage device based on preset correspondence information between device information and shielding modes and the device information, wherein the shielding mode includes a redundant shielding mode and a dynamic shielding mode;
[0026] The address of each faulty storage unit is mapped to the address of a normal storage unit using a masking mode corresponding to the storage device.
[0027] In some embodiments, the operation information includes an operation log, the information viewing command includes an operation log viewing command, and when a connection with a storage device is detected and an information viewing command is received in the operation interface, obtaining information of the storage device corresponding to the information viewing command and displaying the corresponding information includes:
[0028] When a connection with a storage device is detected and an operation log viewing command is received in the operation interface, a viewing time period and a target log to be viewed are determined according to the operation log viewing command, where the target log includes at least one of an access log, an error log, and an operation log;
[0029] Obtaining a target log recorded by the storage device during the viewing time period;
[0030] A statistical graph of the usage of the storage device during the viewing time period is generated and displayed based on the target log.
[0031] In some embodiments, the information viewing command includes a device information viewing command, and when a connection with a storage device is detected and the information viewing command is received in the operation interface, obtaining information of the storage device corresponding to the information viewing command and displaying the corresponding information includes:
[0032] When a connection with a storage device is detected and a device information viewing command is received in the operation interface, the device information is obtained according to the device information viewing command;
[0033] An information list is generated and displayed based on the device information, where the device information includes at least one of a model, serial number, manufacturer information, firmware version identification, manufacturing date, storage capacity, and storage unit type of the storage device.
[0034] In some embodiments, when receiving the fault detection command, determining the fault type of the storage device based on the information of the storage device includes:
[0035] When a fault detection command is received, determining whether the fault type is a temporary software conflict or a hardware error based on the operation log in the operation information and the operating temperature in the self-monitoring information;
[0036] identifying a logical fault storage unit and a real fault storage unit in the storage device based on the fault information in the device information and the self-monitoring information;
[0037] When the number of the logically faulty storage units is greater than a first preset number, the fault type is determined to be a data check error.
[0038] In some implementations, generating a fault repair suggestion based on the fault type of the storage device includes:
[0039] When the fault type of the storage device is a temporary software conflict, generating a fault repair suggestion of restarting the storage device to immediately clear the fault of the storage device;
[0040] When the fault type of the storage device is a data check error, generating a fault repair suggestion of performing a firmware self-check and update;
[0041] When the failure type of the storage device is a hardware error, a failure repair suggestion of backing up the storage data and replacing the storage device is generated.
[0042] In a second aspect, an embodiment of the present application provides an electronic device, comprising:
[0043] at least one processor; and,
[0044] a memory communicatively connected to the at least one processor; wherein,
[0045] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the information viewing method of the storage device as described in the first aspect.
[0046] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores executable code for updating firmware, and the executable code is executed by a processor to implement the information viewing method of the storage device as described in the first aspect.
[0047] The present application provides a method for viewing information of a storage device, an electronic device, and a storage medium. When a connection with a storage device is detected and an information viewing command is received in an operation interface, the method obtains the information of the storage device corresponding to the information viewing command and displays the corresponding information, thereby enabling a user to independently view the information of the storage device locally. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a flowchart of the information viewing method of the storage device provided in an embodiment of the present application.
[0049] Figure 2 yes Figure 1 Detailed flowchart of step S600.
[0050] Figure 3 yes Figure 1 Detailed flowchart of step S700.
[0051] Figure 4 It is a structural diagram of the information viewing device of the storage device provided in an embodiment of the present application.
[0052] Figure 5 This is a structural diagram of an electronic device provided in an embodiment of the present application.
[0053] Figure 6 This is a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0055] 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 being referred to. Thus, a feature specified as "first" or "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.
[0056] The present application provides a method for viewing information of a storage device, an electronic device, and a storage medium. When a connection with a storage device is detected and an information viewing command is received in an operation interface, the method obtains the information of the storage device corresponding to the information viewing command and displays the corresponding information, thereby enabling a user to independently view the information of the storage device locally.
[0057] The storage device referred to in this application may be a mechanical hard disk, an SSD, an optical storage device, or a memory card. The SSD may be a BGA SSD. A BGA SSD may include a Flash memory chip, which may include NOR Flash and NAND Flash. The following example uses a BGA SSD as an example, but this should not be considered a limitation of this application.
[0058] The information viewing storage device involved in this application can be a removable storage device, such as a USB flash drive, a memory card, or a mobile hard disk, or it can be other storage devices.
[0059] The following will describe in detail the information viewing method of the storage device provided by this application with reference to the accompanying drawings.
[0060] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for viewing information on a storage device provided in an embodiment of the present application. Figure 1 As shown, the information viewing method of the storage device includes: steps S100 to S700.
[0061] Step S100: setting the system startup sequence to prioritize starting from the information viewing storage device.
[0062] In some embodiments, the information viewing storage device is a storage device external to the electronic device. For example, the information viewing storage device may be a USB flash drive.
[0063] In some embodiments, before step S100, the method further includes step S101: acquiring an information viewing system, and storing the information viewing system in an information viewing storage device.
[0064] Step S200: booting from the information viewing storage device at startup and entering the initial interface of the information viewing system.
[0065] In some embodiments, the information viewing system is a folder including multiple files. When started, it is started from the information viewing storage device, and in response to receiving an operation instruction, the folder is opened according to the operation instruction to enter the initial interface of the information viewing system.
[0066] In some embodiments, upon startup, the information viewing storage device is started and a folder is automatically opened to enter the initial interface of the information viewing system.
[0067] In some embodiments, the information viewing system is stored in a storage device within the electronic device. For example, the information viewing system is stored in a system hard disk within the electronic device. In this case, the information viewing system can be started from the system hard disk within the electronic device according to the default system startup sequence to enter the information viewing system.
[0068] Step S300: In the information viewing system, in response to receiving an unlock command and obtaining an unlock password, the information viewing operation permission is unlocked.
[0069] Optionally, the command identifier and unlock password of the unlock command are preset. When the command identifier of the unlock command is received, the password is obtained and it is determined whether the password is the preset unlock password. When the password is determined to be the preset unlock password, the information viewing operation permission is unlocked.
[0070] Exemplarily, the command identifier of the unlock command is “sudo su”.
[0071] Optionally, if the password is the preset unlock password, root permissions are unlocked. Root permissions are the highest level of permissions, granting complete control over the system. Unlocking root permissions also unlocks information viewing permissions.
[0072] Step S400: In response to receiving the execution command, the target executable file in the system is viewed according to the execution information of the execution command, and an operation interface is entered.
[0073] In some implementations, the target executable file is executed according to the file identifier of the target executable file carried in the execution command to enter the operation interface.
[0074] Exemplarily, the file identifier carried by the execution command is . / NVMe Tool ARCH64, and the file name of the target executable file is NVMe Tool ARCH64.
[0075] In some implementations, command identifiers of all executable commands and operation instructions for each executable command are displayed on the operation interface.
[0076] In some implementations, all executable commands include card activation commands and commands for additional functions.
[0077] In some embodiments, the card activation command includes a new card activation command, a set serial number activation command, and a retain serial number activation command. When the card activation command is executed, all stored data and fault information in the storage device are cleared, the faulty storage unit of the storage device is shielded, and the firmware of the storage device is updated to the target version.
[0078] In some embodiments, the commands in the additional functions include information viewing commands. The information viewing commands include commands for viewing device information, viewing self-monitoring (Self-Monitoring, Analysis and Reporting Technology, SMART) information, viewing the operating information of the storage device, obtaining the data of the index data block, transferring WPRO (Write-Protect Register or other related) data, transferring debugging information, transferring all data, and obtaining relevant information of the storage device. The commands in the additional functions also include commands such as firmware version update commands. Among them, the operating information of the storage device includes the usage rate of the storage space, the delay time of the I / O operation, etc. The data of the index data block is used to determine the data management method adopted by the storage device. The command for obtaining relevant information of the storage device is used to execute the command for viewing SMART information, the command for viewing the operating information of the storage device, the command for obtaining the data of the index data block, the command for transferring debugging information, and the command for transferring WPRO data at one time.
[0079] Step S500: When a connection with a storage device is detected and an information viewing command is received in the operation interface, information of the storage device corresponding to the information viewing command is obtained and the corresponding information is displayed.
[0080] The information includes at least one of equipment information, self-monitoring information and operation information.
[0081] In some implementations, the device information includes information such as the manufacturer, model, serial number, and current firmware version identifier of the storage device.
[0082] In some implementations, information of the storage device corresponding to the information viewing command is displayed in the operation interface.
[0083] In some embodiments, the device information includes fault information, and the command to view the device information includes a command to view the fault information. In this case, step S500 includes steps S510 to S550.
[0084] Step S510: When a connection with a storage device is detected and a command to view fault information is received in the operation interface, a fault detection mode is determined according to the command to view fault information.
[0085] Among them, the fault detection mode includes a quick detection mode and a comprehensive detection mode.
[0086] Step S520: When the fault detection mode is the fast detection mode, determine that the detection range is all storage units that have stored data in the storage device.
[0087] Step S530: When the fault detection mode is the comprehensive detection mode, the detection range is determined to be all storage units in the storage device.
[0088] Step S540: Perform fault detection on the storage units within the detection range to obtain fault information.
[0089] Through the above method, the user can independently select the required fault detection mode, thereby improving the flexibility of obtaining fault information.
[0090] In some embodiments, step S540 includes steps S541 to S543.
[0091] Step S541: acquiring electrical data of each storage unit within a detection range, and identifying a faulty storage unit based on the electrical data of each storage unit and a preset numerical range of electrical data of normal storage units.
[0092] In some embodiments, the electrical data includes parameters such as voltage and current.
[0093] In some embodiments, when the voltage of a memory cell is not within a value interval of the voltage of a normal memory cell, the memory cell is determined to be a faulty memory cell.
[0094] In some embodiments, when the current of a memory cell is not within a value interval of the current of a normal memory cell, the memory cell is determined to be a faulty memory cell.
[0095] In some embodiments, voltage and current change data of a storage cell over a period of time are read, and a voltage change curve of the storage cell is determined based on the voltage change data, and a current change curve of the storage cell is determined based on the current change data. Then, abnormal changes in the voltage and current change curves of the storage cell are identified based on preset identification rules. When an abnormal change occurs, the storage cell is determined to be a faulty storage cell.
[0096] Exemplarily, when it is identified that the current change rate in the current change curve is greater than the normal rate, and the current is greater than the normal current and does not decrease for a preset time, it is determined that an abnormal change occurs.
[0097] Exemplarily, when it is identified that a change in a voltage value in a voltage change curve is greater than a preset change amplitude when a write operation or a read operation is performed on a memory cell, it is determined that an abnormal change occurs.
[0098] By using the above-mentioned method of identifying faulty storage units based on the electrical data of the storage units, it is possible to identify faulty storage units that can currently store data normally but have physical defects, thereby reducing the probability of data storage errors during subsequent use of the storage device and improving the reliability of the storage device.
[0099] Step S542: writing the test data into each storage unit in sequence according to a preset algorithm, and then reading the stored data in each storage unit to perform fault detection to identify the faulty storage unit.
[0100] In some implementations, the test steps of the preset algorithm are determined based on the physical characteristics of the storage unit and possible failure conditions.
[0101] In some embodiments, the preset algorithm includes multiple stages of testing, and in each stage of testing, fault detection is performed on the stored data in the storage unit according to the test data corresponding to the test step to identify the faulty storage unit.
[0102] Optionally, there are multiple types of storage unit failures, and a test in one stage can be used to detect one, multiple or a type of storage unit failures.
[0103] In some embodiments, different faults correspond to different sensitization sequences. A sensitization sequence is an input sequence used to detect a specific fault. A combination of data operations, including writing test data and reading test data, can be performed on the memory cell through multiple stages of testing. The sensitization sequence is input into the memory cell to manifest the fault in the memory cell.
[0104] Step S543: Record the addresses and numbers of all faulty storage units to obtain fault information.
[0105] Step S550: Displaying the status and location of all storage units in a graphical interface representing all storage units according to the fault information.
[0106] In some embodiments, a graphic interface uses one graphic to represent one storage unit, and the color or text of the graphic indicates the status of the storage unit. For example, the graphic of a normal storage unit is green, and the graphic of a faulty storage unit is red.
[0107] Optionally, the graphic of the faulty storage unit is caused to reciprocate within a preset motion range in the graphic interface to highlight the faulty storage unit.
[0108] In some implementations, multiple masking modes can be used to mask faulty storage units of a storage device based on the device information of the storage device. Different storage device models often have different usage requirements, and sometimes a more intelligent masking mode is needed for the storage device to prevent the address of a faulty storage unit from being mapped to the address of a normal storage unit that has not been detected as faulty but may be about to fail, thereby improving the reliability of the storage device.
[0109] In some embodiments, the method further includes steps S800 to S900.
[0110] Step S800: determining the shielding mode corresponding to the storage device based on the preset correspondence relationship information between the device information and the shielding mode and the device information.
[0111] Among them, the shielding mode includes redundant shielding mode and dynamic shielding mode.
[0112] Step S900: using a masking mode corresponding to the storage device to map the address of each faulty storage unit to the address of a normal storage unit.
[0113] In some embodiments, a storage device is pre-configured with spare storage space. When the masking mode is a redundant masking mode, a sequential mapping method can be used to map the address of each faulty storage unit to the address of a normal storage unit. Specifically, starting from the starting address of the spare storage space, the address of each faulty storage unit is sequentially mapped to the address of a normal storage unit in the spare storage space in the address mapping table.
[0114] In some embodiments, when the masking mode is a redundant masking mode, a random mapping method can be used to map the address of each failed storage unit to the address of a normal storage unit. Specifically, a hash function can be used to sequentially convert the address of each failed storage unit to the address of a normal storage unit in the backup storage space, and the address mapping table can be modified accordingly.
[0115] In some embodiments, when the shielding mode is a dynamic shielding mode, a score of each normal storage unit in the storage device is calculated according to a preset scoring rule, and the address of each faulty storage unit is mapped to the address of a corresponding normal storage unit whose score is within a preset score range.
[0116] In some embodiments, the preset scoring rule is that the score of a normal storage cell is equal to the first weight multiplied by the number of erase / write cycles of the normal storage cell plus the second weight multiplied by the data error rate of the normal storage cell. The number of erase / write cycles and the data error rate of the normal storage cell can be read from a preset storage location on the storage device. The data error rate can be an ECC (Error Correcting Code) error rate obtained during a self-test of the storage device.
[0117] The more times a normal memory cell is erased or written, or the higher its data error rate, the more likely it is to fail. Therefore, it can be assumed that a normal memory cell with a score above the upper limit of the preset score range is likely to fail soon, while a normal memory cell with a score within the preset score range has a low probability of failing in the short term.
[0118] In some embodiments, information such as the number of erase and write cycles, electrical data, data error rate, operating temperature curve, and read and write speed of a normal storage unit is read in a storage device, and this information is input into a pre-trained scoring model to obtain a score for the normal storage unit.
[0119] Optionally, the scoring model can be a multi-layer perceptron model, a convolutional neural network model, a recurrent neural network model, or a variant model thereof, etc.
[0120] By adopting the dynamic shielding mode to shield the faulty storage unit, it is possible to avoid mapping the address of the faulty storage unit to the address of a normal storage unit that has not been detected as faulty but may be about to fail, thereby avoiding the normal storage unit from failing in a short period of time, thereby improving the reliability of the storage device.
[0121] In some embodiments, the operation information includes an operation log, and the information viewing command includes an operation log viewing command. In this case, step S500 includes steps S560 to S580.
[0122] Step S560: When a connection with the storage device is detected and an operation log viewing command is received in the operation interface, a viewing time period and a target log to be viewed are determined according to the operation log viewing command.
[0123] The target log includes at least one of an access log, an error log, and an operation log.
[0124] In some implementations, access logs are used to record the operation time and data volume of data read and write operations on a storage device. Error logs are used to record error events that occur during the operation of a storage device. Error events may include hardware failures, protocol errors, and data checksum errors. Operation logs are used to record operations on a storage device, such as the operation time of firmware updates, formatting, and power-on restarts.
[0125] Step S570: Obtain the target log recorded by the storage device during the viewing time period.
[0126] Step S580: Generate and display a statistical graph of the usage of the storage device during the viewing time period based on the target log.
[0127] Optionally, the statistical graph includes the frequency, operation time, data volume and cumulative operation time of each operation within the viewing time period generated based on the target log.
[0128] Optionally, the statistical chart is a line chart, a histogram, a pie chart, or the like.
[0129] Optionally, the statistical chart is a static statistical chart or a dynamic statistical chart.
[0130] In some implementations, usage recommendations are also generated and displayed based on the usage of the storage device during the viewing time period.
[0131] Optionally, when it is calculated that the total amount of data written from the data writing operation and the data writing operation is greater than a first preset amount of data, a suggestion for adding another storage device is generated and displayed, because the current storage device may not be able to meet the storage requirement.
[0132] Optionally, when the cumulative operation time is greater than a preset time, the stored data is checked for redundant files, a redundant file list is generated and displayed, and usage suggestions for performing data deduplication or data compression operations are provided.
[0133] Optionally, when the number of error events occurring is greater than a preset number, a suggestion to replace the storage device is generated and displayed.
[0134] In some embodiments, abnormal data points are automatically marked in red or flashing in the statistical graph, and combined with usage suggestions to guide the user. Abnormal data points refer to data points that indicate a sudden increase in data volume or frequency.
[0135] In some embodiments, the information viewing command includes a device information viewing command. In this case, step S500 includes steps S590 to S591.
[0136] Step S590: When a connection with a storage device is detected and a device information viewing command is received in the operation interface, device information is obtained according to the device information viewing command.
[0137] Step S591: Generate and display an information list based on the device information.
[0138] The device information includes at least one of the model, serial number, manufacturer information, firmware version identifier, manufacturing date, storage capacity, and storage unit type of the storage device.
[0139] Step S600: When a fault detection command is received, the fault type of the storage device is determined based on the information of the storage device.
[0140] Among them, the fault types include temporary software conflicts, hardware errors and data verification errors.
[0141] Temporary software conflicts occur when a storage device experiences abnormal operation due to incompatibilities, resource contention, or logical errors between the operating system, firmware, or applications. For example, temporary software conflicts can occur when the operating system allocates resources improperly during multitasking, leading to temporary failures such as storage device response delays and read / write errors. Temporary software conflicts typically do not cause permanent damage to the storage device hardware and can usually be resolved by restarting the device.
[0142] A hardware error occurs when a storage device's physical hardware fails, causing it to malfunction. Hardware errors can be caused by aging flash memory chips, damage to the main control chip, circuit board shorts, or loose connectors. When a storage device experiences a hardware error, it's often rendered useless.
[0143] A data verification error occurs when the storage device's verification mechanism detects a violation of data integrity during data writing, reading, or transmission. This can be caused by file system errors or firmware issues and is generally remediable.
[0144] See also Figure 2 , Figure 2 yes Figure 1 Detailed flow chart of step S600 in FIG. Figure 2 As shown, in some embodiments, step S600 includes steps S610 to S630.
[0145] Step S610: When a fault detection command is received, it is determined whether the fault type is a temporary software conflict or a hardware error based on the operation log in the operation information and the operating temperature in the self-monitoring information.
[0146] In some implementations, step S610 includes steps S611 to S612.
[0147] Step S611: Identify the error event code in the operation log, record the error event corresponding to the error event code, and classify the error event corresponding to the error event code according to the error type.
[0148] The error types include software-related errors and hardware-related errors.
[0149] In some embodiments, a correlation analysis is performed on all error events based on the time of the error events. If the error event may be a software-related error or a software-related error, a detection is performed to determine whether a hardware-related error exists within a first preset time period including the time of occurrence of the error event. If a hardware-related error exists within the first preset time period including the time of occurrence of the error event, the error event is classified as a hardware-related error; otherwise, the error event is classified as a software-related error.
[0150] Step S612: When the error event includes a hardware-related error, determine whether the fault type is a temporary software conflict or a hardware error based on the occurrence frequency of the hardware-related error or the operating temperature when the hardware-related error occurs.
[0151] In some implementations, when the frequency of occurrence of hardware-related errors is greater than the first preset frequency within the second preset time period, the fault type is determined to be a hardware error.
[0152] Optionally, the second preset time period may be a viewing time period or a user-defined time period.
[0153] In some implementations, when the operating temperature when a second preset number of hardware-related errors occur is greater than a preset temperature, the fault type is determined to be a hardware error.
[0154] In some embodiments, when the error event does not include hardware-related errors, or the frequency of occurrence of hardware-related errors within a second preset time period is not greater than the first preset frequency, or the operating temperature when a second preset number of hardware-related errors occur is not uniformly greater than a preset temperature, the fault type is determined to be a temporary software conflict.
[0155] Step S620: Identify logical faulty storage units and real faulty storage units in the storage device based on the fault information and self-monitoring information in the device information.
[0156] Logically faulty storage units are those that are logically inaccessible, but the physical hardware itself is not faulty. This can be caused by file system errors, data checksum errors, or firmware issues. For example, a firmware issue may mark some storage units as faulty, even though these units themselves are not faulty.
[0157] A truly faulty memory cell is a physically damaged memory cell. This is caused by manufacturing defects or wear and tear due to long-term use.
[0158] In some embodiments, when the storage device is a BGA SSD, the failed storage unit refers to a block in the storage device, and a block is the smallest erase operation unit of the storage device.
[0159] After the faulty storage unit is erased, if the faulty storage unit is a logical faulty storage unit, data can be stored normally. If the faulty storage unit is a real faulty storage unit, it will still be a faulty storage unit.
[0160] In some embodiments, the addresses of all failed storage cells are determined based on the failure information in the device information, and an erase operation is performed on all failed storage cells based on the addresses of the failed storage cells. Since the failed storage cells are already marked and do not store data at this point, the erase operation does not clear the data. After the erase operation is performed on all failed storage cells, changes in the failed storage cell count in the self-monitoring information are detected. When the failed storage cell count decreases, the difference between the original failed storage cell count and the failed storage cell count after the erase operation is calculated and determined as the number of logical failed storage cells.
[0161] In some embodiments, the address mapping table is read, the number of real faulty memory cells pre-marked at the factory is calculated based on the address mapping table, all faulty memory cells that are not real faulty memory cells are determined as logical faulty memory cells, and the number of logical faulty memory cells is calculated.
[0162] Step S630: When the number of logically failed storage units is greater than a first preset number, the failure type is determined to be a data verification error.
[0163] Optionally, the first preset number is the total number of storage units multiplied by a first preset ratio.
[0164] Optionally, the first preset number is a preset fixed value.
[0165] Step S700: Generate a fault repair suggestion based on the fault type of the storage device.
[0166] See also Figure 3 , Figure 3 yes Figure 1 Detailed flow chart of step S700 in FIG. Figure 3 As shown, in some embodiments, step S700 is step S710 to step S730.
[0167] Step S710: When the fault type of the storage device is a temporary software conflict, a fault repair suggestion is generated to restart the storage device to immediately clear the fault of the storage device.
[0168] Step S720: When the fault type of the storage device is a data verification error, a fault repair suggestion of performing a firmware self-check and update is generated.
[0169] When the storage device failure type is a data verification error, it is generally caused by a firmware problem. At this time, a fault repair suggestion is generated to perform a firmware self-check and update, and the fault repair suggestion is displayed on the operation interface for the user to repair the storage device.
[0170] In some implementations, when the failure type of the storage device is a data check error, a firmware self-check and update is automatically performed to automatically repair the data check error.
[0171] As described above, in some embodiments, all executable commands include card activation commands and commands for additional functions.
[0172] In some embodiments, the card activation command includes a new card activation command, a set serial number activation command, and a retain serial number activation command. When executing the card activation command, all stored data and fault information in the storage device are cleared, the faulty storage unit of the storage device is shielded, and the storage device's firmware is updated to the target version. When executing the new card activation command, the storage device's serial number is also set to a preset serial number. When executing the set serial number activation command, the storage device's serial number is also set to the target serial number carried in the set serial number activation command. When executing the retain serial number activation command, the storage device's serial number remains unchanged.
[0173] In some implementations, when the failure type of the storage device is a data check error and a card enable command is received, a firmware update operation is performed according to the card enable command.
[0174] In some implementations, the target version of firmware is a firmware pre-stored in the information viewing system.
[0175] In some implementations, the target version of firmware may be a firmware in a firmware library.
[0176] Optionally, a target version of firmware compatible with the storage device is determined based on the storage device model and firmware library in the device information. The target version of firmware may be the latest version of firmware compatible with the storage device. The firmware library pre-stores the version identifiers, release dates, and code files of all firmware compatible with each storage device model.
[0177] Optionally, the firmware library may be pre-stored in the information viewing system.
[0178] Optionally, the firmware library can be stored in a server and updated in real time, and the firmware library in the server can be read online in the information viewing system.
[0179] Step S730: When the failure type of the storage device is a hardware error, a failure repair suggestion of backing up the storage data and replacing the storage device is generated.
[0180] By generating the fault repair suggestion in the above manner, the user can be guided to repair the fault of the storage device so that the storage device can continue to be used normally.
[0181] In summary, the method for viewing storage device information provided by the embodiments of the present application has the following advantages:
[0182] 1. When a connection with a storage device is detected and an information viewing command is received in the operation interface, the information of the storage device corresponding to the information viewing command is obtained and the corresponding information is displayed, so that the user can independently view the information of the storage device locally.
[0183] 2. By determining the fault detection mode according to the command for viewing fault information, the user can independently select the required fault detection mode, thereby improving the flexibility of obtaining fault information.
[0184] 3. By identifying faulty storage units based on the electrical data of the storage units, faulty storage units that can currently store data normally but have physical defects can be identified, thereby reducing the probability of data storage errors during subsequent use of the storage device and improving the reliability of the storage device.
[0185] 4. By using the dynamic shielding mode to shield the faulty storage unit, it is possible to avoid mapping the address of the faulty storage unit to the address of a normal storage unit that has not been detected as faulty but may be about to fail, thereby avoiding the failure of the normal storage unit in a short period of time, thereby improving the reliability of the storage device.
[0186] 5. By generating fault repair suggestions, users can be guided to repair storage device faults so that the storage device can continue to be used normally.
[0187] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of the information viewing device of the storage device provided in the embodiment of the present application. Figure 4 As shown, the information viewing apparatus 300 of the storage device includes an execution module 310 .
[0188] In some embodiments, the execution module 310 is used to set the system startup sequence to prioritize starting from the information viewing storage device; start from the information viewing storage device at startup and enter the initial interface of the information viewing system; in the information viewing system, in response to receiving an unlock command and obtaining an unlock password, unlock the information viewing operation permission; in response to receiving an execution command, execute the target executable file in the information viewing system according to the execution command to enter the operation interface; when a connection with the storage device is detected and an information viewing command is received in the operation interface, obtain information of the storage device corresponding to the information viewing command, and display the corresponding information, which includes at least one of device information, self-monitoring information and operation information; when a fault detection command is received, determine the fault type of the storage device based on the information of the storage device, the fault type including temporary software conflict, hardware error and data verification error; generate fault repair suggestions based on the fault type of the storage device.
[0189] See also Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown, the electronic device 400 includes: one or more processors 410 and a memory 420, Figure 5 A processor 410 is taken as an example.
[0190] In some embodiments, the processor 410 and the memory 420 may be connected via a bus or other means. Figure 5 The bus connection is taken as an example.
[0191] In some embodiments, the processor 410 is used to set the system startup sequence to prioritize startup from the information viewing storage device; startup from the information viewing storage device at startup to enter the initial interface of the information viewing system; in the information viewing system, in response to receiving an unlock command and obtaining an unlock password, unlock the information viewing operation permission; in response to receiving an execution command, execute the target executable file in the information viewing system according to the execution command to enter the operation interface; when a connection with the storage device is detected and an information viewing command is received in the operation interface, obtain information of the storage device corresponding to the information viewing command, and display the corresponding information, the information including at least one of device information, self-monitoring information and operation information; when a fault detection command is received, determine the fault type of the storage device based on the information of the storage device, the fault types including temporary software conflicts, hardware errors and data verification errors; generate fault repair suggestions based on the fault type of the storage device.
[0192] In some embodiments, memory 420, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules of the storage device information viewing method in the embodiments of the present application. Processor 410 executes the non-volatile software programs, instructions, and modules stored in memory 420 to execute various functional applications and data processing of electronic device 400, thereby implementing the storage device information viewing method in the above-mentioned method embodiment.
[0193] In some embodiments, the memory 420 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device 400, etc. In addition, the memory 420 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 420 may optionally include a memory remotely located relative to the processor 410, and these remote memories may be connected to the controller via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0194] In some embodiments, one or more modules are stored in the memory 420, and when executed by one or more processors 410, the information viewing method of the storage device in any of the above method embodiments is executed, for example, the information viewing method described above is executed. Figure 1 Method steps S100 to S700.
[0195] Please refer to Figure 6 , Figure 6The computer-readable storage medium 500 stores program code 510, which can be called by a processor to execute the information viewing method of the storage device described in the above method embodiment.
[0196] The computer-readable storage medium 500 can be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium includes a non-volatile computer-readable medium. The computer-readable storage medium 500 has storage space for program code that executes any method steps in the information viewing method of the storage device described above. These program codes can be read from or written to one or more computer program products. The program code can be compressed, for example, in an appropriate form.
[0197] In some embodiments, the computer-readable storage medium 500 may be a removable computer-readable storage medium. For example, the computer-readable storage medium 500 may be a USB flash drive or a mobile hard disk.
[0198] In some implementations, the embodiments of the present application further provide a computer program product, including a computer program, which implements the above-mentioned information viewing method of the storage device when executed by a processor.
[0199] In summary, the present application provides a method for viewing information on a storage device, an electronic device, and a storage medium. The method comprises: setting a system startup sequence to prioritize booting from an information viewing storage device; booting from the information viewing storage device at startup to enter an initial interface of an information viewing system; in the information viewing system, in response to receiving an unlock command and obtaining an unlock password, unlocking information viewing operation permissions; in response to receiving an execute command, executing a target executable file in the information viewing system according to the execute command to enter an operation interface; when a connection with a storage device is detected and an information viewing command is received in the operation interface, obtaining information about the storage device corresponding to the information viewing command and displaying the corresponding information, the information including at least one of device information, self-monitoring information, and operation information; when a fault detection command is received, determining a fault type of the storage device based on the information of the storage device, the fault type including a temporary software conflict, a hardware error, and a data check error; and generating a fault repair suggestion based on the fault type of the storage device. The present application enables a user to independently view information on a storage device locally by obtaining information about the storage device corresponding to the information viewing command and displaying the corresponding information when a connection with a storage device is detected and an information viewing command is received in the operation interface.
[0200] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for viewing information of a storage device, characterized in that: include: Set the system boot sequence to start from the information viewing storage device first; When starting up, the system starts up from the information viewing storage device and enters the initial interface of the information viewing system; In the information viewing system, in response to receiving an unlock command and obtaining an unlock password, unlocking the information viewing operation permission; In response to receiving the execution command, executing the target executable file in the information viewing system according to the execution command to enter the operation interface; When a connection with a storage device is detected and an information viewing command is received in the operation interface, information of the storage device corresponding to the information viewing command is obtained and the corresponding information is displayed, the information including at least one of device information, self-monitoring information, and operation information; When a fault detection command is received, determining a fault type of the storage device based on information about the storage device, the fault type including a temporary software conflict, a hardware error, and a data check error; Generate a fault repair suggestion based on the fault type of the storage device.
2. The method for viewing information of a storage device according to claim 1, wherein: The device information includes fault information, the command for viewing device information includes a command for viewing fault information, and when a connection with a storage device is detected and an information viewing command is received in the operation interface, information of the storage device corresponding to the information viewing command is obtained and the corresponding information is displayed, including: When a connection with a storage device is detected and a command to view fault information is received in the operation interface, a fault detection mode is determined according to the command to view fault information, the fault detection mode including a quick detection mode and a comprehensive detection mode; When the fault detection mode is the fast detection mode, determining the detection range to be all storage units in the storage device that have stored data; When the fault detection mode is the comprehensive detection mode, determining the detection range to be all storage units in the storage device; Performing fault detection on the storage units within the detection range to obtain the fault information; The status and location of all storage units are displayed in a graphical interface representing all storage units according to the fault information.
3. The method for viewing information of a storage device according to claim 2, wherein: The performing fault detection on the storage units within the detection range to obtain the fault information includes: Acquiring electrical data of each storage unit within the detection range, and identifying a faulty storage unit based on the electrical data of each storage unit and a numerical range of the electrical data of a preset normal storage unit; Writing test data into each of the storage units in sequence according to a preset algorithm, and then reading the stored data in each of the storage units to perform fault detection to identify the faulty storage unit; The addresses and quantities of all the faulty storage units are recorded to obtain the fault information.
4. The method for viewing information of a storage device according to claim 2 or 3, wherein: The method further comprises: Determining a shielding mode corresponding to the storage device based on preset correspondence information between device information and shielding modes and the device information, wherein the shielding mode includes a redundant shielding mode and a dynamic shielding mode; The address of each faulty storage unit is mapped to the address of a normal storage unit using a masking mode corresponding to the storage device.
5. The method for viewing information of a storage device according to claim 1, wherein: The operation information includes an operation log, the information viewing command includes an operation log viewing command, and when a connection with a storage device is detected and an information viewing command is received in the operation interface, information of the storage device corresponding to the information viewing command is obtained and the corresponding information is displayed, including: When a connection with a storage device is detected and an operation log viewing command is received in the operation interface, a viewing time period and a target log to be viewed are determined according to the operation log viewing command, where the target log includes at least one of an access log, an error log, and an operation log; Obtaining a target log recorded by the storage device during the viewing time period; A statistical graph of the usage of the storage device during the viewing time period is generated and displayed based on the target log.
6. The method for viewing information of a storage device according to claim 1, wherein: The information viewing command includes a device information viewing command. When a connection with a storage device is detected and the information viewing command is received in the operation interface, information of the storage device corresponding to the information viewing command is obtained and the corresponding information is displayed, including: When a connection with a storage device is detected and a device information viewing command is received in the operation interface, the device information is obtained according to the device information viewing command; An information list is generated and displayed based on the device information, where the device information includes at least one of a model, serial number, manufacturer information, firmware version identification, manufacturing date, storage capacity, and storage unit type of the storage device.
7. The method for viewing information of a storage device according to claim 1, wherein: When receiving the fault detection command, determining the fault type of the storage device based on the information of the storage device includes: When a fault detection command is received, determining whether the fault type is a temporary software conflict or a hardware error based on the operation log in the operation information and the operating temperature in the self-monitoring information; identifying a logical fault storage unit and a real fault storage unit in the storage device based on the fault information in the device information and the self-monitoring information; When the number of the logically faulty storage units is greater than a first preset number, the fault type is determined to be a data check error.
8. The method for viewing information of a storage device according to claim 1, wherein: Generating a fault repair suggestion based on the fault type of the storage device includes: When the fault type of the storage device is a temporary software conflict, generating a fault repair suggestion of restarting the storage device to immediately clear the fault of the storage device; When the fault type of the storage device is a data check error, generating a fault repair suggestion of performing a firmware self-check and update; When the failure type of the storage device is a hardware error, a failure repair suggestion of backing up the storage data and replacing the storage device is generated.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the information viewing method of the storage device according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores executable code for updating firmware, and the executable code is executed by a processor to implement the information viewing method of the storage device according to any one of claims 1 to 8.
Citation Information
Patent Citations
NVME SSD fault positioning method and device, equipment and medium
CN110688268A
Method and device for quickly collecting SSD information during system downtime
CN111309560A
SSD fault diagnosis and data recovery method and system
CN113886128A
Hard disk fault repairing method and device, computer equipment and storage medium
CN118550765A
Method, device and equipment for installing multi-hard-disk redundant storage management system
CN118796216A