Recall model training method, search result recall method and device

Through auxiliary training of models with poor recall accuracy, and using the knowledge of data enhancement and auxiliary recall models, the accuracy of the recall model is improved, the problem of poor correlation between recall results and user needs is solved, and the search effect is improved.

CN118734064APending Publication Date: 2024-10-01BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410733357.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In existing search platforms, there are differences in the recall accuracy of recall models, resulting in poor correlation between the recalled search results and the search results actually needed by users.

Method used

By obtaining search word samples and their corresponding multiple positive and negative samples, data enhancement processing is performed, and the auxiliary recall model is used to assist in training models with poor recall accuracy to improve the accuracy of the recall model.

Benefits of technology

Improves the recall accuracy of results from recall models with poor recall accuracy, improving search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734064A_ABST
    Figure CN118734064A_ABST
Patent Text Reader

Abstract

The invention provides a recall model training method and a search result recall method and device.The recall model training method comprises the steps that a search word sample and a plurality of positive samples and a plurality of negative samples under at least two content types corresponding to the search word sample are obtained, one of the at least two content types corresponds to the auxiliary recall model; performing data enhancement processing on the search word sample to obtain a newly added search word sample; training a to-be-trained recall model to obtain a target recall model according to the search word sample, the newly added search word sample, the auxiliary recall model, and a plurality of positive samples and a plurality of negative samples under at least two content types corresponding to the search word sample, the target recall model corresponds to at least one remaining content type in the at least two content types. According to the method, the result recall accuracy of the recall model with poor recall accuracy can be improved, so that the search effect can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a recall model training method, a search result recall method and a device. Background Art

[0002] Currently, the search platform can recall search results (Document) related to the search terms (Query) entered by the user from massive data resources, which can effectively shorten the time it takes for users to obtain the search results they need.

[0003] With the continuous development of information technology, the content types of search results are becoming more and more diverse. For example, the content types of search results can be advertisements, news, pictures, videos, and books. However, because search results of different content types have obvious differences in content form and feature methods, when the search platform recalls search results based on the search terms entered by the user, it usually uses the recall models corresponding to different content types to recall multiple search results of different content types based on the search terms entered by the user.

[0004] However, due to the differences in recall accuracy of recall models corresponding to different content types, some recall models have higher recall accuracy, while others have lower recall accuracy. For recall models with lower recall accuracy, the recalled search results will have a lower correlation with the search results actually required by the user. Therefore, how to improve the recall accuracy of recall models with lower recall accuracy has become an urgent problem to be solved. Summary of the invention

[0005] The embodiments of the present application provide a recall model training method, a search result recall method and a device, which can improve the recall accuracy of the results of a recall model with poor recall accuracy, thereby improving the search effect.

[0006] In a first aspect, an embodiment of the present application provides a recall model training method, comprising:

[0007] Acquire a search term sample, and a plurality of positive samples and a plurality of negative samples under at least two content types corresponding to the search term sample, wherein one of the at least two content types corresponds to an auxiliary recall model;

[0008] Performing data enhancement processing on the search term samples to obtain newly added search term samples;

[0009] According to the search term samples, the newly added search term samples, the auxiliary recall model, and multiple positive samples and multiple negative samples under at least two content types corresponding to the search term samples, the recall model to be trained is trained to obtain a target recall model, and the target recall model corresponds to at least one remaining content type of the at least two content types.

[0010] In a second aspect, an embodiment of the present application provides a search result recall method, comprising:

[0011] Get the target search term;

[0012] The target search term is input into a target recall model to obtain a search result recall sequence output by the target recall model, wherein the target recall model is obtained according to the recall model training method described in the first aspect or its embodiments.

[0013] In a third aspect, an embodiment of the present application provides a recall model training device, comprising:

[0014] A sample acquisition module, used to acquire a search word sample, and a plurality of positive samples and a plurality of negative samples under at least two content types corresponding to the search word sample, wherein one of the at least two content types corresponds to the auxiliary recall model;

[0015] A data processing module, used to perform data enhancement processing on the search word samples to obtain new search word samples;

[0016] A model training module is used to train a recall model to be trained based on the search term samples, the newly added search term samples, the auxiliary recall model, and multiple positive samples and multiple negative samples under at least two content types corresponding to the search term samples to obtain a target recall model, wherein the target recall model corresponds to at least one remaining content type of the at least two content types.

[0017] In a fourth aspect, an embodiment of the present application provides a search result recall device, comprising:

[0018] A data acquisition module, used to acquire target search terms;

[0019] A result recall module is used to input the target search term into a target recall model to obtain a search result recall sequence output by the target recall model, wherein the target recall model is obtained according to the recall model training device described in the third aspect or its embodiments.

[0020] In a fifth aspect, an embodiment of the present application provides an electronic device, including:

[0021] A processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the recall model training method as described in the first aspect embodiment, or the search result recall method as described in the second aspect embodiment.

