# US 2024/0004642 A1 · Patch Reuse Method and System, and Electronic Device

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

- Number: US 2024/0004642 A1
- Document ID: US20240004642A1
- Status: Published application
- Kind: A1
- Application number: 18/247,132
- Filed: 2021-09-17
- Published: 2024-01-04
- Earliest claimed: 2020-09-30
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Wenjie Ren; Hongxi Li; Yonghong Yin; Yingwei Li
- Web page: https://patentgrep.com/patent/US20240004642A1

## CPC

- G06F 8/658: Incremental updates; Differential updates
- G06F 8/36: Software reuse
- H04L 67/06: specially adapted for file transfer, e.g. file transfer protocol [FTP]
- H04L 67/12: specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
- H04L 67/52: specially adapted for the location of the user terminal
- H04L 67/55: Push-based network services
- 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

This application discloses a patch reuse method, applied to a system that includes a plurality of devices and a patch server, where the patch server is configured to provide patches for the plurality of devices, the plurality of devices are located in a same local area network, and the plurality of devices include at least a first electronic device and a second electronic device. The method includes: The first electronic device sends a first patch query request including reused patch matching information to the patch server, where the reused patch matching information includes first patch matching information of the first electronic device and second patch matching information of the second electronic device; and the patch server sends, based on the reused patch matching information, a reused patch package including a patch file that is required by each device to the first electronic device.

## Claims

### Claim at position 1

-18. (canceled)

### Claim 19

A method, applied to a system comprising a plurality of devices and a patch server, wherein the patch server provides patches for the plurality of devices, the plurality of devices are located in a same local area network, the plurality of devices comprise at least a first electronic device and a second electronic device, and the method comprises:
sending, by the first electronic device, a first patch query request to the patch server, wherein the first patch query request comprises reused patch matching information, the reused patch matching information comprises first patch matching information of the first electronic device and second patch matching information of the second electronic device, and each piece of patch matching information corresponds to a matching patch file;
generating, by the patch server, a reused patch package based on the first patch query request, and sending the reused patch package to the first electronic device, wherein the reused patch package comprises a first patch file corresponding to the first patch matching information and a second patch file corresponding to the second patch matching information;
receiving, by the first electronic device, the reused patch package, and extracting the first patch file and the second patch file; and
obtaining, by the second electronic device, the second patch file from the first electronic device.

### Claim 20 (depends on 19)

The method according to claim 19, wherein generating, by the patch server, the reused patch package based on the first patch query request comprises:
determining, by the patch server, the first patch file corresponding to the first patch matching information, and determining the second patch file corresponding to the second patch matching information; and
using, by the patch server, a same part in the first patch file and the second patch file as a common part, using parts that are different in the first patch file and the second patch file as a differential part, and using the common part and the differential part as the reused patch package.

### Claim 21 (depends on 20)

The method according to claim 20, further comprising:
after receiving, by the first electronic device, the reused patch package, decompressing, by the first electronic device, the reused patch package to obtain the common patch and the differential patch; and
performing, by the first electronic device, patch restoration and synthesis processing based on the common patch and the differential patch to separately obtain the first patch file and the second patch file.

### Claim 22 (depends on 19)

The method according to claim 19, further comprising:
after generating, by the patch server, the reused patch package based on the first patch query request, sending, by the patch server, a patch push message that pushes the reused patch package to the first electronic device;
after the first electronic device receives the patch push message, when the first electronic device detects an operation that a user confirms downloading of the reused patch package, sending, by the first electronic device, a first patch obtaining request to the patch server; and
after the patch server receives the first patch obtaining request, sending, by the patch server, the reused patch package to the first electronic device.

### Claim 23 (depends on 19)

The method according to claim 19, wherein the first electronic device and the second electronic device are trusted network devices that belong to the same local area network.

### Claim 24 (depends on 19)

The method according to claim 19, wherein sending, by the first electronic device, the first patch query request to the patch server comprises:
sending, by the second electronic device, a second patch query request to the first electronic device, wherein the second patch query request comprises the second patch matching information of the second electronic device, and after the first electronic device receives the second patch query request, sending, by the first electronic device, the first patch query request to the patch server; or
sending, by the first electronic device, the first patch query request to the patch server based on a preset patch query period; or
after the first electronic device receives a patch query instruction of a user, sending, by the first electronic device, the first patch query request to the patch server.

### Claim 25 (depends on 19)

The method according to claim 19, wherein each piece of patch matching information comprises device type information, device software version information, and patch type information of the respective matching patch file.

### Claim 26 (depends on 19)

The method according to claim 19, wherein the plurality of devices further comprise a third electronic device, and the method further comprises:
obtaining, by the third electronic device, a network identifier of the local area network; and when determining, based on the network identifier, that the local area network in which the third electronic device is located is a trusted network, obtaining, by the third electronic device, the second patch matching information of the second electronic device that is in the local area network and that has a same device type as that of the third electronic device; and
when the third electronic device determines that the second patch matching information is the same as third patch matching information of the third electronic device, obtaining, by the third electronic device, the second patch file from the second electronic device.

