CN112199108A - Terminal system upgrading method and device, terminal and storage medium - Google Patents

Terminal system upgrading method and device, terminal and storage medium Download PDF

Info

Publication number
CN112199108A
CN112199108A CN202010999843.2A CN202010999843A CN112199108A CN 112199108 A CN112199108 A CN 112199108A CN 202010999843 A CN202010999843 A CN 202010999843A CN 112199108 A CN112199108 A CN 112199108A
Authority
CN
China
Prior art keywords
terminal
upgrading
upgrade
file
preset storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010999843.2A
Other languages
Chinese (zh)
Inventor
李勇
马颖江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202010999843.2A priority Critical patent/CN112199108A/en
Publication of CN112199108A publication Critical patent/CN112199108A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention relates to a method, a device, a terminal and a storage medium for upgrading a terminal system, wherein the method comprises the following steps: storing an upgrade file in a preset storage partition, wherein the upgrade file is used for upgrading a system of a terminal; when detecting that the system of the terminal starts a system upgrading mode, reading the upgrading file from the preset storage partition to carry out upgrading processing operation on the system of the terminal; when the upgrade processing operation is detected to be completed, the upgrade file stored in the preset storage partition is detected, and the upgrade result of the system of the terminal is determined.

Description

Terminal system upgrading method and device, terminal and storage medium
Technical Field
The embodiment of the invention relates to the technical field of terminal system upgrading, in particular to a terminal system upgrading method, a terminal system upgrading device, a terminal and a storage medium.
Background
The android system is an operating system with the largest usage amount in the current mobile phone, and due to the complexity of the operating system, bugs always need to be repaired, and when manufacturers and technicians repair some bugs which appear currently or beautify system interfaces, users need to upgrade the mobile phone system. The general mobile phone system upgrading process at present is to download the upgrading package first, then the mobile phone carries out the system upgrading mode, and the mobile phone system upgrading process is required to be not interrupted, otherwise, the mobile phone system upgrading can fail and can not be normally used.
In order to prevent the mobile phone system from being interrupted in the upgrading process, the current mainstream mobile phone manufacturers have a solution that the upgrading operation can be executed only when the electric quantity of the mobile phone meets the requirement, and a prompt of incapability of shutting down the mobile phone in the upgrading process is given. However, the mobile phone can be forced to be powered off by pressing a power key on the mobile phone for a long time, and at this time, the system can only prompt and cannot prevent the power key, so that some users who do not know the mobile phone can mistakenly think that the mobile phone is a problem in the mobile phone upgrading process, and forced power off causes that the mobile phone cannot be normally used due to upgrading failure.
Disclosure of Invention
In view of this, in order to solve the technical problem of mobile phone failure caused by the failure of mobile phone system upgrade, embodiments of the present invention provide a method, an apparatus, a terminal, and a storage medium for terminal system upgrade.
In a first aspect, an embodiment of the present invention provides a method for upgrading a terminal system, including:
storing an upgrade file in a preset storage partition, wherein the upgrade file is used for upgrading a system of a terminal;
when detecting that the system of the terminal starts a system upgrading mode, reading the upgrading file from the preset storage partition to carry out upgrading processing operation on the system of the terminal;
and when the upgrade processing operation is detected to be completed, determining an upgrade result of the system of the terminal by detecting the upgrade file stored in the preset storage partition.
In one possible embodiment, the method further comprises:
dividing a preset storage partition in a storage address of the terminal in advance, wherein the storage address also comprises a data partition;
acquiring an upgrade file and storing the upgrade file in the data partition;
and copying the upgrade file from the data partition to the preset storage partition.
In one possible embodiment, the method further comprises:
when the upgrade file is detected to be completely copied to the preset storage partition, a temporary file related to the upgrade file is newly built in the preset storage partition, the temporary file is used for indicating the system upgrade state of the terminal, and when the system upgrade is successful, the deletion operation of the temporary file is executed.
In one possible embodiment, the method further comprises:
when it is detected that the upgrade file is copied to the preset storage partition, an upgrade identifier is set on the upgrade file stored in the preset storage partition, the upgrade identifier is used for indicating the system upgrade state of the terminal, and when the system upgrade is successful, the upgrade identifier is deleted.
In one possible embodiment, the method further comprises:
by restarting the terminal, whether the preset storage partition contains a temporary file or not is detected in the starting process;
if the temporary file is contained in the preset storage partition, determining that the system of the terminal fails to be upgraded, and re-executing the upgrading processing step on the system of the terminal;
if the temporary file is not contained in the preset storage partition, determining that the system of the terminal is successfully upgraded, and executing the operation of normally starting the system of the terminal;
or the like, or, alternatively,
by restarting the terminal, whether the preset storage partition contains an upgrading identifier is detected in the starting process;
if the preset storage partition contains an upgrading identifier, determining that the system of the terminal fails to be upgraded, and re-executing the step of upgrading the system of the terminal;
if the preset storage partition does not contain the upgrading identification, the system upgrading of the terminal is determined to be successful, and the operation of normally starting the system of the terminal is executed.
In one possible embodiment, the method further comprises:
detecting current version information corresponding to a system of the terminal;
if the current version information is consistent with the system version information carried in the upgrading file stored in the data partition, determining that the system of the terminal is upgraded successfully, and deleting the upgrading file in the data partition;
and if the current version information is inconsistent with the system version information carried in the upgrading file stored in the data partition, determining that the system upgrading of the terminal fails, and re-executing the step of storing the upgrading file in a preset storage partition.
In one possible embodiment, the method further comprises:
the terminal comprises at least one of the following: smart phones, tablet computers or smart bracelets.
In one possible embodiment, the method further comprises:
the terminal carries an Android system.
In a second aspect, an embodiment of the present invention provides a terminal system upgrading apparatus, including:
the storage module is used for storing an upgrade file in a preset storage partition, wherein the upgrade file is used for upgrading a system of the terminal;
the upgrading module is used for reading the upgrading file from the preset storage partition to carry out upgrading processing operation on the system of the terminal when detecting that the system of the terminal starts a system upgrading mode;
and the determining module is used for determining the upgrading result of the system of the terminal by detecting the upgrading file stored in the preset storage partition when the upgrading processing operation is detected to be completed.
In a third aspect, an embodiment of the present invention provides a terminal, including: a processor and a memory, wherein the processor is configured to execute a terminal system upgrade program stored in the memory to implement the terminal system upgrade method according to any one of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a storage medium, where the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the terminal system upgrade method described in any one of the first aspects.
According to the terminal system upgrading method provided by the embodiment of the invention, the upgrading file is stored in the preset storage partition and used for upgrading the system of the terminal; when detecting that the system of the terminal starts a system upgrading mode, reading the upgrading file from the preset storage partition to carry out upgrading processing operation on the system of the terminal; when the upgrade processing operation is detected to be completed, the upgrade file stored in the preset storage partition is detected, the upgrade result of the system of the terminal is determined, whether the system of the terminal fails to be upgraded is judged by detecting whether the upgrade file exists in the preset storage partition, if the upgrade fails, the upgrade can be carried out again, and the problems that the system of the terminal cannot be normally started and the terminal fails due to the upgrade failure are solved.
Drawings
Fig. 1 is a schematic flowchart of a method for upgrading a terminal system according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another terminal system upgrading method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of another terminal system upgrading method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a partition of a storage address of a terminal according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal system upgrading apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal 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 some, but not all, embodiments of the present invention. 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.
For the convenience of understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
Fig. 1 is a schematic flowchart of a method for upgrading a terminal system according to an embodiment of the present invention, and as shown in fig. 1, the method specifically includes:
and S11, storing the upgrade file in a preset storage partition.
The system upgrading method of the terminal provided by the embodiment of the invention is applied to upgrading the version of the system by the terminal, and the terminal can be: the system corresponds to the new version and is used for repairing the bug of the current version, optimizing the current version or adding new functions of the current version and the like.
In this embodiment, a preset storage partition is divided in advance in a storage address of the terminal, the storage partition is used for storing an upgrade file of the system, and the upgrade file may be acquired in multiple ways and stored in the preset storage partition.
For example, the manner of obtaining the upgrade file may be: and the terminal downloads the upgrade file from the server.
And S12, when detecting that the system of the terminal starts a system upgrading mode, reading the upgrading file from the preset storage partition to carry out upgrading processing operation on the system of the terminal.
And when detecting that the system of the terminal enters an upgrading mode, starting to execute a system upgrading step, and reading an upgrading file of the system from a preset storage partition.
Furthermore, since the upgrade file is generally stored in a packaged form, the upgrade file needs to be parsed after being read, the parsed upgrade file is traversed, a script file with a preset format is found, an upgrade program is executed according to the script file, and a system with a new version is installed.
And S13, when the upgrade processing operation is detected to be completed, determining the upgrade result of the system of the terminal by detecting the upgrade file stored in the preset storage partition.
When the upgrade processing operation on the system is detected to be completed, whether the preset storage partition contains the upgrade file or not is detected in the terminal restarting process, and therefore the upgrade result of the system of the terminal is judged.
If the preset storage partition contains the upgrade file, determining that the system upgrade of the terminal fails, wherein the reason of the upgrade failure may be that the upgrade program is interrupted or the upgrade file is wrong; and if the preset storage partition does not contain the upgrading file, determining that the system upgrading of the terminal is successful.
According to the terminal system upgrading method provided by the embodiment of the invention, the upgrading file is stored in the preset storage partition and used for upgrading the system of the terminal; when detecting that the system of the terminal starts a system upgrading mode, reading the upgrading file from the preset storage partition to carry out upgrading processing operation on the system of the terminal; when the upgrade processing operation is detected to be completed, the upgrade file stored in the preset storage partition is detected, and the upgrade result of the system of the terminal is determined.
Fig. 2 is a schematic flowchart of another method for upgrading a terminal system according to an embodiment of the present invention, and as shown in fig. 2, the method specifically includes:
and S21, dividing a preset storage partition in the storage address of the terminal in advance, wherein the storage address also comprises a data partition.
In the embodiment of the present invention, the terminal may be: the terminal installation system may be an android system, a WP system, a blackberry system, or the like, and the android system is described as an example below.
In the terminal production process, the storage address is divided into a plurality of partitions, as shown in fig. 4, the divided partitions include a data partition and a preset storage partition.
And S22, obtaining an upgrade file and storing the upgrade file in the data partition.
And S23, copying the upgrade file from the data partition to the preset storage partition.
The terminal obtains an upgrade file from the server, a system setting interface can prompt two modes of online upgrade and local upgrade, and the online upgrade is that the system automatically downloads the system upgrade file from the server, puts the system upgrade file into a data partition, and automatically restarts to enter an upgrade mode for upgrading; the local upgrade is that the user goes to the server to download the upgrade file and puts the file into the data partition, the system enters the upgrade mode, and the user clicks the interface to upgrade. Whether the upgrade is on-line upgrade or local upgrade, the upgrade program will execute the operation of copying the upgrade file into the preset storage partition after downloading the upgrade file from the server into the data partition.
And S24, when it is detected that the upgrade file is completely copied to the preset storage partition, newly creating a temporary file associated with the upgrade file in the preset storage partition.
In the embodiment of the invention, after the upgrade file is copied from the data partition to the preset storage partition, the copy result is detected, when the copy result shows that the copy is completed, a temporary file associated with the upgrade file is established in the preset storage partition, the file is used for marking the system upgrade state of the terminal, the content such as the system upgrade starting time or the system version number can be recorded in the file, technical developers can define the file according to the actual situation, and the invention is not limited specifically.
And S25, when detecting that the system of the terminal starts a system upgrading mode, reading the upgrading file from the preset storage partition to carry out upgrading processing operation on the system of the terminal.
When the system of the terminal is detected to start a system upgrading mode, a system upgrading step is started, upgrading files of the system are read from a preset storage partition, the upgrading files are generally stored in a packaging mode, therefore, after the upgrading files are read, the upgrading files need to be analyzed, the analyzed upgrading files are traversed, script files in a preset format are found, an upgrading program is executed according to the script files, and a new-version system is installed.
And S26, restarting the terminal, and detecting whether the preset storage partition contains the temporary file or not in the starting process.
After the system of the terminal executes the upgrading program, the new system automatically restarts the terminal, traverses the storage address of the terminal in the starting process, and detects whether a temporary state file for marking the system upgrading of the terminal is contained in the preset storage partition.
And S27, if the temporary file is contained in the preset storage partition, determining that the system of the terminal fails to be upgraded, and re-executing the upgrading processing step on the system of the terminal.
If the condition that the temporary file for marking the system upgrade of the terminal is contained in the preset storage partition is detected, the system upgrade of the terminal is failed, the reason of the upgrade failure may be that the upgrade process is interrupted accidentally, or the upgrade package is damaged to cause the upgrade failure, and the system does not execute the operation step of deleting the upgrade file and the temporary file, so that the system still enters the upgrade mode, and executes the upgrade program of the system again according to the upgrade file stored in the preset storage partition.
And S28, if the temporary file is not contained in the preset storage partition, determining that the system of the terminal is successfully upgraded, and executing the operation of normally starting the system of the terminal.
If the condition that the temporary state file used for marking the system upgrade of the terminal is not contained in the preset storage partition is detected, the system upgrade of the terminal is successful, and the system executes the operation step of deleting the upgrade file and the temporary file, so that the system enters an android mode, and a user can normally use the terminal.
And S29, detecting the current version information corresponding to the system of the terminal.
In the invention, after the system upgrade of the terminal is finished and a new system and the terminal are normally started, the system version information corresponding to the current system of the terminal is obtained and compared with the system version information carried in the upgrade file stored in the data partition.
S210, if the current version information is consistent with the system version information carried in the upgrading file stored in the data partition, determining that the system of the terminal is upgraded successfully, and deleting the upgrading file in the data partition.
And if the system version information corresponding to the current system of the terminal is consistent with the system version information carried in the upgrade file stored in the data partition, the system upgrade of the terminal is successful, and further, the upgrade file in the data partition is deleted and the memory is released.
S211, if the current version information is inconsistent with the system version information carried in the upgrading file stored in the data partition, determining that the system upgrading of the terminal fails, and re-executing the step of storing the upgrading file in the preset storage partition.
If the system version information corresponding to the current system of the terminal is inconsistent with the system version information carried in the upgrade file stored in the data partition, the current system of the terminal may still be the system before the upgrade program is not executed, and the system of the terminal is not successfully upgraded into a new version, the upgrade file is copied to the preset storage partition again according to the upgrade file stored in the data partition, and the system of the terminal is upgraded again by executing the system upgrade program of the scheme again.
The terminal system upgrading method provided by the embodiment of the invention stores the upgrading file in the preset storage partition; when the upgrade file is detected to be completely copied to the preset storage partition, a temporary file related to the upgrade file is newly built in the preset storage partition; when detecting that the system of the terminal starts a system upgrading mode, reading the upgrading file from the preset storage partition to carry out upgrading processing operation on the system of the terminal; when the upgrade processing operation is detected to be completed, the upgrade result of the system of the terminal is determined by detecting the temporary file established in the preset storage partition, so that whether the system of the terminal is upgraded successfully or not can be judged by detecting whether the temporary file exists in the preset storage partition, and the terminal fault caused by the system upgrade failure of the terminal is prevented.
Fig. 3 is a schematic flowchart of a further method for upgrading a terminal system according to an embodiment of the present invention, and as shown in fig. 3, the method specifically includes:
and S31, dividing a preset storage partition in the storage address of the terminal in advance, wherein the storage address also comprises a data partition.
And S32, obtaining an upgrade file and storing the upgrade file in the data partition.
And S33, copying the upgrade file from the data partition to the preset storage partition.
In the present embodiment, the implementation manners of S31-S33 are similar to those of S21-S23 in fig. 2, and for brevity, please refer to the related description of fig. 2, which is not repeated herein.
S34, when it is detected that the upgrade file is completely copied to the preset storage partition, setting an upgrade identifier on the upgrade file stored in the preset storage partition.
In the embodiment of the invention, after the upgrade file is copied from the data partition to the preset storage partition, the copy result is detected, and when the copy result shows that the copy is completed, the upgrade mark is arranged on the upgrade file copied into the preset storage partition and used for marking the system upgrade state of the terminal.
And S35, when detecting that the system of the terminal starts a system upgrading mode, reading the upgrading file from the preset storage partition to carry out upgrading processing operation on the system of the terminal.
When detecting that a system of the terminal starts a system upgrading mode, starting to execute a system upgrading step, reading a packaged upgrading file of the system from a preset storage partition, then analyzing the packaged upgrading file, traversing the analyzed upgrading file, finding a script file with a preset format, executing an upgrading program according to the script file, and installing a system with a new version.
And S36, restarting the terminal, and detecting whether the preset storage partition contains an upgrade identifier in the starting process.
In an alternative scheme of the embodiment of the present invention, after the system of the terminal executes the upgrade program, the new system automatically restarts the terminal, traverses the storage address of the terminal in the starting process, detects whether the preset storage partition contains the upgrade identifier, and marks the system upgrade state of the terminal.
And S37, if the preset storage partition contains the upgrade identification, determining that the system upgrade of the terminal fails, and re-executing the upgrade processing step of the system of the terminal.
If the preset storage partition is detected to contain the state upgrading identification used for marking the system upgrading of the terminal, the system upgrading of the terminal is failed, and the system does not execute the operation step of deleting the upgrading file, so that the system still enters an upgrading mode, and the upgrading program of the system is executed again according to the upgrading file stored in the preset storage partition.
And S38, if the preset storage partition does not contain the upgrade identifier, determining that the system of the terminal is upgraded successfully, and executing the operation of normally starting the system of the terminal.
If the preset storage partition is detected not to contain the state upgrading identification used for marking the system upgrading of the terminal, the system upgrading of the terminal is successful, and the system executes the operation step of deleting the upgrading file, so that the system enters an android mode, and a user can normally use the terminal.
And S39, detecting the current version information corresponding to the system of the terminal.
S310, if the current version information is consistent with the system version information carried in the upgrading file stored in the data partition, determining that the system of the terminal is upgraded successfully, and deleting the upgrading file in the data partition.
S311, if the current version information is inconsistent with the system version information carried in the upgrading file stored in the data partition, determining that the system upgrading of the terminal fails, and re-executing the step of storing the upgrading file in the preset storage partition.
In the present embodiment, the implementation manners of S39-S311 are similar to those of S29-S211 in fig. 2, and for brevity, please refer to the related description of fig. 2, which is not repeated herein.
The terminal system upgrading method provided by the embodiment of the invention stores the upgrading file in the preset storage partition; when it is detected that the upgrade file is completely copied to the preset storage partition, setting an upgrade identifier on the upgrade file stored in the preset storage partition; when detecting that the system of the terminal starts a system upgrading mode, reading the upgrading file from the preset storage partition to carry out upgrading processing operation on the system of the terminal; when the upgrade processing operation is detected to be completed, the upgrade result of the system of the terminal is determined by detecting the upgrade identifier of the upgrade file stored in the preset storage partition, so that whether the system of the terminal is upgraded successfully can be judged by detecting whether the upgrade identifier file exists in the preset storage partition, and the terminal fault caused by the system upgrade failure of the terminal is prevented.
Fig. 5 is a schematic structural diagram of a terminal system upgrading apparatus provided in an embodiment of the present invention, as shown in fig. 5, specifically including:
the storage module 501 is configured to store an upgrade file in a preset storage partition, where the upgrade file is used to upgrade a system of a terminal;
the upgrading module 502 is configured to, when it is detected that a system of the terminal starts a system upgrading mode, read the upgrade file from the preset storage partition to perform an upgrading processing operation on the system of the terminal;
a determining module 503, configured to determine, when it is detected that the upgrade processing operation is completed, an upgrade result of the system of the terminal by detecting the upgrade file stored in the preset storage partition.
In a possible implementation manner, the storage module 501 is specifically configured to divide a preset storage partition into a storage address of the terminal in advance, where the storage address further includes a data partition; acquiring an upgrade file and storing the upgrade file in the data partition; and copying the upgrade file from the data partition to the preset storage partition.
In a possible implementation manner, the upgrade module 502 is specifically configured to, when it is detected that the upgrade file is completely copied to the preset storage partition, newly create a temporary file associated with the upgrade file in the preset storage partition, where the temporary file is used to indicate a state of system upgrade of the terminal, and execute a deletion operation of the temporary file when the system upgrade is successful.
In a possible implementation manner, the upgrade module 502 is further configured to set an upgrade identifier on the upgrade file stored in the preset storage partition when it is detected that the upgrade file is completely copied to the preset storage partition, where the upgrade identifier is used to indicate a system upgrade state of the terminal, and execute a deletion operation of the upgrade identifier when the system upgrade is successful.
In a possible embodiment, the determining module 503 is specifically configured to, by restarting the terminal, detect whether the preset storage partition contains a temporary file during a starting process; if the temporary file is contained in the preset storage partition, determining that the system of the terminal fails to be upgraded, and re-executing the upgrading processing step on the system of the terminal; if the temporary file is not contained in the preset storage partition, determining that the system of the terminal is successfully upgraded, and executing the operation of normally starting the system of the terminal; or, by restarting the terminal, in the starting process, by detecting whether the preset storage partition contains an upgrade identifier; if the preset storage partition contains an upgrading identifier, determining that the system of the terminal fails to be upgraded, and re-executing the step of upgrading the system of the terminal; if the preset storage partition does not contain the upgrading identification, the system upgrading of the terminal is determined to be successful, and the operation of normally starting the system of the terminal is executed.
In a possible implementation manner, the determining module 503 is further configured to detect current version information corresponding to a system of the terminal; if the current version information is consistent with the system version information carried in the upgrading file stored in the data partition, determining that the system of the terminal is upgraded successfully, and deleting the upgrading file in the data partition; and if the current version information is inconsistent with the system version information carried in the upgrading file stored in the data partition, determining that the system upgrading of the terminal fails, and re-executing the step of storing the upgrading file in a preset storage partition.
The terminal system upgrading device provided in this embodiment may be the terminal system upgrading device shown in fig. 5, and may perform all the steps of the terminal system upgrading method shown in fig. 1 to 3, so as to achieve the technical effect of the terminal system upgrading method shown in fig. 1 to 3, and please refer to the description related to fig. 1 to 3 for brevity, which is not described herein again.
Fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention, where the terminal 600 shown in fig. 6 includes: at least one processor 601, memory 602, at least one network interface 604, and other user interfaces 603. The various components in terminal 600 are coupled together by a bus system 605. It is understood that the bus system 605 is used to enable communications among the components. The bus system 605 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 605 in fig. 6.
The user interface 603 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It will be appreciated that the memory 602 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (ddr Data Rate SDRAM, ddr SDRAM), Enhanced Synchronous SDRAM (ESDRAM), synchlronous SDRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 502 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 602 stores the following elements, executable units or data structures, or a subset thereof, or an expanded set thereof: an operating system 6021 and application programs 6022.
The operating system 6021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application program 6022 includes various application programs such as a Media Player (Media Player), a Browser (Browser), and the like, and is used to implement various application services. A program implementing the method of an embodiment of the invention can be included in the application program 6022.
In the embodiment of the present invention, by calling a program or an instruction stored in the memory 602, specifically, a program or an instruction stored in the application program 6022, the processor 601 is configured to execute the method steps provided by the method embodiments, for example, including:
storing an upgrade file in a preset storage partition, wherein the upgrade file is used for upgrading a system of a terminal; when detecting that the system of the terminal starts a system upgrading mode, reading the upgrading file from the preset storage partition to carry out upgrading processing operation on the system of the terminal; and when the upgrade processing operation is detected to be completed, determining an upgrade result of the system of the terminal by detecting the upgrade file stored in the preset storage partition.
In a possible implementation manner, a preset memory partition is divided in advance in a memory address of the terminal, and the memory address further includes a data partition; acquiring an upgrade file and storing the upgrade file in the data partition; and copying the upgrade file from the data partition to the preset storage partition.
In a possible implementation manner, when it is detected that the upgrade file is completely copied to the preset storage partition, a temporary file associated with the upgrade file is newly created in the preset storage partition, where the temporary file is used to indicate a state of system upgrade of the terminal, and when the system upgrade is successful, a deletion operation of the temporary file is performed.
In a possible implementation manner, when it is detected that the upgrade file is completely copied to the preset storage partition, an upgrade identifier is set on the upgrade file stored in the preset storage partition, where the upgrade identifier is used to indicate a system upgrade state of the terminal, and when the system upgrade is successful, a deletion operation of the upgrade identifier is executed.
In a possible implementation manner, by restarting the terminal, in the starting process, whether the preset storage partition contains a temporary file is detected; if the temporary file is contained in the preset storage partition, determining that the system of the terminal fails to be upgraded, and re-executing the upgrading processing step on the system of the terminal; if the temporary file is not contained in the preset storage partition, determining that the system of the terminal is successfully upgraded, and executing the operation of normally starting the system of the terminal; or, by restarting the terminal, in the starting process, by detecting whether the preset storage partition contains an upgrade identifier; if the preset storage partition contains an upgrading identifier, determining that the system of the terminal fails to be upgraded, and re-executing the step of upgrading the system of the terminal; if the preset storage partition does not contain the upgrading identification, the system upgrading of the terminal is determined to be successful, and the operation of normally starting the system of the terminal is executed.
In one possible implementation, current version information corresponding to a system of the terminal is detected; if the current version information is consistent with the system version information carried in the upgrading file stored in the data partition, determining that the system of the terminal is upgraded successfully, and deleting the upgrading file in the data partition; and if the current version information is inconsistent with the system version information carried in the upgrading file stored in the data partition, determining that the system upgrading of the terminal fails, and re-executing the step of storing the upgrading file in a preset storage partition.
In one possible embodiment, the terminal includes at least one of: smart phones, tablet computers or smart bracelets.
In one possible implementation, the terminal carries an Android system.
The method disclosed by the above-mentioned embodiment of the present invention can be applied to the processor 601, or implemented by the processor 601. The processor 601 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 601. The Processor 601 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 602, and the processor 601 reads the information in the memory 602 and completes the steps of the method in combination with the hardware thereof.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The terminal provided in this embodiment may be the terminal shown in fig. 6, and may execute all the steps of the terminal system upgrading method shown in fig. 1 to 3, so as to achieve the technical effect of the terminal system upgrading method shown in fig. 1 to 3, and for brevity, it is specifically described with reference to fig. 1 to 3, and no further description is provided here.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium are executable by one or more processors, the terminal system upgrade method executed on the terminal side is realized.
The processor is used for executing the terminal system upgrading program stored in the memory so as to realize the following steps of the terminal system upgrading method executed on the terminal side:
storing an upgrade file in a preset storage partition, wherein the upgrade file is used for upgrading a system of a terminal; when detecting that the system of the terminal starts a system upgrading mode, reading the upgrading file from the preset storage partition to carry out upgrading processing operation on the system of the terminal; and when the upgrade processing operation is detected to be completed, determining an upgrade result of the system of the terminal by detecting the upgrade file stored in the preset storage partition.
In a possible implementation manner, a preset memory partition is divided in advance in a memory address of the terminal, and the memory address further includes a data partition; acquiring an upgrade file and storing the upgrade file in the data partition; and copying the upgrade file from the data partition to the preset storage partition.
In a possible implementation manner, when it is detected that the upgrade file is completely copied to the preset storage partition, a temporary file associated with the upgrade file is newly created in the preset storage partition, where the temporary file is used to indicate a state of system upgrade of the terminal, and when the system upgrade is successful, a deletion operation of the temporary file is performed.
In a possible implementation manner, when it is detected that the upgrade file is completely copied to the preset storage partition, an upgrade identifier is set on the upgrade file stored in the preset storage partition, where the upgrade identifier is used to indicate a system upgrade state of the terminal, and when the system upgrade is successful, a deletion operation of the upgrade identifier is executed.
In a possible implementation manner, by restarting the terminal, in the starting process, whether the preset storage partition contains a temporary file is detected; if the temporary file is contained in the preset storage partition, determining that the system of the terminal fails to be upgraded, and re-executing the upgrading processing step on the system of the terminal; if the temporary file is not contained in the preset storage partition, determining that the system of the terminal is successfully upgraded, and executing the operation of normally starting the system of the terminal; or, by restarting the terminal, in the starting process, by detecting whether the preset storage partition contains an upgrade identifier; if the preset storage partition contains an upgrading identifier, determining that the system of the terminal fails to be upgraded, and re-executing the step of upgrading the system of the terminal; if the preset storage partition does not contain the upgrading identification, the system upgrading of the terminal is determined to be successful, and the operation of normally starting the system of the terminal is executed.
In one possible implementation, current version information corresponding to a system of the terminal is detected; if the current version information is consistent with the system version information carried in the upgrading file stored in the data partition, determining that the system of the terminal is upgraded successfully, and deleting the upgrading file in the data partition; and if the current version information is inconsistent with the system version information carried in the upgrading file stored in the data partition, determining that the system upgrading of the terminal fails, and re-executing the step of storing the upgrading file in a preset storage partition.
In one possible embodiment, the terminal includes at least one of: smart phones, tablet computers or smart bracelets.
In one possible implementation, the terminal carries an Android system.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (11)

