Structured Query Generation for Social Graph Search
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Social networking systems face challenges in efficiently searching for and retrieving specific content within complex social graphs, as existing search methods often rely on unstructured text queries that fail to effectively utilize social-graph attributes and relationships.
Innovation Solution
The system generates structured queries by parsing unstructured text queries into n-grams, using a context-free grammar model to identify social-graph elements as query tokens, and then constructs natural-language structured queries that can be refined or modified, allowing users to search within the social graph based on these elements.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If unstructured text queries are used for searching social graph content, then the search interface is simple and easy to use, but the search accuracy and relevance to social-graph attributes deteriorates
Solution Approach 1:
The patent introduces structured query templates as an intermediary between the user's simple text input and the complex social graph search. These templates act as a mediator that automatically translates unstructured queries into precise search operations leveraging social-graph attributes, relationships, and n-grams, thereby maintaining ease of use while improving search accuracy
Solution Approach 2:
The system dynamically changes search parameters by analyzing the unstructured text query and automatically adjusting query structure, tokenization (n-grams), and search criteria based on the detected intent and relevant social-graph elements, thus improving search precision without requiring users to manually specify complex parameters
2Measurement precision
If structured queries with social-graph elements are generated, then the search relevance and accuracy improves, but the system complexity increases
Solution Approach 1:
The system performs preliminary actions by pre-defining query templates and structures that incorporate social-graph elements. These templates are prepared in advance with known syntax and semantics, allowing the system to quickly generate structured queries without complex real-time processing, thus improving search relevance while managing system complexity
Solution Approach 2:
The patent segments the query generation process into distinct modules: text parsing, n-gram extraction, template matching, and query construction. This segmentation allows each component to handle specific tasks independently, reducing overall system complexity while enabling sophisticated structured query generation with social-graph elements
3Reliability
If query parsing and n-gram analysis are performed to identify social-graph elements, then the ability to leverage social-graph attributes improves, but the processing time increases
Solution Approach 1:
The system applies partial action by performing n-gram analysis and social-graph element identification only on the necessary portions of the query that contain search-relevant terms. Not every word in the query undergoes full analysis, which reduces processing time while maintaining search effectiveness for the critical elements
Data Source
AI summary
In one embodiment, a method includes receiving an unstructured text query inputted by a first user, identifying one or more objects associated with the online social network matching at least a portion of the unstructured text query, accessing a context-free grammar model comprising a plurality of grammars, generating one or more structured queries, each structured query corresponding to a selected grammar of a context-free grammar model, wherein each structured query is based on a natural-language string generated by the selected grammar, each structured query comprising at least one query token corresponding to each of the identified object, and sending one or more of the structured queries as suggested queries for display to the first user in response to the unstructured text query inputted by the first user.


