A model training method, data recall method, device, medium and equipment

By forming sample groups containing feature data, positive sample data, and negative sample data of different types, the data recall model is trained, which solves the problems of high training difficulty and insufficient generalization ability, and improves the training accuracy and sample utilization of the model.

CN116306976BActive Publication Date: 2026-08-25DOUYIN VISION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310270231.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-16
Publication Date
2026-08-25
Estimated Expiration
2043-03-16

AI Technical Summary

Technical Problem

Existing data retrieval models suffer from problems such as high training difficulty, poor sample utilization efficiency, and insufficient generalization ability during the training process.

Method used

By acquiring the feature data of the sample objects and the positive and negative sample datasets, a sample group containing the first and second negative sample data is formed. The distance between the feature vectors is used to generate a loss function to adjust the parameters of the data recall model. The second negative sample data is introduced to avoid the loss from approaching zero during model training.

Benefits of technology

It improves the training accuracy and generalization ability of the data recall model, increases sample utilization, and avoids situations where the model cannot be further optimized during training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116306976B_ABST
    Figure CN116306976B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a model training method, a data recall method, an apparatus, a medium and equipment, wherein the training method comprises: obtaining feature data of a sample object and positive sample data set and negative sample data set corresponding to the sample object, forming a sample group based on the feature data of the sample object, any positive sample data, any second negative sample data and the first negative sample data; training a data recall model based on a plurality of sample groups of any sample object; in the training process, generating a loss function based on the distance between the feature vectors corresponding to the data in the sample group output by the data recall model in the training process, and adjusting the parameters of the data recall model in the training process based on the loss function. By introducing the second negative sample data, the model training degree is deepened, and the training precision of the model and the model generalization ability are provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to deep learning technology, and more particularly to a model training method, a data retrieval method, an apparatus, a medium, and a device. Background Technology

[0002] With the continuous development of applications, pushing high-precision data to clients through applications has become a research direction.

[0003] In massive datasets, targeted data retrieval can be achieved through data retrieval models. However, current training methods for data retrieval models face challenges such as high training difficulty and poor sample utilization efficiency. Summary of the Invention

[0004] This disclosure provides a model training method, a data retrieval method, an apparatus, a medium, and a device to achieve training and obtaining a high-precision data retrieval model.

[0005] In a first aspect, embodiments of this disclosure provide a method for training a data retrieval model, comprising:

[0006] Obtain feature data of a sample object and a positive sample dataset and a negative sample dataset corresponding to the sample object, wherein the negative sample dataset includes a first negative sample dataset and a second negative sample dataset, and the distance between the first negative sample dataset and the feature data of the sample object is less than the distance between the second negative sample dataset and the feature data of the sample object;

[0007] A sample group is formed based on the feature data of the sample object, any of the positive sample data, any of the second negative sample data, and the first negative sample data;

[0008] A data recall model is trained based on multiple sample groups of any of the sample objects: During the training process, a loss function is generated based on the feature vectors corresponding to the data in the sample groups output by the data recall model during the training process, based on the distance between each feature vector, and the parameters of the data recall model during the training process are adjusted based on the loss function.

[0009] Secondly, this disclosure also provides a data retrieval method, including:

[0010] The feature data and candidate data of the target object are obtained, and the feature data and candidate data are input into a pre-trained data retrieval model to obtain the object feature vector corresponding to the feature data and the data feature vector corresponding to the candidate data.

[0011] The distance between the data feature vector of each candidate data and the object feature vector is determined, and the target data corresponding to the target object is determined from the candidate data based on the distance.

[0012] Thirdly, embodiments of this disclosure also provide a training apparatus for a data retrieval model, comprising:

[0013] The data acquisition module is used to acquire feature data of a sample object and positive sample dataset and negative sample dataset corresponding to the sample object. The negative sample dataset includes first negative sample data and second negative sample data. The distance between the first negative sample data and the feature data of the sample object is less than the distance between the second negative sample data and the feature data of the sample object.

[0014] The sample group sampling module is used to form a sample group based on the feature data of the sample object, any of the positive sample data, any of the second negative sample data, and the first negative sample data.

[0015] The model training module is used to train a data recall model based on multiple sample groups of any of the sample objects. During the training process, based on the feature vectors corresponding to the data in the sample groups output by the data recall model during the training process, a loss function is generated based on the distance between each feature vector, and the parameters of the data recall model during the training process are adjusted based on the loss function.

[0016] Fourthly, embodiments of this disclosure also provide a data retrieval device, comprising:

[0017] The data processing module is used to acquire feature data and candidate data of the target object, input the feature data and candidate data into a pre-trained data retrieval model, and obtain the object feature vector corresponding to the feature data and the data feature vector corresponding to the candidate data.

[0018] The target data determination module is used to determine the distance between the data feature vector of each candidate data and the object feature vector, and to determine the target data corresponding to the target object in the candidate data based on the distance.

[0019] Fifthly, embodiments of this disclosure also provide an electronic device, characterized in that the electronic device comprises:

[0020] One or more processors;

[0021] Storage device for storing one or more programs.

[0022] When the one or more programs are executed by the one or more processors, the one or more processors implement the training method of the data retrieval model as provided in any embodiment and / or the data retrieval method as provided in any embodiment.

[0023] Sixthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a training method for a data retrieval model as provided in any embodiment and / or a data retrieval method as provided in any embodiment.

[0024] The technical solution provided in this disclosure, by sampling the sample object to form a sample group containing the feature data of the sample object, positive sample data, second negative sample data, and first negative sample data, and training the data recall model with the above sample group, can avoid the situation where the model cannot continue to optimize due to the identification of positive and negative samples during the model training process. Introducing the second negative sample data can avoid the situation where the loss tends to zero during the model training process, which leads to the inability to continue to optimize. This deepens the model training degree, improves the sample utilization rate, and further improves the training accuracy and generalization ability of the model. Attached Figure Description

[0025] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0026] Figure 1 This is a flowchart illustrating a training method for a data retrieval model provided in an embodiment of the present disclosure.

[0027] Figure 2 A schematic diagram illustrating a data display provided in an embodiment of this disclosure;

[0028] Figure 3 A schematic diagram illustrating the distance between the data retrieval model provided in this embodiment and the sample data before and after training;

[0029] Figure 4 This is a flowchart of a training method for a media data retrieval model;

[0030] Figure 5 This is a schematic flowchart of a data retrieval method provided in an embodiment of this disclosure;

[0031] Figure 6 A schematic diagram of the structure of a training device for a data retrieval model provided in an embodiment of this disclosure;

[0032] Figure 7This is a schematic diagram of the structure of a data retrieval device provided in a disclosed embodiment;

[0033] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0034] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0035] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0036] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0037] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0038] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0039] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0040] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0041] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0042] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0043] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0044] It is understood 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 related provisions.

[0045] In this embodiment of the disclosure, the data recall model can be the Viking model. It is understood that the data recall model can also be other types of models, and the structure of the data recall model is not limited here.

[0046] Regarding the training process of the data retrieval model, corresponding sample data can be obtained according to the business scenario to train a data retrieval model suitable for the aforementioned business scenario. Taking the media data retrieval scenario as an example, a media data retrieval model is trained by obtaining sample media data. The media data here includes, but is not limited to, videos, images, audio, and text.

[0047] Currently, the training process for data recall models typically involves dividing sample data into positive and negative samples for model training, resulting in a binary classification data recall model. This training method has low utilization of sample data and the generalization ability of the trained data recall model is poor. To address these technical problems, this disclosure provides a training method for a data recall model, see [link to relevant documentation]. Figure 1 , Figure 1This is a flowchart illustrating a training method for a data retrieval model provided in an embodiment of the present disclosure. The embodiments of the present disclosure are applicable to the training of a data retrieval model. The method can be executed by a training device for the data retrieval model, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, such as a mobile terminal, a PC, or a server.

[0048] like Figure 1 As shown, the method includes:

[0049] S110. Obtain the feature data of the sample object and the positive sample dataset and negative sample dataset corresponding to the sample object, wherein the negative sample dataset includes first negative sample data and second negative sample data, and the distance between the first negative sample data and the feature data of the sample object is less than the distance between the second negative sample data and the feature data of the sample object.

[0050] S120. A sample group is formed based on the feature data of the sample object, any of the positive sample data, any of the second negative sample data, and the first negative sample data.

[0051] S130. A data recall model is trained based on multiple sample groups of any of the sample objects: During the training process, a loss function is generated based on the feature vectors corresponding to the data in the sample groups output by the data recall model during the training process, based on the distance between each feature vector, and the parameters of the data recall model during the training process are adjusted based on the loss function.

[0052] In this embodiment, the sample object is the object from which sample data is acquired. The sample object can be determined based on the business scenario of data retrieval. For example, in a scenario where data retrieval is performed at the user level, the sample object can be the user displaying the data; similarly, in a scenario where data retrieval is performed at the client level, the sample object can be the client displaying the data. The feature data of the sample object may include, but is not limited to, the basic feature information of the sample object and the sample object's interest points in the data. Taking the user as an example, the feature data may include basic user information and the user's interest points in the data; taking the client as an example, the feature information may include the client's basic device information and the client's interest points during data display and user interaction.

[0053] It should be noted that the feature data and sample data of the sample objects can be obtained with the authorization of the sample objects. At the same time, the feature data and sample data of the sample objects are used to train the data retrieval model and will be deleted after training to avoid data leakage.

[0054] Each sample object's sample data can include positive and negative sample data. The positive and negative sample data from multiple sample objects can be combined to form a sample dataset. Taking P sample objects as an example, each sample object yields K sample data points, including K / 2 negative and K / 2 positive sample data points. Combining the sample data from P sample objects into a sample dataset results in a sample dataset containing PK sample data points.

