# US 10,871,953 B2 · Application update method and apparatus

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,871,953 B2
- Document ID: US10871953B2
- Status: Granted
- Kind: B2
- Application number: 16/046,735
- Filed: 2018-07-26
- Published: 2018-12-27
- Granted: 2020-12-22
- Earliest claimed: 2016-05-07
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Yufeng Wei; Linghe Rao; Jintao Li; Mengguang Lin
- Web page: https://patentgrep.com/patent/US10871953B2

## CPC

- G06F 8/65: Updates (security arrangements therefor G06F21/57)
- G06F 8/71: Version control (security arrangements therefor G06F21/57); Configuration management
- G06F 9/445: Program loading or initiating (bootstrapping G06F9/4401; security arrangements for program loading or initiating G06F21/57)
- G06F 9/48: Program initiating; Program switching, e.g. by interrupt
- G06F 21/51: at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
- G06F 21/57: Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
- H04L 67/34: {involving the movement of software or configuration parameters (network booting or remote initial program loading [RIPL] G06F9/4416)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

When an application client is started, if an application patch file package exists for the application client, the device invokes a DexClassLoader to load one or more executable files generated from one or more class files for which an updated version and a current version of the application client have a difference. The device initializes the application client by inserting each of the one or more executable files in front of existing executable files of a corresponding application component in the current version of the application client, such that invocation of corresponding class files for the one or more classes in the current version of the application client is bypassed during the initializing of the application client. The present disclosure resolves a technical problem that when an application is updated, a current operation needs to be interrupted to enter an installation interface, consequently reducing application update efficiency.

## Claims

### Claim 1

A method, comprising:
at a computing device having one or more processors and memory:
detecting that an application client is started at the computing device, wherein the application client comprises a current version and includes one or more Dalvik Executable (dex) class files in the current version;
in response to detecting that the application client is started at the computing device, determining whether an application patch file package exists for the application client locally at the computing device, wherein:
the application patch file package is generated by an application server and downloaded to the computing device prior to the starting of the application client;
the application patch file package corresponds to an updated version of the application client; and
the updated version of the application client includes one or more dex class files, each dex class file in the updated version of the application client having an identical class name as a corresponding dex class file in the current version of the application client and having modified content from the corresponding dex class file;
in accordance with a determination that the application patch file package exists for the application client locally at the computing device:
traversing, in sequence, the one or more dex class files in the application patch file package and inserting, into the application client, each of the one or more dex class files having a respective identical class name in front of each of existing dex class files of a corresponding application component in the current version of the application client having the respective identical class name; and
initializing the application client by (i) invoking each of the one or more dex class files having the respective identical class name and corresponding to the updated version of the application client and (ii) bypassing invocation of the corresponding dex class files in the current version of the application client having the identical class name.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
in accordance with a determination that the application patch file package does not exist for the application client locally at the computing device, completing initialization of the application client without updating the current version of the application client;
after completing the initialization of the application client without updating the current version of the application client, connecting to the application server to request new version information for the application client; and
in accordance with a determination that a new version of the application client exists at the application server based on the new version information obtained from the application server, downloading a latest patch file package for the application client from the application server, wherein the latest patch file package includes at least a first executable file generated from a first class file for which there is a difference between a latest version of the application client and the current version of the application client, and wherein the latest patch file package does not include at least a second executable file generated from a second class file for which the latest version of the application client and the current version of the application client do not have a difference.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
in accordance with a determination that the new version of the application client exists at the application server based on the new version information obtained from the application server, requesting configuration information regarding whether update requires a restart of the application client; and
in accordance with a determination that the update does not require a restart of the application client, storing the latest patch file package at the computing device for updating the application client during initialization when the application client is started next time, without interrupting operation of the application client.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
in accordance with a determination that the update requires a restart of the application client, prompting for user confirmation regarding whether to update the application client.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
in accordance with a determination that the application patch file package exists for the application client locally at the computing device,
performing security verification of the patch file package.

### Claim 6 (depends on 1)

The method of claim 1, wherein the one or more dex class files in the updated version of the application client do not overwrite any files of the current version of the application client at the computing device.

### Claim 7 (depends on 1)

The method of claim 1, further comprising updating the one or more corresponding dex class files in the current version of the application client with the one or more dex class files in the updated version of the application client without deleting the one or more corresponding dex class files.

### Claim 8

A computing device, comprising:
one or more processors;
memory; and
a plurality of instructions stored in the memory that, when executed by the one or more processors, cause the computing device to perform operations comprising:
detecting that an application client is started at the computing device, wherein the application client comprises a current version and includes one or more dex class files in the current version;
in response to detecting that the application client is started at the computing device, determining whether an application patch file package exists for the application client locally at the computing device, wherein:
the application patch file package is generated by an application server and downloaded to the computing device prior to the starting of the application client;
the application patch file package corresponds to an updated version of the application client; and
the updated version of the application client includes one or more dex class files, each dex class file having an identical class name as a corresponding dex class file in the current version of the application client and having modified content from the corresponding dex class file;
in accordance with a determination that the application patch file package exists for the application client locally at the computing device:
invoking a DexClassLoader to load the one or more dex class files included in the updated version of the application client and the one or more corresponding dex class files in the current version of the application client, including traversing, in sequence, the one or more dex class files in the application patch file package and inserting, into the application client, each of the one or more dex class files having a respective identical class name in front of each of existing dex class files of a corresponding application component in the current version of the application client having the respective identical class name; and
initializing the application client by (i) invoking each of the one or more dex class files having the respective class name and corresponding to the updated version of the application client and (ii) bypassing invocation of the corresponding dex class files in the current version of the application client having the identical class name.

### Claim 9 (depends on 8)

The computing device of claim 8, the operations further comprising:
in accordance with a determination that the application patch file package does not exist for the application client locally at the computing device, completing initialization of the application client without updating the current version of the application client;
after completing the initialization of the application client without updating the current version of the application client, connecting to the application server to request new version information for the application client; and
in accordance with a determination that a new version of the application client exists at the application server based on the new version information obtained from the application server, downloading a latest patch file package for the application client from the application server, wherein the latest patch file package includes at least a first executable file generated from a first class file for which there is a difference between a latest version of the application client and the current version of the application client, and wherein the latest patch file package does not include at least a second executable file generated from a second class file for which the latest version of the application client and the current version of the application client do not have a difference.

### Claim 10 (depends on 9)

The computing device of claim 9, the operations further comprising:
in accordance with a determination that the new version of the application client exists at the application server based on the new version information obtained from the application server, requesting configuration information regarding whether update requires a restart of the application client; and
in accordance with a determination that the update does not require a restart of the application client, storing the latest patch file package at the computing device for updating the application client during initialization when the application client is started next time, without interrupting operation of the application client.

### Claim 11 (depends on 10)

The computing device of claim 10, the operations further comprising:
in accordance with a determination that the update requires a restart of the application client, prompting for user confirmation regarding whether to update the application client.

### Claim 12 (depends on 8)

The computing device of claim 8, the operations further comprising:
in accordance with a determination that the application patch file package exists for the application client at the computing device:
prior to invoking the DexClassLoader to load the one or more dex class files, performing security verification of the patch file package.

### Claim 13 (depends on 8)

The computing device of claim 8, wherein the one or more dex class files in the updated version of the application client do not overwrite any files of the current version of the application client at the computing device.

### Claim 14 (depends on 8)

The computing device of claim 8, the operations further comprising updating the one or more corresponding dex class files in the current version of the application client with the one or more dex class files in the updated version of the application client without deleting the one or more corresponding dex class files.

### Claim 15

A non-transitory computer-readable storage medium storing a plurality of instructions configured for execution by a computing device having one or more processors, wherein the plurality of instructions cause the computing device to perform operations comprising:
detecting that an application client is started at the computing device, wherein the application client comprises a current version and includes one or more dex class files in the current version;
in response to detecting that the application client is started at the computing device, determining whether an application patch file package exists for the application client locally at the computing device, wherein:
the application patch file package is generated by an application server and downloaded to the computing device prior to the starting of the application client;
the application patch file package corresponds to an updated version of the application client; and
the updated version of the application client includes one or more dex class files, each dex class file having an identical class name as a corresponding dex class file in the current version of the application client and having modified content from the corresponding dex class file;
in accordance with a determination that the application patch file package exists for the application client locally at the computing device:
invoking a DexClassLoader to load the one or more dex class files included in the updated version of the application client and the one or more corresponding dex class files in the current version of the application client, including traversing, in sequence, the one or more dex class files in the application patch file package and inserting, into the application client, each of the one or more dex class files having a respective identical class name in front of each of existing dex class files of a corresponding application component in the current version of the application client having the respective identical class name; and
initializing the application client by (i) invoking each of the one or more dex class files having the respective class name and corresponding to the updated version of the application client and (ii) bypassing invocation of the corresponding dex class files in the current version of the application client having the identical class name.

### Claim 16 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, the operations further comprising:
in accordance with a determination that the application patch file package does not exist for the application client locally at the computing device, completing initialization of the application client without updating the current version of the application client;
after completing the initialization of the application client without updating the current version of the application client, connecting to the application server corresponding to the application client to request new version information for the application client; and
in accordance with a determination that a new version of the application client exists at the application server based on the new version information obtained from the application server, downloading a latest patch file package for the application client from the application server, wherein the latest patch file package includes at least a first executable file generated from a first class file for which there is a difference between a latest version of the application client and the current version of the application client, and wherein the latest patch file package does not include at least a second executable file generated from a second class file for which the latest version of the application client and the current version of the application client do not have a difference.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, the operations further comprising:
in accordance with a determination that the new version of the application client exists at the application server based on the new version information obtained from the application server, requesting configuration information regarding whether update requires a restart of the application client; and
in accordance with a determination that the update does not require a restart of the application client, storing the latest patch file package at the computing device for updating the application client during initialization when the application client is started next time, without interrupting operation of the application client.

### Claim 18 (depends on 17)

The non-transitory computer-readable storage medium of claim 17, the operations further comprising:
in accordance with a determination that the update requires a restart of the application client, prompting for user confirmation regarding whether to update the application client.

### Claim 19 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, the operations further comprising:
in accordance with a determination that the application patch file package exists for the application client at the computing device:
prior to invoking the DexClassLoader to load the one or more dex class files, performing security verification of the patch file package.

### Claim 20 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, the operations further comprising updating the one or more corresponding dex class files in the current version of the application client with the one or more dex class files in the updated version of the application client without deleting the one or more corresponding dex class files.
