Firmware updating method, electronic equipment, firmware updating device and firmware updating system

By obtaining the equipment information of the BGA SSD and judging that it meets the update conditions, the problem of cumbersome repair of BGA SSD is solved, and the convenience of firmware update without a communication interface is achieved.

CN120428995AActive Publication Date: 2025-08-05AXD (ANXINDA) MEMORY TECH CO LTD
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202510539991.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-08-05
Estimated Expiration
2045-04-27

AI Technical Summary

Technical Problem

The fault repair of BGA SSD is cumbersome and firmware updates cannot be performed when the motherboard has no communication interface.

Method used

Connect the firmware update device to the storage device to obtain the device information and determine whether it meets the update conditions, including power supply information, serial port information and debugging data information, to ensure that the device is not physically damaged and firmware update is performed.

Benefits of technology

It realizes that the motherboard can easily update the firmware of the BGA SSD when there is no communication interface available, and simplifies the repair process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120428995A_ABST
    Figure CN120428995A_ABST
Patent Text Reader

Abstract

The invention discloses a firmware updating method, electronic equipment, a firmware updating device and a firmware updating system. The method comprises the following steps: acquiring a firmware updating program; when the firmware updating device is connected with the storage equipment, executing a firmware updating program to enter a firmware updating file system; in the firmware updating file system, the firmware updating device is controlled to obtain device information of the storage device through the function interface; when the device information is obtained in the firmware updating file system, judging whether the storage device meets a firmware updating condition or not according to the device information; when it is judged that the storage device meets the firmware updating condition according to the device information, firmware of the storage device is updated into firmware of the target version. When the firmware updating device is connected with the storage device, the firmware updating device is controlled to obtain the device information of the storage device through the function interface, the storage device can be connected with the electronic device through the firmware updating device, and firmware updating operation can be conveniently carried out on the storage device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chip technology, and particularly to a firmware update method, an electronic device, a firmware update device and a firmware update system. Background Art

[0002] With the rapid development of storage device technology, Solid State Disks (SSDs) have been widely used. When read / write anomalies, storage cell failures or compatibility issues occur in an SSD, it is often necessary to update the firmware of the SSD so that the SSD can continue to work properly.

[0003] A BGA (Ball Grid Array) SSD is a solid state disk that uses ball grid array packaging technology. The flash memory and the main controller of a BGA SSD are usually packaged together. Once a failure occurs, the repair operation is very cumbersome. Specifically, technicians need to connect to the main control chip of the BGA SSD through a dedicated debugging tool to perform operations such as manually backing up the original firmware, clearing historical data, marking faulty storage cells, and loading new firmware.

[0004] However, BGA SSDs are usually deployed on a motherboard. When there are no communication interfaces and other normal storage devices available on the motherboard, it is generally impossible to connect an electronic device to the BGA SSD, and thus the firmware update operation cannot be performed. Summary of the Invention

[0005] Aiming at the deficiencies of the prior art, the present application provides a firmware update method, an electronic device, a firmware update device and a firmware update system. When connected to a storage device through a firmware update device, a firmware update program is executed to enter a firmware update file system, and the firmware update device is controlled to obtain device information of the storage device through a function interface, so that the storage device can be connected to the electronic device through the firmware update device, facilitating the firmware update operation of the storage device.

[0006] To solve the above problems, the present invention provides the following technical solutions:

[0007] In a first aspect, an embodiment of the present application provides a firmware update method, including: obtaining a firmware update program;

[0008] When connected to a storage device through a firmware update device, execute the firmware update program to enter a firmware update file system;

[0009] In the firmware update file system, control the firmware update device to obtain device information of the storage device through a function interface, where the device information includes at least one of power supply information, serial port information, debug data information, and general input / output information;

[0010] When the device information is obtained in the firmware update file system, it is determined whether the storage device meets the firmware update conditions according to the device information;

[0011] When it is determined according to the device information that the storage device meets the firmware update conditions, the firmware of the storage device is updated to the firmware of the target version.

[0012] In some embodiments, one of the function interfaces is used to obtain one kind of information in the device information.

[0013] In some embodiments, the method further includes:

[0014] When connecting to the storage device through the network port on the main board where the storage device is located, execute the firmware update program to enter the firmware update file system.

[0015] In some embodiments, in the firmware update file system, controlling the firmware update device to obtain the device information of the storage device through the function interface includes:

[0016] In the firmware update file system, controlling the firmware update device to obtain the power supply information of the storage device through the first function interface;

[0017] The step of when the device information is obtained in the firmware update file system and determining whether the storage device meets the firmware update conditions according to the device information includes:

[0018] When the power supply information is obtained in the firmware update file system, determine the voltage fluctuation trend and the power supply ripple frequency of the storage device according to the power supply information;

[0019] When it is determined based on the voltage fluctuation trend that the fluctuation amplitude of the power supply voltage of the storage device is greater than the preset amplitude, or the power supply voltage continuously decreases or increases within a preset time period, it is determined that the storage device does not meet the firmware update conditions;

[0020] When it is determined based on the power supply ripple frequency that the power supply ripple frequency is greater than the first preset frequency or less than the second preset frequency, it is determined that the storage device does not meet the firmware update conditions, otherwise it is determined that the storage device meets the firmware update conditions.

[0021] In some embodiments, in the firmware update file system, controlling the firmware update device to obtain the device information of the storage device through the function interface includes:

[0022] In the firmware update file system, controlling the firmware update device to obtain the serial port information of the storage device through the second function interface;

[0023] When the device information is obtained in the firmware update file system, determining whether the storage device meets the firmware update conditions according to the device information includes:

[0024] When the serial port information is obtained in the firmware update file system, identifying the error code in the serial port information;

[0025] Determining the cause of the failure of the storage device based on the error code;

[0026] When it is determined that the cause of the failure of the storage device is physical damage, determining that the storage device does not meet the firmware update conditions, otherwise determining that the storage device meets the firmware update conditions.

[0027] In some embodiments, in the firmware update file system, controlling the firmware update device to obtain the device information of the storage device through a function interface includes:

[0028] In the firmware update file system, controlling the firmware update device to obtain the general input / output information of the storage device through a third function interface, where the general input / output information includes the identifier of the general input pins of the storage device and the debugging functions supported by the general output pins;

[0029] Based on the general input / output information, controlling the firmware update device to send a debugging command to the storage device through a fourth function interface via the general input pins of the storage device;

[0030] Controlling the firmware update device to obtain debugging data information through a fifth function interface via the general output pins of the storage device;

[0031] When the device information is obtained in the firmware update file system, determining whether the storage device meets the firmware update conditions according to the device information includes:

[0032] When the debugging data information is obtained in the firmware update file system, determining whether the storage device meets the firmware update conditions according to the debugging data information.

