CN105740032A - Network device system upgrading method and device - Google Patents

Network device system upgrading method and device Download PDF

Info

Publication number
CN105740032A
CN105740032A CN201610141238.5A CN201610141238A CN105740032A CN 105740032 A CN105740032 A CN 105740032A CN 201610141238 A CN201610141238 A CN 201610141238A CN 105740032 A CN105740032 A CN 105740032A
Authority
CN
China
Prior art keywords
value
network equipment
new version
data segment
version software
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
CN201610141238.5A
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.)
Opzoon Technology Co Ltd
Original Assignee
Opzoon Technology 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 Opzoon Technology Co Ltd filed Critical Opzoon Technology Co Ltd
Priority to CN201610141238.5A priority Critical patent/CN105740032A/en
Publication of CN105740032A publication Critical patent/CN105740032A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a network device system upgrading method and device. The method comprises the steps that S11, a data segment of the preset length is obtained and directly written into a storage device, and an MD5 value of the data segment of the preset length and an MD5 value of new version software are obtained; S12, the data segment continues to be obtained and is directly written into the storage device, and meanwhile the MD5 value is updated; the length of the data segment is preset; S13, the step S12 is repeatedly executed till the new version software is written into the storage device; S14, the MD5 value updated last time in the step S13 and the MD5 value of the new version software in the step S11 are compared and whether the MD5 values are consistent or not is judged; if yes, a system of a network device is upgraded successfully. The device is used for implementing the network device system upgrading method. System upgrading can continue to be performed when the memory of the network device is not sufficient.

Description

