CN1280724C - Software online updating process - Google Patents

Software online updating process Download PDF

Info

Publication number
CN1280724C
CN1280724C CN 02112209 CN02112209A CN1280724C CN 1280724 C CN1280724 C CN 1280724C CN 02112209 CN02112209 CN 02112209 CN 02112209 A CN02112209 A CN 02112209A CN 1280724 C CN1280724 C CN 1280724C
Authority
CN
China
Prior art keywords
rompaq
variable
monitoring
upgrade
terminal module
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.)
Expired - Fee Related
Application number
CN 02112209
Other languages
Chinese (zh)
Other versions
CN1464394A (en
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN 02112209 priority Critical patent/CN1280724C/en
Publication of CN1464394A publication Critical patent/CN1464394A/en
Application granted granted Critical
Publication of CN1280724C publication Critical patent/CN1280724C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

The present invention discloses a software on-line upgrade method which relates to the field of software downloading. The method comprises the following steps: an area for storing downloading program monitoring structure variables is divided from a configurable area of a terminal module; when a monitoring center implements software upgrade, upgrade programs are transferred to the terminal module and stored in the configurable area according to the existing terminal module upgrade method with a software on-line upgrade function; variable assignment of each member of the downloading program monitoring structure variables is implemented, and after that each member is stored in the configurable area; the operation of a watchdog is stopped, the CPU is restored after the specified time arrives, and the terminal module is restarted; the downloading program monitoring structure variables which are assigned with initial values are read, and the process of programs of the next step is determined according to the taken values of the structure members; the monitoring center monitors a monitoring module which runs upgrade software, and a monitoring cancellation command is given after the confirmation of inerrability; the monitoring module sets the monitoring variable to be 'no ', and when the terminal is restarted, upgrade programs are directly run. The present invention improves the work efficiency.

Description

A kind of method of on-line software updating
Technical field
The present invention relates to the software download field, be specifically related to the method for downloading software in power-equipment and the environment centralized supervision field.
Background technology
Power-equipment and environment centralized supervision system are that various parameters, image, sound of plurality of devices such as the power supply, air-conditioning, oily machine, accumulator, high and low voltage electric distribution to communication bureau's (station) and environment etc. take remote measurement, remote signalling and remote control, monitor its operational factor in real time, diagnosis and handling failure, record and analyze related data, thus realize communication bureau's (station) people or unmanned and equipment is carried out the computer control system of Centralized Monitoring and centralized maintenance less.
Power-equipment and environment centralized supervision system adopt distributed computer control system more, generally are divided into local network Surveillance center, monitoring station at county level, far-end controlled office monitoring unit and remote monitoring terminal module.Wherein, the remote monitoring terminal module directly is connected with monitored device, be used for the supervision of monitored device duty and the collection of operational factor, and the result is sent to monitoring unit and Surveillance center, and receive and carry out monitoring and control command in real time from Surveillance center and monitoring unit.For reliability and the dirigibility that improves the terminal monitoring module, terminal module is except possessing above-mentioned basic function, also possesses the on-line software updating function, promptly when the operating software of remote monitoring terminal module need be upgraded, only need to carry out on-line software updating in Surveillance center, and needn't arrive each end office (EO) each terminal module is upgraded, significantly reduce the workload of software upgrading.
Hardware design with terminal module of on-line software updating function is core with CPU, and outfit is stored the dispatch from the factory EPROM (Erasable Programmable Read Only Memory) (EPROM) of program and the fast EPROM (Erasable Programmable Read Only Memory) of stored configuration content and ROMPaq, the house dog (WATCHDOG) of abbreviation flash memory (FLASHEPROM) and supervisory programme ruuning situation.The software upgrading Module Design generally all concentrates on and guarantees upgrade software correct transmission and at the ROMPaq and the aspects such as can repeating switching between the program of dispatching from the factory in the transmission course from the Surveillance center to the terminal module.Its principle of work is, after terminal module powered on operation, CPU at first carried out program among the EPROM and reads deploy content among the FLASH EPROM, then the dispatch from the factory program or download of operation according to deploy content.No matter be to move dispatch from the factory program or ROMPaq, program all must be operated WATCHDOG in official hour, and the CPU otherwise WATCHDOG will reset makes system roll-back.When Surveillance center need carry out software upgrading, the software upgrading module of terminal module at first is stored in ROMPaq among the FLASHEPROM of veneer, and configuring area among the FLASH EPROM is configured, show that veneer will move downloading among the FLASH EPROM, just stop then WATCHDOG is operated, after the WATCHDOG stipulated time arrived, the WATCHDOG CPU that just resets made system roll-back.After system roll-back and reading FLASH EPROM deploy content, will carry out ROMPaq, reason whatsoever all will be moved the ROMPaq among the FLASHEPROM, unless the configuring area among the FLASH EPROM is reconfigured after program is restarted later on.
Though above-mentioned technical scheme with terminal module of on-line software updating function has guaranteed upgrade software correct transmission and in ROMPaq with dispatch from the factory and can repeat between the program to switch in the transmission course from the Surveillance center to the terminal module, but to the less consideration of the reliability of ROMPaq inherence, if because upgrade software designer error, there is the mortality mistake in ROMPaq itself, just the ROMPaq that may lead to errors correctly is transferred to terminal module, successfully switch the ROMPaq of the last run-time error of terminal module then with the program of dispatching from the factory.When the ROMPaq of terminal module run-time error, because of can't operating WATCHDOG at the appointed time, the WATCHDOG CPU that will reset makes system roll-back.After system roll-back, the ROMPaq of run-time error again, the WATCHDOG CPU that can reset again makes system roll-back.Like this, terminal module just has been absorbed in the endless loop and the Surveillance center that reset, restart and reset and has lost contact.Surveillance center is ROMPaq again both, the program of also can't the switchback of command terminal module dispatching from the factory, terminal module oneself also can't switch back the correct program of dispatching from the factory again, and must wait for that the maintainer recovers to the far-end scene in person, and the effect of on-line software updating function is had a greatly reduced quality.
Summary of the invention
Technical matters to be solved by this invention is to overcome the defective that above-mentioned on-line software updating function is had, characteristics in conjunction with the terminal module that has the on-line software updating function at present, on its existing hardware design basis, make that terminal module can be not out of touch because of the design mistake and the Surveillance center of ROMPaq, therefore the maintainer also needn't go the scene and deal with problems.
The method of the on-line software updating that the present invention proposes comprises the steps:
The 1st step, mark a zone with the storage monitoring structure variable Monitor_Upgrade that downloads at the configurable zone of terminal module (as FLASH EPROM), this structure variable comprises member variables such as ROMPaq variable EnableUpgrade, monitored variable EnableMonitor, exceptional reset variables A bend;
The 2nd step, when Surveillance center carries out software upgrading, ROMPaq correctly be transferred to terminal module and be saved in the configurable zone of storage ROMPaq according to existing upgrade method with terminal module of on-line software updating function;
The 3rd the step, to each the member variable assignment of monitoring structure variable Monitor_Upgrade that downloads, be about to ROMPaq variable EnableUpgrade, monitored variable EnableMonitor and all be changed to "Yes", exceptional reset variables A bend is changed to "No", and the monitoring structure variable storage that downloads of assignment arrives configurable zone then;
The 4th the step, stop operation to house dog WATCHDOG, wait the WATCHDOG stipulated time to arrive after, make cpu reset, terminal module restarts;
The 5th step, terminal module read the monitoring structure variable Monitor_Upgrade that downloads of initialize after restarting, and determine next step flow process of program according to its structure member's value condition, that is:
1), if ROMPaq variable EnableUpgrade is a "Yes", the ROMPaq that then brings into operation, otherwise the operation program of dispatching from the factory;
2), if monitored variable EnableMonitor be changed to "Yes", then enter 3); Otherwise directly move the ROMPaq or the program of dispatching from the factory with regard to withdrawing from judgement;
3), judge whether this Program reset belongs to exceptional reset, if promptly Abend is a "No", then belongs to program and normally reset, otherwise be exactly exceptional reset; Reset if belong to normally, then, move ROMPaq then again to Abend assignment "Yes"; If belong to exceptional reset, can judge that then there is mistake in ROMPaq, no longer carry out ROMPaq, but earlier ROMPaq variable EnableUpgrade is changed to "No", move the program of dispatching from the factory then, wait for that Surveillance center carries out software upgrading again;
The 6th step, Surveillance center monitor the monitoring module ruuning situation of operation upgrade software, after the discovery operation is errorless, issue the cancellation monitor command;
After the 7th step, monitoring module were received the cancellation monitor command, EnableMonitor was changed to "No" with monitored variable, when later terminal restarts again, just directly moved ROMPaq, and no longer judged whether exceptional reset.
Adopt the method for the invention more in the past method for upgrading software increased monitoring to ROMPaq ruuning situation, cpu reset that can the automatic distinguishing terminal module belongs to the still exceptional reset that normally resets, can avoid causing terminal module and Surveillance center is out of touch can't recover because of the mistake of ROMPaq own, and be controlled, do not influence after the operation ROMPaq because other reasons cause terminal module to reset after again the dispatch from the factory situation of program of operation take place.In addition, this method need only can realize by software design, does not need to carry out any hardware and changes.Therefore the on-line software updating method with self-recovering function of the present invention has reached really and need not the maintainer go the effect that safeguard at the scene having obtained obvious progress aspect the raising terminal module software design reliability, has improved work efficiency.
Description of drawings
Fig. 1 is the schematic flow sheet of the method for the invention.
Fig. 2 is a particular hardware block diagram of realizing the inventive method.
Embodiment
Below in conjunction with Fig. 1, Fig. 2 and embodiment on-line software updating method of the present invention is described further.
As shown in Figure 2, hardware components is with Intel386 TMThe EX embedded microprocessor is as CPU, and is equipped with functional unit and communication units such as basic circuits such as EPROM, FLASH EPROM, RAM, WATCHDOG and remote measurement, remote signalling, remote control.Wherein EPROM stores the program of dispatching from the factory, FLASH EPROM store configuration information and ROMPaq, and WATCHDOG monitors the program run situation, and communication unit is responsible for and Surveillance center's contact, and accepts ROMPaq and the various command that Surveillance center sends.
Software section is except guaranteeing basic functions such as reliable download of ROMPaq and correct storage, also to monitor in the ruuning situation of terminal module ROMPaq, will mark the monitoring structure variable Monitor_Upgrade that downloads that the special storage in a zone is monitored ROMPaq operation feelings at the configurable zone of terminal module (FLASH EPROM), it is defined as follows for this reason:
struct?MonitorOfUpgrade
{
Unsigned char EnableUpgrade, // whether move the ROMPaq sign
Unsigned char EnableMonitor; // whether monitor sign
Unsigned char Abendt, // exceptional reset sign whether
Unsigned int NumOfAbent //CPU allows exceptional reset number of times (optional)
}Monitor_Upgrade
The monitoring structure variable Monitor_Upgrade that downloads is stored in an assigned address among the veneer FLASHEPROM, as:
#define?AddMonitorOfDownloadInFlash ((unsigned?char*)Ox7f6000L)
Must earlier it from FLASH EPROM be read before it being operated at every turn, must in FLASH EPROM, write again after operation is finished.
In application program, the operation of the monitoring structure variable Monitor_Upgrade that downloads divided and carry out for three times, once after ROMPaq is written to FLASH EPROM entirely truely, the monitoring structure variable Monitor_Upgrade that will download from FLASH EPROM reads, and the structure member to it carries out following assignment operation then:
Monitor_Upgrade.EnableUpgrade=1; // guiding ROMPaq
Monitor_Upgrade.EnableMonitor=1; // monitor
Monitor_Upgrade.Abendt=0; // normally reset
Monitor_Upgrade.NumOfAbent=3; // permission exceptional reset number of times
The structure variable of assignment writes among the FLASH EPROM again then, and stops the operation to WATCHDOG, makes cpu reset until WATCHDOG.
To after second time of the monitoring structure variable Monitor_Upgrade that downloads operating in terminal module and restarting, master routine at first reads the monitoring structure variable Monitor_Upgrade that downloads that is stored among the FLASH EPROM, and its structure member conducted interviews and judges, with determine program flow to.
It should be noted that no matter program is under which kind of situation, as long as each structure member variable of monitoring structure variable Monitor_Upgrade that downloads is operated, all the structure variable after the assignment again will be write among the FLASH EPROM again.
Whether the ROMPaq of operating basis for the third time to the monitoring structure variable Monitor_Upgrade that downloads correctly decides.After if program continues operation, when Surveillance center confirms that by the ruuning situation of observing terminal module it has met design requirement, then send the ROMPaq order of correctly accepting one's fate really.After terminal module was received and confirmed order, Monitor_Upgrade operated for the third time to structure variable:
MonitorOfDownload.EnableMonitor=0; // by confirming that the cancellation monitoring writes again then and also continues the operation ROMPaq among the FLASH EPROM.
If ROMPaq exists wrong and causes the WATCHDOG action to make cpu reset, then can restart the back structure variable Monitor_Upgrade is operated for the third time at terminal module:
Monitor_Upgrade.EnableUpgrade=0; // operation the program of dispatching from the factory
Again write then and also continue to move the program of dispatching from the factory among the FLASH EPROM.
Because ROMPaq is many from the transfer resource that Surveillance center is transferred to the terminal module cost, if owing to on-the-spot other reasons made cpu reset before Surveillance center issues the cancellation monitor command, then the ROMPaq monitoring module also can be judged as the ROMPaq mistake by mistake, and switch back the program of dispatching from the factory, so just must again ROMPaq be transferred to terminal module, be the transfer resource that avoids waste, can after belonging to exceptional reset, the 5th step judgement system count, after having increased permission exceptional reset number of times option, then can when each exceptional reset, judge earlier whether it is zero, if be zero then switch back the program of dispatching from the factory, otherwise the exceptional reset number of times is subtracted 1:
Monitor_Upgrade.NumOfAbent--;
Again write among the FLASH EPROM then and continuation operation ROMPaq.