[0022] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program enables a computer to execute the recall model training method as described in the embodiment of the first aspect, or the search result recall method as described in the embodiment of the second aspect.

[0023] In the seventh aspect, an embodiment of the present application provides a computer program product comprising program instructions. When the program instructions are executed on an electronic device, the electronic device executes the recall model training method as described in the embodiment of the first aspect, or the search result recall method as described in the embodiment of the second aspect.

[0024] The technical solution disclosed in the embodiment of the present application obtains a search word sample, and multiple positive samples and multiple negative samples under at least two content types corresponding to the search word sample, one of the at least two content types corresponds to the auxiliary recall model, and performs data enhancement processing on the search word sample to obtain a newly added search word sample, and then trains the recall model to be trained according to the search word sample, the newly added search word sample, the auxiliary recall model, and the multiple positive samples and multiple negative samples under at least two content types corresponding to the search word sample to obtain a target recall model. The present application obtains positive samples and negative samples under the content type corresponding to the auxiliary recall model, and utilizes the auxiliary recall model and the positive samples and negative samples under the content type corresponding to the auxiliary recall model to perform auxiliary training on a recall model with poor recall accuracy, so that the recall model with poor recall accuracy can learn the knowledge in the auxiliary recall model, thereby improving the recall accuracy of the results of the recall model with poor recall accuracy, thereby improving the search effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0026] Figure 1 A flowchart of a recall model training method provided in an embodiment of the present application;

[0027] Figure 2A schematic diagram of the structure of a double-tower model provided in an embodiment of the present application;

[0028] Figure 3 A diagram of an implementation scenario for training a recall model to be trained provided in an embodiment of the present application;

[0029] Figure 4 A flowchart of a training recall model to be trained provided in an embodiment of the present application;

[0030] Figure 5 Another implementation scenario diagram of training a recall model to be trained provided in an embodiment of the present application;

[0031] Figure 6 A flowchart of a search result recall method provided in an embodiment of the present application;

[0032] Figure 7 A schematic block diagram of a recall model training device provided in an embodiment of the present application;

[0033] Figure 8 A schematic block diagram of a search result recall device provided in an embodiment of the present application;

[0034] Fig. 9 A schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. According to the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0037] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or scheme described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0038] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two, that is, at least two. "at least one" means one or more than one. "Any" means any one or any several.

[0039] In the related art, with the continuous development of information technology, the content types of search results are becoming more and more diversified. For example, the content types of search results can be advertisements, news, pictures, videos, and books. However, because search results of different content types have obvious differences in content form and feature mode, when the search platform performs search result recall operations based on the search terms entered by the user, it usually uses the recall models corresponding to different content types to recall multiple search results of different content types based on the search terms entered by the user. However, due to the differences in the recall accuracy of the recall models corresponding to different content types, that is, some recall models have higher recall accuracy, and some recall models have lower recall accuracy. For recall models with poor recall accuracy, there will be a situation where the recalled search results are less relevant to the search results actually required by the user.

[0040] In order to solve the above technical problems, the present application provides a recall model training method, a search result recall method and a device to solve the problem that the search results recalled by a recall model with poor recall accuracy have poor relevance to the search results actually required by the user.

[0041] The technical solution of the present application is described in detail below through some embodiments. The embodiments described below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0042] Figure 1 A flowchart of a recall model training method provided in an embodiment of the present application. The recall model training method in an embodiment of the present application can be performed by a recall model training device, which can be composed of hardware and / or software and can be integrated into an electronic device. In the present application, the electronic device can be selected from but not limited to a smart phone, a tablet computer, a desktop computer, and a computer device. Figure 1 As shown, the method may include the following steps:

[0043] S101, obtaining a search word sample, and a plurality of positive samples and a plurality of negative samples of at least two content types corresponding to the search word sample, wherein one of the at least two content types corresponds to an auxiliary recall model.

[0044] In the present application, the auxiliary recall model is an existing recall model that is used to assist the training process of the recall model to be trained and has high recall accuracy.

[0045] Among them, the content type corresponding to the auxiliary recall model is different from the content type corresponding to the recall model to be trained.

[0046] For example, when the content type corresponding to the auxiliary recall model is books, the content type corresponding to the recall model to be trained is video, and so on.

[0047] In some embodiments, a search term sample and multiple positive samples and multiple negative samples under at least two content types corresponding to the search term sample can be obtained through multiple acquisition methods. Among them, the number of search term samples is at least one. Accordingly, when the number of search terms is multiple, the present application obtains multiple positive samples and multiple negative samples under at least two content types corresponding to each search term sample.

[0048] In addition, the positive sample is also called a positive example, which means that when the user interacts with any search result under each content type corresponding to the search term sample, the search result is a positive sample. The negative sample is also called a negative example, which means that when the user does not interact with any search result under each content type corresponding to the search term sample, the search result is a negative sample. The interaction can be understood as a click operation.

