Regex Engine Compiled Code for Dictionary-Encoded Strings

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database management systems face significant performance challenges when performing regular expression matching due to the compute-heavy nature of the task, which leads to increased memory usage and processing cycles, especially with larger input strings and more complex regex patterns.

Innovation Solution

The proposed solution involves generating specialized compiled code at runtime that is optimized for the specific regex pattern and input string, allowing the database management system to determine the most efficient execution logic based on descriptors provided to the regex engine. This approach includes converting a decoded-string automaton into an encoded-string automaton to enable regex matching without decoding the string, thereby reducing computational overhead.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If strings are encoded/compressed to reduce memory space, then memory usage is reduced, but decoding operations are required which consume additional compute resources

Engineering Contradiction:
Improvememory spaceVSAvoidcompute resources
Core Design Contradiction:
Quantity of substanceVSUse of energy by moving object

Solution Approach 1:

The automaton is pre-compiled into specialized machine code at runtime based on the regex pattern and input string characteristics. This preliminary compilation creates optimized execution logic that eliminates the need for decoding operations during regex matching, as the automaton operates directly on the encoded string tokens

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent replaces the traditional decoding-then-matching mechanical process with a direct automaton execution on encoded strings. The regex engine substitutes the decoding mechanism with a token-based automaton that processes encoded string tokens directly, eliminating the harmful decoding step while maintaining matching accuracy

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Measurement precision

If regex operations are performed on decoded strings, then matching accuracy is maintained, but computational overhead increases due to decoding operations

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

Solution Approach 1:

The automaton is pre-compiled into specialized machine code at runtime based on the regex pattern and input string characteristics. This preliminary compilation creates optimized execution logic that eliminates the need for decoding operations during regex matching, as the automaton operates directly on the encoded string tokens

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent changes the operational parameters of the regex engine by allowing it to work directly with encoded string tokens instead of decoded characters. The automaton transitions are defined based on token values rather than character values, fundamentally changing how the matching process operates while preserving accuracy

Inventive Principle:
Principle #35Parameter changes

3Productivity

If specialized compiled code is generated at runtime, then query execution time is reduced, but compilation overhead is introduced

Engineering Contradiction:
Improvequery execution speedVSAvoidcompilation time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent applies partial compilation by generating specialized automaton code only when beneficial conditions are met (e.g., repeated regex operations on the same input string or highly selective patterns). The query optimizer evaluates whether the compilation overhead is justified by the expected performance gains, applying the principle of doing just enough optimization to achieve net benefit

Inventive Principle:
Principle #16Partial or excessive action

4Speed

If hardware acceleration is used for regex operations, then execution speed is improved, but system cost and flexibility are reduced

Engineering Contradiction:
Improveregex operation speedVSAvoidsystem complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent implements a dynamic, software-based automaton execution model that adapts to different regex patterns and input strings at runtime. Instead of fixed hardware circuits, the system generates and executes specialized machine code dynamically, providing both speed improvement through optimization and flexibility through programmability

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the operational parameters of the regex engine by allowing it to work directly with encoded string tokens instead of decoded characters. The automaton transitions are defined based on token values rather than character values, fundamentally changing how the matching process operates while preserving accuracy

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20250045334A1Regular expression matching in dictionary-encoded strings
Publication Date: 2025.02.06 ORACLE INT CORP
  • US20250045334A1 patent drawing
  • US20250045334A1 patent drawing
  • US20250045334A1 patent drawing

AI summary

Techniques are described for generating an encoded-string automaton for a regex pattern from a decoded-string automaton of the regex pattern. In an embodiment, the process obtains a decoded-string automaton of the regex pattern and applies unique decoded string value(s) from the dictionary of the encoding. When applied at a selected state in the decoded-string automaton, the application may yield a transition to at least one target state in the decoded-string automaton for a unique dictionary value. Such a transition generates a transition in the encoded-string automaton from an encoded state corresponding to the selected state in the decoded-string automaton to a target state in the encoded-string automaton corresponding to the target state in the decoded-string automaton. The generated transition in the encoded-string automaton is conditioned on the token of the unique decoded string value in the dictionary.