# US 2021/0334242 A1 · Generation and traversal of a hierarchical index structure for efficient data retrieval

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

- Number: US 2021/0334242 A1
- Document ID: US20210334242A1
- Status: Published application
- Kind: A1
- Application number: 16/856,600
- Filed: 2020-04-23
- Published: 2021-10-28
- Earliest claimed: 2020-04-23
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Rahul Potharaju; Terry Y. Kim; Wentao Wu
- Web page: https://patentgrep.com/patent/US20210334242A1

## CPC

- G06F 16/185: Hierarchical storage management [HSM] systems, e.g. file migration or policies thereof (details of archiving G06F16/11)
- G06F 16/134: {Distributed indices}
- G06F 16/144: {Query formulation}
- G06F 16/156: {Query results presentation}
- G06F 16/1734: {Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs}
- G06F 16/182: Distributed file systems
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods, systems, apparatuses, and computer program products are described herein for the generation and traversal of a hierarchical index structure. The structure indexes search keys from data ingested from different data sources and enables efficient retrieval of the keys. As data is ingested, index nodes are generated at the lowest level of the structure. The nodes are analyzed to determine whether such nodes comprise duplicate keys. Responsive to doing so, a new index node is generated located at a higher level of the structure. This process results in a DAG comprising orphan nodes including different search keys. When processing a query for search keys, the orphan index nodes are initially analyzed for the keys. Upon finding a search key, its child nodes are recursively searched until location information specifying the location of ingested data in which the search key is located is found.

## Claims

### Claim 1

A method, comprising:
receiving data from a plurality of different data sources;
generating a plurality of first index nodes for the received data at a first level of a hierarchical index structure, each index node comprising a plurality of search keys corresponding to a subset of the received data and location information specifying a location at which each of the plurality of search keys is stored in a corresponding data block; and
for each first subset of the first index nodes that comprise a number of duplicate search keys that exceed a first predetermined threshold, generating a second index node at a second level of the hierarchical index structure that comprises the duplicate search keys included in the first subset, the second index node pointing to each index node in the first subset of the first index nodes.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
merging at least two index nodes of the plurality of first index nodes.

### Claim 3 (depends on 2)

The method of claim 2, wherein said merging comprises:
determining that the at least two index nodes of the plurality of first index nodes have a size below a second predetermined threshold; and
merging the at least two index nodes responsive to determining that the at least two index nodes of the plurality of first index nodes have a size below the second predetermined threshold.

### Claim 4 (depends on 1)

The method of claim 1, wherein the location information comprises a uniform resource identifier identifying at least one of a path to a file or an offset thereof at which the corresponding data block is stored.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
maintaining a progress log that stores a first indication of each first index node that has been generated and a second indication of each second index node that has generated.

### Claim 6 (depends on 5)

The method of claim 5, wherein the progress log further comprises a third indication of data that has been received but for which a first index node has not yet been generated.

### Claim 7

A method, comprising:
receiving a search query comprising a search key; and
traversing a hierarchical index structure comprising a plurality of index nodes for the search key, said traversing comprising:
analyzing a first orphan index node of the plurality of index nodes located at the highest level of the hierarchical index structure to determine whether the first orphan index node or a first child index node of the first orphan index node comprises the search key;
responsive to determining that first orphan index node or the first child index node comprises the search key, retrieving a data record comprising the search key from a data block referenced by the first orphan index node or the first child index node and returning the data record in a response to the search query;
responsive to determining that the first orphan index node or the first child index node does not comprise the search key, analyzing a second orphan index node of the plurality of index nodes located at the highest level or at a lower level of the hierarchical index structure for the search key; and
responsive to determining that second orphan index node or the second child index node comprises the search key, retrieving the data record comprising the search key from a data block referenced by the second orphan index node or the second child index node and returning the data record in a response to the search query.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
maintaining a progress log that stores a first indication of each of the plurality of index nodes that have been generated for the hierarchical index structure.

### Claim 9 (depends on 8)

The method of claim 8, wherein the progress log further comprises a second indication of data blocks that have been stored in a file system but for which an index node has not yet been generated for the hierarchical index structure.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
determining that at least one data block of the data blocks comprises the search key;
retrieving the search key from the at least one data block; and
returning the search key retrieved from the at least one data block in the response to the search query.

### Claim 11 (depends on 10)

The method of claim 10, wherein said determining comprises:
performing a linear scan operation on the data blocks.

### Claim 12 (depends on 7)

The method of claim 7, wherein the data block is referenced by the first orphan index node or the first child index node via location information maintained by the first orphan index node or the first child index node.

### Claim 13 (depends on 7)

The method of claim 7, wherein the location information comprises a uniform resource identifier identifying at least one of a path to a file or an offset thereof at which the data block is stored.

### Claim 14 (depends on 7)

The method of claim 7, wherein the first orphan index node and the second orphan index node are parentless.

### Claim 15

A system, comprising:
at least one processor circuit; and
at least one memory that stores program code configured to be executed by the at least one processor circuit, the program code comprising:
a query processor configured to:
receive a search query comprising a search key; and
traverse a hierarchical index structure comprising a plurality of index nodes for the search key by:
analyzing a first orphan index node of the plurality of index nodes located at the highest level of the hierarchical index structure to determine whether the first orphan index node or a first child index node of the first orphan index node comprises the search key;
responsive to determining that first orphan index node or the first child index node comprises the search key, retrieving a data record comprising the search key from a data block referenced by the first orphan index node or the first child index node and returning the data record in a response to the search query;
responsive to determining that the first orphan index node or the first child index node does not comprise the search key, analyzing a second orphan index node of the plurality of index nodes located at the highest level or at a lower level of the hierarchical index structure for the search key; and
responsive to determining that second orphan index node or the second child index node comprises the search key, retrieving the data record comprising the search key from a data block referenced by the second orphan index node or the second child index node and returning the data record in a response to the search query.

### Claim 16 (depends on 15)

The system of claim 15, wherein a progress log is maintained that stores a first indication of each of the plurality of index nodes that have been generated for the hierarchical index structure.

### Claim 17 (depends on 16)

The system of claim 16, wherein the progress log further comprises a second indication of data blocks that have been stored in a file system but for which an index node has not yet been generated for the hierarchical index structure.

### Claim 18 (depends on 17)

The system of claim 17, wherein the query processor is further configured to:
determine that at least one data block of the data blocks comprises the search key;
retrieve the search key from the at least one data block; and
return the search key retrieved from the at least one data block in the response to the search query.

### Claim 19 (depends on 18)

The system of claim 18, wherein the query processor determines that at least one data block of the data blocks comprises the search key by:
performing a linear scan operation on the data blocks.

### Claim 20 (depends on 15)

The system of claim 15, wherein the data block is referenced by the first orphan index node or the first child index node via location information maintained by the first orphan index node or the first child index node.
