IP Library › Granted Patent US 10,210,245
Granted Patent B2
US 10,210,245 · App. 15/109,698 · Granted Feb 19, 2019

Natural language question answering method and apparatus

Inventors: Lei Zou (Shenzhen, CN); Tingting Liu (Shenzhen, CN); Yanxiong Lu (Shenzhen, CN); Huaijun Liu (Shenzhen, CN); Ruizhe Huang (Shenzhen, CN)
Assignees: PEKING UNIVERSITY; TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
G06F17/30663G06F17/2735G06F17/30625G06F17/30731
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,210,245
App. No.
15/109,698
Granted
Feb 19, 2019
Kind
B2
Abstract

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

Claims (161)

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;

converting the natural language question N into a query semantic graph Q s , each edge in the query semantic graph Q s representing one semantic relation in the natural language question N;

searching a Resource Description Frame (RDF) graph G for a subgraph matching the query semantic graph Q s , comprising:

acquiring a candidate list C v i corresponding to each correlative parameter on the assumption that the query semantic graph Q s comprises n vertices {v 1 , . . . , v n }, and each vertex v i in the query semantic graph Q s corresponds to one correlative parameter, wherein i=1, . . . , n;

acquiring a candidate list C v i v j corresponding to each relation phrase rel v i v j , each edge v i v j in the query semantic graph Q s corresponding to one relation phrase rel v i v j , wherein 1≤i≠j≤n; and

searching the RDF graph G for a subgraph matching the query semantic graph Q s according to the candidate list C v i and the candidate list C v i v j ; and

obtaining an answer to the natural language question N according to the subgraph;

wherein the acquiring a candidate list C v i corresponding to each correlative parameter comprises:

acquiring the candidate list C v i corresponding to each correlative parameter arch by using an entity linking technology, the candidate list C v i corresponding to each correlative parameter arg i comprising a mapping from the correlative parameter arg i 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 C v i being sorted according to a descending order of degrees of confidence.

2. The method according to claim 1 , wherein the converting the natural language question N into a query semantic graph Q s comprises:

determining a relation phrase in the natural language question N;

determining correlative parameters of each relation phrase; and

constructing the query semantic graph Q s , each edge in the query semantic graph Q s corresponding to one relation phrase, and each vertex in the query semantic graph Q s corresponding to one correlative parameter.

3. The method according to claim 2 , 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′.

4. The method according to claim 3 , 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.

5. The method according to claim 1 , wherein the acquiring a candidate list C v i v j corresponding to each relation phrase rel v i v j comprises:

acquiring the candidate list C v i v j corresponding to each relation phrase rel v i v j by using a preset paraphrasing dictionary, the candidate list C v i v j of each relation phrase rel v i v j comprising a mapping from the relation phrase rel v i v j 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 C v i v j being sorted according to a descending order of degrees of confidence.

6. The method according to claim 5 , before the acquiring the candidate list C v i v j corresponding to each relation phrase rel v i v j by using a preset paraphrasing dictionary, further comprising:

setting a dictionary T={rel 1 , . . . , rel n }, wherein i=1, n, and each rel i is one relation phrase, and mapping the relation phrase rel i to a predicate or predicate path L in the RDF graph G according to a supported entity set Sup(rel i ) corresponding to each relation phrase rel i ;

computing a degree of confidence of the mapping from the relation phrase rel i 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 rel i ; and

constructing the paraphrasing dictionary according to the relation phrase rel i and the continuous predicate edges.

7. The method according to claim 6 , wherein the computing a degree of confidence of the mapping from the relation phrase rel i to each predicate or predicate path L comprises:

setting, for each relation phrase rel i , that the supported entity set corresponding to the relation phrase rel i is Sup(rel i ):

Sup(rel i )={{( v i 1 ,v′ i 1 ), . . . ,( v i m ,v′ i m )},

finding, in the RDF graph G for each entity pair v i j , v′ i j in the Sup(rel i ), all simple paths between the entity pair v i j , v′ i j , the simple paths being expressed as P(v i j , v′ i j ) and

making PS (rel i )=∪ j=1, . . . ,m Path( v i j ,v′ i j );

computing, for the predicate or predicate path L, a tf value of L in the PS(rel i ) as follows:

tf ( L,PS (rel i ))=|{(Path( v i j ,v′ i j )| L ∈Path( v i j ,v′ i j ))}|;

computing an idf value of L in the dictionary T={rel 1 , . . . , rel n } 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 (rel i ), T )= tf ( L,PS (rel i ))× idf ( L,T ); and

using the tf−idf value as the degree of confidence of the mapping from the relation phrase rel i to the predicate or predicate path L.

8. The method according to claim 1 , wherein the searching the RDF graph G for a subgraph matching the query semantic graph Q s according to the candidate list C v i and the candidate list C v i v j comprises:

searching the RDF graph G for a subgraph that comprises vertices {u 1 , . . . , u n } and satisfies a preset condition, the preset condition comprising the following three conditions:

condition 1: if v i is mapped to an entity u i in the RDF graph G, wherein i=1, . . . , n, u i should belong to the candidate list C v i ;

condition 2: if v i is mapped to a class c i in the RDF graph G, wherein i=1, . . . , n, u i is an entity whose class is c i , and c i should belong to the candidate list C v i ; and

condition 3: for each edge v i v j ∈Q s , u i u j ∈G or u j u i ∈G, and a predicate or predicate path P ij corresponding to the edge v i v j is mapped to u i u j or u j u i in the candidate list C v i v j .

