Firmware refresh method, device, equipment and storage medium

By using the firmware of another Switch chip to restore the Switch chip when the Switch chip firmware fails to refresh, the effective working problem of the Switch chip after the refresh failure is solved, and fast and stable recovery is achieved, avoiding additional hardware costs.

CN120276755BActive Publication Date: 2025-08-22INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510727190.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-08-22
Estimated Expiration
2045-06-03

AI Technical Summary

Technical Problem

During the server operation and maintenance process, after problems occur in the firmware refresh of the Switch chip, how to ensure that the Switch chip can work effectively has not been effectively solved by the existing technology.

Method used

Provides a firmware refresh method, which uses the firmware of another Switch chip's firmware to restore it by detecting that the firmware refresh failed, ensuring normal operation is restored under constant power.

Benefits of technology

When the Switch chip firmware refresh fails, the firmware restore of another Switch chip is ensured to restore the chip function normally, avoiding additional hardware costs, and achieving fast and stable recovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120276755B_ABST
    Figure CN120276755B_ABST
Patent Text Reader

Abstract

The present application discloses a firmware refresh method, apparatus, device, and storage medium, relating to the technical field of firmware update. According to the method, when refreshing the firmware of a GPU of a dual-switch chip, if the firmware refresh of one switch chip fails, the firmware of the switch chip whose firmware refresh failed is restored through the firmware of the other switch chip without powering off, so that the function of the switch chip whose firmware refresh failed is restored to normal. In this way, the switch chip can be guaranteed to work effectively after a problem occurs in the firmware refresh of the switch chip.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of firmware update technology, and in particular to a firmware refresh method, apparatus, device, and storage medium. Background Art

[0002] A graphics processing unit (GPU) is a hardware device specifically designed to handle graphics and image-related computing tasks. The switch chip on the GPU board is responsible for establishing high-speed data channels between the GPU and other components (such as memory and the CPU). A stable switch chip ensures data transmission at a stable rate and low latency, allowing the GPU to obtain the required data for calculations and quickly provide feedback. A stable switch chip is crucial for tasks with extremely high data transmission requirements, such as graphics rendering and deep learning. GPUs with dual switch chips have various topologies, and each topology requires different firmware (FW) versions for the switch chip. When problems arise with the switch chip firmware update during server maintenance, ensuring the effective operation of the switch chip has become a pressing technical challenge for those skilled in the art. Summary of the Invention

[0003] The present application provides a firmware refresh method, apparatus, device, and storage medium to ensure that a Switch chip can work effectively after a problem occurs during the firmware refresh of the Switch chip.

[0004] This application provides a firmware update method, including:

[0005] Refresh the firmware of the first switch;

[0006] Detecting whether the firmware of the first switch is updated successfully;

[0007] If the firmware update of the first switch fails, sending a restore instruction to the first switch, and using the firmware of the second switch to restore the firmware of the first switch;

[0008] Refreshing the firmware of the second switch;

[0009] detecting whether the firmware of the second switch is updated successfully;

[0010] If the firmware update of the second switch fails, a restoration instruction is sent to the second switch, and the firmware of the first switch is used to restore the firmware of the second switch.

[0011] The present application also provides a firmware refresh device, comprising:

[0012] A first refreshing module, configured to refresh the firmware of the first switch;

[0013] A first detection module, configured to detect whether the firmware of the first switch is successfully updated;

[0014] a first restoration module, configured to send a restoration instruction to the first switch if the firmware of the first switch fails to be updated, and restore the firmware of the first switch using the firmware of the second switch;

[0015] a second refreshing module, configured to refresh the firmware of the second switch;

[0016] A second detection module, configured to detect whether the firmware of the second switch is successfully updated;

[0017] The second restoration module is configured to send a restoration instruction to the second switch if the firmware update of the second switch fails, and restore the firmware of the second switch using the firmware of the first switch.

[0018] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned firmware refresh methods when executing the computer program.

[0019] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned firmware refresh methods are implemented.

[0020] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned firmware refresh methods when executed by a processor.

[0021] When this application performs a firmware refresh on the GPUs of dual Switch chips, if the firmware refresh of one Switch chip fails, the firmware of the Switch chip with the failed firmware refresh can be restored through the firmware of the other Switch chip without powering off, so that the function of the Switch chip with the failed firmware refresh can be restored to normal. In this way, the Switch chip can be guaranteed to work effectively after problems occur in the firmware refresh of the Switch chip. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. 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 any creative work.

