CN107451000B - System upgrade detection method - Google Patents
System upgrade detection method Download PDFInfo
- Publication number
- CN107451000B CN107451000B CN201710533501.XA CN201710533501A CN107451000B CN 107451000 B CN107451000 B CN 107451000B CN 201710533501 A CN201710533501 A CN 201710533501A CN 107451000 B CN107451000 B CN 107451000B
- Authority
- CN
- China
- Prior art keywords
- upgrade
- system program
- judged
- upgrade detection
- field
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/008—Reliability or availability analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The invention provides a system upgrade detection method, which comprises the following steps: step one, providing a storage space of a memory, and storing upgrading information marking data; secondly, performing first upgrading on the system program, and performing initialization assignment on upgrading information marking data; restarting the system program subjected to the first upgrade, and judging whether the system program has upgrade detection capability; step four, if the system program is judged to have the upgrade detection capability, loading the system program; if the system program is determined not to have the upgrade detection capability, a second upgrade of the system program is performed. The invention can forcibly upgrade when the current system program does not have the upgrade detection capability, thereby improving the stability of the system.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a system upgrade detection method.
Background
At present, computer software technology and internet are increasingly developed, and system software installed on a computer is usually updated in an online upgrade mode, that is, an update file is downloaded from a server under the condition of connecting a network so as to ensure that the system software is in a latest state.
However, in the system capable of on-line upgrade in the embedded domain, there is a possibility that the newly upgraded system program is upgraded and written into the memory of the device after passing through a normal distribution flow. However, due to various potential factors, the new version system program may be abnormal in nature, so that the new version system program cannot be detected by the online upgrade and even cannot be started normally. When the machine is restarted each time, the program loader loads the system program running the exception, and the fact that the running of the system program is actually abnormal cannot be known, so that the product is finally in an abnormal state which cannot be automatically repaired, and the use experience of a user is influenced.
Therefore, there is a need for a system upgrade detection method that ensures that existing system programs installed on a machine are available and networked for upgrade detection.
Disclosure of Invention
The system upgrade detection method provided by the invention can detect whether the existing system can be upgraded in a networking way or not aiming at the defects of the prior art.
The invention provides a system upgrade detection method, which comprises the following steps:
step one, providing a storage space of a memory, and storing upgrading information marking data;
secondly, carrying out first upgrading of a system program, and carrying out initialization assignment on the upgrading information mark data;
restarting the system program subjected to the first upgrade, and judging whether the system program has upgrade detection capability;
step four, if the system program is judged to have the upgrade detection capability, loading the system program; and if the system program is judged not to have the upgrade detection capability, performing second upgrade on the system program.
Optionally, the memory in the first step is a nonvolatile memory.
Optionally, the upgrade information flag data in the first step includes an upgrade detection completion identification field, a decision threshold field, and a decision attempt number field.
Optionally, the upgrade detection completion identification field in the first step is used to identify whether the system program has an upgrade detection capability.
Optionally, the performing of the initialization assignment on the upgrade information flag data in the second step includes setting the upgrade detection completion flag field to false, and setting the number of attempts field to zero.
Optionally, the three-way process loader determines whether the system program has an upgrade detection capability.
Optionally, the fourth step includes: and if the upgrade detection completion identifier is judged to be true, loading the system program and keeping the upgrade detection completion identifier to be true.
Optionally, the fourth step includes: and if the upgrade detection completion identifier is judged to be false and the field value of the number of judged attempts is smaller than the field value of the judgment threshold, adding 1 to the field of the number of judged attempts, and continuing to load the system program.
Optionally, the fourth step includes: and if the upgrade detection completion identifier is judged to be false and the field value of the judged number of attempts is greater than or equal to the field value of the judgment threshold, carrying out second upgrade on the system program.
Optionally, the second upgrade is a forced networking upgrade performed by the upgrade device.
The system upgrade detection method provided by the embodiment of the invention can judge whether the system program of the current version has the upgrade detection capability through the program loader and can force the system to upgrade under the condition of meeting, thereby improving the stability of the system and improving the user experience.
Drawings
FIG. 1 is a diagram illustrating a memory partitioning structure according to an embodiment of the present invention;
FIG. 2 is a flowchart of a system upgrade detection method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating steps of a system upgrade detection method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In prior art embedded devices that provide on-line upgrade (OTA) functionality, there are typically three parts in the system: program loaders, upgraders, and system programs. The invention provides a system upgrade detection method, which is used for effectively solving the problem that the existing machine system cannot be upgraded and detected.
FIG. 1 is a diagram illustrating a memory partitioning structure according to an embodiment of the present invention. The present invention has a section of space in the non-volatile memory to store the upgrade information flag, in addition to the program loader, the upgrader and the system program of the prior art. As shown in the figure, the storage area of the memory includes areas such as a program loader 1, an upgrader 2, a system program 3, and an upgrade information flag 4, specifically, the upgrade information flag 4 includes fields such as an upgrade detection completion identifier, a determination threshold, and the number of attempts. The upgrade detection completion identifier is used for judging whether the software of the current system is normal, when the upgrade detection completion identifier is true, the software of the current system is judged to be normal, when the upgrade detection completion identifier is false, the software of the current system is judged to be abnormal, and the trial number field and the judgment threshold field are continuously compared. The decision threshold field stores a certain natural number, typically 5 in one embodiment of the invention. The number of attempts field is used to indicate the number of attempts to perform system upgrade detection, and in particular, the number of attempts field may perform an operation of self-adding 1 and can be initialized to 0.
The system upgrade detection method provided by the invention can judge whether the current system program is available or not by combining the upgrade information mark with the judgment rule of the program loader, and can re-enter the upgrade device to execute the upgrade process if the current system program is unavailable.
Fig. 2 shows a flowchart of a system upgrade detection method according to an embodiment of the present invention. As shown in the figure, firstly, the system is started, whether the upgrade detection completion identifier is true or false is judged in the program loader 1 module, if the upgrade detection completion identifier is true, the current system software is judged to be normal, and the system program is loaded; and if the upgrade detection completion identifier is false, judging whether the current attempt times reach a judgment threshold. If the number of attempts is smaller than the threshold value, performing self-adding 1 operation on the number of attempts, and continuously loading the system program; if the number of attempts is larger than or equal to the threshold value, the system program is judged to be abnormal, and an updater is loaded to perform forced networking upgrade.
Specifically, upgrade detection is performed in the system program 3 module. And when the system program is started, automatically running an upgrading detection function. If the upgrade detection of the system program is successful, setting an upgrade detection completion identifier as true; optionally, if the upgrade detection fails, the value of the existing upgrade detection completion flag is maintained.
Specifically, the upgrade is forced to be performed in the module of the upgrader 2, and when the latest system program is successfully upgraded in a networking manner, the system upgrade information is initialized. Specifically, in an embodiment of the present invention, the initialization of the system upgrade information is to set each field of the system upgrade information, typically, the initialization upgrade detection completion flag is false, the value of the initialization decision threshold field is 5, and the value of the initialization attempt number field is 0.
FIG. 3 is a flow chart illustrating steps of a system upgrade detection method according to an embodiment of the present invention. As shown, S31 denotes providing a storage space of the non-volatile memory for storing the upgrade information flag data; s32 represents the first upgrade of the system program and the initialization assignment of the upgrade information mark data; s33 represents restarting the system program after the first upgrade, and judging whether the system has upgrade detection capability; s34 represents loading the system program if the program loader determines that the system program has upgrade detection capability; and if the system program is judged not to have the upgrade detection capability, starting the upgrader for second upgrade.
The system upgrade detection method provided by the embodiment of the invention can judge whether the system program of the current version has the upgrade detection capability through the program loader, and can force the system to upgrade under the condition that the system program does not have the upgrade detection capability, thereby improving the stability of the system and improving the user experience.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (6)
1. A system upgrade detection method is characterized by comprising the following steps:
step one, providing a storage space of a memory, and storing upgrading information marking data, wherein the upgrading information marking data comprises an upgrading detection completion identification field, a judgment threshold field and a judgment attempt time field;
secondly, performing first upgrade of a system program, and performing initialization assignment on the upgrade information mark data, wherein the initialization assignment comprises setting an upgrade detection completion identification field to be false and setting an attempt number field to be zero;
restarting the system program subjected to the first upgrade, and judging whether the system program has upgrade detection capability;
step four, if the system program is judged to have the upgrade detection capability, loading the system program; if the system program is judged not to have the upgrade detection capability, performing second upgrade of the system program, specifically: if the upgrade detection completion identifier is judged to be false and the field value of the number of judged attempts is smaller than the field value of the judgment threshold, adding 1 to the field of the number of judged attempts, and continuing to load the system program; and if the upgrade detection completion identifier is judged to be false and the field value of the judged number of attempts is greater than or equal to the field value of the judgment threshold, carrying out second upgrade on the system program.
2. The method according to claim 1, wherein the memory in the first step is a non-volatile memory.
3. The method according to claim 1, wherein the upgrade detection completion identification field in the first step is used to identify whether the system program has upgrade detection capability.
4. The method of claim 1, wherein step three is determining whether the system program has upgrade detection capability by a program loader.
5. The method of claim 1, wherein the fourth step comprises: and if the upgrade detection completion identifier is judged to be true, loading the system program and keeping the upgrade detection completion identifier to be true.
6. The method of claim 1, wherein the second upgrade is a forced networking upgrade by an upgrader.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710533501.XA CN107451000B (en) | 2017-07-03 | 2017-07-03 | System upgrade detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710533501.XA CN107451000B (en) | 2017-07-03 | 2017-07-03 | System upgrade detection method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107451000A CN107451000A (en) | 2017-12-08 |
CN107451000B true CN107451000B (en) | 2021-03-02 |
Family
ID=60488160
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710533501.XA Active CN107451000B (en) | 2017-07-03 | 2017-07-03 | System upgrade detection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107451000B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105763944A (en) * | 2014-12-15 | 2016-07-13 | 深圳Tcl数字技术有限公司 | Modular TV and screen end upgrade method thereof |
CN106155723A (en) * | 2015-04-13 | 2016-11-23 | 腾讯科技(深圳)有限公司 | The upgrade method of business application and device |
CN106210877A (en) * | 2016-08-17 | 2016-12-07 | 青岛海信电器股份有限公司 | The method for upgrading system of intelligent television and device |
CN106502747A (en) * | 2016-11-02 | 2017-03-15 | 武汉斗鱼网络科技有限公司 | A kind of method of application upgrade and mobile terminal |
CN106598781A (en) * | 2016-11-30 | 2017-04-26 | 惠州华阳通用电子有限公司 | System software upgrading method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9524157B2 (en) * | 2013-08-06 | 2016-12-20 | Salesforce.Com, Inc. | Providing an improved web user interface framework for building web applications |
-
2017
- 2017-07-03 CN CN201710533501.XA patent/CN107451000B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105763944A (en) * | 2014-12-15 | 2016-07-13 | 深圳Tcl数字技术有限公司 | Modular TV and screen end upgrade method thereof |
CN106155723A (en) * | 2015-04-13 | 2016-11-23 | 腾讯科技(深圳)有限公司 | The upgrade method of business application and device |
CN106210877A (en) * | 2016-08-17 | 2016-12-07 | 青岛海信电器股份有限公司 | The method for upgrading system of intelligent television and device |
CN106502747A (en) * | 2016-11-02 | 2017-03-15 | 武汉斗鱼网络科技有限公司 | A kind of method of application upgrade and mobile terminal |
CN106598781A (en) * | 2016-11-30 | 2017-04-26 | 惠州华阳通用电子有限公司 | System software upgrading method |
Also Published As
Publication number | Publication date |
---|---|
CN107451000A (en) | 2017-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107783776B (en) | Processing method and device of firmware upgrade package and electronic equipment | |
US7451435B2 (en) | Self-describing artifacts and application abstractions | |
CN109726099B (en) | Application gray level publishing method, device and equipment | |
US20170169223A1 (en) | Detection system and method thereof | |
CN105138347A (en) | Difference upgrade patch generating method, software upgrading method and corresponding apparatus | |
CN109062598A (en) | A kind of safe OTA upgrade method and system | |
CN107678762B (en) | System version upgrading method and device | |
CN110795128B (en) | Program bug repairing method and device, storage medium and server | |
CN106843947B (en) | Method and device for processing code defects | |
CN105550071B (en) | System file upgrades and detection method, communication equipment | |
CN111368299A (en) | Dynamic link library file hijacking detection method, device and storage medium | |
CN105677409A (en) | System upgrading method and device | |
CN109375953B (en) | Operating system starting method and device | |
CN111158729A (en) | System upgrading method, device, equipment and storage medium | |
CN115062307A (en) | Open POWER-based program integrity verification method, system, terminal and storage medium | |
CN108762787B (en) | Software repairing method, device, computer equipment and storage medium | |
CN108255644B (en) | File system recovery method and device | |
CN107341074B (en) | A kind of abnormal restorative procedure of upgrading upgrades abnormal prosthetic device and intelligent terminal | |
CN111984520A (en) | Buried point testing method, computer device and computer-readable storage medium | |
CN109582332A (en) | The method for upgrading system and device of internet video camera | |
CN107451000B (en) | System upgrade detection method | |
CN113032183A (en) | System management method, device, computer equipment and storage medium | |
CN111142922A (en) | Application program updating method and device, terminal and server | |
CN113220319A (en) | Data updating method and device and vehicle | |
CN108170456A (en) | The firmware upgrade method and device of electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |