Firmware upgrade test method and device, medium and electronic equipment

Through automated hard disk type identification and adaptation upgrade tools, the hard disk firmware upgrade testing is automated, solving the problem of low testing efficiency in the existing technology, and significantly improving the testing efficiency.

CN119597652APending Publication Date: 2025-03-11NINGCHANG INFORMATION TECH (HANGZHOU) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411649264.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The prior art is inefficient in hard disk firmware upgrade testing, requires manual setup and execution, and has poor applicability in batch testing.

Method used

Provide a test method for firmware upgrade. By responding to the test instructions of the target hard disk, obtaining hard disk type information, determining suitable upgrade tools, and automatically performing firmware upgrade operations and result checks to generate an upgrade test report.

Benefits of technology

It realizes automated configuration and checking firmware upgrade methods, saves labor costs, reduces testing time, and significantly improves the efficiency of firmware upgrade testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597652A_ABST
    Figure CN119597652A_ABST
Patent Text Reader

Abstract

The invention provides a firmware upgrade test method and device, a medium and electronic equipment, and relates to the technical field of computers. The firmware upgrade test method comprises the following steps: responding to a firmware upgrade test instruction of a target hard disk, and obtaining type information of the target hard disk; the type information represents the type of the hard disk; the test instruction comprises an upgrade file identifier; determining a target upgrading tool for performing firmware upgrading on the target hard disk according to the type information and a corresponding relationship between a preset hard disk type and an upgrading tool; if it is detected that a target upgrading file corresponding to the upgrading file identifier exists, performing firmware upgrading operation on the target hard disk based on the target upgrading file and the target upgrading tool; and checking a refreshing result of the firmware upgrading operation performed for the target hard disk to obtain an upgrading test report. According to the method, the efficiency of testing firmware upgrade can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a firmware upgrade testing method, device, medium and electronic device. Background Art

[0002] With the continuous development and growth of the server product field, the server market has included mainstream fields such as finance and the Internet. With the rapid development of servers, high information security and high system reliability have gradually become the primary considerations of customers. Among them, hard disks, as the main carrier of data storage, must not only meet the diverse testing needs of customers, but also ensure stability and security. When testing hard disks, server manufacturers need to conduct comprehensive functionality, stability, performance and other tests and verifications to ensure product quality.

[0003] In the case of a fixed hardware design, the hard disk must meet the diverse application scenarios and needs of customers, so it needs to be designed from the software level, which will result in different firmware FW versions. Usually, a hard disk product will customize multiple FW versions at the same time to meet the needs of different customers, and the FW version will be continuously updated throughout the life cycle of the hard disk to solve problems with the old version of FW. Therefore, when server manufacturers test hard disks, firmware upgrades are also an extremely important test.

[0004] The current test for hard disk firmware upgrade can implement the command FW upgrade for the hard disk under the specific configuration of the specific interface type and check whether it is successful. The firmware upgrade test often requires technicians to manually set up and execute, and has poor applicability in batch testing and low test efficiency. Therefore, how to provide a firmware upgrade test method to solve the problem of low test efficiency of firmware upgrade is of great practical significance. Summary of the invention

[0005] The embodiments of the present application provide a method, device, medium and electronic device for testing firmware upgrades, which can improve the efficiency of testing firmware upgrades.

[0006] To achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:

[0007] In a first aspect, an embodiment of the present application provides a method for testing a firmware upgrade, comprising:

[0008] In response to a test instruction for upgrading the firmware of a target hard disk, the type information of the target hard disk is acquired; the type information represents the type of the hard disk; the test instruction includes an upgrade file identifier;

[0009] Determining a target upgrade tool for performing firmware upgrade on the target hard disk according to the type information and a preset correspondence between the hard disk type and the upgrade tool;

[0010] If it is detected that the target upgrade file corresponding to the upgrade file identifier exists, then based on the target upgrade file and the target upgrade tool, a firmware upgrade operation is performed on the target hard disk;

[0011] Check the refresh result of the firmware upgrade operation performed on the target hard disk to obtain an upgrade test report.

[0012] The firmware upgrade test method provided in the embodiment of the present application responds to the test instruction of the firmware upgrade of the target hard disk to obtain the type information of the target hard disk; the type information represents the type of the hard disk; the test instruction includes an upgrade file identifier; according to the type information and the correspondence between the preset hard disk type and the upgrade tool, the target upgrade tool for the firmware upgrade of the target hard disk is determined; if it is detected that the target upgrade file corresponding to the upgrade file identifier exists, the firmware upgrade operation is performed on the target hard disk based on the target upgrade file and the target upgrade tool; the refresh result of the firmware upgrade operation performed on the target hard disk is checked to obtain an upgrade test report, which can automatically configure the firmware upgrade mode and check the refresh result of the firmware upgrade operation, save labor costs, and reduce the time-consuming test of the firmware upgrade, which can effectively improve the efficiency of testing the firmware upgrade.

[0013] In an optional embodiment, the obtaining the type information of the target hard disk includes:

[0014] Obtain the drive letter of the target hard disk, and obtain the SMART information of the target hard disk;

[0015] The type information of the target hard disk is determined according to the drive letter and the SMART information.

[0016] The method of this embodiment obtains the drive letter of the target hard disk and the SMART information of the target hard disk; determines the type information of the target hard disk according to the drive letter and the SMART information. When testing the firmware upgrade, the type information of the target hard disk can be determined according to the drive letter and the SMART information of the obtained target hard disk, thereby providing a mechanism for determining the type of the target hard disk during the firmware upgrade test, which can accurately identify the type of the target hard disk for the firmware upgrade, thereby more efficiently improving the efficiency of testing the firmware upgrade.

[0017] In an optional embodiment, the type information includes a first hard disk type, a second hard disk type, and a third hard disk type; the first hard disk type indicates that the hard disk is an NVMe hard disk; the second hard disk type indicates that the hard disk is a SATA / SAS hard disk and is provided with a controller; the third hard disk type indicates that the hard disk is a SATA / SAS hard disk and is not provided with a controller;

