# US 10,956,669 B2 · Expression recognition using character skipping

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,956,669 B2
- Document ID: US10956669B2
- Status: Granted
- Kind: B2
- Application number: 16/031,437
- Filed: 2018-07-10
- Published: 2020-01-16
- Granted: 2021-03-23
- Earliest claimed: 2018-07-10
- Assignees: Beijing Didi Infinity Technology and Development Co., Ltd.
- Applicants: Beijing DiDi Infinity Technology and Development Co., Ltd.
- Inventors: Liwei Ren
- Web page: https://patentgrep.com/patent/US10956669B2

## CPC

- G06F 40/205: Parsing
- G06V 30/1985: {Syntactic analysis, e.g. using a grammatical approach (syntactic image representation G06V30/18171)}
- G06F 16/285: {Clustering or classification}
- G06F 40/166: Editing, e.g. inserting or deleting
- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06V 30/373: {using a special pattern or subpattern alphabet}
- G06V 30/413: Classification of content, e.g. text, photographs or tables
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## 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

### Claim 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.

### Claim 2 (depends on 1)

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.

### Claim 3 (depends on 1)

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.

### Claim 4 (depends on 1)

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.

### Claim 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.

### Claim 6 (depends on 5)

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.

### Claim 7 (depends on 5)

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.

### Claim 8 (depends on 5)

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.

### Claim 9 (depends on 5)

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.

### Claim 10 (depends on 5)

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.

### Claim 11 (depends on 5)

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.

### Claim 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.

### Claim 13 (depends on 12)

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.

### Claim 14 (depends on 12)

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.

### Claim 15 (depends on 12)

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.

### Claim 16 (depends on 12)

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.

### Claim 17 (depends on 12)

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.

### Claim 18 (depends on 12)

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.
