CN101656627A - Method and device for restoring main program and network equipment - Google Patents

Method and device for restoring main program and network equipment Download PDF

Info

Publication number
CN101656627A
CN101656627A CN200910174213A CN200910174213A CN101656627A CN 101656627 A CN101656627 A CN 101656627A CN 200910174213 A CN200910174213 A CN 200910174213A CN 200910174213 A CN200910174213 A CN 200910174213A CN 101656627 A CN101656627 A CN 101656627A
Authority
CN
China
Prior art keywords
main program
network equipment
upgrading
restoring
normal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN200910174213A
Other languages
Chinese (zh)
Inventor
林嘉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Star Net Communication Co Ltd
Original Assignee
Fujian Star Net Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Star Net Communication Co Ltd filed Critical Fujian Star Net Communication Co Ltd
Priority to CN200910174213A priority Critical patent/CN101656627A/en
Publication of CN101656627A publication Critical patent/CN101656627A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to a method and a device for restoring a main program and network equipment, wherein the method comprises the following steps: detecting whether the running of the network equipment with the updated main program is normal or not; and automatically triggering to reduce the updated main program to a main program before updating under the condition that the running of the network equipment with the updated main program is abnormal. In the embodiment of the invention, through detecting whether the state of the network equipment with the updated main program during running isnormal or not and detecting whether the functions of the network equipment with the updated main program are normal or not, under the condition that the running of the network equipment with the updated main program is abnormal, a loading control program of an application system in the network equipment loads the main program before updating so as to ensure that the equipment is restored to normalstate, reduce the fault lasting time of the network equipment, improve the processing efficiency and the automatic degree when the running of the network equipment is abnormal and enhance the reliability of the network equipment.

Description

