Disclosure of Invention
The invention aims to solve the technical problem that when large-scale communication equipment software is upgraded, the operating pressure of a server is increased, so that the server is blocked, and the software upgrading process of the communication equipment is blocked or interrupted.
In order to solve the technical problem, the technical scheme adopted by the invention is to provide a communication equipment software upgrading method, which comprises the following steps:
downloading an upgrade package for the communication device from a server;
sending version information of the upgrade package and upgrade instructions originating from the server to the communication device;
after receiving the upgradable response information returned by the communication equipment according to the version information of the upgrade package and the upgrade instruction, sending the upgrade package to the communication equipment;
and receiving upgrade result information of the communication equipment for upgrading according to the upgrade package, and feeding back the upgrade result information to the server.
In the above method, sending version information of the upgrade package and an upgrade instruction from the server to the communication device includes: and opening and reading the upgrade package through a system file interface, and storing the version information of the upgrade package.
In the above method, further comprising setting a time for receiving the non-upgradable response information or the upgradable response information.
The invention also provides a control device for upgrading the software of the communication equipment, which comprises the following components: the adapter is used for receiving an upgrading instruction from a server and sending the upgrading instruction to the loader, and the adapter receives upgrading result information of the communication equipment and feeds the upgrading result information back to the server;
the loader is used for downloading the upgrade package from the server, receiving the upgrade instruction, and sending the upgrade instruction and the downloaded upgrade package to the communication equipment; and receiving upgradable response information, non-upgradable response information and upgrading result information from the communication equipment, and sending the upgrading result information to the adapter.
In the above control device, the loader is further configured to detect whether the upgrade package is successfully downloaded; if the download is successful, response information of successful download is sent to the server through the adapter; and if the download fails, sending response information of the download failure.
In the above apparatus, further comprising a timer disposed on the loader, for setting a time when the loader receives the upgradable response information or the non-upgradable response information.
The invention also provides a system for upgrading the software of the communication equipment, which comprises a server, the communication equipment and the control device for upgrading the software of the communication equipment.
The invention also provides a method for upgrading the software of the communication equipment, which is applied to a system, wherein the system comprises a server, the communication equipment and a control device;
the control means downloads an upgrade package for the communication device from the server;
the control device sends version information of the upgrade package and an upgrade instruction from the server to the communication device;
the communication equipment receives the upgrading instruction and the version information of the upgrading packet, and returns upgradable response information or non-upgradable response information to the control device after comparing the version information of the upgrading packet with the software version information currently operated by the communication equipment;
after receiving the upgradable response information, the control device sends the upgrade package to the communication equipment;
after the communication equipment downloads and operates the upgrade package for upgrading, the communication equipment sends upgrade result information to the control device, and after the control terminal receives the upgrade result information, the upgrade result information is sent to the server.
In the above method, after the communication device receives the version information of the upgrade package, the method of comparing the version information of the upgrade package with the software version information currently running by the communication device further includes: if the version information of the upgrade package is higher than the software version information currently operated by the communication equipment, feeding back the upgradable response information to the control device; and if the version information of the upgrade package is lower than or equal to the software version information currently operated by the communication equipment, feeding back non-upgradable response information to the control device.
In the above method, after the communication device downloads and runs the upgrade package for upgrade, the communication device sends upgrade result information to the control apparatus, further comprising: if the upgrade is successful, sending result information of the successful upgrade; and if the upgrading fails, sending result information of the upgrading failure.
Compared with the prior art, the method and the device have the advantages that the control device is additionally arranged between the server and the communication equipment, part of work of the server is transferred to the control device, only the control device downloads the upgrade package from the server in the software upgrading process of the plurality of communication equipment, the plurality of communication equipment are prevented from downloading the upgrade package from the server, the working pressure of the server is relieved to a great extent, and the phenomenon that the server is blocked and the upgrading process of the communication equipment is influenced is avoided. The server processes the feedback information of the communication equipment through the control device, and the control device only needs to arrange the collected upgrade result information of the plurality of communication equipment and feed the sorted upgrade result information back to the server, so that the working pressure of the server can be further reduced.
Detailed Description
The invention provides a method, a control device and a system for upgrading communication equipment software, which are used for solving the problems that in the prior art, when large-scale communication software is upgraded, the operating pressure of a server is increased, the server is blocked, and the software upgrading process of the communication equipment is blocked or interrupted.
The method, control device and system for upgrading software of communication equipment according to the present invention are described in detail below with reference to the preferred embodiments and the accompanying drawings.
In the first embodiment of the present invention, the system for upgrading software of a communication device includes a server 1, a control device 2, and a communication device 3, as shown in fig. 1 and 2. The control device 2 includes an adapter 21 and a loader 22. The control device 2 establishes link connection with the server 1 to transmit the upgrade package and various information; the control device 2 establishes a link connection with the communication apparatus 3 to perform transmission of the upgrade package and various information. For the aspect of software upgrade of the communication device 3, the transmission of various information between the server 1 and the control device 2 mainly includes the transmission of an upgrade instruction and the transmission of upgrade result information; the transmission of various information between the control apparatus 2 and the communication device 3 mainly includes transmission of an upgrade instruction, version information of an upgrade package, upgradable response information, non-upgradable response information, download success, download failure, and upgrade result information.
The whole system works as follows:
the control device 2 downloads the upgrade package from the server 1, then the server 1 sends an upgrade instruction to the control device 2, and after receiving the upgrade instruction, the control device 2 opens and reads the upgrade package through the system file interface to obtain the version information of the upgrade package and store the version information. In the present embodiment, the system file interface refers to a file access/storage interface provided by the operating system of the control device 2. Then, the control device 2 transmits the upgrade instruction and the version information of the upgrade package to the communication apparatus 3, and the communication apparatus 3 feeds back the upgradable response information to the control device 2 after comparing the version information of the upgrade package with the information of the software version currently running thereon. And after receiving the upgradable response information, the control device 2 sends an upgrade package to the communication equipment 3, and after the communication equipment 3 successfully loads the upgrade package, the software is operated to upgrade and upgrade result information is sent to the control device 2. The control device 2 transfers the upgrade result information to the server 1.
In the present embodiment, the control apparatus 2 can establish links with a plurality of communication devices 3. Based on the upgrade system of the 5G architecture, the number of the control apparatus 2 connected to the communication device 3 is preferably 256. Preferably, the plurality of communication devices 3 sequentially perform the upgrade operation, and when the upgrade process of one communication device 3 is finished, the upgrade operation of the next communication device 3 is performed.
In this embodiment, part of the work of the server 1 is transferred to the control device 2, and in the process of upgrading software of the plurality of communication devices 3, only the control device 2 downloads the upgrade package from the server 1, so as to avoid that the plurality of communication devices 3 all download the upgrade package from the server 1, thereby greatly reducing the working pressure of the server 1, and avoiding that the server 1 is jammed and affects the upgrade process of the communication devices 3. The server 1 processes the feedback information of the communication devices 3 through the control device 2, and the control device 2 only needs to arrange and feed back the collected upgrade result information of the plurality of communication devices 3 to the server 1, so that the working pressure of the server 1 can be further reduced.
In a further embodiment of the present invention, as shown in fig. 2, the control apparatus 2 includes an adapter 21 and a loader 22, the adapter 21 is configured to receive an upgrade instruction from the server 1 and send the upgrade instruction to the loader 22, and the adapter 21 receives upgrade result information of the communication device 3 and feeds back the same to the server 1. The loader 22 is used for downloading the upgrade package from the server 1 and receiving the upgrade instruction, and sending the upgrade instruction and the downloaded upgrade package to the communication device 3; the loader 22 receives the upgradable response information, the non-upgradable response information, and the upgrade result information from the communication device 3, and transmits the upgrade result information to the adapter 21.
In a further embodiment of the present invention, the loader 22 downloads the upgrade package from the server 1 and stores the downloaded upgrade package, and at the same time, the loader 22 detects whether the upgrade package is successfully downloaded; if the download is successful, the loader 22 sends a response message of successful download to the server 1 through the adapter 21; if the download fails, the loader 22 transmits a response message indicating that the download failed to the server 1 through the adapter 21. After the loader 22 successfully downloads the upgrade package from the server 1, the adapter 21 sends an upgrade instruction from the server 1 to the loader 22, and after the loader 22 receives the upgrade instruction, the loader 22 opens and reads the upgrade package through the system file interface to obtain version information of the upgrade package and save the version information.
In a further embodiment of the invention, as shown in fig. 2, the control device 2 further comprises a timer 221. A timer 221 is disposed on the loader 22 for setting the time at which the loader 22 receives the upgradeable response information or the non-upgradeable response information from the communication apparatus 3. If the loader 22 does not receive the upgradable response message or the non-upgradable response message within the set time, the loader 22 sends a response message of the link failure to the adapter 21, and the upgrade process is terminated. If the loader 22 receives the non-upgradable response message within the set time, the loader 22 sends a non-upgradable response message to the adapter 21, indicating that the communication device 3 does not need to perform software upgrade, and the upgrade process is terminated. If the loader 22 receives the upgradeable response message within the set time, the loader 22 sends the upgradeable response message to the adapter 21. Then, the loader 22 transmits the upgrade package to the communication apparatus 3.
The method for upgrading the software of the communication equipment in the second aspect of the invention is applied to a system which comprises a server 1, a control device 2 and the communication equipment 3. The control device 2 includes an adapter 21, a loader 22, and a timer 221. In the present embodiment, the control apparatus 2 can establish links with a plurality of communication devices 3. Based on the upgrade system of the 5G architecture, the number of the control apparatus 2 connected to the communication device 3 is preferably 256. Preferably, the plurality of communication devices 3 sequentially perform the upgrade operation, and when the upgrade process of one communication device 3 is finished, the upgrade operation of the next communication device 3 is performed. Before upgrading the software version of the communication equipment, an upgrade package of the communication equipment needs to be stored in the server, wherein the upgrade package comprises the software upgrade version and relevant identification information of a plurality of communication equipment connected with the control device.
As shown in fig. 3, the method for upgrading software of a communication device is applied to a system, and comprises the following steps:
s100, the loader downloads the upgrade package from the server. If the downloading is finished, the loader sends response information of successful downloading to the server through the adapter; and if the downloading fails, the loader sends response information of the downloading failure to the server through the adapter.
S110, the server sends an upgrading instruction to the adapter, the adapter sends the upgrading instruction to the loader after receiving the upgrading instruction, and the loader opens and reads the downloaded upgrading packet through the system file interface after receiving the upgrading instruction so as to acquire and store the version information of the upgrading packet and the identification information of the communication equipment.
And S120, the loader inquires information of the communication equipment connected with the control device and determines the number of the communication equipment connected with the control device.
S130, the loader sends an upgrading instruction and version information of the upgrading packet to the communication equipment, and meanwhile, a timer is started. It is determined whether the loader can receive the response information from the communication device within the timing time. If not, the loader sends response information of the link failure to the adapter, and the upgrading fails; if so, judging whether the received information is the scalable response information. If the received response information is the non-upgradable response information, the loader sends the non-upgradable response information to the adapter, and the upgrading process is terminated; if an upgradeable response message is received, the upgrade process continues.
And S140, if the loader receives the upgradable response information, the loader transmits an upgrade package to the communication equipment and judges whether the communication equipment successfully downloads the upgrade package. If the download fails, response information of the download failure is sent to the loader; and if the downloading is successful, sending response information of successful downloading to the loader.
S150, if the communication equipment successfully downloads the upgrade package, the communication equipment runs the upgrade package to upgrade the software, and after the upgrade is successful, the communication equipment sends response information of the upgrade success to the loader. Then, the loader sends a response message that the upgrade is successful to the adapter.
In a further embodiment of the present invention, as shown in fig. 4, step S130 further includes:
s131, after the communication equipment receives the upgrading instruction and the version information of the upgrading packet from the loader, the communication equipment runs protocol stack software to analyze so as to obtain the information of the software upgrading version, the file attribute and the like.
S132, the communication equipment runs the protocol stack software and opens the software currently running by the communication equipment through the related interface of the system file so as to acquire the version information of the software currently running.
S133, comparing the software version information currently operated by the communication equipment with the software upgrading version information, and judging whether the software upgrading version information is higher than the software version information currently operated. If the software upgrading version information is lower than or equal to the currently running software version information, the communication equipment sends communication equipment non-upgrading response information and a non-upgrading reason to the loader; and if the software upgrading version information is higher than the currently running software version information, the communication equipment sends communication equipment upgrading response information to the loader.
In a further embodiment of the present invention, step S130 further comprises: the loader does not receive the response information from the communication device within the timing time, the loader transmits the response information of the link failure to the adapter. The loader then sends the upgrade instruction and version information of the upgrade package to the next communication device across the failed link.
The control device circularly executes the steps S130 to S150 according to the connection number of the communication equipment, and carries out the first round of upgrading operation on all the communication equipment; and for the communication equipment with failed upgrade, circularly executing the steps S130 to S150 again, and carrying out a second round of upgrade operation on the communication equipment. After the upgrading operation of all the communication equipment is finished, the adapter sorts the upgrading result information of all the communication equipment and sends the upgrading result information to the server, and the server determines whether the restarting is effective or not.
According to the method for upgrading the software of the communication equipment in the second aspect of the invention, it can be known that in the process of upgrading the software of a plurality of communication equipment, the control device only needs to download the upgrade package from the server once, only the transmission of information such as the upgrade instruction, the upgrade result information, whether the download is successful and the like is carried out between the control device and the server, the plurality of communication equipment directly establish a link with the control device for upgrading the software, the control device processes the feedback information of the process of upgrading the communication equipment, and part of the work of the server is transferred to the control device, so that the working pressure of the server is reduced to a great extent. The phenomenon that the server is blocked due to high working pressure of the server in the prior art so as to influence the software upgrading process of the communication equipment is effectively avoided.
The method for upgrading the software of the communication equipment in the third embodiment of the invention is applied to the control device, and as shown in fig. 5, the method comprises the following steps:
s200, the control device downloads an upgrade package for the communication equipment from the server.
S210, the control device opens and reads the upgrade package through the system file interface, and saves the version information of the upgrade package. Then, the control means transmits version information of the upgrade package and an upgrade instruction from the server to the communication device.
S220, after the control device receives the upgradable response information returned by the communication equipment according to the version information of the upgrade package and the upgrade instruction within the set time, the control device sends the upgrade package to the communication equipment.
And S230, the control device receives the upgrading result information of the communication equipment which is upgraded according to the upgrading packet and feeds the upgrading result information back to the server.
The present embodiment has been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the spirit of the present invention.