KVM equipment batch upgrade method, device and electronic equipment

By replacing the server with the KVM master device, batch upgrade messages are sent to realize the automated upgrade of KVM slave devices, solving the problem of batch upgrade of KVM devices in large conference rooms or command centers, and improving upgrade efficiency and fault tolerance.

CN115766439BActive Publication Date: 2025-05-02ZHEJIANG UNIVIEW TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211001368.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-19
Publication Date
2025-05-02
Estimated Expiration
2042-08-19

AI Technical Summary

Technical Problem

There are batch upgrade problems of many KVM equipment in large conference rooms or command centers. The existing technology relies on external equipment, occupies server resources, has low upgrade error tolerance, and is prone to leakage and error increase problems.

Method used

The KVM master device replaces the server and sends batch upgrade messages. After the KVM slave device receives the message, it imports the upgrade firmware from the remote TFTP server for the initial upgrade. If the initial upgrade fails, imports the firmware from the KVM master device for the secondary upgrade.

Benefits of technology

It reduces the usage of server resources, improves upgrade efficiency, improves the fault tolerance rate of upgrades, and avoids the problem of errors and leaks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115766439B_ABST
    Figure CN115766439B_ABST
Patent Text Reader

Abstract

The present invention provides a KVM device batch upgrade method, device and electronic device, which relates to the field of network communication technology. The method comprises: applying to a switch KVM slave device, receiving a batch upgrade message sent by a KVM master device, and determining identification information of at least one upgrade firmware based on the batch upgrade message; based on the batch upgrade message, importing upgrade firmware corresponding to each identification information from a remote tftp server, and performing a primary upgrade on the original firmware in the KVM slave device based on the upgrade firmware imported from the remote tftp server; in the case of a primary upgrade failure, importing upgrade firmware corresponding to each identification information from the KVM master device, and performing a secondary upgrade on the original firmware based on the upgrade firmware imported from the KVM master device. The present invention can realize batch upgrades of all KVM devices in the same network and improve the upgrade fault tolerance rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communication technology, and in particular to a KVM equipment batch upgrading method, device and electronic equipment. Background Art

[0002] With the rapid development of computer networks, KVM (Keyboard video mouse, switch) devices are widely used in scenes such as large conference rooms and command centers. KVM devices can use at least one set of keyboards, monitors or mice, and log in to remote devices through the network to access and control remote devices. The emergence of KVM distributed devices has effectively solved the problems of computer chassis occupying too much space and messy wiring. At the same time, there are a large number of KVM devices involved in large conference rooms or command centers, and the upgrade of many KVM devices has become a problem that needs to be solved urgently. Summary of the invention

[0003] The present invention provides a KVM equipment batch upgrade method, device and electronic equipment, which are used to solve the technical problem of KVM equipment batch upgrade, realize batch upgrade of all KVM equipment in the same network, and improve the upgrade fault tolerance rate.

[0004] The present invention provides a KVM device batch upgrade method, which is applied to a switch KVM slave device, comprising:

[0005] Receiving a batch upgrade message sent by a KVM master device, and determining identification information of at least one upgraded firmware based on the batch upgrade message;

[0006] Based on the batch upgrade message, import the upgrade firmware corresponding to each identification information from the remote tftp server, and perform a primary upgrade on the original firmware in the KVM slave device based on the upgrade firmware imported from the remote tftp server;

[0007] In case the initial upgrade fails, the upgrade firmware corresponding to each piece of identification information is imported from the KVM master device, and the original firmware is upgraded for a second time based on the upgrade firmware imported from the KVM master device.

[0008] According to the KVM device batch upgrade method provided by the present invention, the importing of the upgrade firmware corresponding to the identification information from the remote tftp server includes:

[0009] Based on the batch upgrade message, determine the remote tftp server IP address;

[0010] Based on the remote tftp server IP address, the upgrade firmware corresponding to the identification information is obtained from the remote tftp server, and the upgrade firmware obtained from the remote tftp server is imported into a preset memory area in the KVM slave device.

[0011] According to the KVM device batch upgrade method provided by the present invention, determining that the initial upgrade fails includes:

[0012] Upgrading the KVM slave device based on the upgraded firmware in the preset memory area, and in case of upgrade failure, restarting the KVM slave device and retrieving the upgraded firmware in the preset memory area in the KVM slave device;

[0013] When the version number of the upgrade firmware in the preset memory area is higher than the version number of the KVM slave device, the KVM slave device is upgraded again, and the initial upgrade result is determined;

[0014] When the version number of the upgrade firmware in the preset memory area is not higher than the version number of the KVM slave device, the upgrade firmware in the preset memory area is deleted, and the initial upgrade result is determined to be a failure.

[0015] According to the KVM device batch upgrade method provided by the present invention, the initial upgrade of the original firmware in the KVM slave device based on the upgrade firmware imported from the remote tftp server includes:

[0016] Determine the version number of the upgrade tool in the upgrade firmware;

[0017] Compare the version number of the upgrade tool in the upgrade firmware with the version number of the upgrade tool in the corresponding KVM slave device to determine a comparison result;

[0018] If the comparison result is that the version number of the upgrade tool in the upgrade firmware is not lower than the version number of the upgrade tool in the corresponding KVM slave device, updating the upgrade tool in the corresponding KVM slave device based on the upgrade tool in the upgrade firmware;

[0019] If the comparison result is that the version number of the upgrade tool in the upgrade firmware is lower than the version number of the corresponding upgrade tool in the KVM slave device, determine the upgrade tool in the KVM slave device as the upgrade tool for this upgrade;

[0020] Based on the upgrade firmware imported from the remote tftp server and the upgrade tool, the original firmware in the KVM slave device is initially upgraded.

[0021] According to the KVM device batch upgrade method provided by the present invention, before receiving the batch upgrade message sent by the KVM master device, the method further includes:

[0022] receiving an initial upgrade message sent by the KVM master device, wherein the initial upgrade message is sent by the KVM master device when determining that the upgrade mode includes an adaptive batch upgrade mode;

[0023] Adding the identification information corresponding to the original firmware to the initial upgrade message to obtain a target upgrade message;

[0024] The target upgrade message is sent to the KVM master device, where the target upgrade message is used to instruct the KVM master device to determine a batch upgrade message corresponding to each of the KVM slave devices based on identification information corresponding to each of the original firmware.

[0025] The present invention also provides a KVM device batch upgrade method, which is applied to a switch KVM master device, comprising:

[0026] Receive and parse the upgrade instruction, determine the upgrade mode corresponding to the multiple KVM devices to be upgraded, the KVM devices to be upgraded include the KVM master device and at least one KVM slave device, and the upgrade mode includes a smooth batch upgrade mode, a pseudo-smooth batch upgrade mode or an adaptive batch upgrade mode;

[0027] Based on the upgrade mode, the original firmware in the KVM master device is upgraded, and a batch upgrade message corresponding to the upgrade mode is determined, the batch upgrade message is used to instruct the KVM slave device to determine identification information of at least one upgrade firmware based on the batch upgrade message; and based on the batch upgrade message, the upgrade firmware corresponding to each identification information is imported from the remote tftp server, and the original firmware in the KVM slave device is initially upgraded based on the upgrade firmware imported from the remote tftp server; and in the event of failure of the initial upgrade, the upgrade firmware corresponding to each identification information is imported from the KVM master device, and the original firmware is secondarily upgraded based on the upgrade firmware imported from the KVM master device.

[0028] According to the KVM device batch upgrade method provided by the present invention, the determining of the batch upgrade message corresponding to the upgrade mode includes:

[0029] Verifying the upgraded firmware and determining a verification result;

