# US 2022/0283986 A1 · Systems and methods for ingesting data files using multi-threaded processing

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

- Number: US 2022/0283986 A1
- Document ID: US20220283986A1
- Status: Published application
- Kind: A1
- Application number: 17/191,851
- Filed: 2021-03-04
- Published: 2022-09-08
- Earliest claimed: 2021-03-04
- Assignees: CVS Pharmacy, Inc.
- Applicants: CVS Pharmacy, Inc.
- Inventors: Pridhvi Raj Kandula
- Web page: https://patentgrep.com/patent/US20220283986A1

## CPC

- 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)}
- G06F 16/182: Distributed file systems
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In some instances, a method for ingesting data files is provided. The method comprises: obtaining, by an ingestion system associated with a distributed file system, a data file from an external data source; determining, by the ingestion system, a plurality of processing threads within the ingestion system to use to process the data file; determining, by the ingestion system, one or more offsets within the data file based on the plurality of determined processing threads; and ingesting, by the ingestion system, the data file by having each of the plurality of processing threads begin processing the data file at a plurality of different locations within the data file, wherein the plurality of different locations are associated with the one or more offsets.

## Claims

### Claim 1

A method for ingesting data files, comprising:
obtaining, by an ingestion system associated with a distributed file system, a data file from an external data source;
determining, by the ingestion system, a plurality of processing threads within the ingestion system to use to process the data file;
determining, by the ingestion system, one or more offsets within the data file based on the plurality of determined processing threads; and
ingesting, by the ingestion system, the data file by having each of the plurality of processing threads begin processing the data file at a plurality of different locations within the data file, wherein the plurality of different locations are associated with the one or more offsets.

### Claim 2 (depends on 1)

The method of claim 1, wherein determining the one or more offsets comprises:
determining a number of row delimiters within the data file; and
determining the one or more offsets based on the number of row delimiters.

### Claim 3 (depends on 2)

The method of claim 2, wherein determining the plurality of processing threads within the ingestion system to use to process the data file comprises determining a number of available processing threads for processing the data file, and
wherein determining the one or more offsets is based on the number of row delimiters within the data file and the number of available processing threads within the ingestion system.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
capping a number of processing threads used to ingest the data file at the determined number of available processing threads;
determining a new processing thread that is available for processing the data file; and
continuing to ingest the data file based on the determined number of available processing threads.

### Claim 5 (depends on 2)

The method of claim 2, wherein determining the plurality of processing threads within the ingestion system to use to process the data file is based on a file size of the data file.

### Claim 6 (depends on 1)

The method of claim 1, wherein ingesting the data file comprises:
instructing a first available processing thread, from the plurality of processing threads, to begin ingesting the data file at the beginning of the data file; and
instructing a second available processing thread, from the plurality of processing threads, to begin ingesting the data file at a first offset, of the one or more offsets, within the data file.

### Claim 7 (depends on 6)

The method of claim 6, wherein ingesting the data file further comprises:
instructing a third available processing thread, from the plurality of processing threads, to begin ingesting the data file at a second offset, of the one or more offsets, within the data file.

### Claim 8 (depends on 1)

The method of claim 1, wherein the data file is a LINUX flat file, wherein the distributed file system is a HADOOP distributed file system, and wherein ingesting the data file is based on converting the LINUX flat file into a HADOOP data file.

### Claim 9 (depends on 1)

The method of claim 1, wherein determining the one or more offsets within the data file comprises:
populating entries of an offset array indicating the plurality of different locations within the data file for each of the plurality of processing threads begins processing the data file,
wherein each of the entries of the offset array is based on a size of the data file and the plurality of processing threads.

### Claim 10 (depends on 9)

The method of claim 9, wherein populating the offset array comprises:
determining a plurality of byte sizes to use for each of the entries of the offset array based on the size of the data file and the plurality of processing threads;
determining whether content at a byte size, of the plurality of byte sizes, indicates an end of a row of the data file; and
based on the content at the byte size indicating the byte size is at the end of the row, storing the byte size in the offset array.

### Claim 11 (depends on 10)

The method of claim 10, wherein populating the offset array further comprises:
based on the content at the byte size indicating the byte size is not at the end of the row, incrementing the byte size by one and determining whether second content at the incremented byte size indicates the end of the row; and
based on the second content at the incremented byte size indicating the incremented byte size is at the end of the row, storing the incremented byte size in the offset array.

### Claim 12

A multi-threaded ingestion system, comprising:
one or more processors; and
a non-transitory computer-readable medium having processor-executable instructions stored thereon, wherein the processor-executable instructions, when executed, facilitate:
obtaining a data file from an external data source;
determining a plurality of processing threads associated with the one or more processors to use to process the data file;
determining one or more offsets within the data file based on the plurality of determined processing threads; and
ingesting the data file by having each of the plurality of processing threads begin processing the data file at a plurality of different locations within the data file, wherein the plurality of different locations are associated with the one or more offsets.

### Claim 13 (depends on 12)

The multi-threaded ingestion system of claim 12, wherein determining the one or more offsets comprises:
determining a number of row delimiters within the data file; and
determining the one or more offsets based on the number of row delimiters.

### Claim 14 (depends on 13)

The multi-threaded ingestion system of claim 13, wherein determining the plurality of processing threads to use to process the data file comprises determining a number of available processing threads for processing the data file, and
wherein determining the one or more offsets is based on the number of row delimiters within the data file and the number of available processing threads.

### Claim 15 (depends on 14)

The multi-threaded ingestion system of claim 14, wherein the processor-executable instructions, when executed, further facilitate:
capping a number of processing threads used to ingest the data file at the determined number of available processing threads;
determining a new processing thread that is available for processing the data file; and
continuing to ingest the data file based on the determined number of available processing threads.

### Claim 16 (depends on 13)

The multi-threaded ingestion system of claim 13, wherein determining the plurality of processing threads to use to process the data file is based on a file size of the data file.

### Claim 17 (depends on 13)

The multi-threaded ingestion system of claim 13, wherein ingesting the data file comprises:
instructing a first available processing thread, from the plurality of processing threads, to begin ingesting the data file at the beginning of the data file; and
instructing a second available processing thread, from the plurality of processing threads, to begin ingesting the data file at a first offset, of the one or more offsets, within the data file.

### Claim 18 (depends on 17)

The multi-threaded ingestion system of claim 17, wherein ingesting the data file further comprises:
instructing a third available processing thread, from the plurality of processing threads, to begin ingesting the data file at a second offset, of the one or more offsets, within the data file.

### Claim 19 (depends on 12)

The multi-threaded ingestion system of claim 12, wherein the data file is a LINUX flat file, and wherein ingesting the data file is based on converting the LINUX flat file into a HADOOP data file.

### Claim 20

A non-transitory computer-readable medium having processor-executable instructions stored thereon, wherein the processor-executable instructions, when executed, facilitate:
obtaining a data file from an external data source;
determining a plurality of processing threads within an ingestion system to use to process the data file;
determining one or more offsets within the data file based on the plurality of determined processing threads; and
ingesting the data file by having each of the plurality of processing threads begin processing the data file at a plurality of different locations within the data file, wherein the plurality of different locations are associated with the one or more offsets.