[0018] The step of determining the type information of the target hard disk according to the drive letter and the SMART information includes:

[0019] Determine the drive letter type of the target hard disk according to the drive letter;

[0020] If the drive letter type is nvmeXn1 type drive letter, the type information of the target hard disk is the first hard disk type;

[0021] If the drive letter type is not an nvmeXn1 type drive letter, generating controller identification information of the target hard disk according to the SMART information;

[0022] If the controller identification information is not a null value, the type information of the target hard disk is the second hard disk type;

[0023] If the controller identification information is a null value, the type information of the target hard disk is the third hard disk type.

[0024] In the method of this embodiment, the type information includes a first hard disk type, a second hard disk type and a third hard disk type; the first hard disk type indicates that the hard disk is an NVMe hard disk; the second hard disk type indicates that the hard disk is a SATA / SAS hard disk and is provided with a controller; the third hard disk type indicates that the hard disk is a SATA / SAS hard disk and is not provided with a controller; according to the drive letter, the drive letter type of the target hard disk is determined; if the drive letter type is an nvmeXn1 type drive letter, the type information of the target hard disk is the first hard disk type; if the drive letter type is not an nvmeXn1 type drive letter, the controller identification information of the target hard disk is generated according to the SMART information; if the controller identification information is not a null value, the type information of the target hard disk is the second hard disk type; if the controller identification information is a null value, the type information of the target hard disk is the third hard disk type, and a hard disk type identification mechanism is provided, which can accurately identify the hard disk type according to the drive letter type and controller identification information, and effectively improve the efficiency of testing firmware upgrades.

[0025] In an optional embodiment, determining a target upgrade tool for performing firmware upgrade on the target hard disk according to the type information and a preset correspondence between the hard disk type and the upgrade tool includes:

[0026] If the type information is the first hard disk type, determining based on the corresponding relationship that a target upgrade tool for performing firmware upgrade on the target hard disk is an nvme-cli tool;

[0027] If the type information is the second hard disk type, determining based on the corresponding relationship that a target upgrade tool for performing firmware upgrade on the target hard disk is a controller management tool;

[0028] If the type information is the third hard disk type, it is determined based on the corresponding relationship that the target upgrade tool for performing firmware upgrade on the target hard disk is the Hdparm tool.

[0029] The method of this embodiment, if the type information is the first hard disk type, then based on the correspondence, it is determined that the target upgrade tool for firmware upgrade of the target hard disk is the nvme-cli tool; if the type information is the second hard disk type, then based on the correspondence, it is determined that the target upgrade tool for firmware upgrade of the target hard disk is the controller management tool; if the type information is the third hard disk type, then based on the correspondence, it is determined that the target upgrade tool for firmware upgrade of the target hard disk is the Hdparm tool. The target upgrade tool used in the firmware upgrade test process can be efficiently provided based on the type information, thereby more effectively improving the efficiency of testing the firmware upgrade.

[0030] In an optional embodiment, if it is detected that the target upgrade file corresponding to the upgrade file identifier exists, then based on the target upgrade file and the target upgrade tool, a firmware upgrade operation is performed on the target hard disk, including:

[0031] Determine whether the target upgrade file corresponding to the upgrade file identifier exists;

[0032] If the result of the judgment is yes, generating marking data;

[0033] The marking data is stored in association with the target hard disk, and the marking data is written into a free partition of the target hard disk;

[0034] Based on the target upgrade file and the target upgrade tool, a firmware upgrade operation is performed on the target hard disk.

[0035] The method of this embodiment includes: judging whether a target upgrade file corresponding to the upgrade file identifier exists; if the result of the judgment is yes, generating marking data; storing the marking data in association with the target hard disk, and writing the marking data into a free partition of the target hard disk; performing a firmware upgrade operation on the target hard disk based on the target upgrade file and the target upgrade tool, and pre-storing the marking data before performing the firmware upgrade operation on the target hard disk, the pre-stored marking data is used for data verification in the hard disk, thereby providing an identifier for verifying whether the hard disk firmware upgrade will damage the existing data in the hard disk, which can improve the efficiency of testing the firmware upgrade.

[0036] In an optional embodiment, the checking the refresh result of the firmware upgrade operation performed on the target hard disk to obtain an upgrade test report includes:

[0037] Check whether the firmware version of the target hard disk is consistent with the target version of the target upgrade file, and obtain version comparison information;

[0038] Check whether the tag data in the target hard disk is consistent with the tag data stored in association with the target hard disk, and obtain tag comparison information;

[0039] An upgrade test report is obtained according to the version comparison information and the tag comparison information.

[0040] The method of this embodiment obtains version comparison information by checking whether the firmware version of the target hard disk is consistent with the target version of the target upgrade file; checks whether the tag data in the target hard disk is consistent with the tag data stored in association with the target hard disk to obtain tag comparison information; obtains an upgrade test report based on the version comparison information and the tag comparison information, thereby providing a mechanism for obtaining an upgrade test report based on a refresh result, realizing the verification during the firmware upgrade test whether the hard disk firmware upgrade will damage the existing data in the hard disk, and effectively improving the efficiency of testing the firmware upgrade.

[0041] In an optional embodiment, it also includes:

[0042] If it is detected that the target upgrade file corresponding to the upgrade file identifier does not exist, an upgrade file alarm is issued; and / or,

[0043] If it is detected that the firmware version of the target hard disk is inconsistent with the target version of the target upgrade file, a refresh failure alarm is issued; and / or,

[0044] If it is detected that the marking data in the target hard disk is inconsistent with the marking data stored in association with the target hard disk, a data corruption alarm is issued.

[0045] The method of this embodiment performs an upgrade file alarm if it is detected that the target upgrade file corresponding to the upgrade file identifier does not exist; and / or performs a refresh failure alarm if it is detected that the firmware version of the target hard disk is inconsistent with the target version of the target upgrade file; and / or performs a data corruption alarm if it is detected that the mark data in the target hard disk is inconsistent with the mark data stored in association with the target hard disk, thereby realizing abnormal alarms in the firmware upgrade test process and improving the efficiency of testing the firmware upgrade.

