CN106293814B - Upgrading method and device - Google Patents

Upgrading method and device Download PDF

Info

Publication number
CN106293814B
CN106293814B CN201610616919.2A CN201610616919A CN106293814B CN 106293814 B CN106293814 B CN 106293814B CN 201610616919 A CN201610616919 A CN 201610616919A CN 106293814 B CN106293814 B CN 106293814B
Authority
CN
China
Prior art keywords
partition
installed application
updated
current system
target system
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
Application number
CN201610616919.2A
Other languages
Chinese (zh)
Other versions
CN106293814A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610616919.2A priority Critical patent/CN106293814B/en
Publication of CN106293814A publication Critical patent/CN106293814A/en
Application granted granted Critical
Publication of CN106293814B publication Critical patent/CN106293814B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44573Execute-in-place [XIP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading

Abstract

The disclosure provides an upgrading method and device, and belongs to the technical field of networks. The method comprises the following steps: acquiring version information of a current system of a terminal; comparing data in a first partition of the current system with data in a first partition of the target system according to the version information of the current system and the version information of the target system to obtain a first partition difference; if the fact that the pre-installed application to be updated exists in the second partition of the target system is detected, an upgrade package is generated according to the difference of the first partition and the pre-installed application to be updated; and sending the upgrade package to the terminal. According to the method and the device, the system data and the pre-installed application are respectively stored in different partitions, and the system and the pre-installed application are respectively upgraded by adopting different upgrading methods, so that the occupation rates of bandwidth and terminal memory can be reduced when the system is upgraded, the problem that the pre-installed application cannot be upgraded due to change can be solved, and the upgrading success rate of the system is improved.

Description

Upgrading method and device
Technical Field
The present disclosure relates to the field of network technologies, and in particular, to an upgrade method and apparatus.
Background
In order to repair bugs, improve functions, and add new functions, it is often necessary to upgrade systems or applications to better meet the user's usage needs. In Over-the-Air Technology (OTA), an operator places an application upgrade package or a system upgrade package in an OTA server, a terminal or the server calculates a difference between a current version and a new version based on a difference between the current version and the new version, generates a difference OTA package according to the difference, and the terminal realizes upgrade from the current version to the new version by downloading and installing the difference OTA package.
For a system containing a pre-installed application, such as an Android system, a specific method for upgrading the system by using an OTA technology may be as follows: the method comprises the steps that a system partition of an Android system is divided into a plurality of blocks, the size of each block is fixed, when the Android system needs to be upgraded to a new version from a current version, each block of the system partition of the current version is compared with a corresponding block of the new version, if the blocks are the same, the blocks are marked as the same, if the blocks are different, a difference is calculated and stored, after each block of the system partition is compared, a difference set between the current version and the new version is obtained, a difference OTA packet is obtained according to the difference set, and the Android system can be upgraded to the new version from the current version according to the difference OTA packet.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides an upgrade method and apparatus.
According to a first aspect of the embodiments of the present disclosure, there is provided an upgrade method, including:
acquiring version information of a current system of a terminal;
comparing data in a first partition of the current system with data in a first partition of a target system according to version information of the current system and version information of the target system to obtain a first partition difference amount of the current system and the target system, wherein the first partition is used for storing system data;
if the fact that the pre-installed application to be updated exists in a second partition of the target system is detected, an upgrade package is generated according to the first partition difference and the pre-installed application to be updated, wherein the second partition is used for storing at least one pre-installed application;
and sending the upgrade package to the terminal.
In a first possible implementation manner of the first aspect of the present disclosure, the method further includes:
if the pre-installed application to be updated exists in the second partition of the target system, detecting whether the pre-installed application exists in the second partition of the current system or not before generating an upgrade package according to the first partition difference and the pre-installed application to be updated;
if the pre-installed application does not exist in the second partition of the current system, determining that the pre-installed application is the pre-installed application to be updated, and executing the step of generating the upgrade package according to the first partition difference and the pre-installed application to be updated;
if the pre-installed application exists in the second partition of the current system, detecting whether the pre-installed application in the second partition of the current system is consistent with the pre-installed application in the target system, if not, determining that the pre-installed application is the pre-installed application to be updated, and executing the step of generating the upgrade package according to the first partition difference and the pre-installed application to be updated.
In a second possible implementation manner of the first aspect of the present disclosure, after the comparing, according to the version information of the current system and the version information of the target system, data in the first partition of the current system with data in the first partition of the target system to obtain a first partition difference amount between the current system and the target system, the method further includes:
and if the situation that the pre-installed application to be updated does not exist in the second partition of the target system is detected, generating the upgrade package according to the difference of the first partitions.
In a third possible implementation manner of the first aspect of the present disclosure, the second partition stores the at least one pre-installed application at a file granularity.
In a fourth possible implementation manner of the first aspect of the present disclosure, the first partition stores the system data with a granularity of a block of a preset size.
According to a second aspect of the embodiments of the present disclosure, there is provided an upgrade apparatus, including:
the acquisition module is used for acquiring the version information of the current system of the terminal;
the comparison module is used for comparing data in a first partition of the current system with data in a first partition of a target system according to version information of the current system and version information of the target system to obtain a first partition difference amount of the current system and the target system, wherein the first partition is used for storing system data;
the generating module is used for generating an upgrade package according to the first partition difference and the pre-installed application to be updated if the pre-installed application to be updated exists in a second partition of the target system, wherein the second partition is used for storing at least one pre-installed application;
and the sending module is used for sending the upgrade package to the terminal so that the terminal can upgrade from the current system to the target system according to the upgrade package.
In a first possible implementation manner of the second aspect of the present disclosure, the apparatus further includes:
the detection module is used for detecting whether the pre-installed application exists in a second partition of the current system or not for any pre-installed application in the target system;
the determining module is used for determining that the pre-installed application is the pre-installed application to be updated if the pre-installed application does not exist in the second partition of the current system;
the generation module is used for executing the step of generating the upgrade package according to the first partition difference quantity and the pre-installed application to be updated;
the detection module is further configured to detect whether the pre-installed application in the second partition of the current system is consistent with the pre-installed application in the target system if the pre-installed application exists in the second partition of the current system;
the determining module is further configured to determine that the pre-installed application is the pre-installed application to be updated if the pre-installed application in the second partition of the current system is inconsistent with the pre-installed application in the target system;
the generation module is used for executing the step of generating the upgrade package according to the first partition difference and the pre-installed application to be updated.
In a second possible implementation manner of the second aspect of the present disclosure, the generating module is further configured to:
and if the situation that the pre-installed application to be updated does not exist in the second partition of the target system is detected, generating the upgrade package according to the difference of the first partitions.
In a third possible implementation of the second aspect of the present disclosure, the second partition stores the at least one pre-installed application at a file granularity.
In a fourth possible implementation of the second aspect of the present disclosure, the first partition stores the system data at a granularity of a block of a preset size.
In a third aspect, an upgrade apparatus is further provided, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring version information of a current system of a terminal;
comparing data in a first partition of the current system with data in a first partition of a target system according to version information of the current system and version information of the target system to obtain a first partition difference amount of the current system and the target system, wherein the first partition is used for storing system data;
if the fact that the pre-installed application to be updated exists in a second partition of the target system is detected, an upgrade package is generated according to the first partition difference and the pre-installed application to be updated, wherein the second partition is used for storing at least one pre-installed application;
and sending the upgrade package to the terminal.
The technical scheme provided by the embodiment of the disclosure has the following beneficial effects:
since the pre-installed applications are stored in the system partition as in the system, after a user deletes any pre-installed application, data in a block originally used for storing the pre-installed application is changed, and further, difference cannot be calculated according to differences of the data in the block, and system upgrade cannot be completed, so that the system upgrade power is low. According to the method and the device, the system data and the pre-installed application are respectively stored in the first partition and the second partition, and the system and the pre-installed application are respectively upgraded by adopting different upgrading methods, so that the occupation rates of bandwidth and terminal memory can be reduced when the system is upgraded, the problem that the system cannot be upgraded due to the fact that the pre-installed application is changed can be solved, and the upgrade success rate of the system can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow diagram illustrating a method of upgrading, according to an example embodiment;
FIG. 2A is a flow diagram illustrating a method of upgrading according to an exemplary embodiment;
FIG. 2B is a diagram illustrating a partitioned store in accordance with an illustrative embodiment;
FIG. 3 is a block diagram illustrating an upgrade apparatus according to an exemplary embodiment;
FIG. 4 is a block diagram illustrating an upgrade apparatus 400 according to an example embodiment.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating an upgrade method, according to an exemplary embodiment, for use in a server, as shown in fig. 1, including the following steps.
In step 101, version information of the current system of the terminal is obtained.
In step 102, according to the version information of the current system and the version information of the target system, comparing data in a first partition of the current system with data in a first partition of the target system to obtain a first partition difference amount between the current system and the target system, where the first partition is used for storing system data.
In step 103, if it is detected that the pre-installed application to be updated exists in the second partition of the target system, an upgrade package is generated according to the first partition difference and the pre-installed application to be updated, where the second partition is used to store at least one pre-installed application.
In step 104, the upgrade package is sent to the terminal.
According to the method provided by the embodiment of the disclosure, system data and pre-installed applications are respectively stored in the first partition and the second partition of the terminal, and the system and the pre-installed applications are respectively upgraded by adopting different upgrading methods, so that the occupation rates of bandwidth and terminal memory can be reduced when the system is upgraded, the problem that the system cannot be upgraded due to the change of the pre-installed applications can be avoided, and the upgrade success rate of the system can be further improved.
In a first possible implementation manner of the present disclosure, before generating an upgrade package according to the first partition difference and the pre-installed application to be updated if it is detected that the pre-installed application to be updated exists in the second partition of the target system, the method further includes:
for any pre-installed application in the target system, detecting whether the pre-installed application exists in a second partition of the current system;
if the pre-installed application does not exist in the second partition of the current system, determining that the pre-installed application is the pre-installed application to be updated, and executing the step of generating the upgrade package according to the first partition difference and the pre-installed application to be updated;
if the pre-installed application exists in the second partition of the current system, detecting whether the pre-installed application in the second partition of the current system is consistent with the pre-installed application in the target system, if not, determining that the pre-installed application is the pre-installed application to be updated, and executing the step of generating the upgrade package according to the first partition difference and the pre-installed application to be updated.
In a second possible implementation manner of the present disclosure, after the comparing, according to the version information of the current system and the version information of the target system, the data in the first partition of the current system with the data in the first partition of the target system to obtain a first difference amount of the partitions of the current system and the target system, the method further includes:
and if the situation that the pre-installed application to be updated does not exist in the second partition of the target system is detected, generating the upgrade package according to the difference of the first partitions.
In a third possible implementation manner of the present disclosure, the second partition stores the at least one pre-installed application at a file granularity.
In a fourth possible implementation manner of the present disclosure, the first partition stores the system data with a granularity of a block of a preset size.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
FIG. 2A is a flow diagram illustrating a method of upgrading according to an example embodiment. The execution subject of this embodiment may be a server, and referring to fig. 2A, this embodiment specifically includes:
in step 201, version information of the current system of the terminal is obtained.
In this disclosure, when a system upgrade request of a terminal is received, version information of a current system of the terminal may be obtained, where the system upgrade request is used to request a server to upgrade the current system of the terminal, and the system upgrade request at least carries the version information of the current system of the terminal, so that the server can obtain the version information of the current system of the terminal, where the version information of the system may be a version serial number of the system, or may be other information that can uniquely identify a system version, and this disclosure is not limited thereto.
The method for sending the system upgrading request to the server by the terminal can be that when the terminal receives or detects a system updating message sent by the server, reminding information is displayed to remind a user whether to update the current system, and if the triggering operation of the user on a determined updating option is detected, the system upgrading request is sent to the server to achieve the purpose of updating the current system of the terminal. The reminding message may carry version information of the target system, and correspondingly, the system upgrade request may also carry version information of the target system upgraded at this time by the terminal.
In step 202, according to the version information of the current system and the version information of the target system, comparing the data in the first partition of the current system with the data in the first partition of the target system to obtain a first partition difference amount between the current system and the target system, where the first partition is used for storing system data.
In the embodiment of the disclosure, system data and pre-installed applications are respectively stored in two different partitions of a terminal system partition, the first partition is used for storing the system data, and the second partition is used for storing at least one pre-installed application; so that the server can upgrade the system and the pre-installed application by adopting different upgrading methods. The first partition and the second partition are two parts of a system partition, and the system partition refers to system data used for a current system of the terminal and a storage space of at least one pre-installed application in the terminal.
Comparing the data in the first partition of the current system with the data in the first partition of the target system, marking different parts of the data, and recording the difference value between different data, wherein the difference value is the first partition difference amount of the current system and the target system.
In another embodiment of the present disclosure, the first partition stores the system data at a granularity of a block of a predetermined size. The predetermined size may be set to any value, such as 4Kb (Kilobyte), which is not limited by the embodiments of the disclosure.
The system data are stored by taking the blocks with the preset size as granularity, so that the system data stored in each block can be compared one by one during upgrading, the difference value of each block is further determined, and an upgrading packet generated according to the difference value has the characteristic of small data volume compared with an upgrading packet generated based on all system data of a target system, so that the occupation of bandwidth and a terminal memory can be reduced, and the upgrading efficiency can be improved.
As shown in fig. 2B, the first partition of the current system and the first partition of the target system respectively include a plurality of blocks, data in each of the plurality of blocks are compared one by one, if data in two corresponding blocks are consistent, the data are marked as the same, if data in two corresponding blocks are inconsistent, a difference between the two blocks is calculated, and a difference set between the first partition of the current system and the first partition of the target system of the terminal is the first partition difference.
The terminal system is upgraded by comparing the data in the first partition of the current system with the data in the first partition of the target system to obtain the first partition difference between the current system and the target system, so that the problems of high bandwidth and high terminal memory occupancy rate caused by upgrading the system by completely sending the system data of the target system can be avoided.
In step 203, detecting whether a pre-installed application to be updated exists in a second partition of the target system, and if so, executing step 204; if not, step 205 is performed.
The pre-installed application to be updated refers to the pre-installed application needing to be updated in the current system of the terminal; the pre-installed application refers to an application of the system. The method for detecting whether the pre-installed application to be updated exists in the second partition of the target system, that is, detecting whether the pre-installed application to be updated exists in the second partition of the current system of the terminal, may include the following two methods:
the method comprises the steps of firstly, obtaining an application identifier of each pre-installed application in a second partition of a current system of the terminal, obtaining the application identifier of the pre-installed application for any pre-installed application in the target system, detecting whether the corresponding pre-installed application exists in the current system of the terminal according to the application identifier of the pre-installed application, and if detecting that the pre-installed application does not exist in the current system of the terminal, determining that the pre-installed application to be updated exists in the second minute of the target system. The application identifier may be an application name, or other information that can uniquely identify the corresponding application, which is not limited in this disclosure.
And secondly, acquiring version information of each pre-installed application in a second partition of the current system of the terminal and version information of each pre-installed application in a second partition of the target system, comparing the current system with the version information of the corresponding pre-installed application of the target system, and determining that the pre-installed application to be updated exists in the second partition of the target system if the version information of the target system is newer than the version information of the current system of the terminal for any pre-installed application.
The process of detecting whether the pre-installed application to be updated exists in the second partition of the target system may be implemented by any one of the two methods, or by a combination of the two methods, or by other methods, which is not limited in this disclosure.
By detecting whether the pre-installed application to be updated exists in the second partition of the target system, when the system detects that the pre-installed application to be updated exists in the second partition of the target system, the pre-installed application in the current system of the terminal can be updated according to the detected pre-installed application to be updated.
In another embodiment of the present disclosure, the second partition stores the at least one pre-installed application at a file granularity. As shown in fig. 2B, the storing the at least one pre-installed application with file granularity refers to storing the at least one pre-installed application in the second partition in units of files.
By storing the at least one pre-installed application by taking the file as the granularity, the pre-installed application of the system can be updated in a complete file-based upgrading mode, and compared with the mode of storing by taking the block as the granularity, the upgrading success rate and efficiency can be improved.
In step 204, if it is detected that the pre-installed application to be updated exists in the second partition of the target system, an upgrade package is generated according to the first partition difference and the pre-installed application to be updated, and step 206 is executed.
When detecting that the pre-installed application to be updated exists in the second partition of the target system, the method for generating the upgrade package may be: for any pre-installed application in the target system, detecting whether the pre-installed application exists in a second partition of the current system; if the pre-installed application does not exist in the second partition of the current system, determining that the pre-installed application is the pre-installed application to be updated, and executing the step of generating the upgrade package according to the first partition difference and the pre-installed application to be updated; if the pre-installed application exists in the second partition of the current system, detecting whether the pre-installed application in the second partition of the current system is consistent with the pre-installed application in the target system, if not, determining that the pre-installed application is the pre-installed application to be updated, and executing the step of generating the upgrade package according to the difference of the first partition and the pre-installed application to be updated.
Whether the pre-installed application in the second partition of the current system is consistent with the pre-installed application in the target system may refer to whether the version information of the pre-installed application corresponding to the current system and the target system is consistent, or may refer to whether the application data of the pre-installed application corresponding to the current system and the target system is consistent, which is not limited in the embodiment of the present disclosure. The application data refers to data in an installation package of the application.
And if the version information of the pre-installed applications corresponding to the current system and the target system is consistent, comparing the version information of the corresponding pre-installed applications in the current system and the target system, if the version information of the corresponding pre-installed applications is the same, determining that the pre-installed applications in the second partition of the current system are consistent with the pre-installed applications in the target system, and if the version information of the corresponding pre-installed applications is different, determining that the pre-installed applications in the second partition of the current system are inconsistent with the pre-installed applications in the target system.
And when the application data of the pre-installed applications corresponding to the current system and the target system are consistent, acquiring the pre-installed applications corresponding to the current system and the target system, comparing the application data of the corresponding pre-installed applications, if the application data of the corresponding pre-installed applications are the same, determining that the pre-installed applications in the second partition of the current system are consistent with the pre-installed applications in the target system, and if the application data of the corresponding pre-installed applications are different, determining that the pre-installed applications in the second partition of the current system are inconsistent with the pre-installed applications in the target system.
In another embodiment of the present disclosure, if it is detected that the pre-installed application to be updated exists in the second partition of the target system, a prompt message is sent to the terminal, the prompt message is used for reminding a user whether to update the pre-installed application in the current system of the terminal, the prompting message at least comprises a confirmed updating option and a cancellation updating option, and when the terminal detects the triggering operation of the confirmed updating option by the user, sending a pre-installed application updating request to a server, wherein when the server receives the pre-installed application updating request sent by the terminal, executing the step of generating an upgrade package according to the first partition difference amount and the pre-installed application to be updated, when the terminal detects that the user triggers the update canceling option, a pre-installed application update canceling request is sent to the server, and when the server receives the pre-installed application update canceling request sent by the terminal, the server executes the step of generating the upgrade package according to the first partition difference.
When the pre-installed application to be updated is detected to exist in the second partition of the target system, a prompt message for prompting a user whether the pre-installed application in the current system of the terminal needs to be updated is sent to the terminal, so that the user can select whether the pre-installed application in the current system of the terminal needs to be updated or not by self, inconvenience caused by forced updating of the pre-installed application to normal use of the user is avoided, and user experience is further improved.
In step 205, if it is detected that the pre-installed application to be updated does not exist in the second partition of the target system, the upgrade package is generated according to the first partition difference.
If it is detected that the pre-installed application to be updated does not exist in the second partition of the target system, it indicates that the pre-installed applications in the current system of the terminal are all the latest versions, and the updating is not required, in this case, an updating packet is generated only according to the first partition difference amount obtained in step 202, so as to update the current system of the terminal.
In step 206, the upgrade package is sent to the terminal, so that the terminal upgrades from the current system to the target system according to the upgrade package.
And after generating an upgrade package according to the system upgrade request of the terminal, the server returns the upgrade package to the terminal, so that the terminal can achieve the purpose of system upgrade by installing the upgrade package.
The upgrading method provided by the disclosure can be used in the system upgrading process of a fixed terminal and a mobile terminal, the fixed terminal can be a Personal computer, a large-scale computer and the like, the mobile terminal can be a smart phone, a tablet computer, an MP3(Moving Picture Experts Group Audio Layer III, motion Picture Experts compression standard Audio Layer 3), a PDA (Personal Digital Assistant) and the like, and the upgrading method can also be used for upgrading other terminal systems.
According to the method provided by the embodiment of the disclosure, system data and pre-installed applications are respectively stored in the first partition and the second partition, and different upgrading methods are adopted to upgrade the system and the pre-installed applications respectively, so that the occupation rates of bandwidth and terminal memory can be reduced when the system is upgraded, the problem that the system cannot be upgraded due to the change of the pre-installed applications can be avoided, and the upgrade success rate of the system can be improved; furthermore, by storing the at least one pre-installed application by taking the file as the granularity, the pre-installed application of the system can be updated in a mode of complete upgrade based on the file, and compared with the mode of storing by taking the block as the granularity, the upgrade success rate and efficiency can be further improved.
FIG. 3 is a block diagram illustrating an upgrade apparatus according to an example embodiment. Referring to fig. 3, the apparatus includes an obtaining module 301, a comparing module 302, a generating module 303, and a transmitting module 304.
An obtaining module 301, configured to obtain version information of a current system of a terminal;
a comparing module 302, configured to compare data in a first partition of the current system with data in a first partition of a target system according to the version information of the current system and the version information of the target system acquired by the acquiring module 301, so as to obtain a first partition difference amount between the current system and the target system, where the first partition is used for storing system data;
a generating module 303, configured to generate an upgrade package according to the first partition difference obtained by the comparing module 302 and the pre-installed application to be updated if it is detected that the pre-installed application to be updated exists in a second partition of the target system, where the second partition is used to store at least one pre-installed application;
a sending module 304, configured to send the upgrade package generated by the generating module 303 to the terminal.
In a first possible implementation manner provided by the present disclosure, the apparatus further includes:
the detection module is used for detecting whether the pre-installed application exists in a second partition of the current system or not for any pre-installed application in the target system;
the determining module is configured to determine that the pre-installed application is the pre-installed application to be updated if the detecting module detects that the pre-installed application does not exist in the second partition of the current system;
the generating module 303 is configured to execute a step of generating the upgrade package according to the first partition difference amount and the pre-installed application to be updated determined by the determining module;
the detection module is further configured to detect whether the pre-installed application in the second partition of the current system is consistent with the pre-installed application in the target system if the pre-installed application exists in the second partition of the current system;
the determining module is further configured to determine that the pre-installed application is the pre-installed application to be updated if the detecting module detects that the pre-installed application in the second partition of the current system is inconsistent with the pre-installed application in the target system;
the generating module 303 is configured to execute the step of generating the upgrade package according to the first partition difference amount and the pre-installed application to be updated.
In a second possible implementation manner provided by the present disclosure, the generating module 303 is further configured to:
and if the situation that the pre-installed application to be updated does not exist in the second partition of the target system is detected, generating the upgrade package according to the difference of the first partitions.
In a third possible implementation manner provided by the present disclosure, the second partition stores the at least one pre-installed application at a file granularity.
In a fourth possible implementation manner provided by the present disclosure, the first partition stores the system data with a granularity of a block of a preset size.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 4 is a block diagram illustrating an upgrade apparatus 400 according to an example embodiment. For example, the apparatus 400 may be provided as a server. Referring to fig. 4, apparatus 400 includes a processing component 422 that further includes one or more processors and memory resources, represented by memory 432, for storing instructions, such as applications, that are executable by processing component 422. The application programs stored in memory 432 may include one or more modules that each correspond to a set of instructions. Further, the processing component 422 is configured to execute instructions to perform the upgrade method described above.
The apparatus 400 may also include a power component 426 configured to perform power management of the apparatus 400, a wired or wireless network interface 450 configured to connect the apparatus 400 to a network, and an input output (I/O) interface 458. The apparatus 500 may operate based on an operating system, such as Windows Server, stored in the memory 432TM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTMOr the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (7)

1. An upgrade method, characterized in that the method comprises:
acquiring version information of a current system of a terminal;
comparing data in a first partition of the current system with data in a first partition of a target system according to the version information of the current system and the version information of the target system to obtain a first partition difference amount of the current system and the target system, wherein the first partition stores system data by taking a block with a preset size as granularity;
if the fact that the pre-installed application to be updated exists in a second partition of the target system is detected, an upgrade package is generated according to the first partition difference and the pre-installed application to be updated, the second partition stores at least one pre-installed application with a file as granularity, and the pre-installed application is an application carried by the system; the first partition and the second partition are two parts of a system partition;
and sending the upgrade package to the terminal.
2. The method of claim 1, further comprising:
if the pre-installed application to be updated exists in the second partition of the target system, detecting whether the pre-installed application exists in the second partition of the current system or not before generating an upgrade package according to the first partition difference and the pre-installed application to be updated;
if the pre-installed application does not exist in the second partition of the current system, determining that the pre-installed application is the pre-installed application to be updated, and executing the step of generating the upgrade package according to the first partition difference and the pre-installed application to be updated;
if the pre-installed application exists in the second partition of the current system, detecting whether the pre-installed application in the second partition of the current system is consistent with the pre-installed application in the target system, if not, determining that the pre-installed application is the pre-installed application to be updated, and executing the step of generating the upgrade package according to the first partition difference and the pre-installed application to be updated.
3. The method of claim 1, wherein after comparing the data in the first partition of the current system with the data in the first partition of the target system according to the version information of the current system and the version information of the target system to obtain the first partition difference amount of the current system and the target system, the method further comprises:
and if the situation that the pre-installed application to be updated does not exist in the second partition of the target system is detected, generating the upgrade package according to the difference of the first partitions.
4. An upgrade apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring the version information of the current system of the terminal;
the comparison module is used for comparing data in a first partition of the current system with data in a first partition of a target system according to the version information of the current system and the version information of the target system to obtain a first partition difference amount of the current system and the target system, wherein the first partition stores system data by taking a block with a preset size as a granularity;
the generation module is used for generating an upgrade package according to the first partition difference and the pre-installed application to be updated if the pre-installed application to be updated exists in a second partition of the target system, wherein the second partition stores at least one pre-installed application by taking a file as granularity, and the pre-installed application is an application carried by the system; the first partition and the second partition are two parts of a system partition;
and the sending module is used for sending the upgrade package to the terminal.
5. The apparatus of claim 4, further comprising:
the detection module is used for detecting whether the pre-installed application exists in a second partition of the current system or not for any pre-installed application in the target system;
the determining module is used for determining that the pre-installed application is the pre-installed application to be updated if the pre-installed application does not exist in the second partition of the current system;
the generation module is used for executing the step of generating the upgrade package according to the first partition difference quantity and the pre-installed application to be updated;
the detection module is further configured to detect whether the pre-installed application in the second partition of the current system is consistent with the pre-installed application in the target system if the pre-installed application exists in the second partition of the current system;
the determining module is further configured to determine that the pre-installed application is the pre-installed application to be updated if the pre-installed application in the second partition of the current system is inconsistent with the pre-installed application in the target system;
the generation module is used for executing the step of generating the upgrade package according to the first partition difference and the pre-installed application to be updated.
6. The apparatus of claim 4, wherein the generating module is further configured to:
and if the situation that the pre-installed application to be updated does not exist in the second partition of the target system is detected, generating the upgrade package according to the difference of the first partitions.
7. A server, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring version information of a current system of a terminal;
comparing data in a first partition of the current system with data in a first partition of a target system according to the version information of the current system and the version information of the target system to obtain a first partition difference amount of the current system and the target system, wherein the first partition stores system data by taking a block with a preset size as granularity;
if the fact that the pre-installed application to be updated exists in a second partition of the target system is detected, an upgrade package is generated according to the first partition difference and the pre-installed application to be updated, the second partition stores at least one pre-installed application with a file as granularity, and the pre-installed application is an application carried by the system; the first partition and the second partition are two parts of a system partition;
and sending the upgrade package to the terminal.
CN201610616919.2A 2016-07-29 2016-07-29 Upgrading method and device Active CN106293814B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610616919.2A CN106293814B (en) 2016-07-29 2016-07-29 Upgrading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610616919.2A CN106293814B (en) 2016-07-29 2016-07-29 Upgrading method and device

Publications (2)

Publication Number Publication Date
CN106293814A CN106293814A (en) 2017-01-04
CN106293814B true CN106293814B (en) 2020-02-07

Family

ID=57663574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610616919.2A Active CN106293814B (en) 2016-07-29 2016-07-29 Upgrading method and device

Country Status (1)

Country Link
CN (1) CN106293814B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107491324A (en) * 2017-07-14 2017-12-19 深圳市金立通信设备有限公司 A kind of method and terminal for installing application program
CN109344008B (en) * 2018-09-30 2022-03-25 联想(北京)有限公司 Processing method and device
CN112416406B (en) * 2020-11-30 2023-06-23 腾讯科技(深圳)有限公司 Terminal equipment upgrading method, device, terminal equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609304A (en) * 2012-02-08 2012-07-25 广东欧珀移动通信有限公司 Management method for internal third-party applications of Android mobile phone
CN103514006A (en) * 2012-07-24 2014-01-15 Tcl集团股份有限公司 Method and system of upgrade of pre-installed applications of Android system
CN105530130A (en) * 2015-12-17 2016-04-27 青岛海信电器股份有限公司 Method and device for upgrading Over-The-Air downloading technology
CN105700926A (en) * 2016-01-14 2016-06-22 青岛海信电器股份有限公司 Method and apparatus for making differential upgrade package, and method and apparatus for differential upgrade of system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609304A (en) * 2012-02-08 2012-07-25 广东欧珀移动通信有限公司 Management method for internal third-party applications of Android mobile phone
CN103514006A (en) * 2012-07-24 2014-01-15 Tcl集团股份有限公司 Method and system of upgrade of pre-installed applications of Android system
CN105530130A (en) * 2015-12-17 2016-04-27 青岛海信电器股份有限公司 Method and device for upgrading Over-The-Air downloading technology
CN105700926A (en) * 2016-01-14 2016-06-22 青岛海信电器股份有限公司 Method and apparatus for making differential upgrade package, and method and apparatus for differential upgrade of system

Also Published As

Publication number Publication date
CN106293814A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
CN108156268B (en) Method for acquiring device identifier, server and terminal device
CN110659046B (en) Firmware upgrading method, terminal, charging box, earphone and storage medium
US9792623B2 (en) Advertisement processing method and apparatus
US9411573B2 (en) Testing framework for applications
CN110865842B (en) OTA upgrading method and equipment
CN105302587A (en) Data updating method and apparatus
US20130060890A1 (en) Apparatus and method for providing application execution using a cloud system
US20130297563A1 (en) Timestamp management method for data synchronization and terminal therefor
CN106886436B (en) Android system upgrading method and device
CN106293814B (en) Upgrading method and device
CN104504587A (en) Advertisement monitoring method and device, electronic apparatus
CN111464351B (en) Network distribution method and device for intelligent household equipment, terminal equipment and storage medium
CN110837391B (en) Application program hot updating method and device, storage medium and electronic equipment
CN110888658B (en) Method and device for dynamically changing function modules in application program and storage medium
CN112134908B (en) Application adaptation method, server, medium and vehicle-mounted multimedia system
CN111752577A (en) System version upgrading method and device
CN113094064A (en) Gateway software module upgrading method, device, equipment and storage medium
CN113721936B (en) Application management method, intelligent terminal, device and storage medium
CN115878138A (en) Application pre-downloading method and device, computer and storage medium
CN111930391B (en) Application data processing method and device, server and user terminal
CN108959955B (en) File processing method and device
CN110825406A (en) Software upgrading method and related equipment
CN106162609B (en) Data pushing method and device
CN105812433B (en) Cloud adaptation processing method and device, terminal and cloud server
CN112882733B (en) Application updating method and device, electronic equipment and storage medium

Legal Events

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