# US 2017/0293533 A1 · Data processing method, apparatus, and system

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

- Number: US 2017/0293533 A1
- Document ID: US20170293533A1
- Status: Published application
- Kind: A1
- Application number: 15/634,819
- Filed: 2017-06-27
- Published: 2017-10-12
- Earliest claimed: 2014-12-27
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co.,Ltd.
- Inventors: Xin Fang
- Web page: https://patentgrep.com/patent/US20170293533A1

## CPC

- G06F 16/16: File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F 3/0619: {in relation to data integrity, e.g. data losses, bit errors}
- G06F 3/0647: {Migration mechanisms}
- G06F 3/067: {Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]}
- G06F 11/1461: {Backup scheduling policy}
- G06F 11/1464: {for networked environments}
- G06F 16/00: Information retrieval; Database structures therefor; File system structures therefor
- G06F 16/122: {using management policies (point-in-time backing up or restoration of persistent data G06F11/1446; file migration policies for HSM systems G06F16/185)}
- H04L 67/1097: for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
- G06F 2201/84: Using snapshots, i.e. a logical point-in-time copy of the data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Embodiments of the present invention provide a data management technology. An OSD receives a strip write request sent by a client server, where the strip write request carries a to-be-written strip, a version number of the to-be-written strip, an offset of the to-be-written strip, and an object ID of the to-be-written strip; and the OSD writes the to-be-written strip into a storage location determined by using the object ID, the version number of the to-be-written strip, and the offset of the to-be-written strip. By applying the present invention, a quantity of object IDs can be reduced.

## Claims

### Claim 1

A data processing method, wherein the method comprises:
receiving, by an object storage device (OSD), a strip write request sent by a client server, wherein the strip write request carries a to-be-written strip, a version number of the to-be-written strip, an offset of the to-be-written strip, and an object ID of the to-be-written strip, the version number of the to-be-written strip is corresponding to a snapshot ID of a latest snapshot of a file or a volume to which the to-be-written strip belongs, the offset of the to-be-written strip describes a location of the to-be-written strip in an object to which the to-be-written strip belongs, and the object ID of the to-be-written strip is an ID of the object to which the to-be-written strip belongs;
determining, by the OSD, whether a strip determined by using the version number of the to-be-written strip, the object ID of the to-be-written strip, and the offset of the to-be-written strip is backed up; and
if the strip is backed up, writing the to-be-written strip into a storage location determined by using the version number of the to-be-written strip, the object ID of the to-be-written strip, and the offset of the to-be-written strip; or
if the strip is not backed up, backing up data that is in an object of a base version in the OSD and whose offset is the offset of the to-be-written strip and size is a size of the to-be-written strip to the storage location determined by using the version number of the to-be-written strip, the offset of the to-be-written strip, and the object ID of the to-be-written strip, wherein an object ID of the object of the base version is the same as the object ID of the to-be-written strip, and a version number of the object of the base version is a base version number; and writing the to-be-written strip into a storage location determined by using the object ID of the to-be-written strip, the base version number, and the offset of the to-be-written strip.

### Claim 2 (depends on 1)

The method according to claim 1, wherein before the receiving a strip write request sent by a client server, the method further comprises:
taking, by the client server, a snapshot of the file or the volume to which the to-be-written strip belongs, and generating the snapshot ID of the latest snapshot; and
generating the version number of the to-be-written strip according to the snapshot ID of the latest snapshot.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the method further comprises:
updating, by the client server, the version number of the to-be-written strip to metadata of the file or the volume.

### Claim 4 (depends on 1)

The method according to claim 1, wherein before the receiving, by an OSD, a strip write request, the method further comprises:
receiving, by the client server, a file write request, wherein the file write request carries to-be-written data, an offset of the to-be-written data, and a file name, and the to-be-written data is a part of the file;
obtaining, by the client server, a file identifier FID according to the file name, performing a query on the metadata of the file according to the FID to obtain a version number of the file, and using the version number of the file as the version number of the to-be-written strip, wherein the version number of the file is corresponding to the snapshot ID of the latest snapshot of the file to which the to-be-written strip belongs;
splitting, by the client server according to the offset of the to-be-written data and a size of the to-be-written data, the to-be-written data into multiple strips that comprise the to-be-written strip, determining the ID of the object to which the to-be-written strip belongs, and obtaining the offset of the to-be-written strip; and
creating the strip write request.