[0055] In the process of acquiring sample data, the usage of data by the sample object includes both use and non-use. Used data can be sampled as positive sample data, and unused data can be sampled as negative sample data. The way the data is used can vary depending on the business scenario. Taking media data as an example, the use of media data includes displaying the media data through clicks or other methods. Optionally, the sample object is the user displaying the media data. Positive sample data obtained based on the sample object consists of media data displayed to the user and clicked, while negative sample data obtained based on the sample object consists of media data displayed to the user that was not clicked. It is understood that displaying media data to the user can be done by showing descriptive information of the media data or by displaying it in the form of images, etc. See also... Figure 2 , Figure 2 This is a schematic diagram illustrating a data display provided in an embodiment of this disclosure. Figure 2 The system displays trending news items, videos, and other media data in an image list format. Figure 2 When the displayed data is clicked, the user is redirected to the media data display details page. Figure 2 Media data B, if displayed and clicked, can be sampled as positive sample data; media data A, if displayed but not clicked, can be sampled as negative sample data.

[0056] It is understandable that, for the current sample object, both positive and negative sample data obtained from other objects are considered negative sample data for the current sample object. To improve the efficiency of sample data utilization, a positive sample dataset and a negative sample dataset are determined for each sample object in the aforementioned sample dataset. The positive sample dataset for a sample object consists of positive sample data obtained from the sample object, and the negative sample dataset for a sample object includes negative sample data obtained from the sample object, as well as positive and negative sample data from other sample objects. For a sample dataset containing PK sample data, for any sample object, the positive sample dataset includes K / 2 positive sample data, and the negative sample dataset includes K(2P-1) / 2 negative sample data.

[0057] To avoid the data recall model resembling a binary classification model due to the sole use of positive and negative sample data, this embodiment employs a sample group format. Each sample group includes feature data of the sample object, one positive sample, a first negative sample, and a second negative sample. The first and second negative sample data belong to the same negative sample dataset corresponding to the sample object and do not overlap. The distance between the first negative sample and the feature data of the sample object is less than the distance between the second negative sample and the feature data of the sample object.

[0058] The method for determining the first negative sample data and the second negative sample data can be as follows: Determine the distance between each negative sample data in the negative sample dataset and the feature data of the sample object, and sort the negative sample data according to the distances; determine the first negative sample data based on the quantity condition of the first negative sample data and the sorting of the negative sample data, and determine the other negative sample data besides the first negative sample data as the second negative sample data. Here, the quantity condition of the first negative sample data can be one or more.

[0059] Optionally, the negative sample dataset may include multiple first negative sample data and multiple second negative sample data, wherein the distance between any first negative sample data and the feature data of the sample object is less than the distance between any second negative sample data and the feature data of the sample object. Specifically, in the negative sample dataset corresponding to the sample object, the distance between each negative sample data and the feature data of the sample object can be determined separately, and the negative sample data can be sorted based on the distance. The quantity condition of the first negative sample data includes the quantity or proportion of the first negative sample data. Accordingly, based on the quantity or proportion of the first negative sample data, the first negative sample data is determined from the sorted negative sample data, and the other negative sample data are determined as second negative sample data.

[0060] Optionally, the negative sample dataset may include one first negative sample and multiple second negative samples, where the number of first negative samples is one. This first negative sample is the one with the highest similarity to the feature data of the sample object. Specifically, in the negative sample dataset corresponding to the sample object, the distance between each negative sample and the feature data of the sample object is determined. The distances of each negative sample are compared, and the negative sample with the smallest distance is determined as the first negative sample. Correspondingly, the second negative samples are all the other negative samples in the negative sample dataset corresponding to the sample object, excluding the first negative sample.

[0061] During the training of a data retrieval model, the distance between the feature data of a sample object and positive sample data is continuously reduced, while the distance between the feature data of a sample object and negative sample data is continuously increased. When the distance between the feature data of a sample object and positive sample data becomes less than the distance between the feature data of a sample object and negative sample data, the loss in the model training process approaches zero, and further optimization of the data retrieval model is impossible. By introducing a first negative sample, when the distance between the feature data of a sample object and positive sample data is less than the distance between the feature data of a sample object and negative sample data, the distance between the feature data of a sample object and positive sample data can be further reduced, thereby further optimizing the data retrieval model and improving its recall accuracy. For example, see [link to example]. Figure 3 , Figure 3 This is a diagram illustrating the distance between the data retrieval model and the sample data before and after training.

[0062] Accordingly, after obtaining the feature data of the sample object and the positive sample dataset and negative sample dataset corresponding to the sample object, the distance between each negative sample data in the negative sample dataset and the feature data of the sample object is determined respectively. The negative sample data with the smallest distance is determined as the first negative sample data, and the other negative sample data besides the first negative sample data are determined as the second negative sample data.

