String Matching Code Generation via Length and Position Filtering
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing string matching techniques in user interfaces for computer systems are inefficient due to expensive string equality comparisons and inadequate utilization of available information, such as string length and character positions, leading to high computational and memory costs.
Innovation Solution
A method that partitions and subpartitions strings based on length and character positions to minimize comparisons, deferring expensive string equality operations until a high likelihood of success is indicated, thereby optimizing runtime performance without impacting startup time or memory usage.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If string equality comparison is used for matching client-supplied strings, then matching accuracy is achieved, but computational cost and operation time increase significantly
Solution Approach 1:
The patent segments the string matching process into multiple phases: first comparing string lengths to filter candidates, then comparing individual characters at specific positions, and finally performing full string equality comparison only on remaining candidates. This segmentation reduces the number of expensive full string comparisons while maintaining matching accuracy.
Solution Approach 2:
The patent performs preliminary actions by comparing string lengths and individual character positions before performing the expensive full string equality comparison. This preliminary filtering eliminates many non-matching strings early in the process, reducing the overall computational cost while ensuring accurate matching for the final candidates.
2Reliability
If complete string content comparison is performed for matching, then accurate identification is achieved, but efficiency is reduced due to ignoring available information
Solution Approach 1:
The patent applies local quality by using different comparison strategies for different parts of the matching process: string length comparison for initial filtering, character position comparison for intermediate filtering, and full content comparison only when necessary. This localized approach optimizes efficiency at each stage while maintaining overall accuracy.
Solution Approach 2:
The patent changes parameters progressively through the matching process: first comparing the length parameter, then comparing specific character position parameters, and finally performing full content comparison. This progressive parameter change allows efficient filtering at each stage while ensuring accurate identification when needed.
3Adaptability or versatility
If manual code writing is used for string matching analysis, then customization is possible, but labor intensity and development time increase
Solution Approach 1:
The patent implements self-service by providing an automated code generation tool that analyzes the set of possible strings and automatically generates optimized matching code. This eliminates the need for manual analysis and code writing while maintaining the ability to customize the matching behavior for different string sets, significantly reducing development effort.
Data Source
AI summary
A tool is provided, which generates source code for matching a predetermined set of strings against a client-supplied string at runtime. The tool employs an efficient matching technique in which maximal use is made of the length of the client-supplied string, and the number of comparison operations is minimized. Using the tool, a string equality operation may be deferred until a high likelihood of success is indicated, or omitted entirely.