[0023] Figure 1 A flowchart of a firmware refresh method provided in an embodiment of the present application;

[0024] Figure 2 A schematic diagram of a Balance topology provided in an embodiment of the present application;

[0025] Figure 3 A schematic diagram of a Common topology provided in an embodiment of the present application;

[0026] Figure 4 A schematic diagram of a Cascade topology provided in an embodiment of the present application;

[0027] Figure 5 A schematic diagram of a specific firmware refresh process provided in an embodiment of the present application;

[0028] Figure 6 A schematic diagram of a link provided in an embodiment of the present application;

[0029] Figure 7 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0031] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0032] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0033] The embodiment of the present application provides a firmware refresh method, and the method is described in detail below in conjunction with the execution process of the firmware refresh method. Figure 1 As shown, the firmware refresh method includes:

[0034] S101: Refresh the firmware of the first switch;

[0035] S102: Detect whether the firmware of the first switch is updated successfully;

[0036] S103: If the firmware update of the first switch fails, sending a restore instruction to the first switch, and using the firmware of the second switch to restore the firmware of the first switch;

[0037] S104: Refresh the firmware of the second switch;

[0038] S105: Detect whether the firmware of the second switch is updated successfully;

[0039] S106: If the firmware update of the second switch fails, a restore instruction is sent to the second switch, and the firmware of the first switch is used to restore the firmware of the second switch.

[0040] For GPU boards with multiple switch chips, confirm the GPU board's topology information, topology ID, and firmware version, and save the switch chip configuration file in the format: Chip Number_GPU Topology_Topology ID_FW Version.

[0041] The correspondence between GPU topology, topology ID, and FW version can be found in Table 1:

[0042] Table 1

[0043]

[0044] Flash the new firmware to the first switch chip, i.e., the first switch. After the flash is complete, confirm the firmware version information and operating status of the first switch to determine whether the firmware of the first switch was successfully flashed. If the firmware version information and operating status are normal, the firmware flash is considered successful. If the firmware version information or configuration file is abnormal, the firmware flash is considered unsuccessful. If the flash fails, a restore command is issued to the first switch via the second switch chip, i.e., the second switch, and the old firmware of the second switch is used to restore the firmware of the first switch. If the firmware of the first switch is successfully flashed, the new firmware image file and corresponding configuration file are retained.

[0045] In some embodiments, sending a restore instruction to the first switch and restoring the firmware of the first switch using the firmware of the second switch includes:

[0046] If the topology of the image processor is a balanced topology, the first processor notifies the second processor of the failure to update the first switch firmware, and the second processor notifies the second switch of the failure to update the first switch firmware, so that the second switch issues a restore instruction to the first switch. The second switch transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to a corresponding configuration file. In the balanced topology, the first processor is connected to the first switch and the second processor, the second processor is connected to the second switch, and the first switch is connected to the second switch.

[0047] If the image processor topology is a universal topology, the first processor notifies the second switch that the firmware update of the first switch has failed, causing the second switch to issue a restore instruction to the first switch. The second switch then transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to the corresponding configuration file. In the universal topology, the first processor is connected to the first switch, the second switch, and the second processor, respectively, and the first switch is connected to the second switch.

[0048] If the image processor topology is a cascade topology, the first processor notifies the second switch via the first switch that the firmware update of the first switch has failed, causing the second switch to issue a restore instruction to the first switch. The second switch then transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to a corresponding configuration file. In the cascade topology, the first processor is connected to the first switch and the second processor, respectively, and the first switch is connected to the second switch.

[0049] refer to Figure 2 As shown, Figure 2 The figure shows a balanced topology. SW0 is the first switch, and SW1 is the second switch. CPU0 is the first processor, and CPU1 is the second processor. When the image processor topology is balanced, the first processor detects that the firmware update for the first switch has failed. The first processor notifies the second processor of the failure, which in turn notifies the second switch. The second switch then issues a restore command to the first switch, which transfers the old firmware image file to the first switch and restores the firmware based on the corresponding configuration file.

[0050] refer to Figure 3 As shown, Figure 3The figure shows a common topology. When the image processor uses the common topology, the first processor detects a firmware update failure on the first switch and notifies the second switch of the failure. The second switch then issues a restore command to the first switch. The second switch then transfers its old firmware image file to the first switch and restores the first switch's firmware according to the corresponding configuration file.