[0063] The feature data and negative sample data of the sample object are converted into feature vectors. Here, the feature vectors can be embedding vectors. By representing the corresponding data through embedding vectors, feature information can be mined from a higher dimension. For example, feature transformation models can be used to process the feature data and negative sample data to obtain feature vectors; alternatively, Word2vec can also be used to process the feature data and negative sample data to obtain feature vectors.

[0064] Traverse any negative sample data and calculate the distance between the feature vector of the negative sample data and the feature vector of the feature data. The distance calculation method includes, but is not limited to, Euclidean distance, etc. The distance calculation method can be selected according to the calculation requirements.

[0065] The similarity between negative sample data and feature data is represented by distance. The smaller the distance, the higher the similarity between negative sample data and feature data. Negative sample data is classified into first negative sample data and second negative sample data according to the distance, so as to identify negative sample data (i.e., first negative sample data) that is highly similar to feature data and other negative sample data (i.e., second negative sample data).

[0066] Sampling is performed on the positive sample dataset to obtain one positive sample data. Sampling is performed on multiple second negative sample datasets to obtain one second negative sample data. Sampling is performed on one or more first negative sample datasets to obtain one first negative sample data. A sample group can be formed based on the feature data of the sample object and the above-mentioned positive, second, and first negative sample data. For the same sample object, multiple sample groups can be obtained through the above sampling method. Optionally, the positive, first, and second negative sample data can be obtained by random sampling; alternatively, the positive, first, and second negative sample data can be obtained according to a preset sampling rule, wherein the sampling rule includes sampling weights for the positive and second negative sample data. When the number of first negative sample data is 1, there is no need to sample the first negative sample data. The first negative sample data and the feature data of the sample object, along with the sampled positive and second negative sample data, can form a sample group.

[0067] Optionally, forming a sample group based on the feature data of the sample object, any of the positive sample data, any of the second negative sample data, and the first negative sample data includes: determining the sampling weight of the positive sample data based on the distance between the positive sample data and the feature data of the sample object, and determining the sampling weight of the second negative sample data based on the distance between the second negative sample data and the feature data of the sample object; sampling in the positive sample dataset to obtain a positive sample data, wherein the sampling probability of each positive sample is positively correlated with the sampling weight of the positive sample data; sampling in multiple second negative sample data to obtain a second negative sample data, wherein the sampling probability of the second negative sample data is negatively correlated with the sampling weight of the second negative sample data. Similarly, when there are multiple first negative sample data, the sampling probability of the first negative sample data is negatively correlated with the weight of the first negative sample data, and the weight of the first negative sample data can be determined based on the distance between the first negative sample data and the feature data of the sample object.

[0068] Here, the weight of the positive sample data is determined based on the distance between the positive sample data and the feature data of the sample object. Optionally, the weight of the positive sample data is positively correlated with the corresponding distance. Similarly, the sampling weight of the second negative sample data is determined based on the distance between the second negative sample data and the feature data of the sample object. Optionally, the weight of the second negative sample data is positively correlated with the corresponding distance. In some embodiments, the distance between the positive sample data and the feature data of the sample object can be determined as the weight of the positive sample data, and the distance between the second negative sample data and the feature data of the sample object can be determined as the sampling weight of the second negative sample data.

[0069] The weight of a positive sample determines its sampling probability, and the weight of a positive sample is positively correlated with its sampling probability. Similarly, the weight of the second negative sample determines its sampling probability, and the weight of the second negative sample is negatively correlated with its sampling probability. Therefore, the distance between a positive sample and the feature data of the sample object is positively correlated with the sampling probability of the positive sample, while the distance between the second negative sample and the feature data of the sample object is negatively correlated with its sampling probability.

[0070] Positive sample data is obtained by sampling based on the sampling probability of each positive sample data in the positive sample dataset; and second negative sample data is obtained by sampling based on the sampling probability of each second negative sample data in multiple second negative sample datasets. This further yields multiple sample groups corresponding to the sample objects.

[0071] For example, the positive sample data, the first negative sample data, and the second negative sample data of the sample group are obtained by sampling in the following manner:

[0072] First negative sample data: high_similar_item = argmin x∈N(a) D ax

[0073] Positive sample data: positive_item = multinormial x∈P(a) {D ax}

[0074] Second negative sample data:

[0075] Where N(a) is the negative sample dataset corresponding to the sample object, P(a) is the positive sample dataset corresponding to the sample object, and D ax The distance between the sample data and the feature data is represented by , and multinormial represents the weighted sampling function, which prioritizes sampling the sample data with larger weights.

[0076] An initial data recall model is created, including model parameters to be optimized. This initial model is then trained on multiple sample groups corresponding to multiple sample objects, iteratively updating its parameters to obtain a trained data recall model. During each training iteration, a loss function is generated to adjust the model parameters.

