CN101231592A - Method and system for updating software - Google Patents

Method and system for updating software Download PDF

Info

Publication number
CN101231592A
CN101231592A CNA2007100075099A CN200710007509A CN101231592A CN 101231592 A CN101231592 A CN 101231592A CN A2007100075099 A CNA2007100075099 A CN A2007100075099A CN 200710007509 A CN200710007509 A CN 200710007509A CN 101231592 A CN101231592 A CN 101231592A
Authority
CN
China
Prior art keywords
software
redaction
module
read
described 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
CNA2007100075099A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNA2007100075099A priority Critical patent/CN101231592A/en
Publication of CN101231592A publication Critical patent/CN101231592A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The embodiment of the invention relates to the software field, in particular to the software upgrading field. The embodiment of the invention provides a method and a system for upgrading the software, when a new edition of the software is stored in a reserved zone of the software, whether the new edition of the software is read is judged; when the new edition of the software is not read, the new edition of the software is read from the reserved zone of the software and run, so as to carry out the upgrading of the software; when the new edition of the software is read, a original edition of the software is read and run; the problems existing in the prior art are solved, thereby guaranteeing the system to fast return to the original software edition when an abnormal condition occurs after the software is upgraded, and ensuring the business not to be influenced due to the abnormal condition brought by the software upgrading to the greatest extent.

Description

