CN105005492A - Embedded equipment and software upgrading method - Google Patents

Embedded equipment and software upgrading method Download PDF

Info

Publication number
CN105005492A
CN105005492A CN201510504303.1A CN201510504303A CN105005492A CN 105005492 A CN105005492 A CN 105005492A CN 201510504303 A CN201510504303 A CN 201510504303A CN 105005492 A CN105005492 A CN 105005492A
Authority
CN
China
Prior art keywords
subregion
software
state machine
inactive
version identifier
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
Application number
CN201510504303.1A
Other languages
Chinese (zh)
Other versions
CN105005492B (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.)
Jingzhou Mingzhi Industrial Automation Control Co.,Ltd.
Original Assignee
Shanghai Feixun Data Communication 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201510504303.1A priority Critical patent/CN105005492B/en
Publication of CN105005492A publication Critical patent/CN105005492A/en
Application granted granted Critical
Publication of CN105005492B publication Critical patent/CN105005492B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides embedded equipment and a software upgrading method. The software upgrading method is characterized by comprising the steps of determining the state of a state machine according to version identifiers of the active partition obtained by means of the detected software version of the active partition and version identifiers of the inactive partition obtained by means of the detected software version of the inactive partition, and carrying out operations like version updating or returning of the software of the activate partition or the inactive partition according to detected state of the state machine or received external control commands. According to the embedded equipment and the software upgrading method, provided by the invention, various states during the updating process can be controlled, so that the uncontrollability is changed into controllability, the updating process is more flexible, free switching among various needed states can be realized, the updating process is enabled to be more reliable, and the system can be enabled to switch to the stable and controllable state from various error states or unstable states.

Description