[0046] In a second aspect, an embodiment of the present application further provides a firmware upgrade test device, the device comprising:

[0047] An information acquisition module, used to respond to a test instruction for upgrading the firmware of a target hard disk and acquire type information of the target hard disk; the type information represents the type of the hard disk; the test instruction includes an upgrade file identifier;

[0048] A tool determination module, used to determine a target upgrade tool for performing firmware upgrade on the target hard disk according to the type information and a preset correspondence between the hard disk type and the upgrade tool;

[0049] An upgrade control module, configured to perform a firmware upgrade operation on the target hard disk based on the target upgrade file and the target upgrade tool if it is detected that the target upgrade file corresponding to the upgrade file identifier exists;

[0050] The upgrade detection module is used to check the refresh result of the firmware upgrade operation performed on the target hard disk and obtain an upgrade test report.

[0051] In an optional embodiment, the information acquisition module is specifically used to:

[0052] Obtain the drive letter of the target hard disk, and obtain the SMART information of the target hard disk;

[0053] The type information of the target hard disk is determined according to the drive letter and the SMART information.

[0054] In an optional embodiment, the type information includes a first hard disk type, a second hard disk type, and a third hard disk type; the first hard disk type indicates that the hard disk is an NVMe hard disk; the second hard disk type indicates that the hard disk is a SATA / SAS hard disk and is provided with a controller; the third hard disk type indicates that the hard disk is a SATA / SAS hard disk and is not provided with a controller; the information acquisition module is specifically used to:

[0055] Determine the drive letter type of the target hard disk according to the drive letter;

[0056] If the drive letter type is nvmeXn1 type drive letter, the type information of the target hard disk is the first hard disk type;

[0057] If the drive letter type is not an nvmeXn1 type drive letter, generating controller identification information of the target hard disk according to the SMART information;

[0058] If the controller identification information is not a null value, the type information of the target hard disk is the second hard disk type;

[0059] If the controller identification information is a null value, the type information of the target hard disk is the third hard disk type.

[0060] In an optional embodiment, the tool determination module is specifically used to:

[0061] If the type information is the first hard disk type, determining based on the corresponding relationship that a target upgrade tool for performing firmware upgrade on the target hard disk is an nvme-cli tool;

[0062] If the type information is the second hard disk type, determining based on the corresponding relationship that a target upgrade tool for performing firmware upgrade on the target hard disk is a controller management tool;

[0063] If the type information is the third hard disk type, then based on the corresponding relationship, it is determined that the target upgrade tool for performing firmware upgrade on the target hard disk is the Hdparm tool.

[0064] In an optional embodiment, the upgrade control module is specifically used to:

[0065] Determine whether the target upgrade file corresponding to the upgrade file identifier exists;

[0066] If the result of the judgment is yes, generating marking data;

[0067] The marking data is stored in association with the target hard disk, and the marking data is written into a free partition of the target hard disk;

[0068] Based on the target upgrade file and the target upgrade tool, a firmware upgrade operation is performed on the target hard disk.

[0069] In an optional embodiment, the upgrade detection module is specifically used to:

[0070] Check whether the firmware version of the target hard disk is consistent with the target version of the target upgrade file, and obtain version comparison information;

[0071] Check whether the tag data in the target hard disk is consistent with the tag data stored in association with the target hard disk, and obtain tag comparison information;

[0072] An upgrade test report is obtained according to the version comparison information and the tag comparison information.

[0073] In an optional embodiment, the device further includes an abnormal alarm module; the abnormal alarm module is specifically used to:

[0074] If it is detected that the target upgrade file corresponding to the upgrade file identifier does not exist, an upgrade file alarm is issued; and / or,

[0075] If it is detected that the firmware version of the target hard disk is inconsistent with the target version of the target upgrade file, a refresh failure alarm is issued; and / or,

[0076] If it is detected that the marking data in the target hard disk is inconsistent with the marking data stored in association with the target hard disk, a data corruption alarm is issued.

[0077] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the firmware upgrade test method of the first aspect is implemented.

[0078] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the processor implements the firmware upgrade test method of the first aspect.

[0079] The technical effects brought about by any one of the implementation methods in the second to fourth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0081] Figure 1 A flowchart of a firmware upgrade test method provided in an embodiment of the present application;

[0082] Figure 2A schematic diagram of a flow chart of obtaining type information of a target hard disk in a firmware upgrade test method provided in an embodiment of the present application;

[0083] Figure 3 A flowchart of a firmware upgrade test method provided in an embodiment of the present application for determining the type information of a target hard disk according to a drive letter and SMART information;

[0084] Figure 4 A flowchart of a target upgrade tool for determining a target hard disk for firmware upgrade in a firmware upgrade test method provided in an embodiment of the present application;

[0085] Figure 5 A flowchart of pre-stored marking data for a firmware upgrade test method provided in an embodiment of the present application;

[0086] Figure 6 A flowchart of obtaining an upgrade test report of a firmware upgrade test method provided in an embodiment of the present application;

[0087] Figure 7 A flowchart of an abnormal alarm of a firmware upgrade test method provided in an embodiment of the present application;

[0088] Figure 8 One of the structural schematic diagrams of a firmware upgrade test device provided in an embodiment of the present application;

[0089] Fig. 9 A second structural diagram of a firmware upgrade test device provided in an embodiment of the present application;

[0090] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0091] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only 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 ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0092] It should be noted that the terms "including" and "having" and their variations involved in the documents of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0093] The following are explanations of some of the terms that appear in the text:

[0094] (1) FW (Firmware): FW is a program written into the memory of a specific hardware. The firmware program is mainly used to control the underlying hardware and communicate with other devices. Upgrading the firmware can fix errors, improve performance, add features, or provide security patches.

[0095] (2) SAS (Serial Attached SCSI): SAS is a hard disk interface that uses serial technology to achieve higher transmission speeds and improves internal space by effectively shortening the connection line. This interface is designed to improve the performance, availability, and expandability of storage systems, and can provide compatibility with SATA hard disks. The SAS interface is backward compatible with the SATA interface and has a higher transmission rate than SATA.

