# US 2020/0005780 A1 · Voice interaction method and device

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

- Number: US 2020/0005780 A1
- Document ID: US20200005780A1
- Status: Published application
- Kind: A1
- Application number: 16/278,676
- Filed: 2019-02-18
- Published: 2020-01-02
- Earliest claimed: 2018-06-27
- Assignees: Baidu Online Network Technology (Beijing) Co., Ltd.
- Applicants: Baidu Online Network Technology (Beijing) Co., Ltd.
- Inventors: YONGSHUAI LU
- Web page: https://patentgrep.com/patent/US20200005780A1

## CPC

- G06F 16/90332: {Natural language query formulation or dialogue systems}
- G10L 15/22: Procedures used during a speech recognition process, e.g. man-machine dialogue
- G06F 16/243: {Natural language query formulation}
- G10L 13/027: Concept to speech synthesisers; Generation of natural phrases from machine-based concepts (generation of parameters for speech synthesis out of text G10L13/08)
- G10L 15/04: Segmentation; Word boundary detection
- G10L 2015/223: {Execution procedure of a spoken command}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G10L: SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING

## Abstract

Embodiments of the present disclosure provide voice interaction method and device. The method includes: determining whether a first query statement currently received is a query statement first received within a preset time period; if not, obtaining a second query statement, where the second query statement is a query statement lastly received before receiving the first query statement; obtaining a third sentence vector according to a first sentence vector of the first query statement and a second sentence vector of the second query statement; and obtaining, from a bottom corpus, a first question and answer result corresponding to a fourth sentence vector a similarity between which and the third sentence vector satisfies a preset condition, and returning the first question and answer result. The method provided in the embodiment can return a bottom reply irrelevant to the query statement to the user, thereby improving the user experience.

## Claims

### Claim 1

A voice interaction method, comprising:
determining whether a first query statement currently received is a query statement first received within a preset time period;
if not, obtaining a second query statement, wherein the second query statement is a query statement lastly received before receiving the first query statement;
obtaining a third sentence vector according to a first sentence vector of the first query statement and a second sentence vector of the second query statement; and
obtaining, from a bottom corpus, a first question and answer result corresponding to a fourth sentence vector a similarity between which and the third sentence vector satisfies a preset condition, and returning the first question and answer result.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the obtaining the third sentence vector according to the first sentence vector of the first query statement and the second sentence vector of the second query statement comprises:
performing an addition process on the first sentence vector of the first query statement and the second sentence vector of the second query statement to obtain the third sentence vector.

### Claim 3 (depends on 1)

The method according to claim 1, wherein before the obtaining the third sentence vector according to the first sentence vector of the first query statement and the second sentence vector of the second query statement, the method further comprises:
performing a word segmentation process on the first query statement to obtain a plurality of first words, and performing a word segmentation process on the second query statement to obtain a plurality of second words.

### Claim 4 (depends on 3)

The method according to claim 3, wherein after the performing the word segmentation process on the first query statement to obtain the plurality of first words, and performing the word segmentation process on the second query statement to obtain the plurality of second words, the method further comprises:
obtaining the first sentence vector of the first query statement according to word vectors of the plurality of first words, and obtaining the second sentence vector of the second query statement according to word vectors of the plurality of second words.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the obtaining, from the bottom corpus, the first question and answer result corresponding to the fourth sentence vector the similarity between which and the third sentence vector satisfies the preset condition comprises:
obtaining a similarity between each fifth sentence vector in the bottom corpus and the third sentence vector, wherein the bottom corpus comprises a first question and answer pair, and a fifth sentence vector corresponding to a third query statement in the first question and answer pair;
taking the fifth sentence vector having a highest similarity with the third sentence vector as the fourth sentence vector; and
obtaining, from the bottom corpus, the first question and answer result corresponding to the fourth sentence vector.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the obtaining the similarity between each fifth sentence vector in the bottom corpus and the third sentence vector comprises:
obtaining a cosine similarity between each fifth sentence vector in the bottom corpus and the third sentence vector.

### Claim 7 (depends on 5)

The method according to claim 5, wherein before the obtaining the similarity between each fifth sentence vector in the bottom corpus and the third sentence vector, the method further comprises:
obtaining a chat closed set from a network, and obtaining the first question and answer pair according to the chat closed set.

### Claim 8 (depends on 7)

The method according to claim 7, wherein after the obtaining the chat closed set from the network, and obtaining the first question and answer pair according to the chat closed set, the method further comprises:
obtaining the bottom corpus according to the first question and answer pair.

