IP Library Granted Patent US 10,248,394
Granted Patent B2
US 10,248,394 · App. 15/680,691 · Granted Apr 2, 2019

Utilizing created character index for switch statements

Inventors: Xing Xing Pan (Shanghai, CN); Jiu Fu Guo (Shanghai, CN); Xiao Feng Guan (Shanghai, CN); Allan Kielstra (Ajax, CA)
Assignee: International Business Machines Corporation
G06F8/443
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,248,394
App. No.
15/680,691
Granted
Apr 2, 2019
Kind
B2
Abstract

Provided is a method for string comparison. The method includes receiving a plurality of target strings. Each target string of the plurality of target strings comprises a sequence of characters. The method further includes creating a character index for the plurality of target strings having a plurality of entries corresponding to the sequence of characters. The method further includes prioritizing the plurality of entries. The method further includes determining an evaluation method for the plurality of target strings based on the plurality of prioritized entries. The method further includes performing the evaluation method for the plurality of target strings.

Claims (47)

1. A computer system, comprising:

one or more processors, one or more computer-readable memories, one or more computer-readable tangible storage medium, and program instructions stored on at least one of the one or more tangible storage medium for execution by at least one of the one or more processors via at least one of the one or more memories, wherein the computer system is capable of performing a method comprising:

receiving a plurality of target strings, wherein each target string of the plurality of target strings comprises a sequence of characters;

creating a character index for the plurality of target strings having a plurality of entries corresponding to the sequence of characters;

prioritizing the plurality of entries;

determining an evaluation method for the plurality of target strings based on the prioritized plurality of entries;

generating an action table including an action for each possible outcome of the evaluation method;

receiving a variable string; and

performing the evaluation method for the plurality of target strings, wherein the performed evaluation method is performed with respect to the variable string.

2. The computer system of claim 1 , wherein the plurality of entries comprises a number of values, and wherein the prioritizing the plurality of entries further comprises:

obtaining a number of values for each entry of the plurality of target strings; and

prioritizing the plurality of entries based on the number of values.

3. The computer system of claim 1 , further comprising:

classifying the plurality of target strings into a plurality of subgroups based on their lengths, wherein the creating the character index, prioritizing the entries, and determining the evaluation method are performed with respect to the plurality of subgroups of each target string of the plurality of target strings.

4. The computer system of claim 1 , further comprising:

padding the plurality of target strings so that they have unified lengths.

5. The computer system of claim 1 , further comprising:

adding a prefix to each target string, wherein the prefix indicates the original length of the each target string.

6. The computer system of claim 5 , further comprising:

obtaining a subset of the plurality of target strings in response to performing the evaluation method, wherein prioritizing the plurality of entries and determining the evaluation method are repeated with respect to the subset of target strings.

7. The computer system of claim 1 , wherein the performed evaluation method comprises one of the following:

comparison based on an entry of the created character index;

comparison based on a hash conversion; and

direct comparison.

8. A computer program product, the computer program product comprising:

one or more computer-readable storage medium and program instructions stored on at least one of the one or more tangible storage medium, the program instructions executable by a processor to perform a method comprising:

receiving a plurality of target strings, wherein each target string of the plurality of target strings comprises a sequence of characters;

creating a character index for the plurality of target strings having a plurality of entries corresponding to the sequence of characters;

prioritizing the plurality of entries;

determining an evaluation method for the plurality of target strings based on the prioritized plurality of entries;

generating an action table including an action for each possible outcome of the evaluation method;

receiving a variable string; and

performing the evaluation method for the plurality of target strings, wherein the performed evaluation method is performed with respect to the variable string.

9. The computer program product of claim 8 , wherein the plurality of entries comprises a number of values, and wherein the prioritizing the plurality of entries further comprises:

obtaining a number of values for each entry of the plurality of target strings; and

prioritizing the plurality of entries based on the number of values.

10. The computer program product of claim 8 , further comprising:

classifying the plurality of target strings into a plurality of subgroups based on their lengths, wherein the creating the character index, prioritizing the entries, and determining the evaluation method are performed with respect to the plurality of subgroups of each target string of the plurality of target strings.

11. The computer program product of claim 8 , further comprising:

padding the plurality of target strings so that they have unified lengths; and

adding a prefix to each target string, wherein the prefix indicates the original length of the each target string.

12. The computer program product of claim 11 , further comprising:

obtaining a subset of the plurality of target strings in response to performing the evaluation method, wherein prioritizing the plurality of entries and determining the evaluation method are repeated with respect to the subset of target strings.

13. The computer program product of claim 8 , wherein the performed evaluation method comprises one of the following:

comparison based on an entry of the created character index;

comparison based on a hash conversion; and

direct comparison.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 18, 2017
From: PAN, XING XING; GUO, JIU FU; GUAN, XIAO FENG; KIELSTRA, ALLAN
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 043335/0474 →
Continuity (1)
Related Publication 20190056919A1 · Feb 21, 2019