[0051] refer to Figure 4 As shown, Figure 4 This is a cascade topology. When the image processor topology is a cascade topology, the first processor detects a firmware refresh failure on the first switch. The first processor notifies the second switch of the firmware refresh failure via the first switch. The second switch issues a restore instruction to the first switch. The second switch transfers the second switch's firmware image file to the first switch and restores the first switch's firmware according to the corresponding configuration file.

[0052] This embodiment executes a corresponding firmware restoration process according to the topology of the image processor, which can better adapt to the topology of the image processor and meet the topology requirements of the image processor.

[0053] Flash the new firmware to the second switch chip (i.e., the second switch). After the flash is complete, determine whether the second switch's firmware was successfully flashed by checking the second switch's firmware version information, operating status, and other information. If the flash fails, a restore command is issued to the first switch through the first switch chip (i.e., the first switch), and the second switch's firmware is restored using the first switch's old firmware. If the second switch's firmware is successfully flashed, the new firmware image file and corresponding configuration file are retained.

[0054] In some embodiments, sending a restore instruction to the second switch and restoring the firmware of the second switch using the firmware of the first switch includes:

[0055] If the topology of the image processor is a balanced topology, the second processor notifies the first processor of a firmware update failure for the second switch, and the first processor notifies the first switch of the firmware update failure for the second switch, so that the first switch issues a restore instruction to the second switch. The first switch transfers the firmware image file of the first switch to the second switch and restores the firmware of the second switch according to a corresponding configuration file. In the balanced topology, the first processor is connected to the first switch and the second processor, the second processor is connected to the second switch, and the first switch is connected to the second switch.

[0056] If the image processor topology is a universal topology, the first processor notifies the first switch of a firmware update failure for the second switch, causing the first switch to issue a restore instruction to the second switch. The first switch transfers the firmware image file of the first switch to the second switch and restores the firmware of the second switch according to a corresponding configuration file. In the universal topology, the first processor is connected to the first switch, the second switch, and the second processor, respectively, and the first switch is connected to the second switch.

[0057] If the image processor topology is a cascade topology, the first processor notifies the first switch that the firmware update of the second switch has failed, causing the first switch to issue a restore instruction to the second switch. The first switch transfers the firmware image file of the first switch to the second switch and restores the firmware of the second switch according to a corresponding configuration file. In the cascade topology, the first processor is connected to the first switch and the second processor respectively, and the first switch is connected to the second switch.

[0058] refer to Figure 2 As shown, when the image processor topology is balanced, the second processor detects that the firmware update of the second switch has failed. The second processor notifies the first processor of the firmware update failure of the second switch. The first processor then notifies the first switch of the firmware update failure of the second switch. The first switch issues a restore instruction to the second switch. The first switch transfers the old firmware image file of the first switch to the second switch and restores the firmware of the second switch according to the corresponding configuration file.

[0059] refer to Figure 3 As shown, when the topology of the image processor is a universal topology, the first processor detects that the firmware refresh of the second switch has failed. The first processor notifies the first switch of the firmware refresh failure of the second switch. The first switch issues a restore instruction to the second switch. The first switch transfers the old firmware image file of the first switch to the second switch and restores the firmware of the second switch according to the corresponding configuration file.

[0060] refer to Figure 4 As shown, when the topology of the image processor is a cascade topology, the first processor detects that the firmware refresh of the second switch has failed. The first processor notifies the first switch of the firmware refresh failure of the second switch. The first switch issues a restore instruction to the second switch. The first switch transfers the firmware image file of the first switch to the second switch and restores the firmware of the second switch according to the corresponding configuration file.

[0061] This embodiment executes a corresponding firmware restoration process according to the topology of the image processor, which can better adapt to the topology of the image processor and meet the topology requirements of the image processor.

[0062] In some embodiments, it further includes:

[0063] detecting whether the firmware of the first switch is restored successfully;

[0064] If the firmware of the first switch is restored successfully, outputting restoration success and retaining the target indicator;

[0065] If the firmware restoration of the first switch fails, a restoration failure is output, a restoration instruction is sent to the first switch again, and the firmware of the second switch is used to restore the firmware of the first switch again; or, the firmware of the first switch is refreshed again; or, an alarm is issued to prompt manual intervention.

[0066] If the firmware restoration of the first switch is successful, a refresh success is output, and target metrics are retained for monitoring and evaluation. Target metrics may include automatic recovery time, success rate, and data integrity. Automatic recovery time can be the time from triggering the restore operation to successful restoration. If the firmware restoration of the first switch fails, a refresh failure is output, and the firmware restoration may be repeated; alternatively, the first switch may be reflashed with new firmware; or an alarm may be issued to prompt human intervention.