[0077] Optionally, based on the feature vectors corresponding to the data in the sample groups output by the data retrieval model during the training process, and generating a loss function based on the distance between each feature vector, the method includes: inputting multiple sample groups into the data retrieval model during the training process to obtain feature vectors corresponding to each sample group, wherein the feature vector corresponding to any sample group includes a first feature vector corresponding to the feature data, a second feature vector corresponding to the positive sample data, a third feature vector corresponding to the second negative sample data, and a fourth feature vector corresponding to the first negative sample data; determining one or more loss terms based on the distances between the second feature vector, the third feature vector, and the fourth feature vector in each sample group and the first feature vector, and forming a loss function based on the one or more loss terms.

[0078] For each sample group, calculate the first distance between the second feature vector and the first feature vector, the second distance between the third feature vector and the first feature vector, and the third distance between the fourth feature vector and the first feature vector. Generate at least one loss term based on the first, second, and third distances for each sample group. Integrate these at least one loss term to obtain the loss function. For example, the loss function can be obtained by weighting the at least one loss term.

[0079] Optionally, the loss term includes one or more of the following: a first loss term determined based on a first distance between the second feature vector and the first feature vector, and a second distance between the third feature vector and the first feature vector; a second loss term determined based on a first distance between the second feature vector and the first feature vector, and a third distance between the fourth feature vector and the first feature vector; and a second loss term determined based on a second distance between the third feature vector and the first feature vector, and a third distance between the fourth feature vector and the first feature vector.

[0080] For example, the first distance, the second distance, and the third distance can be represented as D respectively. ap D an and D ah Taking the generation of the first loss term based on the first and second distances as an example, the difference between the first and second distances can be determined. The loss component corresponding to a sample group is determined based on the sum of this difference and a preset constant term. The sum of the loss components corresponding to each sample group is then used to determine the first loss term. The preset constant term characterizes the degree to which the second feature vector is much smaller than the first feature vector. Similarly, the generation principles for the second and third loss terms are the same.

[0081] In some embodiments, the loss function may be of the following form:

[0082]

[0083] Where θ is the model parameter in the data recall model, N is the number of sample groups, and w pn w ph w hn These are the weights of the first, second, and third loss terms, respectively. pn m ph and m hn They are respectively measures D ap and D an D ap and D ah D an and D ah The difference is much smaller than the degree.

[0084] In each iteration, the model parameters of the data recall function are adjusted using the loss function described above, so that the iterated data recall model can make the feature data of the sample objects approach the positive sample data and move away from the negative sample data.

[0085] The technical solution of this disclosure embodiment, by sampling the sample object to form a sample group containing the feature data of the sample object, positive sample data, second negative sample data and first negative sample data, and training the data recall model with the above sample group, can avoid the situation where the model cannot continue to optimize due to the identification of positive and negative samples during the model training process. Introducing the second negative sample data can avoid the situation where the loss tends to zero during the model training process, which leads to the inability to continue optimization. This deepens the model training degree, improves the sample utilization rate, and further improves the training accuracy and generalization ability of the model.

[0086] Based on the above embodiments, this disclosure provides a preferred example of a training method for a media data retrieval model, see [link to example]. Figure 4 , Figure 4 This is a flowchart of a training method for a media data retrieval model.

[0087] In each training iteration, P display users (i.e., sample objects) are randomly selected. For each display user, K media data are randomly sampled, including K / 2 media data that were clicked by that display user (i.e., positive sample data) and K / 2 media data that were shown to that display user but not clicked by that user (i.e., negative sample data). A sample dataset (training batch) is formed with P display users and PK samples. There are P ways to select display users in the sample dataset. After selecting display users, there are K / 2 ways to select positive sample data, denoted as P(a), and K(2P-1) / 2 ways to select negative sample data, denoted as N(a).

[0088] When sampling the sample group, each user in the sample dataset is taken as a sample object. For each sample object, the distances between the embedding vector of the sample data in P(a) and the embedding vector of the sample data in N(a) and the feature data embedding vector of the sample object are calculated respectively. These distances are used as weights, and positive and negative sample data in the sample group are obtained by resampling according to the weights. When sampling positive sample data, the media data with larger weights has a higher probability of being sampled. When sampling negative sample data, the media data with smaller weights has a higher probability of being sampled. In addition, the media data with the smallest distance between the embedding vector of N(a) and the feature data embedding vector of the sample object is selected as the highly similar negative sample data (i.e., the first negative sample data). The highly similar negative sample data and the aforementioned sampled negative sample data are attached to the same data.

[0089] The media data retrieval model is trained by using multiple sample groups corresponding to each sample object. In each iteration, the model parameters are adjusted using the following loss function until a well-trained media data retrieval model is obtained.

[0090]

[0091] In the training process described above, the Adam optimizer can be used, with optimizer parameters set to alpha = 5e-2, beta = 1.0, weight_decay = 1e-3, and the number of iterations (Epochs) can be 2000. In the example above, the number of users can be 16, and the amount of media data (K) can be 32. In the loss function, w... pn w ph w hn The values ​​can be 1, 1, or 0.5 respectively. m pn m ph and m hn The values ​​can be 0.4, 0.4, and 0.2 respectively.

