# US 2026/0093670 A1 · Systems and methods for transformer integration into dynamic schema databases

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

- Number: US 2026/0093670 A1
- Document ID: US20260093670A1
- Status: Published application
- Kind: A1
- Application number: 19/347,384
- Filed: 2025-10-01
- Published: 2026-04-02
- Earliest claimed: 2024-10-02
- Assignees: MongoDB, Inc.
- Applicants: MongoDB, Inc.
- Inventors: Thomas Rueckstiess; Yixuan Huang
- Web page: https://patentgrep.com/patent/US20260093670A1

## CPC

- G06F 16/212: {with details for data modelling support}
- G06F 16/211: {Schema design and management}
- G06F 40/274: Converting codes to words; Guess-ahead of partial word inputs
- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06N 20/00: Machine learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Provided is a system for processing semi-structured data, comprising a tokenization module configured to convert JSON objects into token sequences by recursively traversing keys and values (e.g., in depth-first order) and generating sequences of key tokens, value tokens, and grammatical tokens, wherein key tokens are distinguished from value tokens through a transformation that wraps original key strings in a special token format. The system includes a positional encoding module configured to generate hierarchical position embeddings using a PDA that maintains a stack reflecting parsing state, wherein the positional encoding module computes position embeddings by summing embeddings of stack symbols present at each sequence position. A transformer architecture comprising multiple layers of self-attention mechanisms is configured to process combined token and position embeddings. A grammar validation module is configured to enforce valid token sequences by suppressing logits corresponding to invalid transitions according to JSON grammar rules encoded in the PDA.

## Claims

### Claim 1

A system for integrating transformer architecture, the system comprising:
at least one processor operatively connected to a memory, the at least one processor configured to:
tokenize dynamic schema database data, the tokenization including positional information associated with the source data;
train a transformer model on the tokenized dynamic schema database data and the positional information as an input;
the transformer model configured to generate predictive distributions corresponding to key value pairs and a valid format for dynamic schema database data; and
output key value pairs associated with the prediction of the valid format.

### Claim 2 (depends on 1)

The system of claim 1, wherein the tokenization includes operations to maintain data architecture information associated with the source data.

### Claim 3 (depends on 1)

The system of claim 1, wherein the tokenization includes operations to preserve key and value information stored in a source document without reduction to sub-words.

### Claim 4 (depends on 1)

The system of claim 1, wherein at least one processor is configured to instantiate a pre-trained transformer model, the pre-trained transformer model trained on dynamic schema database data and data architecture information, to output a next data element based on an input data element.

### Claim 5 (depends on 4)

The system of claim 4, wherein the at least one processor is configured to:
generate a predictive distribution associated with frequency of occurrence of respective data elements in response to an input of data elements to the pre-trained transformer model; and
define an encoding of associated short code words to data elements based on predicted frequency of occurrence.

### Claim 6 (depends on 4)

The system of claim 4, wherein the at least one processor is configured to:
generate a predictive distribution associated with frequency of occurrence of respective output data elements associated with execution of the query in response to an input of data elements taken from a query under execution to the pre-trained transformer model; and
define an encoding of associated short code words to data elements based on predicted frequency of occurrence.

### Claim 7 (depends on 4)

The system of claim 4, wherein the at least one processor is configured to:
generate an output of new dynamic schema database data having a valid format and architecture consistent with the source database in response to an input of data elements taken from a source database including dynamic schema database data.

### Claim 8 (depends on 4)

The system of claim 4, wherein the at least one processor is configured to:
generate a cardinality estimate for queries without having to execute the queries on the source dataset in response to an input of data elements including dynamic schema database data.

### Claim 9 (depends on 8)

The system of claim 8, wherein the at least one processor is configured to:
generate predictive documents unconditionally; and
evaluate generated probabilities of a next token following a runtime key input.

### Claim 10 (depends on 9)

The system of claim 9, wherein the at least one processor is configured to analyze the probabilities that match a predicate input.

### Claim 11 (depends on 10)

The system of claim 10, wherein the pre-trained transformer model is configured to generate an output specific to previously generated tokens.

### Claim 12

A computer-implemented method for integrating transformer architecture, the method comprising:
tokenizing, by at least one processor, dynamic schema database data, the tokenization including positional information associated with the source data;
training, by the at least one processor, a transformer model on the tokenized dynamic schema database data and the positional information as an input;
predicting, using the transformer model, distributions corresponding to key value pairs and a valid format for dynamic schema database data; and
producing key value pairs associated with the prediction of the valid format.

### Claim 13 (depends on 12)

The method of claim 12, wherein tokenizing includes maintaining data architecture information associated with the source data.

### Claim 14 (depends on 12)

The method of claim 12, wherein tokenizing includes preserving key and value information stored in a source document without reduction to sub-words.

### Claim 15 (depends on 12)

The method of claim 12, wherein the method comprises instantiating a pre-trained transformer model, the pre-trained transformer model trained on dynamic schema database data and data architecture information, to output a next data element based on an input data element.

### Claim 16 (depends on 15)

The method of claim 15, wherein the method comprises:
generating a predictive distribution associated with frequency of occurrence of respective data elements in response to an input of data elements to the pre-trained transformer model; and
defining an encoding of associated short code words to data elements based on predicted frequency of occurrence.

### Claim 17 (depends on 15)

The method of claim 15, wherein the method comprises:
generating a predictive distribution associated with frequency of occurrence of respective output data elements associated with execution of the query in response to an input of data elements taken from a query under execution to the pre-trained transformer model; and
defining an encoding of associated short code words to data elements based on predicted frequency of occurrence.

### Claim 18 (depends on 15)

The method of claim 15, wherein the method comprises:
generating an output of new dynamic schema database data having a valid format and architecture consistent with the source database in response to an input of data elements taken from a source database including dynamic schema database data.

### Claim 19 (depends on 15)

The method of claim 15, wherein the method comprises:
generating a cardinality estimate for queries without having to execute the queries on the source dataset in response to an input of data elements including dynamic schema database data.

### Claim 20 (depends on 19)

The method of claim 19, wherein the method comprises:
generating predictive documents unconditionally; and
evaluating generated probabilities of a next token following a runtime key input.
