US 12,411,804 B2
Data compaction method and device
Kun Xue, XiAn (CN); Fei Dong, XiAn (CN); and Yangxu Zhou, XiAn (CN)
Assigned to SAMSUNG ELECTRONICS CO., LTD., Suwon-si (KR)
Filed by SAMSUNG ELECTRONICS CO., LTD., Suwon-si (KR)
Filed on Apr. 15, 2024, as Appl. No. 18/635,755.
Claims priority of application No. 202310612577.7 (CN), filed on May 26, 2023.
Prior Publication US 2024/0394221 A1, Nov. 28, 2024
Int. Cl. G06F 17/00 (2019.01); G06F 7/00 (2006.01); G06F 7/16 (2006.01); G06F 16/13 (2019.01); G06F 16/185 (2019.01)
CPC G06F 16/13 (2019.01) [G06F 7/16 (2013.01); G06F 16/185 (2019.01)] 17 Claims
OG exemplary drawing
 
1. A data compaction method comprising:
determining, by an electronic device, a plurality of Sorted String Table (SSTable) files on which a compaction operation is to be performed among SSTable files stored in a storage device connected to the electronic device, wherein data in the SSTable files stored in the storage device is stored based on a Log Structured Merge Tree (LSM-Tree) mechanism;
based on receiving the plurality of SSTable files from the storage device, performing, by the electronic device, merge sorting on data in data blocks of the plurality of SSTable files based on indexes of the data in the data blocks of the plurality of SSTable files, to obtain reconstructed data blocks; and
sending, by the electronic device, the reconstructed data blocks to the storage device, wherein the reconstructed data blocks are used by the storage device to obtain reconstructed SSTable files,
wherein each SSTable file comprises a data block and an index block, and indexes in each index block correspond to data in the data block corresponding to the index block.