# US 10,956,464 B2 · Natural language question answering 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 10,956,464 B2
- Document ID: US10956464B2
- Status: Granted
- Kind: B2
- Application number: 16/231,736
- Filed: 2018-12-24
- Published: 2019-05-16
- Granted: 2021-03-23
- Earliest claimed: 2014-03-10
- Assignees: Peking University; Tencent Technology (Shenzhen) Company Limited
- Applicants: Peking University; Tencent Technology (Shenzhen) Company Limited
- Inventors: Lei Zou; Tingting Liu; Yanxiong Lu; Huaijun Liu; Ruizhe Huang
- Web page: https://patentgrep.com/patent/US10956464B2

## CPC

- G06F 16/3334: {Selection or weighting of terms from queries, including natural language queries}
- G06F 16/322: {Trees}
- G06F 16/36: Creation of semantic tools, e.g. ontology or thesauri
- G06F 40/242: Dictionaries
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Natural language question answering method and apparatus in the field of information retrieval and processing are provided. The method includes: acquiring a natural language question N; converting the natural language question N into a query semantic graph Qs, each edge in the query semantic graph Qs representing one semantic relation in the natural language question N; searching an RDF graph G for a subgraph matching the query semantic graph Qs; and obtaining an answer to the natural language question N according to the subgraph.

## Claims

### Claim 1

A natural language question answering method, applied to a server, the server comprising one or more processors, a memory, and program instructions stored in the memory, and the program instructions being executed by the one or more processors; the method comprising:
acquiring a natural language question N;
determining a relation phrase in the natural language question N;
determining correlative parameters of each relation phrase of the natural language question N;
constructing a query semantic graph Qs, each edge in the query semantic graph Qs corresponding to one relation phrase and representing one semantic relation in the natural language question N, and each vertex in the query semantic graph Qs corresponding to one correlative parameter, wherein at least one vertex in the query semantic graph Qs correspond to multiple entities, the multiple entities representing multiple interpretations of a same term in the natural language question N;
acquiring a candidate list Cvi corresponding to each correlative parameter on the assumption that the query semantic graph Qs comprises n vertices {v1, . . . , vn}, and each vertex vi in the query semantic graph Qs corresponds to one correlative parameter, wherein i=1, . . . , n;
acquiring a candidate list Cvivj corresponding to each relation phrase relvivj, by using a preset paraphrasing dictionary, each edge vivj in the query semantic graph Qs corresponding to one relation phrase relvivj, the candidate list Cvivj of each relation phrase relvivj comprising a mapping from the relation phrase relvivj to at least one candidate predicate or candidate predicate path in the RDF graph G, each mapping corresponding to a degree of confidence, and mappings in each candidate list Cvivj being sorted according to a descending order of degrees of confidence, wherein 1≤i≠j≤n;
searching the RDF graph G for a subgraph matching the query semantic graph Qs according to the candidate list Cvi and the candidate list Cvivj; and
obtaining an answer to the natural language question N according to the subgraph.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the acquiring the candidate list Cvi corresponding to each correlative parameter comprises:
acquiring the candidate list Cvi corresponding to each correlative parameter argi by using an entity linking technology, the candidate list Cvi corresponding to each correlative parameter argi comprising a mapping from the correlative parameter argi to at least one candidate entity or candidate class in the RDF graph G, each mapping corresponding to a degree of confidence, and mappings in each candidate list Cvi being sorted according to a descending order of degrees of confidence.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the searching the RDF graph G for a subgraph matching the query semantic graph Qs according to the candidate list Cvi and the candidate list Cvivj comprises:
searching the RDF graph G for a subgraph that comprises vertices {u1, . . . , un} and satisfies a preset condition, the preset condition comprising the following three conditions:
condition 1: if vi is mapped to an entity ui in the RDF graph G, wherein i=1, . . . , n, ui should belong to the candidate list Cvi;
condition 2: if vi is mapped to a class ci in the RDF graph G, wherein i=1, . . . , n, ui is an entity whose class is ci, and ci should belong to the candidate list Cvi; and
condition 3: for each edge vivj∈Qs, uiuj∈G or ujui∈G, and a predicate or predicate path Pij corresponding to the edge vivj is mapped to uiuj or ujui in the candidate list Cvivj.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the determining a relation phrase in the natural language question N comprises:
analyzing the natural language question to obtain a syntax dependence tree Y;
looking up, according to a preset relation phrase dictionary, the relation phrase dictionary for a relation phrase that exists in the syntax dependence tree Y, wherein, when a relation phrase in the relation phrase dictionary exists in the syntax dependence tree Y, one and only one connected subtree y in the syntax dependence tree Y satisfies the following conditions:
condition 1: each node in the connected subtree y comprises one word of the relation phrase, and the connected subtree y comprises all words of the relation phrase; and
condition 2: it is impossible to find a subtree y′ in the syntax dependence tree Y, the subtree y′ also satisfying the condition 1 and the connected subtree y being a subtree of the subtree y′.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the determining correlative parameters of each relation phrase comprises:
discovering, in the connected subtree y that is corresponding to each relation phrase and is in the syntax dependence tree Y, correlative parameters of the relation phrase according to a subject-class semantic relation and an object-class semantic relation;
the subject-class semantic relation comprising: subject, nominal subject, passive nominal subject, clause subject, passive clause subject, control subject, and possessive modifier; and
the object-class semantic relation comprising: object, prepositional object, direct object, and indirect object.

### Claim 6 (depends on 1)

The method according to claim 1, before the acquiring the candidate list Cvivj corresponding to each relation phrase relvivj by using a preset paraphrasing dictionary, further comprising:
setting a dictionary T={rel1, . . . , reln}, wherein i=1, . . . , n, and each reli is one relation phrase, and mapping the relation phrase reli to a predicate or predicate path L in the RDF graph G according to a supported entity set Sup(reli) corresponding to each relation phrase reli;
computing a degree of confidence of the mapping from the relation phrase reli to each predicate or predicate path L;
searching, according to the degrees of confidence, continuous predicate edges formed in the RDF graph G by top k most possible predicate/predicate paths, the continuous predicate edges having same semantics as the relation phrase reli; and
constructing the paraphrasing dictionary according to the relation phrase reli and the continuous predicate edges.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the computing a degree of confidence of the mapping from the relation phrase reli to each predicate or predicate path L comprises:
setting, for each relation phrase reli, that the supported entity set corresponding to the relation phrase reli is Sup(reli):
Sup(reli)={{(vi1,vi′1), . . . ,(vim,vi′m)},
finding, in the RDF graph G for each entity pair vij, vi′j in the Sup(reli), all simple paths between the entity pair vij, vi′j, the simple paths being expressed as P(vij, vi′j), and
making PS(reli)=∪j=1, . . . mPath(vij,vi′j);
computing, for the predicate or predicate path L, a tf value of L in the PS (reli) as follows:
tf(L,PS(reli))=|{(Path(vij,vi′j)|L∈Path(vij,vi′j))}|;
computing an idf value of L in the dictionary T={rel1, . . . , reln} as follows:
idf
⁡
(
L
,
T
)
=
log
⁢

T


{
rel
i
∈
T
❘
L
∈
PS
⁡
(
rel
i
)
}

+
1
;
computing a tf−idf value of L as follows:
tf−idf(L,PS(reli),T)=tf(L,PS(reli))×idf(L,T); and
using the tf−idf value as the degree of confidence of the mapping from the relation phrase reli to the predicate or predicate path L.

### Claim 8

A server, comprising:
a processor;
a memory coupled to the processor, wherein the processor is configured to:
acquire a natural language question N;
determine a relation phrase in the natural language question N;
determine correlative parameters of each relation phrase of the natural language question N;
construct a query semantic graph Qs, each edge in the query semantic graph Qs corresponding to one relation phrase and representing one semantic relation in the natural language question N, and each vertex in the query semantic graph Qs corresponding to one correlative parameter, wherein at least one vertex in the query semantic graph Qs correspond to multiple entities, the multiple entities representing multiple interpretations of a same term in the natural language question N;
acquire a candidate list Cvi corresponding to each correlative parameter on the assumption that the query semantic graph Qs comprises n vertices {v1, . . . , vn}, and each vertex vi in the query semantic graph Qs corresponds to one correlative parameter, wherein i=1, . . . , n;
acquire a candidate list Cvivj corresponding to each relation phrase relvivj, by using a preset paraphrasing dictionary, each edge vivj in the query semantic graph Qs corresponding to one relation phrase relvivj, the candidate list Cvivj, of each relation phrase relvivj comprising a mapping from the relation phrase relvivj to at least one candidate predicate or candidate predicate path in the RDF graph G, each mapping corresponding to a degree of confidence, and mappings in each candidate list Cvivj being sorted according to a descending order of degrees of confidence, wherein 1≤i≠j≤n;
search the RDF graph G for a subgraph matching the query semantic graph Qs according to the candidate list Cvi and the candidate list Cvivj; and
obtain an answer to the natural language question N according to the subgraph.

### Claim 9 (depends on 8)

The server according to claim 8, wherein the processor is further configured to:
acquire the candidate list Cvi corresponding to each correlative parameter argi by using an entity linking technology, the candidate list Cvi corresponding to each correlative parameter argi comprising a mapping from the correlative parameter argi to at least one candidate entity or candidate class in the RDF graph G, each mapping corresponding to a degree of confidence, and mappings in each candidate list Cvi being sorted according to a descending order of degrees of confidence.

### Claim 10 (depends on 8)

The server according to claim 8, wherein the processor is further configured to:
search the RDF graph G for a subgraph that comprises vertices {u1, . . . , un} and satisfies a preset condition, the preset condition comprising the following three conditions:
condition 1: if vi is mapped to an entity ui in the RDF graph G, wherein i=1, . . . , n, ui should belong to the candidate list Cvi;
condition 2: if vi is mapped to a class ci in the RDF graph G, wherein i=1, . . . , n, ui is an entity whose class is ci, and ci should belong to the candidate list Cvi; and
condition 3: for each edge vivj∈Qs, uiuj∈G or ujui∈G, and a predicate or predicate path Pij corresponding to the edge vivj is mapped to uiuj or ujui in the candidate list Cvivj.

### Claim 11 (depends on 8)

The server according to claim 8, wherein the processor is further configured to:
analyze the natural language question to obtain a syntax dependence tree Y;
look up, according to a preset relation phrase dictionary, the relation phrase dictionary for a relation phrase that exists in the syntax dependence tree Y, wherein, when a relation phrase in the relation phrase dictionary exists in the syntax dependence tree Y, one and only one connected subtree y in the syntax dependence tree Y satisfies the following conditions:
condition 1: each node in the connected subtree y comprises one word of the relation phrase, and the connected subtree y comprises all words of the relation phrase; and
condition 2: it is impossible to find a subtree y′ in the syntax dependence tree Y, the subtree y′ also satisfying the condition 1 and the connected subtree y being a subtree of the subtree y′.

### Claim 12 (depends on 11)

The server according to claim 11, wherein the processor is further configured to:
discover, in the connected subtree y that is corresponding to each relation phrase and is in the syntax dependence tree Y, correlative parameters of the relation phrase according to a subject-class semantic relation and an object-class semantic relation;
the subject-class semantic relation comprising: subject, nominal subject, passive nominal subject, clause subject, passive clause subject, control subject, and possessive modifier; and
the object-class semantic relation comprising: object, prepositional object, direct object, and indirect object.

### Claim 13 (depends on 8)

The server according to claim 8, wherein the processor is further configured to:
set a dictionary T={reli, . . . , reln}, wherein i=1, . . . , n, and each reli is one relation phrase, and mapping the relation phrase reli to a predicate or predicate path L in the RDF graph G according to a supported entity set Sup(reli) corresponding to each relation phrase reli;
compute a degree of confidence of the mapping from the relation phrase reli to each predicate or predicate path L;
search, according to the degrees of confidence, continuous predicate edges formed in the RDF graph G by top k most possible predicate/predicate paths, the continuous predicate edges having same semantics as the relation phrase reli; and
construct the paraphrasing dictionary according to the relation phrase reli and the continuous predicate edges.

### Claim 14 (depends on 13)

The server according to claim 13, wherein the processor is further configured to:
set, for each relation phrase reli, that the supported entity set corresponding to the relation phrase reli is Sup(reli):
Sup(reli)={{(vi1,vi′1), . . . ,(vim,vi′m)},
find, in the RDF graph G for each entity pair vij, vi′j in the Sup(reli), all simple paths between the entity pair vij, vi′j, the simple paths being expressed as P(vij, vi′j), and
making PS(reli)=∪j=1, . . . mPath(vij,vi′j);
compute, for the predicate or predicate path L, a tf value of L in the PS(reli) as follows:
tf(L,PS(reli))=|{(Path(vij,vi′j)|L∈Path(vij,vi′j))}|;
compute an idf value of L in the dictionary T={rel1, . . . , reln} as follows:
idf
⁡
(
L
,
T
)
=
log
⁢
⁢

T


{
rel
i
∈
T
|
L
∈
PS
⁡
(
rel
i
)
}

+
1
;
compute a tf−idf value of L as follows:
tf−idf(L,PS(reli),T)=tf(L,PS(reli))×idf(L,T); and
use the tf−idf value as the degree of confidence of the mapping from the relation phrase reli to the predicate or predicate path L.

### Claim 15

A non-transitory computer readable medium storing executable computer program instructions for natural language question answering, the computer program instructions comprising instructions for:
acquiring a natural language question N;
determining a relation phrase in the natural language question N;
determining correlative parameters of each relation phrase of the natural language question N;
constructing a query semantic graph Qs, each edge in the query semantic graph Qs corresponding to one relation phrase and representing one semantic relation in the natural language question N, and each vertex in the query semantic graph Qs corresponding to one correlative parameter, wherein at least one vertex in the query semantic graph Qs correspond to multiple entities, the multiple entities representing multiple interpretations of a same term in the natural language question N;
acquiring a candidate list Cvi corresponding to each correlative parameter on the assumption that the query semantic graph Qs comprises n vertices {v1, . . . , vn}, and each vertex vi in the query semantic graph Qs corresponds to one correlative parameter, wherein i=1, . . . , n;
acquiring a candidate list Cvivj corresponding to each relation phrase relvivj, by using a preset paraphrasing dictionary, each edge vivj in the query semantic graph Qs corresponding to one relation phrase relvivj, the candidate list Cvivj of each relation phrase relvivj comprising a mapping from the relation phrase relvivj to at least one candidate predicate or candidate predicate path in the RDF graph G, each mapping corresponding to a degree of confidence, and mappings in each candidate list Cvivj being sorted according to a descending order of degrees of confidence, wherein 1≤i≠j≤n;
searching the RDF graph G for a subgraph matching the query semantic graph Qs according to the candidate list Cvi and the candidate list Cvivj; and
obtaining an answer to the natural language question N according to the subgraph.

### Claim 16 (depends on 15)

The non-transitory computer readable medium according to claim 15, wherein the acquiring the candidate list Cvi corresponding to each correlative parameter comprises:
acquiring the candidate list Cvi corresponding to each correlative parameter argi by using an entity linking technology, the candidate list Cvi corresponding to each correlative parameter argi comprising a mapping from the correlative parameter argi to at least one candidate entity or candidate class in the RDF graph G, each mapping corresponding to a degree of confidence, and mappings in each candidate list Cvi being sorted according to a descending order of degrees of confidence.

### Claim 17 (depends on 15)

The non-transitory computer readable medium according to claim 15, wherein the searching the RDF graph G for a subgraph matching the query semantic graph Qs according to the candidate list Cvi and the candidate list Cvivj comprises:
searching the RDF graph G for a subgraph that comprises vertices {u1, . . . , un} and satisfies a preset condition, the preset condition comprising the following three conditions:
condition 1: if vi is mapped to an entity ui in the RDF graph G, wherein i=1, . . . , n, ui should belong to the candidate list Cvi;
condition 2: if vi is mapped to a class ci in the RDF graph G, wherein i=1, . . . , n, ui is an entity whose class is ci, and ci should belong to the candidate list Cvi; and
condition 3: for each edge vivj∈Qs, uiuj∈G or ujui∈G, and a predicate or predicate path Pij corresponding to the edge vivj is mapped to uiuj or ujui in the candidate list Cvivj.

### Claim 18 (depends on 15)

The non-transitory computer readable medium according to claim 15, wherein the determining a relation phrase in the natural language question N comprises:
analyzing the natural language question to obtain a syntax dependence tree Y;
looking up, according to a preset relation phrase dictionary, the relation phrase dictionary for a relation phrase that exists in the syntax dependence tree Y, wherein, when a relation phrase in the relation phrase dictionary exists in the syntax dependence tree Y, one and only one connected subtree y in the syntax dependence tree Y satisfies the following conditions:
condition 1: each node in the connected subtree y comprises one word of the relation phrase, and the connected subtree y comprises all words of the relation phrase; and
condition 2: it is impossible to find a subtree y′ in the syntax dependence tree Y, the subtree y′ also satisfying the condition 1 and the connected subtree y being a subtree of the subtree y′.

### Claim 19 (depends on 18)

The non-transitory computer readable medium according to claim 18, wherein the determining correlative parameters of each relation phrase comprises:
discovering, in the connected subtree y that is corresponding to each relation phrase and is in the syntax dependence tree Y, correlative parameters of the relation phrase according to a subject-class semantic relation and an object-class semantic relation;
the subject-class semantic relation comprising: subject, nominal subject, passive nominal subject, clause subject, passive clause subject, control subject, and possessive modifier; and
the object-class semantic relation comprising: object, prepositional object, direct object, and indirect object.

### Claim 20 (depends on 15)

The non-transitory computer readable medium according to claim 15, wherein the computer program instructions further comprise instructions for: before the acquiring the candidate list Cvivj corresponding to each relation phrase relvivj by using a preset paraphrasing dictionary:
setting a dictionary T={rel1, . . . , reln}, wherein i=1, . . . , n, and each reli is one relation phrase, and mapping the relation phrase reli to a predicate or predicate path L in the RDF graph G according to a supported entity set Sup(reli) corresponding to each relation phrase reli;
computing a degree of confidence of the mapping from the relation phrase reli to each predicate or predicate path L;
searching, according to the degrees of confidence, continuous predicate edges formed in the RDF graph G by top k most possible predicate/predicate paths, the continuous predicate edges having same semantics as the relation phrase reli; and
constructing the paraphrasing dictionary according to the relation phrase reli and the continuous predicate edges.
