Disclosure of Invention
The invention mainly aims to provide a switch upgrading method, a switch upgrading device and a computer readable storage medium, and aims to solve the problems that upgrading efficiency is low and the switches with the same factory IP are difficult to upgrade in batch due to the fact that simultaneous upgrading of multiple devices cannot be achieved in the prior art.
In order to achieve the above object, the present invention provides a method for upgrading a switch, the method comprising the steps of:
acquiring identification information of a switch through an Ethernet two-layer protocol message, wherein the identification information of the switch is generated according to a physical address of the switch;
determining a plurality of switches to be upgraded and corresponding files to be upgraded from the switches scanned by the Ethernet two-layer protocol message according to the identification information;
and when a batch upgrading command is received, writing the file to be upgraded into corresponding local switches to be upgraded through an Ethernet two-layer protocol message so as to complete the upgrading operation of the switches to be upgraded.
Optionally, the step of determining a plurality of switches to be upgraded and corresponding files to be upgraded in the switches scanned from the ethernet two-layer protocol packet according to the identification information includes:
acquiring the version information of the switch corresponding to the identification information through an Ethernet two-layer protocol message;
when the identification information is the same, comparing the acquired version information with version information prestored in the server to judge whether the version information is consistent;
determining a plurality of switches to be upgraded from the switches scanned by the Ethernet two-layer protocol message according to corresponding identification information when the version information is inconsistent;
and determining a corresponding file to be upgraded from the upgrade files prestored in the server according to the switch to be upgraded.
Optionally, when receiving a batch upgrade command, writing the file to be upgraded into the local of the corresponding multiple switches to be upgraded through an ethernet two-layer protocol packet, so as to complete the upgrade operation of the multiple switches to be upgraded, including:
when a batch upgrading command is received, determining a plurality of identification information of a switch corresponding to the batch upgrading command;
determining a plurality of target switches corresponding to the batch upgrading command from the switches to be upgraded according to the determined identification information;
and writing the corresponding files to be upgraded into the plurality of target switch local areas through Ethernet two-layer protocol messages so as to complete the upgrading operation of the plurality of target switch areas.
Optionally, after the step of determining a plurality of target switches corresponding to the batch upgrade command from the switches to be upgraded according to the determined identification information, the method includes:
judging whether the number of the target switches exceeds a preset number or not;
if yes, dividing the target switches into a plurality of target switches;
and writing the corresponding file to be upgraded into the plurality of target switch local areas in each batch through the Ethernet two-layer protocol message so as to finish the upgrading operation of the plurality of target switch areas in each batch.
Optionally, after the step of writing the file to be upgraded into the local areas of the plurality of switches to be upgraded through the ethernet two-layer protocol packet, the method includes:
judging whether the size of the files to be upgraded written into the local switches to be upgraded is larger than a first threshold value and smaller than a second threshold value;
if the number of the files to be upgraded is larger than the first threshold value and smaller than the second threshold value, judging that the files to be upgraded are written correctly, and finishing the upgrading operation of the corresponding switch according to the files to be upgraded which are written correctly;
and if the number of the files is smaller than the first threshold value or larger than the second threshold value, rewriting the corresponding files to be upgraded.
Optionally, after the step of writing the file to be upgraded into the local areas of the plurality of switches to be upgraded through the ethernet two-layer protocol packet, the method further includes:
writing the corresponding files to be upgraded into a plurality of local switches to be upgraded, controlling the corresponding switches to execute upgrading operation, and acquiring upgrading state information uploaded to a server by the switches through Ethernet two-layer protocol messages;
and determining the upgrading state of the corresponding switch according to the upgrading state information and the receiving time of the server for receiving the upgrading state information.
Optionally, after the step of determining the upgrade status of the corresponding switch according to the upgrade status information and the receiving time of the upgrade status information received by the server, the method includes:
when the switch receives a batch upgrading command and starts upgrading, judging whether a server receives upgrading state information reported by the switch within a first preset time;
if the server does not receive the upgrading state information within the first preset time or the received upgrading state information is upgrading failure information, judging that the corresponding switch is upgrading failed;
and when the received upgrade state information is upgrade success information, judging that the corresponding switch is upgraded successfully.
Optionally, after the step of determining whether the server receives the upgrade status information reported by the switch within the first preset time, the method includes:
and if the update request is not received, controlling the corresponding switch to send the update request after a second preset time, and ending the update request until the server receives the update state information reported by the switch.
In addition, in order to achieve the above object, the present invention further provides a switch upgrading apparatus, which includes a memory, a processor, and a switch upgrading program stored on the processor and operable on the processor, wherein the processor implements the steps of the switch upgrading method when executing the switch upgrading program.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a switch management program which, when executed by a processor, implements the steps of the switch management method as described above.
In the embodiment of the invention, the identification information of the switch is obtained through the Ethernet two-layer protocol message, a plurality of switches to be upgraded and corresponding files to be upgraded are determined from the switches scanned by the Ethernet two-layer protocol message according to the identification information, when a batch upgrading command is received, the files to be upgraded are written into the corresponding local areas of the switches to be upgraded through the Ethernet two-layer protocol message so as to complete the upgrading operation of the switches to be upgraded, the batch upgrading of the switches is realized through the Ethernet two-layer protocol, and the unique identification information of the switches is generated according to the physical addresses of the switches, so that the corresponding switches to be upgraded can be quickly found according to the unique identification information and subjected to batch upgrading, and the efficiency of the batch upgrading of the switches is improved.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Acquiring identification information of a switch through an Ethernet two-layer protocol message, wherein the identification information of the switch is generated according to a physical address of the switch; determining a plurality of switches to be upgraded and corresponding files to be upgraded from the switches scanned by the Ethernet two-layer protocol message according to the identification information; and when a batch upgrading command is received, writing the file to be upgraded into corresponding local switches to be upgraded through an Ethernet two-layer protocol message so as to complete the upgrading operation of the switches to be upgraded.
The existing upgrading method mainly carries out single upgrading through a webpage or a serial port, and for the switches with the same IP of a factory, because the switches with the same IP are difficult to distinguish and identify, the existing upgrading method is inconvenient to establish communication connection with corresponding switch equipment, so that the switches with the same IP are difficult to be upgraded in batches. Therefore, the invention provides a switch upgrading method, a switch upgrading device and a computer readable storage medium, wherein identification information of a switch is acquired through an Ethernet two-layer protocol message, the identification information of the switch is generated according to a physical address of the switch, a plurality of switches to be upgraded and corresponding files to be upgraded are determined from the switches scanned by the Ethernet two-layer protocol message according to the identification information, when a batch upgrading command is received, the files to be upgraded are written into the corresponding local areas of the switches to be upgraded through the Ethernet two-layer protocol message so as to complete upgrading operation of the switches to be upgraded, batch upgrading transmission is performed according to unique identification information of the switches based on the Ethernet two-layer protocol message instead of upgrading based on an IP address, and the problem that batch upgrading is difficult according to the IP address when the IP address is the same is avoided, the effect of upgrading the switch in batches can be improved, and the unique identification information is more favorable for finding the corresponding switch to be upgraded quickly to complete data transmission and upgrading operation, so that the efficiency of upgrading the switch in batches is improved.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a switch upgrading apparatus in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the switch upgrading apparatus may include: acommunication bus 1002, aprocessor 1001, such as a CPU, auser interface 1003, anetwork interface 1004, and amemory 1005. Wherein acommunication bus 1002 is used to enable connective communication between these components. Theuser interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and theoptional user interface 1003 may also include a standard wired interface, a wireless interface. Thenetwork interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). Thememory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). Thememory 1005 may alternatively be a storage device separate from theprocessor 1001.
It will be appreciated by those skilled in the art that the terminal architecture shown in fig. 1 does not constitute a limitation of the switch upgrading apparatus and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, amemory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a switch upgrade program.
In the switch upgrading apparatus shown in fig. 1, thenetwork interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; theuser interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and theprocessor 1001 may be configured to invoke a switch upgrade program stored in thememory 1005 and perform the following operations:
acquiring identification information of a switch through an Ethernet two-layer protocol message, wherein the identification information of the switch is generated according to a physical address of the switch;
determining a plurality of switches to be upgraded and corresponding files to be upgraded from the switches scanned by the Ethernet two-layer protocol message according to the identification information;
and when a batch upgrading command is received, writing the file to be upgraded into corresponding local switches to be upgraded through an Ethernet two-layer protocol message so as to complete the upgrading operation of the switches to be upgraded.
Alternatively, theprocessor 1001 may call a switch upgrade program stored in thememory 1005, and further perform the following operations:
acquiring the version information of the switch corresponding to the identification information through an Ethernet two-layer protocol message;
when the identification information is the same, comparing the acquired version information with version information prestored in the server to judge whether the version information is consistent;
determining a plurality of switches to be upgraded from the switches scanned by the Ethernet two-layer protocol message according to corresponding identification information when the version information is inconsistent;
and determining a corresponding file to be upgraded from the upgrade files prestored in the server according to the switch to be upgraded.
Alternatively, theprocessor 1001 may call a switch upgrade program stored in thememory 1005, and further perform the following operations:
when a batch upgrading command is received, determining a plurality of identification information of a switch corresponding to the batch upgrading command;
determining a plurality of target switches corresponding to the batch upgrading command from the switches to be upgraded according to the determined identification information;
and writing the corresponding files to be upgraded into the plurality of target switch local areas through Ethernet two-layer protocol messages so as to complete the upgrading operation of the plurality of target switch areas.
Optionally, after the step of determining a plurality of target switches corresponding to the batch upgrade command from the switches to be upgraded according to the determined identification information, theprocessor 1001 invokes a switch upgrade program stored in thememory 1005, and performs the following operations:
judging whether the number of the target switches exceeds a preset number or not;
if yes, dividing the target switches into a plurality of target switches;
and writing the corresponding file to be upgraded into the plurality of target switch local areas in each batch through the Ethernet two-layer protocol message so as to finish the upgrading operation of the plurality of target switch areas in each batch.
Optionally, after the step of writing the file to be upgraded into the local areas of the corresponding multiple switches to be upgraded through the ethernet two-layer protocol packet, theprocessor 1001 may call the switch upgrade program stored in thememory 1005, and further perform the following operations:
judging whether the size of the files to be upgraded written into the local switches to be upgraded is larger than a first threshold value and smaller than a second threshold value;
if the number of the files to be upgraded is larger than the first threshold value and smaller than the second threshold value, judging that the files to be upgraded are written correctly, and finishing the upgrading operation of the corresponding switch according to the files to be upgraded which are written correctly;
and if the number of the files is smaller than the first threshold value or larger than the second threshold value, rewriting the corresponding files to be upgraded.
Optionally, after the step of writing the file to be upgraded into the local areas of the corresponding multiple switches to be upgraded through the ethernet two-layer protocol packet, theprocessor 1001 may call the switch upgrade program stored in thememory 1005, and further perform the following operations:
writing the corresponding files to be upgraded into a plurality of local switches to be upgraded, controlling the corresponding switches to execute upgrading operation, and acquiring upgrading state information uploaded to a server by the switches through Ethernet two-layer protocol messages;
and determining the upgrading state of the corresponding switch according to the upgrading state information and the receiving time of the server for receiving the upgrading state information.
Optionally, after the step of determining the upgrade status of the corresponding switch according to the upgrade status information and the receiving time of the upgrade status information received by the server, theprocessor 1001 may call a switch upgrade program stored in thememory 1005, and further perform the following operations:
when the switch receives a batch upgrading command and starts upgrading, judging whether a server receives upgrading state information reported by the switch within a first preset time;
if the server does not receive the upgrading state information within the first preset time or the received upgrading state information is upgrading failure information, judging that the corresponding switch is upgrading failed;
and when the received upgrade state information is upgrade success information, judging that the corresponding switch is upgraded successfully.
Optionally, after the step of determining whether the server receives the upgrade status information reported by the switch within the first preset time, theprocessor 1001 may call the switch upgrade program stored in thememory 1005, and further perform the following operations:
and if the update request is not received, controlling the corresponding switch to send the update request after a second preset time, and ending the update request until the server receives the update state information reported by the switch.
Referring to fig. 2, fig. 2 is a flowchart of a first embodiment of a switch upgrading method according to the present invention, in this embodiment, the switch upgrading method includes the following steps:
step S10: acquiring identification information of the switch through an Ethernet two-layer protocol message, wherein the identification information of the switch is generated according to a physical address of the switch;
according to the traditional switch upgrading scheme for upgrading the IP address based on the switch, when the IP addresses of the switches are the same (like the switches produced by a same manufacturer, the outgoing IP addresses of the switches are usually the same), if batch upgrading is carried out according to the IP addresses of the switches, when upgrading is abnormal in the upgrading process, the switch with the abnormal upgrading is difficult to determine according to the state information corresponding to the corresponding IP address reported by the switch, so that the abnormal information of the corresponding switch can be timely processed, and the like. Therefore, in this embodiment, before the switch is upgraded, the identification information of the switch is obtained through the ethernet two-layer protocol packet, where the identification information corresponds to each switch one to one and is unique identification information of each switch. The identification information of the switch is generated according to the physical address of the switch after the physical address of the switch is acquired. After the corresponding identification information is generated, when the switch is found through the scanning of the Ethernet two-layer protocol message, the identification information of the switch scanned through the Ethernet two-layer protocol message can be obtained. Before discovering the switch through the ethernet two-layer protocol message scanning, a local server supporting network transmission, such as a gateway or a three-layer switch, is deployed in a local area network where the switch is located, and then a server program is deployed on the server to support transmission based on the ethernet two-layer protocol, so that the switch can establish communication with the server through the ethernet two-layer protocol, the switch is discovered through the two-layer discovery message scanning, and after the corresponding switch receives the two-layer discovery message sent by the server, identification information of the switch reported to the server by the switch through an update message is acquired.
Step S20: determining a plurality of switches to be upgraded and corresponding files to be upgraded from the switches scanned by the Ethernet two-layer protocol message according to the identification information;
after the identification information of the switches is obtained, a plurality of switches to be upgraded and corresponding files to be upgraded can be determined from the switches scanned by the Ethernet two-layer protocol message according to the identification information. Specifically, while the identification information of the switch is obtained through the ethernet two-layer protocol packet, version information corresponding to the identification information may also be obtained, and the version information and the corresponding identification information are reported to the server together. After the identification information of the switch and the corresponding version information are reported to the server, because the version information corresponding to different identification information is prestored in the server, under the condition that the identification information is the same, the reported version information is matched with the version information prestored in the server, and whether the switch equipment corresponding to different identification information needs to be upgraded or not is judged according to the matching result. And determining corresponding identification information when the reported version information is consistent with the corresponding pre-stored version information according to the matching result, taking the identification information as target identification information, and determining the switch corresponding to the target identification information as the switch to be upgraded. After the target identification information and the corresponding switch to be upgraded are determined, the latest version information corresponding to different switches and the corresponding identification information are stored in the server in a correlated manner in advance, so that the files to be upgraded corresponding to the switches to be upgraded one by one can be determined according to the target identification information.
Step S30: and when a batch upgrading command is received, writing the file to be upgraded into corresponding local switches to be upgraded through an Ethernet two-layer protocol message so as to complete the upgrading operation of the switches to be upgraded.
When a batch upgrading command is received, according to the received batch upgrading command, a plurality of identification information corresponding to the batch upgrading command is determined, according to the identification information, a plurality of target switches to be upgraded corresponding to the batch upgrading command can be determined from the switches to be upgraded, and files to be upgraded corresponding to the target switches can be determined from the files to be upgraded.
On one hand, when a plurality of switches to be upgraded are upgraded in batch at the same time, the number of the supported switches to be upgraded at the same time is limited, after a plurality of target switches corresponding to the batch upgrading command are determined, whether the number of the target switches exceeds a preset number needs to be judged, and if the number of the target switches does not exceed the preset number, the corresponding files to be upgraded are directly written into the local areas of the target switches so as to finish the upgrading operation of the target switches; and if the number of the target switches exceeds the preset number, the preset number is used as a batch limit, and the target switches are subjected to batch processing to obtain a plurality of batches of target switches. The specific batch mode may be: equally dividing the target switches into a plurality of target switches of corresponding batches on the principle that the number of the switches of each batch does not exceed the preset number; or, on the basis of reaching the preset number, the target switch number of each batch is taken as the preset number to perform batch processing until the last batch (the number of the last batch may be less than the preset number), and so on. If the threshold value of the number of switches (that is, the preset number) supporting simultaneous batch upgrade is 256 in this embodiment, when there are 600 target switches, the 600 target switches may be divided into 3 batches, each batch has 200 target switches, or the 600 target switches may be divided into two batches of 256 switches and one batch of 88 switches, so as to obtain three batches of target switches. After the target switches are processed in batches to obtain a plurality of batches of switches to be upgraded, writing the corresponding files to be upgraded into the local areas of the target switches in each batch through Ethernet two-layer protocol messages so as to complete the upgrading operation of the target switches in each batch. If three batches of target switches are obtained through batch processing, according to the sequence of the first batch, the second batch and the third batch, firstly writing the corresponding files to be upgraded into the local part of the first batch of target switches through Ethernet two-layer protocol messages to complete the upgrading operation of the first batch of target switches, then writing the corresponding files to be upgraded into the local part of the second batch of target switches through Ethernet two-layer protocol messages to complete the batch upgrading of the second batch of target switches, and finally writing the corresponding files to be upgraded into the local part of the third batch of target switches through Ethernet two-layer protocol messages to complete the batch upgrading of the third batch of target switches. The batch can be determined according to the transmission distance, transmission rate, transmission effect and the like of the data.
On the other hand, after files to be upgraded corresponding to the target switches are determined from the files to be upgraded, the corresponding files to be upgraded can be written into the determined local switches to be upgraded through an Ethernet two-layer protocol message. The specific writing process may include: after the file to be upgraded is determined, performing sub-packet processing on the file to be upgraded according to file information (including file size) of the file to be upgraded to obtain a data packet corresponding to the file to be upgraded after sub-packet processing, determining an index number (serial number) of the data packet after sub-packet processing, requesting the corresponding data packet according to the index number (serial number) of the data packet in a mode of increasing the index number progressively (namely the serial number is increased from small to large), and sequentially writing the requested data packet into a corresponding local switch through an Ethernet two-layer protocol message; and when the index number is increased to be consistent with the packet number of the data packet, the writing of the corresponding file to be upgraded is finished.
In addition, after the file to be upgraded is written into the local of the corresponding plurality of switches to be upgraded through the ethernet two-layer protocol message, whether the written file to be upgraded is written correctly or not needs to be judged according to the size of the file to be upgraded written into the local of the switch, that is, whether the size of the file to be upgraded is larger than a first preset threshold and smaller than a second preset threshold or not is judged, if the size of the file to be upgraded is larger than the first preset threshold and smaller than the second preset threshold, the file to be upgraded is judged to be written correctly, and the upgrading operation of the corresponding switch is completed according to the file to be upgraded which is written correctly; in addition, when the size of the file written into the local to-be-upgraded file of the switch is smaller than a first preset threshold value or larger than a second preset threshold value, it is determined that the file to be upgraded is wrongly written, and the corresponding switch to be upgraded cannot be upgraded. And at the moment, generating feedback information for the file to be upgraded with the error, rewriting the corresponding file to be upgraded according to the feedback information, and after rewriting the corresponding file to be upgraded, finishing the upgrading operation on the corresponding switch according to the file to be upgraded which is locally written in the switch only when the rewritten file to be upgraded is larger than a first preset threshold value and smaller than a second preset threshold value.
In this embodiment, identification information of switches is obtained through an ethernet two-layer protocol packet, a plurality of switches to be upgraded and corresponding files to be upgraded are determined from the switches scanned by the ethernet two-layer protocol packet according to the identification information, and when a batch upgrade command is received, the files to be upgraded are written into a plurality of corresponding local switches to be upgraded through the ethernet two-layer protocol packet, so as to complete upgrade operations of the switches to be upgraded. The identification information is generated according to the physical address of the switch, is unique identification information of each switch device, is based on the identification information to perform connection communication to complete batch upgrading instead of performing connection communication based on the IP address of the switch, not only is batch upgrading realized, but also the difficulty in batch upgrading of the same exchange of factory IPs is avoided, and the upgrading efficiency of the switch and the reliability of batch upgrading are improved.
Referring to fig. 3, fig. 3 is a flowchart of a second embodiment of the switch upgrading method of the present invention, in this embodiment, the switch upgrading method includes the following steps:
step S11: acquiring identification information of a switch through an Ethernet two-layer protocol message, wherein the identification information of the switch is generated according to a physical address of the switch;
step S12: determining a plurality of switches to be upgraded and corresponding files to be upgraded from the switches scanned by the Ethernet two-layer protocol message according to the identification information;
step S13: when a batch upgrading command is received, writing the file to be upgraded into corresponding local switches to be upgraded through an Ethernet two-layer protocol message so that the switches to be upgraded execute upgrading operation, and acquiring upgrading state information uploaded to a server by the switches through the Ethernet two-layer protocol message;
step S14: and determining the upgrading state of the corresponding switch according to the upgrading state information and the receiving time of the server for receiving the upgrading state information.
In this embodiment, when a batch upgrade command is received, the file to be upgraded is written into the corresponding local switches to be upgraded through the ethernet two-layer protocol packet, so that the plurality of switches to be upgraded execute the upgrade operation, the switches also report the upgrade status information of each switch to be upgraded to the server one by one, and the upgrade status information uploaded to the server by the switches can be acquired through the ethernet two-layer protocol packet. According to the upgrade state information of the corresponding switch (namely, the upgrade state information obtained through the ethernet two-layer protocol message) received by the server and the receiving time of the upgrade state information, the upgrade state of the corresponding switch can be determined. The process of determining the upgrade status of the corresponding switch is as follows: starting a timer when a corresponding switch starts to be upgraded, judging whether the switch receives upgrade state information of the corresponding switch within first preset time, if the upgrade state information of the corresponding switch is received within the first preset time, continuously judging that the received upgrade state information is upgrade failure information, and if the received upgrade state information is the upgrade failure information, judging that the switch corresponding to the upgrade failure information fails to be upgraded; if the received upgrade state information is not upgrade failure information but upgrade success information, judging that the switch corresponding to the upgrade success information is upgraded successfully; if the upgrade state information of the corresponding switch is not received within the first preset time, if a network is disconnected in the upgrade process, the switch to be upgraded corresponding to the batch upgrade command and the switch which has already received the upgrade state information by the server can determine that the server does not receive the switch of the upgrade state information, and the switch which has not received the upgrade state information by the server is also determined as failed in upgrade. And only controlling the corresponding switch to continuously send the upgrading request after the corresponding switch receives the upgrading state information reported by the switch within the second preset time under the condition that the server does not receive the upgrading state information within the first preset time due to the conditions of network disconnection and the like until the server receives the upgrading state information reported by the switch, and ending the request. In addition, for the switch which fails to be upgraded, the server can correspondingly display the upgrading state information of the corresponding switch after receiving the upgrading state information, and the upgrading failure reason of the switch which fails to be upgraded can be determined according to the upgrading failure information displayed by the server and the receiving time of the upgrading state information, so that the user can process the switch according to the corresponding failure reason to complete the upgrading operation of the corresponding switch. If the corresponding reason of the upgrade failure can be determined to be file abnormality, verification failure and the like according to the upgrade failure information displayed by the server, and if the reason of the upgrade failure is the network disconnection condition in the process of the upgrade request and the like can be determined according to the receiving time of the upgrade state information received by the server.
In this embodiment, identification information of switches is obtained through an ethernet two-layer protocol message, a plurality of switches to be upgraded and corresponding files to be upgraded are determined from the switches scanned by the ethernet two-layer protocol message according to the identification information, when a batch upgrade command is received, the files to be upgraded are written into the local of the corresponding switches to be upgraded through the ethernet two-layer protocol message to complete upgrade operation of the switches to be upgraded, upgrade status information of each switch to be upgraded is reported to a server through the ethernet two-layer protocol message, the upgrade status of the corresponding switch is determined according to the upgrade status information received by the server and the receiving time of the upgrade status information received by the server, so that the reason of the upgrade failure is searched for the switch which fails to be upgraded, so that each switch to be upgraded corresponding to the batch upgrade command can smoothly complete the upgrade operation, the effect of upgrading the switches in batches is improved.
In addition, an embodiment of the present invention further provides a switch upgrading apparatus, where the switch upgrading apparatus includes a memory, a processor, and a switch upgrading program that is stored on the processor and is executable on the processor, and the processor implements the steps of the switch upgrading method when executing the switch upgrading program.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a switch upgrading program is stored on the computer-readable storage medium, and when executed by a processor, the switch upgrading program implements the steps of the switch upgrading method described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, a television, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.