[0030] In the case where the verification result is successful, if the upgrade mode includes a smooth batch upgrade mode, determining identification information corresponding to the upgrade firmware based on the upgrade instruction, and determining a batch upgrade message corresponding to the KVM slave device based on the identification information;

[0031] In the case where the verification result is successful, if the upgrade mode includes a pseudo-smooth batch upgrade mode, then based on the upgrade instruction, identification information corresponding to at least two firmwares is determined, and the upgrade order and corresponding identification information of at least two upgraded firmwares required by each of the KVM slave devices are determined, and based on the upgrade order and the identification information, a batch upgrade message corresponding to the KVM slave device is determined;

[0032] When the verification result is successful, if the upgrade mode includes an adaptive batch upgrade mode, an initial upgrade message is sent to the KVM slave device, and a target upgrade message sent by each KVM slave device in the same network and updated based on the initial upgrade message is received, the target upgrade message including the identification information of the original firmware in each KVM slave device; based on the target upgrade message, the upgrade order and corresponding identification information of at least two upgrade firmware required by each KVM slave device are determined; based on the upgrade order and corresponding identification information of at least two upgrade firmware required by each KVM slave device, a batch upgrade message is determined.

[0033] The present invention also provides a KVM device batch upgrade device, which is applied to a switch KVM slave device, comprising:

[0034] A first determination module, configured to receive a batch upgrade message sent by a KVM master device, and determine identification information of at least one upgraded firmware based on the batch upgrade message;

[0035] An initial upgrade module, used to import the upgrade firmware corresponding to each of the identification information from a remote tftp server based on the batch upgrade message, and perform an initial upgrade on the original firmware in the KVM slave device based on the upgrade firmware imported from the remote tftp server;

[0036] The secondary upgrade module is used to import the upgrade firmware corresponding to each identification information from the KVM main device when the initial upgrade fails, and perform a secondary upgrade on the original firmware based on the upgrade firmware imported from the KVM main device.

[0037] The present invention also provides a KVM equipment batch upgrade device, which is applied to a switch KVM main device, comprising:

[0038] A second determination module is used to receive and parse the upgrade instruction, determine the upgrade mode corresponding to multiple KVM devices to be upgraded, the KVM devices to be upgraded include the KVM master device and at least one KVM slave device, and the upgrade mode includes a smooth batch upgrade mode, a pseudo-smooth batch upgrade mode or an adaptive batch upgrade mode;

[0039] A sending module is used to upgrade the original firmware in the KVM master device based on the upgrade mode, determine the batch upgrade message corresponding to the upgrade mode, and send the batch upgrade message to each KVM slave device in the same network, so that the KVM slave device receives the batch upgrade message sent by the KVM master device, and determines the identification information of at least one upgrade firmware based on the batch upgrade message; and based on the batch upgrade message, import the upgrade firmware corresponding to each identification information from the remote tftp server, and perform the initial upgrade on the original firmware in the KVM slave device based on the upgrade firmware imported from the remote tftp server; and in the case of failure of the initial upgrade, import the upgrade firmware corresponding to each identification information from the KVM master device, and perform the secondary upgrade on the original firmware based on the upgrade firmware imported from the KVM master device.

[0040] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned KVM device batch upgrade methods is implemented.

[0041] The present invention provides a method, device and electronic device for batch upgrading of KVM devices. The KVM slave device receives a batch upgrade message sent by a KVM master device in the same network, and uses the KVM master device instead of the server to send the batch upgrade message to each KVM slave device in the same network, thereby reducing resource occupation of the server and improving the upgrade efficiency. Based on the batch upgrade message, the corresponding upgrade firmware is imported from the remote tftp server and the KVM master device in turn for automatic upgrading, thereby reducing the interference of the device business and the remote tftp server on the device upgrade, improving the fault tolerance rate of the upgrade, and avoiding the problem of wrong upgrade or missed upgrade. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 This is one of the flow charts of the KVM device batch upgrade method provided by the present invention;

[0044] Figure 2 It is a schematic diagram of the determination process of the upgrade tool provided by the present invention;

[0045] Figure 3 This is one of the flow diagrams of the KVM slave device upgrade provided by the present invention;

[0046] Figure 4 This is the second schematic diagram of the process of upgrading the KVM slave device provided by the present invention;

[0047] Figure 5 This is the second flow chart of the KVM device batch upgrade method provided by the present invention;

[0048] Figure 6 This is one of the flow diagrams of the KVM master device smooth batch upgrade mode provided by the present invention;

[0049] Figure 7 This is one of the flow diagrams of the pseudo-smooth batch upgrade mode of the KVM master device provided by the present invention;

[0050] Figure 8 This is the second flow chart of the KVM master device smooth batch upgrade mode provided by the present invention;

[0051] Fig. 9 This is the second flow chart of the pseudo-smooth batch upgrade mode of the KVM master device provided by the present invention;

[0052] Fig.10 This is one of the structural schematic diagrams of the KVM equipment batch upgrade device provided by the present invention;

[0053] Fig.11 This is the second structural schematic diagram of the KVM equipment batch upgrade device provided by the present invention;

[0054] Fig.12 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

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

[0056] With the rapid development of computer networks, KVM (Keyboard video mouse, switch) devices are widely used in scenes such as large conference rooms and command centers. KVM devices can use at least one set of keyboards, monitors or mice, and log in to remote devices through the network to access and control remote devices. The emergence of KVM distributed devices has effectively solved the problems of computer chassis occupying too much space and messy wiring. At the same time, there are a large number of KVM devices involved in large conference rooms or command centers, and the upgrade of many KVM devices has become a problem that needs to be solved urgently.

[0057] In the prior art, the upgrade of many KVM devices is generally achieved by configuring the batch upgrade parameters of network devices and saving them in the database. The client selects the upgrade device batch and saves them in the upgrade command list of the database. The server periodically polls the upgrade command table to determine the version of the file to be upgraded, obtains the upgrade parameters corresponding to the version to be upgraded from the database, and sends the file to be upgraded to the device to be upgraded, and then waits for all the devices to be upgraded to be upgraded and restarted. However, the above method relies on external devices and occupies server resources. At the same time, the upgrade fault tolerance rate is low. For devices that do not support smooth upgrades, it is easy to miss or upgrade.

[0058] In view of the above problems, the present invention provides a KVM device batch upgrade method, which is applied to switch KVM slave devices. Figure 1 FIG. 1 is one of the flow charts of the KVM device batch upgrade method provided by the present invention, such as Figure 1 As shown, the method includes:

[0059] Step 110: Receive a batch upgrade message sent by a KVM master device, and determine identification information of at least one upgraded firmware based on the batch upgrade message.

[0060] Step 120: Based on the batch upgrade message, import the upgrade firmware corresponding to each identification information from the remote tftp server, and perform an initial upgrade on the original firmware in the KVM slave device based on the upgrade firmware imported from the remote tftp server.

[0061] Step 130: When the initial upgrade fails, import the upgrade firmware corresponding to each piece of identification information from the KVM master device, and perform a secondary upgrade on the original firmware based on the upgrade firmware imported from the KVM master device.

[0062] Specifically, by determining that the KVM master device replaces the server, and obtaining the identification information of the upgrade firmware based on the batch upgrade message sent by the KVM master device, and obtaining the upgrade firmware from the remote tftp server, and in the case that the upgrade based on the upgrade firmware imported from the remote tftp server fails, the KVM master device is regarded as a tftp server, and based on the batch upgrade message, the upgrade firmware is imported from the KVM master device, and automatically upgraded based on the upgrade firmware. The above-mentioned upgrade fault tolerance level system eliminates the problems of remote tftp server and equipment business interference during the upgrade process. After the initial upgrade fails, the upgrade firmware can be imported again from the KVM master device for a secondary upgrade to improve the upgrade fault tolerance rate.

