Regular Expression Generation Using LCS for Accurate Data Formatting

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current data formatting and preprocessing methods for large-scale data sets in big data systems are inefficient and impractical, leading to inaccurate results due to poor signal-to-noise ratios and the inclusion of duplicate and erroneous data.

Innovation Solution

A regular expression generator system that uses a longest common subsequence (LCS) algorithm to generate regular expressions based on user-selected character sequences, converting them into intermediate regular expression codes (IRECs) and employing a fully-connected graph for efficient generation, handling both positive and negative examples, and optimizing execution order to avoid exponential runtime.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If manual data formatting and preprocessing processes are used, then data can be cleaned and curated into a common format, but the process becomes inefficient and impractical for large-scale data sets

Engineering Contradiction:
Improvedata preprocessing efficiencyVSAvoidtime required for manual data formatting
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system automatically generates regular expressions by analyzing input data patterns without requiring manual intervention. The regex generator self-serves the data preprocessing task by converting sample data into executable regex patterns that can independently format and validate large datasets, eliminating the need for continuous manual preprocessing operations.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent introduces regular expressions as an intermediary between raw data and the data processing system. These regex patterns serve as automated mediators that enforce data formatting rules, validate patterns, and transform data into consistent formats, replacing manual preprocessing operations with automated pattern-matching mechanisms.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If manual data cleaning processes are used, then data quality can be improved, but the process is inefficient for large-scale data sets

Engineering Contradiction:
Improvedata qualityVSAvoiddata processing throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent replaces manual mechanical data cleaning operations with automated computational processes. Regular expressions provide algorithmic pattern matching and validation that automatically detects and corrects data quality issues such as inconsistent formats, invalid patterns, and formatting errors, enabling high-throughput processing while maintaining reliability.

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

3Measurement precision

If regular expressions are generated without using longest common subsequence algorithm, then generation process is simpler, but accuracy decreases leading to false positives and negatives

Engineering Contradiction:
Improveregular expression accuracyVSAvoidgeneration algorithm complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The system performs preliminary analysis of input data patterns by computing the longest common subsequence before generating the final regular expression. This preliminary step identifies the core repeating patterns and structures in the data, which are then used as the foundation for constructing accurate regex patterns that minimize false positives and negatives.

Inventive Principle:
Principle #10Preliminary action

4Measurement precision

If LCS algorithm is applied to three or more character sequences, then pattern matching accuracy improves, but runtime increases exponentially

Engineering Contradiction:
Improvepattern matching accuracyVSAvoidcomputation runtime
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent segments the computation of longest common subsequence into pairwise comparisons between character sequences rather than computing the LCS of all sequences simultaneously. By breaking down the complex multi-sequence problem into multiple simpler two-sequence problems, the system maintains pattern matching accuracy while avoiding exponential runtime increases.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS12524446B2Regular expression generation using longest common subsequence algorithm on regular expression codes
Publication Date: 2026.01.13 ORACLE INT CORP
  • US12524446B2 patent drawing
  • US12524446B2 patent drawing
  • US12524446B2 patent drawing

AI summary

Disclosed herein are techniques related to automated generation of regular expressions. In some embodiments, a regular expression generator may receive input data comprising one or more character sequences. The regular expression generator may convert character sequences into a sets of regular expression codes and/or span data structures. The regular expression generator may identify a longest common subsequence shared by the sets of regular expression codes and/or spans, and may generate a regular expression based upon the longest common subsequence.