IP Library › Granted Patent US 12,210,577
Granted Patent B2
US 12,210,577 · App. 17/989,719 · Granted Jan 28, 2025

Method and apparatus for training search recommendation model, and method and apparatus for sorting search results

Inventors: Guohao Cai (Shenzhen, CN); Gang Wang (Shenzhen, CN); Zhenhua Dong (Shenzhen, CN); Xiaoguang Li (Shenzhen, CN); Xiuqiang He (Shenzhen, CN); Hong Zhu (Shenzhen, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
G06F16/9535G06F16/954
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 12,210,577
App. No.
17/989,719
Granted
Jan 28, 2025
Kind
B2
Abstract

A method and an apparatus for training a search recommendation model, and a method and an apparatus for sorting search results are provided. The training method includes: obtaining a training sample set including a sample user behavior group sequence and a masked sample user behavior group sequence; and using the training sample set as input data, and training a search recommendation model, to obtain a trained search recommendation model, where a target of the training is to obtain the object of the response operation of the sample user after the mask processing, the search recommendation model is used to predict a label of a candidate recommendation object in search results corresponding to a query field when a target user inputs the query field, and the label is used to indicate a probability that the target user performs a response operation on the candidate recommendation object.

Claims (39)

1. A training method for training a search recommendation model, comprising:

obtaining a training sample set, wherein the training sample set comprises a sample user behavior group sequence and a masked sample user behavior group sequence, the sample user behavior group sequence comprises a first query field and an object of a response operation of a sample user in search results corresponding to the first query field, and the masked sample user behavior group sequence comprises a second query field and a sequence obtained after mask processing is performed on an object of a response operation of the sample user in search results corresponding to the second query field; and

using the training sample set as input data, and training a search recommendation model, to obtain a trained search recommendation model, wherein the object of the response operation of the sample user after the mask processing is obtained through the training of the search recommendation model, a label of a candidate recommendation object in search results corresponding to a query field is predicted using the search recommendation model when a target user inputs the query field, and the label indicates a probability that the target user performs a response operation on the candidate recommendation object.

2. The training method according to claim 1 , wherein the search recommendation model predicts the label of the candidate recommendation object based on the query field input by the target user and a historical behavior group sequence of the target user, the historical behavior group sequence of the target user is obtained based on a historical query field of the target user and historical behavior data corresponding to the historical query field, and the historical behavior data corresponding to the historical query field is an object of a response operation performed by the target user on the search results corresponding to the historical query field.

3. The training method according to claim 1 , wherein the sample user behavior group sequence further comprises identification information, the identification information indicates an association relationship between the first query field and the object of the response operation of the sample user, and the identification information comprises a time identifier.

4. The training method according to claim 1 , wherein the search recommendation model is a bidirectional encoder representations from transformers (BERT) model, and the method further comprises:

performing vectorization processing on the sample user behavior group sequence and the masked sample user behavior group sequence, to obtain a vector sequence; and

the using of the training sample set as input data comprises:

inputting the vector sequence to the BERT model.

5. The training method according to claim 1 , wherein the response operation of the sample user comprises one or more of a click operation, a download operation, a purchase operation, or a browse operation of the sample user.

6. A non-transitory computer-readable medium, storing program code that, when executed by a computer, enables the computer to perform the training method according to claim 1 .

7. A method for sorting search results, comprising:

obtaining a user behavior group sequence of a user, wherein the user behavior group sequence comprises a current query field of the user and a sequence obtained after mask processing is performed on an object of a response operation of the user;

inputting the user behavior group sequence to a pre-trained search recommendation model, to obtain a label of a candidate recommendation object in a candidate recommendation object set corresponding to the current query field, wherein the label indicates a probability that the user performs a response operation on the candidate recommendation object in the candidate recommendation object set; and

obtaining, based on the label of the candidate recommendation object, sorted search results corresponding to the current query field, wherein

a label of a candidate recommendation object in search results corresponding to a query field is predicted using the search recommendation model when a target user inputs the query field, the search recommendation model is obtained through using a training sample set as input data and performing training with a training target of obtaining an object of a response operation of a sample user after mask processing, the training sample set comprises a sample user behavior group sequence and a masked sample user behavior group sequence, the sample user behavior group sequence comprises a first query field and an object of a response operation of a sample user in search results corresponding to the first query field, and the masked sample user behavior group sequence comprises a second query field and a sequence obtained after mask processing is performed on an object of a response operation of the sample user in search results corresponding to the second query field.

8. The method according to claim 7 , wherein the search recommendation model predicts the label of the candidate recommendation object based on the query field input by the target user and a historical behavior group sequence of the target user, the historical behavior group sequence of the target user is obtained based on a historical query field of the target user and historical behavior data corresponding to the historical query field, and the historical behavior data corresponding to the historical query field is an object of a response operation performed by the target user on the search results corresponding to the historical query field.

9. The method according to claim 7 , wherein the sample user behavior group sequence further comprises identification information, the identification information indicates an association relationship between the first query field and the object of the response operation of the sample user, and the identification information comprises a time identifier.

10. The method according to claim 7 , wherein the pre-trained search recommendation model is a bidirectional encoder representations from transformers (BERT) model, the training sample set is obtained through performing vectorization processing on the sample user behavior group sequence and the masked sample user behavior group sequence.

11. The method according to claim 7 , wherein the response operation of the user comprises one or more of a click operation, a download operation, a purchase operation, or a browse operation of the user.

12. A non-transitory computer-readable medium, storing program code that, when executed by a computer, enables the computer to perform the method according to claim 7 .

13. An apparatus for training a search recommendation model, comprising at least one processor and a memory, wherein the at least one processor is coupled to the memory, and is configured to execute instructions in the memory, to enable the apparatus to perform operations comprising:

obtaining a training sample set, wherein the training sample set comprises a sample user behavior group sequence and a masked sample user behavior group sequence, the sample user behavior group sequence comprises a first query field and an object of a response operation of a sample user in search results corresponding to the first query field, and the masked sample user behavior group sequence comprises a second query field and a sequence obtained after mask processing is performed on an object of a response operation of the sample user in search results corresponding to the second query field; and

using the training sample set as input data, and training a search recommendation model, to obtain a trained search recommendation model, wherein the object of the response operation of the sample user after the mask processing is obtained through the training of the search recommendation model, a label of a candidate recommendation object in search results corresponding to a query field is predicted using the search recommendation model when a target user inputs the query field, and the label indicates a probability that the target user performs a response operation on the candidate recommendation object.

14. The apparatus according to claim 13 , wherein the search recommendation model predicts the label of the candidate recommendation object based on the query field input by the target user and a historical behavior group sequence of the target user, the historical behavior group sequence of the target user is obtained based on a historical query field of the target user and historical behavior data corresponding to the historical query field, and the historical behavior data corresponding to the historical query field is an object of a response operation performed by the target user on the search results corresponding to the historical query field.

15. The apparatus according to claim 13 , wherein the sample user behavior group sequence further comprises identification information, the identification information indicates an association relationship between the first query field and the object of the response operation of the sample user, and the identification information comprises a time identifier.

16. The apparatus according to claim 13 , wherein the search recommendation model is a bidirectional encoder representations from transformers (BERT) model, and the processor is configured to execute instructions in the memory, to enable the apparatus to perform operations comprising:

performing vectorization processing on the sample user behavior group sequence and the masked sample user behavior group sequence, to obtain a vector sequence; and

inputting the vector sequence to the BERT model.

17. An apparatus for sorting search results, comprising at least one processor and a memory, wherein the at least one processor is coupled to the memory, and is configured to execute instructions in the memory, to enable the apparatus to perform operations comprising:

obtaining a user behavior group sequence of a user, wherein the user behavior group sequence comprises a current query field of the user and a sequence obtained after mask processing is performed on an object of a response operation of the user;

inputting the user behavior group sequence to a pre-trained search recommendation model, to obtain a label of a candidate recommendation object in a candidate recommendation object set corresponding to the current query field, wherein the label indicates a probability that the user performs a response operation on the candidate recommendation object in the candidate recommendation object set; and

obtaining, based on the label of the candidate recommendation object, sorted search results corresponding to the current query field, wherein

a label of a candidate recommendation object in search results corresponding to a query field is predicted using the search recommendation model when a target user inputs the query field, the search recommendation model is obtained through using a training sample set as input data and performing training with a training target of obtaining an object of a response operation of a sample user after mask processing, the training sample set comprises a sample user behavior group sequence and a masked sample user behavior group sequence, the sample user behavior group sequence comprises a first query field and an object of a response operation of a sample user in search results corresponding to the first query field, and the masked sample user behavior group sequence comprises a second query field and a sequence obtained after mask processing is performed on an object of a response operation of the sample user in search results corresponding to the second query field.

18. The apparatus according to claim 17 , wherein the search recommendation model predicts the label of the candidate recommendation object based on the query field input by the target user and a historical behavior group sequence of the target user, the historical behavior group sequence of the target user is obtained based on a historical query field of the target user and historical behavior data corresponding to the historical query field, and the historical behavior data corresponding to the historical query field is an object of a response operation performed by the target user on the search results corresponding to the historical query field.

19. The apparatus according to claim 17 , wherein the sample user behavior group sequence further comprises identification information, the identification information indicates an association relationship between the first query field and the object of the response operation of the sample user, and the identification information comprises a time identifier.

20. The apparatus according to claim 17 , wherein the search recommendation model is a bidirectional encoder representations from transformers (BERT) model, and the at least one processor is configured to execute instructions in the memory, to enable the apparatus to perform operations comprising:

performing vectorization processing on the sample user behavior group sequence and the masked sample user behavior group sequence, to obtain a vector sequence; and

inputting the vector sequence to the BERT model.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 3, 2023
From: CAI, GUOHAO; WANG, GANG; DONG, ZHENHUA; LI, XIAOGUANG; HE, XIUQIANG; ZHU, HONG
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 062578/0576 →
Priority Claims (1)
CN 202010424719.3 · May 19, 2020 · national
Continuity (2)
Continuation PCTCN2021093618 · May 13, 2021
Related Publication 20230088171A1 · Mar 23, 2023
References Cited (16)
US 20150269163A1 · Sun · 2015 [cited by examiner]
US 20180204111A1 · Zadeh · 2018 [cited by examiner]
US 20180285682A1 · Najibi · 2018 [cited by examiner]
CN 106156023A · 2016 [cited by examiner]
CN 103886047B · 2017 [cited by examiner]
CN 107341176A · 2017 [cited by examiner]
CN 109460513A · 2019 [cited by examiner]
CN 109522483A · 2019 [cited by examiner]
CN 109582868A · 2019 [cited by applicant]
CN 109634827A · 2019 [cited by examiner]
CN 110162703A · 2019 [cited by examiner]
CN 111950593A · 2020 [cited by examiner]
CN 112182362A · 2021 [cited by examiner]
A Sample Weight Setting Method And Device, And Electronic Apparatus, Zhang et al., (Year: 2017). [cited by examiner]
Fei Sun et al, BERT4Rec: Sequential Recommendation with Bidirectional Encoder Representations from Transformer, Apr. 14, 2019, 11 pages. [cited by applicant]
Extended European Search Report issues in EP21809139.5, dated Aug. 21, 2023, 9 pages. [cited by applicant]