A kind of embedded device and a kind of method for upgrading software
Technical field
The present invention relates to embedded development field, particularly relate to a kind of embedded device and a kind of method for upgrading software.
Background technology
In embedded device, system software generally all leaves in erasable middle storage, and in the equipment that availability requirement is not high, system software generally only has portion, when occurring that people is the situation such as maloperation, memory device damage, generally all cannot recover.In the equipment that availability requirement is higher, such as telecommunication apparatus, usual system software has two parts, and can be backup, but the escalation policy of system, relatively simple and direct, cannot all situations encountered of adaptive system, and can not control preferably the escalation process of software.
Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide a kind of embedded device and a kind of method for upgrading software, simple for solving escalation process in prior art, deficiency state controls, and cannot carry out the problem of control preferably to software upgrading according to the multiple upgrade requirement of user.
For achieving the above object and other relevant objects, the invention provides a kind of embedded device, comprise: state machine, in order to the activation subregion version identifier obtained according to the software version of the activation subregion detected and the inactive subregion version identifier obtained according to the software version of the inactive subregion detected, determine the state residing for it; Webmaster module, in order to according to the state of described state machine detected or the external control order of reception, performs version updating or the rollback operation of the software of described activation subregion or described inactive subregion.
Optionally, when described activation subregion version identifier is 0, the described software version identifying described activation subregion is normal version, and when described activation subregion version indications is 1, the described software version identifying described activation subregion is redaction; When described inactive subregion version identifier is 0, the described software version identifying described inactive subregion is normal version, when described inactive subregion version identifier is 1, the described software version identifying described inactive subregion is redaction, when described inactive subregion version identifier is-1, the described inactive subregion identifying described inactive subregion does not have related software.
Optionally, described state machine at least comprises one or more in following state: 1) when described activation subregion version identifier is 0 and described inactive subregion version identifier is 0, described state machine is in normal condition; 2) when described activation subregion version identifier is 0, and when described inactive subregion version identifier is 1, described state machine is in and needs reset mode; 3) when described activation subregion version identifier is 1, and when described inactive subregion version identifier is 0, described state machine is in and needs synchronous regime; 4) when described activation subregion version identifier is 1, and when described inactive subregion version identifier is 1, described state machine is in state to be committed; 5) when described activation subregion version identifier is 0, and when described inactive subregion version identifier is-1, or when described activation subregion version identifier is 1, and when described inactive subregion version identifier is-1, described state machine is in abnormality.
Optionally, described webmaster module, when detecting that described state machine is in described abnormality, makes described inactive subregion perform renewal rewards theory according to the described software in described activation subregion.
Optionally, when described state machine is in described normal condition, when receiving outside upgrade, make described inactive subregion obtain according to presetting passage the software upgraded, being in make described state machine describedly needs reset mode; Described webmaster module when detect described state machine be in described need reset mode time, restart described embedded device, make described activation subregion perform renewal rewards theory according to the software of described inactive subregion, being in make described state machine describedly needs synchronous regime; Described webmaster module when detect described state machine be in described need synchronous regime time, described inactive subregion is made to perform renewal rewards theory according to the software of described activation subregion, described state to be committed is in make described state machine, and when detecting that the running software in described activation subregion is abnormal, make described activation subregion perform rollback operation according to the software of described inactive subregion, and make described state machine be in needing reset mode; Described webmaster module is when detecting that described state machine is in described state to be committed, confirm that the software upgrading of described activation subregion and described inactive subregion completes, and making described activation subregion version identifier be 0 and described inactive subregion version identifier is 0, described state machine is in normal condition.
For achieving the above object and other relevant objects, the present invention also provides a kind of method for upgrading software, be applied in an embedded device, comprise the following steps: the inactive subregion version identifier that the activation subregion version identifier obtained according to the software version of the activation subregion detected and the software version according to the inactive subregion detected obtain, determine the state residing for a state machine; According to the state of described state machine detected or the external control order of reception, perform version updating or the rollback operation of the software of described activation subregion or described inactive subregion.
Optionally, when described activation subregion version identifier is 0, the described software version identifying described activation subregion is normal version, and when described activation subregion version indications is 1, the described software version identifying described activation subregion is redaction; When described inactive subregion version identifier is 0, the described software version identifying described inactive subregion is normal version, when described inactive subregion version identifier is 1, the described software version identifying described inactive subregion is redaction, when described inactive subregion version identifier is-1, the described inactive subregion identifying described inactive subregion does not have related software.
Optionally, described state machine at least comprises one or more in following state: 1) when described activation subregion version identifier is 0 and described inactive subregion version identifier is 0, described state machine is in normal condition; 2) when described activation subregion version identifier is 0, and when described inactive subregion version identifier is 1, described state machine is in and needs reset mode; 3) when described activation subregion version identifier is 1, and when described inactive subregion version identifier is 0, described state machine is in and needs synchronous regime; 4) when described activation subregion version identifier is 1, and when described inactive subregion version identifier is 1, described state machine is in state to be committed; 5) when described activation subregion version identifier is 0, and when described inactive subregion version identifier is-1, or when described activation subregion version identifier is 1, and when described inactive subregion version identifier is-1, described state machine is in abnormality.
Optionally, when detecting that described state machine is in described abnormality, described inactive subregion is made to perform renewal rewards theory according to the described software in described activation subregion.
Optionally, when described state machine is in described normal condition, when receiving outside upgrade, make described inactive subregion obtain according to presetting passage the software upgraded, being in make described state machine describedly needs reset mode; Described webmaster module when detect described state machine be in described need reset mode time, restart described embedded device, make described activation subregion perform renewal rewards theory according to the software of described inactive subregion, being in make described state machine describedly needs synchronous regime; Described webmaster module when detect described state machine be in described need synchronous regime time, described inactive subregion is made to perform renewal rewards theory according to the software of described activation subregion, described state to be committed is in make described state machine, and when detecting that the running software in described activation subregion is abnormal, make described activation subregion perform rollback operation according to the software of described inactive subregion, and make described state machine be in needing reset mode; Described webmaster module is when detecting that described state machine is in described state to be committed, confirm that the software upgrading of described activation subregion and described inactive subregion completes, and making described activation subregion version identifier be 0 and described inactive subregion version identifier is 0, described state machine is in normal condition.
As mentioned above, a kind of embedded device of the present invention and a kind of method for upgrading software, the activation subregion version identifier obtained according to the software version of the activation subregion detected and the inactive subregion version identifier obtained according to the software version of the inactive subregion detected, determine the state residing for a state machine; According to the state of described state machine detected or the external control order of reception, perform version updating or the rollback operation of the software of described activation subregion or described inactive subregion.The present invention can control various state in escalation process, make its from uncontrollable become controlled.What escalation process was become is more flexible, freely can switch in the state of various needs.And make escalation process more reliable, system can be made to be switched to stable controlled state from various mistake or non-steady state.
Accompanying drawing explanation
Fig. 1 is shown as a kind of embedded device of the present invention module diagram in one embodiment.
Two parts of system softwares that Fig. 2 is shown as embedded device in prior art deposit in the schematic diagram in same memory device.
Two parts of system softwares that Fig. 3 is shown as embedded device in prior art deposit in the schematic diagram in different memory devices.
Fig. 4 is shown as the principle schematic of method for upgrading software of the present invention in a specific embodiment.
Fig. 5 is shown as a kind of method for upgrading software of the present invention schematic flow sheet in one embodiment.
Element numbers explanation
1 embedded device
11 state machines
12 Network Management Equipments
S11, S12 step
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this instructions can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this instructions also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.It should be noted that, when not conflicting, the feature in following examples and embodiment can combine mutually.
It should be noted that, the diagram provided in following examples only illustrates basic conception of the present invention in a schematic way, then only the assembly relevant with the present invention is shown in diagram but not component count, shape and size when implementing according to reality is drawn, it is actual when implementing, and the kenel of each assembly, quantity and ratio can be a kind of change arbitrarily, and its assembly layout kenel also may be more complicated.
Refer to Fig. 1, be shown as a kind of embedded device of the present invention module diagram in one embodiment.Described embedded device 1 comprises state machine 11 and webmaster module 12.Common embedded device is all realize by preserving two parts of system softwares, and they leave on two different storage equipment partitions respectively, or the physical storage device that two panels is different.Its system architecture and principle are as shown in Figures 2 and 3, such as Fig. 2, the two parts of system softwares being shown as embedded device in prior art deposit in the schematic diagram in same memory device, wherein said system software 1 is stored in current activation subregion, described system software 2 is stored in inactive subregion, namely usually described backup subregion.And as shown in Figure 3, the two parts of system softwares being shown as embedded device in prior art deposit in the schematic diagram in different memory devices, wherein said system software 1 is stored in memory device 1 (current activation subregion), described system software 2 is stored in memory device 2 (inactive subregion), namely usually said backup subregion.
Described state machine 11, in order to the activation subregion version identifier obtained according to the software version of the activation subregion detected and the inactive subregion version identifier obtained according to the software version of the inactive subregion detected, determines the state residing for it.
Such as, activation subregion version identifier and described inactive subregion version identifier comprise 0 and 1 two states, when described activation subregion version identifier is 0, the described software version identifying described activation subregion is normal version, when described activation subregion version indications is 1, the described software version identifying described activation subregion is redaction; When described inactive subregion version identifier is 0, the described software version identifying described inactive subregion is normal version, when described inactive subregion version identifier is 1, the described software version identifying described inactive subregion is redaction, when described inactive subregion version identifier is-1, the described inactive subregion identifying described inactive subregion does not have related software.
And the state of described state machine 11 at least comprises one or more in following state:
1) when described activation subregion version identifier is 0 and described inactive subregion version identifier is 0, described state machine 11 is in normal condition;
2) when described activation subregion version identifier is 0, and when described inactive subregion version identifier is 1, described state machine 11 is in and needs reset mode;
3) when described activation subregion version identifier is 1, and when described inactive subregion version identifier is 0, described state machine 11 is in and needs synchronous regime;
4) when described activation subregion version identifier is 1, and when described inactive subregion version identifier is 1, described state machine 11 is in state to be committed;
5) when described activation subregion version identifier is 0, and when described inactive subregion version identifier is-1, or when described activation subregion version identifier is 1, and when described inactive subregion version identifier is-1, described state machine 11 is in abnormality.
Described webmaster module 12, in order to according to the state of described state machine 11 detected or the external control order of reception, performs version updating or the rollback operation of the software of described activation subregion or described inactive subregion.Described external control order comprises makes described embedded device 1 carry out the order of software upgrading, and when described state machine 11 is in described normal condition, when receiving outside upgrade, described inactive subregion is made to obtain according to presetting passage the software upgraded, be in make described state machine 11 and describedly need reset mode, wherein, described default passage is such as ftp passage; Described webmaster module 12 when detect described state machine 11 be in described need reset mode time, restart described embedded device 1, make described activation subregion perform renewal rewards theory according to the software of described inactive subregion, being in make described state machine 11 describedly needs synchronous regime; Described webmaster module 12 when detect described state machine 11 be in described need synchronous regime time, described inactive subregion is made to perform renewal rewards theory according to the software of described activation subregion, described state to be committed is in make described state machine 11, and when detecting that the running software in described activation subregion is abnormal, make described activation subregion perform rollback operation according to the software of described inactive subregion, and make described state machine 11 be in needing reset mode; Described webmaster module 12 is when detecting that described state machine 11 is in described state to be committed, confirm that the software upgrading of described activation subregion and described inactive subregion completes, and making described activation subregion version identifier be 0 and described inactive subregion version identifier is 0, described state machine 11 is in normal condition.And when described webmaster module 12 is when detecting that described state machine 11 is in described abnormality, make described inactive subregion perform renewal rewards theory according to the described software in described activation subregion.
Existing composition graphs 4 is described further to application principle of the present invention, make cur represent and activate subregion version identifier, backup represents inactive subregion version identifier, the state of described state machine is respectively, normal condition (Normal), need reset mode (need reset), need synchronous regime (need sync), state to be committed (need commit), and when described activation subregion version identifier is 0, and the abnormality (Lost backup) of described inactive subregion version identifier when being-1 and when described activation subregion version identifier is 1, and the abnormality (Lostbackward) of described inactive subregion version identifier when being-1, under Normal state, cur=backup=0, under need reset state, cur=0, backup=1, under need sync state, cur=1, backup=0, under need commit state, cur=backup=1, under Lost backup state, under cur=0, backup=-1, Lost backward state, cur=1, backup=-1.
And the Update that is operating as that webmaster module carries out upgrading according to software upgrading command commands software represents, and as shown in Figure 4, before Update, cur=backup=0, and after Update: cur=0, backup=1; Described webmaster module when detect described state machine be in described need reset mode time, according to reset order, restart described embedded device, described activation subregion is made to perform renewal rewards theory according to the software of described inactive subregion, be in make described state machine and describedly need synchronous regime, i.e. cur=1, backup=0.The synchronous operation of described software represents with Sync, even the software synchronization activated in subregion is in inactive subregion, before described Sync order performs: cru=0, backup=1, after order performs: cur=0, backup=0; Or, before Sync order performs: cru=1, backup=0; After order performs: cur=1, backup=1.Or, before Sync order performs: cru=0, backup=-1, after order performs: cur=0, backup=0.Or, before Sync order performs: cru=1, backup=-1, after order performs: cur=1, backup=1.And work as cru=1, during backup=1, be namely in state to be committed, now when receiving price raising order commit, the state of described state machine is Normal, i.e. cru=0, backup=0.And needing under synchronous regime, if find new software version defectiveness, or do not satisfy the demands, so webmaster module can send Backward order, activates the backup subregion storing old software version, i.e. former inactive subregion, and restarting equipment.Thus make equipment get back to need reset state, what now equipment ran is old software version.Again by sync order, device replied can be made to original state.
Refer to Fig. 5, be shown as a kind of method for upgrading software of the present invention schematic flow sheet in one embodiment.Common embedded device is all realize by preserving two parts of system softwares, and they leave on two different storage equipment partitions respectively, or the physical storage device that two panels is different.Its system architecture and principle are as shown in Figures 2 and 3, such as Fig. 2, the two parts of system softwares being shown as embedded device in prior art deposit in the schematic diagram in same memory device, wherein said system software 1 is stored in current activation subregion, described system software 2 is stored in inactive subregion, namely usually described backup subregion.And as shown in Figure 3, the two parts of system softwares being shown as embedded device in prior art deposit in the schematic diagram in different memory devices, wherein said system software 1 is stored in memory device 1 (current activation subregion), described system software 2 is stored in memory device 2 (inactive subregion), namely usually said backup subregion.
Described method for upgrading software, is applied in an embedded device, comprises the following steps:
S11: the inactive subregion version identifier that the activation subregion version identifier obtained according to the software version of the activation subregion detected and the software version according to the inactive subregion detected obtain, determines the state residing for a state machine.
Such as, activation subregion version identifier and described inactive subregion version identifier comprise 0 and 1 two states, when described activation subregion version identifier is 0, the described software version identifying described activation subregion is normal version, when described activation subregion version indications is 1, the described software version identifying described activation subregion is redaction; When described inactive subregion version identifier is 0, the described software version identifying described inactive subregion is normal version, when described inactive subregion version identifier is 1, the described software version identifying described inactive subregion is redaction, when described inactive subregion version identifier is-1, the described inactive subregion identifying described inactive subregion does not have related software.
And the state of described state machine at least comprises one or more in following state:
1) when described activation subregion version identifier is 0 and described inactive subregion version identifier is 0, described state machine is in normal condition;
2) when described activation subregion version identifier is 0, and when described inactive subregion version identifier is 1, described state machine is in and needs reset mode;
3) when described activation subregion version identifier is 1, and when described inactive subregion version identifier is 0, described state machine is in and needs synchronous regime;
4) when described activation subregion version identifier is 1, and when described inactive subregion version identifier is 1, described state machine is in state to be committed;
5) when described activation subregion version identifier is 0, and when described inactive subregion version identifier is-1, or when described activation subregion version identifier is 1, and when described inactive subregion version identifier is-1, described state machine is in abnormality.
S12: according to the state of described state machine detected or the external control order of reception, perform version updating or the rollback operation of the software of described activation subregion or described inactive subregion.Described external control order comprises the order making described embedded device carry out software upgrading, and when described state machine is in described normal condition, when receiving outside upgrade, described inactive subregion is made to obtain according to presetting passage the software upgraded, be in make described state machine and describedly need reset mode, wherein, described default passage is such as ftp passage; When detect described state machine be in described need reset mode time, restart described embedded device, make described activation subregion perform renewal rewards theory according to the software of described inactive subregion, being in make described state machine describedly needs synchronous regime; When detect described state machine be in described need synchronous regime time, described inactive subregion is made to perform renewal rewards theory according to the software of described activation subregion, described state to be committed is in make described state machine, and when detecting that the running software in described activation subregion is abnormal, make described activation subregion perform rollback operation according to the software of described inactive subregion, and make described state machine be in needing reset mode; Described when detecting that described state machine is in described state to be committed, confirm that the software upgrading of described activation subregion and described inactive subregion completes, and making described activation subregion version identifier be 0 and described inactive subregion version identifier is 0, described state machine is in normal condition.And when described when detecting that described state machine is in described abnormality, make described inactive subregion perform renewal rewards theory according to the described software in described activation subregion.
Existing composition graphs 4 is described further to application principle of the present invention, make cur represent and activate subregion version identifier, backup represents inactive subregion version identifier, the state of described state machine is respectively, normal condition (Normal), need reset mode (need reset), need synchronous regime (need sync), state to be committed (need commit), and when described activation subregion version identifier is 0, and the abnormality (Lost backup) of described inactive subregion version identifier when being-1 and when described activation subregion version identifier is 1, and the abnormality (Lostbackward) of described inactive subregion version identifier when being-1, under Normal state, cur=backup=0, under need reset state, cur=0, backup=1, under need sync state, cur=1, backup=0, under need commit state, cur=backup=1, under Lost backup state, under cur=0, backup=-1, Lost backward state, cur=1, backup=-1.
And the Update that is operating as that webmaster module carries out upgrading according to software upgrading command commands software represents, and as shown in Figure 4, before Update, cur=backup=0, and after Update: cur=0, backup=1; Described webmaster module when detect described state machine be in described need reset mode time, according to reset order, restart described embedded device, described activation subregion is made to perform renewal rewards theory according to the software of described inactive subregion, be in make described state machine and describedly need synchronous regime, i.e. cur=1, backup=0.The synchronous operation of described software represents with Sync, even the software synchronization activated in subregion is in inactive subregion, before described Sync order performs: cru=0, backup=1, after order performs: cur=0, backup=0; Or, before Sync order performs: cru=1, backup=0; After order performs: cur=1, backup=1.Or, before Sync order performs: cru=0, backup=-1, after order performs: cur=0, backup=0.Or, before Sync order performs: cru=1, backup=-1, after order performs: cur=1, backup=1.And work as cru=1, during backup=1, be namely in state to be committed, now when receiving price raising order commit, the state of described state machine is Normal, i.e. cru=0, backup=0.And needing under synchronous regime, if find new software version defectiveness, or do not satisfy the demands, so webmaster module can send Backward order, activates the backup subregion storing old software version, i.e. former inactive subregion, and restarting equipment.Thus make equipment get back to need reset state, what now equipment ran is old software version.Again by sync order, device replied can be made to original state.
In sum, a kind of embedded device of the present invention and a kind of method for upgrading software, the activation subregion version identifier obtained according to the software version of the activation subregion detected and the inactive subregion version identifier obtained according to the software version of the inactive subregion detected, determine the state residing for a state machine; According to the state of described state machine detected or the external control order of reception, perform version updating or the rollback operation of the software of described activation subregion or described inactive subregion.The present invention can control various state in escalation process, make its from uncontrollable become controlled.What escalation process was become is more flexible, freely can switch in the state of various needs.And make escalation process more reliable, system can be made to be switched to stable controlled state from various mistake or non-steady state.So the present invention effectively overcomes various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.

