# US 2024/0004610 A1 · String similarity based weighted min-hashing

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

- Number: US 2024/0004610 A1
- Document ID: US20240004610A1
- Status: Published application
- Kind: A1
- Application number: 17/853,996
- Filed: 2022-06-30
- Published: 2024-01-04
- Earliest claimed: 2022-06-30
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Allon Adir; Ehud Aharoni; Omri Soceanu; Michael Mirkin
- Web page: https://patentgrep.com/patent/US20240004610A1

## CPC

- G06F 7/02: Comparing digital values (G06F7/06, {G06F7/22,} G06F7/38 take precedence)
- G06F 16/152: {using file content signatures, e.g. hash values}
- G06F 16/313: {Selection or weighting of terms for indexing}
- G06F 16/90344: {by using string matching techniques}
- G06F 16/2458: Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer-implemented method for generating hash values to determine string similarity is disclosed. The computer-implemented method includes converting a first text string of a first data set into a first set of shingles. The computer-implemented method further includes determining a weight associated with each shingle in the first set of shingles based, at least in part, on a particular record field associated with a shingle. The computer-implemented method further includes generating, based on a hash function, a hash value for each shingle in the first set of shingles. The computer-implemented method further includes reducing the hash value generated for each shingle in the first set of shingles, based, at least in part on the weight associated with the shingle.

## Claims

### Claim 1

A computer-implemented method for generating hash values to determine string similarity, the computer-implemented method comprising:
converting a first text string of a first data set into a first set of shingles;
determining a weight associated with each shingle in the first set of shingles based, at least in part, on a particular record field associated with a shingle;
generating, based on a hash function, a hash value for each shingle in the first set of shingles; and
reducing the hash value generated for each shingle in the first set of shingles, based, at least in part, on the weight associated with the shingle.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein reducing the hash value generated for each shingle in the first set of shingles is further based on:
generating a first intermediate value by dividing the hash value generated for the shingle by a maximum hash value;
generating a second intermediate value by calculating 1 minus the first intermediate value raised to the weight associated with the shingle;
generating a third intermediate value by multiplying the second intermediate value by the weight associated with the shingle; and
reducing the hash value generated for the shingle based on the third intermediate value.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein a reduction in the hash value generated for the shingle increases as the weight associated with the shingle increases.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein a reduction in the hash value generated for the shingle decreases as the weight associated with the shingle increases.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, wherein converting the text string into the set of shingles further includes:
dividing the first text string into a set of overlapping substrings having a fixed number of consecutive characters, wherein a total number of shingles in the first set of shingles is determined by a total number of different possible combinations overlapping substrings having the fixed number of consecutive characters.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein reducing the hash value of each shingle in the first set of shingles according to the weight associated with the shingle directly increases a likelihood of a shingle with a higher weight ending up with a minimum hash value.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, further comprising:
computing a hash-based signature for the shingle having a minimum hash value.

### Claim 8 (depends on 7)

The computer-implemented method of claim 7, further comprising:
determining that the first text string from the first data set and a second text string from a second data set intersect based, at least in part, the first text string and the second text string sharing the hash-based signature.

### Claim 9 (depends on 8)

The computer-implemented method of claim 8, further comprising:
determining that the first text string from the first data set and the second text string from the second data set are a match based, at least in part, on a similarity score associated with the first and second text strings being above a predetermined threshold.

### Claim 10 (depends on 9)

The computer-implemented method of claim 9, wherein determining that the first text string from the first data set and the second text string from the second data set are a match is further based, at least in part, on a Jaccard similarity being above a predetermined threshold.

### Claim 11

A computer program product for generating hash values to determine string similarity, the computer program product comprising one or more computer readable storage media and program instructions stored on the one or more computer readable storage media, the program instructions including instructions to:
convert a first text string of a first data set into a first set of shingles;
determine a weight associated with each shingle in the first set of shingles based, at least in part, on a particular record field associated with a shingle;
generate, based on a hash function, a hash value for each shingle in the first set of shingles; and
reduce the hash value generated for each shingle in the first set of shingles, based, at least in part on the weight associated with the shingle.

### Claim 12 (depends on 11)

The computer program product of claim 11, wherein the instructions to reduce the hash value generated for each shingle in the first set of shingles is further based on instructions to:
generate a first intermediate value by dividing the hash value generated for the shingle by a maximum hash value;
generate a second intermediate value by calculating 1 minus the first intermediate value raised to the weight associated with the shingle;
generate a third intermediate value by multiplying the second intermediate value by the weight associated with the shingle; and
reduce the hash value generated for the shingle based on the third intermediate value.

### Claim 13 (depends on 11)

The computer program product of claim 11, wherein a reduction in the hash value generated for the shingle increases as the weight associated with the shingle increases.

### Claim 14 (depends on 11)

The computer program product of claim 11, wherein a reduction in the hash value generated for the shingle decreases as the weight associated with the shingle increases.

### Claim 15 (depends on 11)

The computer program product of claim 11, wherein the instructions to convert the text string into the set of shingles further includes instructions to:
divide the first text string into a set of overlapping substrings having a fixed number of consecutive characters, wherein a total number of shingles in the first set of shingles is determined by a total number of different possible combinations overlapping substrings having the fixed number of consecutive characters.

### Claim 16 (depends on 11)

The computer program product of claim 11, wherein reducing the hash value of each shingle in the first set of shingles according to the weight associated with the shingle directly increases a likelihood of a shingle with a higher weight ending up with a minimum hash value.

### Claim 17 (depends on 11)

The computer program product of claim 11, further comprising instructions to:
compute a hash-based signature for the shingle having a minimum hash value; and
determine that the first text string from the first data set and a second text string from a second data set intersect based, at least in part, the first text string and the second text string sharing the hash-based signature.

### Claim 18 (depends on 17)

The computer program product of claim 17, further comprising instructions to:
determine that the first text string from the first data set and the second text string from the second data set are a match based, at least in part, on a similarity score associated with the first and second text strings being above a predetermined threshold.

### Claim 19

A computer system for generating hash values to determine string similarity, comprising:
one or more computer processors;
one or more computer readable storage media;
computer program instructions;
the computer program instructions being stored on the one or more computer readable storage media for execution by the one or more computer processors; and
the computer program instructions including instructions to:
convert a first text string of a first data set into a first set of shingles;
determine a weight associated with each shingle in the first set of shingles based, at least in part, on a particular record field associated with a shingle;
generate, based on a hash function, a hash value for each shingle in the first set of shingles; and
reduce the hash value generated for each shingle in the first set of shingles, based, at least in part on the weight associated with the shingle.

### Claim 20 (depends on 19)

The computer system of claim 19, wherein the instructions to reduce the hash value generated for each shingle in the first set of shingles is further based on instructions to:
generate a first intermediate value by dividing the hash value generated for the shingle by a maximum hash value;
generate a second intermediate value by calculating 1 minus the first intermediate value raised to the weight associated with the shingle;
generate a third intermediate value by multiplying the second intermediate value by the weight associated with the shingle; and
reduce the hash value generated for the shingle based on the third intermediate value.