[0049] In some optional implementations, any searched search term can be obtained from the search database of the search platform as a search term sample, and multiple positive samples and negative samples of at least two content types corresponding to each search term sample can be obtained from the search database.

[0050] In some other optional implementations, a search word sample input by a user and a plurality of positive samples and a plurality of negative samples of at least two content types corresponding to the search word sample may be received.

[0051] It should be understood that in addition to the above-mentioned implementation methods, the present application can also obtain search term samples, as well as multiple positive samples and multiple negative samples under at least two content types corresponding to the search term samples in other ways, which are not specifically limited here.

[0052] S102, performing data enhancement processing on the search word samples to obtain new search word samples.

[0053] In some embodiments, newly added search term samples may be obtained by performing masking and / or discarding processing on text features corresponding to the search term samples.

[0054] The masking process can be understood as randomly masking the text features corresponding to the search term samples.

[0055] The discarding process can be understood as randomly discarding the text features corresponding to the search term samples.

[0056] In the present application, mask processing is specifically mask processing; and discard processing is specifically dropout processing.

[0057] S103, based on the search word samples, the newly added search word samples, the auxiliary recall model, and multiple positive samples and multiple negative samples under at least two content types corresponding to the search word samples, the recall model to be trained is trained to obtain a target recall model, and the target recall model corresponds to at least one remaining content type of the at least two content types.

[0058] It should be understood that the remaining content types refer to other content types among the at least two content types except the one content type corresponding to the auxiliary recall model.

[0059] In some optional embodiments, the present application trains the recall model to be trained, which may include the following steps:

[0060] Step 1: Input the search term sample, as well as multiple positive samples and multiple negative samples of the content type corresponding to the recall model to be trained into the recall model to be trained, so as to obtain the similarity between the search term sample output by the recall model to be trained and the multiple positive samples and multiple negative samples of the content type corresponding to the recall model to be trained.

[0061] Step 2: Input the search term samples and the newly added search term samples into the comparative self-supervised learning network to obtain the similarity between the search term samples output by the comparative self-supervised learning network and the newly added search term samples.

[0062] Step 3: Input multiple positive samples and multiple negative samples under the content type corresponding to the auxiliary recall model, as well as the newly added search term samples into the auxiliary recall model to obtain the similarity between the newly added search term samples output by the auxiliary recall model and the multiple positive samples and multiple negative samples under the content type corresponding to the auxiliary recall model.

[0063] Step 4: Determine the total loss of the recall model to be trained based on all similarities obtained from steps 1 to 3, and then perform reverse training on the recall model to be trained based on the total loss, such as adjusting parameters in the recall model to be trained to obtain the target recall model.

[0064] It should be noted that the execution order of the above steps 1 to 3 can be to execute step 1 first, then step 2, and finally step 3; or, execute step 2 first, then step 1, and finally step 3; or, execute step 3 first, then step 1, and finally step 2, or execute steps 1 to 3 in parallel, etc., and this application does not impose any specific restrictions on this.

[0065] In some optional embodiments, the recall model to be trained in the present application is a dual-tower model, and the dual-tower model includes a search tower and a result tower, such as Figure 2 As shown. The search tower is used to process the search words to obtain the vector representation of the search words. The result tower is used to process various search results to obtain the vector representation of each search result. In addition, the dual-tower model also includes a calculation layer, which is used to calculate the similarity between the vector representation of the search word and the vector representation of each search result. That is, the above calculation layer is a similarity calculation layer.

[0066] Therefore, the present application trains the recall model to be trained to obtain the target recall model. Specifically, the result tower of the recall model to be trained is trained based on the search term samples, the newly added search term samples, the auxiliary recall model, and multiple positive samples and multiple negative samples under at least two content types corresponding to the search term samples, while keeping the search tower of the recall model to be trained unchanged.

[0067] That is, when training the recall model to be trained, only the result tower is trained, but not the search tower. This can not only improve the recall accuracy of the search results of the target recall model after the recall model to be trained, but also improve the training efficiency of the recall model to be trained.

[0068] The technical solution disclosed in the embodiment of the present application obtains a search word sample, and multiple positive samples and multiple negative samples under at least two content types corresponding to the search word sample, one of the at least two content types corresponds to the auxiliary recall model, and performs data enhancement processing on the search word sample to obtain a newly added search word sample, and then trains the recall model to be trained according to the search word sample, the newly added search word sample, the auxiliary recall model, and the multiple positive samples and multiple negative samples under at least two content types corresponding to the search word sample to obtain a target recall model. The present application obtains positive samples and negative samples under the content type corresponding to the auxiliary recall model, and utilizes the auxiliary recall model and the positive samples and negative samples under the content type corresponding to the auxiliary recall model to perform auxiliary training on a recall model with poor recall accuracy, so that the recall model with poor recall accuracy can learn the knowledge in the auxiliary recall model, thereby improving the recall accuracy of the results of the recall model with poor recall accuracy, thereby improving the search effect.