Claims (10)

1. an embedded device, is characterized in that, comprising:
State machine, in order to the activation subregion version identifier obtained according to the software version of the activation subregion detected and the inactive subregion version identifier obtained according to the software version of the inactive subregion detected, determines the state residing for it;
Webmaster module, in order to according to the state of described state machine detected or the external control order of reception, performs version updating or the rollback operation of the software of described activation subregion or described inactive subregion.
2. embedded device according to claim 1, it is characterized in that: when described activation subregion version identifier is 0, the described software version identifying described activation subregion is normal version, when described activation subregion version indications is 1, the described software version identifying described activation subregion is redaction; When described inactive subregion version identifier is 0, the described software version identifying described inactive subregion is normal version, when described inactive subregion version identifier is 1, the described software version identifying described inactive subregion is redaction, when described inactive subregion version identifier is-1, the described inactive subregion identifying described inactive subregion does not have related software.
3. embedded device according to claim 2, is characterized in that: described state machine at least comprise in following state one or more:
1) when described activation subregion version identifier is 0 and described inactive subregion version identifier is 0, described state machine is in normal condition;
2) when described activation subregion version identifier is 0, and when described inactive subregion version identifier is 1, described state machine is in and needs reset mode;
3) when described activation subregion version identifier is 1, and when described inactive subregion version identifier is 0, described state machine is in and needs synchronous regime;
4) when described activation subregion version identifier is 1, and when described inactive subregion version identifier is 1, described state machine is in state to be committed;
5) when described activation subregion version identifier is 0, and when described inactive subregion version identifier is-1, or when described activation subregion version identifier is 1, and when described inactive subregion version identifier is-1, described state machine is in abnormality.
4. embedded device according to claim 3, is characterized in that: described webmaster module, when detecting that described state machine is in described abnormality, makes described inactive subregion perform renewal rewards theory according to the described software in described activation subregion.
5. embedded device according to claim 3, it is characterized in that: when described state machine is in described normal condition, when receiving outside upgrade, make described inactive subregion obtain according to presetting passage the software upgraded, being in make described state machine describedly needs reset mode; Described webmaster module when detect described state machine be in described need reset mode time, restart described embedded device, make described activation subregion perform renewal rewards theory according to the software of described inactive subregion, being in make described state machine describedly needs synchronous regime; Described webmaster module when detect described state machine be in described need synchronous regime time, described inactive subregion is made to perform renewal rewards theory according to the software of described activation subregion, described state to be committed is in make described state machine, and when detecting that the running software in described activation subregion is abnormal, make described activation subregion perform rollback operation according to the software of described inactive subregion, and make described state machine be in needing reset mode; Described webmaster module is when detecting that described state machine is in described state to be committed, confirm that the software upgrading of described activation subregion and described inactive subregion completes, and making described activation subregion version identifier be 0 and described inactive subregion version identifier is 0, described state machine is in normal condition.
6. a method for upgrading software, is characterized in that, is applied in an embedded device, comprises the following steps:
The activation subregion version identifier obtained according to the software version of the activation subregion detected and the inactive subregion version identifier obtained according to the software version of the inactive subregion detected, determine the state residing for a state machine;
According to the state of described state machine detected or the external control order of reception, perform version updating or the rollback operation of the software of described activation subregion or described inactive subregion.
7. method for upgrading software according to claim 6, it is characterized in that: when described activation subregion version identifier is 0, the described software version identifying described activation subregion is normal version, when described activation subregion version indications is 1, the described software version identifying described activation subregion is redaction; When described inactive subregion version identifier is 0, the described software version identifying described inactive subregion is normal version, when described inactive subregion version identifier is 1, the described software version identifying described inactive subregion is redaction, when described inactive subregion version identifier is-1, the described inactive subregion identifying described inactive subregion does not have related software.
8. method for upgrading software according to claim 7, is characterized in that, described state machine at least comprise in following state one or more:
1) when described activation subregion version identifier is 0 and described inactive subregion version identifier is 0, described state machine is in normal condition;
2) when described activation subregion version identifier is 0, and when described inactive subregion version identifier is 1, described state machine is in and needs reset mode;
3) when described activation subregion version identifier is 1, and when described inactive subregion version identifier is 0, described state machine is in and needs synchronous regime;
4) when described activation subregion version identifier is 1, and when described inactive subregion version identifier is 1, described state machine is in state to be committed;
5) when described activation subregion version identifier is 0, and when described inactive subregion version identifier is-1, or when described activation subregion version identifier is 1, and when described inactive subregion version identifier is-1, described state machine is in abnormality.
9. method for upgrading software according to claim 8, is characterized in that: when detecting that described state machine is in described abnormality, makes described inactive subregion perform renewal rewards theory according to the described software in described activation subregion.
10. method for upgrading software according to claim 8, it is characterized in that: when described state machine is in described normal condition, when receiving outside upgrade, make described inactive subregion obtain according to presetting passage the software upgraded, being in make described state machine describedly needs reset mode; Described webmaster module when detect described state machine be in described need reset mode time, restart described embedded device, make described activation subregion perform renewal rewards theory according to the software of described inactive subregion, being in make described state machine describedly needs synchronous regime; Described webmaster module when detect described state machine be in described need synchronous regime time, described inactive subregion is made to perform renewal rewards theory according to the software of described activation subregion, described state to be committed is in make described state machine, and when detecting that the running software in described activation subregion is abnormal, make described activation subregion perform rollback operation according to the software of described inactive subregion, and make described state machine be in needing reset mode; Described webmaster module is when detecting that described state machine is in described state to be committed, confirm that the software upgrading of described activation subregion and described inactive subregion completes, and making described activation subregion version identifier be 0 and described inactive subregion version identifier is 0, described state machine is in normal condition.
CN201510504303.1A 2015-08-17 2015-08-17 A kind of embedded device and a kind of method for upgrading software Active CN105005492B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510504303.1A CN105005492B (en) 2015-08-17 2015-08-17 A kind of embedded device and a kind of method for upgrading software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510504303.1A CN105005492B (en) 2015-08-17 2015-08-17 A kind of embedded device and a kind of method for upgrading software

