Hierarchical Data Queries with Augmented AST Parent Identifiers

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing query languages for hierarchical data, such as XPath and JSON, require pre-preparation of data to include relationship information, leading to increased CPU overhead and memory consumption, and are unable to identify parent nodes without this information.

Innovation Solution

Augmenting the abstract syntax tree (AST) of a query with parent identifiers to identify ancestor objects, eliminating the need for pre-parsing the input data and allowing efficient query evaluation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If data is pre-prepared to include relationship information, then parent element identification is enabled, but CPU overhead increases and memory consumption increases

Engineering Contradiction:
Improveparent element identification capabilityVSAvoidCPU overhead
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent applies preliminary action by pre-processing the query's abstract syntax tree (AST) to augment it with parent identifiers before query execution. This shifts the computational workload from data preprocessing to query preprocessing, which is performed only once during query compilation rather than repeatedly during query evaluation, thereby reducing overall CPU overhead while enabling parent element identification.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses copying by creating an augmented version of the AST that includes parent identifier information. Instead of modifying the original data structure or creating a fully interconnected parsed input structure, the system creates a copy of the query representation (the AST) and augments this copy with additional metadata (parent identifiers), thus enabling parent identification without duplicating the entire data structure.

Inventive Principle:
Principle #26Copying

2Reliability

If data is pre-prepared to include relationship information, then parent element identification is enabled, but memory consumption increases

Engineering Contradiction:
Improveparent element identification capabilityVSAvoidmemory consumption
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent applies preliminary action by pre-processing the query's abstract syntax tree (AST) to augment it with parent identifiers before query execution. This shifts the computational workload from data preprocessing to query preprocessing, which is performed only once during query compilation rather than repeatedly during query evaluation, thereby reducing overall CPU overhead while enabling parent element identification.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses copying by creating an augmented version of the AST that includes parent identifier information. Instead of modifying the original data structure or creating a fully interconnected parsed input structure, the system creates a copy of the query representation (the AST) and augments this copy with additional metadata (parent identifiers), thus enabling parent identification without duplicating the entire data structure.

Inventive Principle:
Principle #26Copying

3Quantity of substance

If data is not modified to include relationship information, then memory consumption is reduced, but parent element identification is not possible

Engineering Contradiction:
Improvememory consumptionVSAvoidparent element identification capability
Core Design Contradiction:
Quantity of substanceVSReliability

Solution Approach 1:

The patent applies inversion by reversing the conventional approach: instead of augmenting the data structure with parent relationship information, the system augments the query representation (AST) with parent identifiers. This inversion allows parent element identification to work with unmodified data structures while maintaining low memory consumption, as the augmentation is applied to the query side rather than the data side.

Inventive Principle:
Principle #13The other way round (Inversion)

4Productivity

If query AST is processed to augment with parent identifiers, then query compilation overhead is incurred, but query evaluation becomes more efficient

Engineering Contradiction:
Improvequery evaluation efficiencyVSAvoidquery compilation time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by performing AST augmentation during query compilation rather than during query evaluation. The computationally intensive task of traversing the AST and adding parent identifiers is done once when the query is first parsed and compiled. The augmented AST is then cached and reused for subsequent evaluations of the same query, making the evaluation phase much more efficient while accepting a one-time compilation overhead.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12361025B2Hierarchical data
Publication Date: 2025.07.15 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US12361025B2 patent drawing
  • US12361025B2 patent drawing
  • US12361025B2 patent drawing

AI summary

A computer-implemented method, system and computer program product for identifying ancestor objects in hierarchical data configured for processing with a query, the query having an associated abstract syntax tree. The abstract syntax tree may be processed so as to generate an augmented abstract syntax tree which includes parent identifiers configured to identify the parent nodes of the query. In this way, a need to pre-parse the data may be alleviated. Instead, the identification of a parent node of a query may be encoded into the abstract syntax tree of the query.