# US 2022/0294853 A1 · Deterministic mapping and uniform routing of items to physical resources using hash values

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

- Number: US 2022/0294853 A1
- Document ID: US20220294853A1
- Status: Published application
- Kind: A1
- Application number: 17/829,488
- Filed: 2022-06-01
- Published: 2022-09-15
- Earliest claimed: 2020-09-25
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Danilo Landucci BENZATTI; Ahmed Hassan MOHAMED
- Web page: https://patentgrep.com/patent/US20220294853A1

## CPC

- G06F 16/1834: {implemented based on peer-to-peer networks, e.g. gnutella (p2p communication protocols H04L67/104)}
- 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]
- H04L 67/1023: based on a hash applied to IP addresses or costs
- H04L 67/1025: Dynamic adaptation of the criteria on which the server selection is based
- 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

A string, identifying an item to be assigned to a physical resource, is hashed to obtain a numeric hash value. The numeric hash value is downscaled to obtain a bucket identifier that identifies a bucket that will hold the numeric hash value. The bucket is then deterministically mapped to a physical resource so that it can be retrieved without accessing a stored data structure representative of the mapping.

## Claims

### Claim 1

A computer system comprising:
at least one processor; and
memory storing instructions executable by the at least one processor, wherein the instructions, when executed, cause the computer system to:
receive a string identifier that identifies an item to be assigned to one of a plurality of physical resources;
obtain a numeric hash value based on applying a hashing function to the string identifier, the hashing function configured to generate numeric hash values that are distributed over a hash value space comprising a defined range of values;
downscale the numeric hash value into a reduced value space of bucket identifiers, having fewer values than the hash value space, by deterministically obtaining a downscaled value corresponding to a selected bucket identifier based on the numeric hash value, a number of bucket identifiers in the reduced value space, and the hash value space;
deterministically map the selected bucket identifier to a particular physical resource of the plurality of physical resources; and
provide the item to the particular physical resource.

### Claim 2 (depends on 1)

The computer system of claim 1, wherein the instructions cause the computer system to uniformly, on average, assign bucket identifiers to each of the particular physical resource and another physical resource of the plurality of physical resources.

### Claim 3 (depends on 1)

The computer system of claim 1, wherein the instructions cause the computer system to deterministically obtain the downscaled value by obtaining a ratio of the number of bucket identifiers in the reduced value space to the hash value space, and multiplying the ratio by the numeric hash value.

### Claim 4 (depends on 1)

The computer system of claim 1, wherein the instructions cause the computer system to uniformly, on average, assign numeric hash values to the bucket identifiers in the reduced value space of bucket identifiers.

### Claim 5 (depends on 1)

The computer system of claim 1, wherein the hashing function is configured to:
generate, for a plurality of string identifiers that identify items to be assigned to one or more of the plurality of physical resources, a plurality of numeric hash values that are uniformly distributed over the hash value space.

### Claim 6 (depends on 1)

The computer system of claim 1, wherein the instructions cause the computer system to:
identify a change in the plurality of physical resources from a current number of physical resources to a changed number of physical resources;
uniformly, on average, re-assign bucket identifiers from the current number of physical resources to the changed number of physical resources; and
move items corresponding to the re-assigned bucket identifier from the physical resource in the current number of physical resources to the different physical resource.

### Claim 7 (depends on 6)

The computer system of claim 6, wherein the instructions cause the computer system to detect an added physical resource to the plurality of physical resources and re-assign bucket identifiers by dividing the bucket identifiers into a number of groups, each group being identified by a group index value and each group having N buckets where N corresponds to the changed number of physical resources, and re-assigning an equal number of bucket identifiers from each group to the added physical resource.

### Claim 8 (depends on 7)

The computer system of claim 7, wherein the instructions cause the computer system to:
identify a range of numeric hash values corresponding to the re-assigned bucket identifier;
generate a range query based on the identified range of numeric hash values;
execute the range query against the physical resource in the current number of physical resources to retrieve items having numeric hash values in the identified range of numeric hash values; and
move the retrieved items to the different physical resource.

### Claim 9

A computer implemented method comprising:
receiving a string identifier that identifies an item to be assigned to one of a plurality of physical resources;
obtaining a numeric hash value based on applying a hashing function to the string identifier, the hashing function configured to generate numeric hash values that are distributed over a hash value space comprising a defined range of values;
downscaling the numeric hash value into a reduced value space of bucket identifiers, having fewer values than the hash value space, by deterministically obtaining a downscaled value corresponding to a selected bucket identifier based on the numeric hash value, a number of bucket identifiers in the reduced value space, and the hash value space;
deterministically mapping the selected bucket identifier to a particular physical resource of the plurality of physical resources; and
providing the item to the particular physical resource.

### Claim 10 (depends on 9)

The computer implemented method of claim 9, wherein deterministically mapping the selected bucket identifier comprises:
uniformly, on average, assigning bucket identifiers to each of the particular physical resource and another physical resource of the plurality of physical resources.

### Claim 11 (depends on 9)

The computer implemented method of claim 9, wherein downscaling comprises:
deterministically obtaining the downscaled value by obtaining a ratio of the number of bucket identifiers in the reduced value space to the hash value space, and multiplying the ratio by the numeric hash value.

### Claim 12 (depends on 9)

The computer implemented method of claim 9, wherein deterministically assigning comprises:
uniformly, on average, assigning numeric hash values to the bucket identifiers in the reduced value space of bucket identifiers.

### Claim 13 (depends on 9)

The computer implemented method of claim 9, and further comprising:
generating, for a plurality of string identifiers that identify items to be assigned to one or more of the plurality of physical resources, a plurality of numeric hash values that are uniformly distributed over the hash value space.

### Claim 14 (depends on 9)

The computer implemented method of claim 9, and further comprising:
identifying a change in the plurality of physical resources from a current number of physical resources to a changed number of physical resources;
uniformly, on average, re-assigning bucket identifiers from the current number of physical resources to the changed number of physical resources; and
moving items corresponding to the re-assigned bucket identifier from the physical resource in the current number of physical resources to the different physical resource.

### Claim 15 (depends on 14)

The computer implemented method of claim 14, and further comprising:
detecting an added physical resource to the plurality of physical resources and re-assign bucket identifiers by dividing the bucket identifiers into a number of groups, each group being identified by a group index value and each group having N buckets where N corresponds to the changed number of physical resources, and re-assigning an equal number of bucket identifiers from each group to the added physical resource.

### Claim 16 (depends on 15)

The computer implemented method of claim 15, and further comprising:
identifying a range of numeric hash values corresponding to the re-assigned bucket identifier;
generating a range query based on the identified range of numeric hash values,
executing the range query against the physical resource in the current number of physical resources to retrieve items having numeric hash values in the identified range of numeric hash values; and
moving the retrieved items to the different physical resource.

### Claim 17

A computing system comprising:
a consistent hash system configured to:
receive a string identifier that identifies an item to be assigned to one of a plurality of physical resources; and
obtain a numeric hash value based on applying a hashing function to the string identifier, the hashing function configured to generate numeric hash values that are distributed over a hash value space comprising a defined range of values;
a downscaling system configured to downscale the numeric hash value into a reduced value space of bucket identifiers, having fewer values than the hash value space, by deterministically obtaining a downscaled value corresponding to a selected bucket identifier based on the numeric hash value, a number of bucket identifiers in the reduced value space, and the hash value space;
a deterministic mapping system configured to deterministically map the selected bucket identifier to a particular physical resource of the plurality of physical resources; and
a move component configured to provide the item to the particular physical resource.

### Claim 18 (depends on 17)

The computing system of claim 17, wherein the deterministic mapping system is configured to assign uniformly, on average, bucket identifiers to each of the particular physical resource and another physical resource of the plurality of physical resources.

### Claim 19 (depends on 17)

The computing system of claim 17, wherein the downscaling system is configured to deterministically obtain the downscaled value by obtaining a ratio of the number of bucket identifiers in the reduced value space to the hash value space, and multiplying the ratio by the numeric hash value.

### Claim 20 (depends on 17)

The computing system of claim 17, and further comprising:
a resizing detector configured to detect a resizing input indicative of a change in the plurality of physical resources from a current number of physical resources to a changed number of physical resources; and
a bucket identifier component configured to uniformly re-assign, on average, bucket identifiers from physical resources in the current number of physical resources to physical resources in the changed number of physical resources; and
a range query execution component configured to identify a range of numeric hash values corresponding to each of the re-assigned bucket identifiers, generate a range query based on the identified range of numeric hash values, and execute the range query against the physical resource in the current number of physical resources to retrieve items having numeric hash values in the identified range of numeric hash values, wherein the move component is configured to move the retrieved items to a physical resource in the changed number of physical resources.
