# US 11,308,405 B2 · Human-computer dialogue 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,308,405 B2
- Document ID: US11308405B2
- Status: Granted
- Kind: B2
- Application number: 16/514,683
- Filed: 2019-07-17
- Published: 2019-11-07
- Granted: 2022-04-19
- Earliest claimed: 2017-01-17
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Lifeng Shang; Zhengdong Lu; Hang Li
- Web page: https://patentgrep.com/patent/US11308405B2

## CPC

- G06N 5/043: Distributed expert systems; Blackboards
- G06F 16/3329: Natural language query formulation
- G06F 16/3344: {using natural language analysis}
- G06F 40/30: Semantic analysis
- G06F 40/35: Discourse or dialogue representation
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/0442: characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
- G06N 3/045: Combinations of networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/0475: Generative networks
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 3/09: Supervised learning
- G10L 13/08: Text analysis or generation of parameters for speech synthesis out of text, e.g. grapheme to phoneme translation, prosody generation or stress or intonation determination
- G10L 15/22: Procedures used during a speech recognition process, e.g. man-machine dialogue
- H04L 51/02: using automatic reactions or user delegation, e.g. automatic replies or chatbot-generated messages
- G10L 2015/225: {Feedback of the input speech}
- G10L 2015/228: {of application context}
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- 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
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

An apparatus is pre-equipped with a plurality of dialogue robots, and each dialogue robot is configured to conduct a human-computer dialogue based on at least one topic. The method includes: obtaining a text entered by a user; determining at least one topic related to the text, and determining a target dialogue robot from the plurality of dialogue robots based on the at least one topic related to the text and a predefined mapping relationship between a dialogue robot and a topic, where a target topic corresponding to the target dialogue robot is some or all of the at least one topic related to the text; and allocating the text to the target dialogue robot and obtaining a reply for the text from the target dialogue robot, where the reply is generated by the target dialogue robot based on at least one semantic understanding of the text.

## Claims

### Claim 1

A human-computer dialogue method performed by a human-computer dialogue apparatus pre-equipped with a plurality of dialogue robots, wherein each dialogue robot is configured to conduct a human-computer dialogue based on at least one topic, and wherein the method comprises:
obtaining a text entered by a user;
determining at least one topic related to the text;
determining a target dialogue robot from the plurality of dialogue robots based on the at least one topic related to the text and a predefined mapping relationship between a dialogue robot of the plurality of dialogue robots and a topic, wherein a target topic corresponding to the target dialogue robot is included in the at least one topic related to the text; and
generating, by the target dialogue robot, a reply for the text based on a semantic understanding of the text, wherein the semantic understanding has a one-to-one correspondence with the target topic;
wherein before determining the at least one topic related to the text, the method further comprises performing parameter training on the plurality of dialogue robots in parallel based on the predefined mapping relationship between the dialogue robot of the plurality of dialogue robots and the topic, wherein each dialogue robot is configured to perform the parameter training for at least one corresponding topic.

### Claim 2 (depends on 1)

The human-computer dialogue method of claim 1, wherein determining the at least one topic related to the text comprises determining a correlation probability of each of a plurality of predefined topics based on the text entered by the user, wherein the correlation probability indicates a probability that the text is related to the predefined topic.

### Claim 3 (depends on 1)

The human-computer dialogue method of claim 1, wherein determining the at least one topic related to the text comprises:
determining a correlation probability of each of a plurality of predefined topics based on the text entered by the user, wherein the correlation probability indicates a probability that the text is related to the predefined topic; and
determining, based on the correlation probability of each of the plurality of predefined topics and a first preset threshold, the at least one topic related to the text, wherein a correlation probability of each of the at least one topic is greater than the first preset threshold.

### Claim 4 (depends on 3)

The human-computer dialogue method of claim 3, wherein determining, based on the correlation probability of each of the plurality of predefined topics and the first preset threshold, the at least one topic related to the text comprises:
determining whether a largest value of correlation probabilities of the plurality of predefined topics is less than a second preset threshold; and
determining, based on the correlation probability of each of the plurality of predefined topics and the first preset threshold, the at least one topic related to the text in response to the largest value of the correlation probabilities being less than the second preset threshold.

### Claim 5 (depends on 1)

The human-computer dialogue method of claim 1, wherein the text is related to at least two topics, wherein determining the target dialogue robot from the plurality of dialogue robots based on the at least one topic related to the text and the predefined mapping relationship between the dialogue robot of the plurality of dialogue robots and the topic comprises:
determining, based on the at least two topics related to the text and the predefined mapping relationship between the dialogue robot of the plurality of dialogue robots and the topic, whether a dialogue robot corresponding to the at least two topics exists in the plurality of dialogue robots; and
determining that the dialogue robot corresponding to the at least two topics is the target dialogue robot in response to the dialogue robot corresponding to the at least two topics existing in the plurality of dialogue robots, wherein the target topic comprises the at least two topics.

