# US 11,119,849 B2 · Erasure code-based partial 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,849 B2
- Document ID: US11119849B2
- Status: Granted
- Kind: B2
- Application number: 16/461,520
- Filed: 2017-11-02
- Published: 2019-11-14
- Granted: 2021-09-14
- Earliest claimed: 2016-11-16
- Assignees: Beijing Sankuai Online Technology Co., Ltd
- Applicants: Beijing Sankuai Online Technology Co., Ltd
- Inventors: Huiba Li; Zhiming Zhang
- Web page: https://patentgrep.com/patent/US11119849B2

## CPC

- G06F 11/1056: {Updating check bits on partial write, i.e. read/modify/write}
- G06F 11/1004: {to protect a block of data words, e.g. CRC or checksum (G06F11/1076 takes precedence; security arrangements for protecting computers or computer systems against unauthorized activity G06F21/00)}
- G06F 11/1044: {with specific ECC/EDC distribution}
- G06F 11/1076: {Parity data used in redundant arrays of independent storages, e.g. in RAID systems}
- G11B 20/10268: {bit detection or demodulation methods}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G11B: INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER (recording measured values in a way that does not require playback through a transducer G01D9/00; recording or playback apparatus using mechanically marked tape, e.g. punched paper tape, or using unit records, e.g. punched or magnetically marked cards G06K; transferring data from one type of record carrier to another G06K1/18; circuits for coupling output of reproducer to radio receiver H04B1/20; gramophone pick-ups or like acoustic electromechanical transducers or circuits therefor H04R)

## Abstract

An erasure code-based partial write-in method and apparatus are provided. According to the method, a data node receives a first updating request carrying updating data and first version information from a client, wherein the first version information is information stored by the client and indicating a version of a target data block to be updated with the updating data, a data amount of the updating data is less than a data amount of one erasure code group which comprises m data blocks and k check data blocks, both m and k being natural numbers; the data node acquires second version information in response to the first updating request, wherein the second version information is information stored in the node and indicating the version of the target data block; the data node processes the updating data according to a matching result of the first version information and second version information.

## Claims

### Claim 1

An erasure code-based partial write-in method, comprising:
receiving, by a data node, a first updating request carried with updating data and first version information from a client, wherein the first version information is information that is stored by the client and used for indicating a version of a target data block to be updated with the updating data, a data amount of the updating data is less than a data amount of one erasure code group, the erasure code group comprises m data blocks and k check data blocks, and both m and k are natural numbers;
acquiring, by the data node, second version information in response to the first updating request, wherein the second version information is information that is stored by the data node and used for indicating the version of the target data block; and
processing, by the data node, the updating data according to a matching result of the first version information and the second version information.

### Claim 2 (depends on 1)

The method according to claim 1, wherein processing the updating data according to the matching result of the first version information and the second version information comprises:
sending, by the data node, a first updating response to the client and discarding the updating data in response to that the first version information is not matched with the second version information,
wherein the first updating response is carried with an unsuccessful update result and a cause value, and
the cause value is used to indicate that the unsuccessful update result is caused by an error of the first version information.

### Claim 3 (depends on 1)

The method according to claim 1, wherein processing the updating data according to the matching result of the first version information and the second version information comprises:
in response to that the first version information is matched with the second information,
determining, by the data node, check increments of the k check data blocks in the erasure code group corresponding to the target data block according to the updating data and the target data block;
carrying, by the data node, the check increment of each check data block in a second updating request respectively, and
sending, by the data node, the second updating request to a check node for storing the check data block to trigger the check node to update the check data block according to the check increment and update a version vector stored by the check node.

### Claim 4 (depends on 3)

The method according to claim 3, further comprising:
receiving, by the data node, a second updating response from the check node, wherein the second updating response is carried with a result indicating whether the check data block is successfully updated with the check increment; and
sending, by the data node, a first updating response to the client in response to that all k check data blocks are successfully updated with the corresponding check increments and updating of the target data block is completed,
wherein the first updating response is carried with a successful update result, and
the successful update result is used to trigger the client to update the first version information.

### Claim 5 (depends on 1)

The method according to claim 1, wherein processing the updating data according to the matching result of the first version information and the second version information comprises:
in response to that the first version information is matched with the second information,
updating, by the data node, the target data block stored in the data node with the updating data; and
updating, by the data node, the second version information after completion of updating the target data block.

### Claim 6 (depends on 5)

The method according to claim 5, further comprising:
sending, by the data node, a first updating response to the client after completion of updating the target data block,
wherein the first updating response is carried with a successful update result, and
the successful update result is used to trigger the client to update the first version information.

### Claim 7 (depends on 1)

A non-transitory machine readable storage medium storing machine executable instructions, wherein the machine executable instructions are executed by a processor to perform the erasure code-based partial write-in method according to claim 1.

### Claim 8