Publications (2)

Publication Number Publication Date
CN105005492A true CN105005492A (en) 2015-10-28
CN105005492B CN105005492B (en) 2018-06-19

Family

ID=54378172

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510504303.1A Active CN105005492B (en) 2015-08-17 2015-08-17 A kind of embedded device and a kind of method for upgrading software

Country Status (1)

Country Link
CN (1) CN105005492B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112256311A (en) * 2020-09-27 2021-01-22 北京控制工程研究所 Mars vehicle master-slave software automatic updating method based on finite-state machine
CN113238772A (en) * 2021-04-29 2021-08-10 联合汽车电子有限公司 Program updating method, domain controller, and storage medium
CN113296819A (en) * 2021-06-10 2021-08-24 南京创通微新通信有限公司 System and method for centralized management and upgrade of network bridge equipment
CN114064097A (en) * 2021-11-26 2022-02-18 中国联合网络通信集团有限公司 Software upgrading method, terminal equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520979A (en) * 2011-11-22 2012-06-27 大唐移动通信设备有限公司 Boot program backup method and Boot program backup device
CN103425510A (en) * 2013-08-08 2013-12-04 天脉聚源(北京)传媒科技有限公司 Method and device for interactive upgrade
CN104375863A (en) * 2014-11-17 2015-02-25 张毓 Program online upgrading method in embedded system
CN104391729A (en) * 2014-12-19 2015-03-04 北京奇虎科技有限公司 Root privilege based procedure upgrading method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520979A (en) * 2011-11-22 2012-06-27 大唐移动通信设备有限公司 Boot program backup method and Boot program backup device
CN103425510A (en) * 2013-08-08 2013-12-04 天脉聚源(北京)传媒科技有限公司 Method and device for interactive upgrade
CN104375863A (en) * 2014-11-17 2015-02-25 张毓 Program online upgrading method in embedded system
CN104391729A (en) * 2014-12-19 2015-03-04 北京奇虎科技有限公司 Root privilege based procedure upgrading method and device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112256311A (en) * 2020-09-27 2021-01-22 北京控制工程研究所 Mars vehicle master-slave software automatic updating method based on finite-state machine
CN112256311B (en) * 2020-09-27 2023-06-06 北京控制工程研究所 Mars master-slave software automatic updating method based on finite state machine
CN113238772A (en) * 2021-04-29 2021-08-10 联合汽车电子有限公司 Program updating method, domain controller, and storage medium
CN113238772B (en) * 2021-04-29 2024-02-23 联合汽车电子有限公司 Program updating method, domain controller, and storage medium
CN113296819A (en) * 2021-06-10 2021-08-24 南京创通微新通信有限公司 System and method for centralized management and upgrade of network bridge equipment
CN113296819B (en) * 2021-06-10 2023-12-08 南京创通微新通信有限公司 Centralized management upgrading system and method for network bridge equipment
CN114064097A (en) * 2021-11-26 2022-02-18 中国联合网络通信集团有限公司 Software upgrading method, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN105005492B (en) 2018-06-19

