Substring Detection Logic Using Segmented Parallel Comparison
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing substring search algorithms in digital computer systems are inefficient for large datasets due to the need for character-by-character comparison and conditional retrace operations, which lead to increased processing time and pipeline flushes.
Innovation Solution
A method and logic device that partition a data string into segments of equal length, using a comparator matrix with diagonal AND chains and carry logic to detect substring matches without retrace, thereby minimizing conditional branches and utilizing SIMD hardware for parallel comparison.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If character-by-character comparison is used for substring search, then detection accuracy is improved, but processing time increases
Solution Approach 1:
The target string is divided into multiple segments of equal length, with each segment being processed independently by dedicated comparison logic. This segmentation enables parallel processing of multiple character positions simultaneously, maintaining detection accuracy while reducing overall processing time through concurrent operations across different string segments
Solution Approach 2:
The invention transitions from sequential character-by-character comparison to a two-dimensional comparison matrix where rows represent string segments and columns represent substring positions. This dimensional transformation enables simultaneous comparison of multiple characters across different segments and positions, achieving both high accuracy and improved processing speed through parallel evaluation of multiple comparison operations
2Measurement precision
If conditional retrace operations are implemented for exact matching, then detection precision is improved, but device complexity increases
Solution Approach 1:
The comparison logic is designed to perform preliminary exact matching between each string segment and the substring in parallel, eliminating the need for subsequent conditional retrace operations. By预先 establishing comparison circuits that can directly determine exact matches across multiple segments simultaneously, the invention achieves high detection precision while avoiding the complexity of iterative retrace logic
Solution Approach 2:
The invention replaces sequential mechanical retrace operations with a parallel comparison matrix that uses bitwise operations and logical AND chains to simultaneously evaluate multiple segment-substring pairs. This substitution of parallel logical operations for sequential mechanical retrace reduces device complexity while maintaining or improving match detection precision
3Measurement precision
If sequential comparison is used for each segment, then detection accuracy is maintained, but productivity decreases
Solution Approach 1:
The target string is divided into multiple segments of equal length, with each segment being processed independently by dedicated comparison logic. This segmentation enables parallel processing of multiple character positions simultaneously, maintaining detection accuracy while reducing overall processing time through concurrent operations across different string segments
Solution Approach 2:
The invention merges multiple sequential comparison operations into a single parallel comparison matrix that evaluates all string segments against the substring simultaneously. By combining what would traditionally be sequential segment-by-segment comparisons into a unified parallel structure using bitwise operations and logical chains, the invention achieves both high accuracy and improved processing speed
Data Source
AI summary
A substring can be detected within a string of data elements through a method that includes partitioning and distributing the string of data elements to an ordered list of segments having equal lengths greater than or equal to the length of the substring. A substring match within a segment of the ordered list of segments can be detected by sequentially comparing the substring with each segment of the ordered list of segments. A carry vector that includes the substring match can be created, in response to detecting the substring match that is a partial match. It can be determined that a carry vector exists by comparing the substring with the segment of the ordered list of segments, and it can be subsequently determined that a full match exists between the carry vector and the segment of the ordered list of segments.


