Search String Instruction Optimization for Text Records

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current enterprise systems face inefficiencies in processing text records due to computationally wasteful brute force methods and poor performance with repeated character occurrences, leading to increased computational overhead during string and substring searches.

Innovation Solution

The optimization of the search string (SRST) instruction by dynamically adjusting the search point to the largest index in the text string when mismatches occur, and using variants that visit characters in a round-robin fashion, record pattern character positions, and increment the search point based on failures, to reduce computational resources and improve search efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If brute force methods are used to search for pattern strings in text records, then all possible positions are checked ensuring complete coverage, but computational overhead increases significantly and processing time is wasted

Engineering Contradiction:
Improvesearch completenessVSAvoidprocessing speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts and utilizes information from mismatched character comparisons to guide future search positions. When a mismatch occurs at position i, the algorithm uses the mismatched character value to determine the next search position, rather than checking all positions sequentially. This extraction of useful information from failed comparisons resolves the contradiction by maintaining search completeness while avoiding redundant checks.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent performs preliminary analysis of the pattern string to precompute a shift table (failure function) that stores the optimal shift distance for each possible mismatch position. This preliminary action allows the search algorithm to jump directly to relevant positions without brute force checking, thereby maintaining reliability while dramatically improving productivity.

Inventive Principle:
Principle #10Preliminary action

2Ease of operation

If traditional SRST instructions are used to search for pattern characters in strings, then the search process is simple to implement, but performance deteriorates when pattern characters are repeated multiple times in the text

Engineering Contradiction:
Improveimplementation simplicityVSAvoidsearch efficiency
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent transforms the static, linear SRST instruction execution into a dynamic process where the search position jumps non-linearly based on mismatched character values. The algorithm adaptively adjusts the search strategy by computing shift distances dynamically during execution, allowing it to respond efficiently to repeated character patterns while maintaining ease of operation through a systematic jump mechanism.

Inventive Principle:
Principle #15Dynamics

3Reliability

If the search point is incremented by one position after each mismatch, then all positions are eventually checked ensuring no matches are missed, but the search duration increases significantly

Engineering Contradiction:
Improvematch detection accuracyVSAvoidsearch duration
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent changes the search parameter (position increment) from a fixed value of 1 to a dynamic value based on the mismatched character. The shift distance is computed as a function of the mismatched character's value and position, allowing the algorithm to skip over positions that cannot possibly contain matches. This parameter change maintains reliability by ensuring all valid match positions are still checked while dramatically reducing search duration by eliminating redundant position checks.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11847434B2Fast search for search string instructions
Publication Date: 2023.12.19 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11847434B2 patent drawing
  • US11847434B2 patent drawing
  • US11847434B2 patent drawing

AI summary

One or more computer processors receive a pattern string comprising a pointer to a pattern search point and a string comprising a pointer to a search point; determine a plausible search point within the string for the pattern character; execute a search string (SRST) instruction with the determined search point and the pattern character; compute a pattern offset comprising a difference between a first occurrence of the determined pattern character located within the pattern string but not in the correct position and a current pattern character position; execute a subsequent SRST instruction with the current pattern character position and the computed offset set as a new search point; and responsive to identifying all pattern characters in the correct position within the string based on the executed subsequent SRST instruction, transmit memory address associated with a substring comprised of the string and corresponding pattern characters in the correct position.