Similar Documents

Publication Publication Date Title
CN108074177B (en) Data reconciliation method, system and computer-readable storage medium
JP2017157004A5 (en)
US9110843B2 (en) Rack and method thereof for simultaneously updating basic input output systems
CN104424037B (en) A kind of method and device of dynamic patch function
EP1705566A1 (en) Server system and online software update method
CN105005492A (en) Embedded equipment and software upgrading method
CN102932409B (en) The method and system that a kind of virtual machine moves online
CN106648781B (en) Method and system for upgrading remote firmware of communication equipment
CN107608705A (en) A kind of wireless WIFI video equipments and its firmware upgrade method
CN102929650A (en) Method and device for independently configuring application program running environment and mobile device
CN105786549A (en) Smart device and upgrading method thereof
CN105045708A (en) Method and system for processing running errors of software
CN108123851A (en) The lifetime detection method and device of main and subordinate node synchronization link in distributed system
CN104571041A (en) Data synchronization method based on 1:1 controller redundancies
CN111290768A (en) Updating method, device, equipment and medium for containerization application system
CN103559063A (en) Update method and update system of application, application system and parameter configuration system
CN106161086B (en) The control method and device that master control borad is restarted
CN100576805C (en) Object retrieval system and method
CN109617950B (en) Data updating method, device, equipment and readable storage medium
CN107526584B (en) Data access method and device
CN102883309A (en) Method and device for machine-to-machine (M2M) communication
CN108710304B (en) Client operation management method and client
CN107465756B (en) Service request processing method and device
CN105373422B (en) Controlling terminal equipment enters method, terminal device and the computer equipment of downloading mode
CN105849699B (en) Method for controlling data center architecture equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201202

Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right

Effective date of registration: 20201221

Address after: 8319 Yanshan Road, Bengbu City, Anhui Province

Patentee after: Bengbu Lichao Information Technology Co.,Ltd.

Address before: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210311

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: 8319 Yanshan Road, Bengbu City, Anhui Province

Patentee before: Bengbu Lichao Information Technology Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221122

Address after: No. 238, West Ring Road, Jingzhou District, Jingzhou City, Hubei Province, 434022 (No. 3, 2nd floor, Hubei Jiaye Petroleum Machinery Co., Ltd.)

Patentee after: Jingzhou Mingzhi Industrial Automation Control Co.,Ltd.

Address before: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee before: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

TR01 Transfer of patent right