Hybrid Unicode String Weighting for ASCII-Heavy Text Comparison

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Unicode text processing is costly and inefficient, especially in database operations that predominantly handle ASCII-based text, as existing methods require costly Unicode weighting for all characters, leading to performance issues in operations like hash joins and equality comparisons.

Innovation Solution

A hybrid approach that analyzes text strings to determine if they consist entirely of ASCII characters, using ASCII weights for pure ASCII strings and falling back to Unicode weighting only when necessary, with options for accent-insensitive or accent-sensitive comparisons, and using bitwise operations and Unicode weight tables for efficient processing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If Unicode weighting is applied to all characters, then accurate text comparison is achieved, but processing performance deteriorates

Engineering Contradiction:
Improvetext comparison accuracyVSAvoidprocessing performance
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The text string is segmented into ASCII and non-ASCII portions. The patent applies different weighting methods to different segments: fast ASCII-based weighting for ASCII characters and slower Unicode weighting only for non-ASCII characters. This segmentation resolves the contradiction by applying the expensive Unicode weighting only where necessary while using efficient ASCII weighting for the majority of characters.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Different quality levels of processing are applied to different parts of the text. ASCII characters receive simple, fast processing while non-ASCII characters receive more complex Unicode processing. This local differentiation maintains overall accuracy while improving performance by avoiding unnecessary complex processing for ASCII characters.

Inventive Principle:
Principle #3Local quality

2Adaptability or versatility

If Unicode processing is used for all text, then comprehensive character support is achieved, but processing cost increases

Engineering Contradiction:
Improvecharacter encoding supportVSAvoidprocessing cost
Core Design Contradiction:
Adaptability or versatilityVSUse of energy by moving object

Solution Approach 1:

The patent applies Unicode processing partially - only to the extent necessary for non-ASCII characters. ASCII characters are processed using efficient ASCII-specific rules, while Unicode processing is applied only to non-ASCII portions. This partial application maintains comprehensive character support while minimizing processing costs.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The processing parameters change based on the character type. For ASCII characters (code points 0-127), simple ASCII weighting rules are used. For non-ASCII characters, the patent switches to Unicode weighting parameters. This parameter change resolves the contradiction by adapting the processing intensity to the actual needs of each character.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS10540425B2Hybrid comparison for unicode text strings consisting primarily of ASCII characters
Publication Date: 2020.01.21 TABLEAU SOFTWARE INC
  • US10540425B2 patent drawing
  • US10540425B2 patent drawing
  • US10540425B2 patent drawing

AI summary

A method compares text strings having Unicode encoding. The method receives a first string S=s1 s2 . . . sn and a second string T=t1 t2 . . . tm, where s1, s2, . . . , sn and t1, t2, . . . , tm are Unicode characters. The method computes a first string weight for the first string S according to a weight function ƒ. When S consists of ASCII characters, ƒ(S)=S. When S consists of ASCII characters and some accented ASCII characters that are replaceable by ASCII characters, ƒ(S)=g(s1) g(s2) . . . g(sn), where g(si)=si when si is an ASCII character and g(si)=si′ when si is an accented ASCII character that is replaceable by the corresponding ASCII character si′. When S includes one or more non-replaceable non-ASCII characters, the first string weight concatenates an ASCII weight prefix ƒA (S) and a Unicode weight suffix ƒU(S). The method also computes a second string weight for the second text string T. Equality of the strings is tested using the string weights.