CN108874439B - Method and device for acquiring customized difference packet, and upgrading method and device - Google Patents

Method and device for acquiring customized difference packet, and upgrading method and device Download PDF

Info

Publication number
CN108874439B
CN108874439B CN201810708813.4A CN201810708813A CN108874439B CN 108874439 B CN108874439 B CN 108874439B CN 201810708813 A CN201810708813 A CN 201810708813A CN 108874439 B CN108874439 B CN 108874439B
Authority
CN
China
Prior art keywords
customized
differential packet
upgrade
packet
upgrading
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
CN201810708813.4A
Other languages
Chinese (zh)
Other versions
CN108874439A (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.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group 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 BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN201810708813.4A priority Critical patent/CN108874439B/en
Publication of CN108874439A publication Critical patent/CN108874439A/en
Application granted granted Critical
Publication of CN108874439B publication Critical patent/CN108874439B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates

Landscapes

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

Abstract

The invention relates to a method and a device for acquiring a customized differential packet, and an upgrading method and a device. A method for obtaining a customized differential packet comprises the following steps: analyzing an upgrade file, and storing the upgrade file to a corresponding position of a preset directory structure; and generating a customized difference packet according to the preset directory structure, wherein the customized difference packet comprises a version number. Therefore, the embodiment unifies formats of the upgrade files in different forms, so that the obtained customized differential package has version numbers in the unified format, the problems that the version numbers in different upgrade modes are disordered and the upgrade files are not unified can be solved, and the success rate of system upgrade is improved.

Description

Method and device for acquiring customized difference packet, and upgrading method and device
Technical Field
The invention relates to the technical field of data processing, in particular to a method and a device for acquiring a customized differential packet, and an upgrading method and a device.
Background
Currently, the Android system provides a plurality of system upgrade modes, such as a USB upgrade mode, an Over the Air Technology (OTA) full upgrade mode, an OTA differential upgrade mode, and an APK upgrade mode, and different upgrade modes obtain upgrade files in different modes. However, if the same electronic device adopts different upgrading methods to upgrade the system, version management of the system may be confused, and thus the success rate and the repetition rate of system upgrading are low.
Disclosure of Invention
The invention provides a method and a device for acquiring a customized differential packet, and an upgrading method and a device, which are used for solving the problems of low system upgrading success rate caused by disordered upgrading versions and non-uniform upgrading files when electronic equipment is upgraded in different upgrading modes in the related technology.
According to a first aspect of the embodiments of the present invention, there is provided a method for obtaining a customized differential packet, the method including:
analyzing an upgrade file, and storing the upgrade file to a corresponding position of a preset directory structure;
and generating a customized differential packet according to the preset directory structure, wherein the customized differential packet comprises a version number.
Optionally, after generating the customized differential packet according to the preset directory structure, the method further includes:
and storing the customized difference packet to a set position.
Optionally, after storing the customized differential packet to a set position, the method further includes:
monitoring an upgrade trigger event;
after an upgrade trigger event is monitored, acquiring a transmission protocol corresponding to the upgrade trigger event;
dividing the customized differential packet into a plurality of sub-differential packets; aiming at each sub-differential packet, combining the sub-differential packet and a packet header corresponding to the transmission protocol to obtain a transmission packet;
and transmitting the transmission packet to the equipment corresponding to the upgrade trigger event.
Optionally, the transport protocol includes at least one or more of a TCP/UDP protocol, a video streaming protocol, or a USB protocol.
Optionally, after storing the customized differential packet to a set position, the method further includes:
and after the successful system upgrade is monitored, loading the version number in the customized differential packet into the upgraded system.
According to a second aspect of the embodiments of the present invention, there is provided an upgrade method, including:
monitoring an upgrade trigger event;
after an upgrade trigger event is monitored, executing an upgrade recovery program;
detecting whether a customized differential packet is stored locally;
if yes, the signature of the customized differential packet is verified;
and if the signature passes the verification, upgrading the system based on the customized differential packet.
Optionally, after detecting whether there is a customized differential packet locally, the method further includes:
if the differential packet is not customized locally, downloading the customized differential packet from a server;
and after the customized differential packet passes the integrity check, re-executing the step of upgrading the recovery program.
Optionally, after detecting whether there is a customized differential packet locally, the method further includes:
if the differential packet is not customized locally, analyzing an upgrade file, and storing the upgrade file to a corresponding position of a preset directory structure;
and generating a customized differential packet according to the preset directory structure and storing the customized differential packet in the local, wherein the customized differential packet comprises a version number.
Optionally, the system for upgrading based on the customized differential packet includes:
obtaining an upgrading script corresponding to the customized difference packet;
and executing the upgrading script to analyze the customized differential packet to carry out system upgrading.
Optionally, after upgrading the system based on the customized difference package, the method further includes:
and after the successful system upgrade is monitored, loading the version number in the customized differential packet into the upgraded system.
According to a third aspect of the embodiments of the present invention, there is provided an apparatus for acquiring a customized differential packet, including:
the upgrade file analysis module is used for analyzing the upgrade file and storing the upgrade file to a corresponding position of a preset directory structure;
and the differential packet generating module is used for generating a customized differential packet according to the preset directory structure, wherein the customized differential packet comprises a version number.
According to a fourth aspect of the embodiments of the present invention, there is provided an upgrade apparatus, including:
the trigger event monitoring module is used for monitoring an upgrading trigger event;
the upgrading program execution module is used for executing the upgrading recovery program after monitoring the upgrading trigger event;
the differential packet detection module is used for detecting whether a customized differential packet is stored locally;
the differential packet checking module is used for checking the signature of the customized differential packet when the customized differential packet exists locally;
and the system upgrading module is used for upgrading the system based on the customized differential packet when the signature verification passes.
According to a fifth aspect of embodiments of the present invention, there is provided a computer-readable storage medium, wherein the storage medium stores therein a computer program, and the computer program, when executed by a processor, implements the steps of the method of the first aspect or the second aspect.
As can be seen, in this embodiment, the upgrade file is parsed and then stored to a corresponding location of the preset directory structure; and then, generating a customized differential packet according to a preset directory structure, wherein the customized differential packet comprises a version number. Therefore, the embodiment unifies formats of the upgrade files in different forms, so that the obtained customized differential package has version numbers in the unified format, the problems that the version numbers in different upgrade modes are disordered and the upgrade files are not unified can be solved, and the success rate of system upgrade is 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 invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a flowchart illustrating a method for obtaining a customized differential packet according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a default directory structure according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a customized differential packet being partitioned into a plurality of sub-differential packets according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating an upgrade method according to an embodiment of the present invention;
fig. 5 to 8 are block diagrams of an apparatus for acquiring a customized differential packet according to an embodiment of the present invention;
FIGS. 9-11 are block diagrams of an upgrade apparatus according to an embodiment of the present invention;
fig. 12 is a block diagram illustrating an electronic device according to an embodiment of the present invention.
Detailed Description
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 embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
At present, an Android system provides multiple system upgrading modes, such as a USB upgrading mode, an OTA full upgrading mode, an OTA differential upgrading mode, and an APK upgrading mode, and different upgrading modes have different modes for acquiring upgrading files. However, if the same electronic device adopts different upgrading methods to perform system upgrading, upgrading files are not uniform, upgrading versions are disordered, and then the success rate and the repetition rate of system upgrading are low.
Therefore, the embodiment of the invention provides a method for acquiring a customized differential packet, which adopts a preset directory structure to process an upgrade file, thereby acquiring the customized differential packet with a uniform format; and, generating a version number based on the customized differential package, fig. 1 is a flowchart illustrating a method of obtaining the customized differential package according to an embodiment of the present invention. It can be understood that the method for obtaining the customized differential packet in the embodiment can be applied to a mobile terminal, a personal computer or a server.
Referring to fig. 1, a method for obtaining a customized differential packet, which is described by taking an application to a server as an example, includes:
and 101, analyzing the upgrade file, and storing the upgrade file to a corresponding position of a preset directory structure.
It will be appreciated that the upgrade file of the present embodiment may be provided by the provider, i.e. the upgrade file is known to the provider. The provider may store the upgrade file in the memory of the server. And the processor of the server executes the corresponding script program to read the upgrade file from the memory and analyzes the upgrade file. And then storing the data in the upgrade file to the position of a preset directory structure.
In this embodiment, the preset directory structure may be set according to a specific scenario, for example, the directory structure shown in fig. 2 may be used in an android system, which is not limited herein.
102, generating a customized differential packet according to the preset directory structure, wherein the customized differential packet comprises a version number.
In this embodiment, the processor generates the customized differential packet according to the preset target structure, and then generates the version number according to the customized differential packet.
In another embodiment, the processor may further store the customized difference packet to a set location after generating the customized difference packet. The set position can be in a memory of a server or a USB flash disk, and can be set according to a specific scene.
In yet another embodiment, the processor may also transmit the customized difference package to a device requiring an upgrade in response to an upgrade triggering event. In this scenario, the processor may monitor, in real time or at regular time, an upgrade trigger event, where the upgrade trigger event may be from a device that needs to be upgraded, or an upgrade trigger event generated by the server in response to the device that needs to be upgraded. The upgrade trigger event may be set according to different upgrade manners, which is not limited herein.
When an upgrade trigger event is not monitored, the processor may continue to monitor for upgrade trigger events. After the upgrade trigger event is monitored, the processor can acquire the transmission protocol corresponding to the upgrade trigger event, and further acquire the packet header corresponding to the transmission protocol. The header format corresponds to each transport protocol, and those skilled in the art can adopt the header format in the phase difference technique, which is not described in detail herein.
The transmission protocol is a protocol adopted by communication between the equipment needing to be upgraded and the server. The transport protocol may include one or more of a TCP/UDP protocol, a video streaming protocol, or a USB protocol. For example, the server and the device to be upgraded adopt RJ45, WIFI, 4G, etc. as connection media, and a network system formed by taking TCP/UDP as a transmission protocol. For another example, the server and the device to be upgraded adopt a digital television network system formed by connecting media such as ground waves, cables, satellite waves and the like and taking video streams as a transmission protocol. For another example, the server and the device to be upgraded adopt a USB disk as a medium, and a physical upgrade system is formed by a USB transmission protocol.
In this embodiment, the processor divides the customized differential packet into a plurality of sub-differential packets, which may include sub-differential packet 1, sub-differential packet 2, \8230, sub-differential packet N, and then combines each sub-differential packet and the packet header to obtain a transmission packet, and then the processor issues the transmission packet to a communication link between the device to be upgraded and the server, and transmits the transmission packet to the device to be upgraded through the communication link, referring to fig. 3. Therefore, the server can rapidly issue the customized differential packet to the equipment needing to be upgraded, and the upgrading scene of the equipment adopting different transmission protocols is met.
Therefore, the embodiment unifies formats of the upgrade files in different forms, so that the obtained customized differential package has version numbers in a unified format, and the problems that the version numbers in different upgrade modes are disordered and the upgrade files are not unified can be solved, thereby improving the success rate of system upgrade.
The embodiment of the present invention further provides an upgrading method, which may be applied to a device that needs to be upgraded, where the upgrading device may be an electronic device such as a mobile terminal and a personal computer, and fig. 4 is a schematic flow diagram of the upgrading method shown in the embodiment of the present invention. Taking the application of the upgrade method to the mobile terminal as an example, referring to fig. 4, the processor in the mobile terminal may monitor whether there is an upgrade trigger event in real time or at regular time, and continue monitoring if there is no upgrade trigger event; and if the upgrade trigger event exists, executing an upgrade recovery program. When executing the upgrade recovery program, the processor may first detect whether a local (a usb disk or a memory in the mobile terminal) stores the customized differential packet. When the differential packet is not customized locally, the processor stops upgrading and shifts to a state of monitoring whether an upgrading trigger event exists or not; or the processor downloads the customized differential packet from the server, and the customized differential packet is stored locally after passing the integrity check; or, the processor calls the method for obtaining the customized differential packet as illustrated in fig. 1 to obtain the customized differential packet, and stores the customized differential packet locally after the customized differential packet passes the integrity check. When the customized differential packet is locally available, the processor checks the signature of the customized differential packet.
The verification process may be that the processor parses a public key and a private key in the customized differential packet, and determines whether a signature of the customized differential packet meets requirements based on the public key and the private key. And when the customized differential packet fails to be checked, namely the signature does not meet the requirement, stopping upgrading and switching to the step of monitoring whether an upgrading triggering event exists or not by the processor. And when the customized differential packet passes the verification, namely the signature meets the requirement, the processor reads and executes the prestored upgrading script, analyzes the customized differential packet and upgrades the system of the mobile terminal.
It is understood that the customized differential packet in the present embodiment may be stored in the server. In order to download the customized differential packet to the local, the mobile terminal may further send the upgrade trigger event to the server after monitoring the upgrade trigger event. And the server responds to the upgrading trigger event to acquire the transmission protocol corresponding to the upgrading trigger event. And then, the server divides the customized differential packet into a plurality of sub-differential packets, combines a packet header with each differential packet to obtain a transmission packet, and sends each transmission packet to the mobile terminal corresponding to the upgrade trigger event. After receiving a plurality of transmission packets, the mobile terminal combines the packet header information of each transmission packet to obtain a customized differential packet. And then the processor of the mobile terminal checks the integrity of the customized differential packet, and executes an upgrade recovery program after the integrity check is passed, so that the purpose of downloading the customized differential packet by the mobile terminal is achieved.
In yet another embodiment, the processor also loads the version number in the customized differential package into the upgraded system. In practical application, the system is usually required to be restarted after the system is successfully upgraded, and in an initialization stage after the system is restarted, the processor can also obtain the version number in the customized differential packet and then load the version number into the upgraded system, so that the consistency between the updating of each customized differential packet and the version management in the system can be ensured, and the purpose of improving the upgrading accuracy of the system is achieved.
Therefore, no matter what upgrading scheme is adopted in the embodiment, the customized differential packets with the uniform format and the version numbers with the uniform format are adopted, so that the success rate of system upgrading is improved, and the repetition rate is reduced.
In order to verify the effectiveness of the method for obtaining the customized differential packet provided by the embodiment of the present invention, an example of performing system upgrade in a USB upgrade manner is described.
First, obtain the differential packet of customization
The customized differential package is provided by a server on the provider side, can be directly stored in the USB flash disk, and can also be stored in the server and downloaded to the USB flash disk or the mobile terminal by a user of the mobile terminal.
The server on the provider side may obtain the customized differential package based on:
the provider may manually create the empty folder shown in fig. 2 according to a preset directory structure and then upload the upgrade file. And the processor executes the uploading program, decompresses the upgrading file and stores the customized differential packet into an empty folder. The uploading procedure may be implemented by a procedure in the related art, and may also be implemented manually by a user, which is not limited herein.
Then, the processor may remove the system time and the signature judgment in the upgrade file, and only process the application data or the image related to the upgrade, for example, upgrade only one apk or kernel image. And then, the processor executes a packaging command and generates a customized differential packet update.
zip-r./update-signed. Zip// generate a customized differential package with a preset directory in which the upgrade file is placed.
In practical applications, the processor may further execute the signing command to sign the customized differential packet with the private key as follows:
“java-Xmx2048m-jar../signapk.jar-w../testkey.x509.pem../testkey.pk8./update-u sign.zip./update.zip”。
zip may be stored to the memory of the server or to the usb disk.
In this embodiment, it needs to be ensured that the system version update and the customized differential packet are managed in a unified manner, and each customized differential packet includes a version number.
It can be seen that, in this embodiment, the upgrade file is adjusted to the customized differential packet with the uniform format, and the method can be applied to the OTA upgrade mode and the USB upgrade mode, so that continuity of different upgrade modes can be achieved, the problem of version management confusion caused by different upgrade modes is avoided, and the upgrade success rate and accuracy are improved.
Secondly, upgrading the system according to the customized difference packet
In this embodiment, an OTA differential upgrade mode is adopted, and a USB upgrade mode may be adjusted first, that is, data required for upgrade in the USB upgrade mode does not adopt a mirror image set, but obtains a customized differential packet from a specified location.
And when the processor of the mobile terminal monitors an upgrading trigger event, the processor jumps from executing the U-boot program to executing the recovery program. When the recovery program is executed, the processor may detect whether the customized differential packet is stored in the usb disk communicatively connected to the mobile terminal. If the U disk does not have the customized differential packet, the upgrading is stopped, or the customized differential packet is downloaded from the server, integrity verification is carried out after the downloading is finished, and the customized differential packet is stored in the U disk after the verification is passed; and if the customized differential packet exists in the U disk, the processor detects whether the customized differential packet conforms to a recovery program or not, and updates after the signature verification is passed. Wherein the upgrade program may be a script, such as an Updater-script.
The script content is as follows:
ui _ print ("start. ·...,"); // print start;
set _ progress ("1"); v/setting upgrade progress;
show _ progress ("1", "90"); v/setting upgrade progress;
mount ("ext 4", "EMMC", "/dev/block/platform/hi _ mci.1/by-name/system", "/system"); v/mount system partition;
packet _ extract _ dir ("system", "/system"); updating the upgrade file in the system directory in the customized diff package to the system partition;
set _ perm _ recursion (0, 2000,0755, "/system/bin"); v/Modify/system/bin directory user groups and permissions;
set _ perm _ recursion (0, 2000,0755, "/system/vendor/bin"); v/Modify/system/vendor/bin directory user group and permissions;
set _ perm _ recursion (0, 2000,0755, "/system/xbin"); v/Modify/system/xbin directory user group and permissions;
set _ perm _ recursive (0, 2000,0755, "/system/etc"); v/Modify/system/etc directory user groups and permissions;
unmount ("/system"); v/offload system partition;
ui _ print ("update ok."). // print upgrade was successful.
It is to be understood that the script content described above may be modified according to a customized differential package, and is used herein as an example only and not to limit the present invention. An embodiment of the present invention provides an apparatus for acquiring a customized differential packet, and fig. 5 is a block diagram of an apparatus for acquiring a customized differential packet according to an embodiment of the present invention. Referring to fig. 5, an apparatus 500 for obtaining a customized differential package includes:
an upgrade file parsing module 501, configured to parse an upgrade file and store the upgrade file to a corresponding location of a preset directory structure;
a difference packet generating module 502, configured to generate a customized difference packet according to the preset directory structure, where the customized difference packet includes a version number.
Fig. 6 is a block diagram illustrating another apparatus for obtaining a customized differential packet according to an embodiment of the present invention. Referring to fig. 6, on the basis of the apparatus 500 for obtaining customized differential packets shown in fig. 5, the apparatus further comprises:
and a difference packet storage module 601, configured to store the customized difference packet to a set position.
Fig. 7 is a block diagram illustrating another apparatus for obtaining a customized differential packet according to an embodiment of the present invention. Referring to fig. 7, on the basis of the apparatus 500 for acquiring the customized differential packet shown in fig. 6, the apparatus further includes:
a trigger event monitoring module 701, configured to monitor an upgrade trigger event;
a transmission protocol obtaining module 702, configured to obtain, after an upgrade trigger event is monitored, a transmission protocol corresponding to the upgrade trigger event;
a transmission packet combining module 703 for dividing the customized differential packet into a plurality of sub-differential packets; for each sub-differential packet, combining the sub-differential packet and a packet header corresponding to the transmission protocol to obtain a transmission packet;
a transmission package issuing module 704, configured to issue the transmission package customized upgrade file to the device corresponding to the upgrade trigger event.
In an embodiment, the transport protocol comprises at least one or more of a TCP/UDP protocol, a video streaming protocol, or a USB protocol.
Fig. 8 is a block diagram of another apparatus for obtaining a customized differential packet according to an embodiment of the present invention. Referring to fig. 8, on the basis of the apparatus 500 for acquiring the customized differential packet shown in fig. 5, the apparatus further includes:
and the version number loading module 801 is configured to load the version number in the customized differential packet into the upgraded system after monitoring that the system is upgraded successfully.
It can be understood that the apparatus for obtaining the customized differential packet provided in the embodiment of the present invention corresponds to the method for obtaining the customized differential packet, and specific contents may refer to the contents of each embodiment of the method for obtaining the customized differential packet, and are not described herein again.
Fig. 9 is a block diagram of an upgrading apparatus according to an embodiment of the present invention. Referring to fig. 9, an upgrade apparatus 900 includes:
a trigger event monitoring module 901, configured to monitor an upgrade trigger event;
an upgrade program execution module 902, configured to execute an upgrade recovery program after an upgrade trigger event is monitored;
a differential packet detection module 903, configured to detect whether a customized differential packet is locally stored;
a differential packet checking module 904, configured to check a signature of the customized differential packet when the customized differential packet exists locally;
and the system upgrading module 905 is used for upgrading the system based on the customized differential packet when the signature verification passes.
Fig. 10 is a block diagram illustrating another upgrading apparatus according to an embodiment of the present invention. Referring to fig. 10, on the basis of the upgrading apparatus 900 shown in fig. 9, the apparatus further includes:
a differential packet downloading module 1001, configured to download the customized differential packet from a server when the differential packet detecting module does not detect that the customized differential packet is locally stored;
the upgrading program execution module is also used for re-executing the step of upgrading the recovery program after the customized differential packet passes the integrity check.
Fig. 11 is a block diagram illustrating another upgrade apparatus according to an embodiment of the present invention. Referring to fig. 11, on the basis of the upgrading apparatus 900 shown in fig. 9, the system upgrading module 905 includes:
an upgrade script obtaining unit 1101, configured to obtain an upgrade script corresponding to the customized differential packet;
and a differential packet parsing unit 1102, configured to execute the upgrade script to parse the customized differential packet for system upgrade.
It can be understood that the upgrade apparatus provided in the embodiment of the present invention corresponds to the upgrade method described above, and specific contents may refer to the contents of each embodiment of the upgrade method, which are not described herein again.
Fig. 12 is an electronic device shown according to an embodiment of the present invention. Referring to fig. 12, an electronic device 1200 includes:
a processor 1201;
a memory 1202 for storing instructions executable by the processor 1201;
wherein the processor 1201 is configured to execute the executable instructions in the memory 1202 to implement the steps of the methods described in the method embodiments above.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method for obtaining a customized differential packet illustrated in fig. 1 to 3, and the steps of the upgrading method illustrated in fig. 4.
It can be understood that, in the description of the method embodiment, the structure of the electronic device and the functions between the devices have been described in detail, and specific reference may be made to the corresponding contents, which is not repeated herein.
In the present invention, the terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The term "plurality" means two or more unless expressly limited otherwise.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. The invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (9)

1. A method of obtaining a customized differential packet, the method comprising:
analyzing an upgrade file, and storing application data or a mirror image related to the upgrade to a corresponding position of a preset directory structure in the upgrade file;
generating a customized differential packet according to the preset directory structure, wherein the customized differential packet comprises a version number and application data or a mirror image only relevant to the upgrade;
and signing the customized differential packet by using a private key, and storing the customized differential packet to a set position.
2. The method of claim 1, wherein after storing the customized differential package to a set location, the method further comprises:
monitoring an upgrade trigger event;
after an upgrade trigger event is monitored, acquiring a transmission protocol corresponding to the upgrade trigger event;
dividing the customized differential packet into a plurality of sub-differential packets; for each sub-differential packet, combining the sub-differential packet and a packet header corresponding to the transmission protocol to obtain a transmission packet;
and sending the transmission packet to the equipment corresponding to the upgrading trigger event.
3. The method of claim 2, wherein the transport protocols include at least one or more of TCP/UDP protocol, video streaming protocol, or USB protocol.
4. An upgrade method, characterized in that the method comprises:
monitoring an upgrade trigger event;
after an upgrade trigger event is monitored, executing an upgrade recovery program;
detecting whether a customized differential packet is stored in a local designated position;
if the local designated position has the customized differential packet, analyzing a public key and a private key in the customized differential packet, and judging whether the signature of the customized differential packet meets the requirement or not based on the public key and the private key; the customized differentiation comprises obtaining by: analyzing an upgrade file, and storing the upgrade file to a corresponding position of a preset directory structure; generating a customized differential packet according to the preset directory structure and storing the customized differential packet in the local, wherein the customized differential packet comprises a version number;
if the signature passes the verification, upgrading the system based on the customized differential packet, wherein the customized differential packet only comprises application data or a mirror image related to the upgrade;
and restarting the system after the system is successfully upgraded, and loading the version number of the customized differential packet into the upgraded system in the initialization stage of restarting the system.
5. The upgrading method according to claim 4, wherein after detecting whether there is a customized differential package locally, the method further comprises:
if the differential packet is not customized locally, downloading the customized differential packet from a server;
and after the customized differential packet passes the integrity check, re-executing the step of upgrading the recovery program.
6. The upgrade method according to claim 4, wherein upgrading the system based on the customized differential package comprises:
obtaining an upgrading script corresponding to the customized difference packet;
and executing the upgrading script to analyze the customized differential packet to carry out system upgrading.
7. An apparatus for obtaining a customized differential packet, the apparatus comprising:
the upgrade file analysis module is used for analyzing an upgrade file and storing application data or a mirror image related to the upgrade to a corresponding position of a preset directory structure in the upgrade file;
the differential packet generating module is used for processing the application data or the mirror image related to the upgrade according to the preset directory structure and generating a customized differential packet, wherein the customized differential packet comprises a version number and the application data or the mirror image only related to the upgrade;
and signing the customized differential packet by using a private key, and storing the customized differential packet to a set position.
8. An upgrade apparatus, characterized in that the apparatus comprises:
the trigger event monitoring module is used for monitoring an upgrading trigger event;
the upgrading program execution module is used for executing the upgrading recovery program after the upgrading trigger event is monitored;
the differential packet detection module is used for detecting whether a customized differential packet is stored locally;
the differential packet checking module is used for analyzing a public key and a private key in the customized differential packet when the customized differential packet exists locally, and judging whether the signature of the customized differential packet meets the requirement or not based on the public key and the private key; the customized differentiation comprises obtaining by: analyzing an upgrade file, and storing the upgrade file to a corresponding position of a preset directory structure; generating a customized differential packet according to the preset directory structure and storing the customized differential packet in the local, wherein the customized differential packet comprises a version number;
the system upgrading module is used for upgrading the system based on the customized differential packet when the signature verification passes, and the customized differential packet only comprises application data or a mirror image related to the upgrading;
storing the customized difference package to a set position and executing a recovery program upgrading system;
and restarting the system after the system is upgraded successfully, and loading the version number of the customized differential packet into the upgraded system in the initialization stage of restarting the system.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN201810708813.4A 2018-07-02 2018-07-02 Method and device for acquiring customized difference packet, and upgrading method and device Active CN108874439B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810708813.4A CN108874439B (en) 2018-07-02 2018-07-02 Method and device for acquiring customized difference packet, and upgrading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810708813.4A CN108874439B (en) 2018-07-02 2018-07-02 Method and device for acquiring customized difference packet, and upgrading method and device

Publications (2)

Publication Number Publication Date
CN108874439A CN108874439A (en) 2018-11-23
CN108874439B true CN108874439B (en) 2023-04-11

Family

ID=64297984

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810708813.4A Active CN108874439B (en) 2018-07-02 2018-07-02 Method and device for acquiring customized difference packet, and upgrading method and device

Country Status (1)

Country Link
CN (1) CN108874439B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110231949A (en) * 2019-06-25 2019-09-13 广东小天才科技有限公司 Method for upgrading system, device, electronic equipment and storage medium
CN110798741A (en) * 2019-11-14 2020-02-14 四川长虹电器股份有限公司 Security upgrading method and system for smart television
CN112416386A (en) * 2020-10-26 2021-02-26 北京一亩田新农网络科技有限公司 Method, device, system and medium for software upgrading
CN112631633A (en) * 2021-01-07 2021-04-09 南方电网数字电网研究院有限公司 Function module upgrading method and device based on double-core intelligent electric meter
CN113791814B (en) * 2021-08-24 2024-03-26 福建魔方电子科技有限公司 Method, device, equipment and medium for updating production presets on Android platform

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102830984B (en) * 2011-06-14 2016-07-06 联想(北京)有限公司 Method, chip and the communication terminal that firmware updates
CN102880495A (en) * 2012-10-15 2013-01-16 华为终端有限公司 Mobile terminal and software upgrading method for same
CN105468396A (en) * 2014-09-11 2016-04-06 深圳Tcl数字技术有限公司 Generating method for differential package, upgrading method, generating apparatus, and Linux terminal
CN104536775A (en) * 2014-11-26 2015-04-22 四川长虹电器股份有限公司 Method and system for upgrading preset application under Android platform
CN104965736B (en) * 2015-06-19 2018-04-27 青岛海信移动通信技术股份有限公司 A kind of method and device continuously upgraded
CN105573785A (en) * 2015-12-11 2016-05-11 青岛海信电器股份有限公司 Differential package manufacturing method and device
CN106775723B (en) * 2016-12-16 2021-01-29 深圳市优***科技股份有限公司 Android platform-based system firmware customization method and Android device
CN106649771B (en) * 2016-12-27 2019-10-25 广州杰赛科技股份有限公司 The data model update method and system of database
CN106686578A (en) * 2016-12-28 2017-05-17 深圳天珑无线科技有限公司 Difference package generation method and apparatus
CN107948239A (en) * 2017-10-16 2018-04-20 大唐网络有限公司 Version upgrading method and its system based on android system
CN108121554A (en) * 2017-12-20 2018-06-05 浙江亿邦通信科技股份有限公司 A kind of upgrade method and upgrade-system of open air embedded device system

Also Published As

Publication number Publication date
CN108874439A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN108874439B (en) Method and device for acquiring customized difference packet, and upgrading method and device
US11606677B2 (en) Method for sharing application between terminals, and terminal
US20150220326A1 (en) Mobile Terminal and Software Upgrade Method Thereof
CN106572372B (en) Set top box upgrading method and set top box
CN107346252B (en) Application updating method and device
CN107547239B (en) Configuration object updating method and device
US20050257208A1 (en) Efficient patching
US20070294686A1 (en) Program upgrade system and method for ota-capable device
CN105302563B (en) The plug-in unit method and system of mobile application service
KR100584448B1 (en) Remote download method and system of embedded software using the position of binary image
CN110764807B (en) Upgrading method, system, server and terminal equipment
US20150234647A1 (en) Upgrade Package Generation Method And Device, Dynamic File Differential Upgrade Method And Terminal
CN103942058A (en) Embedded electronic equipment software updating method and system
US8549165B2 (en) Processing devices and methods for transmitting and receiving data
CN107256161B (en) Client upgrading method based on electron technology
CN104699511A (en) Plug-in upgrading method and plug-in upgrading device
CN112202920A (en) Vehicle machine system upgrading method and device
WO2017124736A1 (en) Method, device and system for transmitting upgrade abnormality information
CN109189419B (en) System upgrading method, device and system, server and client
CN109358894B (en) Android equipment upgrading method and system supporting DVB
CN106708494B (en) JAR upgrading method and device
CN110147246A (en) Version checking method and device, storage medium and the terminal of space download technology
CN113094064A (en) Gateway software module upgrading method, device, equipment and storage medium
CN104158907A (en) Method and device of downloading application program file
CN108989428A (en) Bluetooth terminal upgrade method, server, computer readable storage medium and 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
GR01 Patent grant
GR01 Patent grant