A kind of software upgrade method and system
Technical field
The present invention relates to software field, relate in particular to a kind of software upgrade method and system.
Background technology
The method of existing software upgrading and rollback is: at first the redaction with software is loaded among the FLASH or EPROM of system by order, afterwards, resetting system, promptly restart system, in system starting process, from FLASH or EPROM, read and move the software among this FLASH or the EPROM, realize software upgrading, as shown in Figure 1; Under the situation that the redaction of software can't be used, the original version of software is loaded among the FLASH or EPROM of system by order, rerun, realize the software rollback.
It can be seen from the above, and system may be because certain reason causes the redaction function of this software to occur making the order of software loading to use unusually that software just can't return back to original version after the redaction of using software is upgraded; In addition, the situation that can't start may appear in the new version software after the upgrading, causes and can't upgrade software version among the FLASH by order; Have, FLASH belongs to slow devices again, and the process of writing FLASH can need the long time, makes that the rollback time of software is longer.These defectives that prior art exists make system when carrying out software upgrading, inevitably have very big risk, may cause bigger influence to relevant business.
Summary of the invention
Embodiments of the invention provide a kind of software upgrade method and system, solve the problem that prior art exists, thereby reach after software upgrading, if abnormal conditions occur, the assurance system return back to the original version of this software fast, farthest guarantee professional not because of software upgrading occur unusual and influenced.
Embodiments of the invention are to be achieved through the following technical solutions:
A kind of software upgrade method stores the redaction of software in the software reserved area, described method comprises:
Whether the redaction of judging described software is read;
When the redaction of described software is not read out-of-dately, read and move the redaction of described software from described software reserved area, carry out software upgrading;
When the redaction of described software has been read out-of-dately, read and move the stable release of described software, described stable release comprises the original version of described software;
Described software reserved area is a preassigned zone in the speedy storage equipment.
A kind of software upgrade method when not having the redaction of software to exist in the software reserved area, reads and moves the stable release of described software, and described stable release comprises the original version of described software.
A kind of system of software upgrading, described system comprise memory module, exterior storage media module, judge module and operation module;
Memory module is arranged in the appointed area of speedy storage equipment, is used for the redaction of storing software;
Exterior storage media module is used for the stable release of storing software, and described stable release comprises the original version of software;
Judge module: whether the redaction that is used for judging the described software of memory module was read, it is out-of-date that the redaction of the described software in determining memory module is not read, and notice operation module reads, moves the redaction of the described software in the memory module; It is out-of-date that the redaction of the described software in determining memory module has been read, and notice operation module reads, moves the original version of software described in the exterior storage media module;
The operation module: be used for the notice according to judge module, read, move the indicated release of described software, described indicated release comprises the redaction of described software and the original version of described software.
A kind of system of software upgrading, described system comprise memory module, exterior storage media module, judge module and operation module,
Memory module is arranged in the appointed area of speedy storage equipment, is used for the redaction of storing software;
Exterior storage media module is used for the stable release of storing software, and described stable release comprises the original version of software;
Judge module: be used for judging whether memory module has the redaction of software to exist, when not having the redaction of described software to exist in determining memory module, notice operation module reads, moves the original version of the described software in the exterior storage media module;
Operation module: be used for notice, read, move the original version of described software according to judge module.
The technical scheme that is provided by the embodiment of the invention described above as can be seen, embodiments of the invention provide a kind of software upgrade method and system, after being implemented in software upgrading, if abnormal conditions occur, the assurance system return back to original software version fast, and the business that farthest guarantees does not occur unusual and influenced because of software upgrading.
Description of drawings
The software upgrading schematic flow sheet that Fig. 1 provides for prior art;
The schematic flow sheet of the load software redaction that Fig. 2 provides for embodiments of the invention;
The schematic flow sheet of the software upgrading that Fig. 3 provides for embodiments of the invention.
Embodiment
As software product, after whenever developing certain phase, can carrying out appointed function, all need current software solidification is got off, issue as product with the version form.When a software has the redaction issue, the legacy version of this software may have the needs of upgrading, if but influenced software's basic function after the software upgrading, and just must in the shortest time, return back to the original version of this software, avoid related service is caused too much influence.
Software upgrade method that embodiments of the invention provide and system have solved the problem that exists in the existing software upgrading technology well, and under the situation of software upgrading failure, can return back to original software version fast, farthest guarantee the professional influence that is not subjected to the software upgrading failure.
Realize the technical scheme of the software upgrading that embodiments of the invention provided, need to divide in advance a fixing zone in speedy storage equipment, be used for the latest edition of storing software, described zone is referred to as the software reserved area of speedy storage equipment; After equipment restarted, if there is the redaction of software to exist in the software reserved area of speedy storage equipment, embodiment of the present invention need judge whether the redaction of software in the described software reserved area was read; If there is not the redaction of software to have the original version of software as described in then can directly from exterior storage media (as FLASH), reading in the described software reserved area.
The redaction of software is not read out-of-dately in described software reserved area, reads and move the redaction of described software from described software reserved area, carries out software upgrading;
In described software reserved area the redaction of software be read out-of-date, remove the redaction of software in the described software reserved area, from the exterior storage media, read and move the stable release of this software, this stable release can be the original version of this software, also can be the stable release after this software employing redaction upgrading.
Need to prove judge here whether the redaction of described software was read, can whether have the sign of having read to realize by the redaction of judging described software.The redaction of described software can be set up and read sign when being read for the first time; Having read sign can be arranged in the described software reserved area; Owing to carried out having read judgement, so when the redaction upgrading of software is broken down, the direct original version of reading software, avoided loading command to break down, can't return back to the phenomenon of the original version of software, and, also avoided the original version of software is written to the process of FLASH, thereby improved the reliability of software rollback, reduced the time delay of software rollback.In the quick rollback of realizing software, can remove the redaction of software in the described software reserved area, also can not remove the redaction of software in the described software reserved area.
The redaction that can preserve at least one software in the described software reserved area, that is, the quantity of the redaction of the software in the described software reserved area can be a plurality of, the kind of described software can be a kind of, also can be multiple.
Here the speedy storage equipment of mentioning is for the exterior storage media, is exactly a kind of speedy storage equipment such as internal memory, in the following description, as object lesson of speedy storage equipment the technical scheme that the embodiment of the invention provides is described with internal memory.
The mode of dividing fixed area in internal memory has multiple, at this, is example with VXWORKS (embedded implementation and operation system) internal memory dividing mode only, and the mode that a kind of internal memory is divided is described.The file system of VXWORKS, when being divided in compiling, its internal memory just can determine, only need in program by writing the mode of code, specify one section memory address, this section memory address of appointment is not carried out any other operation, only be used to preserve the latest edition of software, in this way, just can reserve one " software reserved area ".In system's restarting process, do not remove the content in this piece fixed area.
The technical scheme of the software upgrading that provides in the embodiments of the invention is applicable to system software, also is applicable to application software.
Below, the flow process of latest edition of the load software that embodiments of the invention provide and the concrete steps of software upgrade method are described respectively in conjunction with Fig. 2 and Fig. 3:
As shown in Figure 2, during the latest edition of load software, need by system command, the latest edition of software is kept in advance in the software reserved area for the internal memory of its reservation, the latest edition that is about to software writes described software reserved area; Resetting system can be finished loading then.Resetting system is promptly restarted system.
As shown in Figure 3, the concrete steps of the software upgrade method that provides of the embodiment of the invention are:
Step 30 when system restarts, judges that the redaction whether software is arranged in the software reserved area of internal memory exists; When determining not have in the described software reserved area redaction of software to exist, execution in step 31; When determining to have in the described software reserved area redaction of software to exist, execution in step 32;
Step 31, system read from FLASH, the original version of operating software gets final product, and the original version of described software refers to the version before this software upgrading; Need to prove that at this, FLASH only is as a kind of storage medium, the user also can select other storage medium according to the needs of oneself, such as EPROM or portable hard drive;
Step 32 has the latest edition of software to exist in the described software reserved area, whether the redaction of the software in judging in the described software reserved area is provided with " reading " sign; When the redaction of determining described software is not provided with " reading " sign, execution in step 33; When sign " is read " in the redaction setting of determining described software, execution in step 34;
Step 33 reads, moves the redaction that the software of sign " is read " in not setting in the described software reserved area from the software reserved area, " read " sign for the redaction setting of described software simultaneously; Execution in step 35;
Step 34, the redaction of the software of sign " is read " in the setting in the removing software reserved area, execution in step 31, the function of realization software rollback; This is because system can't start the redaction of software, or system occurs unusual after starting the redaction of software and is reset normal, when system starts once more, find that the software version in " software reserved area " is provided with " reading " sign, then remove " software reserved area " content, the original version of software starts described software among the operation FLASH, realizes the software rollback;
Step 35, at the appointed time in continuous this software of operation, whether the operation of the redaction of judging described software at the appointed time normal; The operation of the redaction of determining described software at the appointed time just often, execution in step 36; Otherwise, execution in step 34;
Step 36, the redaction of determining described software at the appointed time in operation just often, promptly finish software upgrading function; The redaction of the described software preserved in the described software reserved area is write FLASH, remove the redaction of the described software of preserving in the described software reserved area simultaneously, also can not remove the redaction of the described software of preserving in the described software reserved area;
This be because the redaction of described software through the operation at the appointed time after, can guarantee the normal use of this software, and the redaction of described software is enough stable, this moment, the redaction with described software write among the FLASH, stable release as this software is preserved, guarantee to return back to rapidly when appearance is unusual in this software escalation process afterwards the stable release of this software, here need to prove, the process that the redaction of described software is write FLASH can be the redaction of described software for the original version updating with described software, promptly cover the original version of described software with the redaction of described software, also can need not cover the original version of described software for direct redaction with described software is written among the FLASH; Remove the redaction of the software in the software reserved area of internal memory simultaneously, vacate storage space, prepare, also can not remove the redaction of the software in the software reserved area of internal memory for the next latest edition of preserving this software or the latest edition of other softwares.
Provide the system of software upgrading to describe to embodiments of the invention below:
Described system comprises memory module, exterior storage media module, judge module, operation module and removes module;
Memory module is arranged in the internal memory in the preassigned zone, is used for the latest edition of storing software;
Whether judge module is mainly used in the redaction of judging the described software in the memory module and was read, whether judge module can be set up by the redaction of software described in the memory module has been read sign, judges whether the redaction of described software was read;
Judge module judge the redaction of described software whether be set up read sign before, need to judge the redaction existence whether software is arranged in the memory module;
When judge module determined not have in the memory module redaction of software to exist, judge module notice operation module read, moves the stable release of software in the exterior storage media module;
Determining to have in the memory module redaction of software when judge module exists, and the software version in the memory module has been provided with when having read sign, can notify and remove the redaction that module is removed described software, also can not notify and remove the redaction that module is removed described software, notice operation module reads, moves the stable release of software described in the exterior storage media module simultaneously;
Here of particular note: the software version in the memory module has been provided with the situation that has read sign can comprise following two kinds of situations, first kind of situation refers to the updating operation that software version in the memory module has been carried out this software, and upgrade successfully, in this case, module is not removed this software version if judge module is notified removing, when carrying out this step in system so, will find that this software version has been set up and read sign, this situation, stable release is the software version of this software upgrade success in the exterior storage media module; Second kind of situation refers to the updating operation that software version in the memory module had been carried out this software already, but because upgrading failure, and the system that makes restarts, in this case, judge module can find also that this software version in the memory module is set up and read sign, and the judge module notice is removed module and removed software version in the memory module, in this case, stable release is the software version before this software upgrading, the i.e. original version of software in the exterior storage media module;
Determine at judge module that the redaction of software in the memory module is not set up and read sign, it is out-of-date promptly not to be read, and notice operation module reads, moves the redaction of the described software in the memory module;
In the operation module when moving the redaction of described software, whether the redaction that judge module need be judged described software can normally be moved at the appointed time; When judge module determines that the redaction of described software in the fixed time is normally moved, notice operation module writes exterior storage media module with the redaction of software described in the memory module, remove the redaction of software described in the memory module simultaneously, it should be noted that, at this, also can not remove the redaction of software described in the memory module; Judge module determines that the redaction of described software can not normally be moved in the fixed time, when promptly breaking down, system restart, the software version that promptly occurs in the memory module has been provided with the second kind of situation that has read sign, and system promptly can realize the software rollback according to the abovementioned steps executable operations.
Described operation module is used for the notice according to judge module, reads, moves the indicated release of described software; And when reading the redaction of software described in the memory module for the first time,, it has read sign for being provided with.
Described exterior storage media module is used for the stable release of storing software, this stable release comprises the original version of this software, when judge module is determined can to move the redaction of normal described software in the operation module at the appointed time, judge module notice operation module writes the redaction of software described in the memory module in the described exterior storage media module, and the redaction that be written into this software in the exterior storage media module this moment also is the stable release of this software; Described exterior storage media module can be FLASH or EPROM, also can be storage mediums such as hard disk.
The redaction of the software of mentioning in the foregoing refers to software and is used for the upgrading software version, the original version of software refers to the software version before the software upgrading, continuous upgrading along with software, the original version of software, the redaction of software can constantly be updated, therefore, the original version of the redaction of software and software is relative.
It can be seen from the above, embodiments of the invention provide a kind of software upgrade method and system, after software upgrading, if abnormal conditions occur, the assurance system return back to original version of software fast, and the business that farthest guarantees does not occur unusual and influenced because of software upgrading.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claims.

