# US 2019/0377512 A1 · Self-trimming of data stored in non-volatile memory using data storage controller

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

- Number: US 2019/0377512 A1
- Document ID: US20190377512A1
- Status: Published application
- Kind: A1
- Application number: 16/051,366
- Filed: 2018-07-31
- Published: 2019-12-12
- Earliest claimed: 2018-06-11
- Assignees: Western Digital Technologies, Inc.
- Applicants: Western Digital Technologies, Inc.
- Inventors: Avichay Haim Hodes; Guy Freikorn
- Web page: https://patentgrep.com/patent/US20190377512A1

## CPC

- G06F 3/0658: {Controller construction arrangements}
- G06F 3/0608: {Saving storage space on storage systems}
- G06F 3/0616: {in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]}
- G06F 3/0652: {Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 3/068: {Hybrid storage device}
- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G08B 13/19673: {Addition of time stamp, i.e. time metadata, to video stream}
- G06F 2212/7205: Cleaning, compaction, garbage collection, erase control
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G08B: SIGNALLING SYSTEMS, e.g. PERSONAL CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS

## Abstract

The present disclosure describes technologies and techniques for use with a data storage controller (such as a non-volatile memory (NVM) controller) to implement self-trimming of media data. In illustrative examples, an NVM controller stores a stream of video data in a NAND storage device, such as video obtained by a security camera. The controller also stores time stamps corresponding to portions of the video data. The controller then periodically (or during idle times) scans the stored information to identify video data that has exceeded a maximum data lifetime, such as data older than one week. Such data is deemed to be old/expired and is trimmed by the controller (by, e.g., marking corresponding entries in an allocation table as deleted or invalid). In this manner, the controller performs self-trimming of older video data to, for example, limit write amplification. NVMe examples are provided.

## Claims

### Claim 1

A method for use by a data storage controller for controlling a non-volatile memory (NVM) device, comprising:
storing a stream of data obtained over a period of time in the NVM device;
storing time-based parameters corresponding to portions of the stream of data;
subsequently identifying portions of the stream of data stored within the NVM device that exceed a time-based threshold based on the corresponding time-based parameters; and
trimming the portions of the stream of data that exceed the time-based threshold.

### Claim 2 (depends on 1)

The method of claim 1, wherein trimming the portions of the stream of data comprises marking the portions of the stream of data as one or more of deleted, invalid or unwritten in an allocation table, the allocation table within one or more of the data storage controller or the NVM device.

### Claim 3 (depends on 2)

The method of claim 2, further comprising subsequently overwriting the trimmed portions of the stream of data with newly received data.

### Claim 4 (depends on 1)

The method of claim 1, wherein the time-based parameters comprise time stamps and wherein the time-based threshold comprises a maximum age threshold.

### Claim 5 (depends on 1)

The method of claim 1, wherein the stream of data and the time-based parameters are obtained by the data storage controller from a host device.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
obtaining the stream of data from a host device; and
generating the time-based parameters within the data storage controller.

### Claim 7 (depends on 1)

The method of claim 1, wherein the time-based parameters are stored in the NVM device along with corresponding streams of data within a same block of data.

### Claim 8 (depends on 7)

The method of claim 7, wherein trimming the portions of the stream of data includes trimming an entire block of data in which the portions of the stream of data are stored.

### Claim 9 (depends on 1)

The method of claim 1, wherein the time-based parameters are stored separately from corresponding portions of the stream of data, and wherein the data storage controller maintains linking information relating the time-based parameters to the corresponding portions of the stream of data.

### Claim 10 (depends on 9)

The method of claim 9, wherein the time-based parameters and the linking information are stored in random access memory (RAM) within the data storage controller.

### Claim 11 (depends on 9)

The method of claim 9, wherein the time-based parameters and the linking information are stored in the NVM device in blocks separate from the streams of data.

### Claim 12 (depends on 1)

The method of claim 1, wherein the portions of the stream of data that exceed the time-based threshold are trimmed even if the NVM device is not full.

### Claim 13 (depends on 1)

The method of claim 1, wherein the stream of data comprises one or more of video data and audio data.

### Claim 14

A data storage controller for controlling a non-volatile memory (NVM) device, comprising:
a data stream storage controller configured to store a stream of data obtained from a host device in the NVM device;
a time-based parameter storage controller configured to store time-based parameters corresponding to portions of the stream of data;
a data expiration controller configured to identify portions of the stream of data stored within the NVM device that have expired; and
a trim controller configured to trim the portions of the stream of data that have expired.

### Claim 15 (depends on 14)

The data storage controller of claim 14, wherein the NVM device is one or more of a NAND and a shingled magnetic recording device (SMD).

### Claim 16 (depends on 14)

The data storage controller of claim 14, further comprising:
a time-based parameter generator configured to generate the time-based parameters.

### Claim 17 (depends on 16)

The data storage controller of claim 16, wherein the trim controller is configured to trim the portions of the stream of data that have expired by deallocating at least some portions of the stream of data from allocation tables associated with the NVM device, the allocation tables within one or more of the data storage controller or the NVM device.

### Claim 18 (depends on 14)

The data storage controller of claim 14, wherein the data storage controller further comprises a data linking controller configured to maintain information relating the time-based parameters to corresponding portions of the stream of data stored in the NVM device.

### Claim 19 (depends on 14)

The data storage controller of claim 14, wherein the host device is an Internet of Things (IoT) device.

### Claim 20 (depends on 14)

The data storage controller of claim 14, wherein the host device is one or more of a vehicle video camera and a security camera.

### Claim 21

A data storage system, comprising:
a non-volatile memory (NVM) device; and
a data storage controller having a processor configured to
store a stream of input data obtained from a host device in the NVM device,
store time-based parameters corresponding to portions of the stream of data,
identify portions of the stream of data stored within the NVM device that are older than a maximum permissible age, and
trim the portions of the stream of data stored in the NVM device identified as older than the maximum permissible age.

### Claim 22 (depends on 21)

The data storage system of claim 21, wherein the NVM device comprises a NAND storage device, and wherein the processor is configured to trim the portions of the stream of data older than the maximum permissible age using a NAND trim procedure.

### Claim 23

An apparatus for controlling a non-volatile memory (NVM) device, comprising:
means for storing an input stream of data in the NVM device;
means for storing data expiration parameters corresponding to portions of the input stream of data;
means for identifying portions of the input stream of data stored within the NVM device that have expired based on the data expiration parameters; and
means for trimming the portions of the stream of data stored in the NVM device that have expired.

### Claim 24 (depends on 23)

The apparatus of claim 23, further comprising:
means for generating the data expiration parameters as the input stream of data is obtained from a host device.

### Claim 25 (depends on 24)

The apparatus of claim 24, wherein the means for trimming includes means for logically deleting the portions of the stream of data from the NVM device.
