# US 2018/0121434 A1 · Method and apparatus for recalling search result based on neural network

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

- Number: US 2018/0121434 A1
- Document ID: US20180121434A1
- Status: Published application
- Kind: A1
- Application number: 15/625,379
- Filed: 2017-06-16
- Published: 2018-05-03
- Earliest claimed: 2016-10-31
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science And Technology Co., Ltd.
- Inventors: Di JIANG; Lei SHI; Zeyu CHEN; Jiajun JIANG; Rongzhong LIAN
- Web page: https://patentgrep.com/patent/US20180121434A1

## CPC

- G06F 16/24578: {using ranking}
- G06F 16/3334: {Selection or weighting of terms from queries, including natural language queries}
- G06F 16/3347: {using vector based model}
- G06F 17/16: Matrix or vector computation {, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization (matrix transposition G06F7/78)}
- G06N 3/0499: Feedforward networks
- G06N 3/09: Supervised learning
- G06N 3/02: Neural networks
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A method and an apparatus for recalling a search result based on a neural network are provided, the method comprising: receiving a query and collecting a plurality of search results corresponding to the query; acquiring a first feature vector corresponding to the query, and acquiring second feature vectors corresponding to titles of the plurality of search results respectively; acquiring similarities between the first feature vector and the second feature vectors respectively, and acquiring semantic matching scores between the query and the plurality of search results respectively according to the similarities; and determining at least one target search result from the plurality of search results according to the semantic marching scores, wherein the at least one target search result is regarded as the search result recalled according to the query.

## Claims

### Claim 1

A method for recalling a search result based on a neural network, comprising:
receiving a query and collecting a plurality of search results corresponding to the query;
acquiring a first feature vector corresponding to the query, and acquiring second feature vectors corresponding to titles of the plurality of search results respectively;
acquiring similarities between the first feature vector and the second feature vectors respectively, and acquiring semantic matching scores between the query and the plurality of search results respectively according to the similarities; and
determining at least one target search result from the plurality of search results according to the semantic marching scores, wherein the at least one target search result is regarded as the search result recalled according to the query.

### Claim 2 (depends on 1)

The method according to claim 1, wherein acquiring a first feature vector corresponding to the query, and acquiring second feature vectors corresponding to titles of the plurality of search results respectively comprises:
performing a segmentation on the query and the titles of the plurality of search results respectively so as to acquire a plurality of first segments corresponding to the query and a plurality of second segments corresponding to each of the titles of the plurality of search results;
determining a plurality of first feature components corresponding to the plurality of first segments respectively according to a preset feature model, and determining a plurality of second feature components corresponding to the plurality of second segments respectively according to the preset feature model;
adding the plurality of first feature components so as to generate a first middle feature vector corresponding to the query;
adding the plurality of second feature components so as to generate second middle feature vectors corresponding to the titles respectively; and
acquiring the first feature vector and the second feature vectors output by a preset algorithm according to the first middle feature vector and the second middle feature vectors.

### Claim 3 (depends on 2)

The method according to claim 2, wherein acquiring the first feature vector and the second feature vectors output by a preset algorithm according to the first middle feature vector and the second middle feature vectors comprises:
performing a nonlinear conversion on a plurality of first elements in the first middle feature vector according to the preset algorithm, and generating a nonlinear conversed first middle feature vector according to a plurality of nonlinear conversed first elements;
multiplying a full connectivity matrix in the preset algorithm by the nonlinear conversed first middle feature vector so as to generate the first feature vector;
performing the nonlinear conversion on the plurality of second elements in the second middle feature vectors according to the preset algorithm, and generating nonlinear conversed second middle feature vectors according to a plurality of nonlinear conversed second elements; and
multiplying the full connectivity matrix in the preset algorithm by the nonlinear conversed second middle feature vectors respectively so as to generate the second feature vectors.

### Claim 4 (depends on 2)

