IP Library Granted Patent US 12700057
Granted Patent B2
US 12700057 · App. 18/573,188 · Granted Aug 4, 2026

Image processing method and apparatus, reasonably storing incremental snapshot and full snapshot in snapshot chain, and electronic device and readable storage medium

Inventors: Chunguo Deng (Beijing, CN); Xinghua Zhang (Beijing, CN); Guanming Cai (Beijing, CN)
Assignee: Beijing Zitiao Network Technology Co., Ltd.
G06T11/60G06T1/60
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 12700057
App. No.
18/573,188
Granted
Aug 4, 2026
Kind
B2
Abstract

The present disclosure relates to an image processing method and apparatus, and an electronic device and a readable storage medium. In the method, by means of analyzing, during an image editing process, the proportion of difference image blocks corresponding to a first image, and the snapshot types of the last N snapshots in a snapshot chain that is generated according to consecutive image editing instructions, a storage mode of the first image is determined.

Claims (45)

1 . An image processing method, comprising:

obtaining an incremental snapshot corresponding to a first image; wherein the incremental snapshot comprises data of difference image patches between the first image and a second image, and the first image is obtained by editing the second image according to a first editing instruction;

determining that a storage method corresponding to the first image is to store a full snapshot corresponding to the first image in response to the proportion of difference image patches comprised in the incremental snapshot being greater than or equal to a preset threshold, or in response to all the N snapshots being incremental snapshots;

determining that the storage method corresponding to the first image is to store an incremental snapshot corresponding to the first image in response to the proportion of difference image patches comprised in the incremental snapshot being less than the preset threshold and the fact that the N snapshots comprise full snapshots; where N is an integer greater than or equal to 1; and

storing an incremental snapshot or a full snapshot corresponding to the first image into the snapshot chain according to the storage method corresponding to the first image.

2 . The method according to claim 1 , wherein the incremental snapshot comprises data of at least one difference image region; each difference image patch between the first image and the second image belongs to one of a plurality of difference image regions when the number of the difference image regions is plural.

3 . The method according to claim 2 , wherein the at least one difference image region is determined according to a continuity of difference image patches between the first image and the second image.

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

caching an incremental snapshot or a full snapshot corresponding to the first image into a memory space according to the storage method corresponding to the first image, wherein the memory space is used to cache M snapshots in the snapshot chain in a reversed temporal sequence, where M is an integer greater than or equal to 1, and M is less than or equal to N.

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

obtaining a target snapshot from the snapshot chain according to an undoing instruction for a third image; the target snapshot comprises a target full snapshot and all the snapshots between the target full snapshot and a snapshot corresponding to the third image; the target full snapshot is the first full snapshot in the snapshot chain in a reversed temporal sequence before the snapshot corresponding to the third image; and

restoring a fourth image according to the target snapshot, wherein the third image is obtained by editing the fourth image according to a second editing instruction.

6 . The method according to claim 5 , wherein the obtaining a target snapshot from the snapshot chain according to an undoing instruction for a third image comprises:

obtaining the target snapshot from the memory space if M snapshots cached in the memory space comprise the target snapshot;

reading some snapshots from an external storage space and writing the same into the memory space if M snapshots cached in the memory space do not comprise some snapshots of the target snapshot.

7 . An electronic device comprising: a memory, a processor, and computer program instructions;

wherein the memory is configured to store the computer program instructions; and

the processor is configured to execute the computer program instructions to implement an image processing method, the method comprising:

obtaining an incremental snapshot corresponding to a first image; wherein the incremental snapshot comprises data of difference image patches between the first image and a second image, and the first image is obtained by editing the second image according to a first editing instruction;

determining that a storage method corresponding to the first image is to store a full snapshot corresponding to the first image if the proportion of difference image patches comprised in the incremental snapshot is greater than or equal to a preset threshold, or all the N snapshots are incremental snapshots;

determining that the storage method corresponding to the first image is to store an incremental snapshot corresponding to the first image if the proportion of difference image patches comprised in the incremental snapshot is less than the preset threshold, and the N snapshots comprise full snapshots; where N is an integer greater than or equal to 1; and