### Claim 6 (depends on 5)

The human-computer dialogue method of claim 5, wherein the reply is generated by the target dialogue robot based on a target semantic understanding, and wherein the method further comprises obtaining, by the target dialogue robot, the target semantic understanding based on the semantic understanding of the text according to the following formula:
M
=
∑
i
=
1
N
⁢
P
i
⁢
C
i
∑
i
=
1
N
⁢
P
i
wherein M represents a vector of the target semantic understanding, Pi represents a correlation probability of an ith target topic in N target topics, and Ci represents a semantic understanding that is of the text and computed based on the ith target topic, and wherein a value range of i is [1, N], i is a natural number, N represents a quantity of the target topics, and N is a natural number greater than 1.

### Claim 7 (depends on 5)

The human-computer dialogue method of claim 5, wherein the reply comprises at least two lexical items, wherein a next lexical item in the reply is based on a semantic understanding of a previous lexical item, and wherein the method further comprises obtaining the semantic understanding of the previous lexical item according to the following formula:
C
t
+
1
=
∑
i
=
1
N
⁢
ω
i
t
⁢
C
i
wherein Ct+1 represents a vector of a semantic understanding of a tth lexical item, ω1t represents a weight that is of an ith target topic in N target topics and is based on relevance between the tth lexical item and the ith target topic, and Ci represents a semantic understanding that is of the text and computed based on the ith target topic, and wherein a value range oft is [1, S], t is a natural number, S represents a quantity of lexical items comprised in the reply, S is a natural number greater than 1, a value range of i is [1, N], i is a natural number, N represents a quantity of the target topics, and N is a natural number greater than 1.

### Claim 8 (depends on 1)

The human-computer dialogue method of claim 1, wherein the text is related to at least two topics, and wherein determining the target dialogue robot from the plurality of dialogue robots based on the at least one topic related to the text and the predefined mapping relationship between the dialogue robot of the plurality of dialogue robots and the topic comprises:
determining, based on the at least two topics related to the text and the predefined mapping relationship between the dialogue robot of the plurality of dialogue robots and the topic, whether a dialogue robot corresponding to the at least two topics exists in the plurality of dialogue robots; and
determining that a dialogue robot corresponding to a topic having a highest correlation probability of a plurality of predefined topics is the target dialogue robot in response to the dialogue robot corresponding to the at least two topics not existing in the plurality of dialogue robots.

### Claim 9 (depends on 8)

The human-computer dialogue method of claim 8, wherein the target dialogue robot corresponds to only one target topic.

### Claim 10 (depends on 1)

The human-computer dialogue method of claim 1, wherein determining the at least one topic related to the text and the target dialogue robot from the plurality of dialogue robots based on the at least one topic related to the text and the predefined mapping relationship between the dialogue robot of the plurality of dialogue robots and the topic comprises:
determining a correlation probability of each of a plurality of predefined topics based on the text entered by the user, wherein the correlation probability indicates a probability that the text is related to the predefined topic;
determining whether a largest value of correlation probabilities of the plurality of predefined topics is less than a second preset threshold;
determining that a topic corresponding to the largest value of the correlation probabilities of the plurality of predefined topics is the target topic in response to the largest value of the correlation probabilities of the plurality of predefined topics being greater than or equal to the second preset threshold; and
determining, based on the predefined mapping relationship between the dialogue robot of the plurality of dialogue robots and the topic, that a dialogue robot corresponding to the target topic is the target dialogue robot.

### Claim 11

A human-computer dialogue apparatus pre-equipped with a plurality of dialogue robots, wherein each dialogue robot is configured to conduct a human-computer dialogue based on at least one topic, and wherein the human-computer dialogue apparatus comprises:
a memory configured to store instructions; and
a processor coupled to the memory and configured to execute the instructions, wherein the instructions, when executed, cause the processor to:
obtain a text entered by a user;
determine at least one topic related to the text;
determine a target dialogue robot from the plurality of dialogue robots based on the at least one topic related to the text and a predefined mapping relationship between a dialogue robot of the plurality of dialogue robots and a topic, wherein a target topic corresponding to the target dialogue robot is included in the at least one topic related to the text; and
generate a reply for the text based on a semantic understanding of the text, wherein the semantic understanding has a one-to-one correspondence with the target topic; and
perform parameter training on the plurality of dialogue robots in parallel, wherein each dialogue robot is configured to perform the parameter training for at least one corresponding topic.

### Claim 12 (depends on 11)

The human-computer dialogue apparatus of claim 11, wherein the instructions, when executed, further cause the processor to determine a correlation probability of each of a plurality of predefined topics based on the text entered by the user, wherein the correlation probability indicates a probability that the text is related to the predefined topic.