[0033] In some embodiments, the debugging data information includes the stored data of the storage device. When the debugging data information is obtained in the firmware update file system, determining whether the storage device meets the firmware update conditions according to the debugging data information includes:

[0034] When the debugging data information is obtained in the firmware update file system, identifying the data error of the stored data in the debugging data information;

[0035] When it is recognized that the data error of the stored data includes data loss and the amount of missing data is greater than a preset data amount, it is determined that the storage device does not meet the firmware update condition; otherwise, it is determined that the storage device meets the firmware update condition.

[0036] In a second aspect, an embodiment of the present application provides an electronic device, which includes:

[0037] At least one processor; and,

[0038] A memory communicatively connected to the at least one processor; wherein,

[0039] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the firmware update method as described in the first aspect.

[0040] In a third aspect, an embodiment of the present application provides a firmware update device, which includes a functional interface. The firmware update device is used to connect to the storage device and connect to the electronic device as described in the second aspect, so that the storage device communicates with the electronic device.

[0041] In a fourth aspect, an embodiment of the present application provides a firmware update system, which includes the electronic device as described in the second aspect, the firmware update device as described in the third aspect, and a storage device.

[0042] The present application provides a firmware update method, an electronic device, a firmware update device, and a firmware update system. When the firmware update device is connected to the storage device, the present application executes a firmware update program to enter a firmware update file system and controls the firmware update device to obtain device information of the storage device through a functional interface, enabling the storage device to be connected to the electronic device through the firmware update device, facilitating the firmware update operation of the storage device. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is a schematic flowchart of the firmware update method provided by an embodiment of the present application.

[0044] Figure 2 is Figure 1 the first refined flowchart of step S400 in

[0045] Figure 3 is Figure 1 the second refined flowchart of step S400 in

[0046] Figure 4 is Figure 1 the third refined flowchart of step S400 in

[0047] Figure 5 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

[0048] Figure 6 It is a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.

[0049] Figure 7 It is a schematic structural diagram of a firmware update device provided by an embodiment of the present application.

[0050] Figure 8 It is a schematic structural diagram of a firmware update system provided by an embodiment of the present application. Detailed implementation manners

[0051] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0052] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, "a plurality" means two or more, unless otherwise specifically defined.

[0053] The present application provides a firmware update method, an electronic device, a firmware update device and a firmware update system. When the firmware update device is connected to the storage device, the firmware update program is executed to enter the firmware update file system, and the firmware update device is controlled to obtain the device information of the storage device through the function interface, so that the storage device can be connected to the electronic device through the firmware update device, facilitating the firmware update operation of the storage device.

[0054] Next, the firmware update method provided by the present application will be specifically described in conjunction with the drawings.

[0055] Please refer to Figure 1 , Figure 1 It is a flowchart of the firmware update method provided by an embodiment of the present application. As Figure 1 shown, the firmware update method includes: step S100 to step S500.

[0056] Step S100: Obtain the firmware update program.

[0057] In some embodiments, when a firmware update operation needs to be performed in a target system and the current operating system of the electronic device is not the target system, the firmware update program includes a system kernel of the target version and a firmware update toolkit. Among them, the system kernel of the target version is used to enter the target system. The firmware update toolkit includes multiple files for performing firmware update operations in the target system.

[0058] Optionally, the firmware update toolkit is a folder.

[0059] In some embodiments, when a firmware update operation needs to be performed in a 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.

[0060] Optionally, the target system can be a Linux system. The Linux system is an open-source operating system with high customizability and cross-platform capabilities. Therefore, the firmware update toolkit developed based on the Linux system can adapt to multiple hardware platforms, enabling the firmware update method of the present application to be applied to storage devices of multiple hardware platforms.

[0061] Optionally, the current operating system of the electronic device can be a Windows system.

[0062] Optionally, the firmware update toolkit includes a card opening tool program and the firmware of the target version. The card opening tool program is used to generate an executable file for burning the firmware of the target version into the storage device based on the parameter configuration information. The card opening tool program can also be used to generate the firmware of the target version based on the parameter configuration information.

[0063] Optionally, the firmware update toolkit further includes other files for performing firmware update operations.

[0064] Optionally, the Linux system kernel is a Kirin system kernel.

[0065] Step S200: When connected to the storage device through the firmware update device, execute the firmware update program to enter the firmware update file system.

[0066] In some embodiments, the firmware update file system is a folder including multiple files. Opening the firmware update folder in the firmware update toolkit of the firmware update program enters the firmware update file system.

[0067] Optionally, the firmware update toolkit or the firmware update file system may only include the firmware of the target version.

[0068] Optionally, the firmware update toolkit or the firmware update file system may include firmware of multiple versions, and a target version of firmware can be determined from the firmware of multiple versions according to the received update command later.

[0069] In some embodiments, the firmware update kit includes the code file of the firmware of the target version. After generating an executable file for burning the firmware of the target version into the storage device by using the card-opening tool program, the firmware update file system can be generated and entered.

[0070] In some embodiments, after generating an executable file for burning the firmware of the target version into the storage device by using the card-opening tool program and generating the firmware of the target version based on the parameter configuration information, the firmware update file system can be generated and entered.

[0071] In some embodiments, after entering the target system based on the system kernel of the target version, all the parameters in the parameter configuration information are input into the card-opening tool program to generate multiple executable files for burning the firmware of the target version into the storage device, and all the executable files are stored in the target folder in the firmware update program, thereby generating the firmware update file system. The firmware update file system includes all the files for performing the firmware update operation.

[0072] In some embodiments, the card-opening tool program is further used to generate the firmware of the target version according to the parameter configuration information and store the firmware of the target version in the firmware folder in the firmware update program. Specifically, the card-opening tool program includes the code of the preset firmware. The card-opening tool program can compile according to all the parameters in the parameter configuration information and the code of the preset firmware to generate the executable file of the firmware of the target version. Among them, the code of the preset firmware can be the code of a version of the firmware, but the parameters therein can be finally determined according to the parameter configuration information.

[0073] Optionally, the target folder is located in the firmware update kit. After storing all the executable files in the target folder in the firmware update kit, all the files in the firmware update kit constitute the firmware update file system.

[0074] Optionally, the firmware update file system may include multiple secondary folders, and each secondary folder may include multiple files or folders.

[0075] Optionally, the multiple generated executable files are further used to perform a security check on the storage device based on the parameter configuration information during the card-opening operation and configure the parameters of the storage device.

[0076] In some embodiments, after all the parameters in the parameter configuration information are input into the card opening tool program, a card opening operation is performed in the card opening tool program to perform a card opening test on a test storage device with the same storage device model. After receiving the information that the card opening of the test storage device is successful, a file generation operation is performed in the card opening tool program to generate multiple executable files for burning the firmware of the target version into the storage device. In this way, it can be ensured that the multiple generated executable files can be used to implement the correct firmware burning operation.

