# US 12,008,240 B2 · Random write method and apparatus

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

- Number: US 12,008,240 B2
- Document ID: US12008240B2
- Status: Granted
- Kind: B2
- Application number: 17/925,687
- Filed: 2021-01-23
- Published: 2023-10-26
- Granted: 2024-06-11
- Earliest claimed: 2020-05-29
- Assignees: Inspur Suzhou Intelligent Technology Co., Ltd.
- Applicants: Inspur Suzhou Intelligent Technology Co., Ltd.
- Inventors: Qi Song; Baolin Zhao
- Web page: https://patentgrep.com/patent/US12008240B2

## CPC

- G06F 3/0613: {in relation to throughput}
- G06F 3/0616: {in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]}
- G06F 3/064: {Management of blocks}
- G06F 3/0653: {Monitoring storage devices or systems}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06N 3/0442: characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
- G06F 2212/7211: Wear leveling
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A random write method includes: using a wear-leveling module to scan the number of free blocks and the number of bad blocks in a target super logic unit; using a lookup management module to iteratively update, according to the number of current remaining solid-state disk data frames, the number of historically weighted solid-state disk data frames in a long short-term memory network manner; using dynamic write arbitration to determine an adjustment stage based on the number of historically weighted solid-state disk data frames, and determining the expected number of read and write operations per second based on the adjustment stage; and re-updating the number of historically weighted solid-state disk data frames, and adjusting the actual number of read and write operations per second based on the re-updated number of historically weighted solid-state disk data frames and the expected number of read and write operations per second.

## Claims

### Claim 1

A random write method, comprising:
determining, in a manner of leveling a remaining space, a target super logic unit from among a plurality of super logic units in a solid-state disk;
scanning a quantity of free blocks and a quantity of bad blocks in the target super logic unit so as to determine a quantity of current remaining solid-state disk data frames;
iteratively updating a quantity of historically weighted solid-state disk data frames in a long short-term memory network manner according to the quantity of the current remaining solid-state disk data frames;
by dynamic write arbitration, determining an adjustment stage on the basis of the quantity of the historically weighted solid-state disk data frames, and determining an expected number of times of read and write operations per second on the basis of the adjustment stage;
re-updating the quantity of the historically weighted solid-state disk data frames, and adjusting an actual number of times of read and write operations per second on the basis of re-updated quantity of the historically weighted solid-state disk data frames and the expected number of times of read and write operations per second;
wherein the dynamic write arbitration comprises three stages, each stage comprises a corresponding relationship between the quantity of the free blocks, the quantity of the historically weighted solid-state disk data frames, and the number of times of read and write operations per second.

### Claim 2 (depends on 1)

The method according to claim 1, wherein determining, in a manner of leveling a remaining space, a target super logic unit from among a plurality of super logic units in a solid-state disk comprises:
determining whether a quantity of the super logic units with a minimum quantity of the free blocks in the solid-state disk exceeds a predetermined threshold value; and
selecting the super logic unit with the minimum quantity of the free blocks as the target super logic unit in response to exceeding the predetermined threshold value.

### Claim 3 (depends on 2)

The method according to claim 2, wherein determining, in a manner of leveling a remaining space, a target super logic unit from among a plurality of super logic units in a solid-state disk further comprises:
in response to not exceeding the predetermined threshold value, scanning whether there is at least one super logic unit in a free state in the solid-state disk; and
determining one of the super logic units as the target super logic unit in response to the presence of at least one super logic unit in the free state.

### Claim 4 (depends on 1)

The method according to claim 1, wherein iteratively updating a quantity of historically weighted solid-state disk data frames in a long short-term memory network manner according to the quantity of the current remaining solid-state disk data frames comprises:
weighting a quantity of old weighted solid-state disk data frames according to a predetermined historical average weighted parameter; and
executing a normalized weighted average on the weighted quantity of the old weighted solid-state disk data frames and the quantity of standard weighted current remaining solid-state disk data frames to obtain an updated quantity of the historically weighted solid-state disk data frames.

### Claim 5

A random write apparatus, comprising:
a processor; and
a memory storing a program code executable by the processor, wherein the program code, when executed, executes operations as follows:
determining, in a manner of leveling a remaining space, a target super logic unit from among a plurality of super logic units in a solid-state disk;
scanning, a quantity of free blocks and a quantity of bad blocks in the target super logic unit so as to determine a quantity of current remaining solid-state disk data frames;
iteratively updating a quantity of historically weighted solid-state disk data frames in a long short-term memory network manner according to the quantity of the current remaining solid-state disk data frames;
by dynamic write arbitration, determining an adjustment stage on the basis of the quantity of the historically weighted solid-state disk data frames, and determining an expected number of times of read and write operations per second on the basis of the adjustment stage;
re-updating the quantity of the historically weighted solid-state disk data frames, and adjusting an actual number of times of read and write operations per second on the basis of the quantity of the historically weighted solid-state disk data frames and the expected number of times of read and write operations per second;
wherein the dynamic write arbitration comprises three stages, each stage comprises a corresponding relationship between a quantity of free blocks, the quantity of the historically weighted solid-state disk data frames, and the number of times of read and write operations per second.

