Streaming XPath Processor Query Evaluation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for evaluating XPath queries on XML documents are inefficient due to memory usage issues and delayed output, as they require accumulating all possible output nodes before parsing is complete, and do not effectively handle unevaluated predicates in real-time processing.

Innovation Solution

A system and method for evaluating XPath queries using a streaming XPath processor that identifies potential output nodes and buffers them at each location step with unevaluated predicates, progressively evaluating these predicates as data becomes available, allowing for simultaneous processing of multiple queries and reducing memory usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If all possible output nodes are accumulated before parsing is complete, then predicate evaluation can be performed, but memory usage increases inefficiently

Engineering Contradiction:
Improvepredicate evaluation completenessVSAvoidmemory usage
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent segments the accumulation process by creating separate buffers for different location steps rather than accumulating all output nodes in a single large structure. Each buffer stores only the nodes relevant to that specific location step, dividing the memory burden into manageable segments that can be processed independently.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary buffering of output nodes at each location step during the parsing process, rather than waiting until parsing is complete. This allows predicate evaluation to begin earlier on buffered nodes while the parser continues processing, reducing the peak memory requirement by gradually evaluating predicates as data becomes available.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If output is delayed till parsing is complete, then all data is available for evaluation, but processing time increases

Engineering Contradiction:
Improveevaluation accuracyVSAvoidoutput delay
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent performs preliminary buffering of output nodes at each location step during the parsing process, rather than waiting until parsing is complete. This allows predicate evaluation to begin earlier on buffered nodes while the parser continues processing, reducing the peak memory requirement by gradually evaluating predicates as data becomes available.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent maintains continuous processing by evaluating predicates on buffered nodes as they become available during parsing, rather than stopping to wait for complete parsing. The parser and predicate evaluation operate in a continuous manner, with evaluation proceeding on already-parsed portions while parsing continues on remaining data.

Inventive Principle:
Principle #20Continuity of useful action

3Productivity

If multiple XPath queries are processed simultaneously, then processing efficiency improves, but complexity of managing multiple queries increases

Engineering Contradiction:
Improvequery processing throughputVSAvoidquery management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent merges the processing of multiple XPath queries by sharing common buffers and evaluation logic across all queries. Instead of maintaining separate processing streams for each query, the system combines them into a unified processing framework where location steps and predicates can be evaluated once and reused across multiple queries that share those elements.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent creates universal buffers and evaluation mechanisms that serve multiple query types simultaneously. The buffer structure and predicate evaluation logic are designed to be query-agnostic, allowing the same infrastructure to handle diverse XPath queries with different location steps and predicates, reducing the overhead of managing multiple separate processing systems.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS8117188B1Evaluation of multiple Xpath queries in a streaming XPath processor
Publication Date: 2012.02.14 GOOGLE LLC
  • US8117188B1 patent drawing
  • US8117188B1 patent drawing
  • US8117188B1 patent drawing

AI summary

Evaluation of Multiple XPath Queries in a Streaming XPath Processor. A hit of a location path is determined in a SAX event. All XPath queries corresponding to the location path are then identified. XML nodes associated with the SAX event is identified as potential output nodes for all XPath queries including the location path as a main location path. The potential output nodes are nodes satisfying criteria of a node test of a last location step of the main location path. The potential output nodes are then buffered for all XPath queries comprising unevaluated predicates. For each XPath query the potential output nodes are buffered at a location step including an unevaluated predicate. Thereafter, all XPath queries are evaluated by progressively evaluating the unevaluated predicates of all XPath queries based on availability of data.