[0067] In some embodiments, it further includes:

[0068] If the firmware of the first switch is restored successfully, the firmware of the first switch is refreshed again.

[0069] If the firmware of the first switch is restored successfully, after confirming that the firmware version information and operating status of the first switch are normal, the new firmware is refreshed on the first switch to upgrade the firmware of the first switch.

[0070] In some embodiments, it further includes:

[0071] detecting whether the firmware of the second switch is restored successfully;

[0072] If the firmware of the second switch is restored successfully, outputting restoration success and retaining the target indicator;

[0073] If the firmware restoration of the second switch fails, a restoration failure is output, a restoration instruction is sent to the second switch again, and the firmware of the second switch is restored again using the firmware of the first switch; or, the firmware of the second switch is refreshed again; or, an alarm is issued to prompt manual intervention.

[0074] If the firmware restoration of the second switch is successful, a refresh success is output, and target metrics are retained for monitoring and evaluation. Target metrics may include automatic recovery time, success rate, and data integrity. Automatic recovery time can be the time from triggering the restore operation to successful restoration. If the firmware restoration of the second switch fails, a refresh failure is output, and the firmware restoration may be repeated; alternatively, the second switch may be reflashed with new firmware; or an alarm may be issued to prompt human intervention.

[0075] In some embodiments, it further includes:

[0076] If the firmware of the second switch is restored successfully, the firmware of the second switch is refreshed again.

[0077] If the firmware of the second switch is restored successfully, after confirming that the firmware version information and operating status of the second switch are normal, the new firmware is refreshed on the second switch to upgrade the firmware of the second switch.

[0078] In some embodiments, it further includes:

[0079] Simulate multiple scenarios in which firmware refresh fails, and detect whether the first switch and the second switch can successfully restore the firmware in each scenario.

[0080] To verify the effectiveness of firmware updates and address various issues during operation and maintenance, various scenarios of firmware update failure or firmware abnormalities during operation and maintenance are preset, such as hardware failure, firmware file corruption, and configuration errors. This verifies whether the Switch chip can be successfully restored. This ensures that the Switch chip can quickly and stably return to normal working status, avoiding any impact on business.

[0081] For example, multiple scenarios in which the firmware update of the first switch fails are simulated to verify whether the second switch can successfully restore the first switch.

[0082] Combine Figure 5 As shown, a specific implementation is described below:

[0083] After powering on the server, check the firmware version information and operating status of the two switch chips (Switch chip 1 and Switch chip 2). Confirm that they are operating normally and retain the firmware image files (F1_A and F2_A) and related configuration files (S1_A and S2_A). F1_A is the firmware image file for Switch chip 1, F2_A is the firmware image file for Switch chip 2, S1_A is the configuration file for Switch chip 1, and S2_A is the configuration file for Switch chip 2.

[0084] Use a tool in the operating system (OS) to flash the firmware of Switch chip 1. After the flash is complete, check the firmware version information and operating status of Switch chip 1. If the firmware version information and operating status are normal, the flash is successful and the new firmware image file F1_B and related configuration file S1_B are retained. If the firmware version information and configuration file are abnormal, the flash is failed and a restore operation is initiated: 1. Switch chip 2 issues a restore command to trigger the firmware restore operation. Switch chip 2 transfers the stored correct firmware image file to Switch chip 1. The firmware is restored according to configuration file S1_A, and the transfer progress and configuration status are monitored in real time to confirm the integrity and accuracy of the entire restore process. After the restore is complete, if the firmware version information and operating status are abnormal, the flash is failed and the restore operation is initiated again. After the restore is complete, if the firmware version information and operating status are normal, the flash is successful. Metrics such as the automatic recovery time, success rate, and data integrity are retained for monitoring and evaluation.

[0085] Use a tool in the OS to update the firmware of Switch chip 2. After the update is complete, check the firmware version information and operating status of Switch chip 2. If the firmware version information and operating status are normal, the update is successful and the new firmware image file F2_B and related configuration file S2_B are retained. If the firmware version information and configuration file are abnormal, the update fails and the restore operation is initiated.

[0086] Simulate chip refresh failure scenarios, such as network failure, FW file corruption, configuration errors, and high-temperature damage, to verify whether Switch chip 2 can be successfully restored. This ensures that all Switch chips can quickly and stably return to normal working conditions.

[0087] Among them, reference Figure 6 As shown in the figure, a PCIE (Peripheral Component Interconnect Express) link can be used between the CPU and the Switch chip.

