# US 2026/0300224 A1 · Method for processing metadata of a storage engine, electronic device and storage medium

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

- Number: US 2026/0300224 A1
- Document ID: US20260300224A1
- Status: Published application
- Kind: A1
- Application number: 19/369,066
- Filed: 2025-10-24
- Published: 2026-10-01
- Earliest claimed: 2025-04-01
- Assignees: Beijing Volcano Engine Technology Co., Ltd.
- Applicants: Beijing Volcano Engine Technology Co., Ltd.
- Inventors: Zhihong GUO; Jiale GAO; Liming FANG; Jinxin LIU; Chengyu DONG
- Web page: https://patentgrep.com/patent/US20260300224A1

## CPC

- G06F 16/128: {Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion (error detection or correction of the data by redundancy in operations or in hardware G06F11/14, G06F11/16)}
- G06F 16/162: {Delete operations (erasing in storage systems G06F3/0652)}
- G06F 16/1847: {specifically adapted to static storage, e.g. adapted to flash memory or SSD}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for processing metadata of a storage engine, an electronic device and a storage medium are provided. The method includes: creating a checkpoint of each unpersisted metadata chunk in a memory used by the storage engine, persistently storing respective checkpoints in a meta segment of a non-volatile storage medium in sequence, and recording checkpoint index information of the respective checkpoints in the meta segment in the memory; where each metadata chunk includes metadata of a chunk managed by the storage engine; and in response to unpersisted checkpoint index information in the memory reaching a preset data amount, persistently storing the unpersisted checkpoint index information in the meta segment by means of a checkpoint index information chunk, and adding a pointer to a previous checkpoint index information chunk into the checkpoint index information chunk.

## Claims

### Claim 1

A method for processing metadata of a storage engine, comprising:
creating a checkpoint of each unpersisted metadata chunk in a memory used by the storage engine, persistently storing respective checkpoints in a meta segment of a non-volatile storage medium in sequence, and recording checkpoint index information of the respective checkpoints in the meta segment in the memory, wherein each metadata chunk comprises metadata of a chunk managed by the storage engine; and
in response to unpersisted checkpoint index information in the memory reaching a preset data amount, persistently storing the unpersisted checkpoint index information in the meta segment by means of a checkpoint index information chunk, and adding a pointer to a previous checkpoint index information chunk into the checkpoint index information chunk.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
in response to the meta segment being full, adding a pointer to a last checkpoint index information chunk into segment footer of the meta segment, wherein the pointer to the last checkpoint index information chunk is used to find the last checkpoint index information chunk.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
in response to an instruction to restore the metadata being triggered, finding the last checkpoint index information chunk from the meta segment;
finding, according to checkpoint index information in the last checkpoint index information chunk, respective checkpoints corresponding to the checkpoint index information from the meta segment, and loading the respective checkpoints into the memory to restore the metadata chunks corresponding to the respective checkpoints to the memory; and
finding the previous checkpoint index information chunk according to the pointer to the previous checkpoint index information chunk comprised in the last checkpoint index information chunk.

### Claim 4 (depends on 3)

The method of claim 3, wherein the finding the last checkpoint index information chunk from the meta segment comprises:
in response to a pointer to the last checkpoint index information chunk existing in the segment footer of the meta segment, finding the last checkpoint index information chunk according to the pointer to the last checkpoint index information chunk; or
in response to the pointer to the last checkpoint index information chunk not existing in the segment footer of the meta segment, scanning the meta segment from back to front to find the last checkpoint index information chunk.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
before the last checkpoint index information chunk is found, loading checkpoints obtained by scanning the meta segment from back to front into the memory.

### Claim 6 (depends on 3)

The method of claim 3, further comprising:
acquiring a first log data set after a creation time of a last checkpoint in the meta segment; and
replaying log data in the first log data set in sequence according to a time sequence, to generate, in the memory, metadata after the creation time of the last checkpoint.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
scanning, in a data segment of the storage engine, data written after the creation time of the last checkpoint, to generate, in the memory, the data written after the creation time of the last checkpoint into corresponding metadata.

### Claim 8 (depends on 3)

The method of claim 3, further comprising:
persistently storing, in the non-volatile storage medium, a mapping relationship between an internal identification of the chunk in the storage engine and an external identification of the chunk;
wherein the finding, according to the checkpoint index information in the last checkpoint index information chunk, respective checkpoints corresponding to the checkpoint index information from the meta segment and loading the respective checkpoints into the memory comprises:
restoring the mapping relationship to the memory; and
finding, according to the checkpoint index information in the last checkpoint index information chunk, the respective checkpoints corresponding to the checkpoint index information from the meta segment, screening valid checkpoints according to the mapping relationship, and loading the valid checkpoints into the memory.

### Claim 9 (depends on 3)

The method of claim 3, further comprising:
in response to an instruction to exit the storage engine, creating a checkpoint of each of all unpersisted metadata chunks in the memory, persistently storing respective checkpoints into the meta segment in sequence, adding a first identification after a last checkpoint, and then executing the instruction to exit the storage engine, wherein the first identification is used to represent that the storage engine normally exits;
in response to the instruction to restore the metadata being triggered, scanning the meta segment from back to front, and in response to the first identification being detected, loading the checkpoints in the meta segment into the memory to restore a full amount of metadata in the memory; and
adding a second identification after the first identification, wherein the second identification is used to represent that the first identification is invalid.

### Claim 10 (depends on 3)