[0096] (3) SATA (Serial Advanced Technology Attachment): SATA is a serial data transmission interface standard widely used in computer hard disks. For example, the SATA 3.0 standard has a transmission rate of 6 Gb / s.

[0097] (4) NVMe (Non-Volatile Memory express): NVMe is a protocol for high-speed parallel data transfer that reduces system overhead used in flash storage and solid-state drives, with faster response times and lower latency.

[0098] (5) SMART information: SMART information mainly records various internal states of the hard disk and is used to feedback the current hard disk state. In some embodiments of the present application, SMART information includes basic information records of the hard disk, including the model, serial number, and firmware version of the hard disk. SMART information is used together with the drive letter to determine the hard disk type.

[0099] With the continuous development and growth of the server product field, the server market has included mainstream fields such as finance and the Internet. With the rapid development of servers, high information security and high system reliability have gradually become the primary considerations of customers. Among them, hard disks, as the main carrier of data storage, must not only meet the diverse testing needs of customers, but also ensure stability and security. When testing hard disks, server manufacturers need to conduct comprehensive functionality, stability, performance and other tests and verifications to ensure product quality.

[0100] In the case of a fixed hardware design, the hard disk must meet the diverse application scenarios and needs of customers, so it needs to be designed from the software level, which will result in different firmware FW versions. Usually, a hard disk product will customize multiple FW versions at the same time to meet the needs of different customers, and the FW version will be continuously updated throughout the life cycle of the hard disk to solve problems with the old version of FW. Therefore, when server manufacturers test hard disks, firmware upgrades are also an extremely important test.

[0101] The current test for hard disk firmware upgrade can implement the command FW upgrade for the hard disk under the specific configuration of the specific interface type and check whether it is successful. The firmware upgrade test often requires technicians to manually set up and execute, and has poor applicability in batch testing and low test efficiency. Therefore, how to provide a firmware upgrade test method to solve the problem of low test efficiency of firmware upgrade is of great practical significance.

[0102] To solve the existing technical problems, the embodiments of the present application provide a firmware upgrade test method, device, medium and electronic device, wherein the firmware upgrade test method responds to the firmware upgrade test instruction of the target hard disk to obtain the type information of the target hard disk; the type information characterizes the type of the hard disk; the test instruction includes an upgrade file identifier; according to the type information and the correspondence between the preset hard disk type and the upgrade tool, the target upgrade tool for the firmware upgrade of the target hard disk is determined; if it is detected that the target upgrade file corresponding to the upgrade file identifier exists, the firmware upgrade operation is performed on the target hard disk based on the target upgrade file and the target upgrade tool; the refresh result of the firmware upgrade operation performed on the target hard disk is checked to obtain an upgrade test report, which can automatically configure the firmware upgrade mode and check the refresh result of the firmware upgrade operation, save labor costs, and reduce the time-consuming firmware upgrade testing, which can effectively improve the efficiency of firmware upgrade testing.

[0103] In order to make the invention purpose, technical scheme and advantages of the embodiments of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0104] The technical solution provided in the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0105] The firmware upgrade test method provided in the embodiment of the present application can be applied to a server or a terminal. The following embodiments of the present application are described by taking the firmware upgrade test method applied to a server as an example.

[0106] The present application embodiment provides a method for testing firmware upgrades, such as Figure 1 As shown, the following steps are included:

[0107] Step S101, responding to a test instruction for upgrading the firmware of a target hard disk, obtaining type information of the target hard disk; the type information represents the type of the hard disk; the test instruction includes an upgrade file identifier.

[0108] In specific implementation, the server responds to the test instruction of the firmware upgrade of the target hard disk and obtains the type information of the target hard disk; the type information represents the type of the hard disk; the test instruction includes the upgrade file identifier. The test instruction may include the hard disk identifier of the target hard disk; the hard disk identifier is used to distinguish and identify the hard disk.

[0109] In some optional embodiments, the process of obtaining the type information of the target hard disk in the above step S101 is as follows: Figure 2 As shown, this can be achieved by following the steps below:

[0110] Step S201, obtaining the drive letter of the target hard disk, and obtaining the SMART information of the target hard disk.

[0111] During specific implementation, the server obtains the drive letter of the target hard disk and obtains the SMART information of the target hard disk.

[0112] In some embodiments of the present application, the server captures the drive letter and SMART information of the hard disk under the OS.

[0113] Step S202: Determine the type information of the target hard disk according to the drive letter and SMART information.

[0114] During specific implementation, the server determines the type information of the target hard disk according to the drive letter and SMART information.

[0115] The method of this embodiment obtains the drive letter of the target hard disk and the SMART information of the target hard disk; determines the type information of the target hard disk based on the drive letter and the SMART information. When testing the firmware upgrade, the type information of the target hard disk can be determined based on the drive letter and the SMART information of the target hard disk. A mechanism for determining the type of the target hard disk during the firmware upgrade test is provided, which can accurately identify the type of the target hard disk for the firmware upgrade, thereby more efficiently improving the efficiency of testing the firmware upgrade.

[0116] In one embodiment, the type information includes a first hard disk type, a second hard disk type, and a third hard disk type; the first hard disk type indicates that the hard disk is an NVMe hard disk; the second hard disk type indicates that the hard disk is a SATA / SAS hard disk and is provided with a controller; the third hard disk type indicates that the hard disk is a SATA / SAS hard disk and is not provided with a controller; in the above step S202, the process of determining the type information of the target hard disk according to the drive letter and SMART information is as follows: Figure 3 As shown, this can be achieved through the following steps:

[0117] Step S301, determining the drive letter type of the target hard disk according to the drive letter.

[0118] In specific implementation, the server determines the drive letter type of the target hard disk according to the drive letter of the target hard disk. The drive letter type represents the sub-classification corresponding to the drive letter of the hard disk. In some embodiments of the present application, the sub-classification includes nvmeXn1 type drive letters and sdX type drive letters.

