Based on upgrade method for communication device and the system of single memory blockTechnical field
The present invention relates to communication equipment upgrading field, be specifically related to a kind of upgrade method for communication device based on single memory block and system.
Background technology
Along with scientific and technological develop rapidly, communication system becomes and becomes increasingly complex, and becomes day by day frequent for the upgrading of communication facilities and maintenance.In existing technology, the upgrading of communication facilities is by configuring separately a station server storage equipment software, and upgrades to individual equipment software.This traditional upgrade method can not meet the needs to communication equipment upgrading in enormous quantities in engineering.In addition, once find there is engineering problem at the communication facilities of network operation or need to increase New function, then need to carry out online upgrading to the communication facilities just at bearer service.For ensureing that communication facilities interrupts existing business as few as possible in the process of upgrading, traditional upgrading mode is upgraded in use two memory blocks, memory block is used for the software backing up running, and another memory block is used for depositing new software and carries out active-standby switch.The upgrading mode upgraded in this use two memory blocks significantly increases the cost of communication equipment upgrading.
Summary of the invention
For the defect existed in prior art, the object of the present invention is to provide a kind of upgrade method for communication device based on single memory block and system, only by a memory block, just can realize the online upgrading of communication facilities, effectively can reduce the cost of communication equipment upgrading, and reduce the impact of communication equipment upgrading on business, effectively enhance productivity and the maintenance efficiency of communication facilities.
For reaching above object, the invention provides a kind of upgrade method for communication device based on single memory block, comprising the following steps:
S1, build one for managing the file transfer protocol (FTP) ftp server of communication equipment upgrading concentratedly, ftp server stores the application software of each communication facilities different editions, only deposits the software run in the memory block of communication facilities; Webmaster provides the visualization view of communication equipment software and HardwareUpgring, and the time of setting communication equipment upgrading, ftp server sends upgrade command to communication facilities;
After S2, communication facilities receive the upgrade command that ftp server sends, the new software corresponding with this communication facilities is downloaded from the path that ftp server is specified, and whether newer software is consistent with the version of the software run, if the version of new software is inconsistent with the version of the software run, then new software is kept in the memory block of this communication facilities; Meanwhile, in the same memory block of this communication facilities, rename is carried out to the software run;
The Dynamic loading technique of S3, employing operating system, unloads the software that this communication facilities is running, and then loads new software according to the time of webmaster setting; When the software and hardware of this communication facilities reinitializes, recover this communication facilities and unload state before the software run, ensure communication facilities load new software after state identical with the state unloaded before the software that running, thus realize the upgrading of communication facilities.
On the basis of technique scheme, the application software that ftp server described in step S1 stores each communication facilities different editions comprises following steps: webmaster uses File Transfer Protocol, the application software of communication facilities different editions each in network element is uploaded to ftp server from this locality and backs up.
On the basis of technique scheme, it is further comprising the steps of in step S2: if the version of new software is inconsistent with the version of the software run, and the space of the memory block of communication facilities cannot hold new software, then new software copy is temporarily preserved in the internal memory of this communication facilities.
On the basis of technique scheme, when loading new software in step S3, provide corresponding loading content and execution sequence according to the type of software, hardware.
The present invention also provides a kind of communication equipment upgrading system based on single memory block, comprises ftp server, webmaster, upgrade unit and some communication facilitiess, wherein:
Described ftp server is for managing the upgrading of communication facilities concentratedly, and ftp server stores the application software of each communication facilities different editions, only deposits the software run in the memory block of communication facilities; Webmaster provides the visualization view of communication equipment software and HardwareUpgring, and the time of setting communication equipment upgrading, ftp server sends upgrade command to communication facilities;
After described communication facilities receives the upgrade command that ftp server sends, the new software corresponding with this communication facilities is downloaded from the path that ftp server is specified, and whether newer software is consistent with the version of the software run, if the version of new software is inconsistent with the version of the software run, then new software is kept in the memory block of this communication facilities; Meanwhile, in the same memory block of this communication facilities, rename is carried out to the software run;
Described upgrade unit is used for: the Dynamic loading technique adopting operating system, unloads the software that this communication facilities is running, and then loads new software according to the time of webmaster setting; When the software and hardware of this communication facilities reinitializes, upgrade unit recovers this communication facilities and unloads state before the software run, ensure communication facilities load new software after state identical with the state unloaded before the software that running, thus realize the upgrading of communication facilities.
On the basis of technique scheme, the application software that described ftp server stores each communication facilities different editions comprises following steps: webmaster uses File Transfer Protocol, the application software of communication facilities different editions each in network element is uploaded to ftp server from this locality and backs up.
On the basis of technique scheme, if the version of new software is inconsistent with the version of the software run, and the space of the memory block of communication facilities cannot hold new software, then temporarily preserved in the internal memory of this communication facilities by new software copy.
On the basis of technique scheme, when described upgrade unit loads new software, provide corresponding loading content and execution sequence according to the type of software, hardware.
Compared with prior art, the invention has the advantages that:
(1) the present invention builds the ftp server of a centralized management communication equipment upgrading, the software of storing communication equipment different editions on ftp server, the software run only is deposited in the memory block of communication facilities, need not open up new memory block, can reduce the cost of whole equipment.Ftp server download new software, to the memory block of communication facilities, by the software rename run in this memory block, and will need the software of upgrading to be dynamically loaded in the internal memory of communication facilities, thus realizes the upgrading of communication facilities.When the software that communication facilities runs is damaged time, can directly enable the software that ftp server backs up, to avoid loss, the impact caused the normal business run be reduced to minimum.Therefore, the present invention only by a memory block, just can realize the online upgrading of communication facilities, effectively can reduce the cost of communication equipment upgrading, and reduce the impact of communication equipment upgrading on business.
(2) the present invention is in the online upgrading process of communication facilities, is managed concentratedly and safeguards, can effectively enhance productivity by a ftp server to dissimilar communication equipment software, hardware.
(3) the present invention backs up software in a memory block of ftp server, the probability of the service disconnection caused during new Bootload is very low, even if there is upgrading failed phenomenon, software is easy to return back to former version, the cost of communication facilities can be reduced further, improve the maintenance efficiency of communication facilities.
(4) the present invention is by the online upgrading of a memory block centralized management communication facilities, the visualization view of webmaster is used to carry out batch operation to upgrading, the different editions software of the communication facilities be stored on ftp server can be inquired about by network management interface, the visualization view of network management interface is very directly perceived, and simplify many operations, make the online upgrading of communication facilities convenient.
Accompanying drawing explanation
Fig. 1 is the process flow diagram based on the upgrade method for communication device of single memory block in the embodiment of the present invention.
Fig. 2 is the schematic diagram of ftp server and each communication facilities storing software in the embodiment of the present invention.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.
Shown in Figure 1, the embodiment of the present invention provides a kind of upgrade method for communication device based on single memory block, comprises the following steps:
S1, build one for managing FTP (the File TransferProtocol of communication equipment upgrading concentratedly, file transfer protocol (FTP)) server, shown in Figure 2, ftp server stores the application software of each communication facilities different editions, specifically comprise the following steps: webmaster uses File Transfer Protocol, the application software of communication facilities different editions each in network element is uploaded to ftp server from this locality and backs up; The software run only is deposited in the memory block of communication facilities; Webmaster provides the visualization view of communication equipment software and HardwareUpgring, and the time of setting communication equipment upgrading, ftp server sends upgrade command to communication facilities.
After S2, communication facilities receive the upgrade command that ftp server sends, the new software corresponding with this communication facilities is downloaded from the path that ftp server is specified, and whether newer software is consistent with the version of the software run, if the version of new software is inconsistent with the version of the software run, then new software is kept in the memory block of this communication facilities; Meanwhile, in the same memory block of this communication facilities, rename is carried out to the software run; If the version of new software is inconsistent with the version of the software run, and the space of the memory block of communication facilities cannot hold new software, then temporarily preserved in the internal memory of this communication facilities by new software copy.
The Dynamic loading technique of S3, employing operating system, unloads the software that this communication facilities is running, and then loads new software according to the time of webmaster setting; When loading new software, provide corresponding loading content and execution sequence according to the type of software, hardware; When the software and hardware of this communication facilities reinitializes, recover this communication facilities and unload state before the software run, ensure communication facilities load new software after state identical with the state unloaded before the software that running, thus realize the upgrading of communication facilities.
The embodiment of the present invention also provides a kind of communication equipment upgrading system based on single memory block, comprises ftp server, webmaster, upgrade unit and some communication facilitiess.
Ftp server is for managing the upgrading of communication facilities concentratedly, ftp server stores the application software of each communication facilities different editions, specifically comprise the following steps: shown in Figure 2, webmaster uses File Transfer Protocol, the application software of communication facilities different editions each in network element is uploaded to ftp server from this locality and backs up; The software run only is deposited in the memory block of communication facilities; Webmaster provides the visualization view of communication equipment software and HardwareUpgring, and the time of setting communication equipment upgrading, ftp server sends upgrade command to communication facilities.
After communication facilities receives the upgrade command that ftp server sends, the new software corresponding with this communication facilities is downloaded from the path that ftp server is specified, and whether newer software is consistent with the version of the software run, if the version of new software is inconsistent with the version of the software run, then new software is kept in the memory block of this communication facilities; Meanwhile, in the same memory block of this communication facilities, rename is carried out to the software run; If the version of new software is inconsistent with the version of the software run, and the space of the memory block of communication facilities cannot hold new software, then temporarily preserved in the internal memory of this communication facilities by new software copy.
Upgrade unit is used for: the Dynamic loading technique adopting operating system, unloads the software that this communication facilities is running, and then loads new software according to the time of webmaster setting; When upgrade unit loads new software, provide corresponding loading content and execution sequence according to the type of software, hardware; When the software and hardware of this communication facilities reinitializes, upgrade unit recovers this communication facilities and unloads state before the software run, ensure communication facilities load new software after state identical with the state unloaded before the software that running, thus realize the upgrading of communication facilities.
The principle of the embodiment of the present invention is elaborated as follows:
During communication equipment upgrading, network management interface finds can for the application software of this communication equipment upgrading on ftp server, each communication facilities houses the application software of a lot of version on ftp server, the daily record comparing function provided by webmaster, the function point of the upgrading of each software version can be checked, after determining the version selected, choose the software version needing upgrading in the respective dialog frame of webmaster, ftp server sends upgrade command to communication facilities.
After communication facilities receives the upgrade command that ftp server sends, ftp server reads configuration file in fixed schedule, parses relevant Equipments Setting, and these configurations is kept in the form of a file in the memory block of communication facilities.Ftp server is according to the application software of configuration file copy communication facilities, be not that all application software are all copied in the process of this copy, but compared by configuration file, the difference in version of the software relatively on ftp server and the software of communication facilities, consistent software can not be copied, and only have modified version just can copy.
The software that the embodiment of the present invention does not need two memory blocks to store to run and the software that needs are upgraded, because of the comparison according to configuration file, when finding that there is software upgrading, rename is carried out to the current software run, by new software copy in the memory block of communication facilities, therefore do not need to use active and standby two memory blocks to carry out update software.If the application software that communication facilities is running and new software variant, then upgrade; If there is no difference, then do not upgrade.
Whether all modules in communication facilities can cause service disconnection to be divided into software and hardware by reinitializing by the embodiment of the present invention, the concrete identification method of software and hardware is: when file transform, by identifying in file whether have character string " SOFT_TYPE (software type) ", in the format district of module, mark module is software or hardware.
In the escalation process of communication facilities, if only upgrade software, then do not need interrupting service; If upgrading hardware, then need interrupting service.Be described in detail respectively below.
If only upgrade software, then preserve the software needing to upgrade, wait task is exited, and preserves the status information of communication facilities, identical with the state before software upgrading with the state controlling communication facilities, avoid service disconnection, detailed process is: before (1) guarantees unloading, task exits, and the general mode using tasks carrying to terminate exits task, confirmation task exits really, so that next step carries out resource release; (2) status information of equipment preserved, the status information of equipment has many, can be saved in internal memory by the running state information part of equipment as required, when upgrade software, read these information, the state controlling single-deck is identical with before software upgrading, avoids service disconnection; (3) when only needing upgrade software, resource is reclaimed, uninstall, reload the software after renewal.
The process of upgrading hardware is identical with the process that whole communication facilities powers on: communication facilities reinitializes after resetting.The initialization procedure of hardware is as follows: hardware completes initialization in specific function, can perform the initialization of each hardware driving in this function in order, and after completing initialization, the hardware environment of communication facilities has configured, and enters work ready state.Initiation task in hardware completes when initialization, avoids applying for resource again after Bootload, and initiating in hardware of task is avoided using Dram.When uninstall with when loading new software, avoid in hardware, running the task that may affect free memory as far as possible.
Whether webmaster provides the interface of a setting-up time, select to restart immediately, or the specific time restarts.In the process of new running software, if find to upgrade unsuccessfully, original software version can be return back to, because software all on ftp server has backup.
When the software that communication facilities runs is damaged time, can directly enable the software that ftp server backs up, to avoid loss, the impact caused the normal business run be reduced to minimum.
Those skilled in the art can carry out various modifications and variations to the embodiment of the present invention, if these amendments and modification are within the scope of the claims in the present invention and equivalent technologies thereof, then these revise and modification also within protection scope of the present invention.
The prior art that the content do not described in detail in instructions is known to the skilled person.