[0063] Optionally, when a KVM device needs to be upgraded, the KVM master device is any device to be upgraded in the network, and all other devices to be upgraded in the network except the KVM master device are KVM slave devices.

[0064] Table 1 Batch upgrade message format

[0065]

[0066] Optionally, the batch upgrade message format is as shown in Table 1, and the batch message includes but is not limited to: the KVM master device IP address, the remote tftp server IP address, the KVM slave device IP address, the type of Linux image installation package to be upgraded, the version number of the Linux image installation package to be upgraded, whether to force the upgrade, whether the upgrade is successful, and the upgrade strategy. The present invention is not limited to this. The upgrade firmware can be the Linux image installation package to be upgraded. The identification information of the upgrade firmware may include the KVM master device IP address, the remote tftp server IP address, the type of Linux image installation package to be upgraded, and the version number of the Linux image installation package to be upgraded. The upgrade strategy is used to indicate whether each upgrade firmware supports smooth upgrade. Smooth upgrade is used to indicate that the upgrade firmware versions can be upgraded and rolled back arbitrarily. For example, there are three versions that have been released to support smooth upgrades, version A, version B, and version C. Version A can be upgraded to version B or version C at will, version B can be rolled back to version A or upgraded to version C at will, and version C can be rolled back to version B or version A at will. There can be multiple version numbers of the Linux image installation package to be upgraded, and the naming order of the version numbers of the Linux image installation package to be upgraded is the upgrade order of each Linux image installation package to be upgraded.

[0067] Optionally, the importing of the upgrade firmware corresponding to the identification information from the remote TFTP server includes:

[0068] Based on the batch upgrade message, determine the remote tftp server IP address;

[0069] Based on the remote tftp server IP address, the upgrade firmware corresponding to the identification information is obtained from the remote tftp server, and the upgrade firmware obtained from the remote tftp server is imported into a preset memory area in the KVM slave device.

[0070] Specifically, the upgrade firmware is stored in a remote server. To obtain the corresponding upgrade firmware, the KVM slave device can obtain the remote tftp server IP address from the received batch upgrade message, connect to the remote tftp server from the remote tftp server IP address, and obtain the required upgrade firmware, import it into the preset memory area of ​​the KVM slave device for upgrading.

[0071] Optionally, the preset memory area may be a pre-designated flash area, which is a non-volatile area with fast read and write speed and low cost, and can improve the upgrade efficiency of the KVM slave device to a certain extent, and improve the upgrade efficiency of the KVM devices to be upgraded in the entire network.

[0072] Optionally, determine that the initial upgrade failed, including:

[0073] Upgrading the KVM slave device based on the upgraded firmware in the preset memory area, and in case of upgrade failure, restarting the KVM slave device and retrieving the upgraded firmware in the preset memory area in the KVM slave device;

[0074] When the version number of the upgrade firmware in the preset memory area is higher than the version number of the KVM slave device, the KVM slave device is upgraded again, and the initial upgrade result is determined;

[0075] When the version number of the upgrade firmware in the preset memory area is not higher than the version number of the KVM slave device, the upgrade firmware in the preset memory area is deleted, and the initial upgrade result is determined to be a failure.

[0076] Specifically, in the event that an upgrade fails when the KVM slave device is upgraded using the upgrade firmware in the preset memory area, in order to avoid the impact of the device on the upgrade, the KVM slave device is restarted for upgrading again. After the KVM device is restarted, the preset memory area is first searched for the upgrade firmware, and the version number of the upgrade firmware is compared with the version number of the original firmware of the KVM slave device to determine the comparison result of the version number of the upgrade firmware. Based on the comparison result of the version number, the upgrade is performed again or the upgrade failure is directly determined to perform a subsequent secondary upgrade.

[0077] Optionally, if the KVM slave device fails to access the remote tftp server using the remote tftp server IP address, it can also be confirmed that the initial upgrade has failed, and the upgrade firmware can be obtained from the KVM master device and upgraded.

[0078] Optionally, Figure 2 is a schematic diagram of the determination process of the upgrade tool provided by the present invention, such as Figure 2 As shown, the initial upgrade of the original firmware in the KVM slave device based on the upgraded firmware imported from the remote tftp server includes:

[0079] Determine the version number of the upgrade tool in the upgrade firmware;

[0080] Compare the version number of the upgrade tool in the upgrade firmware with the version number of the upgrade tool in the corresponding KVM slave device to determine a comparison result;

[0081] If the comparison result is that the version number of the upgrade tool in the upgrade firmware is not lower than the version number of the upgrade tool in the corresponding KVM slave device, updating the upgrade tool in the corresponding KVM slave device based on the upgrade tool in the upgrade firmware;

[0082] If the comparison result is that the version number of the upgrade tool in the upgrade firmware is lower than the version number of the corresponding upgrade tool in the KVM slave device, determine the upgrade tool in the KVM slave device as the upgrade tool for this upgrade;

[0083] Based on the upgrade firmware imported from the remote tftp server and the upgrade tool, the original firmware in the KVM slave device is initially upgraded.

[0084] Specifically, the upgrade firmware is integrated with an upgrade tool, and the original firmware in the KVM slave device is also integrated with an upgrade tool. Before successfully importing the upgrade firmware and upgrading based on the upgrade firmware, it is necessary to determine the upgrade tool used for this upgrade. Therefore, in an embodiment of the present invention, the version number of the upgrade tool corresponding to the imported upgrade firmware is parsed and compared with the version number of the upgrade tool corresponding to the original firmware. If the version number of the imported upgrade tool is higher than the version number of the upgrade tool corresponding to the original firmware, the upgrade tool corresponding to the original firmware is updated by the imported upgrade tool, and the original firmware of the KVM slave device is upgraded based on the upgrade firmware and the upgrade tool corresponding to the updated original firmware; if the version number of the imported upgrade tool is not higher than the version number of the upgrade tool corresponding to the original firmware, the upgrade tool corresponding to the original firmware is used as the upgrade tool used for this upgrade.

[0085] Optionally, Figure 3 This is one of the flow charts of the KVM slave device upgrade provided by the present invention, such as Figure 3 As shown in the figure, the process of upgrading the KVM slave device includes the following steps:

[0086] (1) After receiving the batch upgrade message, check whether the upgrade firmware type in the batch upgrade message matches the current KVM device. If not, send an upgrade feedback message to the KVM master device. If yes, execute step (2).

[0087] (2) Based on the batch upgrade message, determine whether it carries a mandatory upgrade message.

[0088] If the batch upgrade message does not carry a forced upgrade message, the KVM slave device verifies the version number of the upgrade firmware, and upgrades if the upgrade firmware version number is higher than the version number of the original firmware of the KVM slave device; if the upgrade firmware version number is not higher than the version number of the original firmware of the KVM slave device, the upgrade is not performed, and the version number of the original firmware of the KVM slave device is added to the batch upgrade message and sent to the KVM master device;

[0089] If the batch upgrade message carries a forced upgrade message, the forced upgrade is performed without verifying the version number of the upgrade firmware.

[0090] (3) Before upgrading, first obtain and import the upgrade firmware from the remote tftp server, and import the upgrade firmware into the specified flash area, and perform integrity check on the data of the upgrade firmware. If it is incomplete, send an upgrade feedback message to the KVM master device. If it is complete, shut down all other services in the KVM slave device for upgrading to ensure that the device services do not interfere with the upgrade process. If the upgrade is successful, send an upgrade feedback message to the KVM master device. If the upgrade fails, execute step (4).