### Claim 6 (depends on 5)

The apparatus according to claim 5, wherein determining, in a manner of leveling a remaining space, a target super logic unit from among a plurality of super logic units in a solid-state disk further comprises:
determining whether a quantity of the super logic units with a minimum quantity of the free blocks in the solid-state disk exceeds a predetermined threshold value; and
selecting the super logic unit with the minimum quantity of the free blocks as the target super logic unit in response to exceeding the predetermined threshold value.

### Claim 7 (depends on 6)

The apparatus according to claim 6, wherein determining, in a manner of leveling a remaining space, a target super logic unit from among a plurality of super logic units in a solid-state disk further comprises:
in response to not exceeding the predetermined threshold value, scanning whether there is at least one super logic unit in a free state in the solid-state disk; and
determining one of the super logic units as the target super logic unit in response to the presence of at least one super logic unit in the free state.

### Claim 8 (depends on 5)

The apparatus according to claim 5, wherein iteratively updating a quantity of historically weighted solid-state disk data frames in a long short-term memory network manner according to the quantity of the current remaining solid-state disk data frames comprises:
weighting a quantity of old weighted solid-state disk data frames according to a predetermined historical average weighted parameter; and
executing a normalized weighted average on the weighted quantity of the old weighted solid-state disk data frames and the quantity of standard weighted current remaining solid-state disk data frames to obtain an updated quantity of the historically weighted solid-state disk data frames.

### Claim 9

A non-transitory computer-readable storage medium, storing a computer program that is executed executable by a processor, and upon execution by the processor, is configured to cause the processor to implement operations as follows:
determining, in a manner of leveling a remaining space, a target super logic unit from among a plurality of super logic units in a solid-state disk;
scanning a quantity of free blocks and a quantity of bad blocks in the target super logic unit so as to determine a quantity of current remaining solid-state disk data frames;
iteratively updating a quantity of historically weighted solid-state disk data frames in a long short-term memory network manner according to the quantity of the current remaining solid-state disk data frames;
by dynamic write arbitration, determining an adjustment stage on the basis of the quantity of the historically weighted solid-state disk data frames, and determining an expected number of times of read and write operations per second on the basis of the adjustment stage;
re-updating the quantity of the historically weighted solid-state disk data frames, and adjusting an actual number of times of read and write operations per second on the basis of the quantity of the historically weighted solid-state disk data frames and the expected number of times of read and write operations per second;
wherein the dynamic write arbitration comprises three stages, each stage comprises a corresponding relationship between a quantity of free blocks, the quantity of the historically weighted solid-state disk data frames, and the number of times of read and write operations per second.

### Claim 10 (depends on 9)

The non-transitory computer-readable storage medium according to claim 9, wherein determining, in a manner of leveling a remaining space, a target super logic unit from among a plurality of super logic units in a solid-state disk further comprises:
determining whether a quantity of the super logic units with a minimum quantity of the free blocks in the solid-state disk exceeds a predetermined threshold value.

### Claim 11 (depends on 10)

The non-transitory computer-readable storage medium according to claim 10, wherein determining, in a manner of leveling a remaining space, a target super logic unit from among a plurality of super logic units in a solid-state disk further comprises:
selecting the super logic unit with the minimum quantity of the free blocks as the target super logic unit in response to exceeding the predetermined threshold value.

### Claim 12 (depends on 10)

The non-transitory computer-readable storage medium according to claim 10, wherein determining, in a manner of leveling a remaining space, a target super logic unit from among a plurality of super logic units in a solid-state disk further comprises:
in response to not exceeding the predetermined threshold value, scanning whether there is at least one super logic unit in a free state in the solid-state disk.

### Claim 13 (depends on 12)

The non-transitory computer-readable storage medium according to claim 12, wherein determining, in a manner of leveling a remaining space, a target super logic unit from among a plurality of super logic units in a solid-state disk further comprises:
determining one of the super logic units as the target super logic unit in response to the presence of at least one super logic unit in the free state.

### Claim 14 (depends on 12)

The non-transitory computer-readable storage medium according to claim 12, wherein iteratively updating a quantity of historically weighted solid-state disk data frames in a long short-term memory network manner according to the quantity of the current remaining solid-state disk data frames comprises:
weighting a quantity of old weighted solid-state disk data frames according to a predetermined historical average weighted parameter; and
executing a normalized weighted average on the weighted quantity of the old weighted solid-state disk data frames and the quantity of standard weighted current remaining solid-state disk data frames to obtain an updated quantity of the historically weighted solid-state disk data frames.
