Wildcard String Matching Algorithm for Pattern Lists
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing string matching algorithms in computing systems lack flexibility and efficiency when matching a list of pattern strings against a list of data strings, particularly when wildcard characters are involved, as they do not effectively handle multiple pattern strings and data strings with varying lengths and wildcard usage.
Innovation Solution
A method and architecture for matching a list of pattern strings against a list of data strings, where each pattern string is compared to a corresponding data string, using wildcard characters to enable flexible matching, including exact and wildcard string comparisons, and a data structure to store and manage wildcard usage, ensuring efficient matching operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If existing string matching algorithms are used, then basic matching functionality is provided, but flexibility and efficiency are insufficient when handling multiple pattern strings with wildcards
Solution Approach 1:
The patent segments the string matching problem by creating separate comparison functions for exact matching and wildcard matching. The pattern list is divided into individual pattern strings, each processed independently with appropriate matching logic. This segmentation allows the system to handle complex wildcard patterns efficiently without compromising overall matching performance.
2Adaptability or versatility
If wildcard characters are incorporated to handle varying pattern lengths, then adaptability improves, but algorithm complexity increases
Solution Approach 1:
The patent introduces an intermediary function that detects whether a pattern string contains wildcard characters and routes it to the appropriate matching algorithm. This mediator layer simplifies the overall system by providing a clear decision path: exact match for non-wildcard patterns and wildcard-specific matching for patterns containing wildcards, thereby managing complexity effectively.
3Ease of manufacture
If exact string comparison is used, then simplicity is maintained, but accuracy decreases when wildcards are present
Solution Approach 1:
The patent changes the matching parameter based on the presence of wildcard characters in the pattern string. When wildcards are detected, the system switches from exact string comparison to wildcard-aware comparison logic. This parameter change ensures accurate matching for both exact patterns and wildcard patterns while maintaining algorithmic simplicity through conditional logic.
Data Source
AI summary
A method for matching a first list of pattern strings to a second list of data strings, the first list including zero or more wildcards, may include identifying, for each pattern string in the first list, a data string in the second list corresponding with a respective one of the pattern strings. The method may further include determining whether the first list matches the second list by determining, for each pattern string in the first list, whether a respective one of the strings includes a wildcard for matching zero or more characters of a data string corresponding with the pattern string, and further performing a wildcard string comparison between the pattern string and the data string corresponding with the pattern string. The method may additionally include providing a data value indicating whether the first list matches the second list.