### Claim 27 (depends on 26)

The method according to claim 26, wherein determining, by the third electronic device, that the local area network is the trusted network comprises:
when a trusted network identifier in the third electronic device comprises the network identifier that is obtained by the third electronic device and that is of the local area network, determining, by the third electronic device, that the local area network is a trusted network.

### Claim 28 (depends on 26)

The method according to claim 26, further comprising:
when the third electronic device determines that the second electronic device has installed the second patch file, obtaining, by the third electronic device, the second patch file from the second electronic device.

### Claim 29 (depends on 19)

The method according to claim 19, wherein the plurality of devices further comprise a third electronic device, and the method further comprises:
obtaining, by the third electronic device, a network identifier of the local area network, and when determining, based on the network identifier, that the local area network in which the third electronic device is located is an untrusted network, sending, by the third electronic device, a third patch query request to the first electronic device, wherein the third patch query request comprises third patch matching information of the third electronic device;
when the first electronic device determines, based on the third patch matching request, that the reused patch package comprises a patch file corresponding to the third electronic device, sending, by the first electronic device, the reused patch package to the third electronic device; and
receiving, by the third electronic device, the reused patch package, and extracting a patch file that is to be installed on the third electronic device from the reused patch package.

### Claim 30 (depends on 19)

The method according to claim 19, wherein the plurality of devices further comprise a third electronic device, and the method further comprises:
obtaining, by the third electronic device, a network identifier of the local area network, and when it is determined, based on the network identifier, that the local area network in which the third electronic device is located is an untrusted network, sending, by the third electronic device, an obtaining request that requests the reused patch matching information to the first electronic device, to obtain the reused patch matching information;
when the third electronic device determines, based on the reused patch matching information, that the reused patch matching information comprises third patch matching information corresponding to the third electronic device, sending, by the third electronic device, a reused patch obtaining request to the first electronic device;
sending, by the first electronic device, the reused patch package to the third electronic device based on the reused patch obtaining request; and
receiving, by the third electronic device, the reused patch package, and extracting a patch file that is to be installed on the third electronic device.

### Claim 31

A method, applied to a first electronic device, the method comprising:
sending a first patch query request to a patch server, wherein the first patch query request comprises reused patch matching information, the reused patch matching information comprises first patch matching information of the first electronic device and second patch matching information of a second electronic device that belongs to a same local area network as the first electronic device, and each piece of the patch matching information corresponds to a matching patch file;
receiving a reused patch package that is sent by the patch server and that is generated based on the first patch query request, wherein the reused patch package comprises a first patch file corresponding to the first patch matching information and a second patch file corresponding to the second patch matching information; and
extracting, from the reused patch package, the first patch file and the second patch file, and sending the second patch file to the second electronic device.

### Claim 32 (depends on 31)

The method according to claim 31, further comprising:
after receiving the reused patch package, decompressing, by the first electronic device, the reused patch package to obtain a common patch and a differential patch; and
performing patch restoration and synthesis processing based on the common patch and the differential patch to separately obtain the first patch file and the second patch file.

### Claim 33 (depends on 31)

The method according to claim 31, further comprising:
receiving a patch push message; and
after receiving the patch push message, when it is detected that an operation that a user confirms downloading of the reused patch package, sending a first patch obtaining request to the patch server.

### Claim 34 (depends on 31)

The method according to claim 31, wherein the first electronic device and the second electronic device are trusted network devices that belong to the same local area network.

### Claim 35

An electronic device, comprising:
a memory, configured to store a computer program, wherein the computer program comprises program instructions; and
a controller, configured to execute the program instructions, and executing the program instructions enables the electronic device to:
send a first patch query request to a patch server, wherein the first patch query request comprises reused patch matching information, the reused patch matching information comprises first patch matching information of the electronic device and second patch matching information of a second electronic device that belongs to a same local area network as the electronic device, and each piece of the patch matching information corresponds to a matching patch file;
receive a reused patch package that is sent by the patch server and that is generated based on the first patch query request, wherein the reused patch package comprises a first patch file corresponding to the first patch matching information and a second patch file corresponding to the second patch matching information; and
extract, from the reused patch package, the first patch file and the second patch file, and send the second patch file to the second electronic device.

### Claim 36 (depends on 35)

The electronic device according to claim 35, wherein executing the program instructions enables the electronic device to:
after receiving the reused patch package, decompress the reused patch package to obtain a common patch and a differential patch; and
perform patch restoration and synthesis processing based on the common patch and the differential patch to separately obtain the first patch file and the second patch file.

### Claim 37 (depends on 35)

The electronic device according to claim 35, wherein executing the program instructions enables the electronic device to:
receive a patch push message; and
after receiving the patch push message, when it is detected that an operation that a user confirms downloading of the reused patch package, send a first patch obtaining request to the patch server.

### Claim 38 (depends on 35)

The electronic device according to claim 35, wherein the electronic device and the second electronic device are trusted network devices that belong to the same local area network.
