Firmware update method, electronic device, and storage medium
By obtaining device information from the firmware update file system and receiving the card activation command, the storage data and fault information of the storage device are cleared, and the firmware of the BGA SSD is automatically updated, solving the problem that users cannot update themselves and realizing a simplified firmware update process.
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-07-28
AI Technical Summary
The current firmware update method for BGA SSDs requires users to send them back to the manufacturer for repair, which relies on professional personnel. This makes it impossible for users to complete the firmware update themselves, and the process is cumbersome.
By obtaining device information from the firmware update file system and receiving the card activation command, all storage data and fault information of the storage device are cleared, faulty storage units are blocked, and the firmware is automatically updated to the target version.
It enables users to complete firmware updates locally, reducing the difficulty of updates, simplifying the process, and reducing reliance on professionals.
Smart Images

Figure CN120428991B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of chip technology, and more specifically to a firmware update method, 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] BGA (Ball Grid Array) SSDs are solid-state drives that use ball grid array packaging technology. The flash memory and controller of a BGA SSD are usually packaged together, making repairs more expensive if a fault occurs. Currently, firmware updates for BGA SSDs generally involve returning them to the factory for repair. Specifically, users need to send the BGA SSD back to the manufacturer, where technicians use specialized debugging tools to connect to the controller chip and manually back up the original firmware, erase historical data, mark faulty storage cells, and load the new firmware. Sometimes, specific hardware interfaces or jumper settings are required to put the BGA SSD into debug mode.
[0004] However, the process of returning a BGA SSD to the factory for repair requires the user to send the BGA SSD back to the original manufacturer and is highly dependent on professional personnel, making it impossible for the user to complete the firmware update independently. The entire firmware update process is very troublesome. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this application provides a firmware update method, an electronic device, and a storage medium. By obtaining the device information of the storage device in the firmware update file system and receiving an activation command, all storage data and fault information in the storage device are cleared, faulty storage units of the storage device are masked, and the firmware of the storage device is updated to the target version. The firmware update operation can be automatically executed upon receiving an activation command, reducing the difficulty of firmware updates and enabling users to update the firmware 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 firmware update method, including: obtaining parameter configuration information of a firmware update program and a storage device;
[0008] In the firmware update program, a firmware update file system is generated based on the parameter configuration information;
[0009] Enter the firmware update file system;
[0010] When the device information of the storage device is obtained in the firmware update file system and the card activation command is received, all storage data and fault information in the storage device are cleared, the faulty storage unit of the storage device is blocked, and the firmware of the storage device is updated to the target version of the firmware.
[0011] In some implementations, accessing the firmware update file system includes:
[0012] Enter the initial interface of the firmware update file system;
[0013] Upon receiving the unlock command and obtaining the unlock password, the firmware update operation permission is unlocked;
[0014] In response to receiving a file execution command, the system executes the target executable file in the firmware update file system according to the file execution command and enters the operation interface.
[0015] In some embodiments, the method further includes:
[0016] The user interface displays the command identifiers of all executable commands and operation instructions for each executable command.
[0017] In some embodiments, the firmware update file system is stored on an external firmware update device, and the method further includes the following steps before accessing the firmware update file system:
[0018] Set the system boot order to prioritize booting from the firmware update device;
[0019] The process of entering the firmware update file system includes:
[0020] Upon startup, the device boots from the firmware update device and enters the firmware update file system stored on the firmware update device.
[0021] In some implementations, when device information of the storage device is obtained from the firmware update file system and an activation command is received, clearing all storage data and fault information in the storage device, disabling faulty storage units of the storage device, and updating the firmware of the storage device to the target version includes:
[0022] When the device information of the storage device is obtained in the firmware update file system and an activation command is received, all storage data in the storage device is cleared.
[0023] Identify all faulty storage units in the storage device;
[0024] The address of each faulty storage unit is mapped to the address of a normal storage unit to mask the faulty storage units of the storage device.
[0025] Update the firmware of the storage device to the target version of firmware;
[0026] Clear the fault information.
[0027] In some implementations, mapping the address of each faulty storage unit to the address of a normal storage unit to mask the faulty storage units of the storage device includes:
[0028] The corresponding shielding mode of the storage device is determined based on the preset correspondence between device information and shielding mode, as well as the device information.
[0029] 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.
[0030] In some implementations, when device information of the storage device is obtained from the firmware update file system and an activation command is received, clearing all storage data and fault information in the storage device, disabling faulty storage units of the storage device, and updating the firmware of the storage device to the target version includes:
[0031] When the device information of the storage device is obtained in the firmware update file system and the received card activation command is a brand new card activation command, all storage data and fault information in the storage device are cleared, the faulty storage unit of the storage device is blocked, the firmware of the storage device is updated to the target version of the firmware, and the serial number of the storage device is set to the preset serial number.
[0032] When the card activation command is a set serial number activation command, all storage data and fault information in the storage device are cleared, the faulty storage unit of the storage device is blocked, the firmware of the storage device is updated to the target version of the firmware, and the serial number of the storage device is set to the target serial number carried by the set serial number activation command.
[0033] When the card activation command is a serial number retention activation command, all storage data and fault information in the storage device are cleared, faulty storage units of the storage device are masked, the firmware of the storage device is updated to the target version of the firmware, and the serial number of the storage device remains unchanged.
[0034] In some implementations, the parameter configuration information includes at least one of the following parameters: storage space allocation information, security verification information, and storage mode of the storage device.
[0035] Secondly, embodiments of this application provide an electronic device, the electronic device comprising:
[0036] At least one processor; and,
[0037] A memory communicatively connected to the at least one processor; wherein,
[0038] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the firmware update method as described in the first aspect.
[0039] Thirdly, embodiments of this application provide a computer-readable storage medium storing an executable program, which is executed by a processor to implement the firmware update method as described in the first aspect.
[0040] This application provides a firmware update method, an electronic device, and a storage medium. When the device information of the storage device is obtained in the firmware update file system and an activation command is received, all storage data and fault information in the storage device are cleared, faulty storage units of the storage device are masked, and the firmware of the storage device is updated to the target version. The firmware update operation can be automatically executed as soon as the activation command is received, which reduces the difficulty of firmware update and allows users to update the firmware locally. Attached Figure Description
[0041] Figure 1 This is a flowchart illustrating the firmware update method provided in this application embodiment.
[0042] Figure 2 yes Figure 1 A detailed flowchart of step S300.
[0043] Figure 3 yes Figure 1 A detailed flowchart of step S400.
[0044] Figure 4 This is a schematic diagram of the firmware update device provided in the embodiments of this application.
[0045] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0046] Figure 6 This is a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation
[0047] 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.
[0048] 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.
[0049] This application provides a firmware update method, electronic device, and storage medium. By obtaining device information of the storage device in the firmware update file system and receiving an activation command, it clears all storage data and fault information in the storage device, masks faulty storage units, and updates the storage device's firmware to the target version. The firmware update operation can be automatically executed upon receiving the activation command, reducing the difficulty of firmware updates and allowing users to update firmware locally. Furthermore, it facilitates the clearing of fault information and the masking of faulty storage units, ensuring the storage device can function normally.
[0050] 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.
[0051] The firmware update method provided in this application will be described in detail below with reference to the accompanying drawings.
[0052] Please see Figure 1 , Figure 1 This is a flowchart illustrating the firmware update method provided in an embodiment of this application. Figure 1 As shown, the firmware update method includes steps S100 to S400.
[0053] Step S100: Obtain the parameter configuration information of the firmware update program and storage device.
[0054] In some implementations, when a firmware update operation needs to be performed on the target system, and the current operating system of the electronic device is not the target system, the firmware update program includes a target version of the system kernel and a firmware update toolkit. The target version of the system kernel is used to access the target system. The firmware update toolkit includes multiple files for performing firmware update operations on the target system.
[0055] Optionally, the firmware update toolkit is a folder.
[0056] In some implementations, when a firmware update operation needs to be performed on the target system and the current operating system of the electronic device is the target system, the firmware update program only includes the firmware update toolkit.
[0057] Optionally, the target system can be a Linux system. Linux is an open-source operating system with high customizability and cross-platform compatibility. Therefore, firmware update toolkits developed based on Linux can adapt to various hardware platforms, thereby enabling the firmware update method of this application to be applied to storage devices on various hardware platforms.
[0058] Alternatively, the current operating system of the electronic device may be Windows.
[0059] Optionally, the firmware update toolkit includes an activation tool and the target version of firmware. The activation tool is used to generate an executable file based on parameter configuration information for burning the target version of firmware into the storage device.
[0060] Optionally, the firmware update toolkit may also include other files for performing firmware update operations.
[0061] Optionally, the Linux system kernel is the Kylin system kernel.
[0062] In some implementations, the parameter configuration information includes at least one of the following parameters: storage space allocation information, security verification information, and storage mode.
[0063] Optionally, the storage space allocation information is used to divide the storage space in the storage device. For example, the storage space allocation information is used to divide the storage space in the storage device into multiple sub-storage spaces and to set the size of each sub-storage space.
[0064] Optionally, the storage space allocation information may also include the name of each sub-storage space.
[0065] Optionally, a sub-storage space is a cache space within the storage device. The cache space can be an SLC cache space.
[0066] Optionally, the security verification information is used to determine whether to perform a security verification on the storage device before performing a firmware update operation and which verification method to use.
[0067] Optionally, the verification methods include TCG (Trusted Computing Group) security verification and deep verification. Deep verification includes verifying the firmware and serial number.
[0068] Optionally, storage modes include balanced write mode and concentrated write mode. Balanced write mode writes data evenly to each storage cell or storage area of the storage device to avoid premature wear or performance degradation caused by overwriting of certain specific areas.
[0069] Centralized write mode involves writing data centrally to a specific storage area on the storage device. When a storage device uses centralized write mode, frequently accessed data can be stored in a specific storage area, allowing for quick data location and retrieval.
[0070] In some implementations, the parameter configuration information also includes test procedure information. Basic test information includes whether to perform bad block recovery and / or power management tests on the storage device before executing the card opening command.
[0071] In some implementations, the parameter configuration information also includes timeout settings, which include a preset time threshold. The timeout settings are used to determine card activation failure and automatically terminate the execution of the card activation command if the execution time exceeds the preset time threshold.
[0072] In some implementations, the parameter configuration information also includes serial number management information for the storage device.
[0073] Optionally, the serial number management information includes a start serial number, an end serial number, and a serial number mask rule. The serial number management information is used to determine the target serial number for each storage device when opening cards in batches.
[0074] In some implementations, users can set parameter configuration information according to their usage requirements for the storage device.
[0075] Step S200: In the firmware update program, a firmware update file system is generated based on the parameter configuration information.
[0076] In some implementations, after entering the target system based on the target version of the system kernel, all parameters in the parameter configuration information are input into the card activation tool program, generating multiple executable files for burning the target version of firmware into the storage device. All executable files are then stored in the target folder within the firmware update program, thus generating a firmware update file system. The firmware update file system includes all files used to perform firmware update operations.
[0077] Optionally, the target folder is located within the firmware update toolkit. After storing all executable files in the target folder within the firmware update toolkit, all files in the firmware update toolkit constitute the firmware update file system.
[0078] Optionally, the firmware update file system may include multiple subfolders, and each subfolder may include multiple files or folders.
[0079] Optionally, the generated executable files are also used to perform security verification on the storage device based on parameter configuration information when performing the card opening operation, and to configure the parameters of the storage device.
[0080] In some implementations, after inputting all parameters from the parameter configuration information into the card activation tool program, the card activation operation is performed within the card activation tool program to perform card activation testing on a test storage device of the same model as the storage device. Upon receiving a successful card activation message from the test storage device, a file generation operation is performed within the card activation tool program to generate multiple executable files for burning the target version of firmware into the storage device. This method ensures that the generated executable files can be used to perform the correct firmware burning operation.
[0081] Step S300: Enter the firmware update file system.
[0082] In some implementations, the firmware update file system is stored on an external firmware update device.
[0083] Optionally, firmware update devices include USB flash drives and external hard drives. When the electronic device includes a USB interface, a USB flash drive can be used as an external firmware update device. When the electronic device includes other types of interfaces, a firmware update device with an interface compatible with the electronic device can be used.
[0084] In some implementations, the method further includes setting the system boot order to prioritize booting from the firmware update device before entering the firmware update file system.
[0085] In some implementations, step S300 includes: booting from the firmware update device at startup and entering the firmware update file system stored on the firmware update device.
[0086] In some implementations, the firmware update file system is stored within the firmware update device inside the electronic device. For example, the firmware update file system is stored on the system hard drive inside the electronic device. In this case, the system can boot from the system hard drive inside the electronic device according to the default system boot order and enter the firmware update file system.
[0087] Please see Figure 2 ,like Figure 2 As shown, in some embodiments, step S300 includes steps S310 to S330.
[0088] Step S310: Enter the initial interface of the firmware update file system.
[0089] In some implementations, the firmware update file system is a folder containing multiple files; opening this folder leads to the initial interface of the firmware update file system.
[0090] Step S320: In response to receiving the unlock command and obtaining the unlock password, unlock the firmware update operation permission.
[0091] 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 obtained and it is verified whether the password is a preset unlock password. If the password is verified to be a preset unlock password, firmware update operation permissions are unlocked.
[0092] For example, the command identifier for the unlock command is "sudo su".
[0093] Optionally, if the password is a preset unlock password, root access is unlocked. Root access is the highest level of access, meaning the user has complete control over the system. After unlocking root access, firmware update permissions are also unlocked.
[0094] Step S330: In response to receiving a file execution command, execute the target executable file in the firmware update file system according to the file execution command, and enter the operation interface.
[0095] In some implementations, the target executable file is executed based on the file identifier of the target executable file carried by the file execution command, and the operation interface is entered.
[0096] For example, the file identifier carried by the file execution command is . / NVMe Tool ARCH64, and the file name of the target executable file is NVMe ToolARCH64.
[0097] In some implementations, the user interface displays command identifiers for all executable commands and instructions for each executable command.
[0098] In some implementations, all executable commands include card activation commands and commands from additional functions.
[0099] 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.
[0100] In some implementations, the commands in the additional functions include commands to view device information, to view SMART (Self-Monitoring, Analysis and Reporting Technology) information, to update firmware version, to view storage device operating 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 information about the storage device. The storage device operating information includes storage space utilization, I / O operation latency, etc. The index data block data is used to determine the data management method used by the storage device. The command to retrieve relevant information about the storage device is used to execute the commands to view SMART information, view storage device operating information, retrieve index data blocks, dump debug information, and dump WPRO data all at once.
[0101] In some implementations, when executing a firmware version update command, the firmware of the storage device is updated to the target firmware version, while the stored data in the storage device is retained.
[0102] Step S400: When the device information of the storage device is obtained in the firmware update file system and the card opening command is received, clear all storage data and fault information in the storage device, block the faulty storage unit of the storage device, and update the firmware of the storage device to the target version of the firmware.
[0103] In some implementations, the firmware update operation includes an activation operation and a firmware version update operation. When an activation command is received, the activation operation is performed on the storage device according to the activation command. When a firmware version update command is received, the firmware version update operation is performed on the storage device according to the firmware version update command.
[0104] Optionally, the card activation operation includes clearing all storage data and fault information from the storage device, masking faulty storage units of the storage device, updating the firmware of the storage device to the target firmware version, and other steps determined according to the card activation command. The firmware update operation includes updating the firmware of the storage device to the target firmware version while retaining the storage data in the storage device.
[0105] In some implementations, when the device information of the storage device is obtained in the firmware update file system and the received card activation command is a brand new card activation command, all storage data and fault information in the storage device are cleared, the faulty storage unit of the storage device is blocked, the firmware of the storage device is updated to the target version of the firmware, and the serial number of the storage device is set to the preset serial number.
[0106] In some implementations, all stored data is read and backed up to another storage device before erasing all stored data and fault information from the storage device.
[0107] In some implementations, when the card activation command is a set serial number activation command, all storage data and fault information in the storage device are cleared, faulty storage units of the storage device are masked, the firmware of the storage device is updated to the target version of the firmware, and the serial number of the storage device is set to the target serial number carried by the set serial number activation command.
[0108] In some implementations, when the card activation command is a serial number retention activation command, all storage data and fault information in the storage device are cleared, faulty storage units of the storage device are masked, the firmware of the storage device is updated to the target version of the firmware, and the serial number of the storage device remains unchanged.
[0109] In some implementations, when a command line including a command prefix and a command identifier is received, the command type is identified based on the command identifier.
[0110] For example, the command prefix is . / NVMe Tool ARCH64-1ist, the command identifier corresponding to the new card activation command is initial, and the command line corresponding to the new card activation command is . / NVMe Tool ARCH64-1istinitial.
[0111] For example, the command identifier corresponding to the serial number activation command is set to initial--sn= <newserialnumber>New SerialNumber represents the target serial number. For example, the command line corresponding to the serial number activation command is . / NVMe ToolARCH64-1istinitial--sn=AXD12240001, where AXD12240001 is the target serial number.
[0112] In some implementations, the serial number activation command may not carry a serial number. When the serial number activation command is received, a target serial number is generated based on the current time, geographical coordinates, and storage device model using a serial number generation algorithm corresponding to the storage device model, and then stored in the blockchain. In this way, the target serial number can serve as maintenance evidence, and like the original serial number, it can be verified by the manufacturer, facilitating subsequent maintenance of the storage device.
[0113] In some implementations, when opening cards for storage devices in batches, a target serial number for each storage device is generated based on the serial number management information in the parameter configuration information, and a card opening command with the set serial number is executed for each storage device based on the target serial number of each storage device.
[0114] For example, the command identifier corresponding to the serial number activation command is initializekeepsn, and the command line corresponding to the serial number activation command is . / NVMe ToolARCH64-1istinitialkeepsn.
[0115] In some implementations, when no command is received, the device information of the storage device is obtained from the firmware update file system, and when the device information is obtained, the initial device information is displayed in the operation interface.
[0116] 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.
[0117] When device information for the storage device is obtained, it means that the electronic device can recognize the connection to the storage device, and the storage device does not have any physical damage that would affect its normal operation. In this case, a firmware update can be performed to allow the storage device to continue operating normally. The ability to obtain device information for the storage device can be referred to as disk recognition.
[0118] For example, the command identifier corresponding to the command for viewing SMART information is smart, and the command line corresponding to the command for viewing SMART information is . / NVMe ToolARCH64-1ist smart.
[0119] In some implementations, when a command to view SMART information is executed, fault information in the SMART information is identified, and it is determined whether the storage device has entered a write-protected state based on the fault information. If the storage device has entered a write-protected state, the write-protected state of the storage device is released through a card unlocking operation, so that data can be written to the storage device.
[0120] In some implementations, the fault information is a fault code. When the fault code is 0x00, it indicates that the storage device is in normal working condition. When the fault code is 0x08, it indicates that the storage device has entered write-protected state.
[0121] In some implementations, when the fault information indicates that the storage device has entered a write-protected state, an automatic card unlocking operation is then executed to release the write-protected state of the storage device. Optionally, this card unlocking operation can be the card unlocking operation corresponding to a brand new card unlocking command.
[0122] In some implementations, when the storage device is determined to be in normal working condition based on the fault information, and the current firmware version is determined not to be the target version based on the current firmware version identifier in the device information, a firmware version update operation is automatically performed to update the storage device firmware to the target firmware version and retain all stored data.
[0123] Optionally, the latest firmware version compatible with the storage device can be determined based on the storage device model and firmware library in the device information. This firmware version is also known as the target version. The firmware library pre-stores version identifiers and release dates of all firmware versions compatible with each type of storage device.
[0124] Optionally, the firmware library can be pre-stored in the firmware update file system.
[0125] Alternatively, the firmware library can be stored on a server and updated in real time.
[0126] In some implementations, when executing the card opening command, the operation interface displays explanatory information for each sub-step of the card opening operation and information on whether the execution was successful.
[0127] For example, the sub-steps of the card opening operation include calculating the information block buffer size, generating the information block buffer, saving the information block, resetting the CPU, memory allocation check, and running mode check.
[0128] Optionally, after successfully executing the card activation command, a message indicating successful card activation can be displayed on the operation interface.
[0129] In some implementations, after successfully executing the card activation command, the device information of the storage device is retrieved again, and when the device information is retrieved, the device information after successful card activation is displayed on the operation interface.
[0130] Optionally, the firmware version identifier and serial number after successful activation can be displayed in the operation interface for users to check.
[0131] Please see Figure 3 , Figure 3 yes Figure 1 A detailed flowchart of step S400. (See attached diagram.) Figure 3 As shown, in some embodiments, step S400 includes steps S410 to S450.
[0132] Step S410: When the device information of the storage device is obtained in the firmware update file system and the card activation command is received, clear all storage data in the storage device.
[0133] Step S420: Identify all faulty storage units in the storage device.
[0134] When a memory cell is faulty, the data stored in it after writing data to it may not be the same as the written data. The electrical data (e.g., voltage or current) of the faulty memory cell may also not be the normal voltage or current; for example, the voltage or current may be too high or too low. Therefore, faulty memory cells can be identified by writing and reading data into the cell and detecting its voltage or current.
[0135] In some implementations, step S420 includes steps S421 to S425.
[0136] Step S421: 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.
[0137] 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.
[0138] 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.
[0139] 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.
[0140] 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.
[0141] For example, taking a storage device including a Flash memory chip and a storage segment including four storage cells as an example, step S421 includes steps (421.1) to (421.10). A storage segment is the smallest storage unit in the Flash memory chip for performing an erase operation.
[0142] In some implementations, the first stage of testing includes steps (421.1) to (421.3), the second stage of testing includes steps (421.4) to (421.6), and the third stage of testing includes steps (421.7) to (421.10).
[0143] Optionally, the first phase of testing detects whether the storage unit has a fixed fault. The second phase detects whether the storage unit has DRDF (Dummy Read DisturbFault) faults and state coupling faults. The third phase detects whether the storage unit has transition faults. Through testing the entire preset algorithm, other types of faults in the storage unit can also be detected.
[0144] (421.1) Erase all memory segments so that the stored data in all memory segments is "0000".
[0145] (421.2) Write the test data "1111" to all memory segments.
[0146] In some implementations, test data "1111" is written to each storage segment, that is, "1" is written to all four storage cells in the storage segment.
[0147] (421.3) Read the stored data of each storage segment in descending order of address, and then write test data into the storage segment.
[0148] In some implementations, in step (421.3), when the stored data in the read storage segment is not "1111" written in step (421.2), all storage cells corresponding to bits different from "1111" in the stored data are identified as faulty storage cells. When a storage cell has a fixed fault, the data stored in the storage cell cannot be changed. In this way, it is possible to detect whether a storage cell has a fixed fault.
[0149] In some implementations, the storage cells in the storage device are arranged in a rectangular array, and a storage segment consists of four storage cells per row. The row number of the storage segment can be determined based on the address of any storage cell within the segment. Storage segments with even-numbered rows are those with even-numbered row numbers. Storage segments with odd-numbered rows are those with odd-numbered row numbers.
[0150] In some implementations, the storage segment for even-numbered rows is determined based on the address of the storage unit. The stored data of each storage segment is read in descending order of address, and then the test data "0101" is written to the storage segment.
[0151] In some implementations, the storage segment for odd-numbered rows is determined based on the address of the storage unit. The stored data of each storage segment is read in descending order of address, and then the test data "1010" is written to the storage segment.
[0152] (421.4) Read the stored data of each storage segment twice in ascending order of address for all even-numbered rows, and then write the test data "1010" into the storage segment.
[0153] In some implementations, in step (421.4), when the stored data in the read storage segment is not "0101" written in step (421.3), all storage cells corresponding to bits in the stored data that are different from "0101" are identified as faulty storage cells.
[0154] Because a DRDF (Depth-Difference Function Defect) will prevent a storage unit from saving data after the first read, by reading and comparing the test data twice consecutively, it is possible to detect whether the stored data in the storage unit has changed, thereby determining whether the storage unit has a DRDF.
[0155] (421.5) Read the stored data of each storage segment twice in ascending order of address for all odd-numbered rows, and then write the test data "0101" into the storage segment.
[0156] In some implementations, in step (421.5), when the stored data in the read storage segment is not "1010" written in step (421.3), all storage cells corresponding to bits in the stored data that are different from "1010" are identified as faulty storage cells.
[0157] When a state coupling fault occurs, an operation on one row of storage cells may affect the data in another row. Therefore, the sensitivity sequence corresponding to a state coupling fault includes the requirement to operate on different rows. By operating on storage segments divided into odd-numbered and even-numbered rows as described above, state coupling faults can be detected.
[0158] (421.6) Erase all memory segments to make the stored data in all memory segments "0000", and then read the stored data in all memory segments.
[0159] In some implementations, in step (421.6), when the stored data of the read storage segment is not "0000", the storage cells corresponding to all bits in the stored data that are different from "0000" are identified as faulty storage cells. The stored data in the storage cells with over-erasure faults will remain as 1. Over-erasure faults can be detected by programming each storage cell to 0 and then reading out 0.
[0160] Optionally, in step (421.6), all memory segments can be operated on in ascending or descending order of address.
[0161] (421.7) Erase all memory segments to make the stored data of all memory segments "0000", then write test data "1010" to all memory segments with even rows in ascending order of address, and write test data "0101" to all memory segments with odd rows in ascending order of address.
[0162] (421.8) Read the stored data twice consecutively for all even-numbered rows in descending order of address, and then write the test data "0101" to each stored segment.
[0163] (421.9) Read the stored data twice consecutively for all odd-numbered rows in descending order of address, and then write the test data "1010" to each stored segment.
[0164] (421.10) Erase all memory segments to make the stored data in all memory segments "0000", and then read the stored data in all memory segments.
[0165] Optionally, in step (421.10), all memory segments can be operated on in ascending or descending order of address.
[0166] The third phase of testing includes steps (421.7) to (421.10). A jump fault refers to a situation where the stored data in a memory cell cannot jump from 0 to 1, or from 1 to 0. Through the third phase of testing, each memory cell undergoes a write 0, read 0, write 1, and read 1 process, thereby detecting jump faults. Additionally, it can more effectively detect fixed faults. Furthermore, by operating on memory segments in ascending or descending order of address in the preset algorithm, it can also detect address-related faults. Address-related faults refer to faults where the memory address decoder incorrectly executes operations on the wrong memory cell.
[0167] In some implementations, even if the stored data in a storage unit is not faulty, the storage unit may still have some physical defects. If it continues to be used, the stored data is likely to become faulty. Such storage units can also be identified as faulty storage units, thereby reducing the probability of data errors during subsequent use of the storage device and improving the reliability of the storage device.
[0168] Step S422: Obtain the electrical data of each storage cell, and identify the faulty storage cell based on the numerical range of the electrical data of each storage cell and the electrical data of normal storage cells.
[0169] In some implementations, electrical data include parameters such as voltage and current.
[0170] 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.
[0171] 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.
[0172] 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.
[0173] 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.
[0174] 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.
[0175] 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.
[0176] Step S423: Determine the union of the faulty memory cells identified in steps S421 and S422 as the set of all faulty memory cells.
[0177] Step S430: Map the address of each faulty storage cell to the address of a normal storage cell to mask the faulty storage cell of the storage device.
[0178] Optionally, when the storage device is a solid-state drive including a Flash memory chip, the storage unit is a block in the Flash memory chip, the faulty storage unit is a bad block in the Flash memory chip, and the normal storage unit is a normal block in the Flash memory chip.
[0179] In some implementations, an address mapping table is stored in the storage device, and the address of each faulty storage unit is mapped to the address of a normal storage unit by modifying the address mapping table.
[0180] In some implementations, when access to the storage device is required, the address mapping table is used to determine whether the address to be accessed is the address of a faulty storage unit. If so, the address is converted to the address of the corresponding normal storage unit according to the address mapping table, and then the normal storage unit is accessed, thereby shielding the faulty storage unit of the storage device.
[0181] 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.
[0182] In some implementations, step S430 includes steps S431 to S432.
[0183] Step S431: 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.
[0184] In some implementations, in the correspondence information, one model or manufacturer information corresponds to one shielding mode.
[0185] In some implementations, the shielding mode corresponding to the storage device is determined based on the model or manufacturer information in the device information and the corresponding relationship information.
[0186] Step S432: 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.
[0187] In some implementations, the shielding modes include redundant shielding modes and dynamic shielding modes.
[0188] 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.
[0189] 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.
[0190] Because many factors affect the lifespan of storage units, even if a normal storage unit passes the tests in steps S421 and S422, it may still fail after a period of time. When the shielding mode is dynamic shielding mode, failure prediction can be performed on normal storage units.
[0191] 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.
[0192] In some implementations, the preset scoring rule is that the score of a normal storage cell is equal to a first weight multiplied by the number of erase / write cycles of the normal storage cell, plus a 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 obtained from a preset storage location of the storage device. The data error rate can be the ECC (Error Correcting Code) error rate obtained during the storage device's self-test.
[0193] A higher write / erase cycle count or data error rate for a normal storage cell indicates a greater likelihood of failure. Therefore, normal storage cells with scores above the upper limit of a preset score range are likely to fail, while those with scores within the preset range have a lower probability of failure in the short term.
[0194] 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.
[0195] Alternatively, the scoring model can be a multilayer perceptron model, a convolutional neural network model, or a recurrent neural network and its variants.
[0196] 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.
[0197] Step S440: Update the firmware of the storage device to the target firmware version.
[0198] In some implementations, when it is determined, based on the security verification information in the parameter configuration information, that a security verification of the storage device needs to be performed before executing the card opening command, the corresponding verification method is used to perform the security verification according to the security verification information.
[0199] In some implementations, the storage device includes a security chip storing key information. When performing security verification using the TCG security verification method based on the security verification information, a decryption key is obtained based on the storage device's model or manufacturer information. This decryption key is then used to decrypt the key information in the security chip. If decryption is successful, the security verification is considered passed; otherwise, it is considered failed. If the security verification fails, the card opening command is not executed to perform a firmware update operation on the storage device. This method ensures that firmware updates are only performed on storage devices manufactured by reputable manufacturers, avoiding the potential damage to rebranded storage devices that might be damaged during firmware updates.
[0200] In some implementations, when performing security verification using deep verification based on security verification information, before executing the firmware update operation, the serial number and model of the storage device are read first, and then a network query is conducted to check whether a storage device with that model and serial number has been manufactured. If a storage device with that model and serial number has been found, the target version of firmware is written to the storage device according to the card activation command. After the target version of firmware is written to the storage device, data integrity verification is performed on the target version of firmware, and the security verification is completed when the verification passes.
[0201] Furthermore, the system reads the storage device's capacity information. When a storage device with that model and serial number has been manufactured, it checks whether the storage device's capacity information is correct. If the storage device's capacity information is correct, the system writes the target version of firmware to the storage device according to the activation command; otherwise, it determines that the security verification has failed and does not execute the activation command.
[0202] In some implementations, before writing the target firmware version to the storage device according to the activation command, it is further determined whether the target firmware version is compatible with the storage device based on the storage device model. Specifically, based on the storage device model, the firmware library is searched for all firmware versions compatible with that storage device, and it is determined whether the target version is one of all firmware versions compatible with that storage device. The firmware library pre-stores the version identifiers and release dates of all firmware compatible with each type of storage device. When the target firmware version is determined to be compatible with the storage device, it is written to the storage device according to the activation command; otherwise, the security verification is deemed to have failed, and the activation command is not executed.
[0203] Optionally, when the activation command is not executed, the reason for not executing the activation command is displayed on the operation interface. For example, the reason information may be that the target firmware version is not compatible with the storage device or that the target firmware version failed the data integrity verification.
[0204] In some implementations, performing data integrity verification on the target version of firmware includes: calculating a verification value for a preset data segment of the target version of firmware; and determining that the target version of firmware passes the data integrity verification when the verification value is the same as the standard verification value.
[0205] Optionally, the preset data segment can be a data segment of preset size starting from a preset position in the target firmware version. For example, the preset data segment could be the first 50MB of data in the target firmware version. In this way, data errors can be detected without verifying the complete data.
[0206] Optionally, the preset data segment can be all the data of the target version of the firmware.
[0207] In some implementations, before executing the card opening command, the storage device is also subjected to bad block recovery and / or power management tests based on the test process information in the parameter configuration information.
[0208] In some implementations, the firmware is divided into basic modules and functional modules. Different versions of firmware have the same basic modules but different functional modules.
[0209] In some implementations, only functional modules of the firmware are updated during the update process. In this way, it is not necessary to update the entire firmware, thus reducing update time.
[0210] In some implementations, the current firmware of the storage device is retained, a new firmware storage space is allocated within the storage device, and the target version of the firmware is stored in the new firmware storage space. Then, a security verification is performed on the target version of the firmware. If the security verification passes, the current firmware of the storage device is deleted, and the storage device is configured to boot from the new firmware storage space. The security verification of the target version of the firmware can be performed using the data integrity verification method described above. This approach prevents the storage device from malfunctioning if the write operation to the target version of the firmware is interrupted or fails.
[0211] In some implementations, when the current firmware cannot be updated to the target version all at once and requires a version-by-version update, the firmware is automatically updated version by version until the storage device's firmware is updated to the target version. This method simplifies the user's operation.
[0212] In some implementations, during firmware update operations, the temperature of the storage device is acquired, and the firmware update operation is performed at a corresponding write speed based on the temperature range of the storage device. This method helps prevent the storage device from overheating.
[0213] In some implementations, while performing firmware updates, the storage space in the storage device is divided into a target number of sub-storage spaces based on the storage space allocation information in the parameter configuration information, and the size of each sub-storage space is set to the target size.
[0214] In some implementations, the storage mode of the storage device is set according to the storage mode in the parameter configuration information while the firmware update operation is being performed.
[0215] Step S450: Clear fault information.
[0216] After clearing the fault information of the storage device, it can be considered that the storage device has been restored to its factory state.
[0217] In some implementations, when the card activation command is a new card activation command or a serial number activation command, the serial number of the storage device is also set to the serial number determined according to the card activation command.
[0218] In summary, the firmware update method provided in this application has the following advantages:
[0219] 1. By obtaining the storage device information from the firmware update file system and receiving an activation command, the system clears all storage data and fault information from the storage device, masks faulty storage units, and updates the storage device's firmware to the target version. This automatic firmware update operation, requiring only an activation command, reduces the difficulty of firmware updates and allows users to update firmware locally. Furthermore, it facilitates the clearing of fault information and the masking of faulty storage units, ensuring the storage device functions correctly.
[0220] 2. By generating a target serial number and storing it in the blockchain, the target serial number can serve as evidence for repair. At the same time, the target serial number, like the original serial number, can be verified by the manufacturer, which facilitates subsequent repairs of the storage device.
[0221] 3. 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.
[0222] 4. 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.
[0223] Please see Figure 4 , Figure 4 This is a schematic diagram of the firmware update device provided in an embodiment of this application. Figure 4 As shown, the firmware update device 300 includes an acquisition module 310 and an execution module 320.
[0224] In some implementations, the acquisition module 310 is used to acquire parameter configuration information of the firmware update program and the storage device.
[0225] In some implementations, the execution module 320 is used to generate a firmware update file system based on parameter configuration information in the firmware update program; enter the firmware update file system; when the device information of the storage device is obtained in the firmware update file system and the card opening command is received, clear all storage data and fault information in the storage device, shield the faulty storage unit of the storage device, and update the firmware of the storage device to the target version of the firmware.
[0226] 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.
[0227] 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.
[0228] In some implementations, the processor 410 is used to obtain the firmware update program and the parameter configuration information of the storage device; in the firmware update program, a firmware update file system is generated based on the parameter configuration information; the firmware update file system is entered; when the device information of the storage device is obtained in the firmware update file system and an activation command is received, all storage data and fault information in the storage device are cleared, faulty storage units of the storage device are masked, and the firmware of the storage device is updated to the target version of the firmware.
[0229] 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 of the firmware update method 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 firmware update method of the above-described method embodiments.
[0230] 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.
[0231] In some implementations, one or more modules are stored in memory 420 and, when executed by one or more processors 410, perform the firmware update method in any of the above method embodiments, for example, performing the method described above. Figure 1 Method steps S100 to S400.
[0232] 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 firmware update method described in the above method embodiments.
[0233] The computer-readable storage medium 500 may be an electronic storage device such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM.
[0234] Alternatively, the computer-readable storage medium 500 may be a USB flash drive.
[0235] 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 firmware update method described above. 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.
[0236] In some embodiments, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the firmware update method described above.
[0237] In summary, this application provides a firmware update method, an electronic device, and a storage medium. The firmware update method includes: obtaining parameter configuration information of a firmware update program and a storage device; generating a firmware update file system based on the parameter configuration information in the firmware update program; entering the firmware update file system; and when the device information of the storage device is obtained in the firmware update file system and an activation command is received, clearing all storage data and fault information in the storage device, disabling faulty storage units of the storage device, and updating the firmware of the storage device to the target version. This application, by automatically executing the firmware update operation upon receiving an activation command after obtaining the device information of the storage device in the firmware update file system and receiving an activation command, reduces the difficulty of firmware updates and allows users to update firmware locally. Furthermore, it facilitates clearing fault information and disabling faulty storage units of the storage device to ensure its normal operation.
[0238] 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.< / newserialnumber>
Claims
1. A firmware update method, characterized in that, include: Obtain parameter configuration information for firmware update programs and storage devices; In the firmware update program, a firmware update file system is generated based on the parameter configuration information; Enter the firmware update file system; When the device information of the storage device is obtained in the firmware update file system and the card activation command is received, all storage data and fault information in the storage device are cleared, the faulty storage unit of the storage device is blocked, and the firmware of the storage device is updated to the target version of the firmware. When the device information of the storage device is obtained from the firmware update file system and an activation command is received, the process of clearing all storage data and fault information in the storage device, disabling faulty storage units of the storage device, and updating the firmware of the storage device to the target version includes: When the device information of the storage device is obtained in the firmware update file system and an activation command is received, all storage data in the storage device is cleared. Identify all faulty storage units in the storage device; The process of identifying all faulty storage units in the storage device includes: Test data is written to each storage unit sequentially according to a preset algorithm, and then the stored data in each storage unit is read to perform fault detection in order to identify the faulty storage unit. Acquire electrical data for each of the storage cells, and identify the faulty storage cells based on the numerical range of the electrical data of each storage cell and the electrical data of normal storage cells; The union of the identified faulty memory cells is determined as the set of all faulty memory cells; The corresponding shielding mode of the storage device is determined based on the preset correspondence between device information and shielding mode, as well as the device information. The address of each faulty storage unit is mapped to the address of a normal storage unit using the corresponding masking mode of the storage device; wherein, the masking mode includes a redundant masking mode and a dynamic masking mode, and when the masking mode is the redundant masking mode, a sequential mapping method is used to map the address of each faulty storage unit to the address of a normal storage unit. When the shielding mode is 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 in the preset score range. Update the firmware of the storage device to the target version of firmware; Clear the fault information.
2. The firmware update method according to claim 1, characterized in that, The process of entering the firmware update file system includes: Enter the initial interface of the firmware update file system; Upon receiving the unlock command and obtaining the unlock password, the firmware update operation permission is unlocked; In response to receiving a file execution command, the system executes the target executable file in the firmware update file system according to the file execution command and enters the operation interface.
3. The firmware update method according to claim 2, characterized in that, The method further includes: The user interface displays the command identifiers of all executable commands and operation instructions for each executable command.
4. The firmware update method according to claim 1, characterized in that, The firmware update file system is stored on an external firmware update device. Before accessing the firmware update file system, the method further includes: Set the system boot order to prioritize booting from the firmware update device; The process of entering the firmware update file system includes: Upon startup, the device boots from the firmware update device and enters the firmware update file system stored on the firmware update device.
5. The firmware update method according to claim 1, characterized in that, When the device information of the storage device is obtained from the firmware update file system and an activation command is received, the process of clearing all storage data and fault information in the storage device, disabling faulty storage units of the storage device, and updating the firmware of the storage device to the target version includes: When the device information of the storage device is obtained in the firmware update file system and the received card activation command is a brand new card activation command, all storage data and fault information in the storage device are cleared, the faulty storage unit of the storage device is blocked, the firmware of the storage device is updated to the target version of the firmware, and the serial number of the storage device is set to the preset serial number. When the card activation command is a set serial number activation command, all storage data and fault information in the storage device are cleared, the faulty storage unit of the storage device is blocked, the firmware of the storage device is updated to the target version of the firmware, and the serial number of the storage device is set to the target serial number carried by the set serial number activation command. When the card activation command is a serial number retention activation command, all storage data and fault information in the storage device are cleared, faulty storage units of the storage device are masked, the firmware of the storage device is updated to the target version of the firmware, and the serial number of the storage device remains unchanged.
6. The firmware update method according to claim 1, characterized in that, The parameter configuration information includes at least one of the following parameters: storage space allocation information, security verification information, and storage mode of the storage device.
7. The firmware update method according to claim 1, characterized in that, The preset scoring rule involves reading the number of erase / write cycles, electrical data, data error rate, operating temperature curve, and read / write speed of normal storage cells in the storage device and inputting them into a pre-trained scoring model to obtain a score for the normal storage cell.
8. The firmware update method according to claim 1, characterized in that, The step of acquiring the electrical data of each of the memory cells and identifying the faulty memory cells based on the numerical range of the electrical data of each memory cell and the electrical data of normal memory cells includes: Acquire the electrical data of each of the storage cells; Read the voltage change data and current change data of the storage unit over a period of time, determine the voltage change curve of the storage unit based on the voltage change data, and determine the current change curve of the storage unit based on the current change data; According to preset identification rules, abnormal changes in the voltage and current change curves of the storage unit are identified. When an abnormal change occurs, the storage unit is identified as the faulty storage unit.
9. 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 to enable the at least one processor to perform the firmware update method as described in 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, which is executed by a processor to implement the firmware update method as described in any one of claims 1 to 8.