CN1713143A - Compatibility upgrading method of embedded programm - Google Patents
Compatibility upgrading method of embedded programm Download PDFInfo
- Publication number
- CN1713143A CN1713143A CN 200410049498 CN200410049498A CN1713143A CN 1713143 A CN1713143 A CN 1713143A CN 200410049498 CN200410049498 CN 200410049498 CN 200410049498 A CN200410049498 A CN 200410049498A CN 1713143 A CN1713143 A CN 1713143A
- Authority
- CN
- China
- Prior art keywords
- field
- database
- backup
- upgrading
- new
- 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.)
- Granted
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A method for upgrading compatibility of embedded program includes loading upgrade program and restarting up equipment, judging whether databank is the same or not before and after upgrading and restoring backup databank CBD before upgrading into internal memory if it is or executing the upgrading program to create new databank if it is not, comparing each field in new databank with field in BD and restoring data corresponded with field in BD to corresponding field in new databank if their fields are the same and starting up device for finalizing upgrade.
Description
Technical field
The present invention relates to communication and field of computer technology, relate in particular to a kind of compatibility update method of embedded program.
Background technology
Built-in application program has been widely used in the communications field; in Synchronous Digital Transmission Network/synchronizable optical transmission network/dense wave division multipurpose light network transmission systems such as (SDH/SONET/DWDM) is used; network element device is based on built-in application program; by this built-in application program; each network node all needs to realize the storage of configure/status data; backup; functions such as recovery and protection; make at network element software unusual; reset; device looses power; guarantee under the abnormal conditions such as chip damage that each network node still can correctly preserve and recover proper configuration/status data, guarantee that light network transmission system normally moves.Equipment based on embedded program then normally adopts database to come stored configuration/status data.
Because in the middle of practical application, need constantly upgrade, to strengthen its function or to solve the defective of current working procedure to the application software of network element device.In order to support the extensibility of network element device, need to support the compatibility update of application software, with the application that guarantees expanded function with keep compatibility, and guarantee the realization of compatibility update function, but most crucial part is the compatibility of supporting database to the forward direction function.
Because not supporting database upgrading of prior art can only be deleted all Backup Datas, and issue configuration again after upgrading is finished when upgrade software, and then Backup Data.In this process, there is the professional danger that is affected even interrupts.Simultaneously, be to guarantee the consistance of database, must under the constant situation of original database structure, redefine, or redesign a database, abandon original database design field.Therefore, utilize prior art upgrading built-in application program to have poor compatibility and the complicated shortcoming of upgrading.
Summary of the invention
The invention provides a kind of compatibility update method of embedded program, have poor compatibility and upgrading complicated problems in the existing upgrading built-in application program to solve.
For addressing the above problem, the invention provides following technical scheme:
A kind of compatibility update method of embedded program comprises the steps:
A, the loading of on equipment, finishing ROMPaq and restart facility;
B, judge before the upgrading with upgrading after the version number of database whether consistent, if inconsistent, then carry out ROMPaq and create new database and carry out step C, otherwise the backup database that upgrading is preceding returns to internal memory and carries out step D;
C, the field in each field and the backup database in the new database is compared, the data of this field correspondence of backup database are returned in the field of new database correspondence if field is identical;
D, normal starting outfit are also finished upgrading.
According to said method:
Step C comprises the steps:
(1) gets a field of new database as current field;
(2) field in current field and the backup database is compared, judge that whether current field is a field in the backup database, if then carry out step (3), otherwise carries out step (4);
(3) all data with corresponding field in the backup database return in the current field of new database;
(4) judge whether field in the relatively intact new database, if then finish relatively, otherwise, get next field in the new database as current field and carry out step (2).
If there is multi-level backup in backup database, then before using backup database, earlier backups at different levels is unified, and in subsequent step, use backup database after reunification.
Among the step C,, compose the data of acquiescence then for this field if the field in field in the new database and the backup database is inequality.
After database recovery was finished, the backup database before the deletion upgrading also backed up the database of current use.
Described equipment is the network element device in the transmission network.
Adopt the present invention, can improve the extensibility of equipment, make equipment have the extended capability of forward compatibility; Also can improve simultaneously the maintainability of equipment, simplify upgrade step, and the security that improves the plant maintenance upgrading.
Description of drawings
Fig. 1 is the storage and the backup synoptic diagram of database in the network element device;
Fig. 2 is the main process flow diagram of realization compatibility update of the present invention;
Fig. 3 is the process flow diagram from the backup database restore data to the newdata storehouse.
Embodiment
For for the equipment of built-in application program, generally adopt embedded relevant database to come stored configuration and status information.In escalation process, need database is carried out upgrading processing after having loaded ROMPaq.The database that use the back owing to upgrade may be identical with the database of use before the upgrading, also may be inequality, therefore need the process that restarts after having loaded ROMPaq be handled by database.
For the database before and after the upgrading is inequality, can discern by version number.In the present invention, for using then direct restore data from the backed up data storehouse of identical database before and after the upgrading, if the database that uses before and after the upgrading is inequality, then relatively, and with the data of same field from backup database, return in the newly-built database the field in newly-built database and the backed up data storehouse.
In embedded Relational DBMS, file is actually a zone in the internal memory.Relevant database is based on the data management of form, and base unit is record (record) and field (field), and is as shown in table 1:
Table 1
Field 1 | Field 2 | … | … | Field n |
??Value1 | ??Value2 | … | … | ??Valuen |
??… | ??… | … | … | ??… |
Database file comprises a data library file block structure and several record blocks.The database file block structure comprises library file flag information and field description piece two parts, and is as shown in table 2:
Table 2
Classification | Subclass |
The database file block structure | File mark information |
The field description piece | |
Database file block structure end mark | |
Record block | Each record start/deleted marker |
The record body | |
Library file storage end mark |
The compatibility of database of the present invention is meant the adjustment of any increase, deletion, insertion and the order of supporting database field, the increase of data-base recording number, minimizing; But the not change of supporting database field attribute.
Present embodiment is that the present invention will be described for example with the network equipment in the optical transport network mainly.
Consult shown in Figure 1ly, SDRAM is the internal memory of network element device, and nonvolatile memory (NVRAM) and FLASH are used for backing up the database file of SDRAM.Database file among the SDRAM backups among the NVRAM in real time, and the database file among the NVRAM then regularly or by manual type backups among the FLASH.
The establishment of application programming interface (API) the fulfillment database file of application program module by calling database module, each database file all have version number's sign, in the API parameter version number information are arranged.The present invention determines whether to upgrade by version number's sign, so when creating each database file, at first judge version number, if the version number in the API parameter is consistent with the version number of Backup Data library file, then showing does not need upgrading processing, and directly the restore data library file both can; If the version number of the version number of API parameter and Backup Data library file inconsistent (version number all can progressively increase when program design usually), then log-on data library file updating operation.
Consult shown in Figure 2ly, realize that the main process of compatibility update is as follows:
Step 100: on network element device, finish the loading of ROMPaq and restart network element device.
Step 110: call the application programming interface (API) of creating database, enter the database initialize process.
Step 120: judge before the upgrading and the version number of the database after upgrading whether consistent, if inconsistent, then carry out step 130, otherwise carry out step 170.
Step 130: the multi-level backup database unification in nonvolatile memory (NVRAM) and the flash memory (FLASH) is backuped among the NVRAM.
Because the database multi-level backup, the database file difference of possible each backup area compares the backup database of storage mediums such as NVRAM/FLASH, and up-to-date database unification is backuped among the NVRAM.
Step 140: carry out ROMPaq and in SDRAM, create new database according to new database structure.
Step 150: relatively whether each field of new database is the field that the legacy data storehouse has; If then the data of legacy data storehouse corresponding field are returned in the corresponding field of new database.
Step 160: the legacy data storehouse among the deletion NVRAM/FLASH, new DB Backup in NVRAM/FLASH, carry out step 180.
Step 170: the multi-level backup database unification in nonvolatile memory (NVRAM) and the flash memory (FLASH) is backuped among the NVRAM, and backup database is after reunification returned to internal memory.
Step 180: normal starting outfit was to finish upgrading after the resuming work of database data finished.
Consult shown in Figure 3ly, in the above-mentioned steps 150, the concrete processing procedure from the backup database restore data to the newdata storehouse is as follows:
Step 200: from new database, get first field as current field;
Step 210: the field in current field and the backup database is compared, judge that whether current field is a field in the backup database, if then carry out step 220, otherwise carry out step 230.
Step 220: all data of corresponding field in the backup database are returned in the current field of new database.
Step 230: judge whether the field in the relatively intacter new database, relatively carry out the step 160 in the above-mentioned flow process, otherwise carry out step 240 if then finish.
Step 240: get next field in the new database as current field and carry out step 210.
In field comparison procedure with new database and backup database, promptly be the field that increases newly if the field of new database is not a field in the backup database, compose the data of acquiescence then for this field in the new database, compose 0 such as complete.
Though more than network element device be that example describes realization of the present invention, be not limited to this, the present invention is equally applicable to other equipment based on built-in application program, it realizes that principle is identical.
Claims (6)
1, a kind of compatibility update method of embedded program is characterized in that comprising the steps:
A, the loading of on equipment, finishing ROMPaq and restart facility;
B, judge before the upgrading with upgrading after the version number of database whether consistent, if inconsistent, then carry out ROMPaq and create new database and carry out step C, otherwise the backup database that upgrading is preceding returns to internal memory and carries out step D;
C, the field in each field and the backup database in the new database is compared, the data of this field correspondence of backup database are returned in the field of new database correspondence if field is identical;
D, normal starting outfit are also finished upgrading.
2, the method for claim 1 is characterized in that step C comprises the steps:
(1) gets a field of new database as current field;
(2) field in current field and the backup database is compared, judge that whether current field is a field in the backup database, if then carry out step (3), otherwise carries out step (4);
(3) all data with corresponding field in the backup database return in the current field of new database;
(4) judge whether field in the relatively intact new database, if then finish relatively, otherwise, get next field in the new database as current field and carry out step (2).
3, method as claimed in claim 1 or 2 is characterized in that, if there is multi-level backup in backup database, then earlier backups at different levels is unified before using backup database, and use backup database after reunification in subsequent step.
4, method as claimed in claim 3 is characterized in that, among the step C, if the field in field in the new database and the backup database is inequality, composes the data of acquiescence then for this field.
5, method as claimed in claim 3 is characterized in that, after database recovery was finished, the backup database before the deletion upgrading also backed up the database of current use.
6, the method for claim 1 is characterized in that, described equipment is the network element device in the transmission network.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2004100494987A CN1315043C (en) | 2004-06-24 | 2004-06-24 | Compatibility upgrading method of embedded programm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2004100494987A CN1315043C (en) | 2004-06-24 | 2004-06-24 | Compatibility upgrading method of embedded programm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1713143A true CN1713143A (en) | 2005-12-28 |
CN1315043C CN1315043C (en) | 2007-05-09 |
Family
ID=35718775
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2004100494987A Expired - Fee Related CN1315043C (en) | 2004-06-24 | 2004-06-24 | Compatibility upgrading method of embedded programm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1315043C (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102841843A (en) * | 2012-07-12 | 2012-12-26 | 中兴通讯股份有限公司 | Method and device for judging compatibility |
CN101188516B (en) * | 2007-12-21 | 2013-04-17 | 康佳集团股份有限公司 | A highly reliable and self-adapted remote update method for network device software system |
CN104636157A (en) * | 2013-11-14 | 2015-05-20 | 中兴通讯股份有限公司 | Software upgrading method based on data compatibility, client side, server and system |
CN105224361A (en) * | 2015-09-15 | 2016-01-06 | 深圳市华讯方舟软件信息科技有限公司 | A kind of method and system that sqlite3 type embedded database is upgraded |
CN106909429A (en) * | 2017-04-05 | 2017-06-30 | 微鲸科技有限公司 | A kind of synchronous upgrade method and device |
CN107291790A (en) * | 2016-03-31 | 2017-10-24 | Ls 产电株式会社 | The method of DB between the duplexing EMS Server of management |
CN110764810A (en) * | 2019-11-05 | 2020-02-07 | 四川虹美智能科技有限公司 | Android application upgrading and repairing method and terminal equipment |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5729735A (en) * | 1995-02-08 | 1998-03-17 | Meyering; Samuel C. | Remote database file synchronizer |
US7020750B2 (en) * | 2002-09-17 | 2006-03-28 | Sun Microsystems, Inc. | Hybrid system and method for updating remote cache memory with user defined cache update policies |
CN100399325C (en) * | 2002-10-25 | 2008-07-02 | 联想(北京)有限公司 | Data back up and recovering method of embedded data bank |
CN100399281C (en) * | 2002-12-09 | 2008-07-02 | 联想(北京)有限公司 | Hardware driving and software updating method based on multiplexed embedded system with expandable form |
-
2004
- 2004-06-24 CN CNB2004100494987A patent/CN1315043C/en not_active Expired - Fee Related
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101188516B (en) * | 2007-12-21 | 2013-04-17 | 康佳集团股份有限公司 | A highly reliable and self-adapted remote update method for network device software system |
CN102841843A (en) * | 2012-07-12 | 2012-12-26 | 中兴通讯股份有限公司 | Method and device for judging compatibility |
CN102841843B (en) * | 2012-07-12 | 2018-04-10 | 中兴通讯股份有限公司 | Compatible determination methods and device |
CN104636157A (en) * | 2013-11-14 | 2015-05-20 | 中兴通讯股份有限公司 | Software upgrading method based on data compatibility, client side, server and system |
WO2015070777A1 (en) * | 2013-11-14 | 2015-05-21 | 中兴通讯股份有限公司 | Software upgrade method, client, server, system and storage medium |
CN105224361A (en) * | 2015-09-15 | 2016-01-06 | 深圳市华讯方舟软件信息科技有限公司 | A kind of method and system that sqlite3 type embedded database is upgraded |
CN105224361B (en) * | 2015-09-15 | 2018-05-25 | 华讯方舟科技有限公司 | A kind of method and system upgraded to sqlite3 type embedded databases |
CN107291790A (en) * | 2016-03-31 | 2017-10-24 | Ls 产电株式会社 | The method of DB between the duplexing EMS Server of management |
CN107291790B (en) * | 2016-03-31 | 2022-04-15 | Ls 产电株式会社 | Method for managing DB between duplex EMS servers |
CN106909429A (en) * | 2017-04-05 | 2017-06-30 | 微鲸科技有限公司 | A kind of synchronous upgrade method and device |
CN110764810A (en) * | 2019-11-05 | 2020-02-07 | 四川虹美智能科技有限公司 | Android application upgrading and repairing method and terminal equipment |
Also Published As
Publication number | Publication date |
---|---|
CN1315043C (en) | 2007-05-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1081814C (en) | Updating and restoration method of system file | |
CN100343807C (en) | Upgrading method for Boot software and recovering method for Boot software | |
CN1694070A (en) | Staging method of POS terminal equipment | |
CN1277214C (en) | Embedded system upgrading method | |
US20050273476A1 (en) | Automated disk-oriented backups | |
CN1331817A (en) | Method and appts. for concurrent DBMS table operations | |
CN1595365A (en) | System and method for automatically and dynamically optimizing application data resources to meet business objectives | |
CN107545015B (en) | Processing method and processing device for query fault | |
CN1364390A (en) | Method and apparatus for downloading into radio terminal | |
CN1877539A (en) | Data backup/recovery system under cold start mode and implementing method therefor | |
CN1713154A (en) | Method for upgrading network management system in mobile communication | |
CN1315043C (en) | Compatibility upgrading method of embedded programm | |
CN111221682B (en) | Method for mirroring storage system | |
CN101800840B (en) | Set top box upgrading method | |
CN1801090A (en) | File update system and boot management system of mobile communication terminal,and its method | |
CN1295903C (en) | A safe system starting method | |
CN1713139A (en) | Realization and maintainment for running mode of preventing apparatus | |
CN101046761A (en) | Device and method for fetching snapshot data | |
CN1991777A (en) | Data prepackage system and method for mirror document | |
CN100346308C (en) | Automatic test method based on database operation | |
CN100343815C (en) | Method for restoring mobile terminal key parameter | |
CN116361817B (en) | Protection method of ubi file system under Linux | |
CN1798057A (en) | Method for loading software | |
CN1577309A (en) | System and method for equipment automation program refresh and computer readable memory medium | |
CN103188306B (en) | Distributed preprocess method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20070509 Termination date: 20150624 |
|
EXPY | Termination of patent right or utility model |