[0069] In some optional embodiments, the recall model to be trained can be trained in Figure 3 Based on the training scenario shown. Figure 3 The training scenario shown in FIG. 1 further explains step S103 in the above embodiment. Figure 4 .like Figure 4 As shown, the above S103 may include the following steps: S103-1 to S103-5:

[0070] S103-1, obtaining a vector representation of the search word sample according to the search word sample.

[0071] In some embodiments, the search term sample may be input as input data into the search tower of the recall model to be trained to obtain a vector representation of the search term sample output by the search tower of the recall model to be trained.

[0072] S103-2, according to the newly added search word sample, obtain a vector representation of the newly added search word sample.

[0073] Optionally, the newly added search term samples are input as input data into the contrastive self-supervised learning network to obtain a vector representation of the newly added search term samples output by the contrastive self-supervised learning network.

[0074] S103-3, according to the positive samples and negative samples under the preset content type, obtain the vector representation of the positive samples and the vector representation of the negative samples under the preset content type, wherein the preset content type is a content type corresponding to the auxiliary recall model.

[0075] In some optional embodiments, the present application may input positive samples and negative samples under a preset content type into an auxiliary recall model to obtain vector representations of positive samples and vector representations of negative samples under the preset content type output by the auxiliary recall model.

[0076] In the present application, the auxiliary recall model is also a dual-tower model, and the dual-tower model includes a search tower and a result tower. Therefore, the above-mentioned inputting positive samples and negative samples under the preset content type into the auxiliary recall model, and obtaining the vector representation of the positive samples and the vector representation of the negative samples under the preset content type output by the auxiliary recall model, specifically inputting the positive samples and the negative samples under the preset content type into the result tower of the auxiliary recall model, and obtaining the vector representation of the positive samples and the vector representation of the negative samples under the preset content type output by the result tower of the auxiliary recall model.

[0077] S103-4, inputting positive samples and negative samples under the target content type into the recall model to be trained, and obtaining vector representations of positive samples and negative samples under the target content type output by the recall model to be trained.

[0078] The target content type can be understood as a content type corresponding to the recall model to be trained.

[0079] In some optional embodiments, positive samples and negative samples under the target content type can be input into the result tower of the recall model to be trained to obtain vector representations of positive samples and negative samples under the target content type output by the result tower of the recall model to be trained.

[0080] It should be noted that the execution order of the above S103-1, S103-2, S103-3 and S103-4 in the present application may be S103-1→S103-2→S103-3→S103-4;

[0081] Or, S103-2→S103-1→S103-3→S103-4;

[0082] Or, S103-4→S103-2→S103-3→S103-4;

[0083] Alternatively, the above S103 - 1 , S103 - 2 , S103 - 3 and S103 - 4 etc. are executed in parallel, and this application does not impose any specific limitation on this.

[0084] S103-5, based on the vector representation of the search term samples, the vector representation of the newly added search term samples, the vector representation of the positive samples and the vector representation of the negative samples under the preset content type, and the vector representation of the positive samples and the vector representation of the negative samples under the target content type, the result tower of the recall model to be trained is trained to obtain a target recall model.

[0085] In some optional embodiments, the above-mentioned training of the result tower of the recall model to be trained to obtain the target recall model may include the following steps:

[0086] In the first step, the first loss is determined based on the vector representation of the search word sample and the vector representation of the newly added search word sample.

[0087] In this application, the first loss can be understood as a contrastive self-supervised loss, which can be expressed as a Query self-supervised loss.

[0088] Optionally, the first loss may be determined by the following formula (1):

[0089]

[0090] Among them, LOSS1 is the first loss, sim(q,q + ) is the similarity between the vector representation of the search word sample and the vector representation of the positive example newly added search word sample, q is the vector representation of the search word sample, q+ Add a vector representation of the search word sample to the positive example. τ is a hyperparameter, and this hyperparameter is an adjustable parameter. sim(q,q - ) is the similarity between the vector representation of the search word sample and the vector representation of the negative example newly added search word sample, q - Add the vector representation of the search word sample for the negative example, D - It is the set of negative search terms in the search term sample set.

[0091] In the second step, a second loss is determined based on the vector representation of the newly added search term sample, the vector representation of the positive sample under the preset content type, and the vector representation of the negative sample under the preset content type.

[0092] In the present application, the second loss can be understood as knowledge supervision loss, and the knowledge supervision loss can be expressed as Knowledge-supervised loss.

[0093] Optionally, the second loss can be determined by the following formula (2):

[0094]

[0095] in,

[0096] LOSS2 in the above formula (2) is the second loss, y is the vector representation of the positive sample and the vector representation of the negative sample under the preset content type, and q' is the vector representation of the newly added search term sample.

[0097] In the third step, a third loss is determined based on the vector representation of the search term sample, the vector representation of the positive sample under the target content type, and the vector representation of the negative sample under the target content type.

[0098] In this application, the third loss can be understood as a supervised loss, which can be expressed as supervisedloss.