[0077] In some embodiments, the firmware update file system is stored in an external firmware update device.

[0078] Optionally, the firmware update device includes a USB flash drive, a portable hard drive, etc. When the electronic device includes a USB interface, a USB flash drive can be used as the external firmware update device. When the electronic device includes other types of interfaces, a firmware update device matching the interface of the electronic device can be used.

[0079] In some embodiments, before step S100, the method further includes: setting the system boot order to preferentially boot from the firmware update device. Entering the firmware update file system includes: booting from the firmware update device at startup and entering the firmware update file system stored in the firmware update device.

[0080] In some embodiments, the firmware update file system is stored in a firmware update device inside the electronic device. For example, the firmware update file system is stored in the system hard drive inside the electronic device. At this time, the system can be booted from the system hard drive inside the electronic device according to the default system boot order to enter the firmware update file system.

[0081] In some embodiments, entering the firmware update file system includes steps (200.1) to (200.3).

[0082] (200.1) Enter the initial interface of the firmware update file system.

[0083] In some embodiments, the firmware update file system is a folder including multiple files. Opening this folder enters the initial interface of the firmware update file system.

[0084] (200.2) In response to receiving an unlock command and obtaining an unlock password, unlock the firmware update operation permission.

[0085] Optionally, the command identifier of the unlock command and the unlock password are preset. When the command identifier of the unlock command is received, the password is obtained and it is identified whether the password is the preset unlock password. When it is identified that the password is the preset unlock password, the firmware update operation permission is unlocked.

[0086] Exemplarily, the command identifier of the unlocking command is "sudo su".

[0087] Optionally, when the recognized password is the preset unlocking password, the Root permission is unlocked. The Root permission is the highest-level permission, which means having full control over the system. After unlocking the Root permission, the firmware update operation permission is also unlocked.

[0088] (200.3) In response to receiving the 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.

[0089] In some embodiments, execute the target executable file according to the file identifier of the target executable file carried in the file execution command, and enter the operation interface.

[0090] Exemplarily, the file identifier carried in the file execution command is. / NVMe Tool ARCH64, and the file name of the target executable file is NVMe Tool ARCH64.

[0091] In some embodiments, when there is no interface for communication and other normal storage devices on the main board, but there is a network interface, the electronic device can be connected to the storage device through the network interface. At this time, the method further includes: when connecting to the storage device through the network interface on the main board where the storage device is located, execute the firmware update program to enter the firmware update file system.

[0092] Step S300: In the firmware update file system, control the firmware update device to obtain the device information of the storage device through the function interface.

[0093] Among them, the device information includes at least one of power supply information, serial port information, debug data information, and general input / output information.

[0094] In some embodiments, the power supply information includes various power parameters when the storage device is working, and the power parameters include voltage, current, ripple, etc. The serial port information includes the logs generated by the communication between the storage device and the electronic device or other devices. The debug data information is the data sent by the storage device in response to the debug command. The general input / output information includes the identification of the general input pins of the storage device and the debug functions supported by the general output pins.

[0095] In some embodiments, one function interface is used to obtain one type of information in the device information.

[0096] In some embodiments, one function interface of the firmware update device is correspondingly connected to one interface or pin of the storage device.

[0097] In some embodiments, the firmware update device includes a slot for accommodating a storage device, and a plurality of functional interfaces are provided at the edge of the slot. When the storage device is fixedly placed in the slot, one functional interface of the firmware update device is correspondingly connected to one interface or pin of the storage device.

[0098] In some embodiments, in the firmware update file system, the firmware update device is controlled to obtain the power supply information of the storage device through the first functional interface.

[0099] In some embodiments, in the firmware update file system, the firmware update device is controlled to obtain the serial port information of the storage device through the second functional interface.

[0100] In some embodiments, the storage device includes general input pins and general output pins. When the storage device receives a debugging command through the general input pins, it can execute the preset debugging function corresponding to the debugging command and send the debugging data information to the electronic device through the general output pins.

[0101] In some embodiments, in the firmware update file system, the firmware update device is controlled to obtain the general input / output information of the storage device through the third functional interface, and based on the general input / output information, the firmware update device is controlled to send a debugging command to the storage device through the general input pins of the storage device through the fourth functional interface, and the firmware update device is controlled to obtain the debugging data information through the general output pins of the storage device through the fifth functional interface. The general input / output information includes the identification of the general input pins of the storage device and the debugging functions supported by the general output pins.

[0102] Optionally, based on the identification of the general input pins of the storage device and the identification of the functional interfaces of the firmware update device stored in the firmware update file system, the fourth functional interface connected to the general input pins can be determined.

[0103] Optionally, the debugging functions supported by the storage device include reading stored data and performing read / write verification, etc.

[0104] In some embodiments, when the debugging function includes reading stored data, the debugging command can be a command for reading stored data.

[0105] In some embodiments, when the debugging function includes performing read / write verification, the debugging command includes an instruction for writing data and the written data. When the storage device receives the debugging command, the storage device writes the written data into the storage module according to the instruction for writing data, then reads the written data and sends it to the electronic device. The electronic device controls the firmware update device to obtain the debugging data information including the read written data through the general output pins of the storage device through the fifth functional interface.

[0106] Step S400: When device information is obtained in the firmware update file system, determine whether the storage device meets the firmware update conditions according to the device information.

[0107] Among them, the firmware update condition is that the storage device has no physical damage.

[0108] In some embodiments, when the storage device cannot be used normally, it may be due to physical damage, or there may be vulnerabilities or damage in the code content of the firmware. Only when there are vulnerabilities or damage in the code content of the firmware, it makes sense to perform a firmware update operation on the storage device. When the storage device has physical damage, even if the firmware is updated, the storage device cannot be used continuously, and it is meaningless to perform a firmware update operation at this time. Therefore, in order not to waste time, it is necessary to determine whether the storage device has physical damage before performing the firmware update operation.

[0109] In some embodiments, the device information includes power supply information. Please refer to Figure 2 , Figure 2 is Figure 1 the first refined process schematic diagram of step S400 in Figure 2 As shown, at this time, step S400 includes steps S401 to S403.

[0110] Step S401: When power supply information is obtained in the firmware update file system, determine the voltage fluctuation trend and power supply ripple frequency of the storage device according to the power supply information.

[0111] In some embodiments, the power supply information includes the voltage value and current value of the power supply within a first preset time period. According to the power supply information, the voltage value curve and current value curve of the power supply within the first preset time period can be determined. Furthermore, the voltage fluctuation trend can be determined according to the voltage value curve, and the power supply ripple frequency can be determined according to the current value curve.

