Parallel Document Stream Search for Twig Pattern Matching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

As document size increases, the memory usage and search time for tree representations grow exponentially, making it inefficient to search for twig patterns in large documents.

Innovation Solution

The document tree is simplified into multiple linear streams, allowing each processing thread to search for matching twig patterns in parallel by dividing the tree into disjoint sub-trees and searching sub-streams associated with each sub-tree.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If a tree representation is used to store and search documents, then search accuracy for twig patterns is maintained, but memory usage grows exponentially as document size increases

Engineering Contradiction:
Improvesearch accuracyVSAvoidmemory usage
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent divides the document tree into multiple linear streams by separating node data from tree structure. Each stream contains nodes with the same label in preorder traversal sequence, allowing the large tree to be segmented into manageable linear sequences that reduce memory requirements while maintaining search capability through the stream-based twig pattern matching algorithm.

Inventive Principle:
Principle #1Segmentation

2Measurement precision

If a tree representation is used to store and search documents, then search accuracy is maintained, but search time increases exponentially as document size increases

Engineering Contradiction:
Improvesearch accuracyVSAvoidsearch time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The tree is segmented into linear streams, enabling the search algorithm to process nodes in a more efficient linear manner rather than traversing the entire tree structure. This segmentation reduces the exponential time complexity by allowing the algorithm to match twig patterns across streams using a linear-time approach.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent transforms the two-dimensional tree structure into a one-dimensional linear stream representation. This dimensional change simplifies the search problem from complex tree traversal to linear sequence processing, significantly reducing search time while maintaining the ability to match twig patterns through the linear arrangement of nodes.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Quantity of substance

If the document tree is simplified into linear streams, then memory usage is reduced, but the complexity of handling tree relationships is increased

Engineering Contradiction:
Improvememory usageVSAvoidprocessing complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent performs preliminary action by pre-traversing the document tree in preorder sequence and organizing nodes into streams based on their labels before the actual search operation. This preprocessing step captures the essential tree relationship information (parent-child and ancestor-descendant relationships) in the linear stream structure, so that during search, the algorithm only needs to process the simplified stream data rather than re-analyzing complex tree structures.

Inventive Principle:
Principle #10Preliminary action

4Productivity

If multiple processing threads search streams in parallel, then search speed increases, but coordination complexity between threads is increased

Engineering Contradiction:
Improvesearch speedVSAvoidthread coordination complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the document streams into distinct portions that can be independently processed by multiple threads. Each thread is assigned specific streams or stream ranges to search for twig patterns, eliminating the need for complex thread coordination while enabling parallel processing. The segmentation is designed so that threads operate independently on disjoint data, maximizing search speed without introducing coordination overhead.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS9405820B2System and method for parallel searching of a document stream
Publication Date: 2016.08.02 TECHNION RES & DEV FOUND LTD
  • US9405820B2 patent drawing
  • US9405820B2 patent drawing
  • US9405820B2 patent drawing

AI summary

A system and method for searching a document for a query pattern. A plurality of streams may be stored each including a linear sequence of nodes. Each stream may be associated with nodes having a common label in a data tree of the document. A query pattern may be searched for in the streams by executing a plurality of threads. Each of two or more of the threads may be used to search different sub-streams of the plurality of streams. Each of the different sub-streams searched for by each thread in each stream may be uniquely correlated with one or more disjoint sub-trees of a partition of the tree into a plurality of sub-trees. The two or more of the plurality of threads may be executed in parallel. A result of the query pattern search may be generated using at least one of the threads.