IP Library Granted Patent US 12681720
Granted Patent B2
US 12681720 · App. 17/635,300 · Granted Jul 14, 2026

Patch release method, server, and terminal device

Inventors: Wenjie Ren (Beijing, CN); Qiaosheng Han (Wuhan, CN); Yonghong Yin (Beijing, CN); Yingwei Li (Beijing, CN)
Assignee: Huawei Technologies Co., Ltd.
G06F8/658
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12681720
App. No.
17/635,300
Granted
Jul 14, 2026
Kind
B2
Abstract

When a repair problem exists in a case of a fully loaded partition, or when a feature of a terminal device needs to be expanded but there is no remaining space in a related partition, the terminal device may search for and download a patch file from a server, and a compressed empty device (loop) is used to expand the feature. In some conditions, the empty loop device and the fully loaded partition may be combined to form a new device. In some other conditions, based on a packaging technology in a disk block dimension, a changed file is repackaged in the disk block dimension.

Claims (47)

1 . A patch release method, wherein the method comprises:

obtaining, by a server, a patch file;

dividing, by the server, the patch file into a plurality of patch blocks;

performing, by the server, differential processing to determine a difference between the patch file and an original file in a terminal device;

rearranging, by the server, the plurality of patch blocks of the patch file to reduce a differential offset based on one of a same timestamp used to package the patch file and the original file, or a same random value used to obfuscate the patch file and the original file;

determining, by the server, a target patch block from the plurality of patch blocks, wherein the target patch block comprises content that is in the patch file and that is added or changed relative to the original file in the terminal device;

repackaging, by the server, the target patch block in a disk block dimension to produce an update file, wherein the update file is smaller in size than the patch file and includes the target patch block in the disk block dimension; and

sending, by the server, the update file to the terminal device.

2 . The method according to claim 1 , wherein the update file further comprises information about a location of the target patch block in the patch file.

3 . The method according to claim 2 , wherein the location of the target patch block in the patch file corresponds to a location in the patch file.

4 . The method according to claim 1 , wherein the method further comprises:

dividing, by the server, the patch file into at least two subfiles based on a first storage space, wherein the first storage space is a storage space used by the terminal device to store the original file corresponding to the patch file, and a size of a storage space occupied by a first subfile in the at least two subfiles is less than or equal to a size of the first storage space; and

sending, by the server, the at least two subfiles and first information to the terminal device, wherein the first information is used to indicate to combine the at least two subfiles to form a virtual machine device for use.

5 . The method according to claim 1 , wherein the method further comprises:

receiving, by the server, second information sent by the terminal device, wherein the second information is used to indicate that a difference between a size of a first storage space and a size of a storage space occupied by the original file is less than or equal to a preset threshold value.

6 . The method according to claim 5 ,

wherein the second information is used to indicate the size of the first storage space.

7 . The patch release method according to claim 1 , wherein the rearranging is based on the same random value used to obfuscate the patch file and the original file.

8 . A patch release method, applied in a terminal device that comprises a transceiver and a processor, wherein the method comprises:

receiving, by the transceiver of the terminal device, an update file sent by a server, wherein the update file comprises a target patch block having been determined by the server, the target patch block comprises content that is in a patch file and that is added or changed relative to an original file in the terminal device, wherein the patch file is divided into a plurality of patch blocks and the plurality of patch blocks having been rearranged by the server, based on one of a same timestamp used to package the patch file and the original file, or a map of a compilation of the original file and a map of a compilation of the patch file, to reduce a differential offset between the patch file and the original file in the terminal device, and the target patch block is determined from the plurality of patch blocks, the target patch block having been repackaged by the server in a disk block dimension, and wherein the update file is smaller in size than the patch file and includes the target patch block in the disk block dimension;

writing, by the processor of the terminal device, the update file into an added disk block based on determining that a partition of the terminal device is fully loaded;

determining, by the processor of the terminal device, the patch file based on the update file and the original file; and

performing, by the processor of the terminal device, updating based on the patch file.

9 . The method according to claim 8 , wherein the update file further comprises information about a location of the target patch block in the patch file.

10 . The method according to claim 9 , wherein the location of the target patch block in the patch file corresponds to a location in the patch file.

11 . The method according to claim 8 , wherein the method comprises:

receiving, by the transceiver of the terminal device, at least two subfiles and first information that are sent by the server, wherein the at least two subfiles are obtained by dividing the patch file, a size of a storage space occupied by a first subfile in the at least two subfiles is less than or equal to a size of a first storage space, and the first storage space is a storage space used by the terminal device to store the original file corresponding to the patch file;

storing, by the processor of the terminal device, the first subfile in the first storage space, and storing, in at least one second storage space, a file other than the first subfile in the at least two subfiles; and

when running a program corresponding to the patch file, combining, by the processor of the terminal device, the at least two subfiles to form a virtual machine device.

12 . The method according to claim 8 , wherein the method further comprises:

sending, by the transceiver of the terminal device, second information to the server, wherein the second information is used to indicate that a difference between a size of a first storage space and a size of a storage space occupied by the original file is less than or equal to a preset threshold value.

13 . The method according to claim 12 , wherein the second information is used to indicate the size of the first storage space.

14 . A patch release apparatus, wherein the apparatus comprises:

a transceiver, configured to receive an update file sent by a server, wherein the update file comprises a target patch block having been determined by the server, the target patch block comprises content that is in a patch file and that is added or changed relative to an original file in the apparatus, wherein the patch file is divided into a plurality of patch blocks and the plurality of patch blocks having been rearranged by the server, based on one of a same timestamp used to package the patch file and the original file, or a same random value used to obfuscate the patch file and the original file, to reduce a differential offset between the patch file and the original file in the terminal device, and the target patch block is determined from the plurality of patch blocks, the target patch block having been repackaged by the server in a disk block dimension, and wherein the update file is smaller in size than the patch file and includes the target patch block in the disk block dimension; and

a processor, configured to:

write the update file into an added disk block based on determining that a partition of the apparatus is fully loaded;

determine the patch file based on the update file and the original file; and

perform updating based on the patch file.

15 . The apparatus according to claim 14 , wherein the update file further comprises information about a location of the target patch block in the patch file.

16 . The apparatus according to claim 15 , wherein the location of the target patch block in the patch file corresponds to a location in the patch file.

17 . The apparatus according to claim 14 , wherein the transceiver is further configured to:

receive at least two subfiles and first information that are sent by the server, wherein the at least two subfiles are obtained by the server dividing the patch file, a size of a storage space occupied by a first subfile in the at least two subfiles is less than or equal to a size of a first storage space, and the first storage space is a storage space used by the apparatus to store the original file corresponding to the patch file; and

the processor is further configured to:

store the first subfile in the first storage space, and store, in at least one second storage space, a file other than the first subfile in the at least two subfiles; and

when running a program corresponding to the patch file, combine the at least two subfiles to form a virtual machine device.

18 . The apparatus according to claim 14 , wherein the transceiver is further configured to send second information to the server, wherein the second information is used to indicate that a difference between a size of a first storage space and a size of a storage space occupied by the original file is less than or equal to a preset threshold.

19 . The apparatus according to claim 18 , wherein the second information is used to indicate the size of the first storage space.