[0119] In some embodiments of the present application, the server determines the drive letter type of the target hard disk based on a character string of the drive letter of the target hard disk.

[0120] Exemplarily, assuming that the drive letter of the target hard disk is "nvme1n1" or "nvme0n1", the server determines that the drive letter type of the target hard disk is nvmeXn1 type drive letter based on the drive letter "nvme1n1" or "nvme0n1"; assuming that the drive letter of the target hard disk is "sda" or "sdb", the server determines that the drive letter type of the target hard disk is sdX type drive letter based on the drive letter "sda" or "sdb".

[0121] In some embodiments of the present application, X in a drive letter of the nvmeXn1 type represents a number; and X in a drive letter of the sdX type represents a letter.

[0122] Step S302: If the drive letter type is nvmeXn1 type drive letter, the type information of the target hard disk is the first hard disk type.

[0123] Step S303: If the drive letter type is not an nvmeXn1 type drive letter, the controller identification information of the target hard disk is generated according to the SMART information.

[0124] Step S304: if the controller identification information is not a null value, the type information of the target hard disk is the second hard disk type.

[0125] Step S305: if the controller identification information is a null value, the type information of the target hard disk is the third hard disk type.

[0126] In an embodiment of the present application, the process of obtaining the type information of the target hard disk may also be: obtaining the drive letter of the target hard disk; and determining the type information of the target hard disk according to the drive letter.

[0127] In some embodiments of the present application, the server is a Linux system; the server may also generate controller identification information by executing the lspci instruction to match whether the controller information is contained; if there is information such as LSI, the generated controller identification information indicates that a controller is provided; if there is no information such as LSI, the generated controller identification information indicates that no controller is provided.

[0128] In the method of this embodiment, the type information includes a first hard disk type, a second hard disk type and a third hard disk type; the first hard disk type indicates that the hard disk is an NVMe hard disk; the second hard disk type indicates that the hard disk is a SATA / SAS hard disk and is provided with a controller; the third hard disk type indicates that the hard disk is a SATA / SAS hard disk and is not provided with a controller; according to the drive letter, the drive letter type of the target hard disk is determined; if the drive letter type is an nvmeXn1 type drive letter, the type information of the target hard disk is the first hard disk type; if the drive letter type is not an nvmeXn1 type drive letter, the controller identification information of the target hard disk is generated according to the SMART information; if the controller identification information is not a null value, the type information of the target hard disk is the second hard disk type; if the controller identification information is a null value, the type information of the target hard disk is the third hard disk type, and a hard disk type identification mechanism is provided, which can accurately identify the hard disk type according to the drive letter type and controller identification information, and effectively improve the efficiency of testing firmware upgrades.

[0129] Step S102: determining a target upgrade tool for performing firmware upgrade on the target hard disk according to the type information and a preset correspondence between the hard disk type and the upgrade tool.

[0130] During specific implementation, the server determines the target upgrade tool for the target hard disk to perform the firmware upgrade according to the type information and the preset correspondence between the hard disk type and the upgrade tool.

[0131] In some optional embodiments, in the above step S102, the process of determining the target upgrade tool for the target hard disk to perform the firmware upgrade according to the type information and the preset correspondence between the hard disk type and the upgrade tool is as follows: Figure 4 As shown, this can be achieved by following the steps below:

[0132] Step S401: If the type information is the first hard disk type, it is determined based on the corresponding relationship that the target upgrade tool for the firmware upgrade of the target hard disk is the nvme-cli tool.

[0133] In specific implementation, the first hard disk type characterizes that the hard disk is an NVMe hard disk; if the type information is the first hard disk type, the target upgrade tool for firmware upgrade of the target hard disk is determined to be the nvme-cli tool based on the corresponding relationship.

[0134] Step S402: If the type information is the second hard disk type, determining based on the corresponding relationship that a target upgrade tool for performing firmware upgrade on the target hard disk is a controller management tool.

[0135] In specific implementation, the second hard disk type indicates that the hard disk is a SATA / SAS hard disk and is provided with a controller; if the type information is the second hard disk type, the target upgrade tool for firmware upgrade of the target hard disk is determined to be a controller management tool based on the corresponding relationship.

[0136] Step S403: If the type information is the third hard disk type, determine based on the corresponding relationship that the target upgrade tool for the firmware upgrade of the target hard disk is the Hdparm tool.

[0137] In specific implementation, the third hard disk type indicates that the hard disk is a SATA / SAS hard disk and is not provided with a controller; the type information is the third hard disk type, and the target upgrade tool for firmware upgrade of the target hard disk is determined to be the Hdparm tool based on the corresponding relationship.

[0138] The method of this embodiment, if the type information is the first hard disk type, then based on the correspondence relationship, it is determined that the target upgrade tool for firmware upgrade of the target hard disk is the nvme-cli tool; if the type information is the second hard disk type, then based on the correspondence relationship, it is determined that the target upgrade tool for firmware upgrade of the target hard disk is the controller management tool; if the type information is the third hard disk type, then based on the correspondence relationship, it is determined that the target upgrade tool for firmware upgrade of the target hard disk is the Hdparm tool. The target upgrade tool used in the firmware upgrade test process can be efficiently provided based on the type information, thereby more effectively improving the efficiency of testing the firmware upgrade.

[0139] Step S103: If it is detected that the target upgrade file corresponding to the upgrade file identifier exists, a firmware upgrade operation is performed on the target hard disk based on the target upgrade file and the target upgrade tool.

[0140] In some embodiments of the present application, the firmware upgrade testing method also includes performing an on-disk data verification operation based on the marker data, effectively verifying whether the hard disk FW refresh will damage the existing data on the disk, ensuring that the problem can be discovered in advance, avoiding data loss problems when subsequent users upgrade the hard disk FW and causing losses, and further improving the efficiency of testing the firmware upgrade.

[0141] In some optional embodiments, in the above step S103, if it is detected that the target upgrade file corresponding to the upgrade file identifier exists, the process of performing a firmware upgrade operation on the target hard disk based on the target upgrade file and the target upgrade tool is as follows: Figure 5 As shown, this can be achieved by following the steps below:

[0142] Step S501, determining whether a target upgrade file corresponding to the upgrade file identifier exists.

[0143] In specific implementation, the server can determine whether the target upgrade file corresponding to the upgrade file identifier exists. The server determines whether the target upgrade file corresponding to the upgrade file identifier exists by checking whether there is a FW file in the FW folder path corresponding to the target hard disk.

[0144] Step S502: if the result of the judgment is yes, then generate marking data.

[0145] In some embodiments, pre-stored marking data is written into the disk to be tested before starting the test, and after each successful FW refresh, the marking data in the corresponding hard disk is checked to see if it is complete, so as to determine whether the hard disk FW refresh process will affect the original data in the hard disk.

[0146] In some embodiments of the present application, the marking data is generated into a file using the dd command and then the md5sum tool is used to generate an md5 verification code for marking data verification before and after the upgrade.

[0147] Step S503: associate the marking data with the target hard disk and store them, and write the marking data into a free partition of the target hard disk.

[0148] In an embodiment of the present application, the server associates the marking data with the target hard disk for storage, and writes the marking data into a free partition of the target hard disk.

[0149] Step S504: performing a firmware upgrade operation on the target hard disk based on the target upgrade file and the target upgrade tool.

[0150] During specific implementation, the server performs a firmware upgrade operation on the target hard disk based on the target upgrade file and the target upgrade tool.

[0151] In some embodiments of the present application, it also includes: running reads and writes; running reads and writes is to simulate the FW refresh of the hard disk during the customer application process to verify whether it will have a significant impact on the customer's running business.

[0152] In some embodiments of the present application, the read and write operations are specifically performed by running FIO to perform read and write operations on the idle partition of the disk to be tested to simulate a business scenario.

[0153] In some embodiments of the present application, the method further includes: obtaining operation performance information of the FIO during operation, so as to generate a performance curve of the FIO during operation according to the operation performance information.

[0154] The method of this embodiment includes: determining whether a target upgrade file corresponding to an upgrade file identifier exists; if the determination result is yes, generating marking data; storing the marking data in association with a target hard disk, and writing the marking data into a free partition of the target hard disk; performing a firmware upgrade operation on the target hard disk based on the target upgrade file and a target upgrade tool, thereby pre-storing the marking data before performing a firmware upgrade operation on the target hard disk, and the pre-stored marking data is used for data verification in the hard disk, thereby providing an identifier for verifying whether a hard disk firmware upgrade will damage existing data in the hard disk, and can improve the efficiency of testing the firmware upgrade.

[0155] Step S104, checking the refresh result of the firmware upgrade operation performed on the target hard disk to obtain an upgrade test report.

[0156] In some optional embodiments, in the above step S104, the process of checking the refresh result of the firmware upgrade operation performed on the target hard disk to obtain the upgrade test report is as follows: Figure 6 As shown, this can be achieved by following the steps below:

[0157] Step S601, checking whether the firmware version of the target hard disk is consistent with the target version of the target upgrade file, and obtaining version comparison information.

[0158] Step S602 , checking whether the tag data in the target hard disk is consistent with the tag data stored in association with the target hard disk, and obtaining tag comparison information.

[0159] Step S603, obtaining an upgrade test report according to the version comparison information and the tag comparison information.

[0160] During specific implementation, the server summarizes and integrates the results of the entire test process into an upgrade test report.

[0161] In some embodiments of the present application, the upgrade test report includes a FW refresh result; the FW refresh result includes version comparison information and tag comparison information; the version comparison information represents the FW version verification result; the tag comparison information represents the disk data verification result.

[0162] In some embodiments of the present application, the test instruction also includes a loop number; the loop number is used to control the number of times the firmware upgrade test is performed.

[0163] In some embodiments of the present application, after the hard disk FW version and the disk mark data are verified, the FW cycle refresh will continue until the refresh number requirement is met. If there is an inconsistency in the FW version or the disk mark data, the corresponding error result is recorded and the test is interrupted.

[0164] The firmware upgrade test method of this embodiment obtains version comparison information by checking whether the firmware version of the target hard disk is consistent with the target version of the target upgrade file; checks whether the tag data in the target hard disk is consistent with the tag data stored in association with the target hard disk to obtain tag comparison information; obtains an upgrade test report based on the version comparison information and the tag comparison information, thereby providing a mechanism for obtaining an upgrade test report based on a refresh result, realizing verification during the firmware upgrade test process whether the hard disk firmware upgrade will damage the existing data in the hard disk, and effectively improving the efficiency of testing the firmware upgrade.

[0165] In some embodiments of the present application, the upgrade test report also includes a performance curve during the operation of FIO.

[0166] According to the method of this embodiment, the server can automatically process the FIO test results, unify the FIO result processing standards, and finally form a chart report, thereby enhancing the readability of the upgrade test report and the timeliness of the test, and effectively improving the efficiency of testing the firmware upgrade.

[0167] In some embodiments of the present application, the upgrade test report also includes hard disk test information before and after the test. The hard disk test information before and after the test may be basic information before and after the test, such as version number, etc.

[0168] In some embodiments of the present application, the test method of firmware upgrade, such as Figure 7 As shown, it also includes:

[0169] Step S701: If it is detected that the target upgrade file corresponding to the upgrade file identifier does not exist, an upgrade file alarm is issued. And / or,

[0170] Step S702: If it is detected that the firmware version of the target hard disk is inconsistent with the target version of the target upgrade file, a refresh failure alarm is issued. And / or,

[0171] Step S703: If it is detected that the marking data in the target hard disk is inconsistent with the marking data stored in association with the target hard disk, a data corruption alarm is issued.

[0172] The method provided in this embodiment performs an upgrade file alarm if it is detected that the target upgrade file corresponding to the upgrade file identifier does not exist; and / or performs a refresh failure alarm if it is detected that the firmware version of the target hard disk is inconsistent with the target version of the target upgrade file; and / or performs a data corruption alarm if it is detected that the mark data in the target hard disk is inconsistent with the mark data stored in association with the target hard disk, thereby realizing abnormal alarms in the firmware upgrade test process and improving the efficiency of testing the firmware upgrade.

