# US 11,120,214 B2 · Corpus generating method and apparatus, and human-machine interaction processing method and apparatus

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

- Number: US 11,120,214 B2
- Document ID: US11120214B2
- Status: Granted
- Kind: B2
- Application number: 16/457,372
- Filed: 2019-06-28
- Published: 2020-01-02
- Granted: 2021-09-14
- Earliest claimed: 2018-06-29
- Assignees: Alibaba Group Holding Limited
- Applicants: Alibaba Group Holding Limited
- Inventors: Xiaojun Wang
- Web page: https://patentgrep.com/patent/US11120214B2

## CPC

- G06F 40/20: Natural language analysis (semantic analysis of natural language G06F40/30)
- G06F 16/90332: {Natural language query formulation or dialogue systems}
- G06F 40/289: Phrasal analysis, e.g. finite state techniques or chunking
- G06F 40/44: Statistical methods, e.g. probability models
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of the present specification provide a corpus generating method and apparatus, and a human-machine interaction processing method and apparatus, wherein the corpus generating method comprises: generating a corpus vector according to corpus content; determining a vector type of the corpus vector; and generating, according to the vector type and the corpus vector, a corpus having an inverted chain index.

## Claims

### Claim 1

A corpus generating method, implementable by a computing device, the method comprising:
generating a corpus vector according to corpus content;
determining a vector type of the corpus vector, wherein the determining comprises calculating a distance between the corpus vector and each of a plurality of class center points and determining the vector type of the corpus vector as a vector type represented by one of the class center points having the smallest distance to the corpus vector; and
generating, according to the vector type and the corpus vector, a corpus having an inverted chain index, wherein the inverted chain index comprises a plurality of items, each item comprising an attribute value and one or more addresses of one or more records having the attribute value, and wherein, for at least one of the items, the attribute value of the item comprises the determined vector type and the one or more addresses of the one or more records of the item comprise an address of the generated corpus vector.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the generating a corpus vector according to corpus content comprises:
determining a word segmentation result of the corpus content, the word segmentation result including a plurality of words;
determining word vectors corresponding to the words in the word segmentation result; and
generating the corpus vector corresponding to the corpus content according to the word vectors corresponding to the words in the word segmentation result.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the determining word vectors corresponding to the words in the word segmentation result comprises: searching a preset word vector library to determine the word vectors corresponding to the words in the word segmentation result.

### Claim 4 (depends on 2)

The method according to claim 2, wherein the generating the corpus vector corresponding to the corpus content according to the word vectors corresponding to the words in the word segmentation result comprises:
summing the word vectors corresponding to the words in the word segmentation result to generate the corpus vector.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the determining a vector type of the corpus vector comprises: determining the vector type of the corpus vector through Product Quantization.

### Claim 6 (depends on 5)

The method according to claim 5, further comprising generating a plurality of corpus vectors, and wherein the determining the vector type of the corpus vector through Product Quantization comprises:
dividing each of the plurality of corpus vectors into k sub-vectors, and forming k sub-vector sets, wherein k is a positive integer equal to or greater than one;
clustering each of the sub-vector sets using a clustering algorithm, and generating m class centers for each of the sub-vector sets, wherein m is a positive integer equal to or greater than one;
determining a class center to which each sub-vector of each corpus vector belongs; and
determining a vector type of the corpus vector according to the class centers to which the k sub-vectors of the each corpus vector belong.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the generating, according to the vector type and the corpus vector, a corpus having an inverted chain index comprises:
generating the corpus having the inverted chain index according to record data, each piece of the record data including corpus vectors having a same vector type and the corresponding vector type.

### Claim 8 (depends on 1)

The method according to claim 1, further comprising:
generating an incremental corpus vector according to incremental corpus content;
generating an incremental corpus having a tile index according to the incremental corpus vector; and
forming a new corpus based on the corpus and the incremental corpus.

### Claim 9

A corpus generating apparatus, comprising: one or more processors and one or more non-transitory computer-readable memories coupled to the one or more processors and configured with instructions executable by the one or more processors to cause the apparatus to perform operations comprising:
generating a corpus vector according to corpus content;
determining a vector type of the corpus vector, wherein the determining comprises calculating a distance between the corpus vector and each of a plurality of class center points and determining the vector type of the corpus vector as a vector type represented by one of the class center points having the smallest distance to the corpus vector; and
generating, according to the vector type and the corpus vector, a corpus having an inverted chain index, wherein the inverted chain index comprises a plurality of items, each item comprising an attribute value and one or more addresses of one or more records having the attribute value, and wherein, for at least one of the items, the attribute value of the item comprises the determined vector type and the one or more addresses of the one or more records of the item comprise an address of the generated corpus vector.

### Claim 10 (depends on 9)

The apparatus according to claim 9, wherein the generating a corpus vector according to corpus content comprises:
determining a word segmentation result of the corpus content, the word segmentation result including a plurality of words;
determining word vectors corresponding to the words in the word segmentation result; and
generating the corpus vector corresponding to the corpus content according to the word vectors corresponding to the words in the word segmentation result.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein the determining word vectors corresponding to the words in the word segmentation result comprises: searching a preset word vector library to determine the word vectors corresponding to the words in the word segmentation result.

### Claim 12 (depends on 10)

The apparatus according to claim 10, wherein the generating the corpus vector corresponding to the corpus content according to the word vectors corresponding to the words in the word segmentation result comprises:
summing the word vectors corresponding to the words in the word segmentation result to generate the corpus vector.

### Claim 13 (depends on 9)

The apparatus according to claim 9, wherein the determining a vector type of the corpus vector comprises: determining the vector type of the corpus vector through Product Quantization.

### Claim 14 (depends on 13)

The apparatus according to claim 13, wherein the operations further comprise: generating a plurality of corpus vectors, and wherein the determining the vector type of the corpus vector through Product Quantization comprises:
dividing each of the plurality of corpus vectors into k sub-vectors, and forming k sub-vector sets, wherein k is a positive integer equal to or greater than one;
clustering each of the sub-vector sets using a clustering algorithm, and generating m class centers for each of the sub-vector sets, wherein m is a positive integer equal to or greater than one;
determining a class center to which each sub-vector of each corpus vector belongs; and
determining a vector type of the corpus vector according to the class centers to which the k sub-vectors of the each corpus vector belong.

### Claim 15 (depends on 14)

The apparatus according to claim 14, wherein the generating, according to the vector type and the corpus vector, a corpus having an inverted chain index comprises:
generating the corpus having the inverted chain index according to record data, each piece of the record data including corpus vectors having a same vector type and the corresponding vector type.