[0099] Optionally, the third loss can be determined by the following formula (3):

[0100]

[0101] Among them, LOSS3 is the third loss, sim(q,d + ) is the similarity between the vector representation of the search word sample and the vector representation of the positive sample under the target content type, q is the vector representation of the search word sample, d + is the vector representation of the positive sample under the target content type, τ is a hyperparameter, and this hyperparameter is an adjustable parameter, sim(q,d -) is the similarity between the vector representation of the search word sample and the vector representation of the negative sample under the target content type, d - is the vector representation of negative samples under the target content type, D - It is the set of negative samples in the sample set under the target content type.

[0102] The fourth step is to train the result tower of the recall model to be trained based on the first loss, the second loss, and the third loss.

[0103] In some optional embodiments, the total loss may be determined based on the first loss, the second loss, and the third loss, and then based on the total loss, the result tower of the recall model to be trained is trained to obtain the target recall model.

[0104] In some embodiments, the total loss may be determined by the following formula (4):

[0105] LOSS=a·LOSS1+b·LOSS2+c·LOSS3......................(4)

[0106] Among them, LOSS is the total loss, LOSS1 is the first loss, LOSS2 is the second loss, LOSS3 is the third loss, a, b and c are all adjustable parameters, and a+b+c=1.

[0107] As an optional implementation method, the result tower of the recall model to be trained is trained according to the total loss, specifically, the result tower of the recall model to be trained is reversely trained according to the total loss to adjust the parameters in the result tower, and the recall model training method disclosed in the present application is repeatedly executed until the total loss calculated for the latest time reaches the training end condition. Then, the recall model to be trained after the latest training is used as the target recall model. Among them, the training end condition can be that the total loss is less than a preset value, or the number of training times reaches a preset number of times.

[0108] In the present application, the above-mentioned preset value is an adjustable parameter and can be flexibly set according to the training accuracy of the recall model. For example, when the result recall accuracy of the recall model is required to be higher, the preset value can be set relatively small. Conversely, the preset value can be set relatively large. This application does not impose any restrictions on the setting of the preset value.

[0109] Similarly, the above-mentioned preset number of times can also be flexibly set according to the training accuracy of the recall model. For example, the preset number of times can be set to thousands or even tens of thousands of times, and this application does not impose any restrictions on this.

[0110] In some optional embodiments, the present application can use an auxiliary recall model to perform auxiliary training on multiple recall models with poor recall accuracy, for example, Figure 5 shown. Figure 5 The knth recall model to be trained includes a result tower and a search tower, which is the same as the double-tower structure of the recall model to be trained k1. In this application, n is an integer greater than 1.

[0111] Among them, the training process of multiple recall models to be trained is the same or similar to the aforementioned training implementation principle of one recall model to be trained. The specific implementation process can be found in the aforementioned embodiment part, and it will not be described in detail here.

[0112] The technical solution disclosed in the embodiment of the present application obtains a search word sample, and multiple positive samples and multiple negative samples under at least two content types corresponding to the search word sample, one of the at least two content types corresponds to the auxiliary recall model, and performs data enhancement processing on the search word sample to obtain a newly added search word sample, and then trains the recall model to be trained according to the search word sample, the newly added search word sample, the auxiliary recall model, and the multiple positive samples and multiple negative samples under at least two content types corresponding to the search word sample to obtain a target recall model. The present application obtains positive samples and negative samples under the content type corresponding to the auxiliary recall model, and utilizes the auxiliary recall model and the positive samples and negative samples under the content type corresponding to the auxiliary recall model to perform auxiliary training on a recall model with poor recall accuracy, so that the recall model with poor recall accuracy can learn the knowledge in the auxiliary recall model, thereby improving the recall accuracy of the results of the recall model with poor recall accuracy, thereby improving the search effect.

[0113] After a detailed introduction to the training process of the recall model, the following introduces the process of recalling search results based on the trained target recall model.

[0114] Figure 6 A flowchart of a search result recall method provided in an embodiment of the present application. The search result recall method provided in an embodiment of the present application can be performed by a search result recall device, which can be composed of hardware and / or software and integrated in an electronic device. In the present application, the electronic device can be selected from but not limited to a smart phone, a tablet computer, a desktop computer, and a computer device.

[0115] like Figure 6 As shown, the method may include the following steps:

[0116] S201, obtaining a target search term.

[0117] Generally, when a user obtains the desired resources, i.e., search results, on a search platform, he or she can enter a search term in the search bar provided by the search platform, so that the search platform can perform a search result recall operation based on the search term. In addition, the user can also enter the search term by voice or other means, and this application does not impose any specific restrictions on the method of the user entering the search term.

[0118] Among them, the search term input by the user is the target search term.

[0119] That is, the present application can obtain the target search word by detecting the search bar to obtain the target search word, or detecting the user's voice data to obtain the target search word, and other methods. There is no restriction on obtaining the target search word.

