Processing search queries using a data structure
First Claim
1. A method of processing a search query to provide a search result, the method comprisingreceiving at a computer device a search query message, the search query message identifying a source node and a target node;
- responsive to receiving the search query message, accessing a data structure, wherein each landmark node identified within the data structure has stored therewith a shortest path tree in the form of a set of parent links, wherein each parent link identifies an adjacent vertex node;
for each landmark node, identifying a location of the source node and a location of the target node in the shortest path trees to the landmark node;
for each landmark node, generating a measure of distance between the source node and the target node based, at least in part, on said identified locations;
determining the landmark node with the shortest distance; and
providing a search result related to the shortest path tree of that landmark node,wherein generating a measure of distance comprises;
identifying a common ancestor node in the shortest path trees from the source node and the target node to the landmark node;
identifying all pairs of nodes in a first path between the source node and the common ancestor node and a second path between the common ancestor node and the target node;
locating any of said pairs which are edges;
identifying an edge of the shortest distance; and
using the identified edge to determine the measure of distance between the source node and the target node.
1 Assignment
0 Petitions
Accused Products
Abstract
According to an embodiment, there is provided a method of generating a data structure stored in computer memory for processing a search query in a network of interconnected nodes, wherein the method comprises selecting landmark nodes by the following steps and storing the selected landmark nodes in the data structure: sampling from the network nodes a first sample of vertex pairs, computing the shortest path for each vertex pair, each shortest path comprising a set of vertices between each vertex in the vertex pair; identifying a first landmark node which occurs in more of the shortest paths more often than any other vertex; removing from the network vertices shortest paths including the first landmark node and identifying a second landmark node which occurs in more of the remaining shortest paths than any other remaining vertex.
-
Citations
12 Claims
-
1. A method of processing a search query to provide a search result, the method comprising
receiving at a computer device a search query message, the search query message identifying a source node and a target node; -
responsive to receiving the search query message, accessing a data structure, wherein each landmark node identified within the data structure has stored therewith a shortest path tree in the form of a set of parent links, wherein each parent link identifies an adjacent vertex node; for each landmark node, identifying a location of the source node and a location of the target node in the shortest path trees to the landmark node; for each landmark node, generating a measure of distance between the source node and the target node based, at least in part, on said identified locations; determining the landmark node with the shortest distance; and providing a search result related to the shortest path tree of that landmark node, wherein generating a measure of distance comprises; identifying a common ancestor node in the shortest path trees from the source node and the target node to the landmark node; identifying all pairs of nodes in a first path between the source node and the common ancestor node and a second path between the common ancestor node and the target node; locating any of said pairs which are edges; identifying an edge of the shortest distance; and using the identified edge to determine the measure of distance between the source node and the target node. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A computer device comprising:
-
a first component comprising a data structure including information associated with at least one landmark node, each landmark node of the at least one landmark node having stored therewith a shortest path tree in the form of a set of parent links wherein each parent link identifies an adjacent vertex node in the shortest path between each node in the data structure and the landmark node; and a second component comprising a processor configured to execute a method for generating a search result, the method comprising; accessing the data structure effective to identify each landmark node of the at least one landmark node; for each identified landmark node, identifying the location of the source node and the target node in the shortest path trees to the landmark node; for each identified landmark node, using the identified locations of the target node and source node to generate a measure of distance between the source node and the target node; determining the landmark node of the at least one landmark node with the shortest distance; and providing a search result related to the shortest path tree of said determined landmark, wherein to generate a measure of distance, the second component is further configured to; identify a common ancestor node in the shortest path trees from the source node and the target node to the landmark node; identify all pairs of nodes in a first path between the source node and the common ancestor node and a second path between the common ancestor node and the target node; locate any of said pairs which are edges; identify an edge of the shortest distance; and use the identified edge to determine the measure of distance between the source node and the target node.
-
-
7. One or more computer-readable storage memory embodying processor-executable instructions which, responsive to execution by at least one processor, are configured to:
-
receive a search query identifying a source node and a target node; responsive to receiving the search query, access a data structure effective to identify at least one landmark node within the data structure, wherein each landmark node identified within the data structure has stored therewith a shortest path tree in the form of a set of parent links, wherein each parent link identifies an adjacent vertex node; identify, for each identified landmark node within the data structure, a location of the source node and the target node in the shortest path trees to said identified landmark node; generate, for each identified landmark node within the data structure, a measure of distance between the source node and the target node based, at least in part, on said identified locations of the target node and source node; determine, using each generated measure of distance, a landmark node with a shortest measure of distance; and provide a search result based, at least in part, on the shortest path tree of said determined landmark node with the shortest measure of distance, wherein the processor-executable instructions to generate a measure of distance are further configured to; identify a common ancestor node in the shortest path trees from the source node and the target node to the landmark node; identify all pairs of nodes in a first path between the source node and the common ancestor node and a second path between the common ancestor node and the target node; locate any of said pairs which are edges; identify an edge of the shortest distance; and use the identified edge to determine the measure of distance between the source node and the target node. - View Dependent Claims (8, 9, 10, 11, 12)
-
Specification