[0112] The power supply ripple frequency refers to the frequency of the AC fluctuation component in the DC voltage.

[0113] Step S402: When it is determined based on the voltage fluctuation trend that the fluctuation amplitude of the power supply voltage of the storage device is greater than the preset amplitude, or the power supply voltage continuously drops or rises within a second preset time period, determine that the storage device does not meet the firmware update conditions.

[0114] In some embodiments, the preset amplitude is the rated power supply voltage multiplied by a preset percentage. Optionally, the preset percentage is 1%, 2%, 5% or 10%, etc.

[0115] Optionally, the second preset time period is 20 seconds, 30 seconds, 60 seconds or 100 seconds, etc.

[0116] In some embodiments, when the power supply voltage continuously drops or rises within a second preset time period and the fluctuation amplitude is greater than a preset amplitude, it is determined that the storage device does not meet the firmware update condition.

[0117] When the fluctuation amplitude of the power supply voltage of the storage device is greater than the preset amplitude, or the power supply voltage continuously drops or rises within a second preset time period, it can indicate that there is a physical damage in the power supply circuit of the storage device. Therefore, it is determined that the storage device does not meet the firmware update condition.

[0118] Step S403: When it is determined based on the power supply ripple frequency that the power supply ripple frequency is greater than a first preset frequency or less than a second preset frequency, it is determined that the storage device does not meet the firmware update condition; otherwise, it is determined that the storage device meets the firmware update condition.

[0119] In some embodiments, too high or too low power supply ripple frequency both indicates that there is a fault in the power supply circuit. For example, high-frequency ripple is related to the decrease in the capacitance of the filter capacitor in the power supply circuit, and low-frequency ripple is related to the decrease in the equivalent series resistance of the filter capacitor in the power supply circuit. When the power supply ripple frequency is too high or too low, it can indicate that there is a physical damage in the power supply circuit of the storage device. Therefore, it is determined that the storage device does not meet the firmware update condition.

[0120] In some embodiments, the storage device is connected to alternating current. At this time, the power supply noise signal frequency is determined according to the power supply information. When it is determined based on the power supply noise signal frequency that the power supply ripple frequency is greater than a third preset frequency or less than a fourth preset frequency, it is determined that the storage device does not meet the firmware update condition; otherwise, it is determined that the storage device meets the firmware update condition.

[0121] In some embodiments, the device information includes serial port information. Please refer to Figure 3 , Figure 3 is Figure 1 the second refined flowchart of step S400 in Figure 3 As shown, at this time, step S400 includes steps S404 to S406.

[0122] Step S404: When the serial port information is obtained in the firmware update file system, identify the error code in the serial port information.

[0123] In some embodiments, the error code in the serial port information is identified according to a preset error code format.

[0124] Step S405: Determine the fault cause of the storage device based on the error code.

[0125] In some embodiments, an association information library between error codes and fault causes is established in advance. By querying the association information library based on the error code, the fault cause can be quickly determined.

[0126] In some embodiments, the cause of the failure of the storage device is also determined according to error codes that appear multiple times. For example, when error codes indicating "read timeout" or "write timeout" appear multiple times, it can be determined that there is physical damage to the storage cells of the storage medium or the data transmission channel, so that repeatedly reading data or writing data fails.

[0127] Step S406: When it is determined that the cause of the failure of the storage device is physical damage, it is determined that the storage device does not meet the firmware update condition; otherwise, it is determined that the storage device meets the firmware update condition.

[0128] In some embodiments, the storage device can execute the preset debugging function according to the debugging functions supported by the storage device, and obtain the corresponding debugging data information.

[0129] Please refer to Figure 4 , Figure 4 is Figure 1 the third refined flowchart of step S400 in Figure 4 As shown in

[0130] Step S407: When the debugging data information is obtained in the firmware update file system, it is determined whether the storage device meets the firmware update condition according to the debugging data information.

[0131] In some embodiments, the debugging data information includes the stored data of the storage device. At this time, step S407 includes steps S4071 to S4072.

[0132] Step S4071: When the debugging data information is obtained in the firmware update file system, identify the data errors of the stored data in the debugging data information.

[0133] Among them, the data errors include data missing and data duplication, etc.

[0134] Optionally, the stored data can be the data originally stored in the storage device, or the written data read out in step S300.

[0135] When the data error only includes data duplication or other errors, it may be due to problems with the firmware, and there is no physical damage to the storage module in the storage device. When the data error includes data missing and the amount of missing data is greater than the preset data amount, it means that there are too many faulty storage cells in the storage device and there is already physical damage.

[0136] In some embodiments, in step S4071, a data integrity check is performed on the stored data to identify the data missing of the stored data, including steps (4071.1) to (40715).

[0137] (4071.1)Identify the storage data structure for storing data.

[0138] In some embodiments, the storage data structure includes a file system-based storage data structure, a block-based storage data structure, an object-based storage data structure, etc.

[0139] (4071.2)Parse the storage data structure based on the stored data to obtain multiple data units.

[0140] Exemplarily, when the storage data structure is a block-based storage data structure, the storage device stores the stored data by dividing it into multiple data units of a fixed size. At this time, multiple data units can be parsed by identifying the start identifier and end identifier of each field in the stored data.

[0141] (4071.3)Determine whether the size of each data unit is less than the standard size corresponding to the storage data structure. If so, it is determined that there is data missing in the data unit.

[0142] Exemplarily, when the storage data structure is a block-based storage data structure, the standard size corresponding to the storage data structure can be 4 kilobytes (KB) or 8 KB, etc.

[0143] (4071.4)When the data unit includes a number, sort the numbers of all data units and identify whether the sorted numbers are consecutive. If not, it is determined that there is data missing.

[0144] In some embodiments, when a number is missing, it can be determined that the entire data unit corresponding to the number is missing.

[0145] (4071.5)Calculate the amount of missing data in all data units with data missing.

[0146] In some embodiments, multiply the total number of missing data units by the standard size to obtain the first data amount; calculate the sum of the differences between each data unit with data missing and the standard size to obtain the second data amount, and add the first data amount and the second data amount to obtain the total amount of missing data.

[0147] In some embodiments, determining whether a data unit has missing data may include: identifying the check value stored in each data unit, recalculating the check value for the valid data in the data unit, comparing the recalculated check value of each data unit with the stored check value, and if they are different, determining that there is missing data in the storage unit.

[0148] Step S4072: When it is recognized that the data error in the stored data includes data loss and the amount of missing data is greater than the preset data amount, it is determined that the storage device does not meet the firmware update condition; otherwise, it is determined that the storage device meets the firmware update condition.

[0149] In some embodiments, the device information includes information such as the power supply information, serial port information, debug data information, and general input / output information of the storage device. In step S400, the above-described method can be used to determine whether the storage device meets the firmware update condition according to all the information in the device information. When it is determined that the storage device does not meet the firmware update condition according to at least one piece of information in the device information, it is finally determined that the storage device does not meet the firmware update condition.