### Claim 13 (depends on 11)

The human-computer dialogue apparatus of claim 11, wherein the instructions, when executed, further cause the processor to:
determine a correlation probability of each of a plurality of predefined topics based on the text entered by the user, wherein the correlation probability indicates a probability that the text is related to the predefined topic; and
determine, based on the correlation probability of each of the plurality of predefined topics and a first preset threshold, the at least one topic related to the text, wherein a correlation probability of each of the at least one topic is greater than the first preset threshold.

### Claim 14 (depends on 13)

The human-computer dialogue apparatus of claim 13, wherein the instructions, when executed, further cause the processor to:
determine whether a largest value of correlation probabilities of the plurality of predefined topics is less than a second preset threshold; and
determine, based on the correlation probability of each of the plurality of predefined topics and the first preset threshold, the at least one topic related to the text in response to the largest value of the correlation probabilities being less than the second preset threshold.

### Claim 15 (depends on 11)

The human-computer dialogue apparatus of claim 11, wherein the text is related to at least two topics, and wherein the instructions, when executed, further cause the processor to:
determine, based on the at least two topics related to the text and the predefined mapping relationship between the dialogue robot of the plurality of dialogue robots and the topic, whether a dialogue robot corresponding to the at least two topics exists in the plurality of dialogue robots; and
determine that the dialogue robot corresponding to the at least two topics is the target dialogue robot in response to the dialogue robot corresponding to the at least two topics existing in the plurality of dialogue robots, wherein the target topic comprises the at least two topics.

### Claim 16 (depends on 15)

The human-computer dialogue apparatus of claim 15, wherein the reply is generated by the target dialogue robot based on a target semantic understanding, and wherein the instructions, when executed, further cause the processor to obtain the target semantic understanding based on the semantic understanding of the text according to the following formula:
M
=
∑
i
=
1
N
⁢
P
i
⁢
C
i
∑
i
=
1
N
⁢
P
i
wherein M represents a vector of the target semantic understanding, Pi represents a correlation probability of an ith target topic in N target topics, and Ci represents a semantic understanding that is of the text and computed based on the ith target topic, and wherein a value range of i is [1, N], i is a natural number, N represents a quantity of the target topics, and N is a natural number greater than 1.

### Claim 17 (depends on 15)

The human-computer dialogue apparatus of claim 15, wherein the reply comprises at least two lexical items, wherein a next lexical item in the reply is based on a semantic understanding of a previous lexical item, and wherein the instructions, when executed, further cause the processor to obtain the semantic understanding of the previous lexical item according to the following formula:
C
t
+
1
=
∑
i
=
1
N
⁢
ω
i
t
⁢
C
i
wherein Ct+1 represents a vector of a semantic understanding of a tth lexical item, ω1t represents a weight that is of an ith target topic in N target topics and is based on relevance between the tth lexical item and the ith target topic, and Ci represents a semantic understanding that is of the text and computed based on the ith target topic, and wherein a value range oft is [1, S], t is a natural number, S represents a quantity of lexical items comprised in the reply, S is a natural number greater than 1, a value range of i is [1, N], i is a natural number, N represents a quantity of the target topics, and N is a natural number greater than 1.

### Claim 18 (depends on 11)

The human-computer dialogue apparatus of claim 11, wherein the text is related to at least two topics, and wherein the instructions, when executed, further cause the processor to:
determine, based on the at least two topics related to the text and the predefined mapping relationship between the dialogue robot of the plurality of dialogue robots and the topic, whether a dialogue robot corresponding to the at least two topics exists in the plurality of dialogue robots; and
determine that a dialogue robot corresponding to a topic having a highest correlation probability of a plurality of predefined topics is the target dialogue robot in response to the dialogue robot corresponding to the at least two topics not existing in the plurality of dialogue robots.

### Claim 19 (depends on 18)

The human-computer dialogue apparatus of claim 18, wherein the target dialogue robot corresponds to only one target topic.

### Claim 20 (depends on 11)

The human-computer dialogue apparatus of claim 11, wherein the instructions, when executed, further cause the processor to:
determine a correlation probability of each of a plurality of predefined topics based on the text entered by the user, wherein the correlation probability indicates a probability that the text is related to the predefined topic;
determine whether a largest value of correlation probabilities of the plurality of predefined topics is less than a second preset threshold;
determine that a topic corresponding to the largest value of the correlation probabilities of the plurality of predefined topics is the target topic in response to the largest value of the correlation probabilities of the plurality of predefined topics being greater than or equal to the second preset threshold; and
determine, based on the predefined mapping relationship between the dialogue robot of the plurality of dialogue robots and the topic, that a dialogue robot corresponding to the target topic is the target dialogue robot.