A kind of network equipment system upgrade method and device
Technical field
The present invention relates to technical field of communication network, be specifically related to a kind of network equipment system upgrade method and device.
Background technology
The network equipment is physical entity conventional in communication network, for ensureing the properly functioning of this network equipment, installs operating system or application software generally in the network device.When communication network is upgraded, it is also desirable to the network equipment is operated system or application software upgrade.The conventional network equipment all has system upgrade function, in order to adopt the operating system of redaction or the software of application software replacement legacy version.
Along with the increase of communication requirement, the pressure of whole communication network is relatively larger, and now for ensureing the normal operation of communication network, the network equipment needs to consume more internal memory.In practical application, when system upgrade, it is necessary to carry out system upgrade when ensureing communication network or certain network equipment normal operation.But memory consumption is more during system upgrade, it is possible to can owing to cannot apply for internal memory causing the problem that upgrading is failed.
Summary of the invention
For defect of the prior art, the present invention provides a kind of network equipment system upgrade method and device, for solving that network equipment memory consumption in prior art is more and the problem that causes system upgrade failed.
First aspect, the invention provides a kind of network equipment system upgrade method, and described method includes:
S11, the data segment obtaining preset length write direct storage device, and obtain the MD5 value of the data segment of this preset length and the MD5 value of new version software;
S12, continuation obtain data segment storage device of writing direct, and MD5 value are updated simultaneously;The length of this data segment is described preset length;
S13, repeating said steps S12 are until described new version software is written to described storage device;
Whether S14, to contrast in described step S13 the last MD5 value updated consistent with the MD5 value of new version software in step S11;If the then system upgrade success of the described network equipment.
Alternatively, when in the last MD5 value updated and step S11, the MD5 value of new version software is inconsistent, include after described step S14:
All data segments of storage in described storage device are deleted.
Alternatively, described method adopts TFTP TFTP agreement or file transfer protocol (FTP) FTP to realize.
Alternatively, before described step S11, described method also includes:
MD5 initialization algorithm is utilized to generate the MD5 value of new version software.
Alternatively, MD5 value is updated including by described S12:
Obtain all data segments including this acquired data segment;
The basis of described all data segments utilize MD5 update algorithm generate MD5 value.
Second aspect, the embodiment of the present invention additionally provides a kind of network equipment system update device, and described device includes:
First data acquisition module, the data segment for obtaining preset length writes direct storage device, and obtains the MD5 value of the data segment of this preset length and the MD5 value of new version software;
Second data acquisition module, is used for performing following steps:
S12, continuation obtain data segment storage device of writing direct, and MD5 value are updated simultaneously;The length of this data segment is described preset length;
S13, repeating said steps S12 are until described new version software is written to described storage device;
Whether contrast module is consistent with the MD5 value of new version software in the first data acquisition module for contrasting the last MD5 value updated in described second data acquisition module;If the then system upgrade success of the described network equipment.
Alternatively, when the MD5 value updated last in described second data acquisition module is with when in the first data acquisition module, the MD5 value of new version software is inconsistent, described device also includes:
Data deletion module, for deleting all data segments of storage in described storage device.
Alternatively, described device adopts TFTP TFTP agreement or file transfer protocol (FTP) FTP to realize.
Alternatively, described device also includes initialization module, for utilizing MD5 initialization algorithm to generate the MD5 value of new version software.
Alternatively, described second data acquisition module adopts following steps to realize MD5 value is updated, including:
Obtain all data segments including this acquired data segment;
The basis of described all data segments utilize MD5 update algorithm generate MD5 value.
As shown from the above technical solution, the present invention writes direct storage device by new version software is divided into the mode of multiple data segment, the middle internal memory without log on equipment, it is possible to avoid network equipment memory consumption too much, and causes the failed situation of system upgrade.Further, in the embodiment of the present invention, also utilize MD5 value that the new version software being saved in storage device is verified, to determine the correctness in systems soft ware transmitting procedure, be further ensured that the success rate of system upgrade.
Accompanying drawing explanation
Being more clearly understood from the features and advantages of the present invention by reference accompanying drawing, accompanying drawing is schematic and should not be construed as and the present invention is carried out any restriction, in the accompanying drawings:
Fig. 1 is a kind of network equipment system upgrade method flow chart that the embodiment of the present invention provides;
Fig. 2 is a kind of network equipment system update device block diagram that the embodiment of the present invention provides;
Fig. 3 is a kind of network equipment system update device block diagram that the embodiment of the present invention provides.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is a part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under not making creative work premise, broadly fall into the scope of protection of the invention.
First aspect, embodiments provides a kind of network equipment system upgrade method, as it is shown in figure 1, include:
S11, the data segment obtaining preset length write direct storage device, and obtain the MD5 value of the data segment of this preset length and the MD5 value of new version software;
S12, continuation obtain data segment storage device of writing direct, and MD5 value are updated simultaneously;The length of this data segment is described preset length;
S13, repeating said steps S12 are until described new version software is written to described storage device;
Whether S14, to contrast in described step S13 the last MD5 value updated consistent with the MD5 value of new version software in step S11;If the then system upgrade success of the described network equipment.
It should be noted that preset length refers to predetermined word joint number in the embodiment of the present invention.Such as preset length can be 256 bytes.
It should be noted that data segment refers in the embodiment of the present invention, there are the data of preset length, and data are from new version software, i.e. the fragment of valid data.
It should be noted that new version software refers in the embodiment of the present invention, for the software of the operating system software normal operation that can substitute current version that this network equipment prepares.
It should be noted that MD5 value adopts conventional Message Digest 5 MD5 in prior art to generate in the embodiment of the present invention.For embodying the not same-action of each MD5, the embodiment of the present invention adopt MD5 initialization algorithm generate the MD5 value of new version software.In the process that MD5 value is updated, MD5 update algorithm is adopted to generate the MD5 value after updating.Owing to Message Digest 5 MD5 is prior art, the present invention does not repeat them here.
The network equipment system upgrade method embodiment of the present invention provided below in conjunction with embodiment is described further.
First, the data segment introduce S11, obtaining preset length writes direct storage device, and obtains the MD5 value of the data segment of this preset length and the step of the MD5 value of new version software.
In practical application, new version software includes software information head and Application Software Program, has write some attribute informations of software inside information header exactly.Namely in new version software the MD5 value of application software just inside attribute information.Therefore, the MD5 value of new version software is from attribute information.
Preferably, above-mentioned MD5 value adopts MD5 initialization algorithm to generate.Such as, this MD5 initialization algorithm can be MD5_Init function.Certain those skilled in the art can also adopt other functions that can generate MD5 value to generate MD5 value, and the present invention is not construed as limiting.
Secondly, introduce S12, continue to obtain data segment storage device of writing direct, MD5 value is updated simultaneously;The length of this data segment is the step of described preset length.
Continue to obtain data segment from new version software, now need to be saved directly in storage device this data segment.Do so can be avoided to network equipment application memory headroom, without influence on the normal operation of the network equipment.
After obtaining data segment, now need MD5 value is updated, to determine that whether acquired data segment is correct.Wherein, it is updated including to MD5 value:
S121, obtain and include all data segments of this acquired data segment;
S122, utilize on the basis of described all data segments MD5 update algorithm generate MD5 value.
It should be noted that be that the basis of all data segments relevant to this new version software in storage device utilizes MD5 update algorithm generation MD5 value when updating.
In the embodiment of the present invention, MD5 update algorithm can be MD5_Update function.Certainly, certain those skilled in the art can also adopt other functions that can update MD5 value to generate MD5 value, and the present invention is not construed as limiting.
Again, S13, repeating said steps S12 are introduced until described new version software is written to the step of described storage device.
The main contents of this step are identical with the content of step 2, do not repeat them here.
Finally, whether introduce S14, to contrast in described step S13 the last MD5 value updated consistent with the MD5 value of new version software in step S11;If the then system upgrade success of the described network equipment.
After new version software is saved in storage device, if disappearance occurs in data segment, then new version software is non-serviceable.Therefore also need to it is verified.Now the MD5 value updated last in step S13 is compared with the MD5 value of new version software in step S11.If consistent, then illustrate that acquired new version software is correct, it is possible to use.The i.e. system upgrade function of this network equipment.
In practical application, the last MD5 value updated can also adopt MD5_Final function to realize.
As in figure 2 it is shown, the embodiment of the present invention additionally provides a kind of network equipment system upgrade method, in Fig. 2, S11, S12, S13 and S14 in step S21, S22, S23 and S24 and Fig. 1 are identical, and step S241 is identical with step S14, does not repeat them here.Fig. 2 includes: in S242, step S23, the MD5 value of last renewal is with when in step S21, the MD5 value of new version software is inconsistent, and all data segments that will store in described storage device are deleted.
The embodiment of the present invention, by being deleted by the data segment in storage device, is not take up the space of storage device, reduces the impact on storage device.
Second aspect, the embodiment of the present invention additionally provides a kind of network equipment system update device, as it is shown on figure 3, described device includes:
First data acquisition module M11, the data segment for obtaining preset length writes direct storage device, and obtains the MD5 value of the data segment of this preset length and the MD5 value of new version software;
Second data acquisition module M12, is used for performing following steps:
S12, continuation obtain data segment storage device of writing direct, and MD5 value are updated simultaneously;The length of this data segment is described preset length;
S13, repeating said steps S12 are until described new version software is written to described storage device;
Contrast module M13, whether consistent with the MD5 value of new version software in the first data acquisition module for contrasting the last MD5 value updated in described second data acquisition module;If the then system upgrade success of the described network equipment.
Alternatively, when the MD5 value updated last in described second data acquisition module is with when in the first data acquisition module, the MD5 value of new version software is inconsistent, described device also includes:
Data deletion module, for deleting all data segments of storage in described storage device.
Alternatively, described device adopts TFTP TFTP agreement or file transfer protocol (FTP) FTP to realize.
Alternatively, described device also includes initialization module, for utilizing MD5 initialization algorithm to generate the MD5 value of new version software.
Alternatively, described second data acquisition module M12 adopts following steps to realize MD5 value is updated, including:
Obtain all data segments including this acquired data segment;
The basis of described all data segments utilize MD5 update algorithm generate MD5 value.
As seen from the above, the network equipment system update device that the embodiment of the present invention provides realizes based on network equipment system upgrade method mentioned above, thus can solve same technical problem, and obtains identical technique effect, and this is no longer going to repeat them.
In sum, the network equipment system upgrade method of embodiment of the present invention offer and device, write direct storage device by new version software being divided into the mode of multiple data segment, the middle internal memory without log on equipment, network equipment memory consumption can be avoided too much, and cause the failed situation of system upgrade.Further, in the embodiment of the present invention, also utilize the MD5 value operating system software to being saved in storage device and new version software to compare, to determine the correctness in systems soft ware transmitting procedure, be further ensured that the success rate of system upgrade.
Should be noted that, in all parts of device disclosed in the present embodiment, according to its function to realize, parts therein are carried out logical partitioning, but, the present invention is not only restricted to this, it is possible to as required all parts is repartitioned or combines, for instance, can be single parts by some unit constructions, or some parts can be further broken into more subassembly.
The all parts embodiment of the present invention can realize with hardware, or realizes with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions that microprocessor or digital signal processor (DSP) can be used in practice to realize the some or all parts in system according to embodiments of the present invention.The present invention is also implemented as part or all the equipment for performing method as described herein or device program (such as, computer program and computer program).The program of such present invention of realization can store on a computer-readable medium, or can have the form of one or more signal.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
It should be noted that above-described embodiment the present invention will be described rather than limits the invention, and those skilled in the art can design alternative embodiment without departing from the scope of the appended claims.In the claims, any reference marks that should not will be located between bracket is configured to limitations on claims.Word " comprises " and does not exclude the presence of the element or step not arranged in the claims.Word "a" or "an" before being positioned at element does not exclude the presence of multiple such element.The present invention by means of including the hardware of some different elements and can realize by means of properly programmed computer.In the unit claim listing some devices, several in these devices can be through same hardware branch and specifically embody.Word first, second and third use do not indicate that any order.Can be title by these word explanations.
Embodiment of above is only suitable to the present invention is described; and it is not limitation of the present invention; those of ordinary skill about technical field; without departing from the spirit and scope of the present invention; can also make a variety of changes and modification; therefore all equivalent technical schemes fall within scope of the invention, and the scope of patent protection of the present invention should be defined by the claims.

