IP Library Granted Patent US 10,956,669
Granted Patent B2
US 10,956,669 · App. 16/031,437 · Granted Mar 23, 2021

Expression recognition using character skipping

Inventor: Liwei Ren (San Jose, CA)
Assignee: Beijing DiDi Infinity Technology and Development Co., Ltd.
G06F40/205G06F16/285G06F40/166G06F40/284G06K9/00429G06K9/00456
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,956,669
App. No.
16/031,437
Granted
Mar 23, 2021
Kind
B2
Abstract

Multiple search patterns may be obtained. Characters within the multiple search patterns may be included within multiple alphabets. A pool including the characters within the multiple search patterns may be defined. A pointer for text to be searched may be set. Whether a character of the text corresponding to the pointer matches any character within the pool may be determined. Based on the character of the text corresponding to the pointer matching any character within the pool, a first portion of the text may be selected for a search of the multiple search patterns. Based on the character of the text corresponding to the pointer not matching any character within the pool, a second portion of the text may be skipped from the search of the multiple search patterns.

Claims (50)

1. A system for finding search patterns, the system comprising:

one or more processors; and

a memory storing instructions that, when executed by the one or more processors, cause the system to perform:

obtaining multiple search patterns, each of the multiple search patterns including a different set of characters, wherein characters of the different sets of characters within the multiple search patterns are included within multiple alphabets having different respective alphabet lengths;

defining a pool including each of the characters of the different sets of characters within the multiple search patterns, the pool comprising a union of the multiple alphabets;

determining a minimum length parameter and a maximum length parameter based on lengths of the multiple search patterns, wherein the minimum length parameter is greater than one and less than the maximum length parameter;

setting, based on the minimum length parameter, a pointer pointing to a particular character of text to be searched;

determining whether the particular character pointed by the pointer matches any character within the pool;

in response to the particular character pointed by the pointer matching a character within the pool, determining a first portion of the text for a search of the multiple search patterns, wherein the first portion is defined by a start position and an end position, wherein

the start position is determined by backward shifting from the pointer for one less than the minimum length parameter, and

the end position is determined by forward shifting from the start position for two less than twice the maximum length parameter; and

in response to the particular character pointed by the pointer not matching a character within the pool, skipping a second portion of the text from the search of the multiple search patterns, wherein skipping the second portion of the text from the search of the multiple search patterns includes shifting the pointer based on the minimum length parameter.

2. The system of claim 1 , wherein:

a size of a search window defined by the start position and the end position is less than twice the maximum length parameter;

and

the pointer is, after the search of the multiple search patterns in the first portion of the text, set based on shifting from the start position by less than a combination of the minimum length parameter and the maximum length parameter.

3. The system of claim 1 , wherein the multiple search patterns comprise a social security number search pattern having a minimum length of nine characters and a maximum length of eleven characters if the social security number search pattern comprises dashes, a credit card number search pattern having a minimum length of fifteen characters and a maximum length of nineteen characters if the credit card number search pattern comprises dashes, and a date search pattern having a minimum length of six characters and a maximum length of ten characters if the date search pattern comprises dashes or slashes, and wherein:

the minimum length parameter is six and the maximum length parameter is nineteen.

4. The system of claim 1 , wherein the instructions further cause the system to perform:

in response to the end position is determined beyond the last character of the text to be searched, determining the end position as the last character of the text.

5. A system for finding search patterns, the system comprising:

one or more processors; and

a memory storing instructions that, when executed by the one or more processors, cause the system to perform:

obtaining multiple search patterns, each of the multiple search patterns including a different set of characters, wherein characters of the different sets of characters within the multiple search patterns are included within multiple alphabets having different respective alphabet lengths;

determining a minimum length parameter and a maximum length parameter based on lengths of the multiple search patterns, wherein the minimum length parameter is greater than one and less than the maximum length parameter;

defining a pool including each of the characters of the different sets of characters within the multiple search patterns, the pool comprising a union of the multiple alphabets;

setting, based on the minimum length parameter, a pointer pointing to a particular character of text to be searched;

determining whether the particular character pointed by the pointer matches any character within the pool;