A kind of method of restoring main program, device and the network equipment
Technical field
The present invention relates to the software reduction technique, particularly a kind of method of restoring main program, device and the network equipment.
Background technology
Along with Internet fast development, the network equipment also more and more is widely used.The network equipment comprises repeater, bridge, router and gateway etc., is mainly used in reception, transmission and recognition network data etc., is imperative equipment in the internet, applications.
The application software system of the network equipment comprises Loading Control program and main program, main program is meant the program that be to realize that network equipment function is moved on equipment, and Loading Control program (being also referred to as the CTRL program) is meant is responsible for searching main program and main program is loaded into the control program that moves in the internal memory after the network equipment starts.Generally, Loading Control program and main program all are stored on the nonvolatile storage, Flash for example, electrically programable ROM (Electrically ProgrammableRead-Only-Memory, EPROM).The software upgrading of the usually said network equipment mostly is meant the upgrading of main program.
After the network equipment started, the Loading Control program at first brought into operation, and it searches the main program of specific names on the nonvolatile storage on the network equipment.If the Loading Control program finds the corresponding main program with specific names, then this main program is loaded in the internal memory and moves, the main program of the network equipment brings into operation; If the Loading Control program does not find main program in Preset Time, then will report an error.
Because the function that the network equipment provided all is embodied in its main program, so when the application software system of the network equipment is upgraded, only needing that the main program on the network equipment is replaced by the main program version that comprises new function can achieve the goal, and need not to change the Loading Control program.This process is called program upgrade.
After the network equipment starts, the main program of redaction is copied on the nonvolatile storage of the network equipment, cover original master program file.The network equipment restarts, and the Loading Control program will load the main program of redaction, has so just finished the upgrading of the main program of the network equipment.
In the prior art, when the network equipment is carried out the upgrading of main program, if the redaction main program comprises the mortality mistake, may take place unusual after the network equipment is restarted so, comprise following situation: main program the startup stage take place to cause equipment to be restarted unusually, certain disabler causes network communication to be interrupted or the like in the main program.
Because the network equipment does not have the ability of automatic reduction,, restoring main program is recovered the normal function of the network equipment for the main program before upgrading so when above-mentioned abnormal conditions take place, can only carry out the reduction of main program version to the network equipment by the network manager.Concrete mode is: the keeper copies to original main program on the network equipment, covers current main program, restarting equipment then, and this process is called restoring main program.
But, the efficient of restoring main program is low in the prior art, because know this situation and often need a period of time from the network equipment network manager that breaks down, the network manager can't deal with in the very first time accomplishing, therefore can cause network to paralyse for a long time.
And, the network manager upgrades to the network equipment by the mode of Telnet, if the upgrading back network equipment takes place to cause unusually network to interrupt, the network manager can't be remotely logged into the enterprising line operate of the network equipment again, therefore can only arrive the scene handles, so very consume human resources, especially more inadvisable when simultaneously large number quipments being carried out batch upgrade.
Therefore, need a kind of mechanism that makes that equipment can reduce automatically when generation is unusual, improve the high reliability of the network equipment, reduce fault time and reduce cost of labor.
Summary of the invention
The method, device and the network equipment that the purpose of this invention is to provide a kind of restoring main program solve slow, the inefficient problem of speed when being used for solving the prior art software fault.
For addressing the above problem, the embodiment of the invention provides a kind of method of restoring main program, wherein, comprising:
Whether the network equipment operation that detects after main program is upgraded is normal;
The network equipment after described main program upgrading moves under abnormal situation, triggers automatically the restoring main program after the described upgrading is the main program before upgrading.
Wherein, whether the network equipment operation after the described detection main program upgrading normally comprises before:
Main program before the described upgrading is stored as the backup main program;
The network equipment that described backup main program is used for after described main program upgrading moves the main program software after the described upgrading of replacement under abnormal situation.
Wherein, whether the network equipment operation after the described detection main program upgrading normally also comprises before: create the reduction command file;
Described reduction command file comprises and starts marker bit and/or detection script first;
Whether described state when starting marker bit first and being used for the network equipment after the upgrading of the described main program of mark and starting is normal;
Whether the function that described detection script is used to detect the network equipment after described main program is upgraded is normal.
Wherein, whether the network equipment operation after the described detection main program upgrading normally comprises:
Whether detect the described marker bit that starts first and be marked with and start marker character first, to detect after described main program upgrading, whether the state the when network equipment starts is normal;
After the network equipment of described main program upgrading starts, carry out the whether normally operation of function that described detection script detects the network equipment.
Wherein, also comprise: after described main program upgrading, with the title of the main program before the described upgrading of main program called after after the described upgrading, with described other title of backup main program called after;
Move under abnormal situation at the described network equipment, described backup main program is renamed title into the main program before the described upgrading, other title of main program called after after the described upgrading.
The embodiment of the invention also provides a kind of device of restoring main program, comprising:
Detecting unit, whether the network equipment operation that is used to detect after main program is upgraded is normal;
Reduction unit is used for the restoring main program after the described upgrading is the preceding main program of upgrading;
Trigger element, the network equipment that is used for after described detecting unit detects the upgrading of described main program moves under abnormal situation, triggers the main program of the restoring main program of described reduction unit after with described upgrading before for upgrading automatically.
Wherein, also comprise:
Backup units is used for the main program before the described upgrading is stored as the backup main program;
The network equipment of described backup main program after described main program upgrading moves under abnormal situation and is reused.
Wherein, also comprise:
Creating unit is used for creating the reduction command file;
Described reduction command file also comprises and starts marker bit and detection script first;
Whether described state when starting marker bit first and being used for the described main program of the mark upgrading back network equipment and starting is normal;
Whether the function that described detection script is used to detect the described main program upgrading back network equipment is normal.
Wherein, described detecting unit comprises:
Whether certification mark symbol subelement is used to detect the described marker bit that starts first and is marked with and starts marker character first, and to detect after described main program upgrading, whether the state the when network equipment starts is normal;
Whether normally the measuring ability subelement after the network equipment of described main program upgrading starts, carries out the operation of function that described detection script detects the network equipment.
Wherein, described backup units also is used for after described main program upgrading, with the title of the main program before the described upgrading of main program called after after the described upgrading, with described other title of backup main program called after;
Move under abnormal situation at the described network equipment, the title of the main program of described reduction unit before with the described upgrading of described backup main program called after is with other title of main program called after after the described upgrading.
The embodiment of the invention also provides a kind of network equipment, comprising, the device of above-mentioned restoring main program.
In the embodiment of the invention, the network equipment after the main program upgrading is restarted, at first whether normal by detecting the state that whether comprises in the reduction command file when starting marker bit first and detecting the network equipment after the main program upgrading and start, and by carrying out detection script whether detect the function of the network equipment after the main program upgrading normal, network equipment operation after the main program upgrading takes place under abnormal situation, main program in the network equipment before the Loading Control program loading upgrading of application software system, make the network equipment recover normal, reduce the trouble duration of the network equipment, improve network equipment operation treatment effeciency and automaticity when undesired takes place, increased the reliability of the network equipment.
Description of drawings
Fig. 1 is the flow chart of the method specific embodiment one of embodiment of the invention restoring main program;
Fig. 2 is the flow chart of the method specific embodiment two of embodiment of the invention restoring main program;
Fig. 3 is the structural representation of the device specific embodiment one of embodiment of the invention restoring main program;
Fig. 4 is the structural representation one of the device specific embodiment two of embodiment of the invention restoring main program;
Fig. 5 is the structural representation two of the device specific embodiment two of embodiment of the invention restoring main program;
Fig. 6 is the flow chart of the device specific embodiment two of embodiment of the invention restoring main program;
Fig. 7 is the structural representation of embodiment of the invention network equipment specific embodiment.
Embodiment
Below by drawings and Examples, technical scheme of the present invention is done detailed description further.
The method specific embodiment one of embodiment of the invention restoring main program
Fig. 1 is the flow chart of the method specific embodiment one of embodiment of the invention restoring main program.As shown in Figure 1, the method for embodiment of the invention restoring main program specifically comprises:
Whether step 101, the network equipment that detects after main program is upgraded move normal.
In embodiments of the present invention, upgrade to example with the application software system in the network equipment and introduce technical scheme.When the application software system of installing in the network equipment need be upgraded, only the main program in the application software system need be upgraded and get final product, if the main program defectiveness after the upgrading, to cause the network equipment normally not start or its function can not normally be moved, so before the main program upgrading, at first the main program in the software systems is carried out copy backup and be stored in the nonvolatile storage, nonvolatile storage comprises Flash, EPROM etc., because the operation of the main program before the upgrading is normal, main program operation that like this can be after upgrading takes place when undesired, for example the network equipment after the main program upgrading can not normally start and may cause the network equipment to be restarted once more, perhaps the function of the network equipment can not normally be moved when causing network communication interruption or nonpassage of signal smooth, replace or cover the main program of the upgrading of operation exception by the main program before the upgrading of calling backup again, make the network equipment recover normal operation.
Before the main program upgrading, to create earlier and comprise the reduction command file that starts marker bit and detection script first and be stored on the nonvolatile storage, whether the state when wherein, starting marker bit first and be used for the network equipment after the mark main program upgrading and start is normal; After the main program upgrading, the network equipment will be restarted, after the network equipment is restarted, whether be labeled and start marker character first detecting the marker bit of startup first in the reduction command file at once, if starting the mark bit position in the reduction command file first is labeled and starts marker character first, illustrate that the network equipment the state when first starting of the network equipment after the main program upgrading for normal, then continue the various functions of the detection network equipment and whether can normally move; Be not labeled and start marker character first if start the mark bit position first, take place unusually when the startup first of the network equipment after the main program upgrading is described, then enter step 102.
If for normal, then also needing to continue to detect the various functions of the main program upgrading back network equipment, the state the during network equipment starting first after main program upgrading whether can normally move.Whether the function that detects the network equipment by the execution detection script is normal, after if the network equipment is carried out detection script, criterion described in its operation result and the detection script is complementary, and illustrates that then the function of the network equipment after main program is upgraded is normally moved; For example carry out detection script by Internet Control Message Protocol (InternetControl Message Protocol, ICMP) send internet control message to destination server, if can normally send icmp packet, illustrate that then the function of the network equipment after main program is upgraded is normal; Otherwise, illustrate that then the function of the network equipment after main program is upgraded can not normally be moved, then enter step 102.
Under step 102, the abnormal situation of network equipment running status after main program is upgraded, the restoring main program after triggering will be upgraded automatically is the preceding main program of upgrading.
If the function of the main program after the upgrading has unusually, for example the network equipment can not normally start or restart the back and cisco unity malfunction, then need to trigger automatically the main program of reusing before upgrading, make the network equipment can reply operate as normal as early as possible, with the long network paralysis etc. that the causes fault time that prevents the network equipment.Reuse the function that the preceding main program of upgrading can recover the network equipment by the main program before the Loading Control program loading upgrading.
In the embodiment of the invention, the network equipment after the main program upgrading is restarted, at first whether normal by detecting the state that whether comprises in the reduction command file when starting marker bit first and detecting the network equipment after the main program upgrading and start, and by carrying out detection script whether detect the function of the network equipment after the main program upgrading normal, network equipment operation after the main program upgrading takes place under the unusual situation, main program in the network equipment before the Loading Control program loading upgrading of application software system, make the network equipment recover normal, reduce the trouble duration of the network equipment, improve network equipment operation treatment effeciency and automaticity when unusual takes place, increased the reliability of the network equipment.
The method specific embodiment two of embodiment of the invention restoring main program
Fig. 2 is the flow chart of the method specific embodiment two of embodiment of the invention restoring main program.As shown in Figure 2, the method for embodiment of the invention restoring main program specifically comprises:
Step 201, establishment reduction command file.
When the main program in the network equipment need be upgraded, at first create the reduction command file, comprise and start marker bit and detection script first, whether the state when starting marker bit first and being used for the mark main program upgrading back network equipment and starting is normal, the network equipment can restart after the main program upgrading, if the state that the network equipment restarts is normal, then go out to start first marker character at the position mark that will start marker bit first, if the state that the network equipment restarts is for unusual, then do not go out to start first marker character at the position mark that starts marker bit first.
Whether detection script is used to detect the various functions of the main program upgrading back network equipment can normally move, and also comprises the standard of judging whether the network equipment normally moves in the detection script.After if the network equipment is carried out detection script, the criterion described in its operation result and the detection script is complementary, and illustrates that then the function of the network equipment after main program is upgraded is normally moved; Otherwise, the network equipment cisco unity malfunction after main program is upgraded then is described.
Step 202, main program current in the network equipment is backed up.
When the main program in the network equipment need be upgraded, the main program of version before the upgrading in the network equipment is backed up.In actual applications, the Loading Control program of seeing application software system in the setting network equipment loads the main program that name is called " main program software ", so the name of the main program of current not upgrading is called " main program software ", the current not main program of upgrading is stored on the nonvolatile storage of the network equipment, and is named as " backup main program software ".
Main program in step 203, the upgrade of network apparatus.
With main program upgrading current in the network equipment, main program after the upgrading will be stored on the nonvolatile storage, the main program after the upgrading and the preceding main program title and inequality of upgrading, in actual applications, title after the main program upgrading can be " new main program software ", the title of the main program that can load with the Loading Control program must be " a main program software ", so after the main program upgrading, be with the name modifications of main program " main program software ".
After the main program upgrading finishes, the network equipment will be restarted automatically, enter step 204 then.
Whether step 204, the network equipment that detects after main program is upgraded move normal.
Whether whether the network equipment operation that detects after the main program upgrading normally comprises: normal when detecting the first startup of the network equipment after the main program upgrading; And detect the function of the network equipment after the main program upgrading and whether normally move.When the state that first start of the network equipment after main program upgrading be normal, start marker bit in the reduction command file first and be labeled and start marker character first, then continue the various functions of the detection network equipment and whether can normally move; Be not labeled and start marker character first if start the mark bit position first, then enter step 205.
Whether the function that detects the network equipment after main program is upgraded by the execution detection script is normal, after if the network equipment is carried out detection script, criterion described in its operation result matching detection script illustrates that then the function of the network equipment after main program is upgraded is normally moved; For example carry out detection script and send icmp packet,, illustrate that then the function of the network equipment after main program is upgraded is normal if can normally send icmp packet to destination server; Otherwise, illustrate that the function of the network equipment after main program is upgraded can not normally be moved, then enter step 205.
Restoring main program after step 205, automatic triggering will be upgraded is the preceding main program of upgrading.
Unusual and/or when detecting the function of the network equipment after the main program upgrading and can not normally move when the network equipment starting first after main program upgrading, automatically the restoring main program that will trigger after will upgrading is the preceding main program of upgrading, reuse the preceding main program of upgrading, the upgrading before main program in step 202 by back-up storage in nonvolatile storage, and be named as " backup main program software ", main program after the upgrading is named as " main program software ", so be reduced to the main program before the upgrading, the title of the main program after the upgrading need be revised as " new main program software " from " main program software ", the title of the main program of backup is revised as " main program software " from " backup main program software ", and deletion reduction command file, restart the network equipment then.
After the network equipment is restarted, because the reduction command file is deleted, with no longer to the state that starts first of the network equipment and function whether normally operation detect, Loading Control program in the application software system of the network equipment will load the preceding main program of upgrading that name is called " main program software ", because there is not fault in the main program before the upgrading, so the main program before the upgrading will normally move, thereby realized the reduction of main program.
In actual applications, also can be to move under abnormal situation at the network equipment that detects after main program is upgraded, the network equipment is the main program before the download and upgrade from the main program server automatically, and stores in the nonvolatile storage of the network equipment, and repeating step 205 then.
In the embodiment of the invention, the network equipment after the main program upgrading is restarted, take place under the unusual situation at the main program after the upgrading, the name modifications of the main program after triggering will be upgraded automatically is " new main program software ", main program before the upgrading of duplicating is revised as " main program software ", delete the reduction command file then, main program in the network equipment before the Loading Control program loading upgrading of application software system, automatically recover to use the main program before upgrading under the situation that the main program of the network equipment after upgrading broken down, reduce the network equipment failure duration, improve treatment effeciency and automaticity under the unusual situation of network equipment generation, increased the reliability of the network equipment.
The device specific embodiment one of embodiment of the invention restoring main program
Fig. 3 is the structural representation of the device specific embodiment one of embodiment of the invention restoring main program.As shown in Figure 3, the device of embodiment of the invention restoring main program specifically comprises detecting unit 301, reduction unit 302 and trigger element 303, whether the network equipment operation that detecting unit 301 detects after the main program upgrading is normal, if the main program defectiveness after the upgrading, to cause the network equipment normally not start or its function can not normally be moved, whether whether the network equipment that detecting unit 301 detects after the main program upgrading normally starts, can also detect the function of the network equipment after main program is upgraded and normally move; Reduction unit 302 is used for the main program of the restoring main program after the upgrading before for upgrading, comes main software program before the loading upgrading by the Loading Control program of application software system in the network equipment; Under the situation of the network equipment operation exception after detecting unit 301 detects the main program upgrading, the restoring main program that trigger element 303 will trigger after reduction unit 302 will be upgraded is the preceding main program of upgrading.
In the embodiment of the invention, whether the network equipment operation that detects after main program is upgraded by detecting unit is normal, network equipment operation after detecting the main program upgrading takes place under the unusual situation, trigger element triggers the main software program before reduction unit is reused upgrading, make the network equipment recover operate as normal automatically, and do not need artificial treatment, improved the efficient of handling network equipment failure, avoided having strengthened the reliability and the automaticity of the network equipment because network equipment failure causes network paralysis.
The device specific embodiment two of embodiment of the invention restoring main program
Fig. 4 is the structural representation one of the device specific embodiment two of embodiment of the invention restoring main program.As shown in Figure 4, on the basis of the device specific embodiment one of embodiment of the invention restoring main program, the device of embodiment of the invention restoring main program also comprises backup units 304 and creating unit 305, backup units 304 is used for the main program before the upgrading is stored as the backup main program, the backup main program is stored in the nonvolatile storage of the network equipment, and the backup main program is used for being reused the main program after the upgrading causes the situation of network equipment operation exception owing to reasons such as defectives under; Creating unit 305 is used for creating the reduction command file, comprises starting marker bit and detection script first; Whether the state when starting marker bit first and being used for the mark main program upgrading back network equipment and starting is normal, after the normal startup of the network equipment, to make and start marker character first starting the mark bit position first, otherwise will not do any mark starting the mark bit position first; Whether the function that detection script is used to detect the main program upgrading back network equipment is normal, comprises normal startup and normal communication etc.
Fig. 5 is the structural representation two of the device specific embodiment two of embodiment of the invention restoring main program.As shown in Figure 5, further, detecting unit 301 comprises certification mark symbol subelement 3011 and measuring ability subelement 3012, whether whether certification mark symbol subelement 3011 is used for detecting and starts marker bit first and be marked with and start marker character first, normal with the state that detects when the main program upgrading back network equipment starts; Behind normal startup of network equipment of main program upgrading, whether the start detection script detects the function of the network equipment and normally moves, measuring ability subelement 3012 can whether normal by carrying out detection script if detecting the function of the network equipment after the main program upgrading, after if the network equipment is carried out detection script, criterion described in its operation result matching detection script illustrates that then the function of the network equipment after main program is upgraded is normally moved; Otherwise, illustrate that the function of the network equipment after main program is upgraded can not normally be moved.
Fig. 6 is the flow chart of the device specific embodiment two of embodiment of the invention restoring main program.As shown in Figure 6, the concrete workflow of the device specific embodiment two of embodiment of the invention restoring main program is as follows:
Step 601, creating unit 305 are created the reduction command file.
When the main program in the network equipment need be upgraded, creating unit 305 is at first created the reduction command file, comprise and start marker bit and detection script first, whether the state when starting marker bit first and being used for the mark main program upgrading back network equipment and starting is normal, the network equipment can restart after the main program upgrading, if the state that the network equipment restarts is normal, then make and start marker character first will starting the mark bit position first, otherwise just do not start marker character first at the position mark that starts marker bit first; Whether detection script is used to detect the various functions of the main program upgrading back network equipment and can normally moves, whether normally detection script also comprises judges the network equipment standard of operation, whether the function that detects the network equipment after main program is upgraded by the execution detection script is normal, after if the network equipment is carried out detection script, criterion described in its operation result matching detection script, the function that the network equipment after main program is upgraded then is described is normally moved, and illustrates that then the function of the network equipment after main program is upgraded is normal.
Current main program backs up in step 602,304 pairs of network equipments of backup units.
When the main program in the network equipment need be upgraded, the main program of version before the upgrading in 304 pairs of network equipments of backup units.In actual applications, what the Loading Control program of application software system loaded in can setting network equipment is that name is called the main program of " main program software ", so after the backup of the main program before backup units 304 will be upgraded, the title of the main program before the upgrading that backup units 304 will back up is revised as " backup main program software " by " main program software ", be stored in equally on the nonvolatile storage of the network equipment.
Main program in step 603, the upgrade of network apparatus.
With main program upgrading current in the network equipment, main program after the upgrading also stores on the nonvolatile storage, because the name that the Loading Control program in the application software system of setting network equipment loads is called the main program of " main program software ", so the main program called after after will upgrading " main program software ".
After the main program upgrading finishes, the network equipment will be restarted automatically, enter step 604.
Whether the network equipment operation that step 604, detecting unit 301 detect after the main program upgrading is normal.
After the network equipment is restarted, whether detecting unit 301 will detect the network equipment and normally comprise: whether certification mark in the detecting unit 301 symbol subelement 3011 is normal when detecting the startup first of the network equipments, and normally whether the function that the measuring ability subelement 3012 in the detecting unit 301 detects the network equipments operation.
Whether certification mark symbol subelement 3011 is normal when detecting the first startup of the network equipments after the main program upgrading, the state of the network equipment when starting first after the main program upgrading is for just often, reduction starts marker bit in the command file first and is labeled and starts marker character first, otherwise, will not be labeled and start marker character first.Whether certification mark symbol subelement 3011 starts marker bit first and is labeled and starts marker character first whether detect the startup of the network equipment normal by detecting; If certification mark symbol subelement 3011 detects and starts marker bit in the reduction command file first and be labeled and start marker character first, whether normal by carrying out detection script if detecting the function of the network equipment after the main program upgrading for measuring ability subelement 3012; Certification mark symbol subelement 3011 detects and starts marker bit first and be not labeled and start marker character first, and the state the when network equipment starting first after the main program upgrading be described then enters step 605 for unusually.
In actual applications, certification mark symbol subelement 3011 can be realized by the Loading Control program in the application software system, after the upgrading of main program in the network equipment, search by the Loading Control program and to start marker bit first and whether be labeled and start marker character first.
Whether measuring ability subelement 3012 is normal by the function that the execution detection script detects the network equipment after main program is upgraded by the detection script in the operation reduction command file, after if the network equipment is carried out detection script, criterion described in its operation result matching detection script illustrates that then the function of the network equipment after main program is upgraded is normally moved; For example carry out detection script and send icmp packet,, illustrate that then the function of the network equipment after main program is upgraded is normal if can normally send icmp packet to destination server; Otherwise, illustrate that the function of the network equipment after main program is upgraded can not normally be moved, then enter step 605.
The restoring main program that step 605, trigger element 303 will trigger after reduction unit 302 will be upgraded is the preceding main program of upgrading.
It is unusual and/or when detecting the function of the network equipment after the main program upgrading and can not normally move when detecting unit 301 detects the network equipment starting first after main program upgrading, the restoring main program that trigger element 303 will trigger after reduction unit 302 will be upgraded automatically is the preceding main program of upgrading, reuse the preceding main program of upgrading that does not have fault, be specially: the title that reduction unit 302 will be stored in the main program before the upgrading in the nonvolatile storage is revised as " main program software " by " backup main program software ", and the title of the main program after being upgraded is revised as " new main program software " by " main program software ", the command file of deletion reduction simultaneously, and then restart the network equipment.
After the network equipment is restarted, because the reduction command file is deleted, whether certification mark symbol subelement 3011 detects in the time of can't detecting the startup first of the network equipment after the main program upgrading normally, whether normally same measuring ability subelement 3012 can not detect the detection of operation of the function of the network equipment after the main program upgrading, the Loading Control program of application software system will load the preceding main program of upgrading that name is called " main program software " in the network equipment, because the main program before the upgrading does not have fault, so the main program before the upgrading will normally move, thereby realized the reduction of main program.
In actual applications, also can be under the situation of the network equipment operation exception after detecting the main program upgrading, backup units in the network equipment is the main program before the download and upgrade from the main program server automatically, and stores in the nonvolatile storage of the network equipment, and repeating step 605 then.
In the embodiment of the invention, after the network equipment after the main program upgrading is restarted, whether the startup that detects the network equipment by the symbol of the certification mark in detecting unit subelement is normal, whether detect the function of the network equipment normally moves by the measuring ability subelement in the detecting unit, network equipment operation after the main program upgrading takes place under the unusual situation, the main program that trigger element will trigger before reduction unit will be upgraded is revised as " main program software ", and the name modifications of the main program after will upgrading is " new main program software ", delete the reduction command file then, and restart the network equipment, after restarting the network equipment, the Loading Control program of application software system loads the preceding main program of upgrading that name is called " main program software " in the network equipment, automatically recover to use the main program before upgrading under the situation that the main program of the network equipment after upgrading broken down, reduce the network equipment failure duration, increased the reliability of the network equipment, improved the network equipment and moved treatment effeciency and the automaticity that takes place under the unusual situation.
Embodiment of the invention network equipment specific embodiment
The embodiment of the invention network equipment can comprise in the device specific embodiment of above-mentioned restoring main program any one.
Fig. 7 is the structural representation of embodiment of the invention network equipment specific embodiment.As shown in Figure 7, the network equipment 3 in the embodiment of the invention comprises the device 30 of restoring main program, and wherein the device 30 of restoring main program comprises detecting unit 301, reduction unit 302 and trigger element 303.Whether the network equipment operation that detecting unit 301 is used to detect after main program is upgraded is normal; Reduction unit 302 is used for the restoring main program after the upgrading is the preceding main program of upgrading, under the situation of the network equipment 3 operation exceptions, reduction unit 302 will back up the title of the main program before the upgrading of main program called after, with other title of main program called after after the upgrading; Trigger element 303 is used under the situation of the network equipment 3 operation exceptions after detecting unit 301 detects the main program upgrading, and the restoring main program that will trigger automatically after reduction unit 302 will be upgraded is the preceding main program of upgrading.
Further, the embodiment of the invention network equipment comprises that also backup units 304 and creating unit 305 backup units 304 are used for the main program before the upgrading is stored as the backup main program, the backup main program is reused under the situation of the network equipment 3 operation exceptions after the main program upgrading, backup units 304 also is used for after the main program upgrading, title with the main program before the upgrading of the main program called after after the upgrading will back up other title of main program called after; Creating unit 305 is used for creating the reduction command file, the reduction command file also comprises and starts marker bit and detection script first, whether the state when starting marker bit first and being used for the described main program of the mark upgrading back network equipment 3 and starting is normal, and whether the function that detection script is used to detect the described main program upgrading back network equipment 3 is normal.
Further, detecting unit 301 in the inventive embodiments network equipment comprises certification mark symbol subelement 3011 and measuring ability subelement 3012, whether certification mark symbol subelement 3011 is used to detect the network equipment 3 and starts marker bit first and be marked with and start marker character first, whether normal with the state of detection when the main program upgrading back network equipment 3 starts, measuring ability subelement 3012 is used for after the network equipment 3 of main program upgrading starts, and whether the execution detection script detects the function of the network equipment 3 and normally move.
In the embodiment of the invention, when the network equipment that comprises the device of restoring main program is restarted after main program upgrading, state when at first detecting the network equipment and start by the detecting unit in the device of restoring main program whether normal and start after function whether normal, the operation of the network equipment after the main program upgrading takes place under the unusual situation, in the network equipment reduction unit will make by the title of revising main program application software system with the main program before the automatic Loading Control program loading upgrading, to reduce the trouble duration of the network equipment, improve network equipment operation treatment effeciency and automaticity when unusual takes place, increased the reliability of the network equipment.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of program command, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the scope of various embodiments of the present invention technical scheme.

Claims (11)

1, a kind of method of restoring main program is characterized in that comprising:
Whether the network equipment operation that detects after main program is upgraded is normal;
The network equipment after described main program upgrading moves under abnormal situation, triggers automatically the restoring main program after the described upgrading is the main program before upgrading.
2, the method for restoring main program according to claim 1 is characterized in that, whether the network equipment operation after the described detection main program upgrading normally comprises before:
Main program before the described upgrading is stored as the backup main program;
The network equipment that described backup main program is used for after described main program upgrading moves the main program software after the described upgrading of replacement under abnormal situation.
3, the method for restoring main program according to claim 1 is characterized in that, whether the network equipment operation after the described detection main program upgrading normally also comprises before: create the reduction command file;
Described reduction command file comprises and starts marker bit and/or detection script first;
Whether described state when starting marker bit first and being used for the network equipment after the upgrading of the described main program of mark and starting is normal;
Whether the function that described detection script is used to detect the network equipment after described main program is upgraded is normal.
4, the method for restoring main program according to claim 3 is characterized in that, whether the network equipment operation after the described detection main program upgrading normally comprises:
Whether detect the described marker bit that starts first and be marked with and start marker character first, to detect after described main program upgrading, whether the state the when network equipment starts is normal;
After the network equipment of described main program upgrading starts, carry out the whether normally operation of function that described detection script detects the network equipment.
5, the method for restoring main program according to claim 2 is characterized in that also comprising:
After described main program upgrading, with the title of the main program before the described upgrading of main program called after after the described upgrading, with described other title of backup main program called after;
Move under abnormal situation at the described network equipment, described backup main program is renamed title into the main program before the described upgrading, other title of main program called after after the described upgrading.
6, a kind of device of restoring main program is characterized in that comprising:
Detecting unit, whether the network equipment operation that is used to detect after main program is upgraded is normal;
Reduction unit is used for the restoring main program after the described upgrading is the preceding main program of upgrading;
Trigger element, the network equipment that is used for after described detecting unit detects the upgrading of described main program moves under abnormal situation, triggers the main program of the restoring main program of described reduction unit after with described upgrading before for upgrading automatically.
7, the device of restoring main program according to claim 6 is characterized in that also comprising:
Backup units is used for the main program before the described upgrading is stored as the backup main program;
The network equipment of described backup main program after described main program upgrading moves under abnormal situation and is reused.
8, the device of restoring main program according to claim 6 is characterized in that also comprising:
Creating unit is used for creating the reduction command file;
Described reduction command file also comprises and starts marker bit and detection script first;
Whether described state when starting marker bit first and being used for the described main program of the mark upgrading back network equipment and starting is normal;
Whether the function that described detection script is used to detect the described main program upgrading back network equipment is normal.
9, the device of restoring main program according to claim 8 is characterized in that described detecting unit comprises:
Whether certification mark symbol subelement is used to detect the described marker bit that starts first and is marked with and starts marker character first, and to detect after described main program upgrading, whether the state the when network equipment starts is normal;
Whether normally the measuring ability subelement after the network equipment of described main program upgrading starts, carries out the operation of function that described detection script detects the network equipment.
10, the device of restoring main program according to claim 7 is characterized in that,
Described backup units also is used for after described main program upgrading, with the title of the main program before the described upgrading of main program called after after the described upgrading, with described other title of backup main program called after;
Move under abnormal situation at the described network equipment, the title of the main program of described reduction unit before with the described upgrading of described backup main program called after is with other title of main program called after after the described upgrading.
11, a kind of network equipment is characterized in that, comprises the device of any described restoring main program of claim 6-9.
CN200910174213A 2009-09-23 2009-09-23 Method and device for restoring main program and network equipment Pending CN101656627A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910174213A CN101656627A (en) 2009-09-23 2009-09-23 Method and device for restoring main program and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910174213A CN101656627A (en) 2009-09-23 2009-09-23 Method and device for restoring main program and network equipment