An erasure code-based partial write-in method, comprising:
determining, by a client, updating data and identification information of a target data block to be updated with the updating data, a data amount of the updating data being less than a data amount of one erasure code group, wherein the erasure code group comprises one or more data blocks and check data blocks for recovering the data blocks;
determining, by the client, identification information of a corresponding data node according to the identification information of the target data block;
determining, by the client, first version information indicating a current version of the target data block according to the identification information of the target data block;
carrying, by the client, the updating data and the first version information in a first updating request;
sending, by the client, the first updating request to the data node according to the identification information of the data node;
receiving, by the client, a first updating response from the data node, wherein the first updating response is carried with an update result; and
updating, by the client, the first version information in response to that the update result indicates a successful update.

### Claim 9 (depends on 8)

A data updating device, comprising: a non-transitory storage medium, a processor and machine executable instructions that are stored on the non-transitory storage medium and executable by the processor, wherein the machine executable instructions are executed by the processor to implement the erasure code-based partial write-in method according to claim 8.

### Claim 10 (depends on 8)

A non-transitory machine readable storage medium storing machine executable instructions, wherein the machine executable instructions are executed by a processor to perform the erasure code-based partial write-in method according to claim 8.

### Claim 11

An erasure code-based partial write-in method, comprising:
receiving, by a check node, an updating request from a data node, wherein the updating request is carried with a check increment;
updating, by the check node, a check data block stored in the check node according to the check increment in response to the updating request to obtain an updated check data block;
updating, by the check node, a version vector stored in the check node in response to the updating request, wherein the version vector comprises version information of m data blocks in an erasure code group corresponding to a target data block to be updated, the erasure code group further comprises k check data blocks for recovering the m data blocks, and both m and k are natural numbers; and
sending, by the check node, an updating response to the data node, wherein the updating response is carried with a result indicating whether the check data block is successfully updated with the check increment.

### Claim 12 (depends on 11)

The method according to claim 11, wherein
the updating request is further carried with identification information of the target data block and first version information that is stored in the data node and used for indicating a current version of the target data block, and
updating the version vector comprises:
updating, by the check node, the version information in the version vector that corresponds to the target data block to the first version information according to the identification information of the target data block.

### Claim 13 (depends on 11)

The method according to claim 11, wherein
the updating request is further carried with second version information that is stored in the data node and used for indicating a version of the target data block before update,
the method further comprises:
acquiring, by the check node, third version information, wherein the third version information is information that is stored in the check node and used for indicating a version of the check data block; and
the check node processes the updating request according to a result indicating whether the second version information is matched with the third version information.

### Claim 14 (depends on 11)

A data updating device, comprising: a non-transitory storage medium, a processor and machine executable instructions that are stored on the non-transitory storage medium and executable by the processor, wherein the machine executable instructions are executed by the processor to implement the erasure code-based partial write-in method according to claim 11.

### Claim 15 (depends on 11)

A non-transitory machine readable storage medium storing machine executable instructions, wherein the machine executable instructions are executed by a processor to perform the erasure code-based partial write-in method according to claim 11.

### Claim 16

A data updating device, comprising: a non-transitory storage medium, a processor and machine executable instructions that are stored on the non-transitory storage medium and executable by the processor, wherein, by executing the machine executable instructions, the processor is caused to:
receive a first updating request carried with updating data and first version information from a client, wherein the first version information is information that is stored by the client and used for indicating a version of a target data block to be updated with the updating data, a data amount of the updating data is less than a data amount of one erasure code group, the erasure code group comprises m data blocks and k check data blocks, and both m and k are natural numbers;
acquire second version information in response to the first updating request, wherein the second version information is information that is stored by the data node and used for indicating the version of the target data block; and
process the updating data according to a matching result of the first version information and the second version information.

### Claim 17 (depends on 16)

The device according to claim 16, wherein, when processing the updating data according to the matching result of the first version information and the second version information, the processor is further caused by the machine executable instructions to:
send a first updating response to the client and discard the updating data in response to that the first version information is not matched with the second version information,
wherein the first updating response is carried with an unsuccessful update result and a cause value, and
the cause value is used to indicate that the unsuccessful update result is caused by an error of the first version information.

### Claim 18 (depends on 16)

The device according to claim 16, wherein, when processing the updating data according to the matching result of the first version information and the second version information, the processor is further caused by the machine executable instructions to:
in response to that the first version information is matched with the second information,
determine check increments of the k check data blocks in the erasure code group corresponding to the target data block according to the updating data and the target data block;
carry the check increment of each check data block in a second updating request respectively, and
send the second updating request to a check node for storing the check data block to trigger the check node to update the check data block according to the check increment and update a version vector stored by the check node.

### Claim 19 (depends on 18)

The device according to claim 18, wherein, the processor is further caused by the machine executable instructions to:
receive a second updating response from the check node, wherein the second updating response is carried with a result indicating whether the check data block is successfully updated with the check increment; and
send a first updating response to the client in response to that all k check data blocks are successfully updated with the corresponding check increments and updating of the target data block is completed,
wherein the first updating response is carried with a successful update result, and the successful update result is used to trigger the client to update the first version information.

### Claim 20 (depends on 16)

The device according to claim 16, wherein, when processing the updating data according to the matching result of the first version information and the second version information, the processor is further caused by the machine executable instructions to:
in response to that the first version information is matched with the second information,
update the target data block stored in the data node with the updating data; and
update the second version information after completion of updating the target data block.