Claims (10)

1. a software upgrade method is characterized in that, stores the redaction of software in the software reserved area, and described method comprises:
Whether the redaction of judging described software is read;
When the redaction of described software is not read out-of-dately, read and move the redaction of described software from described software reserved area, carry out software upgrading;
When the redaction of described software has been read out-of-dately, read and move the stable release of described software, described stable release comprises the original version of described software;
Described software reserved area is a preassigned zone in the speedy storage equipment.
2. method according to claim 1 is characterized in that, described method comprises:
When the redaction of judging described software has been read, remove the redaction of software described in the software reserved area.
3. method according to claim 1, it is characterized in that, the step of the redaction of the described software of described operation comprises: the at the appointed time interior operation of the redaction of described software just often, with the original version updating of described software is the redaction of described software, and removes the redaction of software described in the described software reserved area.
4. a software upgrade method is characterized in that, when not having the redaction of software to exist in the software reserved area, reads and move the stable release of described software, and described stable release comprises the original version of described software.
5. method according to claim 1 is characterized in that, described speedy storage equipment is an internal memory, and the original storage of versions of described software is in non-volatile memory medium FLASH.
6. the system of a software upgrading is characterized in that, described system comprises memory module, exterior storage media module, judge module and operation module;
Memory module is arranged in the appointed area of speedy storage equipment, is used for the redaction of storing software;
Exterior storage media module is used for the stable release of storing software, and described stable release comprises the original version of software;
Judge module: whether the redaction that is used for judging the described software of memory module was read, it is out-of-date that the redaction of the described software in determining memory module is not read, and notice operation module reads, moves the redaction of the described software in the memory module; It is out-of-date that the redaction of the described software in determining memory module has been read, and notice operation module reads, moves the original version of software described in the exterior storage media module;
The operation module: be used for the notice according to judge module, read, move the indicated release of described software, described indicated release comprises the redaction of described software and the original version of described software.
7. system according to claim 6 is characterized in that described system also comprises the removing module, and it is out-of-date that described removing module is used for determining that at judge module the redaction of described software has been read, removes the redaction of the described software in the software reserved area.
8. system according to claim 6 is characterized in that, described speedy storage equipment is an internal memory.
9. system according to claim 6 is characterized in that, judge module is judged the redaction that whether can normally move software in the memory module in described operation module at the appointed time; When judge module determines that described software normally moves in the fixed time, judge module notice operation module writes described exterior storage media module with the redaction of the software of described software in memory module, and notice is removed the redaction that module is removed the described software in the memory module; Described exterior storage media module comprises non-volatile memory medium FLASH.
10. the system of a software upgrading is characterized in that, described system comprises memory module, exterior storage media module, judge module and operation module, wherein,
Memory module is arranged in the appointed area of speedy storage equipment, is used for the redaction of storing software;
Exterior storage media module is used for the stable release of storing software, and described stable release comprises the original version of software;
Judge module: be used for judging whether memory module has the redaction of software to exist, when not having the redaction of described software to exist in determining memory module, notice operation module reads, moves the original version of the described software in the exterior storage media module;
Operation module: be used for notice, read, move the original version of described software according to judge module.
CNA2007100075099A 2007-01-26 2007-01-26 Method and system for updating software Pending CN101231592A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2007100075099A CN101231592A (en) 2007-01-26 2007-01-26 Method and system for updating software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2007100075099A CN101231592A (en) 2007-01-26 2007-01-26 Method and system for updating software

