Client-Side Grammar Templates for Social Network Query Generation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Social networking systems face inefficiencies in generating suggested search queries due to the need for full grammar models, which can be resource-intensive and slow, especially when dealing with unstructured text inputs from users.
Innovation Solution
Implementing a client-side method that uses pre-defined grammar templates and high-coefficient social-graph entities to quickly generate suggested queries by aligning text inputs against these templates, with penalties for deviations, allowing for efficient and fast query suggestion.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If full grammar models are used to generate suggested queries, then query accuracy is improved, but system resource consumption and processing time increase
Solution Approach 1:
The patent segments the grammar model into a collection of smaller, pre-defined grammar templates that are stored client-side. Instead of using a complete grammar model, the system divides it into modular templates that can be independently evaluated against user queries, reducing overall system complexity and resource requirements while maintaining query understanding capabilities.
Solution Approach 2:
The patent applies preliminary action by pre-computing and storing grammar templates and social-graph entities on the client device before query processing. These templates are prepared in advance and can be quickly evaluated without requiring complex server-side processing, thereby reducing real-time computational resources needed while preserving query accuracy.
2Measurement precision
If full grammar models are used to generate suggested queries, then query accuracy is improved, but processing speed decreases
Solution Approach 1:
By segmenting the grammar model into smaller templates, the system can evaluate multiple templates in parallel and quickly determine the best match without processing an entire complex grammar model, thereby improving processing speed while maintaining accuracy.
Solution Approach 2:
The system performs partial action by evaluating only the most relevant grammar templates and social-graph entities that match the user query, rather than exhaustively processing all possible grammar rules. This selective approach maintains query accuracy for common search patterns while significantly reducing processing time.
3Speed
If pre-defined templates and selected entities are stored client-side, then query generation speed is improved, but template coverage and applicability are limited
Solution Approach 1:
The patent designs grammar templates with universal structures that can handle multiple query types and scenarios. The templates are formulated to be broadly applicable across different social-graph entity types and relationship patterns, enabling a limited set of templates to cover a wide range of user queries effectively.
Solution Approach 2:
The system focuses on covering the most common query patterns (approximately 90% of user queries) with a limited set of high-frequency grammar templates and popular social-graph entities. By concentrating resources on the most frequently used templates, the system achieves fast processing speed for the majority of cases while accepting that rare or highly specialized queries may not be covered.
Data Source
AI summary
In one embodiment, a method includes receiving an unstructured text query from a first user of an online social network; and accessing, from a data store of the mobile client system, a set of nodes of a social graph of the online social network. The social graph includes a number of nodes and edges connecting the nodes. The nodes include a first node corresponding to the first user and a number of second nodes that each correspond to a concept or a second user associated with the online social network. The method also includes accessing, from the data store of the mobile client system, a set of grammar templates. Each grammar template includes one or more non-terminal tokens and one or more query tokens. The query tokens include references to zero or more second nodes and one or more edges and each grammar template is based on a natural-language string.