Claims (2)

1, a kind of method of on-line software updating comprises the steps:
The 1st step, mark a zone in the configurable zone of terminal module with the storage monitoring structure variable that downloads, this structure variable comprises ROMPaq variable, monitored variable, exceptional reset variable member variable;
The 2nd step, when Surveillance center carries out software upgrading, ROMPaq correctly be transferred to terminal module and be saved in the configurable zone of storage ROMPaq according to existing upgrade method with terminal module of on-line software updating function;
The 3rd the step, to each the member variable assignment of monitoring structure variable that downloads, the initial value of ROMPaq variable, monitored variable, three member variables of exceptional reset variable is set to "Yes" respectively, "Yes", "No" are incited somebody to action then, and the monitoring structure variable storage that downloads of assignment arrives configurable zone;
The 4th step, stop operation to house dog, wait the house dog stipulated time to arrive after, make cpu reset, terminal module restarts;
The 5th step, terminal module read the monitoring structure variable that downloads of initialize after restarting, and determine next step flow process of program according to its structure member's value condition, that is:
1), if the ROMPaq variable is a "Yes", the ROMPaq that then brings into operation, otherwise the operation program of dispatching from the factory;
2), if monitored variable be changed to "Yes", then enter 3); Otherwise directly move the ROMPaq or the program of dispatching from the factory with regard to withdrawing from judgement;
3), judge whether this Program reset belongs to exceptional reset, if belong to normally and reset, then, move ROMPaq then again to exceptional reset variable assignments "Yes"; If belong to exceptional reset, can judge that then there is mistake in ROMPaq, no longer carry out ROMPaq, but earlier the ROMPaq variable is changed to "No", move the program of dispatching from the factory then, wait for that Surveillance center carries out software upgrading again;
The 6th step, Surveillance center monitor the monitoring module ruuning situation of operation upgrade software, after the discovery operation is errorless, issue the cancellation monitor command;
The 7th step, monitoring module are changed to "No" with monitored variable after receiving the cancellation monitor command, when later terminal restarts again, just directly move ROMPaq, and no longer judge whether exceptional reset.
2, the method for a kind of on-line software updating according to claim 1, it is characterized in that: after the 5th step judgement system belongs to exceptional reset, count, when each exceptional reset, judge earlier and allow whether exceptional reset number of times option is zero, if be zero then switch back the program of dispatching from the factory, otherwise the exceptional reset number of times is subtracted 1, write in the configurable zone then again and continuation operation ROMPaq.
CN 02112209 2002-06-21 2002-06-21 Software online updating process Expired - Fee Related CN1280724C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 02112209 CN1280724C (en) 2002-06-21 2002-06-21 Software online updating process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 02112209 CN1280724C (en) 2002-06-21 2002-06-21 Software online updating process