Publications (1)

Publication Number Publication Date
CN101231592A true CN101231592A (en) 2008-07-30

Family

ID=39898094

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2007100075099A Pending CN101231592A (en) 2007-01-26 2007-01-26 Method and system for updating software

Country Status (1)

Country Link
CN (1) CN101231592A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826027A (en) * 2010-05-28 2010-09-08 深圳市融创天下科技发展有限公司 Embedded system and updating method thereof
CN101782855B (en) * 2009-01-15 2013-03-20 华为技术有限公司 Method and device for removing software according to configuration
CN103870305A (en) * 2014-02-19 2014-06-18 江苏天宝汽车电子有限公司 Software upgrading method of vehicle-mounted sound box with USB (Universal Serial Bus) interface/memory card interface
CN108089943A (en) * 2016-11-21 2018-05-29 比亚迪股份有限公司 Program excutive method, device and terminal based on MCU system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101782855B (en) * 2009-01-15 2013-03-20 华为技术有限公司 Method and device for removing software according to configuration
CN101826027A (en) * 2010-05-28 2010-09-08 深圳市融创天下科技发展有限公司 Embedded system and updating method thereof
CN103870305A (en) * 2014-02-19 2014-06-18 江苏天宝汽车电子有限公司 Software upgrading method of vehicle-mounted sound box with USB (Universal Serial Bus) interface/memory card interface
CN108089943A (en) * 2016-11-21 2018-05-29 比亚迪股份有限公司 Program excutive method, device and terminal based on MCU system

