# US 2020/0349065 A1 · Data storage devices and data processing methods

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

- Number: US 2020/0349065 A1
- Document ID: US20200349065A1
- Status: Published application
- Kind: A1
- Application number: 16/849,235
- Filed: 2020-04-15
- Published: 2020-11-05
- Earliest claimed: 2019-05-02
- Assignees: Silicon Motion, Inc.
- Applicants: Silicon Motion, Inc.
- Inventors: Kuan-Yu KE
- Web page: https://patentgrep.com/patent/US20200349065A1

## CPC

- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 11/3037: {where the computing system component is a memory, e.g. virtual memory, cache (accessing, addressing or allocating within memory systems or architectures G06F12/00; checking stores for correct operation G11C29/00)}
- G06F 11/3409: {for performance assessment}
- G06F 11/3466: {Performance evaluation by tracing or monitoring}
- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 12/0882: Page mode
- G06F 13/1668: {Details of memory controller}
- G06F 2212/7201: Logical to physical mapping or translation of blocks or pages
- G06F 2212/7205: Cleaning, compaction, garbage collection, erase control
- G06F 2212/7209: Validity control, e.g. using flags, time stamps or sequence numbers
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A data storage device includes a memory device and a memory controller. The memory device includes multiple memory blocks. The memory controller is coupled to the memory device and is configured to access the memory device. In a garbage collection procedure, the memory controller is configured to select multiple spare memory blocks as destination memory blocks and move valid data stored in at least one source memory block into the destination memory blocks. In the garbage collection procedure, the memory controller is further configured to determine an attribute of each valid data and determine which destination memory block to move the valid data into according to the corresponding attribute. Valid data having the same attribute is moved to the same destination memory block.

## Claims

### Claim 1

A data storage device, comprising:
a memory device, comprising a plurality of memory blocks; and
a memory controller, coupled to the memory device and configured to access the memory device,
wherein in a garbage collection procedure, the memory controller is configured to select a plurality of spare memory blocks as a plurality of destination memory blocks and move valid data stored in at least one source memory block into the destination memory blocks, and
wherein in the garbage collection procedure, the memory controller is further configured to determine an attribute of each valid data and determine which destination memory block to move the valid data into according to the corresponding attribute, wherein the valid data having the same attribute is moved to the same destination memory block.

### Claim 2 (depends on 1)

The data storage device as claimed in claim 1, wherein the attribute is related to a data update frequency of a logical page corresponding to the valid data.

### Claim 3 (depends on 2)

The data storage device as claimed in claim 2, wherein the memory controller is further configured to calculate a write count of each logical page according to one or more write commands received from a host device, and in the garbage collection procedure, the memory controller is configured to determine the data update frequency of the logical page corresponding to the valid data according to the write count of the corresponding logical page.

### Claim 4 (depends on 3)

The data storage device as claimed in claim 3, wherein the memory controller is configured to select a predetermined memory block to receive data from the host device and accordingly edit a first mapping table, wherein the first mapping table comprises information regarding a plurality of mapping relationships between physical addresses and logical addresses, so as to record which logical page data stored in each physical page of the predetermined memory block is directed to, and when the predetermined memory block is full, the memory controller is configured to edit a second mapping table according to the first mapping table, wherein the second mapping table comprises information regarding a plurality of mapping relationships between the logical addresses and the physical addresses, so as to record which physical page data corresponding to each logical page is stored in, wherein the second mapping table further records the write count of each logical page and when the memory controller updates the information regarding the mapping relationship of a specific logical page, the memory controller is further configured to increase the write count corresponding to the specific logical page.

### Claim 5 (depends on 3)

The data storage device as claimed in claim 3, wherein the destination memory blocks comprise at least a first destination memory block and a second destination memory block, and wherein when the write count of a logical page corresponding to the valid data is greater than a threshold value, the memory controller is configured to move the valid data to the first destination memory block, and when the write count of the logical page corresponding to the valid data is not greater than the threshold value, the memory controller is configured to move the valid data to the second destination memory block.

### Claim 6

A data processing method for a data storage device comprising a memory device and a memory controller, wherein the memory device comprises a plurality of memory blocks, the memory controller is coupled to the memory device and configured to access the memory device, and the method is performed by the memory controller and comprises:
in a garbage collection procedure, selecting a plurality of spare memory blocks as a plurality of destination memory blocks and moving valid data stored in at least one source memory block into the destination memory blocks;
determining an attribute of each valid data; and
determining which destination memory block to move the valid data into according to the corresponding attribute of the valid data, wherein the valid data having the same attribute is moved to the same destination memory block.

### Claim 7 (depends on 6)

The data processing method as claimed in claim 6, wherein the attribute is related to a data update frequency of a logical page corresponding to the valid data.

### Claim 8 (depends on 7)

The data processing method as claimed in claim 7, further comprising:
calculating a write count of each logical page according to one or more write commands received from a host device; and
in the garbage collection procedure, determining the data update frequency of the logical page corresponding to the valid data according to the write count of the corresponding logical page.

### Claim 9 (depends on 8)

The data processing method as claimed in claim 8, further comprising:
selecting a predetermined memory block to receive data from the host device and accordingly editing a first mapping table, wherein the first mapping table comprises information regarding a plurality of mapping relationships between physical addresses and logical addresses, so as to record which logical page data stored in each physical page of the predetermined memory block is directed to;
when the predetermined memory block is full, editing a second mapping table according to the first mapping table, wherein the second mapping table comprises information regarding a plurality of mapping relationships between the logical addresses and the physical addresses, so as to record which physical page data corresponding to each logical page is stored in, wherein the second mapping table further records the write count of each logical page; and
when updating the information regarding the mapping relationship of a specific logical page in the second mapping table, increasing the write count corresponding to the specific logical page.

### Claim 10 (depends on 8)

The data processing method as claimed in claim 8, wherein the destination memory blocks comprise at least a first destination memory block and a second destination memory block, and wherein when the write count of a logical page corresponding to the valid data is greater than a threshold value, the valid data is moved to the first destination memory block, and when the write count of the logical page corresponding to the valid data is not greater than the threshold value, the valid data is moved to the second destination memory block.