[0150] In some embodiments, when it is determined that the storage device does not meet the firmware update condition, the firmware of the storage device is not updated to the target version of the firmware.

[0151] Step S500: When it is determined that the storage device meets the firmware update condition according to the device information, the firmware of the storage device is updated to the target version of the firmware.

[0152] In some embodiments, the device information further includes information such as the manufacturer information, model, serial number, and current firmware version identifier of the storage device.

[0153] Optionally, the latest version of the firmware adapted to the storage device is determined according to the model of the storage device in the device information and the firmware library, and the version of this firmware is also the target version. Among them, all firmware version identifiers and release times adapted to each model of storage device are pre-stored in the firmware library.

[0154] Optionally, the firmware library can be pre-stored in the firmware update file system.

[0155] Optionally, the firmware library can be stored on the server and be updated in real time.

[0156] In some embodiments, the target version of the firmware is determined according to the received update command, and the firmware of the storage device is updated to the target version of the firmware.

[0157] In some embodiments, the update command includes a card opening command and a firmware version update command.

[0158] In some embodiments, when it is determined that the storage device meets the firmware update condition according to the status information, the command identifiers of all executable commands and the operation instructions of each executable command are displayed on the operation interface.

[0159] In some embodiments, all executable commands include a card opening command and commands in additional functions.

[0160] In some embodiments, the card opening commands include a full card opening command, a card opening command for setting a serial number, and a card opening command for maintaining a serial number. When executing a card opening command, all stored data and fault information in the storage device are cleared, the faulty storage units of the storage device are masked, and the firmware of the storage device is updated to the firmware of the target version. When executing the full card opening command, the serial number of the storage device is also set to a preset serial number. When executing the card opening command for setting a serial number, the serial number of the storage device is also set to the target serial number carried by the card opening command for setting a serial number. When executing the card opening command for maintaining a serial number, the serial number of the storage device is also kept unchanged.

[0161] In some embodiments, the commands in the additional functions include a command for viewing device information, a command for viewing SMART (Self-Monitoring, Analysis and Reporting Technology) information, a firmware version update command, a command for viewing the running information of the storage device, a command for obtaining data of an index data block, a command for dumping WPRO (Write-Protect Register or other related) data, a command for dumping debug information, a command for dumping all data, and a command for obtaining related information of the storage device, etc. Among them, the running information of the storage device includes the usage rate of the storage space, the latency time of I / O operations, etc. The data of the index data block is used to determine the data management method adopted by the storage device. The command for obtaining related information of the storage device is used to execute the command for viewing SMART information, the command for viewing the running information of the storage device, the command for obtaining data of the index data block, the command for dumping debug information, and the command for dumping WPRO data at one time.

[0162] In some embodiments, the firmware update operation includes a card opening operation and a firmware version update operation. The update commands include a card opening command and a firmware version update command. When receiving a card opening command, a card opening operation is performed on the storage device according to the card opening command. When receiving a firmware version update command, a firmware version update operation is performed on the storage device according to the firmware version update command.

[0163] In some embodiments, when executing a firmware version update command, the firmware of the storage device is updated to the firmware of the target version, and the stored data and serial number of the storage device are retained.

[0164] Optionally, the card opening operation includes clearing all stored data and fault information in the storage device, masking the faulty storage units of the storage device, and updating the firmware of the storage device to the firmware of the target version and other steps determined according to the card opening command. The firmware version update operation includes updating the firmware of the storage device to the firmware of the target version and retaining the stored data in the storage device.

[0165] In some embodiments, when the card opening command received in the firmware update file system is a full new card opening command, all stored data and fault information in the storage device are cleared, the faulty storage units of the storage device are masked, the firmware of the storage device is updated to the firmware of the target version, and the serial number of the storage device is set to a preset serial number.

[0166] In some embodiments, before clearing all stored data and fault information in the storage device, all stored data are read and backed up to another storage device.

[0167] In some embodiments, when the card opening command is a set serial number card opening command, all stored data and fault information in the storage device are cleared, the faulty storage units of the storage device are masked, the firmware of the storage device is updated to the firmware of the target version, and the serial number of the storage device is set to the target serial number carried by the set serial number card opening command.

[0168] In some embodiments, when the card opening command is a keep serial number card opening command, all stored data and fault information in the storage device are cleared, the faulty storage units of the storage device are masked, the firmware of the storage device is updated to the firmware of the target version, and the serial number of the storage device is kept unchanged.

[0169] In some embodiments, when a command line including a command prefix and a command identifier is received, the command type is identified according to the command identifier.

[0170] Exemplarily, the command prefix is. / NVMe Tool ARCH64-1ist, the command identifier corresponding to the full new card opening command is initial, and the command line corresponding to the full new card opening command is. / NVMe Tool ARCH64-1istinitial.

[0171] Exemplarily, the command identifier corresponding to the set serial number card opening command is initial--sn= <newserialnumber>, New SerialNumber represents the target serial number. For example, the command line corresponding to setting the serial number to activate the card is . / NVMe ToolARCH64-1istinitial--sn=AXD12240001, where AXD12240001 is the target serial number.

[0172] In some embodiments, when executing the card activation command, description information of each sub-step in the card activation operation and information on whether the execution is successful are displayed in the operation interface.

[0173] Exemplarily, the sub-steps of the card activation operation include calculating the information block buffer size, generating the information block buffer, saving the information block, resetting the CPU, memory allocation check, and operation mode check.

[0174] 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.

[0175] In some embodiments, when a command to view SMART information is executed, fault information in the SMART information is identified, and based on the fault information, it is determined whether the storage device has entered a write-protected state. If the storage device has entered a write-protected state, the write-protection state of the storage device is released by opening the card, so that data can be written to the storage device.

[0176] In some embodiments, the fault information is a fault code. When the fault code is 0x00, it indicates that the storage device is in a normal working state. When the fault code is 0x08, it indicates that the storage device has entered a write protection state.

[0177] In some embodiments, when the storage device is determined to be in a write-protected state based on the fault information, a card unlock operation is automatically performed to unlock the storage device. Optionally, the card unlock operation can be a card unlock operation corresponding to a new card unlock command.

[0178] In some embodiments, when it is determined based on the fault information that the storage device is in a normal working state, and it is determined based on the current firmware version identifier in the device information that the current firmware version is not the target version, a firmware version update operation is automatically performed to update the firmware of the storage device to the target version firmware and retain all stored data.

[0179] Optionally, after the card activation command is successfully executed, a message indicating successful card activation is displayed in the operation interface.