[0173] In some embodiments of the present application, if an abnormal alarm occurs during the test, such as missing FW file, hard disk FW refresh failure, or disk data corruption, the alarm information is synchronously recorded and output to the upgrade test report.

[0174] In some embodiments of the present application, the upgrade test report may also include the change in hard disk read and write performance over time during the hard disk FW refresh process. The server counts and records the performance degradation time during the FW refresh to determine whether the performance degradation time will affect user use.

[0175] The firmware upgrade test method provided in the embodiment of the present application responds to the test instruction of the firmware upgrade of the target hard disk and obtains the type information of the target hard disk; the type information represents the type of the hard disk; the test instruction includes an upgrade file identifier; according to the type information and the correspondence between the preset hard disk type and the upgrade tool, the target upgrade tool for the firmware upgrade of the target hard disk is determined; if it is detected that the target upgrade file corresponding to the upgrade file identifier exists, the firmware upgrade operation is performed on the target hard disk based on the target upgrade file and the target upgrade tool; the refresh result of the firmware upgrade operation performed on the target hard disk is checked to obtain an upgrade test report, which can automatically configure the firmware upgrade method and check the refresh result of the firmware upgrade operation, save labor costs, and reduce the time-consuming test of the firmware upgrade, which can effectively improve the efficiency of testing the firmware upgrade.

[0176] Based on the same inventive concept, a firmware upgrade test device is also provided in the embodiment of the present application. Since the device is a device corresponding to the firmware upgrade test method provided in the embodiment of the present application, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation of the above method, and the repeated parts will not be repeated.

[0177] Figure 8 A schematic diagram of the structure of a firmware upgrade test device provided in an embodiment of the present application is shown. Figure 8 As shown, the firmware upgrade testing device includes an information acquisition module 801 , a tool determination module 802 , an upgrade control module 803 and an upgrade detection module 804 .

[0178] The information acquisition module 801 is used to respond to the test instruction of the firmware upgrade of the target hard disk and obtain the type information of the target hard disk; the type information represents the type of the hard disk; the test instruction includes the upgrade file identifier;

[0179] The tool determination module 802 is used to determine the target upgrade tool for the target hard disk to perform the firmware upgrade according to the type information and the correspondence between the preset hard disk type and the upgrade tool;

[0180] The upgrade control module 803 is used to perform a firmware upgrade operation on the target hard disk based on the target upgrade file and the target upgrade tool if it is detected that the target upgrade file corresponding to the upgrade file identifier exists;

[0181] The upgrade detection module 804 is used to check the refresh result of the firmware upgrade operation performed on the target hard disk and obtain an upgrade test report.

[0182] In an optional embodiment, the information acquisition module 801 is specifically used to:

[0183] Get the drive letter of the target hard disk, and get the SMART information of the target hard disk;

[0184] Determine the type of the target hard disk based on the drive letter and SMART information.

[0185] In an optional embodiment, the type information includes a first hard disk type, a second hard disk type, and a third hard disk type; the first hard disk type indicates that the hard disk is an NVMe hard disk; the second hard disk type indicates that the hard disk is a SATA / SAS hard disk and is provided with a controller; the third hard disk type indicates that the hard disk is a SATA / SAS hard disk and is not provided with a controller; the information acquisition module 801 is specifically used to:

[0186] According to the drive letter, determine the drive letter type of the target hard disk;

[0187] If the drive letter type is nvmeXn1 type drive letter, the type information of the target hard disk is the first hard disk type;

[0188] If the drive letter type is not nvmeXn1, the controller identification information of the target hard disk is generated according to the SMART information;

[0189] If the controller identification information is not a null value, the type information of the target hard disk is the second hard disk type;

[0190] If the controller identification information is a null value, the type information of the target hard disk is the third hard disk type.

[0191] In an optional embodiment, the tool determination module 802 is specifically configured to:

[0192] If the type information is the first hard disk type, determining based on the corresponding relationship that the target upgrade tool for the target hard disk to perform firmware upgrade is the nvme-cli tool;

[0193] If the type information is the second hard disk type, determining based on the corresponding relationship that the target upgrade tool for the firmware upgrade of the target hard disk is the controller management tool;

[0194] If the type information is the third hard disk type, the target upgrade tool for performing firmware upgrade on the target hard disk is determined to be the Hdparm tool based on the corresponding relationship.

[0195] In an optional embodiment, the upgrade control module 803 is specifically configured to:

[0196] Determine whether the target upgrade file corresponding to the upgrade file identifier exists;

[0197] If the result of the judgment is yes, then generate the marked data;

[0198] The marked data is stored in association with the target hard disk, and the marked data is written into a free partition of the target hard disk;

[0199] Based on the target upgrade file and the target upgrade tool, perform a firmware upgrade operation on the target hard disk.

[0200] In an optional embodiment, the upgrade detection module 804 is specifically configured to:

[0201] Check whether the firmware version of the target hard disk is consistent with the target version of the target upgrade file, and obtain version comparison information;

[0202] Check whether the tag data in the target hard disk is consistent with the tag data stored in association with the target hard disk, and obtain tag comparison information;

[0203] An upgrade test report is obtained based on the version comparison information and the tag comparison information.

[0204] In an optional embodiment, if Fig. 9 As shown, the device further includes an abnormal alarm module 901; the abnormal alarm module 901 is specifically used to:

[0205] If it is detected that the target upgrade file corresponding to the upgrade file identifier does not exist, an upgrade file alarm is issued; and / or,

[0206] If it is detected that the firmware version of the target hard disk is inconsistent with the target version of the target upgrade file, a refresh failure alarm is issued; and / or,

[0207] If it is detected that the tag data in the target hard disk is inconsistent with the tag data stored in association with the target hard disk, a data corruption alarm is issued.