1. A terminal system upgrading method is characterized by comprising the following steps:
storing an upgrade file in a preset storage partition, wherein the upgrade file is used for upgrading a system of a terminal;
when detecting that the system of the terminal starts a system upgrading mode, reading the upgrading file from the preset storage partition to carry out upgrading processing operation on the system of the terminal;
and when the upgrade processing operation is detected to be completed, determining an upgrade result of the system of the terminal by detecting the upgrade file stored in the preset storage partition.
2. The method of claim 1, wherein storing the upgrade file in the predetermined storage partition comprises:
dividing a preset storage partition in a storage address of the terminal in advance, wherein the storage address also comprises a data partition;
acquiring an upgrade file and storing the upgrade file in the data partition;
and copying the upgrade file from the data partition to the preset storage partition.
3. The method of claim 2, further comprising:
when the upgrade file is detected to be completely copied to the preset storage partition, a temporary file related to the upgrade file is newly built in the preset storage partition, the temporary file is used for indicating the system upgrade state of the terminal, and when the system upgrade is successful, the deletion operation of the temporary file is executed.
4. The method of claim 2, further comprising:
when it is detected that the upgrade file is copied to the preset storage partition, an upgrade identifier is set on the upgrade file stored in the preset storage partition, the upgrade identifier is used for indicating the system upgrade state of the terminal, and when the system upgrade is successful, the upgrade identifier is deleted.
5. The method according to claim 3 or 4, wherein the determining an upgrade result of the system of the terminal by detecting the upgrade file stored in the preset memory partition comprises:
by restarting the terminal, whether the preset storage partition contains a temporary file or not is detected in the starting process;
if the temporary file is contained in the preset storage partition, determining that the system of the terminal fails to be upgraded, and re-executing the upgrading processing step on the system of the terminal;
if the temporary file is not contained in the preset storage partition, determining that the system of the terminal is successfully upgraded, and executing the operation of normally starting the system of the terminal;
or the like, or, alternatively,
by restarting the terminal, whether the preset storage partition contains an upgrading identifier is detected in the starting process;
if the preset storage partition contains an upgrading identifier, determining that the system of the terminal fails to be upgraded, and re-executing the step of upgrading the system of the terminal;
if the preset storage partition does not contain the upgrading identification, the system upgrading of the terminal is determined to be successful, and the operation of normally starting the system of the terminal is executed.
6. The method of claim 5, further comprising:
detecting current version information corresponding to a system of the terminal;
if the current version information is consistent with the system version information carried in the upgrading file stored in the data partition, determining that the system of the terminal is upgraded successfully, and deleting the upgrading file in the data partition;
and if the current version information is inconsistent with the system version information carried in the upgrading file stored in the data partition, determining that the system upgrading of the terminal fails, and re-executing the step of storing the upgrading file in a preset storage partition.
7. The method of claim 1, wherein the terminal comprises at least one of: smart phones, tablet computers or smart bracelets.
8. The method according to claim 7, wherein the terminal carries an Android system.
9. An apparatus for upgrading a terminal system, comprising:
the storage module is used for storing an upgrade file in a preset storage partition, wherein the upgrade file is used for upgrading a system of the terminal;
the upgrading module is used for reading the upgrading file from the preset storage partition to carry out upgrading processing operation on the system of the terminal when detecting that the system of the terminal starts a system upgrading mode;
and the determining module is used for determining the upgrading result of the system of the terminal by detecting the upgrading file stored in the preset storage partition when the upgrading processing operation is detected to be completed.
10. A terminal, comprising: a processor and a memory, wherein the processor is used for executing the terminal system upgrading program stored in the memory so as to realize the terminal system upgrading method of any one of claims 1-8.
11. A storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the terminal system upgrade method according to any one of claims 1 to 8.
CN202010999843.2A 2020-09-21 2020-09-21 Terminal system upgrading method and device, terminal and storage medium Pending CN112199108A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010999843.2A CN112199108A (en) 2020-09-21 2020-09-21 Terminal system upgrading method and device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010999843.2A CN112199108A (en) 2020-09-21 2020-09-21 Terminal system upgrading method and device, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN112199108A true CN112199108A (en) 2021-01-08