Claims (10)

1. a network equipment system upgrade method, it is characterised in that described method includes:
S11, the data segment obtaining preset length write direct storage device, and obtain the MD5 value of the data segment of this preset length and the MD5 value of new version software;
S12, continuation obtain data segment storage device of writing direct, and the MD5 value of a upper data segment are updated simultaneously;The length of this data segment is described preset length;
S13, repeating said steps S12 are until described new version software is written to described storage device;
Whether S14, to contrast in described step S13 the last MD5 value updated consistent with the MD5 value of new version software in step S11;If the then system upgrade success of the described network equipment.
2. network equipment system upgrade method according to claim 1, it is characterised in that when the MD5 value of new version software is inconsistent in the last MD5 value updated and step S11, include after described step S14:
All data segments of storage in described storage device are deleted.
3. network equipment system upgrade method according to claim 2, it is characterised in that described method adopts TFTP TFTP agreement or file transfer protocol (FTP) FTP to realize.
4. network equipment system upgrade method according to claim 1, it is characterised in that before described step S11, described method also includes:
MD5 initialization algorithm is utilized to generate the MD5 value of new version software.
5. network equipment system upgrade method according to claim 1, it is characterised in that be updated including to MD5 value in described S12:
Obtain all data segments including this acquired data segment;
The basis of described all data segments utilize MD5 update algorithm generate MD5 value.
6. a network equipment system update device, it is characterised in that described device includes:
First data acquisition module, the data segment for obtaining preset length writes direct storage device, and obtains the MD5 value of the data segment of this preset length and the MD5 value of new version software;
Second data acquisition module, is used for performing following steps:
S12, continuation obtain data segment storage device of writing direct, and MD5 value are updated simultaneously;The length of this data segment is described preset length;
S13, repeating said steps S12 are until described new version software is written to described storage device;
Whether contrast module is consistent with the MD5 value of new version software in the first data acquisition module for contrasting the last MD5 value updated in described second data acquisition module;If the then system upgrade success of the described network equipment.
7. network equipment system update device according to claim 6, it is characterised in that when the MD5 value updated last in described second data acquisition module is with when the MD5 value of new version software is inconsistent in the first data acquisition module, described device also includes:
Data deletion module, for deleting all data segments of storage in described storage device.
8. network equipment system update device according to claim 7, it is characterised in that described device adopts TFTP TFTP agreement or file transfer protocol (FTP) FTP to realize.
9. network equipment system update device according to claim 6, it is characterised in that described device also includes initialization module, for utilizing MD5 initialization algorithm to generate the MD5 value of new version software.
10. network equipment system update device according to claim 6, it is characterised in that
Described second data acquisition module adopts following steps to realize MD5 value is updated, including:
Obtain all data segments including this acquired data segment;
The basis of described all data segments utilize MD5 update algorithm generate MD5 value.
CN201610141238.5A 2016-03-10 2016-03-10 Network device system upgrading method and device Pending CN105740032A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610141238.5A CN105740032A (en) 2016-03-10 2016-03-10 Network device system upgrading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610141238.5A CN105740032A (en) 2016-03-10 2016-03-10 Network device system upgrading method and device

