Information viewing method of storage device, electronic device, and storage medium
By receiving information viewing commands in the user interface, the system obtains and displays storage device information, solving the problem that users cannot independently view BGA SSD information. This enables autonomous fault detection and repair, improving the reliability of storage devices and the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AXD (ANXINDA) MEMORY TECH CO LTD
- Filing Date
- 2025-04-27
- Publication Date
- 2026-05-08
AI Technical Summary
In existing technologies, users cannot independently view the information of BGA SSDs; they need to send them back to the manufacturer and rely on professionals to operate them, resulting in a cumbersome process.
A method for viewing information about a storage device is provided. By receiving an information viewing command in the user interface, the method obtains and displays information about the storage device, including device information, self-monitoring information, and operating information. It supports fault detection and repair suggestions, and allows users to view and handle faults locally.
Users can independently view information about storage devices, flexibly select fault detection modes, identify potentially faulty storage units, improve the reliability of storage devices, and generate fault repair suggestions, simplifying information viewing and fault handling processes.
Smart Images

Figure CN120429153B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of chip technology, and more specifically to a method for viewing information on a storage device, an electronic device, and a storage medium. Background Technology
[0002] With the rapid development of storage device technology, solid-state drives (SSDs) have become widely used. When SSDs experience read / write errors, storage unit failures, or compatibility issues, it is often necessary to update the SSD's firmware to enable it to continue functioning normally.
[0003] A BGA (Ball Grid Array) SSD is a type of solid-state drive that uses ball grid array packaging technology. The flash memory and controller of a BGA SSD are typically packaged together. Sometimes, users need to view BGA SSD information to understand its configuration or device usage status.
[0004] However, currently, the way to view information about a BGA SSD is for the user to send the BGA SSD back to the manufacturer, and this relies heavily on professional personnel, making it impossible for users to view the information independently, and the whole process is very troublesome. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this application provides a method, electronic device, and storage medium for viewing information on a storage device. By detecting a connection to the storage device and receiving an information viewing command in the operation interface, the method retrieves and displays the information of the storage device corresponding to the information viewing command, enabling users to independently view the information of the storage device locally.
[0006] To address the above problems, the present invention provides the following technical solution:
[0007] In a first aspect, embodiments of this application provide a method for viewing information on a storage device, comprising: setting the system startup order to prioritize startup from the information viewing storage device;
[0008] Upon startup, the system boots from the information viewing storage device and enters the initial interface of the information viewing system.
[0009] In the information viewing system, upon receiving an unlock command and obtaining an unlock password, the user is granted access to view information.
[0010] Upon receiving an execution command, the system executes the information viewing of the target executable file in the system according to the execution command and enters the operation interface;
[0011] When a connection to 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 information is displayed. The information includes at least one of device information, self-monitoring information, and operation information.
[0012] When a fault detection command is received, the fault type of the storage device is determined based on the information of the storage device. The fault type includes temporary software conflict, hardware error and data verification error.
[0013] Based on the fault type of the storage device, generate fault repair suggestions.
[0014] In some implementations, the device information includes fault information, the information viewing command includes a command to view fault information, and when a connection to the 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 information is displayed, including:
[0015] When a connection to 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 includes a fast detection mode and a comprehensive detection mode.
[0016] When the fault detection mode is the fast detection mode, the detection range is determined to be all storage units in the storage device that have stored data.
[0017] When the fault detection mode is the full detection mode, the detection scope is determined to be all storage units in the storage device;
[0018] Fault detection is performed on the storage units within the detection range to obtain the fault information;
[0019] Based on the fault information, the status and location of all storage cells are displayed in the graphical interface representing all storage cells.
[0020] In some implementations, the step of performing fault detection on the storage cells within the detection range to obtain the fault information includes:
[0021] Acquire the electrical data of each storage cell within the detection range, and identify the faulty storage cell based on the numerical range of the electrical data of each storage cell and the electrical data of a preset normal storage cell.
[0022] Test data is written to each storage unit in sequence according to a preset algorithm, and then the stored data in each storage unit is read to perform fault detection in order to identify faulty storage units.
[0023] Record the addresses and quantities of all the faulty storage units to obtain the fault information.
[0024] In some embodiments, the method further includes:
[0025] The corresponding shielding mode for the storage device is determined based on the preset correspondence between device information and shielding mode, and the device information. 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 the masking mode corresponding to the storage device.
[0027] In some implementations, the operating information includes operating logs, and the information viewing command includes an operating log viewing command. When a connection to the storage device is detected and an information viewing command is received in the operation interface, obtaining the information of the storage device corresponding to the information viewing command and displaying the information includes:
[0028] When a connection to a storage device is detected and a command to view the operation log is received in the operation interface, the viewing time period and the target log to be viewed are determined according to the command. The target log includes at least one of access logs, error logs, and operation logs.
[0029] Obtain the target logs recorded by the storage device during the viewing time period;
[0030] A statistical chart of the storage device's usage during the viewing period is generated and displayed based on the target log.
[0031] In some implementations, the information viewing command includes a device information viewing command. When a connection to the storage device is detected and an information viewing command is received in the operation interface, obtaining the information of the storage device corresponding to the information viewing command and displaying the information includes:
[0032] When a connection to 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, which includes at least one of the following: model number, serial number, manufacturer information, firmware version identifier, manufacturing date, storage capacity, and storage unit type of the storage device.
[0034] In some implementations, determining the fault type of the storage device based on information about the storage device when a fault detection command is received includes:
[0035] When a fault detection command is received, the fault type is determined to be 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] Based on the fault information in the device information and the self-monitoring information, logical fault storage units and real fault storage units in the storage device are identified.
[0037] When the number of logical fault storage units is greater than the first preset number, the fault type is determined to be a data verification error.
[0038] In some implementations, generating fault repair suggestions based on the fault type of the storage device includes:
[0039] When the failure 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 failure of the storage device;
[0040] When the fault type of the storage device is a data verification error, a fault repair suggestion is generated to perform firmware self-test and update.
[0041] When the failure type of the storage device is a hardware error, generate backup storage data and recommend fault repair for replacing the storage device.
[0042] Secondly, embodiments of this application provide an electronic device, the 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 to enable the at least one processor to perform the information viewing method of the storage device as described in the first aspect.
[0046] Thirdly, embodiments of this application provide a computer-readable storage medium, characterized in that the computer-readable storage medium stores executable code for updating firmware, the executable code being executed by a processor to implement the information viewing method of the storage device as described in the first aspect.
[0047] This application provides a method for viewing information on a storage device, an electronic device, and a storage medium. By detecting a connection to the storage device and receiving an information viewing command in the operation interface, the method obtains and displays the information of the storage device corresponding to the information viewing command, enabling users to view the information of the storage device locally. Attached Figure Description
[0048] Figure 1 This is a flowchart illustrating the method for viewing information on a storage device provided in an embodiment of this application.
[0049] Figure 2 yes Figure 1 A detailed flowchart of step S600.
[0050] Figure 3 yes Figure 1 A detailed flowchart of step S700.
[0051] Figure 4 This is a schematic diagram of the structure of the information viewing device for the storage device provided in the embodiments of this application.
[0052] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0053] Figure 6 This is a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation
[0054] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[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 indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "multiple" means two or more, unless otherwise explicitly specified.
[0056] This application provides a method for viewing information on a storage device, an electronic device, and a storage medium. By detecting a connection to the storage device and receiving an information viewing command in the operation interface, the method obtains and displays the information of the storage device corresponding to the information viewing command, enabling users to view the information of the storage device locally.
[0057] The storage device involved in this application can be a hard disk drive (HDD), an SSD, an optical disc storage device, or a memory card, etc. The SSD can be a BGA SSD. A BGA SSD can include Flash memory chips, which can include NOR Flash and NAND Flash, etc. The following example uses a BGA SSD as the storage device, 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, memory card, or external hard drive, or other storage devices.
[0059] The method for viewing information about the storage device provided in this application will be described in detail below with reference to the accompanying drawings.
[0060] Please see Figure 1 , Figure 1 This is a flowchart illustrating the method for viewing information on a storage device provided in an embodiment of this application. For example... Figure 1 As shown, the method for viewing information on the storage device includes steps S100 to S700.
[0061] Step S100: Set the system boot order to prioritize booting from the information viewing storage device.
[0062] In some implementations, the information viewing storage device is an external storage device to the electronic device. For example, the information viewing storage device could be a USB flash drive.
[0063] In some implementations, before step S100, the method further includes step S101: acquiring the information viewing system and storing the information viewing system in an information viewing storage device.
[0064] Step S200: Start from the information viewing storage device at startup and enter the initial interface of the information viewing system.
[0065] In some implementations, the information viewing system is a folder containing multiple files. It boots from the information viewing storage device upon startup, and in response to received operation instructions, opens the folder according to the instructions to enter the initial interface of the information viewing system.
[0066] In some implementations, the system boots from the information viewing storage device and automatically opens the folder upon startup, entering the initial interface of the information viewing system.
[0067] In some implementations, the information viewing system is stored on a storage device within the electronic device. For example, the information viewing system is stored on the system hard drive within the electronic device. In this case, the system can be booted from the system hard drive within the electronic device according to the default system boot order to enter the information viewing system.
[0068] Step S300: In the information viewing system, in response to receiving the unlock command and obtaining the unlock password, the information viewing operation permission is unlocked.
[0069] Optionally, the command identifier and unlock password for the unlock command are preset. When the command identifier for the unlock command is received, the password is retrieved and it is verified whether the password is a preset unlock password. If the password is found to be a preset unlock password, the user is granted access to unlock information viewing permissions.
[0070] For example, the command identifier for the unlock command is "sudo su".
[0071] Optionally, if the password is a preset unlock password, root privileges are unlocked. Root privileges are the highest level of privileges, meaning the user has complete control over the system. After unlocking root privileges, the permission to view information is also unlocked.
[0072] Step S400: In response to receiving the execution command, view the target executable file in the system according to the execution information of the execution command, and enter the operation interface.
[0073] In some implementations, the target executable file is executed based on the file identifier of the target executable file carried by the execution command, and the operation interface is entered.
[0074] For example, 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, the user interface displays command identifiers for all executable commands and instructions for each executable command.
[0076] In some implementations, all executable commands include card activation commands and commands from additional functions.
[0077] In some implementations, the activation command includes a brand new activation command, a serial number activation command, and a serial number retention activation command. When the activation command is executed, all storage data and fault information in the storage device are cleared, faulty storage units in the storage device are masked, and the firmware of the storage device is updated to the target firmware version.
[0078] In some implementations, the commands in the additional functions include information viewing commands. These commands include commands to view device information, to view Self-Monitoring, Analysis and Reporting Technology (SMART) information, to view storage device operational information, to retrieve index data blocks, to dump WPRO (Write-Protect Register or other related) data, to dump debug information, to dump all data, and to retrieve relevant storage device information. Additional functions also include firmware version update commands. The storage device operational information includes storage space utilization and I / O operation latency. The index data block data is used to determine the data management method used by the storage device. The command to retrieve relevant storage device information is used to execute the commands to view SMART information, view storage device operational information, retrieve index data blocks, dump debug information, and dump WPRO data all at once.
[0079] Step S500: When a connection to the 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 displayed.
[0080] The information includes at least one of equipment information, self-monitoring information, and operational information.
[0081] In some implementations, the device information includes information such as the manufacturer information, model, serial number, and current firmware version identifier of the storage device.
[0082] In some implementations, the user interface displays information about the storage device corresponding to the information viewing command.
[0083] In some implementations, the device information includes fault information, and the information viewing command includes a command to view the fault information. In this case, step S500 includes steps S510 to S550.
[0084] Step S510: When a connection to the storage device is detected and a command to view fault information is received in the operation interface, the fault detection mode is determined according to the command to view fault information.
[0085] The fault detection modes include rapid detection mode and comprehensive detection mode.
[0086] Step S520: When the fault detection mode is fast detection mode, the detection range is determined to be all storage units in the storage device that have stored data.
[0087] Step S530: When the fault detection mode is full detection mode, the detection scope is determined to be all storage cells in the storage device.
[0088] Step S540: Perform fault detection on the storage units within the detection range to obtain fault information.
[0089] The above methods enable users to choose the fault detection mode they need, improving the flexibility of obtaining fault information.
[0090] In some implementations, step S540 includes steps S541 to S543.
[0091] Step S541: Obtain the electrical data of each storage cell within the detection range, and identify the faulty storage cell based on the numerical range of the electrical data of each storage cell and the electrical data of the preset normal storage cell.
[0092] In some implementations, electrical data include parameters such as voltage and current.
[0093] In some implementations, a memory cell is identified as a faulty memory cell when its voltage is not within the range of normal memory cell voltages.
[0094] In some implementations, a memory cell is identified as a faulty memory cell when the current of the memory cell is not within the range of the current of a normal memory cell.
[0095] In some implementations, voltage and current change data of the storage cell over a period of time are read. The voltage change curve of the storage cell is determined based on the voltage change data, and the current change curve is determined based on the current change data. Then, abnormal changes in the voltage and current change curves of the storage cell are identified according to preset identification rules. When an abnormal change occurs, the storage cell is identified as a faulty storage cell.
[0096] For example, when it is detected that the rate of change of current 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 has occurred.
[0097] For example, when it is detected that the voltage value in the voltage change curve is greater than a preset change range when a write operation or read operation is performed on the storage cell, an abnormal change is determined to have occurred.
[0098] By identifying faulty storage units based on their electrical data, we can identify those that are currently able to store data but have physical defects. This reduces the probability of data storage errors during subsequent use and improves the reliability of the storage device.
[0099] Step S542: Write the test data into each storage unit sequentially according to the preset algorithm, and then read the stored data in each storage unit to perform fault detection in order 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 scenarios.
[0101] In some implementations, the preset algorithm includes multiple stages of testing. In each stage of testing, fault detection is performed on the stored data in the storage unit based on the test data corresponding to that test step, so as to identify faulty storage units.
[0102] Optionally, there are various types of storage cell failures, and a stage of testing can be used to detect one, multiple, or a class of storage cell failures.
[0103] In some implementations, different faults correspond to different sensitization sequences, which are input sequences used to detect specific faults. Data operations, including writing and reading test data, can be performed on the storage unit through multiple stages of testing. The sensitization sequence is then input into the storage unit to make the faults in the storage unit manifest.
[0104] Step S543: Record the address and number of all faulty storage units to obtain fault information.
[0105] Step S550: Based on the fault information, display the status and location of all memory cells in the graphical interface representing all memory cells.
[0106] In some implementations, a graphical representation of a storage unit is used in the graphical interface, and the status of the storage unit is indicated by the color of the graphic or text labels. For example, a normal storage unit is represented by a green graphic, and a faulty storage unit is represented by a red graphic.
[0107] Optionally, the graphic of the faulty storage unit can be made to move back and forth within a preset range of motion in the graphical interface to highlight the faulty storage unit.
[0108] In some implementations, multiple shielding modes can be used to shield faulty storage units of the storage device based on the device information. Different models of storage devices often have different usage requirements, sometimes necessitating more intelligent shielding modes to prevent the address of a faulty storage unit from being mapped to the address of a normal storage unit that has not yet been detected as faulty but may be about to fail, thereby improving the reliability of the storage device.
[0109] In some implementations, the method further includes steps S800 to S900.
[0110] Step S800: Determine the corresponding shielding mode for the storage device based on the preset correspondence between device information and shielding mode, as well as the device information.
[0111] The shielding modes include redundant shielding mode and dynamic shielding mode.
[0112] Step S900: Map the address of each faulty storage unit to the address of a normal storage unit using the masking mode corresponding to the storage device.
[0113] In some implementations, the storage device has a pre-defined 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 failed storage unit to the address of a normal storage unit. Specifically, starting from the beginning address of the spare storage space, the address of a failed 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 implementations, 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 a failed storage unit to the address of a normal storage unit in the spare storage space, and the address mapping table can be modified accordingly.
[0115] In some implementations, when the shielding mode is dynamic shielding mode, the 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 implementations, information such as the number of erase / write cycles, electrical data, data error rate, operating temperature profile, and read / write speed of normal storage cells are read from the storage device, and this information is input into a pre-trained scoring model to obtain a score for the normal storage cell.
[0117] Alternatively, the scoring model can be a multilayer perceptron model, a convolutional neural network model, or a recurrent neural network and its variants.
[0118] By using a dynamic masking mode to shield faulty storage units, it is possible to avoid mapping the address of a faulty storage unit to the address of a normal storage unit that has not been detected as faulty but may be about to fail. This can prevent the normal storage unit from failing in a short period of time, thereby improving the reliability of the storage device.
[0119] In some implementations, the runtime information includes the runtime log, and the information viewing command includes the runtime log viewing command. In this case, step S500 includes steps S560 to S580.
[0120] Step S560: When a connection to the storage device is detected and a command to view the running log is received in the operation interface, the viewing time period and the target log to be viewed are determined according to the command.
[0121] The target log includes at least one of the following: access log, error log, and operation log.
[0122] In some implementations, access logs are used to record the operation time and data volume of data read and write operations on the storage device. Error logs are used to record error events that occur during the operation of the storage device, which may include hardware failures, protocol errors, and data verification errors. Operation logs are used to record operations performed on the storage device, such as firmware updates, formatting, and power-off restarts, and their operation times.
[0123] Step S570: Obtain the target logs recorded by the storage device during the viewing time period.
[0124] Step S580: Generate and display a statistical chart of storage device usage during the viewing period based on the target log.
[0125] Optionally, the statistical chart includes the frequency, operation time, data volume, and cumulative operation time of each operation within the viewing period, generated based on the target log.
[0126] Optionally, the statistical chart can be a line chart, histogram, or pie chart, etc.
[0127] Optionally, the statistical chart can be a static statistical chart or a dynamic statistical chart.
[0128] In some implementations, usage recommendations are also generated and displayed based on storage device usage during the viewing period.
[0129] Optionally, when the calculated total amount of data written to other storage devices exceeds a first preset data amount, a suggestion to use additional storage devices is generated and displayed. This is because the current storage devices may not be able to meet the storage requirements at this point.
[0130] Optionally, when the cumulative operation time exceeds the preset time, check whether the stored data contains redundant files, generate and display a list of redundant files, and provide usage suggestions for performing data deduplication or data compression operations.
[0131] Optionally, when the number of error events exceeds a preset number, a usage suggestion to replace the storage device is generated and displayed.
[0132] In some implementations, outlier data points are automatically highlighted in red or flashed in the statistical chart, and this is used in conjunction with suggestions to guide the user in handling the issue. Outlier data points refer to data points that indicate a sudden increase in data volume or frequency.
[0133] In some implementations, the information viewing command includes a device information viewing command. In this case, step S500 includes steps S590 to S591.
[0134] Step S590: When a connection to the 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.
[0135] Step S591: Generate and display an information list based on the device information.
[0136] The device information includes at least one of the following: storage device model, serial number, manufacturer information, firmware version identifier, manufacturing date, storage capacity, and storage unit type.
[0137] 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.
[0138] The fault types include temporary software conflicts, hardware errors, and data verification errors.
[0139] Temporary software conflicts refer to situations where storage devices malfunction due to incompatibility, resource contention, or logical errors between the operating system, firmware, and applications. For example, temporary software conflicts may occur when the operating system, while performing multitasking, causes temporary malfunctions such as response delays and read / write errors due to improper resource allocation. Temporary software conflicts typically do not cause permanent damage to the storage device hardware and can usually be resolved by restarting the device.
[0140] A hardware error refers to a malfunction in the physical hardware of a storage device, causing it to malfunction and become unusable. Hardware errors can be caused by factors such as aging flash memory chips, damaged controller chips, short circuits on the circuit board, or loose interfaces. When a storage device experiences a hardware error, it is often already unusable.
[0141] A data verification error refers to a situation where, during data writing, reading, or transmission, the storage device's verification mechanism detects that the data integrity has been compromised. This situation may be caused by file system errors or firmware problems, and it can generally be repaired.
[0142] Please see Figure 2 , Figure 2 yes Figure 1 A detailed flowchart of step S600. (See attached diagram.) Figure 2 As shown, in some embodiments, step S600 includes steps S610 to S630.
[0143] Step S610: When a fault detection command is received, determine 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.
[0144] In some implementations, step S610 includes steps S611 to S612.
[0145] Step S611: Identify the error event codes in the runtime log, record the error events corresponding to the error event codes, and classify the error events corresponding to the error event codes according to the error type.
[0146] The error types include software-related errors and hardware-related errors.
[0147] In some implementations, correlation analysis is performed on all error events based on their timing. If an error event may be a software-related error or a hardware-related error, it is detected whether a hardware-related error exists within a first preset time period including the occurrence time of the error event. If a hardware-related error exists within the first preset time period including the occurrence time of the error event, the error event is classified as a hardware-related error; otherwise, it is classified as a software-related error.
[0148] 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 frequency of occurrence of the hardware-related error or the operating temperature when the hardware-related error occurs.
[0149] In some implementations, when the frequency of hardware-related errors is greater than the first preset frequency within a second preset time period, the fault type is determined to be a hardware error.
[0150] Optionally, the second preset time period can be the viewing time period or a user-defined time period.
[0151] In some implementations, when the operating temperature is greater than a preset temperature when a second preset number of hardware-related errors occur, the fault type is determined to be a hardware error.
[0152] In some implementations, when the error event does not include hardware-related errors, or the frequency of hardware-related errors occurring within a second preset time period is not greater than a 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.
[0153] Step S620: Identify logically faulty storage units and physically faulty storage units in the storage device based on the fault information and self-monitoring information in the device information.
[0154] Logically faulty storage units refer to those storage units that cannot be read or written normally at the logical level, but the physical hardware itself is not faulty. This situation may be caused by file system errors, data verification errors, or firmware problems. For example, in the case of firmware problems, some storage units may be marked as faulty storage units, but these storage units themselves are not faulty.
[0155] A true failure memory cell refers to a memory cell that is physically damaged. True failure memory cells are caused by manufacturing defects or wear and tear due to prolonged use.
[0156] In some implementations, when the storage device is a BGA SSD, a faulty storage cell refers to a block in the storage device, and a block is the smallest unit of erase operation in the storage device.
[0157] After an erase operation is performed on a faulty storage unit, 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 remain a faulty storage unit.
[0158] In some implementations, the addresses of all faulty storage units are determined based on fault information in the device information, and an erase operation is performed on all faulty storage units based on their addresses. Since the faulty storage units are already marked and do not store data at this time, the erase operation will not erase the data. After the erase operation is performed on all faulty storage units, the change in the faulty storage unit count in the self-monitoring information is detected. When the faulty storage unit count decreases, the difference between the original faulty storage unit count and the faulty storage unit count after the erase operation is calculated and determined as the number of logically faulty storage units.
[0159] In some implementations, 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 identified as logical faulty memory cells, and the number of logical faulty memory cells is calculated.
[0160] Step S630: When the number of logical fault storage units is greater than the first preset number, the fault type is determined to be a data verification error.
[0161] Optionally, the first preset quantity is the total number of storage units multiplied by the first preset ratio.
[0162] Optionally, the first preset quantity is a preset fixed value.
[0163] Step S700: Generate fault repair suggestions based on the fault type of the storage device.
[0164] Please see Figure 3 , Figure 3 yes Figure 1 A detailed flowchart of step S700. (See attached diagram.) Figure 3 As shown, in some embodiments, steps S700, S710 to S730 are included.
[0165] Step S710: When the failure type of the storage device is a temporary software conflict, generate a fault repair suggestion to restart the storage device to immediately clear the failure of the storage device.
[0166] Step S720: When the fault type of the storage device is a data verification error, generate a fault repair suggestion to perform firmware self-test and update.
[0167] When the storage device's fault type is a data verification error, it is generally caused by a firmware problem. In this case, 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 so that the user can repair the storage device.
[0168] In some implementations, when the storage device fails with a data verification error, a firmware self-test and update are performed automatically to automatically fix the data verification error.
[0169] As described above, in some implementations, all executable commands include card activation commands and commands in additional functions.
[0170] In some implementations, the activation command includes a brand new activation command, a serial number-set activation command, and a serial number-preserving activation command. When an activation command is executed, all storage data and fault information on the storage device are cleared, faulty storage units are masked, and the storage device's firmware is updated to the target firmware version. When a brand new activation command is executed, the storage device's serial number is also set to a preset serial number. When a serial number-set activation command is executed, the storage device's serial number is also set to the target serial number carried in the serial number-set activation command. When a serial number-preserving activation command is executed, the storage device's serial number remains unchanged.
[0171] In some implementations, when the storage device fails with a data verification error and an activation command is received, a firmware update operation is performed based on the activation command.
[0172] In some implementations, the target version of firmware is a firmware pre-stored in the information viewing system.
[0173] In some implementations, the target version of firmware may be a firmware from a firmware library.
[0174] Optionally, the target firmware version adapted to the storage device is determined based on the storage device model and firmware library in the device information. The target firmware version can be the latest version of firmware adapted to the storage device. The firmware library pre-stores version identifiers, release dates, and code files of all firmware adapted to each model of storage device.
[0175] Optionally, the firmware library can be pre-stored in the information viewing system.
[0176] Optionally, the firmware library can be stored on a server and updated in real time, and the firmware library on the server can be read online by the information viewing system.
[0177] Step S730: When the failure type of the storage device is a hardware error, generate backup storage data and replace the storage device with fault repair suggestions.
[0178] By generating troubleshooting suggestions in the above manner, users can be guided to repair storage device malfunctions so that the storage device can continue to be used normally.
[0179] In summary, the method for viewing information on a storage device provided in this application has the following advantages:
[0180] 1. By detecting a connection to a storage device and receiving an information viewing command in the operation interface, the system retrieves and displays the information of the storage device corresponding to the information viewing command, enabling users to independently view the information of the storage device locally.
[0181] 2. By determining the fault detection mode based on the command to view fault information, users can choose the required fault detection mode independently, improving the flexibility of obtaining fault information.
[0182] 3. By identifying faulty storage units based on their electrical data, it is possible to identify storage units that can currently store data normally but have physical defects, thereby reducing the probability of data storage errors during subsequent use and improving the reliability of the storage device.
[0183] 4. By using a dynamic masking mode to mask faulty storage units, it is possible to avoid mapping the address of a faulty storage unit to the address of a normal storage unit that has not been detected as faulty but may be about to fail. This can prevent the normal storage unit from failing in a short period of time, thereby improving the reliability of the storage device.
[0184] 5. By generating troubleshooting suggestions, it can guide users to repair storage device faults so that the storage device can continue to be used normally.
[0185] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of the information viewing device for the storage device provided in the embodiments of this application. For example... Figure 4 As shown, the information viewing device 300 for the storage device includes an execution module 310.
[0186] In some implementations, the execution module 310 is used to set the system startup order to prioritize booting from the information viewing storage device; upon startup, it boots 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, it unlocks the information viewing operation permission; in response to receiving an execution command, it executes the target executable file in the information viewing system according to the execution command and enters the operation interface; when a connection to the storage device is detected and an information viewing command is received in the operation interface, it obtains the information of the storage device corresponding to the information viewing command and displays the information, which includes at least one of device information, self-monitoring information, and operating information; when a fault detection command is received, it determines the fault type of the storage device based on the information of the storage device, and the fault type includes temporary software conflict, hardware error, and data verification error; and it generates fault repair suggestions based on the fault type of the storage device.
[0187] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. For example... Figure 5 As shown, the electronic device 400 includes: one or more processors 410 and a memory 420. Figure 5 Take a processor 410 as an example.
[0188] In some implementations, the processor 410 and the memory 420 may be connected via a bus or other means. Figure 5 Taking the example of a connection between China and Israel via a bus.
[0189] In some implementations, the processor 410 is configured to set the system boot order to prioritize booting from the information viewing storage device; boot from the information viewing storage device during 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 information viewing operation permissions; in response to receiving an execution command, execute the target executable file in the information viewing system according to the execution command and enter the operation interface; when a connection to the storage device is detected and an information viewing command is received in the operation interface, obtain the information of the storage device corresponding to the information viewing command and display the information, which includes at least one of device information, self-monitoring information, and operating information; when a fault detection command is received, determine the fault type of the storage device based on the information of the storage device, which includes temporary software conflicts, hardware errors, and data verification errors; and generate fault repair suggestions based on the fault type of the storage device.
[0190] In some embodiments, memory 420 serves as a non-volatile computer-readable storage medium, used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules for the information viewing method of the storage device in the embodiments of this application. Processor 410 executes various functional applications and data processing of electronic device 400 by running the non-volatile software programs, instructions, and modules stored in memory 420, thereby implementing the information viewing method of the storage device described in the above method embodiments.
[0191] In some embodiments, memory 420 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of electronic device 400, etc. Furthermore, memory 420 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 420 may optionally include memory remotely located relative to processor 410, and this remote memory may be connected to the controller via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0192] In some implementations, one or more modules are stored in memory 420. When executed by one or more processors 410, they perform the information viewing method of the storage device in any of the above method embodiments, for example, performing the above-described... Figure 1 The method steps S100 to S700.
[0193] Please refer to Figure 6 , Figure 6 This is a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable storage medium 500 stores program code 510, which can be called by a processor to execute the information viewing method for the storage device described in the above method embodiments.
[0194] The computer-readable storage medium 500 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, 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 performs any of the method steps of the information viewing method of the aforementioned storage device. This program code can be read from or written to one or more computer program products. The program code may, for example, be compressed in a suitable form.
[0195] In some implementations, the computer-readable storage medium 500 may be a removable computer-readable storage medium, such as a USB flash drive or a portable hard drive.
[0196] In some embodiments, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method for viewing information on a storage device.
[0197] In summary, this application provides a method for viewing information on a storage device, an electronic device, and a storage medium. The method for viewing information on a storage device includes: setting the system boot order to prioritize booting from the information viewing storage device; booting from the information viewing storage device during startup and entering 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 an execution command, executing the target executable file in the information viewing system according to the execution command, and entering the operation interface; when a connection to the storage device is detected and an information viewing command is received in the operation interface, obtaining and displaying the information of the storage device corresponding to the information viewing command, the information including at least one of device information, self-monitoring information, and operating information; when a fault detection command is received, determining 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; and generating fault repair suggestions based on the fault type of the storage device. This application, by obtaining and displaying the information of the storage device corresponding to the information viewing command when a connection to the storage device is detected and an information viewing command is received in the operation interface, enables users to independently view the information of the storage device locally.
[0198] 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 them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions 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 this application.
Claims
1. A method for viewing information on a storage device, characterized in that, include: Set the system boot order to prioritize booting from the information viewing storage device; Upon startup, the system boots from the information viewing storage device and enters the initial interface of the information viewing system. In the information viewing system, upon receiving an unlock command and obtaining an unlock password, the user is granted access to view information. Upon receiving an execution command, the system executes the information viewing of the target executable file in the system according to the execution command and enters the operation interface; When a connection to 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 information is displayed. The information includes at least one of device information, self-monitoring information, and operation information. When a fault detection command is received, the fault type of the storage device is determined based on the operation log in the operation information and the operating temperature in the self-monitoring information, whether it is a temporary software conflict or a hardware error. When a fault detection command is received, the process of 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 includes: Identify the error event codes in the operation log, record the error events corresponding to the error event codes, and classify the error events corresponding to the error event codes according to the error type, wherein the error type includes software-related errors and hardware-related errors; When the error event includes a hardware-related error, the fault type is determined to be either the temporary software conflict or the hardware error based on the frequency of occurrence of the hardware-related error or the operating temperature at the time of occurrence of the hardware error. Based on the fault information in the device information and the self-monitoring information, logical fault storage units and real fault storage units in the storage device are identified. When the number of logical fault storage units is greater than the first preset number, the fault type is determined to be a data verification error; Based on the preset correspondence between device information and shielding modes, and the device information, the shielding mode corresponding to the storage device is determined. The shielding mode includes a redundant shielding mode and a dynamic shielding mode. When the shielding mode is the dynamic shielding mode, the score of each normal storage unit in the storage device is calculated according to the preset scoring rules, and the address of each faulty storage unit is mapped to the address of a normal storage unit whose score is located in the preset score range. The address of each faulty storage unit is mapped to the address of a normal storage unit using the masking mode corresponding to the storage device. When the failure 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 failure of the storage device; When the fault type of the storage device is a data verification error, a fault repair suggestion is generated to perform firmware self-test and update. When the failure type of the storage device is a hardware error, generate backup storage data and recommend fault repair for replacing the storage device.
2. The method for viewing information on a storage device according to claim 1, characterized in that, The device information includes fault information, and the information viewing command includes a command to view fault information. When a connection to the 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 information is displayed, including: When a connection to 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 includes a fast detection mode and a comprehensive detection mode. When the fault detection mode is the fast detection mode, the detection range is determined to be all storage units in the storage device that have stored data. When the fault detection mode is the full detection mode, the detection scope is determined to be all storage units in the storage device; Fault detection is performed on the storage units within the detection range to obtain the fault information; Based on the fault information, the status and location of all storage cells are displayed in the graphical interface representing all storage cells.
3. The method for viewing information on a storage device according to claim 2, characterized in that, The step of performing fault detection on the storage units within the detection range to obtain the fault information includes: Acquire the electrical data of each storage cell within the detection range, and identify the faulty storage cell based on the numerical range of the electrical data of each storage cell and the electrical data of a preset normal storage cell. Test data is written to each storage unit in sequence according to a preset algorithm, and then the stored data in each storage unit is read to perform fault detection in order to identify faulty storage units. Record the addresses and quantities of all the faulty storage units to obtain the fault information.
4. The method for viewing information on a storage device according to claim 1, characterized in that, The operational information includes operational logs, and the information viewing commands include operational log viewing commands. When a connection to 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 displayed, including: When a connection to a storage device is detected and a command to view the operation log is received in the operation interface, the viewing time period and the target log to be viewed are determined according to the command. The target log includes at least one of access logs, error logs, and operation logs. Obtain the target logs recorded by the storage device during the viewing time period; A statistical chart of the storage device's usage during the viewing period is generated and displayed based on the target log.
5. The method for viewing information on a storage device according to claim 1, characterized in that, The information viewing command includes a device information viewing command. When a connection to the 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 displayed, including: When a connection to 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, which includes at least one of the following: model number, serial number, manufacturer information, firmware version identifier, manufacturing date, storage capacity, and storage unit type of the storage device.
6. An electronic device, characterized in that, The electronic device includes: 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, which, when executed by the at least one processor, enables the at least one processor to perform the information viewing method of the storage device as described in any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores executable code for updating firmware, which is executed by a processor to implement the information viewing method of the storage device as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for quickly collecting SSD information during system downtime
CN111309560A
Hard disk fault repairing method and device, computer equipment and storage medium
CN118550765A