The method according to claim 2, further comprising:
establishing the preset feature model before the query is received, comprising:
collecting a plurality of sample queries, and collecting the titles of a plurality of sample search results corresponding to the plurality of sample queries respectively;
performing the segmentation on the plurality of sample queries and the titles of the plurality of sample search results respectively so as to acquire a plurality of third segments corresponding to each of the plurality of sample queries and a plurality of fourth segments corresponding to each of the titles of the plurality of sample search results;
determining a plurality of third feature components corresponding to the plurality of third segments respectively, and determining a plurality of feature components corresponding respectively to one or more of the plurality of fourth segments clicked by a user as fourth feature components and a plurality of feature components corresponding respectively to one or more of the plurality of fourth segments not clicked by the user as fifth feature components;
adding the plurality of third feature components so as to generate third middle feature vectors corresponding to the plurality of sample queries respectively;
adding the plurality of fourth feature components of each of the titles of the plurality of sample search results so as to generate fourth middle feature vectors corresponding to the one or more of the plurality of fourth segments clicked by the user;
adding the plurality of fifth feature components of each of the titles of the plurality of sample search results so as to generate fifth middle feature vectors corresponding to the one or more of the plurality of fourth segments not clicked by the user;
acquiring third feature vectors corresponding to the plurality of sample queries respectively, fourth feature vectors corresponding to the one or more of the plurality of fourth segments clicked by the user and fifth feature vectors corresponding to the one or more of the plurality of fourth segments not clicked by the user output by the preset algorithm according to the third middle feature vectors, the fourth middle feature vectors and the fifth middle feature vectors;
acquiring first similarities between the third feature vectors and the fourth feature vectors respectively, and acquiring second similarities between the third feature vectors and the fifth feature vectors respectively;
acquiring differences between the first similarities and the second similarities respectively, and adjusting the differences by adjusting weights of elements in the third feature vectors, the fourth feature vectors and the fifth feature vectors respectively; and
determining adjusted third feature vectors, adjusted fourth feature vectors and adjusted fifth feature vectors when the differences achieve target values, so as to establish the preset feature model.

### Claim 5 (depends on 1)

The method according to claim 1, wherein acquiring similarities between the first feature vector and the second feature vectors respectively, and acquiring semantic matching scores between the query and the plurality of search results respectively according to the similarities comprises:
computing the similarities between the first feature vector and the second feature vectors respectively; and
regarding the similarities as the semantic matching scores between the query and the plurality of search results respectively.

### Claim 6 (depends on 1)

The method according to claim 1, wherein determining at least one target search result from the plurality of search results according to the semantic marching scores comprises:
inputting the semantic marching scores into an ordering model, and acquiring scores corresponding to the plurality of search results respectively output by the ordering model; and
ordering the plurality of search results according to the scores so as to determine a preset number of search results as the at least one target search result.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the similarities are cosine similarities.

### Claim 8 (depends on 4)

The method according to claim 4, wherein the similarities, the first similarities and the second similarities are cosine similarities.

### Claim 9 (depends on 5)

The method according to claim 5, wherein the similarities are cosine similarities.

### Claim 10

An apparatus for recalling a search result based on a neural network, comprising:
one or more processors;
a memory storing instructions executable by the one or more processors;
wherein the one or more processors are configured to:
receive a query and to collect a plurality of search results corresponding to the query;
acquire a first feature vector corresponding to the query, and to acquire second feature vectors corresponding to titles of the plurality of search results respectively;
acquire similarities between the first feature vector and the second feature vectors respectively, and to acquire semantic matching scores between the query and the plurality of search results respectively according to the similarities; and
determine at least one target search result from the plurality of search results according to the semantic marching scores, wherein the at least one target search result is regarded as the search result recalled according to the query.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein the one or more processors are configured to perform following acts to acquire a first feature vector corresponding to the query, and to acquire second feature vectors corresponding to titles of the plurality of search results respectively:
performing a segmentation on the query and the titles of the plurality of search results respectively so as to acquire a plurality of first segments corresponding to the query and a plurality of second segments corresponding to each of the titles of the plurality of search results;
determining a plurality of first feature components corresponding to the plurality of first segments respectively according to a preset feature model, and determining a plurality of second feature components corresponding to the plurality of second segments respectively according to the preset feature model;
adding the plurality of first feature components so as to generate a first middle feature vector corresponding to the query;
adding the plurality of second feature components so as to generate second middle feature vectors corresponding to the titles respectively; and
acquiring the first feature vector and the second feature vector output by a preset algorithm according to the first middle feature vector and the second middle feature vectors.

### Claim 12 (depends on 11)