Publications (1)

Publication Number Publication Date
CN101656627A true CN101656627A (en) 2010-02-24

Family

ID=41710733

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910174213A Pending CN101656627A (en) 2009-09-23 2009-09-23 Method and device for restoring main program and network equipment

Country Status (1)

Country Link
CN (1) CN101656627A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102394761A (en) * 2011-11-02 2012-03-28 华为技术有限公司 Charge system upgrading method and device
CN104035833A (en) * 2013-03-07 2014-09-10 联发科技股份有限公司 Method And System For Verifying Machine Readable Code Integrity
CN104169876A (en) * 2012-10-30 2014-11-26 深圳市多尼卡电子技术有限公司 Play control method and system for player
CN104346239A (en) * 2014-06-27 2015-02-11 国家电网公司 Method and device for recovering anomaly of application program in embedded system
CN104572222A (en) * 2015-02-02 2015-04-29 深圳市新联锋科技有限公司 Main program upgrading method and device for supporting upgrading of main program
CN104732156A (en) * 2015-03-18 2015-06-24 北京控制工程研究所 Method for protecting important data of spacecraft space rendezvous and docking software
CN105760249A (en) * 2016-03-25 2016-07-13 山东超越数控电子有限公司 Method for remedying switch software fault
CN106484896A (en) * 2016-10-21 2017-03-08 郑州云海信息技术有限公司 A kind of digital power file updating method, device and system
CN108089943A (en) * 2016-11-21 2018-05-29 比亚迪股份有限公司 Program excutive method, device and terminal based on MCU system
CN108958827A (en) * 2017-05-25 2018-12-07 贵州白山云科技有限公司 A kind of method and system of processing routine upgrade failure
CN109918108A (en) * 2019-03-08 2019-06-21 珠海妙微科技有限公司 A kind of embedded equipment plug-in upgrade method and device
CN110502264A (en) * 2019-08-23 2019-11-26 深圳融安网络科技有限公司 Method for upgrading system, terminal and readable storage medium storing program for executing

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102394761B (en) * 2011-11-02 2014-02-19 华为技术有限公司 Charge system upgrading method and device
CN102394761A (en) * 2011-11-02 2012-03-28 华为技术有限公司 Charge system upgrading method and device
CN104169876A (en) * 2012-10-30 2014-11-26 深圳市多尼卡电子技术有限公司 Play control method and system for player
CN104035833A (en) * 2013-03-07 2014-09-10 联发科技股份有限公司 Method And System For Verifying Machine Readable Code Integrity
CN104346239A (en) * 2014-06-27 2015-02-11 国家电网公司 Method and device for recovering anomaly of application program in embedded system
CN104572222A (en) * 2015-02-02 2015-04-29 深圳市新联锋科技有限公司 Main program upgrading method and device for supporting upgrading of main program
CN104732156B (en) * 2015-03-18 2018-02-09 北京控制工程研究所 A kind of method that spacecraft space spacecrafts rendezvous software reusage data are protected
CN104732156A (en) * 2015-03-18 2015-06-24 北京控制工程研究所 Method for protecting important data of spacecraft space rendezvous and docking software
CN105760249A (en) * 2016-03-25 2016-07-13 山东超越数控电子有限公司 Method for remedying switch software fault
CN106484896A (en) * 2016-10-21 2017-03-08 郑州云海信息技术有限公司 A kind of digital power file updating method, device and system
CN106484896B (en) * 2016-10-21 2019-08-02 郑州云海信息技术有限公司 A kind of digital power file updating method, device and system
CN108089943A (en) * 2016-11-21 2018-05-29 比亚迪股份有限公司 Program excutive method, device and terminal based on MCU system
CN108958827A (en) * 2017-05-25 2018-12-07 贵州白山云科技有限公司 A kind of method and system of processing routine upgrade failure
CN108958827B (en) * 2017-05-25 2021-11-02 贵州白山云科技股份有限公司 Method and system for processing program upgrading fault
CN109918108A (en) * 2019-03-08 2019-06-21 珠海妙微科技有限公司 A kind of embedded equipment plug-in upgrade method and device
CN110502264A (en) * 2019-08-23 2019-11-26 深圳融安网络科技有限公司 Method for upgrading system, terminal and readable storage medium storing program for executing