The method of claim 3, further comprising:
comparing a write time of each chunk in a data segment of the storage engine with a creation time of a checkpoint corresponding to each chunk;
in response to the write time of all chunks being earlier than the creation time of checkpoints corresponding to all chunks, loading first data index information in the checkpoints corresponding to all chunks into the memory; or
in response to a write time of at least one chunk being not earlier than the creation time of at least one checkpoint corresponding to the at least one chunk, loading first data index information in the at least one checkpoint and second data index information of data written into the storage engine after a creation time of a last checkpoint in the meta segment into the memory.

### Claim 11 (depends on 10)

The method of claim 10, wherein the loading first data index information in the at least one checkpoint and second data information index information of data written into the storage engine after the creation time of the last checkpoint in the meta segment into the memory comprises:
scanning the data segment of the storage engine to acquire the second data index information and loading the second data index information into the memory; and
in response to any operation instruction for any target data in the data segment being received and in response to data index information of the target data not existing in the memory, determining a target checkpoint in which the data index information of the target data is located, loading the first data index information in the target checkpoint into the memory, and fusing the first data index information with the second data index information.

### Claim 12 (depends on 11)

The method of claim 11, wherein the data segment comprises data of the storage engine and multiple data index information chunks, and the multiple data index information chunks are scattered in the data segment, and any data index information chunk comprises data index information of part of data and a pointer to a previous data index information chunk;
the scanning the data segment of the storage engine to acquire the second data index information and loading the second data index information into the memory comprises:
scanning the data segment from back to front until a second last data index information chunk in the data segment is scanned, and according to the pointer to the previous data index information chunk, finding remaining data index information chunks in the data segment forward in turn;
acquiring data index information of data after the second last data index information chunk; and
screening data index information of data written into the data segment after the creation time of the last checkpoint from the data index information of the data after the second last data index information chunk, the data index information comprised in the second last data index information chunk and the data index information comprised in the remaining data index information chunks, and loading the data index information of data written into the data segment after the creation time of the last checkpoint into the memory as the second data index information.

### Claim 13 (depends on 3)

The method of claim 3, further comprising:
acquiring first garbage amount information comprised in metadata of a data segment of the storage engine;
acquiring a second log data set after a creation time of the metadata of the data segment; and
determining second garbage amount information after the creation time of the metadata of the data segment according to log data in the second log data set, and supplementing the second garbage amount information to the first garbage amount information.

### Claim 14

An electronic device, comprising: a processor and a memory;
wherein the memory stores a computer-executable instruction; and
the processor executes the computer-executable instruction stored in the memory, to enable the processor to execute a method for processing metadata of a storage engine, wherein the method comprises:
creating a checkpoint of each unpersisted metadata chunk in a memory used by the storage engine, persistently storing respective checkpoints in a meta segment of a non-volatile storage medium in sequence, and recording checkpoint index information of the respective checkpoints in the meta segment in the memory, wherein each metadata chunk comprises metadata of a chunk managed by the storage engine; and
in response to unpersisted checkpoint index information in the memory reaching a preset data amount, persistently storing the unpersisted checkpoint index information in the meta segment by means of a checkpoint index information chunk, and adding a pointer to a previous checkpoint index information chunk into the checkpoint index information chunk.

### Claim 15 (depends on 14)

The electronic device of claim 14, wherein the method further comprises:
in response to the meta segment being full, adding a pointer to a last checkpoint index information chunk into segment footer of the meta segment, wherein the pointer to the last checkpoint index information chunk is used to find the last checkpoint index information chunk.

### Claim 16 (depends on 14)

The electronic device of claim 14, wherein the method further comprises:
in response to an instruction to restore the metadata being triggered, finding the last checkpoint index information chunk from the meta segment;
finding, according to checkpoint index information in the last checkpoint index information chunk, respective checkpoints corresponding to the checkpoint index information from the meta segment, and loading the respective checkpoints into the memory to restore the metadata chunks corresponding to the respective checkpoints to the memory; and
finding the previous checkpoint index information chunk according to the pointer to the previous checkpoint index information chunk comprised in the last checkpoint index information chunk.

### Claim 17 (depends on 16)

The electronic device of claim 16, wherein the finding the last checkpoint index information chunk from the meta segment comprises:
in response to a pointer to the last checkpoint index information chunk existing in the segment footer of the meta segment, finding the last checkpoint index information chunk according to the pointer to the last checkpoint index information chunk; or
in response to the pointer to the last checkpoint index information chunk not existing in the segment footer of the meta segment, scanning the meta segment from back to front to find the last checkpoint index information chunk.

### Claim 18 (depends on 17)

The electronic device of claim 17, wherein the method further comprises:
before the last checkpoint index information chunk is found, loading checkpoints obtained by scanning the meta segment from back to front into the memory.

### Claim 19 (depends on 16)

The electronic device of claim 16, wherein the method further comprises:
acquiring a first log data set after a creation time of a last checkpoint in the meta segment; and
replaying log data in the first log data set in sequence according to a time sequence, to generate, in the memory, metadata after the creation time of the last checkpoint.

### Claim 20

A non-transitory computer-readable storage medium, wherein a computer-executable instruction is stored in the non-transitory computer-readable storage medium, and when the computer-executable instruction is executed by a processor, a method for processing metadata of a storage engine is implemented, wherein the method comprises:
creating a checkpoint of each unpersisted metadata chunk in a memory used by the storage engine, persistently storing respective checkpoints in a meta segment of a non-volatile storage medium in sequence, and recording checkpoint index information of the respective checkpoints in the meta segment in the memory, wherein each metadata chunk comprises metadata of a chunk managed by the storage engine; and
in response to unpersisted checkpoint index information in the memory reaching a preset data amount, persistently storing the unpersisted checkpoint index information in the meta segment by means of a checkpoint index information chunk, and adding a pointer to a previous checkpoint index information chunk into the checkpoint index information chunk.
