# US 10,872,095 B2 · Aggregation framework system architecture and method

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

- Number: US 10,872,095 B2
- Document ID: US10872095B2
- Status: Granted
- Kind: B2
- Application number: 16/013,720
- Filed: 2018-06-20
- Published: 2018-10-18
- Granted: 2020-12-22
- Earliest claimed: 2012-07-26
- Assignees: MongoDB, Inc.
- Applicants: MongoDB, Inc.
- Inventors: Eliot Horowitz; David Lenox Storch; Charles William Swanson
- Web page: https://patentgrep.com/patent/US10872095B2

## CPC

- G06F 16/258: {Data format conversion from or to a database}
- G06F 16/23: Updating
- G06F 16/24556: {Aggregation; Duplicate elimination}
- G06F 16/2471: {Distributed queries}
- G06F 16/254: {Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F 16/284: {Relational databases}
- G06F 16/248: Presentation of query results
- G06F 16/951: Indexing; Web crawling techniques
- G06F 16/958: Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and computer implemented method for execution of aggregation expressions on a distributed non-relational database system is provided. According to an aspect, an operation is provided to perform the aggregation operation. An indication of at least one foreign collection of documents is accepted. An indication of at least one variable for at least one local field of at least one local collection of documents is accepted. An indication of a pipeline for execution on the at least one local collection of documents and the at least one foreign collection of documents is accepted. An operation comparing the local field of the at least one local collection of documents and the foreign field of the at least one foreign collection of documents is performed. Responsive to the operation, data from the at least one local collection of documents and the at least one foreign collection of documents is aggregated.

## Claims

### Claim 1

A computer implemented method for execution of aggregation expressions on a distributed non-relational database system, the method comprising the acts of:
executing, by a computer system, an aggregation operation, wherein the aggregation operation includes a plurality of data operations on a distributed non-relational database having a plurality of collections of documents including at least one local collection of documents and at least one foreign collection of documents;
providing an operation using the at least one local collection of documents and the at least one foreign collection of documents, wherein the operation performing the aggregation operation comprises the acts of:
accepting an indication of the at least one foreign collection of documents;
accepting an indication of at least one variable for at least one local field of the at least one local collection of documents;
accepting an indication of a pipeline for execution on the at least one local collection of documents and the at least one foreign collection of documents, wherein the indication of the pipeline includes:
an indication of at least one foreign field of the at least one foreign collection of documents;
an indication of the at least one variable for the at least one local field of the at least one local collection of documents, wherein referencing the at least one variable allows access to the at least one local field from the pipeline; and
an indication of a comparison operation for comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents;
performing the comparison operation comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents; and
aggregating data from the at least one local collection of documents and the at least one foreign collection of documents responsive to the comparison operation.

### Claim 2 (depends on 1)

The computer implemented method according to claim 1, further comprising the acts of:
accepting an indication of a sub-pipeline for execution on the at least one local collection of documents and the at least one foreign collection of documents, wherein the indication of the sub-pipeline includes:
an indication of the at least one foreign field of the at least one foreign collection of documents;
an indication of the at least one variable for the at least one local field of the at least one local collection of documents, wherein referencing the at least one variable allows access to the at least one local field from the sub-pipeline; and
an indication of a second comparison operation for comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents;
performing the second comparison operation comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents; and
aggregating data from the at least one local collection of documents and the at least one foreign collection of documents responsive to the second comparison operation.

### Claim 3 (depends on 2)

The computer implemented method according to claim 2, further comprising the act of creating, for the sub-pipeline, a context for allowing access to the at least one variable for the at least one local field of the at least one local collection of documents.

### Claim 4 (depends on 1)

The computer implemented method according to claim 1, wherein the indication of the pipeline further includes an indication of a second comparison operation for comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents, further comprising the acts of:
performing the second comparison operation comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents; and
aggregating data from the at least one local collection of documents and the at least one foreign collection of documents responsive to the comparison operation and/or the second comparison operation.

### Claim 5 (depends on 1)

The computer implemented method according to claim 1, wherein the comparison operation is selected from the group consisting of an equality operation, a non-equality operation, a less than operation, a less than or equal operation, a greater than operation, and a greater than or equal operation.

### Claim 6 (depends on 1)

The computer implemented method according to claim 1, further comprising the act of:
caching the aggregated data from the at least one foreign collection of documents responsive to the comparison operation,
wherein a subsequent iteration of the pipeline retrieves the cached aggregated data instead of repeating the aggregating of the data from the at least one foreign collection of documents.

### Claim 7 (depends on 1)

The computer implemented method according to claim 1, further comprising an act of creating an output data structure including a result of the aggregated data.

### Claim 8 (depends on 1)

The computer implemented method according to claim 1, wherein the non-relational database system is a NoSQL database system.

### Claim 9 (depends on 1)

The computer implemented method according to claim 1, wherein the act of aggregating data from the at least one local collection of documents responsive to the comparison operation comprises the acts of:
aggregating data from the at least one local collection of documents including at least one identified field of the at least one local collection of documents; and/or
aggregating data from the at least one foreign collection of documents including at least one identified field of the at least one foreign collection of documents.

### Claim 10 (depends on 1)

The computer implemented method according to claim 1, wherein the act of aggregating data from the at least one local collection of documents comprises the act of grouping documents of the at least one local collection of documents.

### Claim 11

A distributed database system for execution of aggregation expressions on a distributed non-relational database system, the system comprising:
at least one processor operatively connected to a memory;
a distributed non-relational database having a plurality of collections of documents including at least one local collection of documents and at least one foreign collection of documents;
a component adapted to perform an operation using the at least one local collection of documents and the at least one foreign collection of documents, comprising:
means for accepting an indication of the at least one foreign collection of documents;
means for accepting an indication of at least one variable for at least one local field of the at least one local collection of documents;
means for accepting an indication of a pipeline for execution on the at least one local collection of documents and the at least one foreign collection of documents, wherein the indication of the pipeline includes:
an indication of at least one foreign field of the at least one foreign collection of documents;
an indication of the at least one variable for the at least one local field of the at least one local collection of documents, wherein referencing the at least one variable allows access to the at least one local field from the pipeline; and
an indication of a comparison operation for comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents;
means for performing the comparison operation comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents; and
means for aggregating data from the at least one local collection of documents and the at least one foreign collection of documents responsive to the comparison operation.

### Claim 12 (depends on 11)

The system according to claim 11, further comprising:
means for accepting an indication of a sub-pipeline for execution on the at least one local collection of documents and the at least one foreign collection of documents, wherein the indication of the sub-pipeline includes:
an indication of the at least one foreign field of the at least one foreign collection of documents;
an indication of the at least one variable for the at least one local field of the at least one local collection of documents, wherein referencing the at least one variable allows access to the at least one local field from the sub-pipeline; and
an indication of a second comparison operation for comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents;
means for performing the second comparison operation comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents; and
means for aggregating data from the at least one local collection of documents and the at least one foreign collection of documents responsive to the second comparison operation.

### Claim 13 (depends on 12)

The system according to claim 12, further comprising means for creating, for the sub-pipeline, a context for allowing access to the at least one variable for the at least one local field of the at least one local collection of documents.

### Claim 14 (depends on 11)

The system according to claim 11, wherein the indication of the pipeline further includes an indication of a second comparison operation for comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents, further comprising:
means for performing the second comparison operation comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents; and
means for aggregating data from the at least one local collection of documents and the at least one foreign collection of documents responsive to the comparison operation and/or the second comparison operation.

### Claim 15 (depends on 11)

The system according to claim 11, wherein the comparison operation is selected from the group consisting of an equality operation, a non-equality operation, a less than operation, a less than or equal operation, a greater than operation, and a greater than or equal operation.

### Claim 16 (depends on 11)

The system according to claim 11, further comprising:
means for caching the aggregated data from the at least one foreign collection of documents responsive to the comparison operation,
wherein a subsequent iteration of the pipeline retrieves the cached aggregated data instead of repeating the aggregating of the data from the at least one foreign collection of documents.

### Claim 17 (depends on 11)

The system according to claim 11, further comprising means for creating an output data structure including a result of the aggregated data.

### Claim 18 (depends on 11)

The system according to claim 11, wherein the non-relational database system is a NoSQL database system.

### Claim 19 (depends on 11)

The system according to claim 11, wherein the means for aggregating data from the at least one local collection of documents responsive to the comparison operation comprises:
means for aggregating data from the at least one local collection of documents including at least one identified field of the at least one local collection of documents; and/or
means for aggregating data from the at least one foreign collection of documents including at least one identified field of the at least one foreign collection of documents.

### Claim 20 (depends on 11)

The system according to claim 11, wherein the means for aggregating data from the at least one local collection of documents comprises means for grouping documents of the at least one local collection of documents.

### Claim 21

A computer implemented method for execution of aggregation expressions on a distributed non-relational database system, the method comprising the acts of:
receiving, by a computer system, an operation referencing at least one local collection of documents and at least one foreign collection of documents, wherein the operation comprises the acts of:
accepting an indication of a pipeline for execution on the at least one local collection of documents and the at least one foreign collection of documents, wherein the indication of the pipeline includes an indication of a comparison operation for comparing at least one local field of the at least one local collection of documents and at least one foreign field of the at least one foreign collection of documents;
performing the comparison operation comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents; and
aggregating data from the at least one local collection of documents and the at least one foreign collection of documents responsive to the comparison operation.

### Claim 22 (depends on 21)

The computer implemented method according to claim 21, wherein the operation further comprises the acts of:
accepting an indication of a sub-pipeline for execution on the at least one local collection of documents and the at least one foreign collection of documents, wherein the indication of the sub-pipeline includes an indication of a second comparison operation for comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents;
performing the second comparison operation comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents; and
aggregating data from the at least one local collection of documents and the at least one foreign collection of documents responsive to the second comparison operation.

### Claim 23 (depends on 22)

The computer implemented method according to claim 22, further comprising the act of creating, for the sub-pipeline, a context for allowing access to at least one variable for the at least one local field of the at least one local collection of documents.

### Claim 24 (depends on 21)

The computer implemented method according to claim 21, wherein the indication of the pipeline further includes an indication of a second comparison operation for comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents, further comprising the acts of:
performing the second comparison operation comparing the at least one local field of the at least one local collection of documents and the at least one foreign field of the at least one foreign collection of documents; and
aggregating data from the at least one local collection of documents and the at least one foreign collection of documents responsive to the comparison operation and/or the second comparison operation.
