Natural Language Database Interface with Query Fragment Graph

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Natural Language Interfaces for Databases (NLIDBs) face challenges in accurately mapping keywords and inferring join paths from user-submitted natural-language queries to structured queries, leading to inefficiencies in query processing and resource consumption due to the lack of explicit database table and column identification in NLQs and the reliance on simplistic rules for join path selection.

Innovation Solution

The implementation of a Query Fragment Graph (QFG) that tracks the frequency of query fragments and their co-occurrences, combined with similarity models and metadata, to rank candidate mappings and join paths, enabling the generation of structured queries that accurately represent user intent by selecting the most likely query fragments and join paths.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If natural-language queries are used without explicit database table and column identification, then ease of operation is improved, but measurement precision deteriorates

Engineering Contradiction:
Improveease of operationVSAvoidmeasurement precision
Core Design Contradiction:
Ease of operationVSMeasurement precision

Solution Approach 1:

The patent introduces an intermediary component (the NLIDB system with Query Fragment Graph) that mediates between the natural-language query and the database. This intermediary automatically performs keyword mapping and join path inference, allowing users to operate with simple natural language while the system bridges the semantic gap to generate precise structured queries with correct table and column mappings.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces the mechanical system of manual query construction (where users must explicitly specify tables and columns) with an automated information processing system. The NLIDB uses similarity models, metadata, and statistical analysis to automatically infer the intended database structure from natural-language keywords, substituting manual precision requirements with automated semantic understanding.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Device complexity

If simplistic rules are used for join path selection, then device complexity is reduced, but productivity deteriorates

Engineering Contradiction:
Improvedevice complexityVSAvoidproductivity
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent implements preliminary action by pre-computing and storing join path statistics in the Query Fragment Graph before query processing. The system analyzes historical query data to determine the frequency and effectiveness of different join paths, storing this information in advance. When a natural-language query is processed, the system can quickly retrieve and apply the pre-analyzed join path information, avoiding complex real-time analysis while improving query generation productivity.

Inventive Principle:
Principle #10Preliminary action

3Manufacturing precision

If automated keyword mapping and join path inference are implemented, then manufacturing precision is improved, but device complexity increases

Engineering Contradiction:
Improvemanufacturing precisionVSAvoiddevice complexity
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The patent segments the complex task of natural-language query translation into distinct functional modules: keyword extraction, similarity-based mapping, join path inference, and query assembly. Each module handles a specific aspect of the translation process, making the overall complex system manageable through functional decomposition. The Query Fragment Graph serves as a separate data structure that stores pre-computed mapping relationships, separating the complexity of analysis from the simplicity of query generation.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11226960B2Natural-language database interface with automated keyword mapping and join-path inferences
Publication Date: 2022.01.18 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11226960B2 patent drawing
  • US11226960B2 patent drawing
  • US11226960B2 patent drawing

AI summary

A natural language interface for databases (NLIDB) component of a database-management system receives a user-submitted natural-language query. The NLIDB parses the query into keywords and maps each keyword onto a corresponding query fragment that identifies a predicate of a non-join condition, or other type of expression, of a structured query. The NLIDB selects an optimal mapping for each keyword with the aid of a Query Fragment Graph (QFG) that counts the number of occurrences of each fragment, and the number of co-occurrences of each pair of fragments, in previously received structured queries. The NLIDB then uses the QFG, optionally augmented by contextual data, to select join paths most likely to be consistent with the semantic intent of the user. The NLIDB generates a structured query that incorporates the mapped query fragments and selected join paths and forwards. The structured the query is then forwarded to downstream DBMS components.