IP Library Granted Patent US 8,688,721
Granted Patent B2
US 8,688,721 · App. 13/113,657 · Granted Apr 1, 2014

Query evaluation using ancestor information

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,688,721
App. No.
13/113,657
Granted
Apr 1, 2014
Kind
B2
Abstract

Provided are techniques for processing a query. A query is received, wherein the query is formed by one or more paths, and wherein each path includes one or more steps. A hierarchical document including one or more document nodes is received. While processing the query and traversing the hierarchical document, one or more extraction entries are constructed, wherein each extraction entry includes a step instance match candidate identifying a document node and a step instance ancestor path for the document node, and one or more tuples are constructed using the one or more extraction entries by associating the step instance match candidate from one of the one or more extraction entries with the step instance match candidate from at least one of the one or more other extraction entries.

Claims (51)

1. A method of determining a flush point, comprising:

receiving, with a computer including a processor, a query, wherein the query is formed by one or more paths, and wherein each path includes one or more steps, wherein a query structure represents the query, wherein the query structure includes query nodes, and wherein each of the query nodes is flagged with a FOR binding or a LET binding;

receiving a hierarchical document including one or more document nodes;

determining whether there is a parent axis in the query;

in response to determining that there is no parent axis in the query,

identifying a first query node in the query structure by traversing the query structure up from one or more extraction nodes and stopping at a first one of the query node flagged with the FOR binding from among the query nodes or a root node of the query structure;

flagging the first query node as a flush candidate;

identifying a second query node by traversing the query structure from the root node of the query structure downwards until finding the query node that is flagged with a FlushCandidate identifier or the query node that has more than one child from among the query nodes; and

flagging the second query node as the flush point.

2. The method of claim 1 , further comprising:

determining whether there is at least one recursive node in the hierarchical document detected during traversal of the hierarchical document that is described by the query node in the query structure flagged with the FOR binding from among the query nodes while using a descendant axis; and

in response to determining that there is at least one recursive node, setting an outermost recursive node to be a new flush point.

3. The method of claim 1 , further comprising:

in response to determining that there is a parent axis in the query,

identifying a third query node that is associated with a step that is previous to a previous step of the parent axis; and

flagging the third node as the flush point.

4. A computer program product for determining a flush point comprising:

a non-transitory computer-readable medium storing a computer readable program, wherein the computer readable program, when executed by a processor on a computer, causes the computer to:

receive a query, wherein the query is formed by one or more paths, and wherein each path includes one or more steps, wherein a query structure represents the query, wherein the query structure includes query nodes, and wherein each of the query nodes is flagged with a FOR binding or a LET binding;

receive a hierarchical document including one or more document nodes;

determine whether there is a parent axis in the query;

in response to determining that there is no parent axis in the query,

identify a first query node in the query structure by traversing the query structure up from one or more extraction nodes and stopping at a first one of the query node flagged with the FOR binding from among the query nodes or a root node of the query structure;

flag the first query node as a flush candidate;

identify a second query node by traversing the query structure from the root node of the query structure downwards until finding the query node that is flagged with a FlushCandidate identifier or the query node that has more than one child from among the query nodes; and

flag the second query node as the flush point.

5. The computer program product of claim 4 , wherein the computer readable program when executed on a computer causes the computer to:

determine whether there is at least one recursive node in the hierarchical document detected during traversal of the hierarchical document that is described by the query node in the query structure flagged with the FOR binding from among the query nodes while using a descendant axis; and

in response to determining that there is at least one recursive node, set an outermost recursive node to be a new flush point.

6. The computer program product of claim 4 , wherein the computer readable program when executed on a computer causes the computer to:

in response to determining that there is a parent axis in the query,

identify a third query node that is associated with a step that is previous to a previous step of the parent axis; and

flag the third node as the flush point.

7. A system of determining a flush point, comprising:

a processor; and

storage coupled to the processor, wherein the storage stores a computer program, and wherein the processor is configured to execute the computer program to perform operations, and wherein the operations comprise:

receiving a query, wherein the query is formed by one or more paths, and wherein each path includes one or more steps, wherein a query structure represents the query, wherein the query structure includes query nodes, and wherein each of the query nodes is flagged with a FOR binding or a LET binding;

receiving a hierarchical document including one or more document nodes;

determining whether there is a parent axis in the query;

in response to determining that there is no parent axis in the query,

identifying a first query node in the query structure by traversing the query structure up from one or more extraction nodes and stopping at a first one of the query node flagged with the FOR binding from among the query nodes or a root node of the query structure;

flagging the first query node as a flush candidate;

identifying a second query node by traversing the query structure from the root node of the query structure downwards until finding the query node that is flagged with a FlushCandidate identifier or the query node that has more than one child from among the query nodes; and

flagging the second query node as the flush point.

8. The system of claim 7 , wherein the operations further comprise:

determining whether there is at least one recursive node in the hierarchical document detected during traversal of the hierarchical document that is described by the query node in the query structure flagged with a FOR binding while using a descendant axis; and

in response to determining that there is at least one recursive node, setting an outermost recursive node to be a new flush point.

9. The system of claim 7 , wherein the operations further comprise:

in response to determining that there is a parent axis in the query,

identifying a third query node that is associated with a step that is previous to a previous step of the parent axis; and

flagging the third node as the flush point.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 15, 2021
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: AIRBNB, INC.
Reel/Frame 056427/0193 →