[0180] In some embodiments, after successfully executing the card opening command, the device information of the storage device is obtained again, and when the device information is obtained, the device information after successful card opening is displayed in the operation interface.

[0181] Optionally, the version identifier and serial number of the firmware version after successful card opening are displayed in the operation interface for the user to check.

[0182] In some embodiments, due to the different usage characteristics of the storage device, the latest version of the firmware is not necessarily the most suitable firmware for the storage device. Therefore, a set of recommended firmware versions can be generated according to the usage characteristics of the storage device, and then a target version of the firmware that is most suitable for the storage device can be selected from them.

[0183] The usage characteristics of the storage device can include the purpose of the storage device. The stored data in the storage device can reflect the main purpose of the storage device. Storage devices with different purposes often have different performance requirements. For example, when the purpose of the storage device is to store video or picture data, since video or picture files are relatively large, a higher write speed and the maximum storage capacity need to be achieved; and since in this case the storage device is often used as a local backup disk and does not need to be read and written frequently, a very high read speed does not need to be achieved. The firmware of the storage device can be used to set the storage mode and storage space allocation method adopted when the storage device works, thereby changing the performance parameters of the storage device. The performance parameters can include storage capacity, write speed, and read speed, etc. Therefore, a set of recommended firmware versions can be generated according to the stored data and device information of the storage device, and then the target version of the firmware can be determined according to the set of recommended firmware versions so that the performance parameters of the storage device meet the performance requirements.

[0184] In some embodiments, step S500 includes steps S510 to S520.

[0185] Step S510: When it is determined according to the device information that the storage device meets the firmware update condition, a set of recommended firmware versions is generated according to the stored data and device information of the storage device.

[0186] Among them, the firmware set includes at least one version of firmware.

[0187] In some embodiments, step S510 includes steps S511 to S515.

[0188] Step S511: Identify all file types in the stored data.

[0189] In some embodiments, the file types include video files, picture files, document files, audio files, model design files, source code files, and the like. Among them, the model design files include file types for design such as static 3D model files and animation model files.

[0190] Step S512: Determine the purpose of the storage device based on the proportion of the file size of each file type in the stored data to the size of all the stored data.

[0191] In some embodiments, the purposes of the storage device include storing office files, storing video files or picture files, and storing model design files, etc. Among them, the office files include document files, spreadsheet files, slide files, and source code files, etc.

[0192] Optionally, the purpose of the storage device also includes storing various files.

[0193] In some embodiments, determine the purpose of the storage device according to one or several file types with the largest proportion of the file size to the size of all the stored data.

[0194] Step S513: Determine the performance requirements of the storage device based on the purpose of the storage device.

[0195] In some embodiments, when the purpose of the storage device is to store office files, determine that the performance requirement of the storage device is that the performance parameter of storage reliability needs to be greater than the first preset value.

[0196] When the purpose of the storage device is to store office files, because the information in the office files is very important, the storage device needs to achieve high storage reliability to reduce the risk of information loss. This can be achieved by firmware setting the storage mode of the storage device to a reliable storage mode.

[0197] In some embodiments, when the purpose of the storage device is to store video files or picture files, determine that the performance requirement of the storage device is that it needs the largest storage capacity and the write speed needs to be greater than the first preset speed.

[0198] When the purpose of the storage device is to store video files or picture files, because the video files or picture files are large, the storage device needs to achieve the largest storage capacity within the limitations of its own hardware conditions. Also because the video files or picture files are large and the write time is long, the storage device needs to achieve a high write speed.

[0199] In some embodiments, when the purpose of the storage device is to store model design files, determine that the performance requirement of the storage device is that the read speed needs to be greater than the second preset speed and the write speed needs to be greater than the third preset speed.

[0200] When the storage device is used to store model design files, users often need to modify the model design files in the storage device. Therefore, the storage device needs to achieve high read and write speeds.

[0201] Optionally, since model design files are often large, the performance requirements of the storage device can also include achieving the maximum storage capacity on the premise that the read speed is greater than the second preset speed and the write speed is greater than the third preset speed.

[0202] In some embodiments, when the storage device is used to store various files, the determined performance requirements of the storage device are balanced performance requirements.

[0203] Step S514: Determine the current device state of the storage device according to the device information.

[0204] Among them, the device information includes the data error rate, storage capacity, and used capacity of the storage device.

[0205] In some embodiments, when the data error rate of the storage device is greater than the preset error rate, it is determined that the current device state of the storage device is a state with more faulty storage units. When the current device state of the storage device is a state with more faulty storage units, it means that the storage reliability of the storage device is already relatively low. Subsequently, the storage reliability can be improved by changing the storage mode of the storage device through firmware.

[0206] In some embodiments, when the proportion of the used capacity to the storage capacity is greater than the second preset proportion, it is determined that the current device state of the storage device is a state of insufficient storage capacity. When the current device state of the storage device is a state of insufficient storage capacity, subsequently, the available storage capacity of the storage device can be expanded by changing the storage mode and storage space allocation method of the storage device through firmware.

[0207] Optionally, the second preset proportion is 0.7, 0.8, 0.85, etc.

[0208] In some embodiments, the device information also includes the historical working temperature information of the storage device. When it is determined according to the historical working temperature information that the average working temperature of the storage device is greater than the preset temperature threshold, it is determined that the current device state of the storage device is a high-temperature working state. When the current device state of the storage device is a high-temperature working state, it can be determined that the storage reliability of the storage device is already too low or about to be too low. Subsequently, the storage reliability can be improved by changing the storage mode of the storage device through firmware.

[0209] In some embodiments, the method steps for determining the current device state of the storage device described above can be executed in an overlapping manner, and the determined current device state can include multiple states. For example, when the data error rate of the storage device is greater than a preset error rate and the proportion of the used capacity to the storage capacity is greater than a second preset proportion, the current device state of the storage device is determined to be a state with a large number of faulty storage units and insufficient storage capacity.

[0210] Step S515: Generate a set of recommended firmware versions based on the performance requirements of the storage device, the current device state, and the compatibility information and functional characteristic information of each version of the firmware.

[0211] In some embodiments, step S515 includes steps S5151 to S5153.

[0212] Step S5151: Read the firmware compatibility information matrix and the functional characteristic information matrix in the firmware library.

[0213] Among them, the firmware compatibility information matrix includes the compatibility scores of each version of the firmware in multiple adaptation cases for each model of the storage device, and the functional characteristic information matrix includes multiple functional characteristic parameters of each version of the firmware. The functional characteristic parameters include the values of the maximum write speed, maximum read speed, maximum storage capacity, and storage reliability of the storage device when the firmware is adopted.

[0214] Optionally, a row number of the firmware compatibility information matrix corresponds to a version of the firmware, a column number corresponds to a model of the storage device, and an element in the firmware compatibility information matrix is the compatibility score of a version of the firmware in the case of adapting to the corresponding model of the storage device.

