# US 2021/0004177 A1 · Storage device storing data on key-value basis and operating method thereof

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

- Number: US 2021/0004177 A1
- Document ID: US20210004177A1
- Status: Published application
- Kind: A1
- Application number: 16/844,119
- Filed: 2020-04-09
- Published: 2021-01-07
- Earliest claimed: 2019-07-05
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Byungki Lee; Satish Kumar; Jaeju Kim
- Web page: https://patentgrep.com/patent/US20210004177A1

## CPC

- G06F 3/0655: {Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/0638: {Organizing or formatting or addressing of data}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 16/22: Indexing; Data structures therefor; Storage structures
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A storage device includes a controller configured to: receive, from a host, a plurality of key-value pairs, separate a key from each of the plurality of key-value pairs and a value therefrom, and generate a first key stream by merging a plurality of keys separated from the plurality of key-value pairs, and non-volatile memory configured to store the first key stream. The first key stream is stored, separately from the value separated from each of the plurality of key-value pairs, in the non-volatile memory.

## Claims

### Claim 1

A storage device comprising:
a controller configured to:
receive, from a host, a plurality of key-value pairs,
separate a key from each of the plurality of key-value pairs and a value therefrom, and
generate a first key stream by merging a plurality of keys separated from the plurality of key-value pairs; and
non-volatile memory configured to store the first key stream,
wherein the first key stream is stored, separately from the value separated from each of the plurality of key-value pairs, in the non-volatile memory.

### Claim 2 (depends on 1)

The storage device of claim 1, wherein
the controller is further configured to generate the first key stream by merging a key of a corresponding one of the plurality of key-value pairs with an index corresponding to a value of the corresponding one of the plurality of key-value pairs.

### Claim 3 (depends on 1)

The storage device of claim 1, wherein
the controller, in response to a compaction command from the host, reads the first key stream and a second key stream from the non-volatile memory;
generates a third key stream by merging the first key stream with the second key stream; and
stores the third key stream in the non-volatile memory.

### Claim 4 (depends on 3)

The storage device of claim 3, wherein
the controller is further configured to generate a value stream by merging a plurality of values separated from the plurality of key-value pairs, and to store the value stream in the non-volatile memory, and
the value stream is stored, separately from the first key stream, in the non-volatile memory.

### Claim 5 (depends on 3)

The storage device of claim 3, wherein
the controller generates the third key stream by merging first valid keys of the first key stream and second valid keys of the second key stream, and
each of the first and second valid keys correspond to a value to which an erase command is not issued by the host, among values.

### Claim 6 (depends on 5)

The storage device of claim 5, further comprising:
a volatile memory configured to store a hash table and a value table, the hash table comprising physical addresses of the first to third key streams in the non-volatile memory, and the value table comprising a physical address of the value stream in the non-volatile memory.

### Claim at position 7

-10. (canceled)

### Claim 11

An operating method of a storage device which comprises non-volatile memory and a controller controlling the non-volatile memory,
the operating method comprising:
receiving, by the controller, a plurality of key-value pairs;
generating, by the controller, a first key stream by extracting a key from each of the plurality of key-value pairs; and
storing, by the controller, the first key stream in the non-volatile memory.

### Claim 12 (depends on 11)

The operating method of claim 11, wherein
the generating of the first key stream comprises:
generating an index for a value of a corresponding one of the plurality of key-value pairs; and
merging a key of the corresponding one of the plurality of key-value pairs with the index.

### Claim 13 (depends on 11)

The operating method of claim 11, further comprising:
generating, by the controller, a value stream by extracting a value from each of the plurality of key-value pairs; and
storing, by the controller, the value stream in the non-volatile memory.

### Claim 14 (depends on 11)

The operating method of claim 11, further comprising a compaction operation performed by the controller, the compaction operation including:
reading, from the non-volatile memory, the first key stream and a second key stream;
generating a third key stream by merging the first key stream with the second key stream; and
storing the third key stream in the non-volatile memory.

### Claim 15 (depends on 14)

The operating method of claim 14, wherein
the generating of the third key stream comprises:
generating the third key stream by extracting first valid keys from the first key stream and second valid keys from the second key stream,
wherein each of the first and second valid keys corresponds to a value to which an erase command is not issued by a host, among a plurality of values.

### Claim 16 (depends on 15)

The operating method of claim 15, further comprising:
generating, by the controller, a hash table comprising information about a storage location of at least one of the first to third key streams in the non-volatile memory; and
updating, by the controller, the hash table with invalid keys corresponding to invalid values, to which the erase command is issued by the host.

### Claim 17 (depends on 16)

The operating method of claim 16, further comprising:
generating, by the controller, a value table comprising physical addresses for the plurality of values and at least one validity bit each of which indicates whether a corresponding value is valid; and
updating, by the controller, the value table with validity bits for values corresponding to the invalid keys.

### Claim 18 (depends on 17)

The operating method of claim 17, further comprising:
performing, by the controller, garbage collection on the values corresponding to the invalid keys by using the at least one validity bit of the value table.

### Claim 19 (depends on 18)

The operating method of claim 18, further comprising:
generating, by the controller, a value table which comprises:
a physical address for at least one value comprised in the value stream; and
a plurality of validity bits indicating whether the plurality of values comprised in the value stream are valid.

### Claim 20

An operating method of a storage device which comprises non-volatile memory and a controller controlling the non-volatile memory, the operating method comprising:
generating, by the controller, a data stream from a plurality of pages of data;
storing, by the controller, the data stream in the non-volatile memory;
generating, by the controller, a multi-map table which comprises:
a physical address of a first page of data of the plurality of pages of data in the non-volatile memory; and
at least one validity bit indicating whether a corresponding page of the plurality of pages of data comprised in the data stream is valid; and
updating, by the controller in response to the first page of data of the plurality of pages of data being invalid, the multi-map table with a first validity bit indicating whether the first page of data is valid or not.

### Claim 21 (depends on 20)

The operating method of claim 20, wherein
the updating of the multi-map table comprises:
receiving an erase command for the first page of data; and
storing a first bit as the first validity bit corresponding to the first page of data.

### Claim 22 (depends on 20)

The operating method of claim 20, further comprising:
performing, by the controller, garbage collection on the non-volatile memory, based on the multi-map table.

### Claim 23 (depends on 22)

The operating method of claim 22, wherein
the plurality of pages of data comprise the first page of data and a second page of data, which are stored at physically consecutive locations in the non-volatile memory,
the multi-map table includes a second validity bit indicating whether the second page of data is valid or not, and
the performing of the garbage collection comprises:
determining whether the first page of data and the second page of data are valid or not, based on the first and second validity bits of the multi-map table; and,
performing, in response to the determining of the first page of data and the second page of data are valid or not, the garbage collection to erase the first page of data and the second page of data.

### Claim 24 (depends on 20)

The operating method of claim 20, wherein the first page of data is a page, positioned at a head of the data stream, and a physical address of the first page of data represents a physical address of the data stream and is included in the multi-map table as the physical address of the data stream.