The apparatus according to claim 11, wherein the one or more processors are configured to perform following acts to acquire the first feature vector and the second feature vector output by a preset algorithm according to the first middle feature vector and the second middle feature vectors:
performing a nonlinear conversion on a plurality of first elements in the first middle feature vector according to the preset algorithm, and generating a nonlinear conversed first middle feature vector according to a plurality of nonlinear conversed first elements;
multiplying a full connectivity matrix in the preset algorithm by the nonlinear conversed first middle feature vector so as to generate the first feature vector;
performing the nonlinear conversion on the plurality of second elements in the second middle feature vectors according to the preset algorithm, and generating nonlinear conversed second middle feature vectors according to a plurality of nonlinear conversed second elements; and
multiplying the full connectivity matrix in the preset algorithm by the nonlinear conversed second middle feature vectors respectively so as to generate the second feature vectors.

### Claim 13 (depends on 11)

The apparatus according to claim 11, wherein the one or more processors are further configured to:
collect a plurality of sample queries, and collect the titles of a plurality of sample search results corresponding to the plurality of sample queries respectively;
perform the segmentation on the plurality of sample queries and the titles of the plurality of sample search results respectively so as to acquire a plurality of third segments corresponding to each of the plurality of sample queries and a plurality of fourth segments corresponding to each of the titles of the plurality of sample search results;
determine a plurality of third feature components corresponding to the plurality of third segments respectively, and determine a plurality of feature components corresponding respectively to one or more of the plurality of fourth segments clicked by a user as fourth feature components and a plurality of feature components corresponding respectively to one or more of the plurality of fourth segments not clicked by the user as fifth feature components;
add the plurality of third feature components so as to generate third middle feature vectors corresponding to the plurality of sample queries respectively;
add the plurality of fourth feature components of each of the titles of the plurality of sample search results so as to generate fourth middle feature vectors corresponding to the one or more of the plurality of fourth segments clicked by the user;
add the plurality of fifth feature components of each of the titles of the plurality of sample search results so as to generate fifth middle feature vectors corresponding to the one or more of the plurality of fourth segments not clicked by the user;
acquire third feature vectors corresponding to the plurality of sample queries respectively, fourth feature vectors corresponding to the one or more of the plurality of fourth segments clicked by the user and fifth feature vectors corresponding to the one or more of the plurality of fourth segments not clicked by the user output by the preset algorithm according to the third middle feature vectors, the fourth middle feature vectors and the fifth middle feature vectors;
acquire first similarities between the third feature vectors and the fourth feature vectors respectively, and acquire second similarities between the third feature vectors and the fifth feature vectors respectively;
acquire differences between the first similarities and the second similarities, and adjust the differences by adjusting weights of elements in the third feature vectors, the fourth feature vectors and the fifth feature vectors respectively; and
determine adjusted third feature vectors, adjusted fourth feature vectors and adjusted fifth feature vectors when the differences achieve target values, so as to establish the preset feature model.

### Claim 14 (depends on 10)

The apparatus according to claim 10, wherein the one or more processors are configured to perform following acts to acquire similarities between the first feature vector and the second feature vectors respectively, and to acquire semantic matching scores between the query and the plurality of search results respectively according to the similarities:
computing the similarities between the first feature vector and the second feature vectors respectively; and
regarding the similarities as the semantic matching scores between the query and the plurality of search results respectively.

### Claim 15 (depends on 10)

The apparatus according to claim 10, wherein the one or more processors are configured to perform following acts to determine at least one target search result from the plurality of search results according to the semantic marching scores:
inputting the semantic marching scores into an ordering model, and acquiring scored corresponding to the plurality of search results respectively output by the ordering model; and
ordering the plurality of search results according to the scores so as to determine a preset number of search results as the at least one target search result.

### Claim 16 (depends on 10)

The apparatus according to claim 10, wherein the similarities are cosine similarities.

### Claim 17 (depends on 13)

The apparatus according to claim 13, wherein the similarities, the first similarities and the second similarities are cosine similarities.

### Claim 18 (depends on 14)

The apparatus according to claim 14, wherein the similarities are cosine similarities.

### Claim 19

A non-transitory computer-readable storage medium having stored therein instructions that, when executed by a processor of a device, cause the processor to perform a method for recalling a search result based on a neural network, the method comprising:
receiving a query and collecting a plurality of search results corresponding to the query;
acquiring a first feature vector corresponding to the query, and acquiring second feature vectors corresponding to titles of the plurality of search results respectively;
acquiring similarities between the first feature vector and the second feature vectors respectively, and acquiring semantic matching scores between the query and the plurality of search results respectively according to the similarities; and
determining at least one target search result from the plurality of search results according to the semantic marching scores, wherein the at least one target search result is regarded as the search result recalled according to the query.
