# US 11,120,002 B2 · Method and system for concurrent database operation

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

- Number: US 11,120,002 B2
- Document ID: US11120002B2
- Status: Granted
- Kind: B2
- Application number: 15/214,901
- Filed: 2016-07-20
- Published: 2018-01-25
- Granted: 2021-09-14
- Earliest claimed: 2016-07-20
- Assignees: Verizon Media Inc.
- Applicants: Yahoo Holdings, Inc.
- Inventors: Edward Bortnikov; Anastasia Braginsky; Eshcar Hillel; Guy Gueta; Dmitry Basin; Moshe Sulamy
- Web page: https://patentgrep.com/patent/US11120002B2

## CPC

- G06F 16/2329: {using versioning}
- G06F 16/2308: {Concurrency control (transaction processing G06F9/466)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present teaching relates to concurrent database operation. In one example, a plurality of requests which includes a scan request to obtain first data associated with a plurality of first keys stored in a database is received concurrently. A global version number is updated upon receipt of the scan request. The first data associated with the plurality of first keys is obtained based on the updated global version number. The first data is provided in response to the scan request.

## Claims

### Claim 1

A method, implemented on a machine having at least one processor, storage, and a communication platform connected to a network for database operation, the method comprising:
receiving, concurrently, a plurality of requests which includes a scan request to obtain first data associated with a plurality of keys stored in a database, wherein the scan request specifies to retrieve all values of keys between a first key and a second key;
updating, upon receipt of the scan request, a global version number associated with the plurality of keys before performing the scan requested;
obtaining, after the global version number is updated, with respect to each of the plurality of keys, the first data associated with the plurality of keys based on the updated global version number by:
determining a relevant version number of the key, and
retrieving a value of the key associated with the relevant version number, wherein the first data comprises the value retrieved for each of the plurality of keys; and
providing the first data in response to the scan request.

### Claim 2 (depends on 1)

The method of claim 1, wherein updating the global version number comprises:
retrieving the global version number in the database; and
increasing the global version number to obtain the updated global version number.

### Claim 3 (depends on 2)

The method of claim 2, wherein the relevant version number is a largest version number below the updated global version number that is associated with each of the plurality of keys in the database.

### Claim 4 (depends on 1)

The method of claim 1, wherein the plurality of requests includes a get request to retrieve second data associated with a key specified in the get request, the method further comprises:
obtaining the second data associated with the key specified in the get request based on the updated global version number; and
providing the second data in response to the get request.

### Claim 5 (depends on 4)

The method of claim 4, wherein obtaining the second data associated with the key specified in the get request based on the updated global version number comprises:
determining a relevant version number for the key specified in the get request, wherein the relevant version number is a largest version number below the updated global version number that is associated with the key specified in the get request in the database; and
retrieving a value of the key specified in the get request associated with the relevant version number.

### Claim 6 (depends on 1)

The method of claim 1, wherein the plurality of requests includes a put request to update the database with second data associated with a key specified in the put request, the method further comprises:
updating the database with the second data associated with the key specified in the put request; and
transmitting a confirmation in response to the put request.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
when the put request is not associated with a first version number, assigning the global version number to be the first version number associated with the put request; and
associating the first version number with the key specified in the put request in the database when the key specified in the put request does not have a version number in the database.

### Claim 8

A system, having at least one processor, storage, and a communication platform connected to a network for database operation, the system comprising:
a request classifier configured to:
receive, concurrently, a plurality of requests; and
classify each of the plurality of requests into one of a scan request to obtain first data associated with a plurality of first keys stored in a database, a get request to obtain second data associated with a second key stored in the database, and a put request to update the database with third data associated with a third key, wherein the plurality of requests includes the scan request, and wherein the scan request specifies to retrieve all values of keys between a first key and a second key; and
a data scanner configured to:
receive the scan request from the request classifier;
update, upon receipt of the scan request, a global version number associated with the plurality of first keys before performing the scan requested;
obtaining, after the global version number is updated, with respect to each of the plurality of keys, the first data associated with the plurality of keys based on the updated global version number by:
determining a relevant version number of the key, and
retrieving a value of the key associated with the relevant version number, wherein the first data comprises the value retrieved for each of the plurality of keys; and
providing the first data in response to the scan request.

### Claim 9 (depends on 8)

The system of claim 8, wherein the global version number being updated comprises the data scanner being configured to:
retrieve the global version number in the database; and
increase the global version number to obtain the updated global version number.

### Claim 10 (depends on 9)

The system of claim 9, wherein the relevant version number is a largest version number below the updated global version number that is associated with each of the plurality of first keys in the database.

### Claim 11 (depends on 8)

The system of claim 8, wherein the plurality of requests includes a get request to retrieve second data associated with a second key specified in the get request, and wherein the system further comprises a data reader configured to:
obtain the second data associated with the second key specified in the get request based on the updated global version number; and
provide the second data in response to the get request.

### Claim 12 (depends on 11)

The system of claim 11, wherein the second data associated with the second key specified in the get request based on the updated global version number being obtained comprises the data reader being configured to:
determine a relevant version number for the second key specified in the get request, wherein the relevant version number is a largest version number below the updated global version number that is associated with the second key specified in the get request in the database; and
retrieve a value of the second key specified in the get request associated with the relevant version number.

### Claim 13 (depends on 8)

The system of claim 8, wherein the plurality of requests includes a put request to update the database with third data associated with a third key specified in the put request, and the system further comprises a data updater configured to:
update the database with the third data associated with the third key specified in the put request; and
transmit a confirmation in response to the put request.

### Claim 14 (depends on 13)

The system of claim 13, wherein the data updater is further configured to:
when the put request is not associated with a first version number, assign the global version number to be the first version number associated with the put request; and
associate the first version number with the third key specified in the put request in the database when the third key specified in the put request does not have a version number in the database.

### Claim 15

A machine-readable tangible and non-transitory medium having information for database operation, when read by a machine, effectuate operations comprising:
receiving, concurrently, a plurality of requests which includes a scan request to obtain first data associated with a plurality of keys stored in a database, wherein the scan request specifies to retrieve all values of keys between a first key and a second key;
updating, upon receipt of the scan request, a global version number associated with the plurality of keys before performing the scan requested;
obtaining, after the global version number is updated, with respect to each of the plurality of keys, the first data associated with the plurality of keys based on the updated global version number by:
determining a relevant version number of the key, and
retrieving a value of the key associated with the relevant version number, wherein the first data comprises the value retrieved for each of the plurality of keys; and
providing the first data in response to the scan request.

### Claim 16 (depends on 15)

The machine-readable tangible and non-transitory medium of claim 15, wherein updating the global version number comprises:
retrieving the global version number in the database; and
increasing the global version number.

### Claim 17 (depends on 16)

The machine-readable tangible and non-transitory medium of claim 16, wherein the relevant version number is a largest version number below the updated global version number that is associated with each of the plurality of keys.

### Claim 18 (depends on 15)

The machine-readable tangible and non-transitory medium of claim 15, wherein the plurality of requests includes a get request to retrieve second data associated with a key specified in the get request, the operations further comprise:
obtaining the second data associated with the key specified in the get request based on the updated global version number; and
providing the second data in response to the get request.

### Claim 19 (depends on 18)

The machine-readable tangible and non-transitory medium of claim 18, wherein obtaining the second data associated with the key specified in the get request based on the updated global version number comprises:
determining a relevant version number for the key specified in the get request, wherein the relevant version number is a largest version number below the updated global version number that is associated with the key specified in the get request in the database; and
retrieving a value of the key specified in the get request associated with the relevant version number.

### Claim 20 (depends on 15)

The machine-readable tangible and non-transitory medium of claim 15, wherein the plurality of requests includes a put request to update the database with second data associated with a key specified in the put request, the operations further comprise:
updating the database with the second data associated with the key specified in the put request;
when the put request is not associated with a first version number, assigning the global version number to be the first version number associated with the put request; and
associating the first version number with the key specified in the put request in the database when the key specified in the put request does not have a version number in the database.