[0091] (4) Restart the KVM slave device. After the KVM device restarts, first search the flash area to see if there is an upgrade firmware, and compare the version number of the upgrade firmware with the version number of the original firmware of the KVM slave device to determine the comparison result of the version number of the upgrade firmware. Based on the comparison result of the version number, perform another upgrade or directly determine that the upgrade fails. If the upgrade fails, execute step (5).

[0092] (5) Based on the IP address of the KVM master device in the batch upgrade message, the upgrade firmware is re-acquired and imported, and the KVM slave device is upgraded based on the upgrade firmware. Regardless of whether the upgrade is successful or not, the upgrade result is added to the upgrade feedback message and sent to the KVM master device.

[0093] Optionally, Figure 4 This is the second flow chart of the KVM slave device upgrade provided by the present invention, such as Figure 4 As shown, before receiving the batch upgrade message sent by the KVM master device, the method also includes:

[0094] receiving an initial upgrade message sent by the KVM master device, wherein the initial upgrade message is sent by the KVM master device when determining that the upgrade mode includes an adaptive batch upgrade mode;

[0095] Adding the identification information corresponding to the original firmware to the initial upgrade message to obtain a target upgrade message;

[0096] The target upgrade message is sent to the KVM master device, where the target upgrade message is used to instruct the KVM master device to determine a batch upgrade message corresponding to each of the KVM slave devices based on identification information corresponding to each of the original firmware.

[0097] Specifically, before executing step 110, the KVM slave device can also receive an initial upgrade message sent by the KVM master device. The initial upgrade message is sent to each KVM slave device when the KVM master device determines that the upgrade mode is the adaptive batch upgrade mode. In this adaptive batch upgrade mode, there are multiple versions of KVM slave devices in the same network, and the KVM master device does not know the corresponding version of each KVM slave device. Therefore, it is necessary to send an initial upgrade message to each KVM slave device in advance. Each KVM slave device adds the version number of its own original firmware to the initial upgrade message, obtains the updated target upgrade message, and sends the target upgrade message back to the KVM master device, so that the KVM master device can traverse the upgrade strategy according to the version number corresponding to each KVM slave device in each target upgrade message, and determine the batch upgrade message corresponding to each KVM slave device, so as to prompt the versions of all upgraded firmware that do not support smooth upgrade, that is, the upgraded firmware version that must be upgraded before the KVM slave device cross-version upgrade, so as to prevent the phenomenon of missed upgrades and wrong upgrades, thereby affecting the batch upgrade of KVM devices in the entire network.

[0098] For example, the version number of the original firmware of the KVM slave device is version 1, which needs to be upgraded to version 5. There are intermediate versions 2, 3 and 4 between version 1 and version 5. Among them, version 2 and version 4 do not support smooth upgrade, but version 3 supports smooth upgrade. Then, in the adaptive batch upgrade mode, when the KVM slave device is upgraded from version 1 to version 5, the upgrade order is: first upgrade to version 2, then upgrade to version 4, and finally upgrade to version 5.

[0099] The present invention provides a method for batch upgrading of KVM devices. The KVM slave device receives a batch upgrade message sent by a KVM master device in the same network, and uses the KVM master device instead of the server to send the batch upgrade message to each KVM slave device in the same network, thereby reducing resource occupation of the server and improving the upgrading efficiency. Moreover, based on the batch upgrade message, the corresponding upgrade firmware is imported from the remote tftp server and the KVM master device in turn for automatic upgrading, thereby reducing the interference of the device business and the remote tftp server on the device upgrading, improving the fault tolerance rate of the upgrading, and avoiding the problem of wrong or missed upgrading.

[0100] The present invention also provides a KVM device batch upgrade method, which is applied to a switch KVM master device. Figure 5 FIG. 2 is a flow chart of the method for batch upgrading of KVM devices provided by the present invention. Figure 5 As shown, the method includes:

[0101] Step 510: Receive and parse the upgrade instruction, determine the upgrade mode corresponding to the multiple KVM devices to be upgraded, the KVM devices to be upgraded include the KVM master device and at least one KVM slave device, and the upgrade mode includes a smooth batch upgrade mode, a pseudo-smooth batch upgrade mode or an adaptive batch upgrade mode;

[0102] Step 520: Based on the upgrade mode, the original firmware in the KVM master device is upgraded, and a batch upgrade message corresponding to the upgrade mode is determined, wherein the batch upgrade message is used to instruct the KVM slave device to determine identification information of at least one upgrade firmware based on the batch upgrade message; and based on the batch upgrade message, the upgrade firmware corresponding to each identification information is imported from the remote tftp server, and the original firmware in the KVM slave device is initially upgraded based on the upgrade firmware imported from the remote tftp server; and in the event of failure of the initial upgrade, the upgrade firmware corresponding to each identification information is imported from the KVM master device, and the original firmware is secondarily upgraded based on the upgrade firmware imported from the KVM master device.

[0103] Specifically, since the KVM devices to be upgraded in the existing solution are managed by the device server, and the batch upgrade of each KVM device to be upgraded occupies server resources, therefore, in the embodiment of the present invention, one of the KVM devices to be upgraded is randomly selected as the KVM master device, and the remaining KVM devices to be upgraded are KVM slave devices. The KVM master device receives and parses the input upgrade instructions to determine the upgrade mode of all KVM devices to be upgraded, and based on the upgrade mode, the KVM master device is upgraded, and the batch upgrade message of each KVM slave device is determined, and the batch upgrade message is sent to each KVM slave device to instruct each KVM slave device to automatically upgrade. It is only necessary to upgrade any one KVM device to be upgraded in the same network, and all KVM devices to be upgraded in the same network can be automatically upgraded in batches, without relying on the device server and database to manage the KVM devices to be upgraded. At the same time, there is no need to develop an independent client to perform the upgrade operation.

[0104] Optionally, the KVM master device parses the upgrade command to determine an upgrade mode of each KVM device to be upgraded, the upgrade mode including a smooth batch upgrade mode, a pseudo-smooth batch upgrade mode and an adaptive batch upgrade mode, wherein:

[0105] (1) The command for smooth batch upgrade is:

[0106] update–tftp xxx.xxx.xxx.xxx all–batch.

[0107] (2) Pseudo-smooth batch upgrade command:

[0108] update–tftp xxx.xxx.xxx.xxx all–batch–n Linux upgrade image installation package name 1Linux upgrade image installation package name 2Linux upgrade image installation package name N.

[0109] In the above pseudo-smooth batch upgrade command, the naming order of the Linux upgrade image installation package names is the upgrade order of each Linux upgrade image installation package during the pseudo-smooth batch upgrade.

[0110] (3) The adaptive upgrade mode is upgraded to:

[0111] update–tftp xxx.xxx.xxx.xxx all–adapt.

[0112] The above xxx.xxx.xxx.xxx represents the IP address of the tftp server storing the upgraded firmware, that is, the IP address of the tftp server storing the Linux image installation package to be upgraded.

[0113] Optionally, in the smooth batch upgrade mode, since it has been confirmed that the intermediate firmware between the original firmware and the upgraded firmware supports smooth upgrade, the version numbers of the original firmware of each KVM slave device may be the same or different, and each KVM slave device may be upgraded to the upgraded firmware with the same version number as the KVM master device according to the batch upgrade message sent by the KVM master device.

[0114] Optionally, the pseudo-smooth upgrade mainly takes into account the large version difference between the original firmware and the new upgrade firmware. Direct upgrade will cause serious problems such as the device being unable to start or abnormal startup. Therefore, multiple intermediate firmware are designed to transition to support pseudo-smooth upgrades. Therefore, in the pseudo-smooth batch upgrade mode, each KVM device to be upgraded needs to upgrade multiple upgrade firmwares. In addition, in the pseudo-smooth batch upgrade mode, the version numbers of each KVM slave device in the same network are the same, and the batch upgrade message sent by the KVM master device upgrades the original firmware of each KVM slave device to the upgrade firmware with the same version number as the KVM master device.