Family

ID=74015861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010999843.2A Pending CN112199108A (en) 2020-09-21 2020-09-21 Terminal system upgrading method and device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112199108A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662701A (en) * 2012-03-28 2012-09-12 中兴通讯股份有限公司 Online CPLD (Complex Programmable Logic Devices) upgrading method, device and business veneer
CN105577450A (en) * 2016-01-27 2016-05-11 努比亚技术有限公司 System upgrade device and method
CN107491276A (en) * 2017-06-30 2017-12-19 杭州旗捷科技有限公司 The method of device data remote encryption upgrading, storage medium, electronic equipment
CN110750280A (en) * 2019-09-30 2020-02-04 深圳市金百锐通信科技有限公司 Application upgrading method and system based on Android platform and storage medium
CN111176702A (en) * 2019-12-16 2020-05-19 京信通信系统(中国)有限公司 Firmware upgrading method and device, computer equipment and storage medium
CN111263354A (en) * 2020-01-08 2020-06-09 苏宁智能终端有限公司 OTA differential upgrading method and device
US10761835B1 (en) * 2014-05-30 2020-09-01 Apptimize Llc Run-time application modification

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662701A (en) * 2012-03-28 2012-09-12 中兴通讯股份有限公司 Online CPLD (Complex Programmable Logic Devices) upgrading method, device and business veneer
US10761835B1 (en) * 2014-05-30 2020-09-01 Apptimize Llc Run-time application modification
CN105577450A (en) * 2016-01-27 2016-05-11 努比亚技术有限公司 System upgrade device and method
CN107491276A (en) * 2017-06-30 2017-12-19 杭州旗捷科技有限公司 The method of device data remote encryption upgrading, storage medium, electronic equipment
CN110750280A (en) * 2019-09-30 2020-02-04 深圳市金百锐通信科技有限公司 Application upgrading method and system based on Android platform and storage medium
CN111176702A (en) * 2019-12-16 2020-05-19 京信通信系统(中国)有限公司 Firmware upgrading method and device, computer equipment and storage medium
CN111263354A (en) * 2020-01-08 2020-06-09 苏宁智能终端有限公司 OTA differential upgrading method and device