[0092] Figure 5 This is a flowchart illustrating a data retrieval method provided in an embodiment of this disclosure. The method specifically includes:

[0093] S210. Obtain feature data and candidate data of the target object, input the feature data and candidate data into a pre-trained data retrieval model, and obtain the object feature vector corresponding to the feature data and the data feature vector corresponding to the candidate data;

[0094] S220. Determine the distance between the data feature vector of each candidate data and the object feature vector, and determine the target data corresponding to the target object in the candidate data based on the distance.

[0095] In some embodiments, the target object can be the object that sends the media data request, which can be obtained through media data request parsing. The target object can be a logged-in user on the client sending the request. Candidate data can be alternative media data that the application can provide to the user, including but not limited to videos, images, and text. For example, media data can be news articles.

[0096] The media data request may also include the feature data of the target object. The feature data of the target object may be the feature data formed by the target object within a preset historical time period, including but not limited to the basic information of the target object and the information of interest in the media data.

[0097] A pre-trained data retrieval model processes the feature data of the target object, and performs targeted data retrieval based on the target object. Specifically, the data retrieval model obtains the feature data of the target object and the feature vectors of each candidate data. Based on the distance between the feature vectors of the candidate data and the feature vector of the target object, the media data to be recalled is determined. For example, the candidate data can be ranked based on the distance between the feature vectors of the candidate data and the feature vector of the target object, and the media data to be recalled can be determined based on the ranking and the number of recalls.

[0098] Based on the above embodiments, the recalled media data, i.e. target data, can be further sorted for streaming, and data can be pushed to the target object according to the streaming sort.

[0099] Figure 6 This is a schematic diagram of the structure of a training device for a data retrieval model provided in an embodiment of the present disclosure. The device includes: a data acquisition module 310, a sample group sampling module 320, and a model training module 330.

[0100] The data acquisition module 310 is used to acquire feature data of a sample object and a positive sample dataset and a negative sample dataset corresponding to the sample object. The negative sample dataset includes a first negative sample dataset and a second negative sample dataset. The distance between the first negative sample dataset and the feature data of the sample object is less than the distance between the second negative sample dataset and the feature data of the sample object.

[0101] The sample group sampling module 320 is used to form a sample group based on the feature data of the sample object, any of the positive sample data, any of the second negative sample data, and the first negative sample data.

[0102] The model training module 330 is used to train a data recall model based on multiple sample groups of any of the sample objects: during the training process, based on the feature vectors corresponding to the data in the sample groups output by the data recall model during the training process, a loss function is generated based on the distance between each feature vector, and the parameters of the data recall model during the training process are adjusted based on the loss function.

[0103] The technical solution provided in this disclosure, by sampling the sample object to form a sample group containing the feature data of the sample object, positive sample data, second negative sample data, and first negative sample data, and training the data recall model with the above sample group, can avoid the situation where the model cannot continue to optimize due to the identification of positive and negative samples during the model training process. Introducing the second negative sample data can avoid the situation where the loss tends to zero during the model training process, which leads to the inability to continue to optimize. This deepens the model training degree, improves the sample utilization rate, and further improves the training accuracy and generalization ability of the model.

[0104] Based on the above embodiments, optionally, the negative sample dataset corresponding to the sample object includes negative sample data obtained based on the sample object, as well as positive sample data and negative sample data of other sample objects.

[0105] Optionally, the sample object is the user who displays the media data, the positive sample data is the media data that is displayed to the user and clicked, and the negative sample data obtained based on the sample object is the media data that is displayed to the user but not clicked.

[0106] Optionally, based on the above embodiments, the device further includes:

[0107] The negative sample data processing module is used to determine the distance between each negative sample data in the negative sample dataset and the feature data of the sample object, determine the negative sample data with the smallest distance as the first negative sample data, and determine the other negative sample data besides the first negative sample data as the second negative sample data.

[0108] Based on the above embodiments, optionally, the sample group sampling module 320 is used for:

[0109] The sampling weight of the positive sample data is determined based on the distance between the positive sample data and the feature data of the sample object, and the sampling weight of the second negative sample data is determined based on the distance between the second negative sample data and the feature data of the sample object;

[0110] Sampling is performed on the positive sample dataset to obtain a positive sample data, wherein the sampling probability of each positive sample is positively correlated with the sampling weight of the positive sample data;

[0111] Sampling is performed on multiple second negative sample data to obtain a second negative sample data, wherein the sampling probability of the second negative sample data is negatively correlated with the sampling weight of the second negative sample data.

[0112] Based on the above embodiments, optionally, the model training module 330 is used for:

[0113] Multiple sample groups are input into the data retrieval model during the training process to obtain feature vectors corresponding to each sample group. The feature vector corresponding to any sample group includes a first feature vector corresponding to the feature data, a second feature vector corresponding to the positive sample data, a third feature vector corresponding to the second negative sample data, and a fourth feature vector corresponding to the first negative sample data.