[0115] Optionally, in the adaptive batch upgrade mode, the version numbers of the original firmware of each KVM slave device may be different. The KVM master device does not have a clear understanding of the version numbers of the original firmware of each KVM slave device in the same network. Therefore, before determining the batch upgrade message of each KVM slave device, an initial upgrade message is first sent to each KVM slave device, instructing each KVM slave device to add the version number of its own original firmware to the initial upgrade message to obtain a target upgrade message, which is then fed back to the KVM master device, so that the KVM master device can determine the version number that must be upgraded for each KVM slave device and the corresponding upgrade order, and then determine the batch upgrade message.

[0116] Optionally, the determining a batch upgrade message corresponding to the upgrade mode includes:

[0117] Verifying the upgraded firmware and determining a verification result;

[0118] In the case where the verification result is successful, if the upgrade mode includes a smooth batch upgrade mode, determining identification information corresponding to the upgrade firmware based on the upgrade instruction, and determining a batch upgrade message corresponding to the KVM slave device based on the identification information;

[0119] In the case where the verification result is successful, if the upgrade mode includes a pseudo-smooth batch upgrade mode, then based on the upgrade instruction, identification information corresponding to at least two firmwares is determined, and the upgrade order and corresponding identification information of at least two upgraded firmwares required by each of the KVM slave devices are determined, and based on the upgrade order and the identification information, a batch upgrade message corresponding to the KVM slave device is determined;

[0120] When the verification result is successful, if the upgrade mode includes an adaptive batch upgrade mode, an initial upgrade message is sent to the KVM slave device, and a target upgrade message sent by each KVM slave device in the same network and updated based on the initial upgrade message is received, the target upgrade message including the identification information of the original firmware in each KVM slave device; based on the target upgrade message, the upgrade order and corresponding identification information of at least two upgrade firmware required by each KVM slave device are determined; based on the upgrade order and corresponding identification information of at least two upgrade firmware required by each KVM slave device, a batch upgrade message is determined.

[0121] Optionally, Figure 6 This is one of the flow charts of the KVM master device smooth batch upgrade mode provided by the present invention, such as Figure 6 As shown in the figure, the steps of smooth batch upgrade mode of KVM master devices are as follows:

[0122] (1) After the KVM master device confirms that the upgrade mode is the smooth batch upgrade mode, it checks the storage capacity of the current memory space (Double Data Rate, DDR) of the KVM master device to see whether it can store the upgrade firmware in the remote tftp server. If the storage capacity is small, the upgrade is exited. If the storage capacity is sufficient, step (2) is executed.

[0123] (2) Import the upgrade firmware. If the import fails, exit the upgrade. If the import succeeds, verify the size of the imported upgrade firmware, extract the header information of the upgrade firmware, and further verify the type and version number of the upgrade firmware and whether the various files to be burned in the upgrade firmware are complete. If the verification result is a failure, exit the upgrade. If the verification result is a success, execute step (3).

[0124] (3) Use the imported upgrade firmware to upgrade the KVM master device itself.

[0125] (4) Configure itself as a tftp server, retrieve the number of KVM slave devices in the same network and the IP address corresponding to each KVM slave device, generate a batch upgrade message, and send it to each KVM slave device, instructing each KVM slave device to obtain the upgrade firmware based on the batch upgrade message for automatic upgrade.

[0126] Optionally, the order of the above steps (3) and (4) is not specific, and step (3) can be performed first, and then step (4); or step (4) can be performed first, and then step (3). In addition, the upgrade of the KVM master device can also be performed after all KVM slave devices have been successfully upgraded. The present invention is not limited to this.

[0127] Optionally, Figure 7 This is one of the flow diagrams of the pseudo-smooth batch upgrade mode of the KVM master device provided by the present invention, such as Figure 7 As shown in the figure, the steps of pseudo-smooth batch upgrade mode of KVM master device are as follows:

[0128] (1) After the KVM master device confirms that the upgrade mode is the pseudo-smooth batch upgrade mode, it checks the storage capacity of the current memory space (Double Data Rate, DDR) of the KVM master device to see whether it can store the upgrade firmware in the remote TFTP server. If the storage capacity is small, the upgrade is exited. If the storage capacity is sufficient, step (2) is executed.

[0129] (2) Import the upgrade firmware in reverse order according to the upgrade sequence of each upgrade firmware. If the import fails, exit the upgrade. If the import succeeds, verify the size of the imported upgrade firmware, extract the header information of the upgrade firmware, and further verify the type and version number of the upgrade firmware and whether the various files to be burned in the upgrade firmware are complete. If the verification result is a failure, exit the upgrade. If the verification result is a success, delete the imported upgrade firmware, continue to import the second to last upgrade firmware, and continue to verify until all the upgrade firmware are verified. If the verification result of at least one upgrade firmware fails, exit the upgrade. If the verification results of all upgrade firmware are successful, execute step (3).

[0130] (3) When the verification results of all upgrade firmware are successful, there is no need to delete the last imported upgrade firmware, but the upgrade can be performed directly based on the last imported upgrade firmware. After the upgrade is successful, the upgrade firmware is imported in sequence according to the upgrade order to upgrade the original firmware of the KVM master device.

[0131] (4) Configure the KVM master device itself as a tftp server, and retrieve the number of KVM slave devices in the same network and the IP address corresponding to each KVM slave device, generate a batch upgrade message, and send it to each KVM slave device, instructing each KVM slave device to obtain the upgrade firmware based on the batch upgrade message for automatic upgrade.

[0132] Optionally, in the adaptive batch upgrade mode, the upgrade process of the KVM master device is the same, and after the above upgrade is successful, the KVM device is restarted to take effect.

[0133] Optionally, Figure 8 This is the second flow chart of the KVM master device smooth batch upgrade mode provided by the present invention, such as Figure 8 As shown, in the smooth batch upgrade mode, after each KVM device is upgraded successfully or failed, the following steps are also included:

[0134] Receive upgrade feedback messages sent by each KVM slave device in the same network. The upgrade feedback messages are used to indicate whether all KVM slave devices have been successfully upgraded, failed to be upgraded, or have timed out.

[0135] Based on the upgrade feedback message, update the upgrade log, which is used to record the IP address and corresponding device number of the KVM slave device that succeeded, failed or timed out.

[0136] Synchronize the upgrade log to all successfully upgraded KVM slave devices, so that you can view the upgrade log on any device.

[0137] Optionally, Fig. 9This is the second flow chart of the pseudo-smooth batch upgrade mode of the KVM master device provided by the present invention, such as Fig. 9 As shown, in the pseudo-smooth batch upgrade mode, after each KVM device is upgraded successfully or failed, the following steps are also included:

[0138] Receive upgrade feedback messages sent by each KVM slave device in the same network. The upgrade feedback messages are used to indicate whether all KVM slave devices have been successfully upgraded, failed to be upgraded, or have timed out.

[0139] Based on the upgrade feedback message, update the upgrade log, which is used to record the IP address and corresponding device number of the KVM slave device that succeeded, failed or timed out.

[0140] If all KVM slave devices are successfully upgraded, the KVM master device automatically imports the second upgrade firmware according to the upgrade sequence, continues the upgrade, and repeats the above steps. If there are individual KVM slave devices that fail to upgrade or time out, the KVM master device is prompted whether to continue the pseudo-smooth upgrade of the remaining KVM slave devices. The KVM master device continues or ends the upgrade according to the prompt and updates the upgrade log.

