Hybrid Unicode Collation for ASCII-Heavy Database String 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 ASCII strings and falling back to Unicode weighting only when necessary, with options for accent-insensitive or accent-sensitive comparisons, and using hash functions for efficient equality checks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If Unicode weighting is applied to all text strings, then text comparison accuracy is improved, but processing speed deteriorates

Engineering Contradiction:
Improvetext comparison accuracyVSAvoidprocessing speed
Core Design Contradiction:
Measurement precisionVSSpeed

Solution Approach 1:

The patent segments text processing into two distinct paths: an ASCII processing path for strings containing only ASCII characters, and a Unicode processing path for strings containing non-ASCII characters. This segmentation allows the system to apply the appropriate level of processing complexity based on the actual content, avoiding unnecessary Unicode weighting for ASCII-only strings while maintaining accuracy for strings requiring it.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies different processing qualities to different parts of the text processing system. ASCII-only strings receive simplified ASCII-based weighting, while strings with non-ASCII characters receive full Unicode weighting. This local differentiation optimizes performance by applying high-precision Unicode processing only where necessary, rather than uniformly to all strings.

Inventive Principle:
Principle #3Local quality

2Adaptability or versatility

If Unicode processing is used for all text strings, then handling of international characters is improved, but computational cost increases

Engineering Contradiction:
Improveinternational character handlingVSAvoidcomputational cost
Core Design Contradiction:
Adaptability or versatilityVSUse of energy by moving object

Solution Approach 1:

The patent implements a dynamic processing approach where the system adaptively selects between ASCII and Unicode processing modes based on the actual character content of each text string. This dynamic adaptation allows the system to maintain versatility in handling international characters while minimizing computational cost by using the lighter ASCII path whenever possible.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the processing parameter (weighting method) based on the text string's character composition. When text contains only ASCII characters, the system uses ASCII weighting parameters; when non-ASCII characters are detected, it switches to Unicode weighting parameters. This parameter adaptation reduces computational cost while preserving the ability to handle international characters.

Inventive Principle:
Principle #35Parameter changes

3Speed

If ASCII weighting is used for all text strings, then processing speed is improved, but accuracy for Unicode text deteriorates

Engineering Contradiction:
Improveprocessing speedVSAvoidUnicode text comparison accuracy
Core Design Contradiction:
SpeedVSMeasurement precision

Solution Approach 1:

The patent performs a preliminary check to detect the presence of non-ASCII characters in text strings before applying weighting. This preliminary action allows the system to identify which strings require Unicode processing and which can use ASCII processing, ensuring that Unicode text comparison accuracy is maintained for relevant strings while preserving speed for ASCII-only strings.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10325010B1Hybrid approach to collating unicode text strings consisting primarily of ASCII characters
Publication Date: 2019.06.18 TABLEAU SOFTWARE INC
  • US10325010B1 patent drawing
  • US10325010B1 patent drawing
  • US10325010B1 patent drawing

AI summary

Collating text strings having Unicode encoding includes receiving two text strings S=s1s2 . . . s and T=t1t2 . . . tm. When the two text strings are not identical, there is a smallest positive integer p for which the two text strings differ. The process looks up the characters sp and tp in a predefined lookup table. If either of these characters is missing from the lookup table, the collation of the text strings is determined using the standard Unicode comparison of the text strings spsp+1 . . . sn and tptp+1 . . . tm. Otherwise, the lookup table assigns weights vp and wp for the characters sp and tp. When vp≠wp, these weights define the collation order of the strings S and T. When vp=wp, the collation of S and T is determined recursively using the suffix strings sp+1 . . . sn and tp+1 . . . tm.