# US 11,119,919 B2 · Method and apparatus with improved speed in data write-in

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

- Number: US 11,119,919 B2
- Document ID: US11119919B2
- Status: Granted
- Kind: B2
- Application number: 16/499,162
- Filed: 2017-10-19
- Published: 2020-10-15
- Granted: 2021-09-14
- Earliest claimed: 2017-03-29
- Assignees: Lenovo (Beijing) Limited
- Applicants: Lenovo (Beijing) Limited
- Inventors: Aili Yao; Bo Li
- Web page: https://patentgrep.com/patent/US11119919B2

## CPC

- G06F 12/0802: Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F 12/0866: for peripheral storage systems, e.g. disk cache
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- 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/0676: {Magnetic disk device}
- G06F 12/0877: Cache access modes
- G06F 2212/1024: Latency reduction
- G06F 2212/312: In storage controller
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present disclosure provides a data write-in method and apparatus. The method includes: generating, by a first storage module, a dataset to be written into a second storage module, where first data in the dataset is sorted according to destination storage addresses of the first data; and sequentially sending, by the first storage module, the first data in the dataset to the second storage module. The embodiments of the present disclosure may increase the speed at which the first storage module writes data into the second storage module.

## Claims

### Claim 1

A method, comprising:
selecting, by a first storage module, being a cache device, a plurality of first data from a cached dataset in the first storage module, wherein the first data in the dataset is sorted according to destination storage addresses of the first data in a second storage module;
generating, by the first storage module, a magnetic disk zone queue, and sorting magnetic disk zones in the magnetic disk zone queue according to the destination storage addresses of the magnetic disk zones, wherein each magnetic disk zone stores at least two second data;
generating, by the first storage module, a plurality of the first data from the cached dataset in the first storage module the dataset according to an order of the selected plurality of first data and the corresponding magnetic disk zone in the magnetic disk zone queue; and
sequentially sending, by the first storage module, the sorted first data to the second storage module to be written into the second storage module.

### Claim 2 (depends on 1)

The method according to claim 1,
wherein the dataset includes one or more data subsets;
wherein selecting, by the first storage module, the plurality of first data from the cached dataset in the first storage module includes:
selecting, by the first storage module, at least one magnetic disk zone from a magnetic disk zone set, wherein the at least one magnetic disk zone is configured to store at least two second data; and
selecting, by the first storage module, the cached data in each corresponding magnetic disk zone of the at least one magnetic zone from the cached dataset as the first data in the one or more data subsets, wherein destination storage addresses of the cached data are in the at least one magnetic disk zone, and
wherein generating, by the first storage module, the dataset according to the plurality of first data includes:
generating one or more data subsets according to an order of the selected first data in each data subset and the destination storage addresses in each corresponding magnetic disk zone; and
generating the dataset according to the one or more data subsets.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the at least one magnetic disk zone is a magnetic disk zone having activity levels lower than a first threshold in the magnetic disk zone set.

### Claim 4 (depends on 1)

The method according to claim 1,
wherein the plurality of first data in each magnetic disk zone is sorted according to the destination storage addresses of the first data, respectively.

### Claim 5 (depends on 4)

The method according to claim 4, wherein:
the plurality of first data comprises cached data having activity levels lower than a second threshold in the cached dataset.

### Claim 6 (depends on 1)

The method according to claim 1, wherein generating the dataset to be written into the second storage module further comprises:
determining whether the first storage module meets a cache refresh condition, wherein the cache refresh condition corresponds to an amount of data in the cached dataset reaches a cache saturation threshold.

### Claim 7 (depends on 6)

The method according to claim 6, wherein before generating the dataset to be written into the second storage module, the method further comprises:
receiving an access request to the second storage module, including destination storage addresses of to-be-accessed second data;
determining whether the to-be-accessed second data has already been synchronized;
if the to-be-accessed data has not been synchronized, determining whether the first storage module meets a cache refresh condition; and
if the first storage module meets the cache refresh condition, generating the dataset.

### Claim 8 (depends on 7)

The method according to claim 7, further comprising:
if the to-be-accessed second data has already been synchronized, updating the activity levels of the cached data corresponding to the to-be-accessed second data.