[0141] Synchronize the upgrade log to all successfully upgraded KVM slave devices, so that you can view the upgrade log on any device.

[0142] The KVM device batch upgrade method provided by the present invention, under the same networking, arbitrarily selects a KVM device to be upgraded as the KVM master device, replaces the server to manage the remaining KVM slave devices, and determines the batch upgrade message of each KVM slave device based on the upgrade instruction, so that each KVM slave device is automatically upgraded, avoiding occupying the resources of the device server and meeting the upgrade requirements of various scenarios.

[0143] The present invention also provides a KVM equipment batch upgrade device, which is applied to a switch KVM slave device. Fig.10 This is one of the structural diagrams of the KVM equipment batch upgrade device provided by the present invention, such as Fig.10 As shown, the KVM device batch upgrade device 1000 includes: a first determination module 1001, a primary upgrade module 1002 and a secondary upgrade module 1003, wherein:

[0144] The first determination module 1001 is used to receive a batch upgrade message sent by the KVM master device, and determine identification information of at least one upgraded firmware based on the batch upgrade message;

[0145] The initial upgrade module 1002 is used to import the upgrade firmware corresponding to each of the identification information from the remote tftp server based on the batch upgrade message, and perform the initial upgrade on the original firmware in the KVM slave device based on the upgrade firmware imported from the remote tftp server;

[0146] The secondary upgrade module 1003 is used to import the upgrade firmware corresponding to each identification information from the KVM main device when the initial upgrade fails, and perform a secondary upgrade on the original firmware based on the upgrade firmware imported from the KVM main device.

[0147] The present invention provides a KVM device batch upgrade device. The KVM slave device receives the batch upgrade message sent by the KVM master device in the same network, and uses the KVM master device instead of the server to send the batch upgrade message to each KVM slave device in the same network, thereby reducing the resource occupation of the server and improving the upgrade efficiency. Based on the batch upgrade message, the corresponding upgrade firmware is imported from the remote tftp server and the KVM master device in turn for automatic upgrade, thereby reducing the interference of the device business and the remote tftp server on the device upgrade, improving the fault tolerance rate of the upgrade, and avoiding the problem of wrong upgrade or missed upgrade.

[0148] Optionally, the first determining module 1001 is specifically configured to:

[0149] Before receiving the batch upgrade message sent by the KVM master device, the method further includes:

[0150] receiving an initial upgrade message sent by the KVM master device, wherein the initial upgrade message is sent by the KVM master device when determining that the upgrade mode includes an adaptive batch upgrade mode;

[0151] Adding the identification information corresponding to the original firmware to the initial upgrade message to obtain a target upgrade message;

[0152] The target upgrade message is sent to the KVM master device, where the target upgrade message is used to instruct the KVM master device to determine a batch upgrade message corresponding to each of the KVM slave devices based on identification information corresponding to each of the original firmware.

[0153] Optionally, the initial upgrade module 1002 is specifically used to:

[0154] The step of importing the upgrade firmware corresponding to the identification information from the remote TFTP server includes:

[0155] Based on the batch upgrade message, determine the remote tftp server IP address;

[0156] Based on the remote tftp server IP address, the upgrade firmware corresponding to the identification information is obtained from the remote tftp server, and the upgrade firmware obtained from the remote tftp server is imported into a preset memory area in the KVM slave device.

[0157] Optionally, the secondary upgrade module 1003 is specifically used to:

[0158] Determine if the initial upgrade failed, including:

[0159] Upgrading the KVM slave device based on the upgraded firmware in the preset memory area, and in case of upgrade failure, restarting the KVM slave device and retrieving the upgraded firmware in the preset memory area in the KVM slave device;

[0160] When the version number of the upgrade firmware in the preset memory area is higher than the version number of the KVM slave device, the KVM slave device is upgraded again, and the initial upgrade result is determined;

[0161] When the version number of the upgrade firmware in the preset memory area is not higher than the version number of the KVM slave device, the upgrade firmware in the preset memory area is deleted, and the initial upgrade result is determined to be a failure.

[0162] Optionally, the secondary upgrade module 1003 is specifically used to:

[0163] The initial upgrade of the original firmware in the KVM slave device based on the upgrade firmware imported from the remote tftp server includes:

[0164] Determine the version number of the upgrade tool in the upgrade firmware;

[0165] Compare the version number of the upgrade tool in the upgrade firmware with the version number of the upgrade tool in the corresponding KVM slave device to determine a comparison result;

[0166] If the comparison result is that the version number of the upgrade tool in the upgrade firmware is not lower than the version number of the upgrade tool in the corresponding KVM slave device, updating the upgrade tool in the corresponding KVM slave device based on the upgrade tool in the upgrade firmware;

[0167] If the comparison result is that the version number of the upgrade tool in the upgrade firmware is lower than the version number of the corresponding upgrade tool in the KVM slave device, determine the upgrade tool in the KVM slave device as the upgrade tool for this upgrade;

[0168] Based on the upgrade firmware imported from the remote tftp server and the upgrade tool, the original firmware in the KVM slave device is initially upgraded.

[0169] The present invention also provides a KVM equipment batch upgrade device, which is applied to a switch KVM main device. Fig.11 This is the second structural diagram of the KVM equipment batch upgrade device provided by the present invention, such as Fig.11 As shown, the KVM device batch upgrade device 1100 includes: a second determination module 1101 and a sending module 1102, wherein:

[0170] The second determination module 1101 is used to receive and parse the upgrade instruction, determine the upgrade mode corresponding to the multiple KVM devices to be upgraded, the KVM devices to be upgraded include the KVM master device and at least one KVM slave device, and the upgrade mode includes a smooth batch upgrade mode, a pseudo-smooth batch upgrade mode or an adaptive batch upgrade mode;

[0171] The sending module 1102 is used to upgrade the original firmware in the KVM master device based on the upgrade mode, determine the batch upgrade message corresponding to the upgrade mode, and send the batch upgrade message to each KVM slave device in the same network, so that the KVM slave device receives the batch upgrade message sent by the KVM master device, and determines the identification information of at least one upgrade firmware based on the batch upgrade message; and based on the batch upgrade message, import the upgrade firmware corresponding to each identification information from the remote tftp server, and perform the initial upgrade on the original firmware in the KVM slave device based on the upgrade firmware imported from the remote tftp server; and in the case of failure of the initial upgrade, import the upgrade firmware corresponding to each identification information from the KVM master device, and perform a secondary upgrade on the original firmware based on the upgrade firmware imported from the KVM master device.

[0172] The KVM device batch upgrade device provided by the present invention can arbitrarily select a KVM device to be upgraded as the KVM master device under the same networking, manage the remaining KVM slave devices instead of the server, and determine the batch upgrade message of each KVM slave device based on the upgrade instruction, so that each KVM slave device can be automatically upgraded, avoiding occupying the resources of the device server and meeting the upgrade requirements of various scenarios.

[0173] Optionally, the sending module 1102 is specifically configured to:

[0174] The determining of the batch upgrade message corresponding to the upgrade mode includes:

[0175] Verifying the upgraded firmware and determining a verification result;

[0176] In the case where the verification result is successful, if the upgrade mode includes a smooth batch upgrade mode, determining identification information corresponding to the upgrade firmware based on the upgrade instruction, and determining a batch upgrade message corresponding to the KVM slave device based on the identification information;

