On-Device Two-Step Approximate Matching for Constrained Fuzzy Search

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing fuzzy search techniques struggle to implement approximate string matching on resource-constrained devices, particularly in environments with typographical errors, such as social media platforms.

Innovation Solution

A two-step approximate string matching system that generates skip bigrams, assigns weights, and computes bigram distances using a hash-map, enabling efficient fuzzy searches on-device by preprocessing strings to prioritize prefix matches and accommodating character insertions and deletions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If existing fuzzy search techniques are used, then approximate string matching can be performed, but the system becomes too complex and resource-intensive for constrained devices

Engineering Contradiction:
Improvefuzzy search functionalityVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the string matching process into two distinct steps: (1) generating skip bigrams from the query string, and (2) computing distances between query bigrams and candidate string bigrams. This segmentation allows each step to be optimized independently and reduces overall computational complexity compared to monolithic fuzzy matching approaches.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts the essential matching information into skip bigrams, which are 2-character substrings with possible skips. By extracting only these critical bigram sequences and comparing them rather than processing entire strings, the system reduces computational overhead while maintaining fuzzy matching capability.

Inventive Principle:
Principle #2Taking out (Extraction)

2Measurement precision

If traditional approximate string matching algorithms are applied, then search accuracy is maintained, but processing time and computational resources increase

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

Solution Approach 1:

The patent performs preliminary action by pre-computing and storing skip bigrams for candidate strings in a data structure before actual search queries are executed. This allows the system to quickly retrieve and compare pre-processed bigram information during search operations, significantly reducing processing time while maintaining accuracy.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates a simplified representation (copy) of each string using skip bigrams, which captures the essential matching characteristics without the full string complexity. By operating on these compressed bigram representations rather than original strings, the system achieves faster processing with maintained search accuracy.

Inventive Principle:
Principle #26Copying

3Adaptability or versatility

If the system processes all possible string matches, then completeness is achieved, but efficiency decreases due to resource constraints

Engineering Contradiction:
Improvematch completenessVSAvoidsearch efficiency
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent applies local quality by focusing the matching process on specific local patterns (skip bigrams) rather than evaluating entire strings uniformly. By identifying and comparing these local bigram patterns, the system efficiently determines match quality without processing every possible string combination, thus maintaining efficiency under resource constraints.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS12380722B2On-device two step approximate string matching
Publication Date: 2025.08.05 SNAP INC
  • US12380722B2 patent drawing
  • US12380722B2 patent drawing
  • US12380722B2 patent drawing

AI summary

A personalized preview system to receive a request to access a collection of media items from a user of a user device. Responsive to receiving the request to access the collection of media items, the personalized preview system accesses user profile data associated with the user, wherein the user profile data includes an image. For example, the image may comprise a depiction of a face, wherein the face comprises a set of facial landmarks. Based on the image, the personalized preview system generates one or more media previews based on corresponding media templates and the image, and displays the one or more media previews within a presentation of the collection of media items at a client device of the user.