Query Expression Error Detection Using Word Pair Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods and systems fail to effectively detect and correct errors in query expressions, particularly in large applications and schema-less databases, as they struggle to identify combination errors and provide suitable corrections, especially when queries are embedded throughout code and relationship derivation using database schema is not applicable.

Innovation Solution

A computer-implemented method and system that extracts and compares word sets from queries before and after editing, determining differences and generating error reports with correction suggestions, enabling error detection and correction regardless of database schema, using word pair combinations and combination strengths.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If database schema information is used for relationship derivation, then query relationships can be detected, but schema-less databases present difficulties and combination errors remain undetectable

Engineering Contradiction:
Improvequery error detection capabilityVSAvoidcompatibility with schema-less databases
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent introduces word pair combinations as an intermediary mechanism to detect query relationships. Instead of relying directly on database schema (which doesn't exist in schema-less databases), the system extracts word pairs from queries and uses their co-occurrence patterns as a mediator to infer relationships between query elements, enabling error detection in both schema-based and schema-less databases

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces the mechanical dependency on database schema structures with a linguistic analysis approach. By substituting schema-based relationship derivation with word pair combination analysis from query text, the system achieves schema-independent error detection that works across different database types

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

2Ease of operation

If queries are embedded throughout application code, then functional relationships can be understood, but error detection becomes more difficult as queries are spread across multiple locations

Engineering Contradiction:
Improveunderstanding of functional relationshipsVSAvoidquery error detection difficulty
Core Design Contradiction:
Ease of operationVSDifficulty of detecting and measuring

Solution Approach 1:

The patent segments the scattered query embeddings into extractable query units by identifying word pair combinations. By breaking down the distributed query code into discrete query segments based on linguistic patterns, the system can analyze each segment's word pairs independently and aggregate the results for comprehensive error detection across the entire application

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system extracts word pairs from queries before and after editing, compares the combinations, and provides feedback through error reports. This feedback mechanism identifies changes in word pair combinations that indicate errors, allowing the system to detect issues in embedded queries regardless of their location in the codebase

Inventive Principle:
Principle #23Feedback

3Reliability

If word pair combinations are analyzed to detect errors, then combination errors become detectable, but the system complexity increases compared to schema-based methods

Engineering Contradiction:
Improvecombination error detection accuracyVSAvoiderror detection system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system performs self-service by automatically extracting word pairs from queries and generating error reports without requiring external schema information. The word pair combination analysis is self-contained, using only the query text itself to detect errors, which simplifies the overall system architecture by eliminating dependencies on database schema infrastructure

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11995070B2Query expression error detection and correction
Publication Date: 2024.05.28 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11995070B2 patent drawing
  • US11995070B2 patent drawing
  • US11995070B2 patent drawing

AI summary

A method, system, and computer program product for error detection and correction of query expressions are provided. The method extracts a first set of queries from a set of programs prior to query editing. A first word set is generated from the first set of queries. A second set of queries are extracted from the set of programs after query editing. A second word set is generated from the second set of queries. The method determines a set of differences for word pairs within the first word set and the second word set. A third word set is generated from one or more edited queries based on the set of differences. The method generates an error report for the third word set based on the third word set and the set of differences.