Publications (1)

Publication Number Publication Date
CN105740032A true CN105740032A (en) 2016-07-06

Family

ID=56251650

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610141238.5A Pending CN105740032A (en) 2016-03-10 2016-03-10 Network device system upgrading method and device

Country Status (1)

Country Link
CN (1) CN105740032A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108228218A (en) * 2018-01-31 2018-06-29 青岛海信移动通信技术股份有限公司 A kind of electric terminal method for upgrading system and device
CN108845824A (en) * 2018-07-10 2018-11-20 平安科技(深圳)有限公司 Using update method and device and computer readable storage medium
CN113726554A (en) * 2021-07-31 2021-11-30 新华三技术有限公司成都分公司 Method for restoring network equipment version and network equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108228218A (en) * 2018-01-31 2018-06-29 青岛海信移动通信技术股份有限公司 A kind of electric terminal method for upgrading system and device
CN108845824A (en) * 2018-07-10 2018-11-20 平安科技(深圳)有限公司 Using update method and device and computer readable storage medium
CN113726554A (en) * 2021-07-31 2021-11-30 新华三技术有限公司成都分公司 Method for restoring network equipment version and network equipment

Similar Documents

Publication Publication Date Title
US20190287626A1 (en) Data overwriting device and data overwriting method
CN107391143B (en) T-Box remote upgrading method
US8522206B2 (en) Selective delta validation of a shared artifact
CN104052818B (en) The version upgrading method and device of a kind of mobile terminal
CN110730104A (en) Method for upgrading multi-device batch firmware of mesh network device
KR101822485B1 (en) Recovering method after a power failure in software remote update for vehicles
CN111240722B (en) Method for upgrading firmware over the air, and terminal, server and system applied by same
CN104090790A (en) Two-chip scheme firmware updating method for safety terminal
CN106612192A (en) An equipment upgrading method, apparatus and system
CN101957765B (en) A kind of method and system, equipment realizing equipment firmware and upgrade
CN105786542A (en) Intelligent device and system update method of the intelligent device
US9710340B2 (en) Replacement of a corrupt driver variable record
CN106843954A (en) Sensor node remote upgrade method
CN105740032A (en) Network device system upgrading method and device
CN111966287B (en) Data storage method, electronic device and storage medium
JP2000020391A (en) Storage device, data processor and its method
CN112286565A (en) Embedded system differential upgrading method based on storage container
CN107239299A (en) Plug-in unit upgrade method and device
CN110083379A (en) A kind of server component upgrade method and relevant apparatus
CN105550071B (en) System file upgrades and detection method, communication equipment
CN108664255B (en) Software upgrading method and device
CN107832074A (en) A kind of intelligent sound box data updating method and device
CN106990988A (en) The method and device that a kind of program updates
CN112346771B (en) Upgrade file generation method and device
KR20070089029A (en) Storage control apparatus, storage control method, computer product, and information processing apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination