# US 2026/0093779 A1 · Method of retrieving data, method of training deep learning model, electronic device and storage medium

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

- Number: US 2026/0093779 A1
- Document ID: US20260093779A1
- Status: Published application
- Kind: A1
- Application number: 18/889,695
- Filed: 2024-09-19
- Published: 2026-04-02
- Earliest claimed: 2024-04-08
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science Technology Co., Ltd.
- Inventors: Jing ZHANG; Lei ZHENG; Sheng YU; Guoliang XING
- Web page: https://patentgrep.com/patent/US20260093779A1

## CPC

- G06F 16/335: Filtering based on additional data, e.g. user or group profiles (filtering in web context G06F16/9535, G06F16/9536)
- G06F 18/22: Matching criteria, e.g. proximity measures
- G06F 16/3334: {Selection or weighting of terms from queries, including natural language queries}
- G06F 40/30: Semantic analysis
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method of retrieving data, a method of training a deep learning model, an electronic device, and a storage medium are provided, which relate to a field of artificial intelligence technology, and in particular to fields of natural language processing and deep learning technologies. The method of retrieving data includes: determining M candidate texts from a text library based on a semantic information in a query to be processed, where M is an integer greater than or equal to 1; determining N candidate texts from the text library based on a keyword information in the query to be processed, where N is an integer greater than or equal to 1; and determining at least one target text based on the M candidate texts and the N candidate texts.

## Claims

### Claim 1

A method of retrieving data, comprising:
determining M candidate texts from a text library based on a semantic information in a query to be processed, wherein M is an integer greater than or equal to 1;
determining N candidate texts from the text library based on a keyword information in the query to be processed, wherein N is an integer greater than or equal to 1; and
determining at least one target text based on the M candidate texts and the N candidate texts.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the determining M candidate texts from a text library based on a semantic information in a query to be processed comprises:
determining a semantic feature of the query to be processed;
matching the semantic feature with a text feature in a first text feature library to obtain M first target text features, wherein the text feature in the first text feature library is obtained by processing a text in the text library using a first deep learning model, and the first deep learning model is trained based on a similarity between a semantic feature of a sample query and a text feature of a sample text; and
determining the M candidate texts from the text library based on the M first target text features.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the determining a semantic feature of the query to be processed comprises:
determining a query feature of the query to be processed;
performing an attention processing on the query feature to obtain an attention feature; and
determining the semantic feature of the query to be processed according to the attention feature.

### Claim 4 (depends on 2)

The method according to claim 2, further comprising:
processing the text in the text library by using the first deep learning model to obtain a feature of the text in the text library; and
generating the first text feature library according to the feature of the text in the text library.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the determining N candidate texts from the text library based on a keyword information in the query to be processed comprises:
determining a keyword feature in the query to be processed;
matching the keyword feature with a text feature in a second text feature library to obtain N second target text features, wherein the text feature in the second text feature library is obtained by processing a text in the text library using a second deep learning model, and the second deep learning model is trained based on a similarity between a keyword feature of a sample query and a text feature of a sample text; and
determining the N candidate texts from the text library according to the N second target text features.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the text in the text library comprises a title and a content, and the method further comprises:
processing the title and the content by using the second deep learning model to obtain a title feature and a content feature, respectively; and
generating the second text feature library according to the title feature and the content feature.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the determining at least one target text based on the M candidate texts and the N candidate texts comprises:
concatenating, for each candidate text among the M candidate texts and the N candidate texts, the query to be processed and the candidate text to obtain a concatenated text;
determining a similarity between the query to be processed and each candidate text according to the concatenated text; and
determining the at least one target text from the M candidate texts and the N candidate texts according to the similarity between the query to be processed and each candidate text.

### Claim 8

A method of training a deep learning model, wherein the deep learning model comprises a query processing sub-model and a text processing sub-model, and the method comprises:
determining a positive example text of a sample query and a negative example text of the sample query;
processing the sample query by using the query processing sub-model to obtain a semantic feature of the sample query;
processing the positive example text and the negative example text by using the text processing sub-model to obtain a feature of the positive example text and a feature of the negative example text, respectively;
determining a similarity between the sample query and the positive example text and a similarity between the sample query and the negative example text according to the semantic feature, the feature of the positive example text and the feature of the negative example text;
determining a loss of the deep learning model according to the similarity between the sample query and the positive example text and the similarity between the sample query and the negative example text; and
adjusting a parameter of the deep learning model according to the loss.

### Claim 9 (depends on 8)

The method according to claim 8, wherein the query processing sub-model comprises an encoding module, an attention module, and a fully connected module; and the processing the sample query by using the query processing sub-model to obtain a semantic feature of the sample query comprises:
inputting the sample query into the encoding module to obtain a query feature of the sample query;
inputting the query feature into the attention module to obtain an attention feature of the sample query; and
inputting the attention feature into the fully connected module to obtain the semantic feature of the sample query.

### Claim 10 (depends on 8)

The method according to claim 8, wherein a plurality of sample queries are provided, and the method further comprises:
determining, for each sample query of the plurality of sample queries, the negative example text of the sample query and positive example texts and negative example texts of other sample queries among the plurality of sample queries other than the sample query as a set of negative example texts of the sample query.

### Claim 11 (depends on 10)

The method according to claim 10, wherein the processing the positive example text and the negative example text by using the text processing sub-model so as to obtain a feature of the positive example text and a feature of the negative example text comprises:
processing the positive example text and each negative example text in the set of negative example texts by using the text processing sub-model to obtain the feature of the positive example text and a feature of each negative example text in the set of negative example texts, respectively; and
wherein the determining a loss of the deep learning model according to the similarity between the sample query and the positive example text and the similarity between the sample query and the negative example text comprises:
determining the loss of the deep learning model according to the similarity between the sample query and the positive example text and a similarity between the sample query and each negative example text in the set of negative example texts.

### Claim 12

An electronic device, comprising:
at least one processor; and
a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions, when executed by the at least one processor, are configured to cause the at least one processor to at least:
determine M candidate texts from a text library based on a semantic information in a query to be processed, wherein M is an integer greater than or equal to 1;
determine N candidate texts from the text library based on a keyword information in the query to be processed, wherein N is an integer greater than or equal to 1; and
determine at least one target text based on the M candidate texts and the N candidate texts.

### Claim 13 (depends on 12)

The electronic device according to claim 12, wherein the instructions are further configured to cause the at least one processor to at least:
determine a semantic feature of the query to be processed;
match the semantic feature with a text feature in a first text feature library to obtain M first target text features, wherein the text feature in the first text feature library is obtained by processing a text in the text library using a first deep learning model, and the first deep learning model is trained based on a similarity between a semantic feature of a sample query and a text feature of a sample text; and
determine the M candidate texts from the text library based on the M first target text features.

### Claim 14 (depends on 13)

The electronic device according to claim 13, wherein the instructions are further configured to cause the at least one processor to at least:
determine a query feature of the query to be processed;
perform an attention processing on the query feature to obtain an attention feature; and
determine the semantic feature of the query to be processed according to the attention feature.

### Claim 15 (depends on 13)

The electronic device according to claim 13, wherein the instructions are further configured to cause the at least one processor to at least:
process the text in the text library by using the first deep learning model to obtain a feature of the text in the text library; and
generate the first text feature library according to the feature of the text in the text library.

### Claim 16 (depends on 12)

The electronic device according to claim 12, wherein the instructions are further configured to cause the at least one processor to at least:
determine a keyword feature in the query to be processed;
match the keyword feature with a text feature in a second text feature library to obtain N second target text features, wherein the text feature in the second text feature library is obtained by processing a text in the text library using a second deep learning model, and the second deep learning model is trained based on a similarity between a keyword feature of a sample query and a text feature of a sample text; and
determine the N candidate texts from the text library according to the N second target text features.

### Claim 17 (depends on 16)

The electronic device according to claim 16, wherein the instructions are further configured to cause the at least one processor to at least:
process the title and the content by using the second deep learning model to obtain a title feature and a content feature, respectively; and
generate the second text feature library according to the title feature and the content feature.

### Claim 18 (depends on 8)

An electronic device, comprising:
at least one processor; and
a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions, when executed by the at least one processor, are configured to cause the at least one processor to implement the method of claim 8.

### Claim 19 (depends on 1)

A non-transitory computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are configured to cause a computer to implement the method of claim 1.

### Claim 20 (depends on 8)

A non-transitory computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are configured to cause a computer to implement the method of claim 8.