[0088] This application allows for firmware updates for GPUs with dual switch chips. If one switch chip fails to update, the firmware of the other switch chip can be restored without powering off, restoring the firmware of the switch chip that failed to update. This ensures that the switch chip can function effectively even if problems arise with the switch chip's firmware update. This application also reduces costs by eliminating the need for additional hardware. It enables centralized monitoring and management of switch chips in servers such as clusters or large data centers, providing convenience, speed, and efficiency.

[0089] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0090] An embodiment of the present application further provides a firmware refresh device, the device comprising:

[0091] A first refreshing module, configured to refresh the firmware of the first switch;

[0092] A first detection module, configured to detect whether the firmware of the first switch is successfully updated;

[0093] a first restoration module, configured to send a restoration instruction to the first switch if the firmware of the first switch fails to be updated, and restore the firmware of the first switch using the firmware of the second switch;

[0094] a second refreshing module, configured to refresh the firmware of the second switch;

[0095] A second detection module, configured to detect whether the firmware of the second switch is successfully updated;

[0096] The second restoration module is configured to send a restoration instruction to the second switch if the firmware update of the second switch fails, and restore the firmware of the second switch using the firmware of the first switch.

[0097] Based on the above embodiment, as a specific implementation method, the following is also included:

[0098] a third detection module, configured to detect whether the firmware of the first switch is restored successfully;

[0099] a first output module, configured to output restoration success and retain target indicators if the firmware of the first switch is restored successfully;

[0100] The second output module is configured to output a restoration failure if the firmware restoration of the first switch fails, send a restoration instruction to the first switch again, and restore the firmware of the first switch using the firmware of the second switch again; or, refresh the firmware of the first switch again; or, issue an alarm to prompt manual intervention.

[0101] Based on the above embodiment, as a specific implementation method, the following is also included:

[0102] The re-refresh module is configured to re-refresh the firmware of the first switch if the firmware of the first switch is restored successfully.

[0103] Based on the above embodiment, as a specific implementation method, the following is also included:

[0104] The simulation module is used to simulate multiple scenarios in which the firmware update of the first switch fails, and detect whether the second switch can successfully restore the firmware of the first switch in each scenario.

[0105] Based on the above embodiment, as a specific implementation method, the following is also included:

[0106] a fourth detection module, configured to detect whether the firmware of the second switch is restored successfully;

[0107] a third output module, configured to output a restoration success and retain the target indicator if the firmware of the second switch is restored successfully;

[0108] The fourth output module is configured to output a restoration failure if the firmware restoration of the second switch fails, send a restoration instruction to the second switch again, and restore the firmware of the second switch using the firmware of the first switch again; or, refresh the firmware of the second switch again; or, issue an alarm to prompt manual intervention.

[0109] Based on the above embodiment, as a specific implementation method, the following is also included:

[0110] a first retaining module, configured to retain a new firmware image file and a corresponding configuration file if the firmware of the first switch is successfully updated;

[0111] The second retaining module is configured to retain the new firmware image file and the corresponding configuration file if the firmware of the second switch is successfully updated.

[0112] Based on the above embodiment, as a specific implementation method, the first restoration module is used to:

[0113] If the topology of the image processor is a balanced topology, the first processor notifies the second processor of the failure to update the first switch firmware, and the second processor notifies the second switch of the failure to update the first switch firmware, so that the second switch issues a restore instruction to the first switch. The second switch transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to a corresponding configuration file. In the balanced topology, the first processor is connected to the first switch and the second processor, the second processor is connected to the second switch, and the first switch is connected to the second switch.

[0114] If the image processor topology is a universal topology, the first processor notifies the second switch that the firmware update of the first switch has failed, causing the second switch to issue a restore instruction to the first switch. The second switch then transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to the corresponding configuration file. In the universal topology, the first processor is connected to the first switch, the second switch, and the second processor, respectively, and the first switch is connected to the second switch.

[0115] If the image processor topology is a cascade topology, the first processor notifies the second switch via the first switch that the firmware update of the first switch has failed, causing the second switch to issue a restore instruction to the first switch. The second switch then transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to a corresponding configuration file. In the cascade topology, the first processor is connected to the first switch and the second processor, respectively, and the first switch is connected to the second switch.

[0116] For the description of the features in the embodiment corresponding to the firmware refresh device, reference can be made to the relevant description of the embodiment corresponding to the firmware refresh method, which will not be repeated here.

[0117] The embodiment of the present application also provides an electronic device, referring to Figure 7 As shown, the electronic device includes a memory 1 and a processor 2, wherein the memory 1 stores a computer program, and the processor 2 is configured to run the computer program to execute the steps in any of the above firmware refresh method embodiments.