Similar Documents

Publication Publication Date Title
CN102033790B (en) Method and device for upgrading embedded-type system BOOTROM
JP5757509B2 (en) System reset
CN106095620B (en) A kind of development approach of built-in Linux partition holding
JP5113700B2 (en) Firmware update apparatus and method
JP4810172B2 (en) Control device, version upgrade method, and program
CN102023908A (en) Method and device for backing up boot program
CN101826027A (en) Embedded system and updating method thereof
US9563566B2 (en) Device and method for integrated data management for nonvolatile buffer cache and nonvolatile storage
US7533290B2 (en) Microcode updating error handling apparatus and method thereof
US20030225986A1 (en) Program install method, file renewal method, program and computer system
JP2013520744A (en) Method and apparatus for generating minimum boot image
CN101373451A (en) Computer system for protecting double-basic input /output system program and control method thereof
JP2010186341A (en) Memory system
CN101872306B (en) Embedded system for realizing software updating and software backup and implementation method thereof
CN101231592A (en) Method and system for updating software
TW202209124A (en) Ssd supporting read-only mode after plp backup failure
KR20080066381A (en) Method for upgrading software
JP4026588B2 (en) Disk array device, disk cache management method, and program
JP2015035007A (en) Computer, control program, and dump control method
US20070271311A1 (en) Disk array device and data management method for managing master data and replication data replicated from master data
WO2012077604A1 (en) Processing device, program update method, and program
KR20150058092A (en) Network boot system
CN114138314A (en) CPU microcode upgrading method, system and related assembly
JP2007164392A (en) Computer
JP6221702B2 (en) Information processing apparatus, information processing method, and information processing program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20080730