[0114] Based on the distances between the second feature vector, the third feature vector, and the fourth feature vector in each of the sample groups and the first feature vector, one or more loss terms are determined, and a loss function is formed based on the one or more loss terms.

[0115] Optionally, the loss term includes one or more of the following: a first loss term determined based on a first distance between the second feature vector and the first feature vector, and a second distance between the third feature vector and the first feature vector;

[0116] The second loss term is determined based on the first distance between the second feature vector and the first feature vector, and the third distance between the fourth feature vector and the first feature vector;

[0117] The second loss term is determined based on the second distance between the third feature vector and the first feature vector, and the third distance between the fourth feature vector and the first feature vector.

[0118] The training apparatus for the data recall model provided in this disclosure can execute the training method for the data recall model provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0119] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.

[0120] Figure 7 This is a schematic diagram of a data retrieval device provided in a disclosed embodiment. The device includes:

[0121] Data processing module 410 is used to acquire feature data and candidate data of target object, input the feature data and candidate data into a pre-trained data retrieval model, and obtain object feature vector corresponding to the feature data and data feature vector corresponding to the candidate data;

[0122] The target data determination module 420 is used to determine the distance between the data feature vector of each candidate data and the object feature vector, and to determine the target data corresponding to the target object in the candidate data based on the distance.

[0123] The data retrieval device provided in this disclosure can execute the data retrieval method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the method execution.

[0124] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.

[0125] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Reference is made below. Figure 8 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 8 The diagram below shows the structure of the terminal device or server 500. The terminal device in this embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0126] like Figure 8 As shown, electronic device 500 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. An edit / output (I / O) interface 505 is also connected to bus 504.

[0127] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0128] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.

[0129] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0130] The electronic device provided in this embodiment and the training method of the data retrieval model provided in the above embodiments, and / or the data retrieval method belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0131] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the training method for the data retrieval model and / or the data retrieval method provided in the above embodiments.

[0132] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0133] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0134] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0135] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:

[0136] The aforementioned computer-readable medium carries one or more programs. When the aforementioned one or more programs are executed by the electronic device, the electronic device causes the following: to acquire feature data of a sample object and a positive sample dataset and a negative sample dataset corresponding to the sample object, wherein the negative sample dataset includes first negative sample data and second negative sample data, and the distance between the first negative sample data and the feature data of the sample object is less than the distance between the second negative sample data and the feature data of the sample object; to form a sample group based on the feature data of the sample object, any of the positive sample data, any of the second negative sample data, and the first negative sample data; to train a data retrieval model based on multiple sample groups of any sample object; during the training process, based on the feature vectors corresponding to the data in the sample group output by the data retrieval model during the training process, to generate a loss function based on the distance between each feature vector, and to adjust the parameters of the data retrieval model during the training process based on the loss function.

[0137] Alternatively, the aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: acquire feature data and candidate data of a target object; input the feature data and candidate data into a pre-trained data retrieval model to obtain an object feature vector corresponding to the feature data and a data feature vector corresponding to the candidate data; determine the distance between the data feature vector of each candidate data and the object feature vector, and determine the target data corresponding to the target object from the candidate data based on the distance.

[0138] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0139] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0140] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0141] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0142] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0143] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0144] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0145] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A training method for a data recall model, characterized in that, include: The process involves acquiring feature data of a sample object and corresponding positive and negative sample datasets. The negative sample dataset includes first and second negative sample data, where the distance between the first negative sample data and the feature data of the sample object is less than the distance between the second negative sample data and the feature data of the sample object. The sample object represents a user displaying media data. The positive sample data consists of media data displayed to and clicked by the user, while the negative sample data obtained from the sample object represents media data displayed to the user that was not clicked. The feature data of the sample object includes its basic feature information and its points of interest in the media data. A sample group is formed based on the feature data of the sample object, any of the positive sample data, any of the second negative sample data, and the first negative sample data; A data retrieval model for media data is trained based on multiple sample groups of any of the aforementioned sample objects: During the training process, a loss function is generated based on the feature vectors corresponding to the data in the sample groups output by the data retrieval model during the training process, based on the distance between each of the aforementioned feature vectors, and the parameters of the data retrieval model during the training process are adjusted based on the loss function. During the training process of the data retrieval model, the distance between the feature data of the sample object and the positive sample data is reduced, while the distance between the feature data of the sample object and the negative sample data is increased; the data retrieval model is used to retrieve media data.

2. The method according to claim 1, characterized in that, The negative sample dataset corresponding to the sample object includes negative sample data obtained based on the sample object, as well as positive and negative sample data of other sample objects.

3. The method according to claim 1, characterized in that, After obtaining the feature data of the sample object and the corresponding positive and negative sample datasets, the method further includes: Determine the distance between each negative sample data in the negative sample dataset and the feature data of the sample object, and sort the negative sample data according to the distance; The first negative sample data is determined based on the quantity condition of the first negative sample data and the sorting of the negative sample data, and the other negative sample data besides the first negative sample data is determined as the second negative sample data.

