# US 2024/0004847 A1 · Anomaly detection in a split timeseries dataset

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

- Number: US 2024/0004847 A1
- Document ID: US20240004847A1
- Status: Published application
- Kind: A1
- Application number: 18/466,796
- Filed: 2023-09-13
- Published: 2024-01-04
- Earliest claimed: 2021-04-23
- Assignees: Capital One Services, LLC
- Applicants: Capital One Services, LLC
- Inventors: Vannia GONZALEZ MACIAS; Scott GARCIA; Peter TERRANA
- Web page: https://patentgrep.com/patent/US20240004847A1

## CPC

- G06F 16/215: Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
- G06F 21/552: {involving long-term monitoring or reporting}
- G06F 16/2474: {Sequence data queries, e.g. querying versioned data}
- G06F 21/554: {involving event detection and direct action}
- H04L 63/1425: {Traffic logging, e.g. anomaly detection}
- 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

Methods and systems are described herein for improving anomaly detection in timeseries datasets. Different machine learning models may be trained to process specific types of timeseries data efficiently and accurately. Thus, selecting a proper machine learning model for identifying anomalies in a specific set of timeseries data may greatly improve accuracy and efficiency of anomaly detection. Another way to improve anomaly detection is to process a multitude of timeseries datasets for a time period (e.g., 90 days) to detect anomalies from those timeseries datasets and then correlate those detected anomalies by generating an anomaly timeseries dataset and identifying anomalies within the anomaly timeseries dataset. Yet another way to improve anomaly detection is to divide a dataset into multiple datasets based on a type of anomaly detection requested.

## Claims

### Claim 1

A system for improving detection of anomalous activity, the system comprising:
one or more processors; and
a non-transitory computer-readable storage medium storing instructions, which when executed by the one or more processors cause the one or more processors to:
access a first dataset comprising a first type of data and a second dataset comprising a second type of data;
aggregate, based on a time interval, the first dataset into a first timeseries dataset and the second dataset into a second timeseries dataset;
input the first timeseries dataset into a first anomaly detection model and the second timeseries dataset into a second anomaly detection model to obtain a first set of anomalies and a second set of anomalies, wherein inputting the first timeseries dataset into the first anomaly detection model and the second timeseries dataset into the second anomaly detection model comprises automatically selecting, based on the first type of data or the second type of data, the first anomaly detection model or the second anomaly detection model for processing the first type of data or the second type of data, and wherein each anomaly detection model is a machine learning model trained to detect anomalies in timeseries datasets;
generate an anomaly timeseries dataset from the first set of anomalies and the second set of anomalies;
input the anomaly timeseries dataset into an anomaly detection model to obtain one or more anomalies; and
generate one or more alerts based on the one or more anomalies.

### Claim 2 (depends on 1)

The system of claim 1, wherein the instructions for generating the anomaly timeseries dataset from the first set of anomalies and the second set of anomalies further cause the one or more processors to:
storing, in a data structure for the first set of anomalies and the second set of anomalies, a first set of timestamps and a second set of timestamps in a chronological order;
selecting, the first set of anomalies and the second set of anomalies; and
placing each timestamp from each selected set of anomalies into the data structure in the chronological order to generate a chronologically ordered dataset.

### Claim 3 (depends on 2)

The system of claim 2, wherein the instructions for generating the anomaly timeseries dataset from the first set of anomalies and the second set of anomalies further cause the one or more processors to:
retrieve an aggregation time interval;
retrieve, from the chronologically ordered dataset, a time associated with a first timestamp stored in a first position within the chronologically ordered dataset;
traverse the chronologically ordered dataset until a second timestamp is reached, wherein the second timestamp is a last timestamp within a timeslot associated with the first timestamp; and
generating an aggregated value based on all timestamps starting from the first timestamp and ending with the second timestamp, wherein the aggregated value represents a count of anomalies detected starting with the first timestamp and ending with the second timestamp.

### Claim 4 (depends on 1)

The system of claim 1, wherein the instructions further cause the one or more processors to:
receive, from the anomaly detection model and based on the anomaly timeseries dataset, one or more probabilities corresponding to the one or more anomalies detected by the anomaly detection model;
retrieve an anomaly confidence threshold; and
remove from the one or more anomalies those anomalies that do not meet the anomaly confidence threshold.

### Claim 5

A method comprising:
accessing a first dataset comprising a first type of data and a second dataset comprising a second type of data;
aggregating, based on a time interval, the first dataset into a first timeseries dataset and the second dataset into a second timeseries dataset;
inputting the first timeseries dataset into a first anomaly detection model and the second timeseries dataset into a second anomaly detection model to obtain a first set of anomalies and a second set of anomalies, wherein inputting the first timeseries dataset into the first anomaly detection model and the second timeseries dataset into the second anomaly detection model comprises automatically selecting, based on the first type of data or the second type of data, the first anomaly detection model or the second anomaly detection model for processing the first type of data or the second type of data, and wherein each anomaly detection model is a machine learning model trained to detect anomalies in timeseries datasets;
generating an anomaly timeseries dataset from the first set of anomalies and the second set of anomalies;
inputting the anomaly timeseries dataset into an anomaly detection model to obtain one or more anomalies; and
generating one or more alerts based on the one or more anomalies.

### Claim 6 (depends on 5)

The method of claim 5, further comprising:
receiving a data attribute, wherein the data attribute identifies a field of a plurality of fields of a dataset;
identifying, based on comparing the data attribute with each field of the plurality of fields, a matching field for the data attribute; and
dividing, based the matching field, the dataset into a plurality of datasets, wherein the plurality of datasets includes the first dataset comprising the first type of data and the second dataset comprising the second type of data.

### Claim 7 (depends on 6)

