IP Library › Granted Patent US 11,216,618
Granted Patent B2
US 11,216,618 · App. 16/538,589 · Granted Jan 4, 2022

Query processing method, apparatus, server and storage medium

Inventors: Xinwei Feng (Beijing, CN); Xunchao Song (Beijing, CN); Miao Yu (Beijing, CN); Huanyu Zhou (Beijing, CN); Shaoshun Kang (Beijing, CN)
Assignee: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
G06F40/30G06F16/3347G06F40/295
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 11,216,618
App. No.
16/538,589
Granted
Jan 4, 2022
Kind
B2
Abstract

Embodiments of the present disclosure provide a query processing method and an apparatus, a server and a storage medium. The method includes: determining a word vector representation of a query sequence and an entity vector representation of the query sequence respectively based on respective words and respective entities included in the query sequence; determining a word vector representation of a paragraph and an entity vector representation of the paragraph respectively based on respective words and respective entities included in the paragraph; and determining a similarity between the query sequence and the paragraph according to the word vector representation of the query sequence, the entity vector representation of the query sequence, the word vector representation of the paragraph, and the entity vector representation of the paragraph.

Claims (57)

1. A query processing method, comprising:

determining a word vector representation of a query sequence and an entity vector representation of the query sequence respectively based on respective words and respective entities comprised in the query sequence;

determining a word vector representation of a paragraph and an entity vector representation of the paragraph respectively based on respective words and respective entities comprised in the paragraph; and

determining a similarity between the query sequence and the paragraph based on the word vector representation of the query sequence, the entity vector representation of the query sequence, the word vector representation of the paragraph, and the entity vector representation of the paragraph;

wherein determining the similarity between the query sequence and the paragraph based on the word vector representation of the query sequence, the entity vector representation of the query sequence, the word vector representation of the paragraph, and the entity vector representation of the paragraph comprises:

determining a first similarity between the query sequence and the paragraph according to the word vector representation of the query sequence and the word vector representation of the paragraph;

determining a second similarity between the query sequence and the paragraph according to the entity vector representation of the query sequence and the entity vector representation of the paragraph; and

determining the similarity between the query sequence and the paragraph according to the first similarity and the second similarity.

2. The method of claim 1 , wherein determining the similarity between the query sequence and the paragraph according to the first similarity and the second similarity between the query sequence and the paragraph comprises:

determining a third similarity between the query sequence and the paragraph according to the word vector representation of the query sequence and the entity vector representation of the paragraph;

determining a fourth similarity between the query sequence and the paragraph according to the entity vector representation of the query sequence and the word vector representation of the paragraph; and

determining the similarity between the query sequence and the paragraph according to the first similarity, the second similarity, the third similarity and the fourth similarity.

3. The method of claim 2 , wherein determining the similarity between the query sequence and the paragraph according to the first similarity, the second similarity, the third similarity and the fourth similarity comprises:

performing weighting processing on the first similarity, the second similarity, the third similarity and the fourth similarity, and determining the similarity between the query sequence and the paragraph according to a weighting result.

4. The method of claim 1 , before determining the similarity between the query sequence and the paragraph according to the word vector representation of the query sequence, the entity vector representation of the query sequence, the word vector representation of the paragraph and the entity vector representation of the paragraph, further comprising:

determining the respective entities comprised in the query sequence based on a knowledge graph, and determining the respective entities comprised in the paragraph based on the knowledge graph.

5. The method of claim 1 , wherein the paragraph comprises a plurality of paragraphs, after determining the similarity between the query sequence and the paragraph, the method further comprises:

sorting the plurality of paragraphs based on the similarity between the query sequence and each of the plurality of paragraphs.

6. A server, comprising:

one or more processors; and

a memory, configured to store one or more programs,

wherein, when the one or more programs are executed by the one or more processors, the one or more processors are caused to perform a query processing method, the method comprising:

determining a word vector representation of a query sequence and an entity vector representation of the query sequence respectively based on respective words and respective entities comprised in the query sequence;

determining a word vector representation of a paragraph and an entity vector representation of the paragraph respectively based on respective words and respective entities comprised in the paragraph; and

determining a similarity between the query sequence and the paragraph based on the word vector representation of the query sequence, the entity vector representation of the query sequence, the word vector representation of the paragraph, and the entity vector representation of the paragraph;

wherein determining the similarity between the query sequence and the paragraph based on the word vector representation of the query sequence, the entity vector representation of the query sequence, the word vector representation of the paragraph, and the entity vector representation of the paragraph comprises:

determining a first similarity between the query sequence and the paragraph according to the word vector representation of the query sequence and the word vector representation of the paragraph;

determining a second similarity between the query sequence and the paragraph according to the entity vector representation of the query sequence and the entity vector representation of the paragraph; and