9. A server, comprising:

one or more processors; and

a memory coupled to the one or more processors, wherein the one or more processors are configured to:

acquire a natural language question N;

convert the natural language question N into a query semantic graph Q s , each edge in the query semantic graph Q s representing one semantic relation in the natural language question N;

search a resource description frame (RDF) map G for a subgraph matching the query semantic graph Q s , comprising:

acquiring a candidate list C v i corresponding to each correlative parameter on the assumption that the query semantic graph Q s comprises n vertices {v 1 , . . . , v n }, and each vertex v i in the query semantic graph Q s corresponds to one correlative parameter, wherein i=1, . . . , n;

acquiring a candidate list C v i v j corresponding to each relation phrase rel v i v j , each edge v i v j in the query semantic graph Q s corresponding to one relation phrase rel v i v j , wherein 1≤i≠j≤n; and

searching the RDF graph G for a subgraph matching the query semantic graph Q s according to the candidate list C v i and the candidate list C v i v j ; and

obtain an answer to the natural language question N according to the subgraph;

wherein the acquiring a candidate list C v i corresponding to each correlative parameter comprises:

acquiring the candidate list C v i corresponding to each correlative parameter arg i by using an entity linking technology, the candidate list C v i corresponding to each correlative parameter arg i comprising a mapping from the correlative parameter arg i 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 C v i being sorted according to a descending order of degrees of confidence.

10. The server according to claim 9 , wherein the one or more processors are further configured to:

discover a relation phrase in the natural language question N;

discover correlative parameters of each relation phrase; and

to construct the query semantic graph Q s , each edge in the query semantic graph Q s corresponding to one relation phrase, and each vertex in the query semantic graph Q s corresponding to one correlative parameter.

11. The server according to claim 10 , wherein the one or more processors are further configured to:

analyze the natural language question to obtain a syntax dependence tree Y; and

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′.

12. The server according to claim 11 , wherein,

the one or more processors are 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.

13. The server according to claim 9 , wherein

the one or more processors are further configured to acquire the candidate list C v i v j corresponding to each relation phrase rel v i v j by using a preset paraphrasing dictionary, the candidate list C v i v j of each relation phrase rel v i v j comprising a mapping from the relation phrase rel v i v j 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 C v i v j being sorted according to a descending order of degrees of confidence.

14. The server according to claim 13 , wherein the one or more processors are further configured to:

set a dictionary T={rel 1 , . . . , rel n }, wherein i=1, n, and each rel i is one relation phrase, and map the relation phrase rel i to a predicate or predicate path L in the RDF graph G according to a supported entity set Sup(rel i ) corresponding to each relation phrase rel i ;

compute a degree of confidence of the mapping from the relation phrase rel i 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 rel i ; and

construct the paraphrasing dictionary according to the relation phrase rel i and the continuous predicate edges.

15. The server according to claim 14 , wherein the one or more processors are further configured to:

set, for each relation phrase rel i , that the supported entity set corresponding to the relation phrase rel i is Sup(rel i ):

Sup(rel i )={{( v i 1 ,v′ i 1 ), . . . ,( v i m ,v′ i m )},

find, in the RDF graph G for each entity pair v i j , v′ i j in the Sup(rel i ), all simple paths between the entity pair v i j , v′ i j , the simple paths being expressed as P(v i j , v′ i j ), and

making PS (rel i )=∪ j=1, . . . ,m Path( v i j ,v′ i j );

a tf value computing unit, configured to compute, for the predicate or predicate path L, a tf value of L in the PS(rel i ) as follows:

tf ( L,PS (rel i ))=|{(Path( v i j ,v′ i j )| L ∈Path( v i j ,v′ i j ))}|;

an idf value computing unit, configured to compute an idf value of L in the dictionary T={rel 1 , . . . , rel n } as follows:

idf

⁡

(

L

,

T

)

=

log

⁢

T

{

rel

i

∈

T

❘

L

∈

PS

⁡

(

rel

i

)

}

+

1

;

and

a Tf−idf value computing unit, configured to compute a tf−idf value of L as follows:

tf−idf ( L,PS (rel i ), T )= tf ( L,PS (rel i ))× idf ( L,T ); and

use the tf−idf value as the degree of confidence of the mapping from the relation phrase rel i to the predicate or predicate path L.

16. The server according to claim 9 , wherein

the one or more processors are further configured to search the RDF graph G for a subgraph that comprises vertices {u 1 , . . . , u n } and satisfies a preset condition, the preset condition comprising the following three conditions:

condition 1: if v i is mapped to an entity u i in the RDF graph G, where i=1, . . . , n, u i should belong to the candidate list C v i ;

condition 2: if v i is mapped to a class c i in the RDF graph G, where i=1, . . . , n, u i is an entity whose class is c i , and c i should belong to the candidate list C v i ; and

condition 3: for each edge v i v j ∈Q s , u i u j ∈G or u j u i ∈G, and a predicate or predicate path P ij corresponding to the edge v i v j is mapped to u i u j or u j u i in the candidate list C v i v j .

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 21, 2018
From: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
To: PEKING UNIVERSITY; TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 047978/0428 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 5, 2016
From: ZOU, LEI; LIU, TINGTING; LU, YANXIONG; LIU, HUAIJUN; HUANG, RUIZHE
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 039073/0615 →
Priority Claims (1)
CN 2014 1 0085902 · Mar 10, 2014 · national
Continuity (1)
Related Publication 20160328467A1 · Nov 10, 2016