### Claim 5 (depends on 1)

The method according to claim 1, wherein before the receiving, by an OSD, a strip write request, the method further comprises:
receiving, by the client server, a volume write request, wherein the volume write request carries to-be-written data, an offset of the to-be-written data, and a volume identifier ID, and the to-be-written data is a part of the volume;
performing, by the client server, a query on the metadata of the volume according to the volume ID to obtain a version number of the volume, and using the version number of the volume as the version number of the to-be-written strip, wherein the version number of the volume is corresponding to the snapshot ID of the latest snapshot of the volume to which the to-be-written strip belongs;
splitting, by the client server according to the offset of the to-be-written data and a size of the to-be-written data, the to-be-written data segment into multiple strips that comprise the to-be-written strip, determining the ID of the object to which the to-be-written strip belongs, and obtaining the offset of the to-be-written strip; and
creating the strip write request.

### Claim 6

A data processing method, wherein the method comprises:
receiving, by an object storage device OSD, a strip write request sent by a client server, wherein the strip write request carries a to-be-written strip, a version number of the to-be-written strip, an offset of the to-be-written strip, and an object ID of the to-be-written strip, the version number of the to-be-written strip is corresponding to a snapshot ID of a latest snapshot of a file or a volume to which the to-be-written strip belongs, the offset of the to-be-written strip describes a location of the to-be-written strip in an object to which the to-be-written strip belongs, and the object ID of the to-be-written strip is an ID of the object to which the to-be-written strip belongs;
determining, by the OSD, whether an object determined by using the version number of the to-be-written strip and the object ID is backed up; and
if the object is backed up, writing, by the OSD, the to-be-written strip into a storage location determined by using the object ID, a version number of the object, and the offset of the to-be-written strip; or
if the object is not backed up, backing up data in an object of a base version in the OSD to a storage location determined by using the version number of the to-be-written strip and the object ID, wherein an object ID of the object of the base version is the same as the object ID of the to-be-written strip, and a version number of the object of the base version is a base version number; and
writing, by the OSD, the to-be-written strip into a storage location determined by using the object ID, the base version number, and the offset of the to-be-written strip.

### Claim 7

A data reading method, wherein the method comprises:
receiving, by an object storage device (OSD), a strip read request sent by a client server, wherein the strip read request carries a size of a to-be-read strip, an offset of the to-be-read strip, a version number of the to-be-read strip, and an object ID of the to-be-read strip, the version number of the to-be-read strip is corresponding to a snapshot ID of a latest snapshot of a file or a volume to which the to-be-read strip belongs, and the object ID of the to-be-read strip is an ID of an object to which the to-be-read strip belongs;
determining, by the OSD, whether a strip determined by using the object ID, the version number of the to-be-read strip, and the offset of the to-be-read strip is backed up; and
if the strip is backed up, reading data determined by using the object ID, the version number of the to-be-read strip, the offset of the to-be-read strip, and the size of the to-be-read strip, using the read data as the to-be-read strip, and sending the to-be-read strip to the client server; or
if the strip is not backed up, searching, one by one according to a descending order of snapshot times of objects, the objects whose object IDs are the same as the object ID of the to-be-read strip and version numbers are different from the version number of the to-be-read strip until an object that stores valid data in a storage location determined by using the offset of the to-be-read strip is found, using the found valid data as the to-be-read strip, and sending the to-be-read strip to the client server, wherein a version number of the object is corresponding to the snapshot ID that is of the latest snapshot of the file or the volume to which the to-be-read strip belongs and that exists before the object is generated.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the method further comprises:
if a write mode of the OSD is ROW, the descending order of the snapshot times of the objects is a descending order of version numbers; or
if a write mode of the OSD is COW, the descending order of the snapshot times of the objects is an ascending order of version numbers.

### Claim 9 (depends on 7)

The method according to claim 7, wherein before the receiving, by an OSD, a strip read request sent by a client server, the method further comprises:
receiving, by the client server, a file read request, wherein the file read request carries a file name, a size of to-be-read data, and an offset of the to-be-read data, and the to-be-read data is a part of the file;
obtaining, by the client server, a file identifier FID according to the file name, performing a query on metadata of the file according to the FID to obtain a version number of the file, and using the version number of the file as the version number of the to-be-read strip, wherein the version number of the file is corresponding to the snapshot ID of the latest snapshot of the file to which the to-be-read strip belongs;
determining, by the client server according to the offset of the to-be-read data and the size of the to-be-read data, the ID of the object to which the to-be-read strip belongs, and obtaining the offset of the to-be-read strip; and
generating the strip read request.