determining the similarity between the query sequence and the paragraph according to the first similarity and the second similarity.

7. The server of claim 6 , wherein determining the similarity between the query sequence and the paragraph according to the first similarity and the second similarity between the query sequence and the paragraph comprises:

determining a third similarity between the query sequence and the paragraph according to the word vector representation of the query sequence and the entity vector representation of the paragraph;

determining a fourth similarity between the query sequence and the paragraph according to the entity vector representation of the query sequence and the word vector representation of the paragraph; and

determining the similarity between the query sequence and the paragraph according to the first similarity, the second similarity, the third similarity and the fourth similarity.

8. The server of claim 7 , wherein determining the similarity between the query sequence and the paragraph according to the first similarity, the second similarity, the third similarity and the fourth similarity comprises:

performing weighting processing on the first similarity, the second similarity, the third similarity and the fourth similarity, and determining the similarity between the query sequence and the paragraph according to a weighting result.

9. The server of claim 6 , before determining the similarity between the query sequence and the paragraph according to the word vector representation of the query sequence, the entity vector representation of the query sequence, the word vector representation of the paragraph and the entity vector representation of the paragraph, further comprising:

determining the respective entities comprised in the query sequence based on a knowledge graph, and determining the respective entities comprised in the paragraph based on the knowledge graph.

10. The server of claim 6 , wherein the paragraph comprises a plurality of paragraphs, after determining the similarity between the query sequence and the paragraph, the method further comprises:

sorting the plurality of paragraphs based on the similarity between the query sequence and each of the plurality of paragraphs.

11. A non-transitory computer readable storage medium, storing thereon with computer programs, wherein when executed by a processor, a query processing method is performed, the method comprising:

determining a word vector representation of a query sequence and an entity vector representation of the query sequence respectively based on respective words and respective entities comprised in the query sequence;

determining a word vector representation of a paragraph and an entity vector representation of the paragraph respectively based on respective words and respective entities comprised in the paragraph; and

determining a similarity between the query sequence and the paragraph based on the word vector representation of the query sequence, the entity vector representation of the query sequence, the word vector representation of the paragraph, and the entity vector representation of the paragraph;

wherein determining the similarity between the query sequence and the paragraph based on the word vector representation of the query sequence, the entity vector representation of the query sequence, the word vector representation of the paragraph, and the entity vector representation of the paragraph comprises:

determining a first similarity between the query sequence and the paragraph according to the word vector representation of the query sequence and the word vector representation of the paragraph;

determining a second similarity between the query sequence and the paragraph according to the entity vector representation of the query sequence and the entity vector representation of the paragraph; and

determining the similarity between the query sequence and the paragraph according to the first similarity and the second similarity.

12. The non-transitory computer readable storage medium of claim 11 , wherein determining the similarity between the query sequence and the paragraph according to the first similarity and the second similarity between the query sequence and the paragraph comprises:

determining a third similarity between the query sequence and the paragraph according to the word vector representation of the query sequence and the entity vector representation of the paragraph;

determining a fourth similarity between the query sequence and the paragraph according to the entity vector representation of the query sequence and the word vector representation of the paragraph; and

determining the similarity between the query sequence and the paragraph according to the first similarity, the second similarity, the third similarity and the fourth similarity.

13. The non-transitory computer readable storage medium of claim 12 , wherein determining the similarity between the query sequence and the paragraph according to the first similarity, the second similarity, the third similarity and the fourth similarity comprises:

performing weighting processing on the first similarity, the second similarity, the third similarity and the fourth similarity, and determining the similarity between the query sequence and the paragraph according to a weighting result.

14. The non-transitory computer readable storage medium of claim 11 , before determining the similarity between the query sequence and the paragraph according to the word vector representation of the query sequence, the entity vector representation of the query sequence, the word vector representation of the paragraph and the entity vector representation of the paragraph, further comprising:

determining the respective entities comprised in the query sequence based on a knowledge graph, and determining the respective entities comprised in the paragraph based on the knowledge graph.

15. The non-transitory computer readable storage medium of claim 11 , wherein the paragraph comprises a plurality of paragraphs, after determining the similarity between the query sequence and the paragraph, the method further comprises:

sorting the plurality of paragraphs based on the similarity between the query sequence and each of the plurality of paragraphs.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 12, 2019
From: FENG, XINWEI; SONG, XUNCHAO; YU, MIAO; ZHOU, HUANYU; KANG, SHAOSHUN
To: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
Reel/Frame 050031/0219 →
Priority Claims (1)
CN 201810915123.6 · Aug 13, 2018 · national
Continuity (1)
Related Publication 20200050671A1 · Feb 13, 2020
Cited By (1)
US 12,299,020