[0120] It should be understood that the search platform of this application refers to any application or mini-program that supports search function, and is not limited here.

[0121] S202, inputting the target search term into the target recall model to obtain a search result recall sequence output by the target recall model, wherein the target recall model is obtained according to the recall model training method in the aforementioned embodiment.

[0122] Considering that the target recall model includes a search tower and a result tower, the search tower can process the target search term and output a vector representation of the target search term; the result tower can process each search result under the content type corresponding to the target recall model in the search result database corresponding to the search platform, and output a vector representation of each search result.

[0123] Next, the target recall model includes a calculation layer to calculate the similarity between the vector representation of the target search term and the vector representation of each search result. Then, in descending order of similarity, the search results corresponding to the vector representation of each search result are sorted to obtain a sorted result. The sorted result is used as the search result recall sequence.

[0124] Taking into account that the target recall model recalls a large number of search results related to the target search term, after obtaining the sorting results, the present application can also select the top N search results from the sorting results as the search result recall sequence according to the recall strategy. In this way, multiple search results that are more relevant to the target search term can be obtained, while avoiding the problem of low user search efficiency due to using all search results related to the target search term as the recall sequence.

[0125] The technical solution provided in the embodiment of the present application, after the target recall model learns the accurate recall knowledge of the auxiliary recall model, uses the target recall model to recall search results related to the target search term, which can improve the result recall accuracy of the recall model with poor recall accuracy, thereby improving the search effect.

[0126] Please refer to the attached Figure 7 , a recall model training device proposed in an embodiment of the present application is described. Figure 7As shown, the recall model training device 300 includes: a sample acquisition module 310, a data processing module 320 and a model training module 330.

[0127] The sample acquisition module 310 is used to acquire a search word sample, and a plurality of positive samples and a plurality of negative samples under at least two content types corresponding to the search word sample, wherein one of the at least two content types corresponds to the auxiliary recall model;

[0128] A data processing module 320 is used to perform data enhancement processing on the search word samples to obtain new search word samples;

[0129] The model training module 330 is used to train the recall model to be trained based on the search term sample, the newly added search term sample, the auxiliary recall model, and multiple positive samples and multiple negative samples under at least two content types corresponding to the search term sample to obtain a target recall model, wherein the target recall model corresponds to at least one remaining content type of the at least two content types.

[0130] In an optional implementation of the embodiment of the present application, the recall model to be trained is a dual-tower model, and the dual-tower model includes a search tower and a result tower;

[0131] Accordingly, the model training module 330 is specifically used for:

[0132] The result tower of the recall model to be trained is trained based on the search term sample, the newly added search term sample, the auxiliary recall model, and multiple positive samples and multiple negative samples under at least two content types of the search term sample object, while keeping the search tower of the recall model to be trained unchanged.

[0133] In an optional implementation of the embodiment of the present application, the model training module 330 includes:

[0134] A first determining unit, configured to obtain a vector representation of the search word sample according to the search word sample;

[0135] A second determining unit, configured to obtain a vector representation of the newly added search term sample according to the newly added search term sample;

[0136] a third determining unit, configured to obtain, according to the positive samples and the negative samples under a preset content type, a vector representation of the positive samples and a vector representation of the negative samples under the preset content type, wherein the preset content type is a content type corresponding to the auxiliary recall model;

[0137] a fourth determination unit, configured to input positive samples and negative samples of the target content type into the recall model to be trained, and obtain vector representations of positive samples and negative samples of the target content type output by the recall model to be trained;

[0138] A training unit is used to train the result tower of the recall model to be trained based on the vector representation of the search term samples, the vector representation of the newly added search term samples, the vector representation of the positive samples and the vector representation of the negative samples under the preset content type, and the vector representation of the positive samples and the vector representation of the negative samples under the target content type.

[0139] In an optional implementation method of an embodiment of the present application, the second determination unit is specifically used to: input the newly added search term sample into a comparative self-supervised learning network to obtain a vector representation of the newly added search term sample output by the comparative self-supervised learning network.

[0140] In an optional implementation method of an embodiment of the present application, the third determination unit is specifically used to: input the positive samples and negative samples under the preset content type into the auxiliary recall model, and obtain the vector representation of the positive samples and the vector representation of the negative samples under the preset content type output by the auxiliary recall model.

[0141] In an optional implementation of the embodiment of the present application, the auxiliary recall model includes a result tower;

[0142] Accordingly, the third determining unit is further configured to:

[0143] The positive samples and negative samples under the preset content type are input into the result tower of the auxiliary recall model to obtain the vector representation of the positive samples and the vector representation of the negative samples under the preset content type output by the result tower of the auxiliary recall model.

[0144] In an optional implementation of the embodiment of the present application, the training unit is specifically used to:

[0145] Determining a first loss according to the vector representation of the search word sample and the vector representation of the newly added search word sample;

[0146] Determine a second loss according to the vector representation of the newly added search term sample, the vector representation of the positive sample under the preset content type, and the vector representation of the negative sample under the preset content type;

