Method for training recall model, electronic device, storage medium and program product
By comparing and learning pre-trained query encoding models and object encoding models, and only fine-tuning the query encoding model, target object information is filtered and trained, which solves the problem of inconsistent targets between the recall model and the ranking model and improves the accuracy of information retrieval.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 阿里巴巴(中国)网络技术有限公司
- Filing Date
- 2026-04-01
- Publication Date
- 2026-07-28
AI Technical Summary
Existing recall and ranking models have inconsistent objectives in information retrieval systems, leading to a decrease in the accuracy of information retrieval. Although the candidate product information list output by the recall model is semantically reasonable, it may not match user preferences.
By comparing and learning the pre-trained query encoding model and the object encoding model, only the query encoding model is fine-tuned to select target object information that meets the set advantage relevance conditions, and fine-tuning training is performed based on these positively relevance samples to keep the embedding representation of the object information database unchanged.
It improves the accuracy of information retrieval, making the candidate information output by the recall model both semantically reasonable and in line with user preferences, thus enhancing the accuracy of information retrieval.
Smart Images

Figure CN122470804A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method for training a recall model, an electronic device, a storage medium, and a program product. Background Technology
[0002] For example, e-commerce and other information retrieval systems aim to retrieve product information of interest to users from a vast amount of goods, thus providing it to them. However, due to the rapid development of the internet, major platforms generate a large amount of new information every day, posing a significant challenge to information retrieval systems.
[0003] Currently, one feasible approach is to perform information retrieval through a two-stage process using a retrieval system that includes a recall model and a ranking model. In the first stage, the recall model filters a list of candidate products that are semantically relevant to the query question from a large pool of product information based on the user's input query. In the second stage, the ranking model ranks the product information in the candidate product information list according to its relevance to the query question, i.e., it scores the relevance to recommend more relevant product information.
[0004] Recall models are typically trained by comparing and contrasting query queries with product information. Their goal is to sift through a large pool of product information to identify candidate products that semantically match the query. Ranking models, on the other hand, integrate multi-dimensional features of user behavior and product information. Through more complex interactions, they accurately predict product information that aligns with user preferences, aiming to precisely rank the candidate product list to satisfy those preferences. Clearly, the goals of recall and ranking models differ. Recall models aim to output a list of candidate products that are "semantically reasonable" with the query, while ranking models strive for "exact matching." In other words, these semantically reasonable candidate product lists may not be the product information that the ranking model deems suitable for user preferences, thus affecting the accuracy of information retrieval. Summary of the Invention
[0005] This application provides a training method for a recall model, an electronic device, a storage medium, and a program product to improve the accuracy of information retrieval.
[0006] In a first aspect, embodiments of this application provide a method for training a recall model, the recall model comprising: learning a pre-trained query encoding model and an object encoding model through comparative learning, the method comprising: The first embedding representation corresponding to the first query question is determined through the query encoding model; Based on the similarity between the first embedded representation and the embedded representations corresponding to different object information in the object information database, a plurality of first object information that meet the set similarity conditions are determined; wherein, the embedded representations of the different object information are obtained by encoding the different object information based on the object encoding model; Determine the relevance scores between the plurality of first object information and the first query question; From the plurality of first object information, determine the target object information whose relevance score satisfies the set advantage relevance condition; The query encoding model is fine-tuned and trained based on the target object information.
[0007] Secondly, embodiments of this application provide a training apparatus for a recall model, the recall model comprising: a query encoding model and an object encoding model pre-trained through comparative learning, the apparatus comprising: A query encoding module is used to determine the first embedding representation corresponding to the first query question through the query encoding model; The recall result determination module is used to determine multiple pieces of first object information that meet a set similarity condition based on the similarity between the first embedded representation and the embedded representations corresponding to different object information in the object information database; wherein, the embedded representations of the different object information are obtained by encoding the different object information based on the object encoding model; The relevance score determination module is used to determine the relevance scores between the plurality of first object information and the first query question; The target object information determination module is used to determine, from the plurality of first object information, target object information whose relevance scores satisfy the set dominance relevance conditions; The fine-tuning training module is used to fine-tune the query encoding model based on the target object information.
[0008] Thirdly, embodiments of this application provide an information retrieval method, including: Retrieve the query question to be searched; The embedded representation corresponding to the query question to be retrieved is determined by the fine-tuned query coding model, wherein the fine-tuned query coding model is obtained by fine-tuning the pre-trained query coding model based on the training method of the recall model described in any of the above embodiments; Based on the similarity between the embedding representation corresponding to the query question to be retrieved and the embedding representations corresponding to different object information in the object information database, multiple candidate object information that meet the set similarity conditions are determined; wherein, the embedding representations of different object information are obtained by encoding different object information based on a pre-trained object encoding model; The recommended results corresponding to the query question to be retrieved are determined from the multiple candidate object information.
[0009] Fourthly, embodiments of this application provide an electronic device, including: a memory and a processor; the memory is used to store one or more computer instructions; the processor is used to execute the one or more computer instructions to: perform the method as described in the first or third aspect.
[0010] Fifthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the methods described in the first or third aspect.
[0011] In a sixth aspect, embodiments of this application provide a computer program product, including: a computer program / instructions, which, when executed by a processor, can implement the method described in the first or third aspect.
[0012] In the training method of the recall model provided in this application embodiment, the recall model includes: learning a pre-trained query encoding model and an object encoding model through comparison. The query encoding model is used to convert the query question into a corresponding embedding representation, and the object encoding model is used to convert different object information in the object information database into their respective corresponding embedding representations. When fine-tuning the recall model, since the number of object information in the object information database is huge, if the object encoding model is fine-tuned, all object information in the object information database needs to be re-converted into embedding representations and the index relationship between the query question and the object information needs to be re-established. The computation is large and time-consuming. Considering the high implementation cost, it is necessary to keep the embedding representation of the object information in the object information database unchanged and only fine-tune the query encoding model.
[0013] When fine-tuning the query encoding model, the first embedding representation corresponding to the first query question is determined using the query encoding model. Based on the similarity between the first embedding representation and the embedding representations corresponding to different object information in the object information database, multiple pieces of first object information that meet the set similarity conditions are identified. The relevance scores of each of these first object pieces of information to the first query question are also determined. From these multiple pieces of first object information, target object information whose relevance scores meet the set dominance relevance conditions is selected. By comparing the relevance scores of the multiple pieces of first object information with the set dominance relevance conditions, the first object information that meets the set dominance relevance conditions is designated as a positive relevance sample, which is the target object information. First object information that does not meet the set dominance relevance conditions is designated as a negative relevance sample. The query encoding model is fine-tuned only based on positive relevance samples (target object information) to ensure that the semantics of the first embedding representation corresponding to the first query question output by the query encoding model are more similar to the embedding representations of positive relevance samples. In the embedding space, this manifests as only narrowing the distance between the first embedding representation and the embedding representations of positive relevance samples, without performing any operations on the embedding representations of negative relevance samples. In this way, the fine-tuned query coding model, based on the embedded representation determined by the query question, can extract candidate object information from the object information database that is both highly relevant to the query question and semantically similar. The stronger the relevance to the query question, the greater the probability of the user selecting it, which is more in line with the user's preferences. As a result, the candidate object information output by the recall model is both semantically reasonable and in line with the user's preferences, thus improving the accuracy of information retrieval. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 A schematic diagram illustrating the principle of comparative learning pre-training of the query encoding model and object encoding model provided in the embodiments of this application; Figure 2 A flowchart illustrating a training method for a recall model provided in an embodiment of this application; Figure 3 A schematic diagram of the embedding space formed by a pre-trained recall model provided in an embodiment of this application; Figure 4 This is a schematic diagram illustrating the fine-tuning of a first embedding representation in an embedding space, as provided in an embodiment of this application. Figure 5This is a schematic diagram illustrating the fine-tuning training process of a query encoding model provided in an embodiment of this application; Figure 6 A flowchart for determining target object information that meets set advantage-related conditions is provided in an embodiment of this application; Figure 7 A flowchart illustrating a fine-tuning query encoding model provided in this application embodiment; Figure 8 A flowchart illustrating a fine-tuning training method for a ranking model provided in this application embodiment; Figure 9 A flowchart illustrating an information retrieval method provided in this application embodiment; Figure 10 A schematic diagram of the structure of a training device for a recall model provided in an embodiment of this application; Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. In addition, the timing of the steps in the following method embodiments is only an example and not a strict limitation.
[0017] It should be noted that, in the cases involving user information in the embodiments of this application, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse. In addition, the various models involved in this application (including but not limited to problem analysis models or other models) comply with relevant laws and standards.
[0018] Additionally, it should be noted that the various functional models involved in the embodiments of this application can be language models (LM) or multimodal models (MM) based on artificial intelligence. The embodiments of this application do not limit the number of model parameters supported by the model, aiming to meet actual needs. If the model has relatively more parameters, the model will be relatively larger in scale and have relatively better performance; however, it will consume more time and resources during inference or training. If the model has relatively fewer parameters, the model will be relatively smaller in scale, and while meeting performance requirements, it will be more lightweight, consuming less time and resources during inference or training. The aforementioned model can be a deep learning model used to process and generate natural language text or multimodal data, and can be implemented based on a neural network architecture, which can be pre-trained on large amounts of data. In an optional implementation, the aforementioned model can include an encoder, a decoder, a self-attention layer, and a feed-forward neural network, etc. The encoder is mainly used to convert input data (usually in sequence form) into vector representation. This process can capture the semantic features of the input data. The decoder is responsible for converting the intermediate representation generated by the encoder into output data (usually in sequence form). The self-attention layer is a mechanism that allows the model to pay attention to other positions in the sequence to better encode the current position information. The feedforward neural network can perform nonlinear transformations on the output of the self-attention layer to enhance the model's expressive power. All parts work together, enabling the model built on them to perform well in various complex processing tasks, such as natural language processing, computer vision, speech recognition, machine translation, text summarization, and intelligent question answering.
[0019] The following explains the terms or concepts involved in the embodiments of this application: Contrastive learning pre-training: By constructing positive and negative samples, the model brings positive samples (semantically similar) closer together and negative samples (semantically dissimilar) further apart in the vector space, thereby learning feature representations with semantic discriminative capabilities. In recall models, it is often used to train dual-tower encoding models (query encoding model and object encoding model) to make the vectors of query questions and relevant object information more similar.
[0020] Fine-tuning training: Based on the pre-trained model, the model parameters are further optimized using a task-specific dataset to better adapt the model to the target task.
[0021] Reinforcement learning: A learning method that learns to make better inference strategies by allowing the model to continuously try actions in the environment and adjusting the model parameters based on the reward function values obtained.
[0022] Currently, retrieval systems that incorporate recall and ranking models perform information retrieval through two phases. In the first phase, the recall model filters a list of candidate products that are semantically relevant to the user's query from a large amount of product information. In the second phase, the ranking model ranks the products in the candidate product list based on their relevance to the query, i.e., it scores the relevance to recommend more relevant products.
[0023] Recall models are typically dual-tower encoding models, which use two independent encoding models (query encoding model and object encoding model) to process the query question and object information respectively. The query encoding model encodes the query question into a corresponding embedding representation, while the object encoding model encodes a large number of object information entries in the object information database into their respective embedding representations. This allows the query question and object information to be encoded into the same embedding space, enabling the embedding representations of a large number of object information entries in the object information database to be compared with the embedding representation corresponding to the query question. Multiple object information entries that meet the set similarity criteria are then used as the candidate object information list output by the recall model. Both the query encoding model and the object encoding model are pre-trained through contrastive learning, such as... Figure 1 As shown, Figure 1 This illustrates the principle of comparative learning pre-training for query encoding models and object encoding models, assuming there is a query question x. query and multiple object information x0 key x1 key x2 key ..., determine x through the query coding model query The corresponding embedding representation q is determined by the object encoding model. key x1 key x2 keyThe embeddings k0, k1, k2, ... correspond to q, respectively. For ease of understanding, k0, k1, k2, ... can be used as keys in a dictionary. If only one key (e.g., k+) matches q, then k+ is a positive sample of q, and the remaining keys in the dictionary are negative samples of q. A contrastive learning loss function is constructed. Based on the positive and negative samples, the contrastive learning loss function is used to pre-train the query encoding model and the object encoding model. The contrastive learning loss function, through backpropagation, prompts the query encoding model and the object encoding model to update their parameters, thereby increasing the similarity (dot product) between q and the positive sample k+, and decreasing the similarity (dot product) between q and the keys of the negative samples. It should be noted that the number of positive samples is not limited to one; there can be multiple positive samples.
[0024] In some embodiments, the expression for the contrastive learning loss function value is as follows: ; Where q is the embedding representation of the query question, and k+ is the positive sample of q. Let N be the i-th key in the dictionary, and N be the total number of keys in the dictionary. For temperature coefficient, This represents the dot product calculation, where exp is the exponential function. To compare the learning loss function values.
[0025] After comparative learning pre-training, the query encoding model and object encoding model described above enable semantically similar query questions and object information to be closer together in the embedding space, while semantically dissimilar query questions and object information are farther apart in the embedding space. Furthermore, for the same query question, the embedding representations of semantically similar object information cluster together in the embedding space to form a cluster, thus constructing an embedding space with a global structure.
[0026] Ranking models typically use a cross-encoder to perform deep interactive computation on different object information in the candidate object information list output by the query question and the recall model, so as to output the correlation score between the query question and the different object information in the candidate object information list. This allows the different object information in the candidate object information list to be ranked according to the correlation score, and finally, the object information recommended to the user is output based on the ranking result.
[0027] It is evident that the goals of recall and ranking models are inconsistent. Recall models aim to output a list of candidate objects that are semantically reasonable in relation to the query, while ranking models strive for "exact matching." In other words, these semantically reasonable candidate object lists may not be the object information that the ranking model considers to match user preferences, thus affecting the accuracy of information retrieval.
[0028] To address the issue of target inconsistency, the recall model training method provided in this application, for multiple object information filtered from the object information database based on the embedded representation of the query question output by the query encoding model, needs to determine the target object information that meets the set dominance relevance conditions based on the relevance scores between each object information and the query question. The first object information that meets the set dominance relevance conditions is a positive relevance sample (target object information), while the first object information that does not meet the set dominance relevance conditions is a negative relevance sample. The query encoding model is fine-tuned only based on the positive relevance samples (target object information) to indicate that the semantics of the embedded representation of the query question output by the query encoding model are more similar to the embedded representation of the positive relevance samples. In the embedding space, this manifests as only narrowing the distance between the embedded representation of the query question and the embedded representation of the positive relevance samples, without performing any operations on the embedded representation of the negative relevance samples. In this way, the fine-tuned query coding model, based on the embedded representation determined by the query question, can extract candidate object information from the object information database that is both highly relevant to the query question and semantically similar. The stronger the relevance to the query question, the greater the probability of the user selecting it, which is more in line with the user's preferences. As a result, the candidate object information output by the recall model is both semantically reasonable and in line with the user's preferences, thus improving the accuracy of information retrieval.
[0029] Figure 2 This is a flowchart illustrating a training method for a recall model provided in an embodiment of this application. The subject executing this method can be an electronic device. Figure 2 As shown, the method includes the following steps: 201. Determine the first embedding representation corresponding to the first query question through the query coding model.
[0030] 202. Based on the similarity between the first embedded representation and the embedded representations corresponding to different object information in the object information database, determine multiple first object information that meet the set similarity conditions; wherein, the embedded representations of different object information are obtained by encoding different object information based on the object encoding model.
[0031] 203. Determine the relevance scores between multiple pieces of first object information and the first query question.
[0032] 204. Determine the target object information whose relevance scores meet the set dominant relevance conditions from multiple first object information.
[0033] 205. Fine-tune and train the query coding model based on the target object information.
[0034] The first query question can be the original query question entered by the user in the past, and the first embedding representation can be a vector of preset dimensions obtained by encoding the first query question through a query encoding model. For example, assuming the first query question is "Apple mobile phone", the first embedding representation can be determined as [0.12, -0.34, 0.56,..., 0.78] through the query encoding model. The object can be, for example, a product on an e-commerce platform or a video on a video platform, and the object information can be the descriptive information of the object, including name, category, price, etc. The embedding representation of the object information can be a vector of preset dimensions obtained by encoding the object information through an object encoding model, wherein the dimension of the embedding representation of the object information is the same as the dimension of the embedding representation of the query question.
[0035] As can be seen from the aforementioned recall model structure, fine-tuning the recall model requires adjustments to both the query encoding model and the object encoding model. However, due to the massive amount of object information in the object information database, fine-tuning the object encoding model necessitates re-embedding and representing all object information in the database and re-establishing the similarity index relationship between the query question and the object information. This process is computationally intensive and time-consuming, resulting in high implementation costs. Therefore, this embodiment of the application maintains a fixed embedding representation of object information in the object information database, i.e., freezes the object index, and only fine-tunes the query encoding model.
[0036] The similarity between the first embedding representation and the embedding representation of the object information can be calculated by taking the dot product of the two representations. A higher similarity (dot product) indicates a smaller directional difference between the two representations in the embedding space, and thus a greater semantic similarity. Conversely, a lower similarity (dot product) indicates a greater directional difference between the two representations in the embedding space, and thus a less semantically similar representation.
[0037] In one optional embodiment, determining multiple first object information pieces that satisfy a set similarity condition based on the similarity between the first embedded representation and the embedded representations corresponding to different object information in the object information database can be achieved by: calculating the similarity between the first embedded representation and the embedded representations corresponding to different object information in the object information database, sorting them from high to low similarity, and selecting the top K object information pieces as multiple first object information pieces, where the set similarity condition is the top K similarity ranking. In another optional embodiment, determining multiple first object information pieces that satisfy a set similarity condition based on the similarity between the first embedded representation and the embedded representations corresponding to different object information in the object information database can also be achieved by: calculating the similarity between the first embedded representation and the embedded representations corresponding to different object information in the object information database, and selecting object information pieces with a similarity greater than a preset threshold as first object information pieces, thus obtaining multiple first object information pieces, where the set similarity condition is a similarity greater than a preset threshold.
[0038] In this way, by calculating the similarity between the first embedded representation and the embedded representations corresponding to different object information in the object information database, multiple first object information that are semantically similar to the first query question in the object information database can be filtered out.
[0039] As described above, while the multiple pieces of first object information output by the recall model are semantically similar to the first query question, they do not necessarily align with user preferences. The relevance score between the first object information and the first query question characterizes their correlation; the stronger the relevance, the greater the likelihood of the user selecting the object, and thus, the more it aligns with user preferences. Therefore, we can determine the relevance scores between each piece of first object information and the first query question, and optimize the query encoding model based on these relevance scores.
[0040] In one optional embodiment, the relevance scores of multiple first object information pieces are used as reward signals to fine-tune the query encoding model through reinforcement learning. That is, the higher the relevance score of the first object information, the greater the similarity between the first embedding representation output by the query encoding model and the embedding representation of the first object information. Conversely, the lower the relevance score of the first object information, the smaller the similarity between the first embedding representation output by the query encoding model and the embedding representation of the first object information. Correspondingly, in the embedding space formed by the first embedding representation and the embedding representations of multiple first object information pieces, this manifests as: bringing the first embedding representation closer to the first object information with a higher relevance score, and pushing the first embedding representation further away from the first object information with a lower relevance score. Since the query encoding model and object encoding model, pre-trained through contrastive learning, map the first embedding representation corresponding to the first query question and the embedding representations corresponding to multiple first object information pieces into an embedding space, by determining the relevance scores between the multiple first object information pieces and the first query question, the multiple first object information pieces can be divided into two groups in the embedding space: one group consists of first object information pieces with a strong relevance to the first query question, and the other group consists of first object information pieces with a weaker relevance to the first query question. Figure 3As shown, after determining the relevance scores of multiple pieces of first object information to the first query question, the embedding representations corresponding to the multiple pieces of first object information can be divided into two clusters in the embedding space based on the relevance scores. Assume cluster A is a set of embedding representations (A11, A12, A13) corresponding to a group of first object information with relatively high relevance to the first query question, and cluster B is a set of embedding representations (B11, B12) corresponding to a group of first object information with relatively low relevance to the first query question. Cluster A is a cluster of positively correlated samples, and cluster B is a cluster of negatively correlated samples. Let q be the first embedding representation corresponding to the first query question. If, in the above manner, the relevance scores of all first object information in clusters A and B are used as reward signals, and the query encoding model is fine-tuned through reinforcement learning, then in the embedding space, this manifests as: bringing q closer to A11, A12, and A13, and pushing q further away from B11 and B12. As mentioned above, the distance between the first embedding representation and the embedding representation of the first object information is actually the dot product (similarity) between the two. Taking A11 in cluster A and B11 in cluster B as examples, narrowing the distance between q and A11 involves adjusting the angle between them to a smaller value. This adjustment has a definite direction, and the goal is to minimize the angle between them. However, widening the distance between q and B11 is problematic because there are too many possible directions for adjustment. Furthermore, there is no specific target to constrain how far to push q. Therefore, there is no concrete adjustment goal when widening the distance between q and B11. This can lead to q being forcibly pushed into the blank area between clusters A and B, i.e., the semantic void region. While it may be far from the negatively correlated sample cluster (cluster B), it is also far from the positively correlated sample cluster (cluster A), thus disrupting the stable embedding space formed by the contrastive learning pre-trained query encoding model and object encoding model—a phenomenon known as embedding space geometric collapse. Therefore, while using the relevance scores of multiple first object information as reward signals to fine-tune the query coding model through reinforcement learning can prompt the query coding model to adjust its parameters so that the first embedding representation in the embedding space is far away from the embedding representation of the first object information with lower relevance scores, it also causes geometric collapse of the embedding space formed by the pre-trained recall model, which in turn affects the performance of the recall model.
[0041] Based on the above problems, this embodiment determines the target object information whose relevance scores meet the set advantage relevance conditions from multiple first object information, and fine-tunes the query coding model according to the target object information.
[0042] like Figure 4As shown, the relevant scores corresponding to A11, A12, and A13 in cluster A can be used as reward signals, and the first object information corresponding to A11, A12, and A13 is the target object information. That is, the query coding model is fine-tuned only based on the target object information. Taking A11 in cluster A and B11 in cluster B as examples, the fine-tuned query coding model only needs to bring q closer to A11, without pushing q further away from B11. This gives the adjustment of q a specific direction and target, which encourages bringing the target object information with high relevance scores closer, while avoiding pushing away the first object information with low relevance scores. This will not destroy the structure of the embedding space formed by the pre-trained recall model and avoid the geometric collapse of the embedding space.
[0043] like Figure 5 As shown, Figure 5 This illustrates the fine-tuning training process of the query encoding model: for the first query question x query The query encoding model 501 outputs a first embedding representation q, and the frozen object index module 502 outputs K pieces of first object information (d1, d2, d3, ... d4) that satisfy the set similarity conditions based on the first embedding representation q. K The frozen object index module 502 contains embedded representations of different object information in a pre-generated object information library 503. These embedded representations are obtained by encoding different object information in the object information library 503 based on a pre-trained object encoding model 504. The sorting module 505 is based on K first object information (d1, d2, ... d... K Determine K pieces of information about the first object (d1, d2, ... dk). K ) respectively with x query The correlation scores (r1, r2, ... r) K The positive advantage selection module 506 selects information from K first objects (d1, d2, ... d6) based on relevance scores. K In the process, M target object information that meet the set advantage-related conditions are determined, M < K. The backpropagation module 507 performs fine-tuning training on the query encoding model 501 based on the M target object information.
[0044] In one optional embodiment, the sorting module 505 can be implemented through a sorting model, which can involve inputting a first query question and multiple first object information into the sorting model to determine the relevance scores between the multiple first object information and the first query question. The sorting model can output the relevance scores between the multiple first object information and the first query question based on multi-dimensional features such as user historical behavior, multiple first object information, and the first query question. In another optional embodiment, the sorting module 505 can also directly calculate the relevance scores between the first query question and the multiple first object information based on predefined matching rules. These predefined matching rules can be keyword hitting rules, i.e., the occurrence of terms related to the first query question in the first object information, such as the number of hits or the hit rate, to output the corresponding mapping relevance score. In other optional embodiments, the sorting module 505 can also determine the relevance scores between multiple first object information and the first query question through a knowledge graph. This can be done by: linking the first query question to the entity eq in the knowledge graph, connecting multiple first object information to entities (eo1, eo2, ... eoK) in the knowledge graph, calculating the path lengths between eo1, eo2, ... eoK and eq respectively, and finding that the path length is inversely proportional to the relevance score, i.e., the shorter the path length, the higher the relevance score. Based on the mapping relationship between path length and relevance score, the relevance scores between multiple first object information and the first query question can be obtained.
[0045] Based on the relevance scores between multiple first object information pieces obtained through the above method and the first query question, target object information that meets the set advantage relevance conditions is further filtered from these first object information pieces. On the one hand, this retains target object information that is more relevant to the first query question; the stronger the relevance, the greater the likelihood of user selection, i.e., the more it conforms to user preferences. Based on this target object information, the pre-trained query encoding model of contrastive learning is fine-tuned. This ensures that the embedding representation of the query question output by the fine-tuned query encoding model, and the multiple object information pieces extracted from the object information database, are both semantically similar to the query question and conform to user preferences. Furthermore, fine-tuning the query encoding model based on the target object information encourages target object information with high relevance scores while avoiding pushing away first object information with low relevance scores. This does not disrupt the embedding space formed by the pre-trained query encoding model and object encoding model, effectively preventing geometric collapse of the embedding space during the fine-tuning process.
[0046] When determining target object information from multiple first object information that meets the set dominance relevance conditions, if the set dominance relevance conditions are unreasonable, the number of target object information determined from multiple first object information will be too small or too large. Too few target object information will not provide sufficient training samples for the fine-tuning of the subsequent query coding model. Conversely, too many target object information may introduce some first object information that is not highly relevant to the first query question, affecting the fine-tuning effect of the subsequent query coding model.
[0047] In an alternative embodiment, such as Figure 6 As shown, determining target object information whose relevance scores meet the set dominance relevance criteria from multiple sets of first object information specifically includes the following steps: 601. Determine the average score of the relevance scores corresponding to multiple first object information.
[0048] 602. Determine the degree to which the relevance scores of multiple first-object information exceed the average score.
[0049] 603. Based on the degree to which the relevance scores corresponding to multiple first object information exceed the average score, determine the first object information whose degree is greater than a set degree threshold from the multiple first object information as the target object information.
[0050] The average score of the relevance scores corresponding to multiple first object information can be either the mean of the relevance scores corresponding to multiple first object information or the median of the relevance scores corresponding to multiple first object information.
[0051] In some embodiments, determining the degree to which the relevance scores corresponding to multiple pieces of first object information exceed the average score can be achieved by normalizing the relevance scores corresponding to the multiple pieces of first object information to obtain a set of standardized scores that follow a standard normal distribution. The normalization process can be performed by calculating the mean and standard deviation of the relevance scores corresponding to the multiple pieces of first object information, and then performing a standardization transformation on the relevance score corresponding to each piece of first object information, i.e., subtracting the mean and dividing by the standard deviation, to obtain a set of standardized scores that follow a standard normal distribution. The expression for the standardized score corresponding to the i-th first object is: ,in, The standard score corresponding to the i-th first object. The relevance score is the score corresponding to the i-th first object. This is the mean of the relevance scores corresponding to multiple pieces of information about the first object. The standard deviation of the correlation scores corresponding to multiple first-object information is given.
[0052] Taking K pieces of first-object information as an example, after normalization, we obtain K standardized scores that follow a standard normal distribution. The mean of these K standardized scores is 0, and the variance is 1. Theoretically, K / 2 pieces of first-object information have standardized scores greater than 0, and the other K / 2 pieces have standardized scores less than 0. Based on the degree to which the relevance scores of the multiple pieces of first-object information exceed the average score, we determine the first-object information whose degree exceeds a set threshold as the target object information. This can be done by: determining the K / 2 pieces of first-object information with standardized scores greater than 0 as the target object information. In this case, the threshold is set as a standardized score greater than 0.
[0053] by Figure 5 For example, the positive advantage selection module 506 filters the standard scores A1 (+1.2) corresponding to the first first object information, A2 (-0.5) corresponding to the second first object information, and A3 (+0.4) corresponding to the third first object information. If A2 (-0.5) is less than 0, it is marked as a MASK. When fine-tuning the query encoding model, A2 (-0.5) and its corresponding first object information are ignored or masked. If A1 (+1.2) and A3 (+0.4) are greater than 0, they are marked as PULL, and their corresponding first object information is used as the target object information. Based on this target object information, the query encoding model is fine-tuned so that the first embedding representation output by the query encoding model is closer to the second embedding representation corresponding to the target object information.
[0054] In other embodiments, determining the degree to which the relevance scores corresponding to multiple pieces of first object information exceed the average score can be achieved by determining the difference between the relevance scores corresponding to the multiple pieces of first object information and the median, thereby obtaining the median deviation corresponding to the relevance scores corresponding to the multiple pieces of first object information. Correspondingly, determining the first object information whose degree of excess over the average score is greater than a set degree threshold as the target object information can be achieved by determining the first object information with a median deviation greater than 0 as the target object information, where the set degree threshold is a median deviation greater than 0.
[0055] By quantifying the degree to which the relevance scores of each first object information exceed the average score, we can accurately determine the target object information that is highly relevant to the first query question. This allows us to effectively avoid geometric collapse of the embedding space during the fine-tuning process when we subsequently fine-tune the query coding model based on this target object information.
[0056] As mentioned above, the query encoding model is fine-tuned based on the target object information so that the first embedding representation output by the fine-tuned query encoding model is closer to the second embedding representation corresponding to the target object information in the embedding space. In other words, the optimization objective of fine-tuning the query encoding model based on the target object information is to make the distance between the first embedding representation and the second embedding representation corresponding to the target object information closer in the embedding space. A closer distance between the first and second embedding representations indicates a higher similarity between them. Therefore, fine-tuning the query encoding model based on the target object information can be achieved by optimizing the model to have a higher similarity between the first embedding representation and the second embedding representation corresponding to the target object information.
[0057] Since the similarity between the first embedding representation and the second embedding representation corresponding to the target object information can range widely, directly using it as the optimization objective to fine-tune the query encoding model might lead to unstable gradients in the corresponding loss function. Therefore, it is necessary to normalize the similarity between the first embedding representation and the second embedding representation corresponding to the target object information. Specifically, the similarity is mapped to a probability distribution in the interval (0,1) with a sum of 1, yielding the sampling probability of the second embedding representation corresponding to the target object information. This sampling probability represents the likelihood of each piece of target object information being selected under the first query problem. Thus, the optimization objective for fine-tuning the query encoding model can be adjusted to: increasing the sampling probability of the second embedding representation corresponding to the target object information.
[0058] In an alternative embodiment, such as Figure 7 As shown, with the optimization objective of reducing the similarity between the first embedding representation and the second embedding representation corresponding to the target object information, the query encoding model is fine-tuned, specifically including the following steps: 701. Determine the similarity between the embedding representations corresponding to multiple object information and the first embedding representation, and determine the sampling probability of the second embedding representation corresponding to the target object information.
[0059] 702. To optimize the second embedded representation corresponding to the target object information by increasing the sampling probability, the query coding model is fine-tuned.
[0060] The sampling probability of the second embedding representation corresponding to the target object information refers to the probability value corresponding to the target object information after the similarity between the first embedding representation and the embedding representations of multiple object information is normalized into a probability distribution. This sampling probability is used to characterize the likelihood that the target object information is selected under the first query question. The higher the sampling probability of the second embedding representation corresponding to the target object information, the more semantically similar the target object information is to the first query question relative to other object information; that is, the higher the similarity between the first embedding representation and the second embedding representation corresponding to the target object information.
[0061] Therefore, when fine-tuning the query encoding model, the optimization objective of making the first embedding representation more similar to the second embedding representation corresponding to the target object information can be transformed into an optimization objective of making the sampling probability of the second embedding representation corresponding to the target object information higher.
[0062] In some embodiments, the expression for the sampling probability of the second embedded representation corresponding to the target object information is as follows: ; Where, d i Let be the target object information (the i-th object information), where i is the index of the target object information among multiple object information, and q is the first embedding representation corresponding to the first query question. To query the model parameters of the encoding model, The sampling probability of the second embedding representation corresponding to the target object information (the i-th object information). The similarity between the first embedded representation and the second embedded representation corresponding to the target object information is denoted as . Let be the similarity between the first embedding representation and the embedding representation corresponding to the j-th object information. Let be the temperature coefficient, exp be the exponential function, and K be the amount of object information.
[0063] Furthermore, in order to limit the difference between the fine-tuned query coding model and the unfine-tuned query coding model and prevent the fine-tuned query coding model from overfitting, it is also necessary to control the degree of deviation between the fine-tuned query coding model and the unfine-tuned query coding model during the fine-tuning process. That is, the optimization objective of fine-tuning the query coding model may include: making the sampling probability of the second embedding representation corresponding to the target object information higher, and controlling the degree of deviation between the fine-tuned query coding model and the unfine-tuned query coding model.
[0064] Based on the optimization objective of fine-tuning the query coding model described above, the fine-tuning process is as follows: Determine the first embedding representation q corresponding to the first query question using the query coding model; based on the similarity between q and different object information in the object information database, determine K first object information {d1, ..., d2} that satisfy the set similarity conditions. i ,…d K}. Determine the relevance scores between K pieces of first object information and the first query question, and normalize the relevance scores corresponding to the K pieces of first object information to obtain the standard scores {A1, ..., A2} corresponding to the K pieces of first object information. i ,…A K If A i If the value is greater than 0, then the corresponding first object information is taken as the target object information, and the sampling probability corresponding to the target object information is calculated. Assuming This refers to the query encoding model with frozen parameters after pre-training, i.e., the query encoding model before fine-tuning. For the dynamically optimized query encoding model during the fine-tuning process, i.e., the fine-tuned query encoding model, the sampling probability corresponding to the target object information is then determined. Higher, and control and The degree of deviation between them is the optimization objective, with the standard score A of the target object information as the optimization target. i To generate the reward signal, a target loss function value is constructed. Then, based on this target loss function value, backpropagation is performed to adjust the parameters of the query encoding model.
[0065] In some embodiments, the expression for the target loss function value of the query encoding model for fine-tuning training is as follows: ; in, The target loss function value, Let be the standard score of the i-th first object information. Let be the sampling probability of the second embedding representation corresponding to the i-th first object information.
[0066] For indicator functions, when When the indicator function is set to 1, the value of the function is 1. Participate in the calculation of the target loss function value; when The indicator function takes the value of 0. It does not participate in the calculation of the target loss function value. This means that when fine-tuning the query encoding model, it only makes the first embedding representation of the first query question more similar to the second embedding representation of the target object information with high relevance, while avoiding making the first embedding representation of the first query question less similar to the first object information with low relevance. That is, in the embedding space, for the first embedding representation q, it only brings the second embedding representation of the target object information with high relevance closer, while avoiding pushing away the first object information with low relevance. Thus, while locally optimizing the relevance between the first embedding representation and the second embedding representation of the target object information, it maintains the structure of the embedding space without destroying it.
[0067] Furthermore, in the target loss function value middle, As a reward signal, if The larger the value, the stronger the relevance. Therefore, in fine-tuning the query coding model, it is encouraged that the first embedding representation output by the query coding model is more closely related to... The second embedding representation of the corresponding target object information has a higher similarity.
[0068] This is the query encoding model with parameters frozen after pre-training, i.e., the query encoding model before fine-tuning; This represents the dynamically optimized query encoding model during the fine-tuning process, i.e., the fine-tuned query encoding model. KL represents the KL divergence. These are hyperparameters. The target loss function value. This is used to calculate the query encoding model before fine-tuning. With the fine-tuned query coding model The KL divergence between the two. The KL divergence is used to constrain the fine-tuned query encoding model. Do not deviate from the query coding model before fine-tuning. Too far away, to ensure that the query coding model retains the general semantic knowledge learned in the pre-training phase of the query coding model while adapting to the reward signal.
[0069] Based on the above objective loss function value, it can be seen that when the query coding model is fine-tuned, it only brings closer the target object information with strong relevance and does not push away the first object information with weak relevance. Moreover, through KL divergence constraint, it prevents the query coding model from undergoing drastic changes or overfitting during the fine-tuning process.
[0070] After the query encoding model is fine-tuned, i.e., the recall model is fine-tuned, the pre-trained ranking model is then fine-tuned based on the recall results output by the fine-tuned recall model. The fine-tuned ranking model provides a more accurate relevance score between the object information and the query question, which is then used for the next round of recall model fine-tuning (query encoding model fine-tuning).
[0071] In an alternative embodiment, such as Figure 8 As shown, the fine-tuning training method for the ranking model after fine-tuning the recall model specifically includes the following steps: 801. Based on the similarity between the second embedded representation and the embedded representations corresponding to different object information in the object information database, determine multiple pieces of second object information that meet the set similarity conditions.
[0072] 802. Take multiple second object information as positive samples corresponding to the second query question, sample multiple third object information from the object information database as negative samples corresponding to the second query question, and fine-tune the ranking model based on the positive and negative samples.
[0073] Here, the second embedding represents the fine-tuned query encoding model determined based on the second query question. Multiple second object information items represent the recall results output by the fine-tuned recall model.
[0074] The recall results output by the fine-tuned recall model are used as positive samples, and some object information is randomly sampled from the object information database as negative samples. These positive and negative samples are then used as training data to fine-tune the ranking model. Because the recall results output by the fine-tuned recall model are of higher quality (both semantically reasonable and consistent with user preferences), the ranking model trained on this data exhibits better performance and can output more accurate relevance scores for object information.
[0075] like Figure 9 As shown in the embodiments of this application, an information retrieval method is also provided, which specifically includes the following steps: 901. Obtain the query question to be searched.
[0076] 902. Determine the embedding representation corresponding to the query question to be retrieved using the fine-tuned query encoding model. The fine-tuned query encoding model is obtained by fine-tuning the pre-trained query encoding model based on the method described in the above embodiments. For relevant details, please refer to the above description; it will not be repeated here.
[0077] 903. Based on the similarity between the embedding representation corresponding to the query question and the embedding representations corresponding to different object information in the object information database, multiple candidate object information that meet the set similarity conditions are identified. The embedding representations of different object information are obtained by encoding different object information using a pre-trained object encoding model.
[0078] 904. Determine the recommended results corresponding to the query question from multiple candidate object information.
[0079] by Figure 5 For example, Figure 5The process of fine-tuning the query encoding model is illustrated. During information retrieval, specifically inference, only the query question to be retrieved needs to be input into the query encoding model 501 to determine its corresponding embedding representation. Then, the frozen object index module 502 determines multiple candidate object information that meets the set similarity criteria based on the similarity between the embedding representation of the query question and the embedding representations of different object information in the object information database. Finally, the ranking module 505 determines the recommended result corresponding to the query question from among the multiple candidate object information.
[0080] In one optional embodiment, determining the recommendation result corresponding to the query question from multiple candidate object information can be achieved through a ranking model. This can be done by: inputting the query question and multiple candidate object information into the ranking model to obtain the ranking result of the multiple candidate object information; and determining the recommendation result based on the ranking result of the multiple candidate object information.
[0081] In other optional embodiments, the recommended results corresponding to the query question to be retrieved can be determined from multiple candidate object information. Alternatively, the relevance score between the query question to be retrieved and multiple candidate object information can be directly calculated based on predefined matching rules. The predefined matching rules can be keyword hit rules, that is, the occurrence of terms related to the query question in the candidate object information, such as the number of hits or the hit rate. Based on this occurrence, the multiple candidate object information can be sorted to obtain the sorting result of the multiple candidate object information.
[0082] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 201 to 202 can be device A; or the execution subject of step 201 can be device A, and the execution subject of step 202 can be device B; and so on.
[0083] Furthermore, in some of the processes described in the above embodiments and accompanying drawings, multiple operations appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 201, 202, etc., are merely used to distinguish different operations and do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first" and "second" in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0084] like Figure 10 As shown, Figure 10The diagram shows a structural schematic of a training device for a recall model according to an embodiment of this application. The device can be implemented by software, hardware or a combination of both, and can be all or part of an electronic device. The device includes: a query encoding module 11, a recall result determination module 12, a relevance score determination module 13, a target object information determination module 14 and a fine-tuning training module 15.
[0085] The query encoding module 11 is used to determine the first embedding representation corresponding to the first query question through the query encoding model.
[0086] The recall result determination module 12 is used to determine multiple first object information that meet the set similarity conditions based on the similarity between the first embedded representation and the embedded representation corresponding to different object information in the object information database; wherein, the embedded representation of different object information is obtained by encoding different object information based on the object encoding model.
[0087] The relevance score determination module 13 is used to determine the relevance scores between multiple pieces of first object information and the first query question.
[0088] The target object information determination module 14 is used to determine the target object information whose relevance scores meet the set dominant relevance conditions from multiple first object information.
[0089] The fine-tuning training module 15 is used to fine-tune the query encoding model based on the target object information.
[0090] Figure 10 The device shown can perform the steps in the task processing method in the foregoing embodiments. For detailed execution process and technical effects, please refer to the description in the foregoing embodiments, which will not be repeated here.
[0091] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 11 As shown, in practice, this electronic device includes a memory 21 and a processor 22.
[0092] Memory 21 is used to store computer programs and can be configured to store various other data to support operation on the electronic device. Examples of this data include instructions for any application or method used to operate on the electronic device, data structures, contact data, phone book data, messages, pictures, videos, etc.
[0093] The processor 22, coupled to the memory 21, is used to execute the computer program in the memory 21 to implement the training method and information retrieval method of the recall model provided in the foregoing embodiments.
[0094] Furthermore, such as Figure 11As shown, the electronic device also includes other components such as a communication component 23, a display 24, a power supply component 25, and an audio component 26. Figure 11 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 11 The components shown are as follows. The electronic device in this embodiment can be a terminal device such as a desktop computer, laptop computer, smartphone, or IoT device, or a server device such as a conventional server, cloud server, or server array.
[0095] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0096] The aforementioned communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel.
[0097] The aforementioned display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen can be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.
[0098] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.
[0099] The aforementioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0100] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the steps in the above-described method embodiments. The computer-readable storage medium includes volatile or non-volatile components, or a combination thereof, and can be removable or non-removable. Examples of computer-readable storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random-access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), flash memory or other memory technologies, CD-ROM, Digital Video Disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium.
[0101] Accordingly, this application also provides a computer program product, which includes a computer program or instructions that, when executed by a processor, cause the processor to implement the steps in the above method embodiments. It should be understood that each step or combination of steps in the above method flow can be implemented by the computer program or instructions. Furthermore, these computer programs or instructions can be applied to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device, enabling the processor of the general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to function as an apparatus for implementing the corresponding functions in the above method embodiments.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A training method for a recall model, characterized in that, The recall model includes: a query encoding model and an object encoding model pre-trained through comparative learning; the method includes: The first embedding representation corresponding to the first query question is determined through the query encoding model; Based on the similarity between the first embedded representation and the embedded representations corresponding to different object information in the object information database, a plurality of first object information that meet the set similarity conditions are determined; wherein, the embedded representations of the different object information are obtained by encoding the different object information based on the object encoding model; Determine the relevance scores between the plurality of first object information and the first query question; From the plurality of first object information, determine the target object information whose relevance score satisfies the set advantage relevance condition; The query encoding model is fine-tuned and trained based on the target object information.
2. The method according to claim 1, characterized in that, The step of fine-tuning the query encoding model based on the target object information includes: The query encoding model is fine-tuned with the optimization objective of increasing the similarity between the first embedding representation and the second embedding representation corresponding to the target object information.
3. The method according to claim 2, characterized in that, The optimization objective is to increase the similarity between the first embedded representation and the second embedded representation corresponding to the target object information. Fine-tuning the query encoding model includes: Determine the similarity between the embedding representations corresponding to the multiple object information and the first embedding representation, and determine the sampling probability of the second embedding representation corresponding to the target object information; The query encoding model is fine-tuned with the optimization objective of increasing the sampling probability of the second embedded representation corresponding to the target object information.
4. The method according to claim 2, characterized in that, The optimization objective also includes controlling the degree of deviation between the fine-tuned query coding model and the un-fine-tuned query coding model.
5. The method according to any one of claims 1-4, characterized in that, Determining the relevance scores between the plurality of first object information and the first query question includes: The first query question and the plurality of first object information are input into a ranking model to determine the relevance scores between the plurality of first object information and the first query question, respectively, through the ranking model.
6. The method according to any one of claims 1-4, characterized in that, The step of determining the target object information from the plurality of first object information that the relevance score satisfies the set dominance relevance condition includes: Determine the average score of the relevance scores corresponding to the plurality of first object information; Determine the extent to which the relevance scores corresponding to the plurality of first object information exceed the average score; Based on the degree to which the relevance scores corresponding to the plurality of first object information exceed the average score, the first object information whose degree is greater than a set degree threshold is determined from the plurality of first object information as the target object information.
7. The method according to claim 5, characterized in that, The method further includes: The second embedding representation corresponding to the second query question is determined by the fine-tuned query coding model; Based on the similarity between the second embedding representation and the embedding representations corresponding to different object information in the object information database, a plurality of second object information that meet the set similarity conditions are determined; The multiple second object information is used as positive samples corresponding to the second query question, and multiple third object information is sampled from the object information database as negative samples corresponding to the second query question. The ranking model is then fine-tuned and trained based on the positive samples and the negative samples.
8. An information retrieval method, characterized in that, include: Get the query question to be searched; The embedded representation corresponding to the query question to be retrieved is determined by the fine-tuned query coding model, wherein the fine-tuned query coding model is obtained by fine-tuning the pre-trained query coding model based on the method of any one of claims 1-7; Based on the similarity between the embedding representation corresponding to the query question to be retrieved and the embedding representations corresponding to different object information in the object information database, multiple candidate object information that meet the set similarity conditions are determined; wherein, the embedding representations of different object information are obtained by encoding different object information based on a pre-trained object encoding model; The recommended results corresponding to the query question to be retrieved are determined from the information of the multiple candidate objects.
9. The method according to claim 8, characterized in that, The step of determining the recommended result corresponding to the query question from the plurality of candidate object information includes: The query question to be retrieved and the information of the multiple candidate objects are input into the ranking model to obtain the ranking result of the information of the multiple candidate objects; The recommendation result is determined based on the ranking of the multiple candidate object information.
10. An electronic device, characterized in that, include: Memory and processor; The memory is used to store one or more computer instructions; The processor is configured to execute one or more computer instructions for performing the steps of the method according to any one of claims 1-9.
11. A computer-readable storage medium storing a computer program, characterized in that, When a computer program is executed by a processor, it is able to perform the steps of the method described in any one of claims 1-9.
12. A computer program product, characterized in that, include: A computer program / instruction that, when executed by a processor, enables the implementation of the steps in the method described in any one of claims 1-9.