4. The method according to claim 1, characterized in that, The sample group formed based on the feature data of the sample object, any of the positive sample data, any of the second negative sample data, and the first negative sample data includes: The sampling weight of the positive sample data is determined based on the distance between the positive sample data and the feature data of the sample object, and the sampling weight of the second negative sample data is determined based on the distance between the second negative sample data and the feature data of the sample object; Sampling is performed on the positive sample dataset to obtain a positive sample data, wherein the sampling probability of each positive sample is positively correlated with the sampling weight of the positive sample data; Sampling is performed on multiple second negative sample data to obtain a second negative sample data, wherein the sampling probability of the second negative sample data is negatively correlated with the sampling weight of the second negative sample data.

5. The method according to claim 1, characterized in that, The loss function generated based on the feature vectors corresponding to the data in the sample group output by the data retrieval model during training, and the distance between each feature vector, includes: Multiple sample groups are input into the data retrieval model during the training process to obtain feature vectors corresponding to each sample group. The feature vector corresponding to any sample group includes a first feature vector corresponding to the feature data, a second feature vector corresponding to the positive sample data, a third feature vector corresponding to the second negative sample data, and a fourth feature vector corresponding to the first negative sample data. Based on the distances between the second feature vector, the third feature vector, and the fourth feature vector in each of the sample groups and the first feature vector, one or more loss terms are determined, and a loss function is formed based on the one or more loss terms.

6. The method according to claim 5, characterized in that, The loss term includes one or more of the following: a first loss term determined based on a first distance between the second feature vector and the first feature vector, and a second distance between the third feature vector and the first feature vector; The second loss term is determined based on the first distance between the second feature vector and the first feature vector, and the third distance between the fourth feature vector and the first feature vector; The third loss term is determined based on the second distance between the third feature vector and the first feature vector, and the third distance between the fourth feature vector and the first feature vector.

7. A data retrieval method, characterized in that, include: The feature data and candidate data of the target object are obtained, and the feature data and candidate data are input into a media data retrieval model pre-trained using the training method of the data retrieval model according to any one of claims 1-6, to obtain the object feature vector corresponding to the feature data and the data feature vector corresponding to the candidate data; the target object is the object that sends the media data request; the candidate data is the media data to be selected provided by the application to the user; the feature data of the target object includes the basic information of the target object and the interest point information of the media data. The distance between the data feature vector of each candidate data and the feature vector of the object is determined respectively, and the candidate data is sorted based on the distance. Based on the sorting and the recall quantity, the target data corresponding to the target object is determined in the candidate data, and the target data is the recalled media data.

8. A training device for a data recall model, characterized in that, include: The data acquisition module is used to acquire feature data of a sample object and corresponding positive and negative sample datasets. The negative sample dataset includes first and second negative sample data, where the distance between the first negative sample data and the feature data of the sample object is less than the distance between the second negative sample data and the feature data of the sample object. The sample object is a user displaying media data; the positive sample data consists of media data displayed to and clicked by the user; and the negative sample data acquired based on the sample object consists of media data displayed to the user that was not clicked. The feature data of the sample object includes basic feature information of the sample object and the sample object's interest point features regarding the media data. The sample group sampling module is used to form a sample group based on the feature data of the sample object, any of the positive sample data, any of the second negative sample data, and the first negative sample data. The model training module is used to train a media data retrieval model based on multiple sample groups of any given sample object. During training, based on the feature vectors corresponding to the data in each sample group output by the data retrieval model during training, a loss function is generated based on the distance between each feature vector, and the parameters of the data retrieval model during training are adjusted based on the loss function. During the training of the data retrieval model, the distance between the feature data of the sample object and the positive sample data is reduced, and the distance between the feature data of the sample object and the negative sample data is increased. The data retrieval model is used to retrieve media data.

9. A data retrieval device, characterized in that, include: The data processing module is used to acquire feature data and candidate data of the target object, and input the feature data and candidate data into a media data retrieval model pre-trained using the training method of the data retrieval model according to any one of claims 1-6, to obtain the object feature vector corresponding to the feature data and the data feature vector corresponding to the candidate data; the target object is the object that sends the media data request; the candidate data is the media data to be selected provided by the application to the user; the feature data of the target object includes the basic information of the target object and the interest point information of the media data. The target data determination module is used to determine the distance between the data feature vector of each candidate data and the object feature vector, sort the candidate data based on the distance, and determine the target data corresponding to the target object in the candidate data based on the sorting and the recall quantity, wherein the target data is the recalled media data.

10. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the training method of the data retrieval model as described in any one of claims 1-6 and / or the data retrieval method as described in claim 7.

11. A storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a training method for a data retrieval model as described in any one of claims 1-6 and / or a data retrieval method as described in claim 7.

Citation Information

Patent Citations

  • Method and device for identifying object in picture, storage medium and electronic device

    CN111626212A

  • Multi-path recall model training method, multi-path recall method, multi-path recall device and electronic equipment

    CN115374362A