### Claim 9

A method, comprising:
selecting, by a first storage module, being a cache device, a plurality of first data from a cached dataset in the first storage module, wherein destination storage addresses of the first data in the second storage module are in a pre-set address range;
determining whether the first storage module meets a cache refresh condition, wherein the cache refresh condition corresponds to an amount of data in the cached dataset reaches a cache saturation threshold;
generating, by the first storage module, a plurality of the first data from the cached dataset in the first storage module the dataset according to an order of the selected plurality of first data; and
sequentially sending, by the first storage module, the dataset to the second storage module to be written into the second storage module.

### Claim 10 (depends on 9)

The method according to claim 9,
wherein the dataset includes one or more data subsets,
wherein the plurality of first data includes the first data belonging to the one or more data subsets, and
wherein selecting, by the first storage module, the plurality of first data from the cached dataset in the first storage module includes:
selecting, by the first storage module, at least one magnetic disk zone from a magnetic disk zone set, wherein each magnetic disk zone is in an address range of a pre-set length and the at least one magnetic disk zone stores at least two second data; and
selecting, by the first storage module, the cached data in each corresponding magnetic disk zone of the at least one magnetic zone from the cached dataset as the first data in the one or more data subsets, wherein destination storage addresses of the cached data are in the at least one magnetic disk zone.

### Claim 11 (depends on 10)

The method according to claim 10,
wherein the at least one magnetic disk zone comprises a magnetic disk zone having activity levels lower than a first threshold in the magnetic disk zone set.

### Claim 12 (depends on 9)

The method according to claim 9,
wherein before the dataset to be written into the second storage module is generated, the method further comprises:
generating, by the first storage module, a magnetic disk zone queue, and sorting the magnetic disk zones in the magnetic disk zone queue according to the destination storage addresses of the magnetic disk zones, wherein each magnetic disk zone stores at least two second data; and
wherein generating, by the first storage module, the dataset according to the plurality of first data includes:
generating the dataset according to an order of the selected plurality of first data and the corresponding magnetic disk zone in the magnetic disk zone queue.

### Claim 13 (depends on 12)

The method according to claim 12,
wherein the first data in each magnetic disk zone is sorted according to the destination storage addresses of the first data, respectively.

### Claim 14 (depends on 13)

The method according to claim 13,
wherein the plurality of first data comprises cached data having activity levels lower than a second threshold in the cached dataset.

### Claim 15

An apparatus, comprising:
a processing module configured to:
select, by a first storage module, being a cache device, a plurality of first data from a cached dataset in the first storage module, wherein the first data in the dataset is sorted according to destination storage addresses of the first data in a second storage module;
generate, by the first storage module, a magnetic disk zone queue, and sorting magnetic disk zones in the magnetic disk zone queue according to the destination storage addresses of the magnetic disk zones, wherein each magnetic disk zone stores at least two second data;
generate, by the first storage module, a plurality of the first data from the cached dataset in the first storage module the dataset according to an order of the selected plurality of first data and the corresponding magnetic disk zone in the magnetic disk zone queue; and
a sending module configured to sequentially send the sorted first data to a second storage module to be written into the second storage module.

### Claim 16 (depends on 15)

The method according to claim 15, further comprising:
in response to the first storage module not meeting a cache fresh condition, synchronizing to-be-accessed second data to the first storage module to obtain the cached data corresponding to the to-be-accessed second data, wherein the destination storage addresses of the cached data are the same as the destination storage addresses of the to-be-accessed second data; and
recording the activity levels of the cached data corresponding to the to-be-accessed second data.

### Claim 17

An apparatus, comprising:
a processing module configured to:
select, by a first storage module, being a cache device, a plurality of first data from a cached dataset in the first storage module wherein destination storage addresses of the first data in the second storage module are in a pre-set address range;
determine whether the first storage module meets a cache refresh condition, wherein the cache refresh condition corresponds to an amount of data in the cached dataset reaches a cache saturation threshold;
generating, by the first storage module, a plurality of the first data from the cached dataset in the first storage module the dataset according to the selected plurality of first data; and
a sending module configured to sequentially send the first data in the dataset to a second storage module to be written into the second storage module.