Similar Documents

Publication Publication Date Title
US7275153B2 (en) Booting and boot code update system using boot strapper code to select between a loader and a duplicate backup loader
CN105975311B (en) Application starting method and device
US20100058314A1 (en) Computer System and Related Method of Logging BIOS Update Operation
WO2018024198A1 (en) Application upgrade method and system for set-top box, and set-top box
CN108829449B (en) Method, device, equipment and medium for starting operating system by BIOS (basic input output System)
CN105760191A (en) Embedded system equipment programming mass production method
CN111562934A (en) Software system upgrading method based on hot patch, terminal and storage medium
CN110597544A (en) Software system upgrading method and device
WO2015154538A1 (en) Memory booting method and device
WO2020029967A1 (en) Method and apparatus for repairing fault in operating system
CN110737449A (en) Method, apparatus, and machine-readable storage medium for processing device firmware
CN113157303A (en) Upgrading method, embedded system, terminal and computer storage medium
WO2018049798A1 (en) Method and apparatus for reconstructing cache partition
CN111782236A (en) System software upgrading method and device, storage medium and all-in-one machine equipment
CN115951920A (en) Mobile equipment upgrading method and device, storage unit and mobile equipment
CN112199108A (en) Terminal system upgrading method and device, terminal and storage medium
TW201015296A (en) Method for auto-testing environment variable setting
CN114035813A (en) Upgrading method, device, equipment and storage medium
CN113641389A (en) Software upgrading method, device and equipment based on OpenCPU
CN114296764A (en) System upgrading method and device, storage medium and electronic equipment
CN112925549A (en) System application upgrading system based on android frame
CN111190627A (en) System upgrading method and device
CN109428936B (en) APP upgrading method, device, system, electronic equipment and storage medium
CN111475346A (en) USBIF authentication triggering method, tested device and vehicle
CN115002546B (en) Upgrading method and system for Linux smart television operating system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210108