[0215] Optionally, a row number of the functional characteristic information matrix corresponds to a version of the firmware, a column number corresponds to a functional characteristic parameter, and an element in the functional characteristic information matrix is the value of a functional characteristic parameter corresponding to a version of the firmware.

[0216] Step S5152: Calculate the recommendation score of each version of the firmware based on the performance requirements of the storage device, the current device state, the firmware compatibility information matrix, and the functional characteristic information matrix.

[0217] In some embodiments, the performance requirements of the storage device, the current device state, and the firmware compatibility information matrix and the functional characteristic information matrix are input into the firmware recommendation calculation model to obtain the recommendation score of each version of the firmware.

[0218] Optionally, the firmware recommendation calculation model can include a preset firmware recommendation calculation formula or can be a trained artificial intelligence model.

[0219] Optionally, the artificial intelligence model may include models such as neural network models, models based on the Transformer architecture, and generative adversarial network models.

[0220] When the firmware recommendation calculation model is an artificial intelligence model, the firmware recommendation calculation model can be continuously trained with new training data to update the parameters therein.

[0221] Step S5153: Generate a firmware set including all versions of firmware with a recommendation score higher than a second preset value.

[0222] Optionally, the second preset value is 80, 85, 90, etc.

[0223] In some embodiments, a firmware set including the first preset number of versions of firmware with the highest recommendation score may also be generated.

[0224] Optionally, the first preset number is 1, 2, 3, 5, etc.

[0225] In some embodiments, record the version identifier of each firmware in the firmware set and the storage address of the code file of the firmware.

[0226] In some embodiments, display the version identifier of each firmware in the firmware set in the operation interface.

[0227] Optionally, the version identifier, performance parameters, and recommendation score of each version of firmware in the firmware set are also displayed in the operation interface for the user to select.

[0228] Step S520: In response to receiving a selection command, determine the firmware of the target version according to the selection command, and update the firmware of the storage device to the firmware of the target version.

[0229] Among them, the firmware of the target version is a version of firmware in the firmware set.

[0230] In some embodiments, when no selection command is received within the first preset time period, the firmware of one version with the highest recommendation score in the firmware set is determined as the firmware of the target version.

[0231] In some embodiments, obtain the code file of the firmware of the target version from the firmware library according to the storage address of the firmware of the target version.

[0232] It can be understood that in the process of calculating the recommendation score of firmware, the recommendation score of each version of firmware is not calculated simply based on performance requirements, but is calculated based on the performance requirements of the storage device, the current device state, the firmware compatibility information matrix, and the functional characteristic information matrix. Therefore, after updating the firmware of the storage device to the target version of firmware, the performance parameters of the storage device do not necessarily strictly meet the performance requirements. However, the target version of firmware is determined based on multiple factors. Compared with the method of simply determining the target version of firmware based on performance requirements, it can take into account multiple factors and is a more appropriate determination method.

[0233] In some embodiments, when the storage device is used to store various files, the storage mode of the storage device is set to the balanced write mode through the target version of firmware.

[0234] In some embodiments, when the storage device is used to store office files, the storage mode of the storage device is set to the reliable storage mode through the target version of firmware. In the reliable storage mode, the risk of information loss is reduced by writing data to storage units with a longer predicted lifespan, storing data backups, controlling the working temperature, and giving a fault warning according to the device state of the storage device.

[0235] Optionally, in the reliable storage mode, the storage space is divided into multiple storage sub-spaces, and at least two copies of the same data are stored in the storage spaces. When the proportion of faulty storage units detected in the storage device is greater than the fourth preset ratio, the write protection state is entered and a fault warning is given to enable the user to transfer data as soon as possible.

[0236] In some embodiments, when the storage device is used to store model design files, the storage mode of the storage device is set to the centralized write mode through the target version of firmware. When the storage device adopts the centralized write mode, the data that is frequently accessed can be centrally stored in a specific storage area, so as to be able to quickly locate and read the data. Since the model design files need to be frequently read and modified, in this way, the read and write speed of the storage device can be improved, making the storage device more suitable for storing model design files.

[0237] In summary, the firmware update method provided by the embodiments of this application has the following advantages:

[0238] 1. When connected to the storage device through the firmware update device, execute the firmware update program to enter the firmware update file system, and control the firmware update device to obtain the device information of the storage device through the function interface. It is possible to connect the storage device to the electronic device through the firmware update device, facilitating the firmware update operation of the storage device.

[0239] 2. By determining whether the storage device meets the firmware update conditions based on power supply information, serial port information, debug data information, and / or general-purpose input / output information, firmware update operations will not be performed on the storage device in the case of physical damage to the storage device, thus avoiding wasting time.

[0240] Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As Figure 5 shown, the electronic device 400 includes: one or more processors 410 and a memory 420. Figure 5 Here, one processor 410 is taken as an example.

[0241] In some embodiments, the processor 410 and the memory 420 can be connected through a bus or other means. Figure 5 Here, the connection through a bus is taken as an example.

[0242] In some embodiments, the processor 410 is configured to obtain a firmware update program; when connected to a storage device through a firmware update device, execute the firmware update program to enter the firmware update file system; in the firmware update file system, control the firmware update device to obtain the device information of the storage device through a function interface, where the device information includes at least one of power supply information, serial port information, debug data information, and general-purpose input / output information; when the device information is obtained in the firmware update file system, determine whether the storage device meets the firmware update conditions according to the device information; when it is determined according to the device information that the storage device meets the firmware update conditions, update the firmware of the storage device to the firmware of the target version.

[0243] In some embodiments, the memory 420, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions / modules of the firmware update method in the embodiment of the present application. The processor 410 executes various functional applications and data processing of the electronic device 400 by running the non-volatile software programs, instructions, and modules stored in the memory 420, that is, implements the firmware update method in the above method embodiment.

[0244] In some embodiments, the memory 420 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function. The data storage area may store data created according to the use of the electronic device 400, etc. In addition, the memory 420 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 420 may optionally include a memory remotely disposed relative to the processor 410, and these remote memories may be connected to the controller through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0245] In some embodiments, one or more modules are stored in the 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, perform the method steps S100 to S500 described above. Figure 1 in the above method.

[0246] Please refer to Figure 6 , Figure 6 which is a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. Program code 510 is stored in the computer-readable storage medium 500, and the program code 510 can be called by a processor to perform the firmware update method described in the above method embodiments.

[0247] The computer-readable storage medium 500 may be an electronic memory such as a flash memory, an electrically erasable programmable read-only memory (EEPROM), a hard disk, or a read-only memory (ROM). Optionally, the computer-readable storage medium includes a non-volatile computer-readable medium. The computer-readable storage medium 500 has a storage space for program code for performing any method steps in the above image processing method. These program codes can be read out from one or more computer program products or written into one or more computer program products. The program code can be compressed in an appropriate form, for example.