Similar Documents

Publication Publication Date Title
CN101656627A (en) Method and device for restoring main program and network equipment
CN100525206C (en) Realizing method and system for automatic restoring equipment fault
CN102262544B (en) The method and apparatus of software upgrading
RU2483349C2 (en) Staged, lightweight backup system
CN102591745B (en) Method and device for system recovery based on android system and intelligent equipment
CN109491698B (en) System updating method and device based on hot patch
CN1933416A (en) Long-distance on-line staging method with self-recovery function
CN103064715A (en) Remote upgrade method and system for automatic drive test systems
CN102184111B (en) The equipment of operating system online upgrading method and tape operation system
CN108958767B (en) Safety mode automatic upgrading method based on minimum system backup implementation
CN1684427A (en) Method for software upgrading and withdrawing
CN107153559A (en) The application program updating method of a kind of electronic equipment
CN102163167A (en) Method and device for rescuing system
CN111182033B (en) Method and equipment for restoring switch
CN101763272A (en) Electronic device firmware updating method and system
CN104899116A (en) Data backup method, source server, target server and system
CN101207519A (en) Version server, operation maintenance unit and method for restoring failure
CN102073508A (en) Method and apparatus for upgrading terminals and software thereof
CN102193841B (en) Backup method and device of Subversion configuration database
US20130086572A1 (en) Generation apparatus, generation method and computer readable information recording medium
CN103984585A (en) Method for upgrading Linux kernel in running process of kernel module capable of being plugged in thermal mode
CN113032183A (en) System management method, device, computer equipment and storage medium
CN106933604B (en) System upgrading method and device
CN107423087A (en) A kind of application program updating method that server can monitor
CN111090537A (en) Cluster starting method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20100224