Publications (2)

Publication Number Publication Date
CN1464394A CN1464394A (en) 2003-12-31
CN1280724C true CN1280724C (en) 2006-10-18

Family

ID=29742090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 02112209 Expired - Fee Related CN1280724C (en) 2002-06-21 2002-06-21 Software online updating process

Country Status (1)

Country Link
CN (1) CN1280724C (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100652715B1 (en) * 2005-02-28 2006-12-01 엘지전자 주식회사 Method and apparatus of application program dynamic loading for mobile phone
CN100384122C (en) * 2005-05-25 2008-04-23 深圳创维数字技术股份有限公司 On-line promotion method for network terminal product
CN101236506B (en) * 2008-02-25 2011-07-20 中兴通讯股份有限公司 Frame type apparatus version upgrading method
CN103036706A (en) * 2012-11-26 2013-04-10 青岛海信传媒网络技术有限公司 Local processing method of application upgrading abnormity
CN104469278B (en) * 2013-09-25 2018-05-01 浙江大华技术股份有限公司 A kind of monitoring system upgrade method and device
CN105446770A (en) * 2015-11-13 2016-03-30 邦彦技术股份有限公司 Centralized storage method capable of saving memory chips and multi-functional module system
CN116521201A (en) * 2023-04-26 2023-08-01 如果新能源科技(江苏)股份有限公司 Software upgrading method of battery pack and battery pack

Also Published As

Publication number Publication date
CN1464394A (en) 2003-12-31

Similar Documents

Publication Publication Date Title
CN100525206C (en) Realizing method and system for automatic restoring equipment fault
CN107092552B (en) Log management method and device
CN101542445B (en) Apparatus and methods of a zero single point of failure load balancer
CN102314369B (en) Self-upgrade method for equipment in remote online monitoring system
CN103209197B (en) cluster server deployment method and system
CN100340982C (en) After-error recovery method of transmission equipment card software on-line update
CN110209405B (en) Automatic upgrading method and device for distributed system
CN1280724C (en) Software online updating process
CN1933416A (en) Long-distance on-line staging method with self-recovery function
CN101042651A (en) Software updating method and system thereof
CN1996253A (en) Apparatus, system, and method for non-interruptively updating firmware on a redundant hardware controller
CN1427587A (en) Method and system for remote updating function of domestic apparatus
CN102567438A (en) Method for providing access to data items from a distributed storage system
CN104503782A (en) Remote software upgrading method for in-situ relay protection device
CN102722420A (en) Self-diagnosis terminal, detection method and remote maintenance system
CN2851205Y (en) Elevator monitoring terminal based on embedded processor
CN101789886A (en) Environment setup automation system of distribution type environment and method
CN110134518A (en) A kind of method and system improving big data cluster multinode high application availability
CN103136005A (en) Method of updating firmware
CN1719413A (en) Upgrading method of communication equipment
CN113515316A (en) Novel edge cloud operating system
CN115268976A (en) Automatic upgrading method and system for multi-data center collection Agent version
CN115422036A (en) Vehicle-end SOA service call chain tracking method based on OpenTelemetry
CN1545363A (en) A method for downloading software from server side on client side in distributed system
CN111090537B (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
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: 20061018

Termination date: 20190621

CF01 Termination of patent right due to non-payment of annual fee