[0177] In the case where the verification result is successful, if the upgrade mode includes a pseudo-smooth batch upgrade mode, then based on the upgrade instruction, identification information corresponding to at least two firmwares is determined, and the upgrade order and corresponding identification information of at least two upgraded firmwares required by each of the KVM slave devices are determined, and based on the upgrade order and the identification information, a batch upgrade message corresponding to the KVM slave device is determined;

[0178] When the verification result is successful, if the upgrade mode includes an adaptive batch upgrade mode, an initial upgrade message is sent to the KVM slave device, and a target upgrade message sent by each KVM slave device in the same network and updated based on the initial upgrade message is received, the target upgrade message including the identification information of the original firmware in each KVM slave device; based on the target upgrade message, the upgrade order and corresponding identification information of at least two upgrade firmware required by each KVM slave device are determined; based on the upgrade order and corresponding identification information of at least two upgrade firmware required by each KVM slave device, a batch upgrade message is determined.

[0179] Fig.12 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.12 As shown, the electronic device 1200 may include: a processor 1210, a communication interface 1220, a memory 1230 and a communication bus 1240, wherein the processor 1210, the communication interface 1220, and the memory 1230 communicate with each other through the communication bus 1240. The processor 1210 may call the logic instructions in the memory 1230 to execute the KVM device batch upgrade method, which includes:

[0180] Receiving a batch upgrade message sent by a KVM master device, and determining identification information of at least one upgraded firmware based on the batch upgrade message;

[0181] Based on the batch upgrade message, import the upgrade firmware corresponding to each identification information from the remote tftp server, and perform a primary upgrade on the original firmware in the KVM slave device based on the upgrade firmware imported from the remote tftp server;

[0182] In case the initial upgrade fails, importing the upgrade firmware corresponding to each piece of identification information from the KVM master device, and performing a secondary upgrade on the original firmware based on the upgrade firmware imported from the KVM master device;

[0183] or,

[0184] Receive and parse the upgrade instruction, determine the upgrade mode corresponding to the multiple KVM devices to be upgraded, the KVM devices to be upgraded include the KVM master device and at least one KVM slave device, and the upgrade mode includes a smooth batch upgrade mode, a pseudo-smooth batch upgrade mode or an adaptive batch upgrade mode;

[0185] Based on the upgrade mode, the original firmware in the KVM master device is upgraded, and a batch upgrade message corresponding to the upgrade mode is determined, the batch upgrade message is used to instruct the KVM slave device to determine identification information of at least one upgrade firmware based on the batch upgrade message; and based on the batch upgrade message, the upgrade firmware corresponding to each identification information is imported from the remote tftp server, and the original firmware in the KVM slave device is initially upgraded based on the upgrade firmware imported from the remote tftp server; and in the event of failure of the initial upgrade, the upgrade firmware corresponding to each identification information is imported from the KVM master device, and the original firmware is secondarily upgraded based on the upgrade firmware imported from the KVM master device.

[0186] In addition, the logic instructions in the above-mentioned memory 1230 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0187] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the KVM device batch upgrade method provided by the above methods, the method includes:

[0188] Receiving a batch upgrade message sent by a KVM master device, and determining identification information of at least one upgraded firmware based on the batch upgrade message;

[0189] Based on the batch upgrade message, import the upgrade firmware corresponding to each identification information from the remote tftp server, and perform a primary upgrade on the original firmware in the KVM slave device based on the upgrade firmware imported from the remote tftp server;

[0190] In case the initial upgrade fails, importing the upgrade firmware corresponding to each piece of identification information from the KVM master device, and performing a secondary upgrade on the original firmware based on the upgrade firmware imported from the KVM master device;

[0191] or,

[0192] Receive and parse the upgrade instruction, determine the upgrade mode corresponding to the multiple KVM devices to be upgraded, the KVM devices to be upgraded include the KVM master device and at least one KVM slave device, and the upgrade mode includes a smooth batch upgrade mode, a pseudo-smooth batch upgrade mode or an adaptive batch upgrade mode;

[0193] Based on the upgrade mode, the original firmware in the KVM master device is upgraded, and a batch upgrade message corresponding to the upgrade mode is determined, the batch upgrade message is used to instruct the KVM slave device to determine identification information of at least one upgrade firmware based on the batch upgrade message; and based on the batch upgrade message, the upgrade firmware corresponding to each identification information is imported from the remote tftp server, and the original firmware in the KVM slave device is initially upgraded based on the upgrade firmware imported from the remote tftp server; and in the event of failure of the initial upgrade, the upgrade firmware corresponding to each identification information is imported from the KVM master device, and the original firmware is secondarily upgraded based on the upgrade firmware imported from the KVM master device.

[0194] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the KVM device batch upgrade method provided by the above methods, the method comprising:

[0195] Receiving a batch upgrade message sent by a KVM master device, and determining identification information of at least one upgraded firmware based on the batch upgrade message;

[0196] Based on the batch upgrade message, import the upgrade firmware corresponding to each identification information from the remote tftp server, and perform a primary upgrade on the original firmware in the KVM slave device based on the upgrade firmware imported from the remote tftp server;

[0197] In case the initial upgrade fails, importing the upgrade firmware corresponding to each piece of identification information from the KVM master device, and performing a secondary upgrade on the original firmware based on the upgrade firmware imported from the KVM master device;

[0198] or,

[0199] Receive and parse the upgrade instruction, determine the upgrade mode corresponding to the multiple KVM devices to be upgraded, the KVM devices to be upgraded include the KVM master device and at least one KVM slave device, and the upgrade mode includes a smooth batch upgrade mode, a pseudo-smooth batch upgrade mode or an adaptive batch upgrade mode;

[0200] Based on the upgrade mode, the original firmware in the KVM master device is upgraded, and a batch upgrade message corresponding to the upgrade mode is determined, the batch upgrade message is used to instruct the KVM slave device to determine identification information of at least one upgrade firmware based on the batch upgrade message; and based on the batch upgrade message, the upgrade firmware corresponding to each identification information is imported from the remote tftp server, and the original firmware in the KVM slave device is initially upgraded based on the upgrade firmware imported from the remote tftp server; and in the event of failure of the initial upgrade, the upgrade firmware corresponding to each identification information is imported from the KVM master device, and the original firmware is secondarily upgraded based on the upgrade firmware imported from the KVM master device.

[0201] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0202] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0203] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for batch upgrading of KVM devices, characterized in that: Applicable to switch KVM slave devices, including: Receiving a batch upgrade message sent by a KVM master device, and determining identification information of at least one upgraded firmware based on the batch upgrade message; Based on the batch upgrade message, import the upgrade firmware corresponding to each identification information from the remote tftp server, and perform a primary upgrade on the original firmware in the KVM slave device based on the upgrade firmware imported from the remote tftp server; In case the initial upgrade fails, importing the upgrade firmware corresponding to each piece of identification information from the KVM master device, and performing a secondary upgrade on the original firmware based on the upgrade firmware imported from the KVM master device; The batch upgrade message is determined by the KVM master device based on the following steps: Verifying the upgraded firmware and determining a verification result; In the case where the verification result is successful, if the upgrade mode includes a smooth batch upgrade mode, determining the identification information corresponding to the upgrade firmware based on the upgrade instruction received by the KVM master device, and determining the batch upgrade message corresponding to the KVM slave device based on the identification information; In the case where the verification result is successful, if the upgrade mode includes a pseudo-smooth batch upgrade mode, then based on the upgrade instruction, identification information corresponding to at least two firmwares is determined, and the upgrade order and corresponding identification information of at least two upgraded firmwares required by each of the KVM slave devices are determined, and based on the upgrade order and the identification information, a batch upgrade message corresponding to the KVM slave device is determined; When the verification result is successful, if the upgrade mode includes an adaptive batch upgrade mode, an initial upgrade message is sent to the KVM slave device, and a target upgrade message sent by each KVM slave device in the same network and updated based on the initial upgrade message is received, the target upgrade message including the identification information of the original firmware in each KVM slave device; based on the target upgrade message, the upgrade order and corresponding identification information of at least two upgrade firmware required by each KVM slave device are determined; based on the upgrade order and corresponding identification information of at least two upgrade firmware required by each KVM slave device, a batch upgrade message is determined.