[0147] Determining a third loss according to the vector representation of the search term sample, the vector representation of the positive sample under the target content type, and the vector representation of the negative sample under the target content type;

[0148] The result tower of the recall model to be trained is trained according to the first loss, the second loss and the third loss.

[0149] In an optional implementation of the embodiment of the present application, the training unit is further configured to:

[0150] determining a total loss based on the first loss, the second loss, and the third loss;

[0151] According to the total loss, the result tower of the recall model to be trained is trained to obtain a target recall model.

[0152] It should be understood that the device embodiment and the aforementioned method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Figure 7 The device 300 shown can perform Figure 1 The corresponding method embodiments, and the aforementioned and other operations and / or functions of each module in the device 300 are respectively to implement Figure 1 For the sake of brevity, the corresponding processes in each method are not repeated here.

[0153] In the above, the device 300 of the embodiment of the present application is described from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the first aspect method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the first aspect method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above-mentioned first aspect method embodiment in conjunction with its hardware.

[0154] Please refer to the attached Figure 8 , a search result recall device proposed in an embodiment of the present application is described. Figure 8 As shown, the search result recall device 400 includes: a data acquisition module 410 and a result recall module 420.

[0155] Wherein, the data acquisition module 410 is used to acquire the target search term;

[0156] The result recall module 420 is used to input the target search term into a target recall model to obtain a search result recall sequence output by the target recall model, wherein the target recall model is obtained according to the aforementioned recall model training device embodiment.

[0157] It should be understood that the search result recall device embodiment and the search result recall method embodiment can correspond to each other, and similar descriptions can refer to the search result recall method embodiment. To avoid repetition, no further description is given here. Specifically, Figure 8 The device 400 shown may perform Figure 6 The corresponding method embodiments, and the aforementioned and other operations and / or functions of each module in the device 400 are respectively to implement Figure 8 For the sake of brevity, the corresponding processes in each method are not repeated here.

[0158] The above describes the device 400 of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the second aspect method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the second aspect method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above-mentioned second aspect method embodiment in conjunction with its hardware.

[0159] Fig. 9 A schematic block diagram of an electronic device provided in an embodiment of the present application. Fig. 9 As shown, the electronic device 500 may include: a memory 510 and a processor 520, wherein the memory 510 is used to store a computer program and transmit the program code to the processor 520. In other words, the processor 520 may call and run the computer program from the memory 510 to implement the recall model training method described in the first aspect of the embodiment of the present application, or the search result recall method described in the second aspect of the embodiment.

[0160] For example, the processor 520 may be used to execute the above-mentioned recall model training method or search result recall method according to the instructions in the computer program.

[0161] In some embodiments of the present application, the processor 520 may include but is not limited to:

[0162] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0163] In some embodiments of the present application, the memory 510 includes but is not limited to:

[0164] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0165] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 510 and executed by the processor 520 to complete the above-mentioned recall model training method or search result recall method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.

[0166] like Fig. 9As shown, the electronic device 500 may further include:

[0167] The transceiver 530 may be connected to the processor 520 or the memory 510 .

[0168] The processor 520 may control the transceiver 530 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 530 may include a transmitter and a receiver. The transceiver 530 may further include an antenna, and the number of antennas may be one or more.

[0169] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0170] The present application also provides a computer storage medium on which a computer program is stored. When the computer program is executed by a computer, the computer is enabled to execute the recall model training method described in the first aspect above, or the search result recall method described in the second aspect embodiment.

[0171] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state disk (solid state disk, SSD)), etc.

[0172] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0173] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0174] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0175] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0176] It should be understood that before using the technical solutions disclosed in the embodiments of the present application, the type, scope of use, and usage scenarios of the personal information involved in the present application should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations. For example, in response to receiving the user's active request, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require the acquisition and use of the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present application according to the prompt information. As an optional but non-limiting implementation method, in response to receiving the user's active request, the method of sending the prompt information to the user can be, for example, a pop-up window, and the prompt information can be presented in the form of text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device. It can be understood that the above notification and the process of obtaining user authorization are only illustrative and do not constitute a limitation on the implementation method of the present application. Other methods that meet relevant laws and regulations can also be applied to the implementation method of the present application. It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0177] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A recall model training method, characterized in that: include: Acquire a search term sample, and a plurality of positive samples and a plurality of negative samples under at least two content types corresponding to the search term sample, wherein one of the at least two content types corresponds to an auxiliary recall model; Performing data enhancement processing on the search term samples to obtain newly added search term samples; According to the search term samples, the newly added search term samples, the auxiliary recall model, and multiple positive samples and multiple negative samples under at least two content types corresponding to the search term samples, the recall model to be trained is trained to obtain a target recall model, and the target recall model corresponds to at least one remaining content type of the at least two content types.