[0118] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned firmware refresh method embodiments when running.

[0119] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0120] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned firmware refresh method embodiments are implemented.

[0121] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned firmware refresh method embodiments are implemented.

[0122] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0123] The above is a detailed introduction to the firmware refresh method, device, equipment and storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.

Claims

1. A firmware refresh method, characterized in that: include: Refresh the firmware of the first switch; Detecting whether the firmware of the first switch is updated successfully; If the firmware update of the first switch fails, sending a restore instruction to the first switch, and using the firmware of the second switch to restore the firmware of the first switch; Refreshing the firmware of the second switch; detecting whether the firmware of the second switch is updated successfully; If the firmware update of the second switch fails, sending a restore instruction to the second switch, and restoring the firmware of the second switch using the firmware of the first switch; Various scenarios of firmware refresh failure and firmware abnormality during operation and maintenance are preset, and the first switch and the second switch are tested to see whether they can successfully restore the firmware in each scenario; Sending a restoration instruction to the first switch and restoring the firmware of the first switch using the firmware of the second switch includes: If the topology of the image processor is a balanced topology, the first processor notifies the second processor of the failure to update the first switch firmware, and the second processor notifies the second switch of the failure to update the first switch firmware, so that the second switch issues a restore instruction to the first switch. The second switch transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to a corresponding configuration file. In the balanced topology, the first processor is connected to the first switch and the second processor, the second processor is connected to the second switch, and the first switch is connected to the second switch. If the image processor topology is a universal topology, the first processor notifies the second switch that the firmware update of the first switch has failed, causing the second switch to issue a restore instruction to the first switch. The second switch then transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to the corresponding configuration file. In the universal topology, the first processor is connected to the first switch, the second switch, and the second processor, respectively, and the first switch is connected to the second switch. If the image processor topology is a cascade topology, the first processor notifies the second switch via the first switch that the firmware update of the first switch has failed, causing the second switch to issue a restore instruction to the first switch. The second switch then transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to a corresponding configuration file. In the cascade topology, the first processor is connected to the first switch and the second processor, respectively, and the first switch is connected to the second switch.

2. The firmware updating method according to claim 1, wherein: Also includes: detecting whether the firmware of the first switch is restored successfully; If the firmware of the first switch is restored successfully, outputting restoration success and retaining the target indicator; If the firmware restoration of the first switch fails, outputting a restoration failure, sending a restoration instruction to the first switch again, and restoring the firmware of the first switch again using the firmware of the second switch; Alternatively, the firmware of the first switch is refreshed; or an alarm is issued to prompt manual intervention.

3. The firmware updating method according to claim 2, wherein: Also includes: If the firmware of the first switch is restored successfully, the firmware of the first switch is refreshed again.

4. The firmware updating method according to claim 1, wherein: Also includes: detecting whether the firmware of the second switch is restored successfully; If the firmware of the second switch is restored successfully, outputting restoration success and retaining the target indicator; If the firmware restoration of the second switch fails, outputting restoration failure, sending a restoration instruction to the second switch again, and restoring the firmware of the second switch using the firmware of the first switch again; Alternatively, the firmware of the second switch is refreshed; or an alarm is issued to prompt manual intervention.

5. The firmware updating method according to claim 1, wherein: Also includes: If the firmware of the first switch is updated successfully, the new firmware image file and the corresponding configuration file are retained; If the firmware of the second switch is updated successfully, the new firmware image file and the corresponding configuration file are retained.

6. A firmware refresh device, characterized in that: The steps for implementing the firmware flashing method according to claim 1 include: A first refreshing module, configured to refresh the firmware of the first switch; A first detection module, configured to detect whether the firmware of the first switch is successfully updated; a first restoration module, configured to send a restoration instruction to the first switch if the firmware of the first switch fails to be updated, and restore the firmware of the first switch using the firmware of the second switch; a second refreshing module, configured to refresh the firmware of the second switch; A second detection module, configured to detect whether the firmware of the second switch is successfully updated; The second restoration module is configured to send a restoration instruction to the second switch if the firmware update of the second switch fails, and restore the firmware of the second switch using the firmware of the first switch.

7. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the firmware refresh method according to any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the firmware refresh method according to any one of claims 1 to 5 when executed by a processor.

Citation Information

Patent Citations

  • Updating system and updating method for mobile terminal NFC chip firmware

    CN104618888A