2. The KVM device batch upgrade method according to claim 1, characterized in that: The step of importing the upgrade firmware corresponding to the identification information from the remote TFTP server includes: Based on the batch upgrade message, determine the remote tftp server IP address; Based on the remote tftp server IP address, the upgrade firmware corresponding to the identification information is obtained from the remote tftp server, and the upgrade firmware obtained from the remote tftp server is imported into a preset memory area in the KVM slave device.

3. The KVM device batch upgrade method according to claim 2, characterized in that: Determine if the initial upgrade failed, including: Upgrading the KVM slave device based on the upgraded firmware in the preset memory area, and in case of upgrade failure, restarting the KVM slave device and retrieving the upgraded firmware in the preset memory area in the KVM slave device; When the version number of the upgrade firmware in the preset memory area is higher than the version number of the KVM slave device, the KVM slave device is upgraded again, and the initial upgrade result is determined; When the version number of the upgrade firmware in the preset memory area is not higher than the version number of the KVM slave device, the upgrade firmware in the preset memory area is deleted, and the initial upgrade result is determined to be a failure.

4. The KVM device batch upgrade method according to any one of claims 1 to 3, characterized in that: The initial upgrade of the original firmware in the KVM slave device based on the upgrade firmware imported from the remote tftp server includes: Determine the version number of the upgrade tool in the upgrade firmware; Compare the version number of the upgrade tool in the upgrade firmware with the version number of the upgrade tool in the corresponding KVM slave device to determine a comparison result; If the comparison result is that the version number of the upgrade tool in the upgrade firmware is not lower than the version number of the upgrade tool in the corresponding KVM slave device, updating the upgrade tool in the corresponding KVM slave device based on the upgrade tool in the upgrade firmware; If the comparison result is that the version number of the upgrade tool in the upgrade firmware is lower than the version number of the corresponding upgrade tool in the KVM slave device, determine the upgrade tool in the KVM slave device as the upgrade tool for this upgrade; Based on the upgrade firmware imported from the remote tftp server and the upgrade tool, the original firmware in the KVM slave device is initially upgraded.

5. The KVM device batch upgrade method according to any one of claims 1 to 3, characterized in that: Before receiving the batch upgrade message sent by the KVM master device, the method further includes: receiving an initial upgrade message sent by the KVM master device, wherein the initial upgrade message is sent by the KVM master device when determining that the upgrade mode includes an adaptive batch upgrade mode; Adding the identification information corresponding to the original firmware to the initial upgrade message to obtain a target upgrade message; The target upgrade message is sent to the KVM master device, where the target upgrade message is used to instruct the KVM master device to determine a batch upgrade message corresponding to each of the KVM slave devices based on identification information corresponding to each of the original firmware.

6. A method for batch upgrading of KVM devices, characterized in that: Applicable to switch KVM main equipment, including: Receive and parse the upgrade instruction, determine the upgrade mode corresponding to the multiple KVM devices to be upgraded, the KVM devices to be upgraded include the KVM master device and at least one KVM slave device, and the upgrade mode includes a smooth batch upgrade mode, a pseudo-smooth batch upgrade mode or an adaptive batch upgrade mode; Based on the upgrade mode, the original firmware in the KVM master device is upgraded, and a batch upgrade message corresponding to the upgrade mode is determined, the batch upgrade message is used to instruct the KVM slave device to determine identification information of at least one upgrade firmware based on the batch upgrade message; and based on the batch upgrade message, the upgrade firmware corresponding to each identification information is imported from the remote tftp server, and the original firmware in the KVM slave device is initially upgraded based on the upgrade firmware imported from the remote tftp server; and in the case of failure of the initial upgrade, the upgrade firmware corresponding to each identification information is imported from the KVM master device, and the original firmware is secondarily upgraded based on the upgrade firmware imported from the KVM master device; The determining of the batch upgrade message corresponding to the upgrade mode includes: Verifying the upgraded firmware and determining a verification result; In the case where the verification result is successful, if the upgrade mode includes a smooth batch upgrade mode, determining identification information corresponding to the upgrade firmware based on the upgrade instruction, and determining a batch upgrade message corresponding to the KVM slave device based on the identification information; In the case where the verification result is successful, if the upgrade mode includes a pseudo-smooth batch upgrade mode, then based on the upgrade instruction, identification information corresponding to at least two firmwares is determined, and the upgrade order and corresponding identification information of at least two upgraded firmwares required by each of the KVM slave devices are determined, and based on the upgrade order and the identification information, a batch upgrade message corresponding to the KVM slave device is determined; When the verification result is successful, if the upgrade mode includes an adaptive batch upgrade mode, an initial upgrade message is sent to the KVM slave device, and a target upgrade message sent by each KVM slave device in the same network and updated based on the initial upgrade message is received, the target upgrade message including the identification information of the original firmware in each KVM slave device; based on the target upgrade message, the upgrade order and corresponding identification information of at least two upgrade firmware required by each KVM slave device are determined; based on the upgrade order and corresponding identification information of at least two upgrade firmware required by each KVM slave device, a batch upgrade message is determined.

7. A device for implementing the KVM device batch upgrade method according to any one of claims 1 to 5, characterized in that: Applicable to switch KVM slave devices, including: A first determination module is used to receive a batch upgrade message sent by the KVM master device, and determine identification information of at least one upgraded firmware based on the batch upgrade message; An initial upgrade module, used to import the upgrade firmware corresponding to each of the identification information from a remote tftp server based on the batch upgrade message, and perform an initial upgrade on the original firmware in the KVM slave device based on the upgrade firmware imported from the remote tftp server; The secondary upgrade module is used to import the upgrade firmware corresponding to each identification information from the KVM main device when the initial upgrade fails, and perform a secondary upgrade on the original firmware based on the upgrade firmware imported from the KVM main device.

8. A device for implementing the KVM device batch upgrade method according to claim 6, characterized in that: Applicable to switch KVM main equipment, including: A second determination module is used to receive and parse the upgrade instruction, determine the upgrade mode corresponding to multiple KVM devices to be upgraded, the KVM devices to be upgraded include the KVM master device and at least one KVM slave device, and the upgrade mode includes a smooth batch upgrade mode, a pseudo-smooth batch upgrade mode or an adaptive batch upgrade mode; A sending module is used to upgrade the original firmware in the KVM master device based on the upgrade mode, determine the batch upgrade message corresponding to the upgrade mode, and send the batch upgrade message to each KVM slave device in the same network, so that the KVM slave device receives the batch upgrade message sent by the KVM master device, and determines the identification information of at least one upgrade firmware based on the batch upgrade message; and based on the batch upgrade message, import the upgrade firmware corresponding to each identification information from the remote tftp server, and perform the initial upgrade on the original firmware in the KVM slave device based on the upgrade firmware imported from the remote tftp server; and in the case of failure of the initial upgrade, import the upgrade firmware corresponding to each identification information from the KVM master device, and perform the secondary upgrade on the original firmware based on the upgrade firmware imported from the KVM master device.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the batch upgrade method of KVM devices according to any one of claims 1 to 5 is implemented, or the batch upgrade method of KVM devices according to claim 6 is implemented.

Citation Information

Patent Citations

  • A method and apparatus for upgrading a cascade device

    CN109240724A