### Claim 10 (depends on 7)

The method according to claim 7, wherein before the receiving, by an OSD, a strip write request sent by a client server, the method further comprises:
receiving, by the client server, a volume read request, wherein the volume read request carries a volume ID, a size of to-be-read data, and an offset of the to-be-read data, and the to-be-read data is a part of the volume;
performing, by the client server, a query on metadata of the volume according to the volume ID to obtain a version number of the volume, and using the version number of the volume as the version number of the to-be-read strip, wherein the version number of the volume is corresponding to the snapshot ID of the latest snapshot of the volume to which the to-be-read strip belongs;
determining, by the client server according to the offset of the to-be-read data and the size of the to-be-read data, the ID of the object to which the to-be-read strip belongs, and obtaining the offset of the to-be-read strip; and
generating the strip read request.

### Claim 11

A data reading method, applied to an object storage system, wherein the object storage system comprises an object-based storage device OSD and a client server, and the method comprises:
receiving, by the OSD, a strip read request sent by the client server, wherein the strip read request carries a size of a to-be-read strip, an offset of the to-be-read strip, a version number of the to-be-read strip, and an object ID of the to-be-read strip, the version number of the to-be-read strip is corresponding to a snapshot ID of a latest snapshot of a file or a volume to which the to-be-read strip belongs, and the object ID of the to-be-read strip is an ID of an object to which the to-be-read strip belongs;
determining, by the OSD, whether an object determined by using the object ID and the version number of the to-be-read strip is backed up; and
if the object is backed up, reading data determined by using the object ID, the version number of the to-be-read strip, the offset of the to-be-read strip, and the size of the to-be-read strip, using the read data as the to-be-read strip, and sending the to-be-read strip to the client server; or
if the object is not backed up, searching, one by one according to a descending order of snapshot times of objects, the objects whose object IDs are the same as the object ID of the to-be-read strip and version numbers are different from the version number of the to-be-read strip until an object that stores valid data in a storage location determined by using the offset of the to-be-read strip is found, using the found valid data as the to-be-read strip, and sending the to-be-read strip to the client server, wherein a version number of the object is corresponding to the snapshot ID that is of the latest snapshot of the file or the volume to which the to-be-read strip belongs and that exists before the object is generated.

### Claim 12

An object storage device, comprising a processor, and a storage medium and an interface that are connected to the processor, wherein:
the interface is configured to receive a strip write request sent by a client server, wherein the strip write request carries a to-be-written strip, a version number of the to-be-written strip, an offset of the to-be-written strip, and an object ID of the to-be-written strip, the version number of the to-be-written strip is corresponding to a snapshot ID of a latest snapshot of a file or a volume to which the to-be-written strip belongs, the offset of the to-be-written strip describes a location of the to-be-written strip in an object to which the to-be-written strip belongs, and the object ID of the to-be-written strip is an ID of the object to which the to-be-written strip belongs;
the storage medium stores a computer program; and
by running the computer program, the processor is configured to:
determine whether a strip determined by using the version number of the to-be-written strip, the object ID of the to-be-written strip, and the offset of the to-be-written strip is backed up; and
if the strip is backed up, writing the to-be-written strip into a storage location determined by using the version number of the to-be-written strip, the object ID of the to-be-written strip, and the offset of the to-be-written strip; or
if the strip is not backed up, backing up data that is in an object of a base version in the object storage device and whose offset is the offset of the to-be-written strip and size is a size of the to-be-written strip to the storage location determined by using the version number of the to-be-written strip, the offset of the to-be-written strip, and the object ID of the to-be-written strip, wherein an object ID of the object of the base version is the same as the object ID of the to-be-written strip, and a version number of the object of the base version is a base version number; and writing the to-be-written strip into a storage location determined by using the object ID of the to-be-written strip, the base version number, and the offset of the to-be-written strip.

### Claim 13