2. The method according to claim 1, characterized in that The recall model to be trained is a double-tower model, and the double-tower model includes a search tower and a result tower; Accordingly, the training of the recall model to be trained includes: The result tower of the recall model to be trained is trained based on the search term sample, the newly added search term sample, the auxiliary recall model, and multiple positive samples and multiple negative samples under at least two content types of the search term sample object, while keeping the search tower of the recall model to be trained unchanged.

3. The method according to claim 2, characterized in that The step of training the result tower of the recall model to be trained according to the search word sample, the newly added search word sample, the auxiliary recall model, and multiple positive samples and multiple negative samples under at least two content types of the search word sample object includes: According to the search word sample, obtaining a vector representation of the search word sample; According to the newly added search word sample, obtaining a vector representation of the newly added search word sample; According to the positive samples and the negative samples under the preset content type, a vector representation of the positive samples and a vector representation of the negative samples under the preset content type are obtained, wherein the preset content type is a content type corresponding to the auxiliary recall model; Inputting positive samples and negative samples of the target content type into the recall model to be trained, and obtaining vector representations of positive samples and negative samples of the target content type output by the recall model to be trained; The result tower of the recall model to be trained is trained according to the vector representation of the search term samples, the vector representation of the newly added search term samples, the vector representation of the positive samples and the vector representation of the negative samples under the preset content type, and the vector representation of the positive samples and the vector representation of the negative samples under the target content type.

4. The method according to claim 3, characterized in that The step of obtaining a vector representation of the newly added search term sample according to the newly added search term sample includes: The newly added search word samples are input into a comparative self-supervised learning network to obtain a vector representation of the newly added search word samples output by the comparative self-supervised learning network.

5. The method according to claim 3, characterized in that: The step of obtaining, according to the positive samples and the negative samples under the preset content type, a vector representation of the positive samples and a vector representation of the negative samples under the preset content type includes: The positive samples and negative samples under the preset content type are input into the auxiliary recall model to obtain the vector representation of the positive samples and the vector representation of the negative samples under the preset content type output by the auxiliary recall model.

6. The method according to claim 5, characterized in that The auxiliary recall model includes a result tower; Correspondingly, the positive samples and negative samples under the preset content type are input into the auxiliary recall model to obtain the vector representation of the positive samples and the vector representation of the negative samples under the preset content type output by the auxiliary recall model, including: The positive samples and negative samples under the preset content type are input into the result tower of the auxiliary recall model to obtain the vector representation of the positive samples and the vector representation of the negative samples under the preset content type output by the result tower of the auxiliary recall model.

7. The method according to claim 3, characterized in that The step of training the result tower of the recall model to be trained according to the vector representation of the search word sample, the vector representation of the newly added search word sample, the vector representation of the positive sample and the vector representation of the negative sample under the preset content type, and the vector representation of the positive sample and the vector representation of the negative sample under the target content type comprises: Determining a first loss according to the vector representation of the search word sample and the vector representation of the newly added search word sample; Determine a second loss according to the vector representation of the newly added search term sample, the vector representation of the positive sample under the preset content type, and the vector representation of the negative sample under the preset content type; Determining a third loss according to the vector representation of the search term sample, the vector representation of the positive sample under the target content type, and the vector representation of the negative sample under the target content type; The result tower of the recall model to be trained is trained according to the first loss, the second loss and the third loss.

8. The method according to claim 7, characterized in that The result tower of the recall model to be trained according to the first loss, the second loss and the third loss includes: determining a total loss based on the first loss, the second loss, and the third loss; According to the total loss, the result tower of the recall model to be trained is trained to obtain a target recall model.

9. A search result recall method, characterized in that: include: Get the target search term; The target search term is input into a target recall model to obtain a search result recall sequence output by the target recall model, wherein the target recall model is obtained according to the recall model training method according to any one of claims 1-8.

10. A recall model training device, characterized in that: include: A sample acquisition module, used to acquire a search word sample, and a plurality of positive samples and a plurality of negative samples under at least two content types corresponding to the search word sample, wherein one of the at least two content types corresponds to the auxiliary recall model; A data processing module, used to perform data enhancement processing on the search word samples to obtain new search word samples; A model training module is used to train a recall model to be trained based on the search term samples, the newly added search term samples, the auxiliary recall model, and multiple positive samples and multiple negative samples under at least two content types corresponding to the search term samples to obtain a target recall model, wherein the target recall model corresponds to at least one remaining content type of the at least two content types.

11. A search result recall device, characterized in that: include: A data acquisition module, used to acquire target search terms; A result recall module is used to input the target search term into a target recall model to obtain a search result recall sequence output by the target recall model, wherein the target recall model is obtained according to the recall model training device described in any one of claim 10.

12. An electronic device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 9.

13. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 9.

14. A computer program product comprising program instructions, characterized in that When the program instructions are executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 9.

Citation Information

Cited By

  • Method, device and equipment for optimizing model training sample, medium and product

    CN120124710A

  • Embedding-based item retrieval for search result optimization

    WO2026129269A1