# US 2022/0284060 A1 · Question Answering Method and Apparatus Based on Knowledge Graph

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

- Number: US 2022/0284060 A1
- Document ID: US20220284060A1
- Status: Published application
- Kind: A1
- Application number: 17/750,508
- Filed: 2022-05-23
- Published: 2022-09-08
- Earliest claimed: 2019-11-22
- Assignees: Huawei Cloud Computing Technologies Co., Ltd.
- Applicants: Huawei Cloud Computing Technologies Co., Ltd.
- Inventors: Dongcai Lu; Yuanzhen Liu; Yi Zheng; Jing Yuan; Baoxing Huai
- Web page: https://patentgrep.com/patent/US20220284060A1

## CPC

- G06F 16/90332: {Natural language query formulation or dialogue systems}
- G06F 40/35: Discourse or dialogue representation
- G06F 16/332: Query formulation
- G06F 16/36: Creation of semantic tools, e.g. ontology or thesauri
- G06F 16/90324: {using system suggestions}
- G06F 40/247: Thesauruses; Synonyms
- G06F 40/295: Named entity recognition
- G06F 40/30: Semantic analysis
- G06N 5/02: Knowledge representation; Symbolic representation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A question answering method based on a knowledge graph are disclosed, including: After obtaining a first natural query statement including a first query entity and first entity characteristic information, the terminal queries the knowledge graph based on the first query entity and the first entity characteristic information, to obtain a first result. The terminal obtains a second natural query statement after outputting the first result. The terminal determines a missing part in the second natural query statement based on the first query entity or the first entity characteristic information. The terminal queries the knowledge graph based on the missing part in the second natural query statement to obtain a second result, and outputs the second result.

## Claims

### Claim 1

A question answering method based on a knowledge graph, comprising:
obtaining a first natural query statement, wherein the first natural query statement comprises a first query entity and first entity characteristic information, and the first entity characteristic information comprises at least one of an attribute of the first query entity or a relationship of the first query entity;
querying the knowledge graph based on the first query entity and the first entity characteristic information to obtain a first result, and outputting the first result;
obtaining a second natural query statement;
determining, based on the first query entity or the first entity characteristic information, a missing part in the second natural query statement; and
querying the knowledge graph based on the missing part in the second natural query statement to obtain a second result, and outputting the second result.

### Claim 2 (depends on 1)

The question answering method according to claim 1, wherein before the determining, based on the first query entity or the first entity characteristic information, a missing part in the second natural query statement, the question answering method further comprises:
determining that the second natural query statement misses a second query entity or second entity characteristic information, wherein the second entity characteristic information comprises at least one of an attribute of the second query entity or a relationship of the second query entity; and
if the second natural query statement misses the second query entity, the determining, based on the first query entity or the first entity characteristic information, a missing part in the second natural query statement comprises: determining the second query entity based on the first query entity.

### Claim 3 (depends on 1)

The question answering method according to claim 1, wherein before the determining, based on the first query entity or the first entity characteristic information, a missing part in the second natural query statement, the question answering method further comprises:
determining that the second natural query statement misses a second query entity or second entity characteristic information, wherein the second entity characteristic information comprises at least one of an attribute of the second query entity or a relationship of the second query entity; and
if the second natural query statement misses the second entity characteristic information, the determining, based on the first query entity or the first entity characteristic information, a missing part in the second natural query statement comprises: determining the second entity characteristic information based on the first characteristic information.

### Claim 4 (depends on 2)

The question answering method according to claim 2, wherein the determining that the second natural query statement misses a second query entity or second entity characteristic information comprises:
identifying a query entity and entity characteristic information in the second natural query statement according to a preset rule, to obtain the second query entity or the second entity characteristic information; and
if the second query entity is not obtained, determining that the second natural query statement misses the second query entity.

### Claim 5 (depends on 2)

The question answering method according to claim 2, wherein the determining that the second natural query statement misses a second query entity or second entity characteristic information comprises:
identifying a query entity and entity characteristic information in the second natural query statement according to a preset rule, to obtain the second query entity or the second entity characteristic information; and
if the second entity characteristic information is not obtained, determining that the second natural query statement misses the second entity characteristic information.

### Claim 6 (depends on 4)

The question answering method according to claim 4, wherein the identifying a query entity and entity characteristic information in the second natural query statement according to a preset rule, to obtain the second query entity or the second entity characteristic information comprises:
inputting the second natural query statement into a first preset model, to obtain an initial query entity or initial entity characteristic information; and
if the initial query entity is obtained, extending the initial query entity based on a preset algorithm and the second natural query statement; and determining the second query entity based on a preset dictionary and an extended initial query entity; or
if the initial entity characteristic information is obtained, extending the initial entity characteristic information based on a preset algorithm and the second natural query statement; and determining the second entity characteristic information based on a dictionary and extended initial entity characteristic information, wherein
the dictionary corresponds to the knowledge graph.

### Claim 7 (depends on 1)

The question answering method according to claim 1, wherein the question answering method further comprises: determining a question type of the second natural query statement based on the second query entity, the second entity characteristic information, and the second natural query statement by using a preset question model.

### Claim 8 (depends on 7)

The question answering method according to claim 7, wherein the querying the knowledge graph based on the missing part in the second natural query statement to obtain a second result comprises:
determining a question template of the second natural query statement based on the second natural query statement and the missing part in the second natural query statement;
determining a target query statement from a preset question template library, wherein the question template library comprises m question templates and m query statements, each of the m query statements uniquely corresponds to one question template, m is a positive integer, the target query statement corresponds to a target question template, and the target question template is a template that is in the question template library and that has a highest similarity to the question template of the second natural query statement; and
querying the knowledge graph based on the question type of the second natural query statement and the target query statement to obtain the second result.

### Claim 9 (depends on 1)

The question answering method according to claim 1, wherein the question answering method further comprises:
determining a guide statement based on the first query entity, the first entity characteristic information, the missing part in the second natural query statement, the second natural query statement, and a preset guide policy, wherein the guide statement is used to guide a next operation of a user; and
outputting the guide statement.

### Claim 10

A question answering apparatus based on a knowledge graph, comprising a memory and one or more processors, wherein the memory is coupled to the processor; and the memory is configured to store computer program code, wherein the computer program code comprises computer instructions, and when the computer instructions are executed by the question answering apparatus, the question answering apparatus is enabled to perform the following question answering method:
obtaining a first natural query statement, wherein the first natural query statement comprises a first query entity and first entity characteristic information, and the first entity characteristic information comprises at least one of an attribute of the first query entity or a relationship of the first query entity;
querying the knowledge graph based on the first query entity and the first entity characteristic information to obtain a first result, and outputting the first result;
obtaining a second natural query statement;
determining, based on the first query entity or the first entity characteristic information, a missing part in the second natural query statement; and
querying the knowledge graph based on the missing part in the second natural query statement to obtain a second result, and outputting the second result.

### Claim 11

A non-volatile storage medium, comprising computer instructions, wherein when the computer instructions are run on a question answering apparatus based on a knowledge graph, the question answering apparatus is enabled to implement the following question answering method:
obtaining a first natural query statement, wherein the first natural query statement comprises a first query entity and first entity characteristic information, and the first entity characteristic information comprises at least one of an attribute of the first query entity or a relationship of the first query entity;
querying the knowledge graph based on the first query entity and the first entity characteristic information to obtain a first result, and outputting the first result;
obtaining a second natural query statement;
determining, based on the first query entity or the first entity characteristic information, a missing part in the second natural query statement; and
querying the knowledge graph based on the missing part in the second natural query statement to obtain a second result, and outputting the second result.