[0208] Based on the same inventive concept as the above method embodiment, an electronic device is also provided in the embodiment of the present application. The electronic device can be used for testing firmware upgrades. In one embodiment, the electronic device can be a server. In this embodiment, the structure of the electronic device can be as follows: Fig.10 As shown, it includes a memory 1001 , a communication module 1003 and one or more processors 1002 .

[0209] The memory 1001 is used to store computer programs executed by the processor 1002. The memory 1001 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.

[0210] The memory 1001 may be a volatile memory, such as a random-access memory (RAM); the memory 1001 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 1001 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1001 may be a combination of the above memories.

[0211] The processor 1002 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 1002 is used to implement the above-mentioned firmware upgrade test method when calling the computer program stored in the memory 1001 .

[0212] The communication module 1003 is used to communicate with electronic devices and other terminals or servers.

[0213] The specific connection medium between the memory 1001, the communication module 1003 and the processor 1002 is not limited in the embodiment of the present application. Fig.10 In the embodiment, the memory 1001 and the processor 1002 are connected via a bus 1004. The bus 1004 is connected to the processor 1002 via a bus 1004. Fig.10 The connections between other components are shown in bold lines, which are only for illustration and are not intended to be limiting. Bus 1004 can be divided into address bus, data bus, control bus, etc. For ease of illustration, Fig.10Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0214] According to one aspect of the present application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the computer device executes the test method for firmware upgrade in the above embodiment. The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0215] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A firmware upgrade testing method, characterized in that: The method comprises: In response to a test instruction for upgrading the firmware of a target hard disk, the type information of the target hard disk is acquired; the type information represents the type of the hard disk; the test instruction includes an upgrade file identifier; Determining a target upgrade tool for performing firmware upgrade on the target hard disk according to the type information and a preset correspondence between the hard disk type and the upgrade tool; If it is detected that the target upgrade file corresponding to the upgrade file identifier exists, then based on the target upgrade file and the target upgrade tool, a firmware upgrade operation is performed on the target hard disk; Check the refresh result of the firmware upgrade operation performed on the target hard disk to obtain an upgrade test report.

2. The method according to claim 1, characterized in that The obtaining the type information of the target hard disk includes: Obtain the drive letter of the target hard disk, and obtain the SMART information of the target hard disk; The type information of the target hard disk is determined according to the drive letter and the SMART information.

3. The method according to claim 2, characterized in that The type information includes a first hard disk type, a second hard disk type, and a third hard disk type; the first hard disk type indicates that the hard disk is an NVMe hard disk; the second hard disk type indicates that the hard disk is a SATA / SAS hard disk and is provided with a controller; the third hard disk type indicates that the hard disk is a SATA / SAS hard disk and is not provided with a controller; The step of determining the type information of the target hard disk according to the drive letter and the SMART information includes: Determine the drive letter type of the target hard disk according to the drive letter; If the drive letter type is an nvmeXn1 type drive letter, the type information of the target hard disk is the first hard disk type; If the drive letter type is not an nvmeXn1 type drive letter, generating controller identification information of the target hard disk according to the SMART information; If the controller identification information is not a null value, the type information of the target hard disk is the second hard disk type; If the controller identification information is a null value, the type information of the target hard disk is the third hard disk type.

4. The method according to claim 3, characterized in that The step of determining a target upgrade tool for performing firmware upgrade on the target hard disk according to the type information and a correspondence between a preset hard disk type and an upgrade tool comprises: If the type information is the first hard disk type, determining based on the corresponding relationship that a target upgrade tool for performing firmware upgrade on the target hard disk is an nvme-cli tool; If the type information is the second hard disk type, determining based on the corresponding relationship that a target upgrade tool for performing firmware upgrade on the target hard disk is a controller management tool; If the type information is the third hard disk type, it is determined based on the corresponding relationship that the target upgrade tool for performing firmware upgrade on the target hard disk is the Hdparm tool.

5. The method according to claim 1, characterized in that: If it is detected that the target upgrade file corresponding to the upgrade file identifier exists, then based on the target upgrade file and the target upgrade tool, a firmware upgrade operation is performed on the target hard disk, including: Determine whether the target upgrade file corresponding to the upgrade file identifier exists; If the result of the judgment is yes, generating marking data; The marking data is stored in association with the target hard disk, and the marking data is written into a free partition of the target hard disk; Based on the target upgrade file and the target upgrade tool, a firmware upgrade operation is performed on the target hard disk.

6. The method according to claim 5, characterized in that The checking of the refresh result of the firmware upgrade operation performed on the target hard disk to obtain an upgrade test report includes: Check whether the firmware version of the target hard disk is consistent with the target version of the target upgrade file, and obtain version comparison information; Check whether the tag data in the target hard disk is consistent with the tag data stored in association with the target hard disk, and obtain tag comparison information; An upgrade test report is obtained according to the version comparison information and the tag comparison information.

7. The method according to claim 6, characterized in that The method further comprises: If it is detected that the target upgrade file corresponding to the upgrade file identifier does not exist, an upgrade file alarm is issued; and / or, If it is detected that the firmware version of the target hard disk is inconsistent with the target version of the target upgrade file, a refresh failure alarm is issued; and / or, If it is detected that the marking data in the target hard disk is inconsistent with the marking data stored in association with the target hard disk, a data corruption alarm is issued.

8. A firmware upgrade test device, characterized in that: The device comprises: An information acquisition module, used to respond to a test instruction for upgrading the firmware of a target hard disk and acquire type information of the target hard disk; the type information represents the type of the hard disk; the test instruction includes an upgrade file identifier; A tool determination module, used to determine a target upgrade tool for performing firmware upgrade on the target hard disk according to the type information and a preset correspondence between the hard disk type and the upgrade tool; An upgrade control module, configured to perform a firmware upgrade operation on the target hard disk based on the target upgrade file and the target upgrade tool if it is detected that the target upgrade file corresponding to the upgrade file identifier exists; The upgrade detection module is used to check the refresh result of the firmware upgrade operation performed on the target hard disk and obtain an upgrade test report.

9. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the computer program is executed by the processor, the method according to any one of claims 1 to 7 is implemented.