in response to the particular character pointed by the pointer matching a character within the pool, determining a first portion of the text for a search of the multiple search patterns, wherein the first portion comprises a start position determined by backward shifting from the pointer for one less than the minimum length parameter, and an end position determined by forward shifting from the start position for less than twice the maximum length parameter; and

in response to the particular character pointed by the pointer not matching a character within the pool, skipping a second portion of the text from the search of the multiple search patterns, wherein skipping the second portion of the text from the search of the multiple search patterns includes shifting the pointer based on the minimum length parameter.

6. The system of claim 5 , wherein the instructions, when executed by the one or more processors, further cause the system to set the pointer to an offset of the minimum length parameter in the text to be searched.

7. The system of claim 5 , wherein skipping the second portion of the text from the search of the multiple search patterns includes shifting the pointer for the minimum length parameter.

8. The system of claim 5 , wherein the pointer is, after the search of the multiple search patterns in the first portion of the text, set based on the start position, the minimum length parameter, and the maximum length parameter.

9. The system of claim 5 , wherein a size of a search window defined by the start position and the end position is less than twice the maximum length parameter.

10. The system of claim 5 , wherein the end position is determined by forward shifting from the start position by two less than twice the maximum length parameter.

11. The system of claim 5 , wherein the pointer is, after the search of the multiple search patterns in the first portion of the text, set based on forward shifting from the start position by less than a combination of the minimum length parameter and the maximum length parameter.

12. A method for finding search patterns, the method comprising:

obtaining multiple search patterns, each of the multiple search patterns including a different set of characters, wherein characters of the different sets of characters within the multiple search patterns are included within multiple alphabets having different respective alphabet lengths;

determining a minimum length parameter and a maximum length parameter based on lengths of the multiple search patterns, wherein the minimum length parameter is greater than one and less than the maximum length parameter;

defining a pool including each of the characters of the different sets of characters within the multiple search patterns, the pool comprising a union of the multiple alphabets;

setting, based on the minimum length parameter, a pointer pointing to a particular character of text to be searched;

determining whether the particular character pointed by the pointer matches any character within the pool;

in response to the particular character pointed by the pointer matching a character within the pool, determining a first portion of the text for a search of the multiple search patterns, wherein the first portion comprises a start position determined by backward shifting from the pointer for one less than the minimum length parameter, and an end position determined by forward shifting from the start position for less than twice the maximum length parameter; and

in response to the particular character pointed by the pointer not matching a character within the pool, skipping a second portion of the text from the search of the multiple search patterns, wherein skipping the second portion of the text from the search of the multiple search patterns includes shifting the pointer based on the minimum length parameter.

13. The method of claim 12 , wherein the setting a pointer pointing comprising: setting the pointer to an offset of the minimum length parameter in the text to be searched.

14. The method of claim 12 , wherein skipping the second portion of the text from the search of the multiple search patterns includes shifting the pointer for the minimum length parameter.

15. The method of claim 12 , wherein the pointer is, after the search of the multiple search patterns in the first portion of the text, set based on the start position, the minimum length parameter, and the maximum length parameter.

16. The method of claim 12 , wherein a size of a search window defined by the start position and the end position is less than twice the maximum length parameter.

17. The method of claim 12 , wherein the end position is determined by forward shifting from the start position by two less than twice the maximum length parameter.

18. The method of claim 12 , wherein the pointer is, after the search of the multiple search patterns in the first portion of the text, set based on forward shifting from the start position by less than a combination of the minimum length parameter and the maximum length parameter.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 9, 2020
From: DIDI (HK) SCIENCE AND TECHNOLOGY LIMITED
To: BEIJING DIDI INFINITY TECHNOLOGY AND DEVELOPMENT CO., LTD.
Reel/Frame 053180/0456 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 29, 2020
From: DIDI RESEARCH AMERICA, LLC
To: DIDI (HK) SCIENCE AND TECHNOLOGY LIMITED
Reel/Frame 053081/0934 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 10, 2018
From: REN, LIWEI
To: DIDI RESEARCH AMERICA, LLC
Reel/Frame 046307/0802 →
Continuity (1)
Related Publication 20200019606A1 · Jan 16, 2020