[0248] In some embodiments, an embodiment of the present application further provides a computer program product, including a computer program that implements the above firmware update method when executed by a processor.

[0249] Please refer to Figure 7 , Figure 7 which is a schematic structural diagram of a firmware update device provided by an embodiment of the present application. As shown in Figure 7 As shown in the figure, the present application also provides a firmware update device 600. The firmware update device 600 includes a functional interface 610. The firmware update device 600 is used to connect to a storage device and connect to the electronic device 400 as described above, so that the storage device communicates with the electronic device 400.

[0250] Please refer to Figure 8 , Figure 8 which is a schematic structural diagram of the firmware update system provided by an embodiment of the present application. As Figure 8 shown in the figure, the present application also provides a firmware update system 700. The firmware update system includes the electronic device 400 as described above, the firmware update device 600 as described above, and a storage device 800. Among them, the storage device 800 is connected to the firmware update device 600, and the firmware update device 600 is connected to the electronic device 400, so that the storage device 800 communicates with the electronic device 400.

[0251] In summary, the present application provides a firmware update method, an electronic device, a firmware update device, and a firmware update system. The firmware update method includes: obtaining a firmware update program; when connecting to a storage device through a firmware update device, executing the firmware update program to enter the firmware update file system; in the firmware update file system, controlling the firmware update device to obtain device information of the storage device through a functional interface, where the device information includes at least one of power supply information, serial port information, debug data information, and general input / output information; when obtaining device information in the firmware update file system, determining whether the storage device meets the firmware update condition according to the device information; when determining that the storage device meets the firmware update condition according to the device information, updating the firmware of the storage device to the firmware of the target version. By executing the firmware update program to enter the firmware update file system when connecting to a storage device through a firmware update device and controlling the firmware update device to obtain device information of the storage device through a functional interface, the present application can connect the storage device to the electronic device through the firmware update device, facilitating the firmware update operation of the storage device.

[0252] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.< / newserialnumber>

Claims

1. A firmware update method, characterized in that: include: Get firmware updates; When connected to the storage device through the firmware update apparatus, executing the firmware update program to enter the firmware update file system; In the firmware update file system, controlling the firmware update apparatus to obtain device information of the storage device through a functional interface, wherein the device information includes at least one of power supply information, serial port information, debugging data information, and general input and output information; When the device information is obtained in the firmware update file system, determining whether the storage device meets the firmware update condition according to the device information; When it is determined according to the device information that the storage device meets the firmware update condition, the firmware of the storage device is updated to the target version of firmware.

2. The firmware update method according to claim 1, wherein: One of the functional interfaces is used to obtain one type of the device information.

3. The firmware update method according to claim 1, wherein: The method further comprises: When the storage device is connected via the network port on the mainboard where the storage device is located, the firmware update program is executed to enter the firmware update file system.

4. The firmware update method according to claim 1, wherein: In the firmware update file system, controlling the firmware update apparatus to obtain device information of the storage device through a functional interface includes: In the firmware update file system, controlling the firmware update apparatus to obtain power supply information of the storage device through a first functional interface; When the device information is obtained in the firmware update file system, determining whether the storage device meets the firmware update condition according to the device information includes: When the power supply information is obtained in the firmware update file system, determining a voltage fluctuation trend and a power ripple frequency of the storage device according to the power supply information; When it is determined based on the voltage fluctuation trend that the fluctuation amplitude of the supply voltage of the storage device is greater than a preset amplitude, or the supply voltage continues to decrease or increase within a preset time period, it is determined that the storage device does not meet the firmware update condition; When it is determined based on the power ripple frequency that the power ripple frequency is greater than a first preset frequency or less than a second preset frequency, it is determined that the storage device does not meet the firmware update condition; otherwise, it is determined that the storage device meets the firmware update condition.

5. The firmware update method according to claim 1, wherein: In the firmware update file system, controlling the firmware update apparatus to obtain device information of the storage device through a functional interface includes: In the firmware update file system, controlling the firmware update apparatus to obtain serial port information of the storage device through a second functional interface; When the device information is obtained in the firmware update file system, determining whether the storage device meets the firmware update condition according to the device information includes: When the serial port information is obtained in the firmware update file system, identifying an error code in the serial port information; determining a cause of a failure of the storage device based on the error code; When it is determined that the failure cause of the storage device is physical damage, it is determined that the storage device does not meet the firmware update condition; otherwise, it is determined that the storage device meets the firmware update condition.

6. The firmware update method according to claim 1, wherein: In the firmware update file system, controlling the firmware update apparatus to obtain device information of the storage device through a functional interface includes: In the firmware update file system, controlling the firmware update apparatus to obtain general input and output information of the storage device through a third functional interface, the general input and output information including an identifier of a general input pin of the storage device and a debugging function supported by the general output pin; Controlling the firmware update apparatus to send a debugging command to the storage device via a fourth functional interface and a universal input pin of the storage device based on the universal input and output information; Controlling the firmware update device to obtain debugging data information via the fifth functional interface via the universal output pin of the storage device; When the device information is obtained in the firmware update file system, determining whether the storage device meets the firmware update condition according to the device information includes: When the debugging data information is obtained in the firmware update file system, it is determined whether the storage device meets the firmware update condition according to the debugging data information.

7. The firmware update method according to claim 6, wherein: The debugging data information includes storage data of the storage device, and when the debugging data information is obtained in the firmware update file system, determining whether the storage device meets the firmware update condition according to the debugging data information includes: When the debugging data information is acquired in the firmware update file system, identifying a data error in stored data in the debugging data information; When it is identified that the data error of the stored data includes data missing and the amount of missing data is greater than a preset data amount, it is determined that the storage device does not meet the firmware update condition; otherwise, it is determined that the storage device meets the firmware update condition.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the firmware update method according to any one of claims 1 to 7.

9. A firmware update device, characterized in that: The firmware updating apparatus comprises a functional interface, and is configured to be connected to the storage device and to be connected to the electronic device according to claim 8, so that the storage device communicates with the electronic device.

10. A firmware update system, characterized in that: The firmware updating system includes the electronic device according to claim 8, the firmware updating apparatus according to claim 9, and a storage device.

Citation Information

Patent Citations

  • Control equipment program updating method and device, storage medium and control equipment

    CN110543318A

  • Hard disk firmware updating method and device, electronic equipment and storage medium

    CN114020306A

  • Remote firmware updating method and system, electronic equipment and storage medium

    CN116483409A

  • Firmware configuration updating method, device and system, electronic equipment and storage medium

    CN117687645A

  • Firmware updating method, unit and equipment and storage medium

    CN117908937A