storing an incremental snapshot or a full snapshot corresponding to the first image into the snapshot chain according to the storage method corresponding to the first image.

8 . The electronic device according to claim 7 , wherein the incremental snapshot comprises data of at least one difference image region; each difference image patch between the first image and the second image belongs to one of a plurality of difference image regions when the number of the difference image regions is plural.

9 . The electronic device according to claim 8 , wherein the at least one difference image region is determined according to a continuity of difference image patches between the first image and the second image.

10 . The electronic device according to claim 7 , wherein the method further comprises:

caching an incremental snapshot or a full snapshot corresponding to the first image into a memory space according to the storage method corresponding to the first image, wherein the memory space is used to cache M snapshots in the snapshot chain in a reversed temporal sequence, where M is an integer greater than or equal to 1, and M is less than or equal to N.

11 . The electronic device according to claim 10 , wherein the method further comprises:

obtaining a target snapshot from the snapshot chain according to an undoing instruction for a third image; the target snapshot comprises a target full snapshot and all the snapshots between the target full snapshot and a snapshot corresponding to the third image; the target full snapshot is the first full snapshot in the snapshot chain in a reversed temporal sequence before the snapshot corresponding to the third image; and

restoring a fourth image according to the target snapshot, wherein the third image is obtained by editing the fourth image according to a second editing instruction.

12 . The electronic device according to claim 11 , wherein the obtaining a target snapshot from the snapshot chain according to an undoing instruction for a third image comprises:

obtaining the target snapshot from the memory space if M snapshots cached in the memory space comprise the target snapshot;

reading some snapshots from an external storage space and writing the same into the memory space if M snapshots cached in the memory space do not comprise some snapshots of the target snapshot.

13 . A non-transitory readable storage medium comprising:

computer program instructions that, when executed by at least one processor of an electronic device, implement an image processing method, the method comprising:

obtaining an incremental snapshot corresponding to a first image; wherein the incremental snapshot comprises data of difference image patches between the first image and a second image, and the first image is obtained by editing the second image according to a first editing instruction;

determining that a storage method corresponding to the first image is to store a full snapshot corresponding to the first image if the proportion of difference image patches comprised in the incremental snapshot is greater than or equal to a preset threshold, or all the N snapshots are incremental snapshots;

determining that the storage method corresponding to the first image is to store an incremental snapshot corresponding to the first image if the proportion of difference image patches comprised in the incremental snapshot is less than the preset threshold, and the N snapshots comprise full snapshots; where N is an integer greater than or equal to 1; and

storing an incremental snapshot or a full snapshot corresponding to the first image into the snapshot chain according to the storage method corresponding to the first image.

14 . The non-transitory readable storage medium according to claim 13 , wherein the incremental snapshot comprises data of at least one difference image region; each difference image patch between the first image and the second image belongs to one of a plurality of difference image regions when the number of the difference image regions is plural.

15 . The non-transitory readable storage medium according to claim 14 , wherein the at least one difference image region is determined according to a continuity of difference image patches between the first image and the second image.

16 . The non-transitory readable storage medium according to claim 13 , wherein the method further comprises:

caching an incremental snapshot or a full snapshot corresponding to the first image into a memory space according to the storage method corresponding to the first image, wherein the memory space is used to cache M snapshots in the snapshot chain in a reversed temporal sequence, where M is an integer greater than or equal to 1 , and M is less than or equal to N.

17 . The method according to claim 16 , wherein the method further comprises:

obtaining a target snapshot from the snapshot chain according to an undoing instruction for a third image; the target snapshot comprises a target full snapshot and all the snapshots between the target full snapshot and a snapshot corresponding to the third image; the target full snapshot is the first full snapshot in the snapshot chain in a reversed temporal sequence before the snapshot corresponding to the third image; and

restoring a fourth image according to the target snapshot, wherein the third image is obtained by editing the fourth image according to a second editing instruction.