### Claim 9 (depends on 1)

The method according to claim 1, wherein before the determining whether the first query statement currently received is the query statement first received within the preset time period, the method further comprises:
determining whether there is a second question and answer pair corresponding to the first query statement in a question and answer corpus, and an obtained determining result is no.

### Claim 10 (depends on 1)

The method according to claim 1, wherein if the first query statement is the query statement first received within the preset time period, the method further comprises:
obtaining, according to the first sentence vector of the first query statement and from the bottom corpus, a second question and answer result corresponding to a sixth sentence vector a similarity between which and the first sentence vector similarity satisfies the preset condition, and returning the second question and answer result.

### Claim 11

A voice interaction device, comprising:
a memory, a processor, and a computer program stored on the memory and operable on the processor,
wherein the processor, when running the computer program, is configured to:
determine whether a first query statement currently received is a query statement first received within a preset time period;
when a determining result is no, obtain a second query statement, wherein the second query statement is a query statement lastly received before receiving the first query statement;
obtain a third sentence vector according to a first sentence vector of the first query statement and a second sentence vector of the second query statement; and
obtain, from a bottom corpus, a first question and answer result corresponding to a fourth sentence vector a similarity between which and the third sentence vector satisfies a preset condition, and return the first question and answer result.

### Claim 12 (depends on 11)

The device according to claim 11, wherein the processor is configured to:
perform an addition process on the first sentence vector of the first query statement and the second sentence vector of the second query statement to obtain the third sentence vector.

### Claim 13 (depends on 11)

The device according to claim 11, wherein the processor is further configured to:
before the third sentence vector is obtained according to the first sentence vector of the first query statement and the second sentence vector of the second query statement, perform a word segmentation process on the first query statement to obtain a plurality of first words, and perform a word segmentation process on the second query statement to obtain a plurality of second words;
obtain the first sentence vector of the first query statement according to word vectors of the plurality of first words, and obtain the second sentence vector of the second query statement according to word vectors of the plurality of second words.

### Claim 14 (depends on 11)

The device according to claim 11, wherein the processor is configured to:
obtain a similarity between each fifth sentence vector in the bottom corpus and the third sentence vector, wherein the bottom corpus comprises a first question and answer pair, and a fifth sentence vector corresponding to a third query statement in the first question and answer pair;
take the fifth sentence vector having a highest similarity with the third sentence vector as the fourth sentence vector; and
obtain, from the bottom corpus, the first question and answer result corresponding to the fourth sentence vector.

### Claim 15 (depends on 14)

The device according to claim 14, wherein the processor is further configured to:
obtain a cosine similarity between each fifth sentence vector in the bottom corpus and the third sentence vector.

### Claim 16 (depends on 14)

The device of claim 14, wherein the processor is further configured to:
before the similarity between each fifth sentence vector in the bottom corpus and the third sentence vector is obtained, obtain a chat closed set from a network, and obtain the first question and answer pair according to the chat closed set.

### Claim 17 (depends on 16)

The device of claim 16, wherein the processor is further configured to:
obtain the bottom corpus according to the first question and answer pair.

### Claim 18 (depends on 11)

The device according to claim 11, wherein the processor is further configured to: before whether the first query statement currently received is the query statement first received within the preset time period is determined, determine whether there is a second question and answer pair corresponding to the first query statement in a question and answer corpus, and an obtained determining result is no.

### Claim 19 (depends on 11)

The device according to claim 11, wherein the processor is further configured to: if the first query statement is the query statement first received within the preset time period, obtain, according to the first sentence vector of the first query statement and from the bottom corpus, a second question and answer result corresponding to a sixth sentence vector a similarity between which and the first sentence vector similarity satisfies the preset condition, and return the second question and answer result.

### Claim 20

A computer readable storage medium, wherein the computer readable storage medium stores a computer-executed instruction therein, and when a processor executes the computer-executed instruction, the processor is configured to:
determine whether a first query statement currently received is a query statement first received within a preset time period;
if not, obtain a second query statement, wherein the second query statement is a query statement lastly received before receiving the first query statement;
obtain a third sentence vector according to a first sentence vector of the first query statement and a second sentence vector of the second query statement; and
obtain, from a bottom corpus, a first question and answer result corresponding to a fourth sentence vector a similarity between which and the third sentence vector satisfies a preset condition, and return the first question and answer result.
