UTF-8 Pattern Matching via Byte-Jump Algorithms

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current systems for rewriting packet content, especially those using UTF-8 encoding, face inefficiencies due to increased memory consumption, response time latency, and resource usage, particularly when handling multi-byte character encoding and case-insensitive string comparisons.

Innovation Solution

Modified algorithms like Wu-Manber and Horspool are optimized for UTF-8 encoding by using byte jumps instead of character jumps and efficient data structures to handle multi-byte characters, reducing the need for unnecessary data conversions and improving search efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If current rewrite systems accumulate entire responses before rewriting, then rewrite accuracy is improved, but memory consumption and response time latency increase

Engineering Contradiction:
Improverewrite accuracyVSAvoidmemory consumption
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent segments the response stream into chunks of configurable size (e.g., 4096 bytes) and processes them individually through the rewrite engine. This allows the system to maintain rewrite accuracy by processing complete logical units while dramatically reducing memory consumption compared to accumulating entire responses. The stream processor divides the continuous response flow into manageable segments that can be rewritten and transmitted in batches.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements continuous rewriting by maintaining an active stream processor that continuously feeds data through the rewrite engine without interruption. The system uses a buffer to hold upcoming data and processes it in continuous chunks, ensuring the rewrite operation runs continuously rather than batch-by-batch, thereby reducing overall response time latency while maintaining accuracy.

Inventive Principle:
Principle #20Continuity of useful action

2Adaptability or versatility

If current systems copy responses to buffers for rewriting, then rewrite flexibility is improved, but resource usage and processing overhead increase

Engineering Contradiction:
Improverewrite flexibilityVSAvoidresource usage
Core Design Contradiction:
Adaptability or versatilityVSUse of energy by moving object

Solution Approach 1:

The patent extracts the unnecessary buffer copying step from the traditional rewrite process. Instead of copying the entire response to a buffer before rewriting, the system directly processes chunks of the response stream through the rewrite engine. This extraction of the redundant copying operation significantly reduces CPU resource usage and processing overhead while maintaining rewrite flexibility through the configurable chunk processing mechanism.

Inventive Principle:
Principle #2Taking out (Extraction)

3Measurement precision

If multiple body parsing operations are performed for each rewrite action, then pattern matching accuracy is improved, but throughput decreases

Engineering Contradiction:
Improvepattern matching accuracyVSAvoidthroughput
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent performs preliminary parsing of the response stream into chunks before the rewrite process begins. By pre-dividing the stream into manageable segments, the system establishes the parsing structure in advance, eliminating the need for multiple sequential parsing operations during each rewrite action. This preliminary action significantly improves throughput while maintaining pattern matching accuracy through the structured chunk-based approach.

Inventive Principle:
Principle #10Preliminary action

4Adaptability or versatility

If UTF-8 multi-byte character algorithms are used for case-insensitive matching, then encoding compatibility is improved, but algorithm efficiency decreases

Engineering Contradiction:
Improveencoding compatibilityVSAvoidalgorithm efficiency
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent segments the UTF-8 byte sequences into individual bytes and processes them through specialized lookup tables that handle case-insensitive matching efficiently. By breaking down the multi-byte characters into byte-level operations with pre-computed lookup tables for ASCII and extended character ranges, the system achieves both UTF-8 compatibility and algorithmic efficiency, avoiding the need for complex multi-byte character-by-character processing.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS8819045B2Systems and methods of UTF-8 pattern matching
Publication Date: 2014.08.26 CITRIX SYSTEMS INC
  • US8819045B2 patent drawing
  • US8819045B2 patent drawing
  • US8819045B2 patent drawing

AI summary

Systems and methods are described for efficiently processing, searching and/or rewriting variable width encoded data, such as UTF-8 encoded data, will be described. Embodiments of the systems and methods modify and adapt search algorithms, such as the Horspool and Wu-Manber algorithms, to efficiently process and manage searching of variable width encoded text in large blocks of text, such as text that may be carried via a stream of packets thru a network device, such as an intermediary device.