# US 11,113,316 B2 · Localized data affinity system and hybrid method

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

- Number: US 11,113,316 B2
- Document ID: US11113316B2
- Status: Granted
- Kind: B2
- Application number: 16/705,917
- Filed: 2019-12-06
- Published: 2020-04-09
- Granted: 2021-09-07
- Earliest claimed: 2010-05-17
- Assignees: United States Postal Service
- Applicants: United States Postal Service
- Inventors: C. Scot Atkins; Joseph Conway
- Web page: https://patentgrep.com/patent/US11113316B2

## CPC

- G06F 16/285: {Clustering or classification}
- G06F 9/5033: {considering data affinity}
- G06F 16/24532: {of parallel queries}
- G06F 16/24542: {Plan optimisation}
- G06F 16/24552: {Database cache management}
- G06F 2209/5012: Processor sets
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method, system, and computer program for processing records is disclosed. In some aspects, a method includes associating, on at least one of the plurality of processors, each record with a record set of a plurality of record sets. Each record set is assigned to a sub-database based on the record set. A cache is associated with each sub-database, and each sub-database and its associated cache is associated with a processor set. An affinity is created between each database cache and the associated processor set, and records are processed with the processor sets according to the associations.

## Claims

### Claim 1

A method of processing records in a database on a plurality of processors grouped into a plurality of processor sets, the method comprising:
associating, on at least one of the plurality of processors, each record with a target record set of a plurality of record sets, the target record set identified by a remainder of an equation R modulo N, where R is a record number identifying the record and N is the number of processor sets;
associating, on at least one of the plurality of processors, the target record set with a target processor set;
routing the records to the associated processor sets based on the associated record set; and
processing the records with the processor sets; and
assigning the target record set to a target database cache associated with the target processor set based on the equation R modulo N, wherein the target database cache comprises only the target record set.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
creating a logging cache for each processor set of the plurality of processor sets or a single logging cache for the plurality of processors;
creating an affinity between each logging cache and an associated target processor set such that each logging cache resides only in memory local to the target processor set with which it is associated; and
assigning a single processor in each processor set to log database transactions into the logging cache,
wherein each processor set comprises a plurality of processors.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
creating a plurality of server processes, wherein each server process is associated with a processor set of the plurality of processor sets;
creating an affinity between each server process and the associated target processor set such that each server process is preferentially scheduled to run on the target processor set with which it is associated; and
associating each server process with a record set,
wherein each server process processes records in the associated record set.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
dividing the database into a plurality of sub-databases;
associating each sub-database with a processor set; and
creating a database cache for each sub-database associated with a processor set such that an affinity exists between each database cache and the associated target processor set such that each database cache resides only in memory local to the target processor set with which it is associated.

### Claim 5 (depends on 1)

The method of claim 1, wherein routing records comprises routing records to processing sets based on a static routing table.

### Claim 6 (depends on 1)

The method of claim 1, wherein associating records comprises associating records with record sets such that there is no data dependency between record sets when processing records.

### Claim 7

An apparatus comprising a plurality of processors grouped into a plurality of processor sets configured to process records in a database, wherein the apparatus is configured to:
associate each record with a target record set of a plurality of record sets, the target record set identified by a remainder of an equation R modulo N, where R is a record number identifying the record and N is the number of processor sets;
associate the target record set with a target processor set;
route the records to the associated processor sets based on the associated record set;
process the records; and
assign the target record set to a target database cache associated with the target processor set based on the equation R modulo N, wherein the target database cache comprises only the target record set.

### Claim 8 (depends on 7)

The apparatus of claim 7, wherein the apparatus is further configured to:
create a logging cache for each processor set of the plurality of processor sets or a single logging cache for the plurality of processors;
create an affinity between each logging cache and an associated target processor set such that each logging cache resides only in memory local to the target processor set with which it is associated; and
assign a single processor in each processor set to log database transactions into the logging cache,
wherein each processor set comprises a plurality of processors.

### Claim 9 (depends on 7)

The apparatus of claim 7, wherein the apparatus is further configured to:
create a plurality of server processes, wherein each server process is associated with a processor set of the plurality of processor sets;
create an affinity between each server process and the associated target processor set such that each server process is preferentially scheduled to run on the target processor set with which it is associated; and
associate each server process with a record set,
wherein each server process processes records in the associated target record set.

### Claim 10 (depends on 7)

The apparatus of claim 7, wherein the apparatus is further configured to:
divide the database into a plurality of sub-databases;
associate each sub-database with a processor set; and
create a database cache for each sub-database associated with a processor set such that an affinity exists between each database cache and the associated target processor set such that each database cache resides only in memory local to the target processor set with which it is associated.

### Claim 11 (depends on 7)

The apparatus of claim 7, wherein the apparatus is further configured to route records to processing sets based on a static routing table.

### Claim 12 (depends on 7)

The apparatus of claim 7, wherein the apparatus is further configured to associate records with record sets such that there is no data dependency between record sets when processing records.

### Claim 13

A computer-readable non-transitory storage medium comprising code capable of causing a computer to:
associate each record in a database with a record set of a plurality of record sets, the target record set identified by a remainder of an equation R modulo N, where R is a record number identifying the record and N is the number of processor sets;
associate the target record set with a target processor set;
route the records to the associated processor sets based on the associated record set;
process the records; and
assign the target record set to a target database cache associated with the target processor set based on the equation R modulo N, wherein the target database cache comprises only the target record set.

### Claim 14 (depends on 13)

The computer-readable non-transitory storage medium of claim 13, further comprising code capable of causing a computer to:
create a logging cache for each processor set of the plurality of processor sets or a single logging cache for the plurality of processors such that an affinity exists between each logging cache and an associated target processor set such that each logging cache resides only in memory local to the target processor set with which it is associated; and
assign a single processor in each processor set to log database transactions into the logging cache,
wherein each processor set comprises a plurality of processors.

### Claim 15 (depends on 13)

The computer-readable non-transitory storage medium of claim 13, further comprising code capable of causing a computer to:
create a plurality of server processes, wherein each server process is associated with a processor set of the plurality of processor sets;
create an affinity between each server process and the associated target processor set such that each server process is preferentially scheduled to run on the target processor set with which it is associated; and
associate each server process with a record set,
wherein each server process processes records in the associated record set.

### Claim 16 (depends on 13)

The computer-readable non-transitory storage medium of claim 13, further comprising code capable of causing a computer to:
divide the database into a plurality of sub-databases;
associate each sub-database with a processor set; and
create a database cache for each sub-database associated with a processor set such that an affinity exists between each database cache and the associated target processor set such that each database cache resides only in memory local to the target processor set with which it is associated.

### Claim 17 (depends on 13)

The computer-readable non-transitory storage medium of claim 13, further comprising code capable of causing a computer to route records to processing sets based on a static routing table.

### Claim 18 (depends on 13)

The computer-readable non-transitory storage medium of claim 13, further comprising code capable of causing a computer to associate records with record sets such that there is no data dependency between record sets when processing records.