The method of claim 6, wherein the plurality of fields includes a timestamp field, a value field, and a plurality of attribute fields.

### Claim 8 (depends on 6)

The method of claim 6, wherein determining the field of the plurality of fields that matches the data attribute comprises:
comparing the data attribute with each field of the plurality of fields; and
determining, based on the comparing, the field of the plurality of fields.

### Claim 9 (depends on 5)

The method of claim 5, further comprising transmitting the one or more alerts to an alert processing system.

### Claim 10 (depends on 5)

The method of claim 5, wherein generating the anomaly timeseries dataset comprises:
storing, in a data structure for the first set of anomalies and the second set of anomalies, a first set of timestamps and a second set of timestamps in a chronological order;
selecting the first set of anomalies and the second set of anomalies; and
placing each timestamp from each selected set of anomalies into the data structure in the chronological order to generate a chronologically ordered dataset.

### Claim 11 (depends on 10)

The method of claim 10, wherein generating the anomaly timeseries dataset comprises:
retrieving an aggregation time interval;
retrieving, from the chronologically ordered dataset, a time associated with a first timestamp stored in a first position within the chronologically ordered dataset;
traversing the chronologically ordered dataset until a second timestamp is reached, wherein the second timestamp is a last timestamp within a timeslot associated with the first timestamp; and
generating an aggregated value based on all timestamps starting from the first timestamp and ending with the second timestamp, wherein the aggregated value represents a count of anomalies detected starting with the first timestamp and ending with the second timestamp.

### Claim 12 (depends on 5)

The method of claim 5, further comprising:
receiving, from the anomaly detection model and based on the anomaly timeseries dataset, one or more probabilities corresponding to the one or more anomalies detected by the anomaly detection model;
retrieving an anomaly confidence threshold; and
removing from the one or more anomalies those anomalies that do not meet the anomaly confidence threshold.

### Claim 13

One or more non-transitory, computer-readable media storing instructions that, when executed by one or more processors, cause operations comprising:
accessing a first dataset comprising a first type of data and a second dataset comprising a second type of data;
aggregating, based on a time interval, the first dataset into a first timeseries dataset and the second dataset into a second timeseries dataset;
inputting the first timeseries dataset into a first anomaly detection model and the second timeseries dataset into a second anomaly detection model to obtain a first set of anomalies and a second set of anomalies, wherein inputting the first timeseries dataset into the first anomaly detection model and the second timeseries dataset into the second anomaly detection model comprises automatically selecting, based on the first type of data or the second type of data, the first anomaly detection model or the second anomaly detection model for processing the first type of data or the second type of data, and wherein each anomaly detection model is a machine learning model trained to detect anomalies in timeseries datasets;
generating an anomaly timeseries dataset from the first set of anomalies and the second set of anomalies;
inputting the anomaly timeseries dataset into an anomaly detection model to obtain one or more anomalies; and
generating one or more notifications of the one or more anomalies.

### Claim 14 (depends on 13)

The one or more non-transitory, computer-readable media of claim 13, wherein the instructions further cause the one or more processors to perform operations comprising:
receiving a data attribute, wherein the data attribute identifies a field of a plurality of fields of a dataset;
identifying, based on comparing the data attribute with each field of the plurality of fields, a matching field for the data attribute; and
dividing, based the matching field, the dataset into a plurality of datasets, wherein the plurality of datasets includes the first dataset comprising the first type of data and the second dataset comprising the second type of data.

### Claim 15 (depends on 14)

The one or more non-transitory, computer-readable media of claim 14, wherein the plurality of fields includes a timestamp field, a value field, and a plurality of attribute fields.

### Claim 16 (depends on 14)

The one or more non-transitory, computer-readable media of claim 14, wherein the instructions for determining the field of the plurality of fields that matches the data attribute cause the one or more processors to perform operations comprising:
comparing the data attribute with each field of the plurality of fields; and
determining, based on the comparing, the field of the plurality of fields.

### Claim 17 (depends on 13)

The one or more non-transitory, computer-readable media of claim 13, wherein the instructions further cause the one or more processors to transmit one or more alerts to an alert processing system.

### Claim 18 (depends on 13)

The one or more non-transitory, computer-readable media of claim 13, wherein the instructions for generating the anomaly timeseries dataset cause the one or more processors to perform operations comprising:
storing, in a data structure for the first set of anomalies and the second set of anomalies, a first set of timestamps and a second set of timestamps in a chronological order;
selecting the first set of anomalies and the second set of anomalies; and
placing each timestamp from each selected set of anomalies into the data structure in the chronological order to generate a chronologically ordered dataset.

### Claim 19 (depends on 18)

The one or more non-transitory, computer-readable media of claim 18, wherein the instructions for generating the anomaly timeseries dataset cause the one or more processors to perform operations comprising:
retrieving an aggregation time interval;
retrieving, from the chronologically ordered dataset, a time associated with a first timestamp stored in a first position within the chronologically ordered dataset;
traversing the chronologically ordered dataset until a second timestamp is reached, wherein the second timestamp is a last timestamp within a timeslot associated with the first timestamp; and
generating an aggregated value based on all timestamps starting from the first timestamp and ending with the second timestamp, wherein the aggregated value represents a count of anomalies detected starting with the first timestamp and ending with the second timestamp.

### Claim 20 (depends on 13)

The one or more non-transitory, computer-readable media of claim 13, wherein the instructions cause the one or more processors to perform operations comprising:
receiving, from the anomaly detection model and based on the anomaly timeseries dataset, one or more probabilities corresponding to the one or more anomalies detected by the anomaly detection model;
retrieving an anomaly confidence threshold; and
removing from the one or more anomalies those anomalies that do not meet the anomaly confidence threshold.