An object storage device, comprising a processor, and a storage medium and an interface that are connected to the processor, wherein:
the interface is configured to receive a strip write request sent by a client server, wherein the strip write request carries a to-be-written strip, a version number of the to-be-written strip, an offset of the to-be-written strip, and an object ID of the to-be-written strip, the version number of the to-be-written strip is corresponding to a snapshot ID of a latest snapshot of a file or a volume to which the to-be-written strip belongs, the offset of the to-be-written strip describes a location of the to-be-written strip in an object to which the to-be-written strip belongs, and the object ID of the to-be-written strip is an ID of the object to which the to-be-written strip belongs;
the storage medium stores a computer program; and
the processor executes the following steps by running the computer program:
determining whether an object determined by using the version number of the to-be-written strip and the object ID is backed up; and
if the object is backed up, writing, by the data storage device, the to-be-written strip into a storage location determined by using the object ID, a version number of the object, and the offset of the to-be-written strip; or
if the object is not backed up, backing up, by the data storage device, data in an object of a base version to a storage location determined by using the version number of the to-be-written strip and the object ID, wherein an object ID of the object of the base version is the same as the object ID of the to-be-written strip, and a version number of the object of the base version is a base version number; and
writing, by the data storage device, the to-be-written strip into a storage location determined by using the object ID, the base version number, and the offset of the to-be-written strip.

### Claim 14

An object storage device, comprising a processor, and a storage medium and an interface that are connected to the processor, wherein:
the interface is configured to receive a strip read request sent by a client server, wherein the strip read request carries a size of a to-be-read strip, an offset of the to-be-read strip, a version number of the to-be-read strip, and an object ID of the to-be-read strip, the version number of the to-be-read strip is corresponding to a snapshot ID of a latest snapshot of a file or a volume to which the to-be-read strip belongs, and the object ID of the to-be-read strip is an ID of an object to which the to-be-read strip belongs;
the storage medium stores a computer program; and
by running the computer program, the processor is configured to:
determine whether a strip determined by using the object ID, the version number of the to-be-read strip, and the offset of the to-be-read strip is backed up; and
if the strip is backed up, reading data determined by using the object ID, the version number of the to-be-read strip, the offset of the to-be-read strip, and the size of the to-be-read strip, using the read data as the to-be-read strip, and sending the to-be-read strip to the client server; or
if the strip is not backed up, searching, one by one according to a descending order of snapshot times of objects, the objects whose object IDs are the same as the object ID of the to-be-read strip and version numbers are different from the version number of the to-be-read strip until an object that stores valid data in a storage location determined by using the offset of the to-be-read strip is found, using the found valid data as the to-be-read strip, and sending the to-be-read strip to the client server, wherein a version number of the object is corresponding to the snapshot ID that is of the latest snapshot of the file or the volume to which the to-be-read strip belongs and that exists before the object is generated.

### Claim 15 (depends on 14)

The object storage device according to claim 14, wherein the descending order of the snapshot times of the objects specifically comprises:
if a write mode of the object storage device is ROW, the descending order of the snapshot times of the objects is a descending order of version numbers; or
if a write mode of the object storage device is COW, the descending order of the snapshot times of the objects is an ascending order of version numbers.

### Claim 16

An object storage device, comprising a processor, and a storage medium and an interface that are connected to the processor, wherein:
the interface is configured to receive a strip read request sent by a client server, wherein the strip read request carries a size of a to-be-read strip, an offset of the to-be-read strip, a version number of the to-be-read strip, and an object ID of the to-be-read strip, the version number of the to-be-read strip is corresponding to a snapshot ID of a latest snapshot of a file or a volume to which the to-be-read strip belongs, and the object ID of the to-be-read strip is an ID of an object to which the to-be-read strip belongs;
the storage medium stores a computer program; and
the processor executes the following steps by running the computer program:
determining whether an object determined by using the object ID and the version number of the to-be-read strip is backed up; and
if the object is backed up, reading data determined by using the object ID, the version number of the to-be-read strip, the offset of the to-be-read strip, and the size of the to-be-read strip, using the read data as the to-be-read strip, and sending the to-be-read strip to the client server; or
if the object is not backed up, searching, one by one according to a descending order of snapshot times of objects, the objects whose object IDs are the same as the object ID of the to-be-read strip and version numbers are different from the version number of the to-be-read strip until an object that stores valid data in a storage location determined by using the offset of the to-be-read strip is found, using the found valid data as the to-be-read strip, and sending the to-be-read strip to the client server, wherein a version number of the object is corresponding to the snapshot ID that is of the latest snapshot of the file or the volume to which the to-be-read strip belongs and that exists before the object is generated.
