Content recall model training method, content recall method, device and equipment

By training the content recall model using knowledge distillation technology, the multi-target recall objective is transformed into a single objective, solving the problem of low efficiency in scenarios with multiple content recall objectives and achieving efficient and accurate content recall.

CN113515690BActive Publication Date: 2025-10-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110003674.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-04
Publication Date
2025-10-21
Estimated Expiration
2041-01-04

AI Technical Summary

Technical Problem

Existing technologies are inefficient in scenarios with multiple content recall targets, requiring the training and maintenance of multiple content recall models that cannot be efficiently integrated.

Method used

A knowledge distillation method is used to train the content recall model, which distills multi-target recall targets into single recall targets. By constructing a first content recall model and a second content recall model, and using sample data for training, the second content recall model learns the knowledge features of the first content recall model.

Benefits of technology

The efficiency and accuracy of multi-target content recall are improved, and the requirements for storage and computing resources are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113515690B_ABST
    Figure CN113515690B_ABST
Patent Text Reader

Abstract

The application discloses a content recall model training method, a content recall method, a device and equipment, and relates to the field of artificial intelligence. The method comprises the following steps: obtaining sample data, wherein the sample data comprises sample user data and sample content data; constructing a first content recall model and a second content recall model, wherein the first content recall model corresponds to at least two content recall targets, and the second content recall model corresponds to a fusion recall target, wherein the fusion recall target is obtained by fusing the at least two content recall targets; and training the first content recall model and the second content recall model based on the sample data, wherein the second content recall model is trained in a knowledge distillation manner based on the output result of the first content recall model. Since the second content recall model is essentially a single-target recall model, when the second content recall model is used for multi-target content recall subsequently, the content recall efficiency can be improved under the premise of ensuring the content recall accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence, and in particular to a training method for a content recall model, a content recall method, an apparatus, and equipment. Background Art

[0002] A recommendation system is a system used to recommend content of interest to users. It is widely used in recommendation scenarios such as article recommendations, audio and video recommendations, and shopping recommendations.

[0003] The process of content recommendation usually includes recall and sorting, where recall refers to screening out candidate content that meets the user's interests from the content database, while sorting is the process of carefully screening and sorting the candidate content. In related technologies, content recall is usually achieved by using a content recall model obtained through deep learning training. In one example, when article recall is required, the user feature vector is obtained by inputting user features into the content recall model, and then the inner product of the user feature vector and the article feature vector (pre-output and stored by the content recall model based on the input article features) is calculated, and then the article is recalled based on the inner product.

[0004] However, the content recall models in related technologies are all aimed at a single content recall target, such as a click target, a like target, a comment target, etc. When it is necessary to recall content that meets multiple content recall targets (such as click and like targets), multiple content recall models need to be trained and maintained, and multiple content recall models need to be used to recall content separately and integrate the recalled content, resulting in low content recall efficiency in multiple content recall target scenarios. Summary of the Invention

[0005] The present invention provides a content recall model training method, content recall method, device, and apparatus, which can improve content recall efficiency in multiple content recall target scenarios. The technical solution is as follows:

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

[0007] Acquire sample data, the sample data including sample user data and sample content data, the sample content data corresponding to at least two content recall targets;

[0008] Constructing a first content recall model and a second content recall model, wherein the first content recall model corresponds to at least two of the content recall targets, and the second content recall model corresponds to a fusion recall target, wherein the fusion recall target is obtained by fusing the at least two content recall targets;

[0009] The first content recall model and the second content recall model are trained based on the sample data, wherein the second content recall model is trained based on the output result of the first content recall model using a knowledge distillation method.

[0010] On the other hand, an embodiment of the present application provides a content recall method, the method comprising:

[0011] receiving a content recall request, wherein the content recall request includes user data;

[0012] Extracting features from the user data using a second content recall model to obtain a user feature vector corresponding to the user data. The second content recall model is trained using a knowledge distillation method based on an output result of the first content recall model. The first content recall model corresponds to at least two content recall targets, and the second content recall model corresponds to a fusion recall target, which is obtained by fusing the at least two content recall targets.

[0013] The target content data to be recalled is determined based on the user feature vector and a fused feature vector corresponding to the content data, wherein the fused feature vector is obtained by performing feature extraction on the content data by the second content recall model.

[0014] On the other hand, an embodiment of the present application provides a training device for a content recall model, the device comprising:

[0015] A sample acquisition module, configured to acquire sample data, the sample data including sample user data and sample content data, the sample content data corresponding to at least two content recall targets;

[0016] a model construction module, configured to construct a first content recall model and a second content recall model, wherein the first content recall model corresponds to at least two of the content recall targets, and the second content recall model corresponds to a fusion recall target, wherein the fusion recall target is obtained by fusion of the at least two content recall targets;

[0017] A model training module is used to train the first content recall model and the second content recall model based on the sample data, wherein the second content recall model is trained based on the output result of the first content recall model using a knowledge distillation method.

[0018] On the other hand, an embodiment of the present application provides a content recall device, the device comprising:

[0019] a request receiving module, configured to receive a content recall request, wherein the content recall request includes user data;

[0020] a user feature extraction module configured to extract features from the user data using a second content recall model to obtain a user feature vector corresponding to the user data, wherein the second content recall model is trained using a knowledge distillation method based on the output of the first content recall model, wherein the first content recall model corresponds to at least two content recall targets, and the second content recall model corresponds to a fusion recall target, wherein the fusion recall target is obtained by fusing at least two of the content recall targets;

[0021] The recall module is configured to determine target content data to be recalled based on the user feature vector and a fused feature vector corresponding to the content data, wherein the fused feature vector is obtained by extracting features from the content data using the second content recall model.

[0022] On the other hand, an embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the training method of the content recall model as described in the above aspects, or to implement the content recall method as described in the above aspects.

[0023] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the training method of the content recall model as described in the above aspects, or to implement the content recall method as described in the above aspects.

[0024] In another aspect, embodiments of the present application provide a computer program product or computer program, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the content recall model training method provided in the above aspects, or to implement the content recall method described in the above aspects.

[0025] The embodiment of the present application adopts a knowledge distillation method to distill multiple content recall targets into a single content recall target. In the content recall model training stage, by constructing a first content recall model corresponding to at least two content recall targets and a second content recall model corresponding to the fusion recall target, the first content recall model and the second content recall model are trained using sample data, so that the second content recall model learns the knowledge features of the first content recall model through knowledge distillation, thereby having a content recall capability similar to that of the first content recall model; since the second content recall model is essentially a single-target recall model, when the second content recall model is subsequently used for multi-target content recall, the content recall efficiency can be improved while ensuring the content recall accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0027] Figure 1 A schematic diagram illustrating the implementation of the content recall model training and application process provided by an embodiment of the present application is shown;

[0028] Figure 2 A schematic diagram showing an implementation environment provided by an exemplary embodiment of the present application is shown;

[0029] Figure 3 A flowchart of a method for training a content recall model provided by an exemplary embodiment of the present application is shown;

[0030] Figure 4 A flowchart of a method for training a content recall model provided by another exemplary embodiment of the present application is shown;

[0031] Figure 5 1 is a schematic diagram illustrating an implementation of a word vector embedding process according to an exemplary embodiment of the present application;

[0032] Figure 6 is a schematic structural diagram of an MLP layer shown in an exemplary embodiment of the present application;

[0033] Figure 7 is a schematic diagram of an implementation of a model training process shown in an exemplary embodiment of the present application;

[0034] Figure 8 is a schematic diagram of an implementation of a model training process shown in another exemplary embodiment of the present application;

[0035] Figure 9 is a flow chart of a content recall method shown in an exemplary embodiment of the present application;

[0036] Figure 10 is a schematic diagram illustrating an implementation of a content recall process according to an exemplary embodiment of the present application;

[0037] Figure 11 is a comparison diagram showing the recall effect of an exemplary embodiment of the present application;

[0038] Figure 12 is a structural block diagram of a training device for a content recall model provided by an exemplary embodiment of the present application;

[0039] Figure 13 is a structural block diagram of a content recall device provided by an exemplary embodiment of the present application;

[0040] Figure 14 A schematic structural diagram of a computer device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0041] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0042] The training method and content recall method of the content recall model provided in the embodiments of the present application can be applied to scenarios requiring content recommendation, such as article recommendation scenarios, shopping recommendation scenarios, audio and video recommendation scenarios, advertising recommendation scenarios, and social account recommendation scenarios, and multi-target content recall is required when performing content recommendation. Taking the article recommendation scenario as an example, when the article server recommends an article, the goal is to recall the article if the user clicks to read it and the reading time exceeds the time threshold; taking the video recommendation scenario as an example, when the video server recommends a video, the goal is to recall the video if the user clicks to watch it and gives a like; taking the shopping recommendation scenario as an example, when the shopping server recommends a product, the goal is to recall the product if the user clicks to view it and purchases the product.

[0043] Taking the advertising recommendation scenario as an example, in order to increase the click probability of advertisements inserted between application content (such as graphic advertisements inserted between news in news applications, graphic advertisements inserted between social dynamics in social applications, and video advertisements inserted between video applications in video applications), and increase the purchase probability of the corresponding products of the advertisements after clicking, the advertising recommendation server obtains user data from the application server, and with the goal of advertisement clicks and the purchase of the corresponding products of the advertisements, recalls advertising data that meets user characteristics from the advertising database to make advertising recommendations.

[0044] Taking the social account recommendation scenario as an example, in order to improve the efficiency of users adding accounts of interest in social applications, the social server obtains the user portrait, and with the goal of clicking on the social account and establishing a social relationship with the social account (such as friend relationship, follow relationship, etc.), recalls the social accounts that match the user's interests from the social account data block and recommends the social accounts.

[0045] Of course, in addition to the above-mentioned possible application scenarios, the content recall model training method and content recall method provided in the embodiments of the present application can be applied to any scenario requiring multi-target content recommendation, and the embodiments of the present application are not limited to specific application scenarios.

[0046] Before performing content recall, the computer device uses the content recall model training method provided in the embodiment of the present application to perform model training. Figure 1 As shown, the computer device first obtains sample data 11 (including sample user data and sample content data), and constructs a first content recall model 12 based on at least two content recall targets, and trains a second content recall model 13 (equivalent to a single-target content recall model) based on a fused recall target obtained by fusing at least two content recall targets.

[0047] Furthermore, the computer device uses the sample data 11 to perform model training on the first content recall model 12, so that the trained first content recall model 12 has multi-target content recall capabilities; at the same time, the computer device uses the knowledge distillation method to train the second content recall model 13, so that the second content recall model 13 learns the multi-target content recall capabilities of the first content recall model 12.

[0048] After model training is complete, the computer device deploys the second content recall model 13 on the server. The server then uses the second content recall model 13 to extract features from the content in the content database 14, obtaining and storing a single content feature vector 15 corresponding to each content. When performing subsequent multi-target content recall, the server uses the second content recall model 13 to extract features from user data 16, obtaining a single user feature vector 17 corresponding to each user. Based on this user feature vector and the content feature vector, the server then filters out recall content 18 from the content database that meets multiple targets. Content recommendations are then made based on this filtered recall content 18.

[0049] Figure 2 A schematic diagram of an implementation environment provided by an exemplary embodiment of the present application is shown. The implementation environment includes a terminal 210 and a server 220. Data communication between the terminal 210 and the server 220 is performed via a communication network. Optionally, the communication network can be a wired network or a wireless network, and the communication network can be at least one of a local area network, a metropolitan area network, and a wide area network.

[0050] Terminal 210 is an electronic device with content recommendation needs. The electronic device can be a mobile terminal such as a smart phone, a tablet computer, a laptop computer, or a desktop computer, a projection computer, etc., which is not limited in this embodiment of the present application.

[0051] Optionally, the applications installed in the terminal 210 have content recommendation requirements, including news reading applications (recommending articles of interest to users), video applications (recommending videos of interest to users), music applications (recommending music that suits user preferences), shopping applications (recommending products that suit user preferences), social applications (recommending social accounts that suit users), etc. The embodiments of the present application do not limit the types of applications and the specific types of recommendations.

[0052] Figure 2 In the present embodiment, a news reading application is installed in the terminal 210, and the news reading application has a function of recommending articles based on user interests and historical news reading records.

[0053] Server 220 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0054] Optionally, the server 220 is a background server of an application (with content recommendation requirements) in the terminal 210, and is used to provide content recommendation services for the application. Figure 2 As shown, the server 220 is a background server of the news reading application, and is used to provide article recommendation services.

[0055] In this embodiment, the server 220 constructs a first article recall model 221 (equivalent to a multi-target recall model) in advance based on at least two article recall targets (such as an article click target and an article reading time target) according to the article data, user data and historical article reading records in the article database, and trains a second article recall model 222 (equivalent to a single-target recall model) using knowledge distillation based on a fused recall target obtained by fusion of at least two article recall targets (such as clicking on the article and the reading time is greater than a time threshold).

[0056] After completing the training of the second article recall model 222, the server 220 will deploy the second article recall model 222 as the target article recall model, and use the second article recall model 222 to extract features from the articles in the article database 223, obtain the article feature vectors corresponding to each article, and construct a vector index for the article feature vectors to form an article feature vector index library 224.

[0057] In the subsequent article recommendation process, after receiving the recommendation request sent by the terminal 210, the server 220 first uses the second article recall model 222 to extract features from the user data of the user corresponding to the terminal 210 to obtain a user feature vector 225, and then determines the recalled article 226 based on the user feature vector 225 and the article feature vector index library 224, thereby performing article recommendations based on the recalled article 226.

[0058] In other possible implementations, the above-mentioned model training process may also be executed by a computer, and the computer may deploy the trained second article recall model on the server side, which is not limited in this embodiment.

[0059] For ease of description, the following embodiments are described using the training of a content recall model and the execution of a content recall method by a computer device as an example.

[0060] Figure 3 A flowchart of a method for training a content recall model provided by an exemplary embodiment of the present application is shown. This embodiment uses the method applied to a computer device as an example to illustrate the method, which includes the following steps.

[0061] Step 301: Acquire sample data, where the sample data includes sample user data and sample content data, and the sample content data corresponds to at least two content recall targets.

[0062] The sample user data in the sample data is used to characterize the multi-dimensional characteristics of users, such as their historical content viewing history, user profile, and contextual characteristics (including time characteristics, network characteristics, geographic location characteristics, etc. when performing operations); the sample content data is used to characterize the multi-dimensional characteristics of content, such as content type characteristics, content release time characteristics, content length characteristics, etc. Furthermore, because the ultimate goal is to train a content recall model with multi-target recall capabilities, the sample content data corresponds to multiple content recall targets.

[0063] In a possible implementation, the computer device obtains historical operation records of the user on the content, thereby generating sample data based on the historical operation records.

[0064] Taking articles as an example, when the content recall targets include article clicks and article reading time greater than the time threshold, the historical operation records obtained by the computer device are the user's click and reading records of the article and the article reading time. Correspondingly, the generated sample data includes the user's user data, article data, user's click behavior data on the article, and user's article reading time data.

[0065] Taking video as an example, when the content recall targets include video viewing and video likes, the historical operation records obtained by the computer device are the user's video viewing records and video like records. Correspondingly, the generated sample data includes the user's user data, video data, user's video viewing behavior data, and user's video like behavior data.

[0066] Step 302 : construct a first content recall model and a second content recall model. The first content recall model corresponds to at least two content recall targets, and the second content recall model corresponds to a fusion recall target. The fusion recall target is obtained by fusion of at least two content recall targets.

[0067] In an embodiment of the present application, during the model training phase, the computer device needs to train two content recall models, namely a first multi-target content recall model and a second single-target content recall model, wherein the multi-target is at least two content recall targets corresponding to the sample content data, and the single target is a fused recall target obtained by fusing at least two content recall targets.

[0068] Taking articles as an example, the recall targets of the first content recall model include article clicks and article reading time reaching a threshold, while the recall targets of the second content recall model are article clicks and reading time reaching a threshold. Taking videos as an example, the recall targets of the first content recall model include video views and video likes, while the recall targets of the second content recall model are video views and likes.

[0069] In some embodiments, the first content recall model and the second content recall model have different model structures. Because the first content recall model has at least two target recall functions, processing sample content data using the first content recall model can generate at least two content feature vectors (corresponding to different targets). However, because the second content recall model has a single target (fusion target) recall function, processing sample content data using the second content recall model only generates a single content feature vector. Specifically, the first content recall model has a network branch that outputs at least two content feature vectors, while the second content recall model has a network branch that outputs only one content feature vector.

[0070] Step 303: Train a first content recall model and a second content recall model based on the sample data, wherein the second content recall model is trained based on the output result of the first content recall model using a knowledge distillation method.

[0071] After completing the model construction, the computer device trains the first content recall model and the second content recall model based on the sample data, and incorporates knowledge distillation technology into the training process. Among them, the first content recall model is the teacher model, and the second content recall model is the student model.

[0072] In one possible implementation, a computer device trains a first content recall model using at least two content recall targets for sample content data as supervision, enabling the first content recall model to possess multi-target recall capabilities. When training a second content recall model, the computer device trains the second content recall model using the output of the first content recall model as soft targets, ensuring that the output of the second content recall model is as close as possible to that of the first content recall model, thereby achieving multi-target recall capabilities similar to those of the first content recall targets. The following examples will detail the model training process.

[0073] After completing the training of the first content recall model and the second content recall model, since the second content recall model has learned the model knowledge of the first content recall model (that is, the recall effects of the two are basically the same), it is only necessary to deploy the second content recall model on the server for online recall. There is no need to deploy and maintain the first content recall model, which reduces the maintenance cost of the online model.

[0074] Through the knowledge distillation technology, multiple targets are distilled into a single fusion target, so that the fusion target can achieve the equivalent effect of multiple targets. Compared with the use of multiple single-target content recall models obtained by training (corresponding to different targets) for online recall, it is necessary to generate and store multiple content feature vectors based on the content data, and it is necessary to calculate the user feature vector and each content feature vector separately. Since the second content recall model in this application only generates a single content feature vector based on the content data, the storage space occupied is significantly reduced (equivalent to the storage resources of single-target recall), and only the user feature vector and the single content feature vector need to be calculated, which significantly reduces the amount of calculation (equivalent to the calculation resources of single-target recall), thereby improving the content recall efficiency.

[0075] To summarize, the embodiment of the present application adopts the knowledge distillation method to distill multiple content recall targets into a single content recall target, and in the content recall model training stage, by constructing a first content recall model corresponding to at least two content recall targets, and a second content recall model corresponding to the fusion recall target, the first content recall model and the second content recall model are trained using sample data, so that the second content recall model learns the knowledge features of the first content recall model through knowledge distillation, thereby having a content recall capability similar to that of the first content recall model; since the second content recall model is essentially a single-target recall model, when the second content recall model is subsequently used for multi-target content recall, the content recall efficiency can be improved while ensuring the accuracy of content recall.

[0076] In one possible implementation, the computer device fuses the loss function of the first content recall model and the loss function of the second content recall model according to their respective model training objectives, thereby jointly training the two models according to the fused loss function. The above-mentioned step 303 may include the following steps.

[0077] 1. Determine the first loss function of the first content recall model under sample data.

[0078] The first loss function is used to represent the degree of deviation between the predicted operation results obtained by the first content recall model based on sample user data and sample content data and the actual user operation results on the content. Since the first content recall model corresponds to multiple content recall targets, the first loss function includes the loss of the first content recall model under a single recall target.

[0079] In addition, in order to enable the second content recall model to learn multi-target recall through knowledge distillation, the first loss function also includes the loss of the first content recall model under multi-recall targets.

[0080] In one possible implementation, when at least two content recall goals include content clicks and content conversions, the first loss function includes the loss of the first content recall model under the content click goal (the difference between the click situation of the content predicted by the first content recall model and the actual click situation of the content), and the loss of the first content recall model under the content click and conversion goal (the difference between the click-through conversion situation of the content predicted by the first content recall model and the actual click-through conversion situation of the content). Click is a prerequisite for conversion, that is, content can only be converted after being clicked. For example, conversion can refer to the reading time of the article reaching a time threshold, a like operation, a share operation, a favorite operation, and so on.

[0081] 2. Based on the output result of the first content recall model, determine the second loss function of the second content recall model under the sample data.

[0082] In one possible implementation, since the second content recall model corresponds to a fusion recall target, the computer device uses the output result of the first content recall model under multiple recall targets as supervision of the output result of the second content recall model, and determines the second loss function of the second content recall model under the sample data. The second loss function is used to characterize the difference between the multi-target recall result of the first content recall model and the fusion recall result of the second content recall model.

[0083] In combination with the example of the above steps, the computer device determines the second loss function based on the output results of the first recall model under the content click and conversion goal, and the output results of the second recall model under the fusion recall goal (content click and conversion).

[0084] 3. Fusion of the first loss function and the second loss function to obtain the target loss function.

[0085] Furthermore, the computer device fuses the first loss function and the second loss function as the total loss function for subsequent training of the first content recall model and the second content recall model.

[0086] Optionally, the first loss function and the second loss function each have corresponding weights. When performing loss function fusion, the target loss function is obtained by weighted fusion based on the first loss function, the first weight corresponding to the first loss function, the second loss function, and the second weight corresponding to the second loss function. The first loss and the second loss are hyperparameters, and the first loss and the second loss can be set in advance based on experience and adjusted during the training process.

[0087] 4. Train the first content recall model and the second content recall model based on the target loss function.

[0088] In some embodiments, the computer device jointly trains the first content recall model and the second content recall model with the goal of minimizing the target loss function. Model training may employ a gradient descent algorithm or a backpropagation algorithm to adjust model parameters, although this embodiment is not limited thereto.

[0089] The following exemplary embodiments are used to describe in detail the process of determining the loss function during model training. The following embodiments are described using an example in which at least two content recall targets include content clicks and content conversions, and the fusion recall target is content clicks and conversions.

[0090] Figure 4 A flowchart of a method for training a content recall model provided by another exemplary embodiment of the present application is shown. This embodiment uses the method applied to a computer device as an example to illustrate the method, which includes the following steps.

[0091] Step 401: Acquire sample data, where the sample data includes sample user data and sample content data, and the sample content data corresponds to at least two content recall targets.

[0092] The implementation of this step can refer to the above step 301, and will not be repeated here in this embodiment.

[0093] It should be noted that due to the large amount of sample data, directly using all the sample data for training would take a long time. Therefore, in one possible implementation, the computer device uses NCE (Noise-Contrastive Estimation) to select positive and negative samples, thereby increasing the model training speed without affecting the training effect.

[0094] In one possible implementation, for a content click target, the computer device uses the clicked sample content data as a positive sample and extracts negative samples from the positive samples according to the sample heat; for a content conversion target, the computer device uses the converted sample content data as a positive sample and the unconverted sample content data as a negative sample.

[0095] For example, when the content conversion goal is the reading time target of the article, the computer device determines the 70% percentile of the user's reading time for the article as the time threshold, thereby determining the sample articles with a reading time greater than the time threshold as positive samples, and determining the sample articles with a reading time less than the time threshold as negative samples.

[0096] In addition, when selecting positive and negative samples, in order to enable negative samples to compete with positive samples, in one possible implementation, the computer device randomly selects positive sample data from the sample data, and selects negative sample data based on the sample heat of the sample content data in the sample data, wherein the selection ratio of the negative sample data is positively correlated with the sample heat, that is, the number of negative samples selected by the computer device from high-heat sample content data is greater than the number of negative samples selected from low-heat sample content data.

[0097] Step 402 : construct a first content recall model and a second content recall model. The first content recall model corresponds to at least two content recall targets, and the second content recall model corresponds to a fusion recall target. The fusion recall target is obtained by fusion of at least two content recall targets.

[0098] The content recall model consists of an embedding layer and a multilayer perceptron (MLP) layer (also known as a fully connected layer). The embedding layer converts the input data into a vector form, while the MLP layer connects the input vectors through the hidden layer and outputs the final feature vector.

[0099] In one possible implementation, the first content recall model includes a user branch and a content branch. The user branch includes an Embedding layer for converting user data into a vector, and an MLP layer for processing the output vector of the Embedding layer and outputting a user feature vector; the content branch includes an Embedding layer for converting content data into a vector, and an MLP layer for processing the output vector of the Embedding layer and outputting at least two content feature vectors (corresponding to different content recall targets). The second content recall model also includes a user branch and a content branch. The user branch in the second content recall model is similar to the user branch in the first content recall model, but the content branch in the second content recall model includes an Embedding layer for converting content data into a vector, and an MLP layer for processing the output vector of the Embedding layer and outputting a single content feature vector (corresponding to the fusion recall target).

[0100] Optionally, the Embedding layer in the content recall model converts input data into low-dimensional dense vectors. The content recall model is initialized with a lookuptable, where each row represents a low-dimensional dense vector corresponding to a data component (such as a label). To convert the input data into a low-dimensional dense vector, the lookuptable is searched for the low-dimensional dense vector corresponding to each component of the input data. The weighted sum of these low-dimensional dense vectors is then performed to obtain the low-dimensional dense vector corresponding to the input data.

[0101] Indicative, such as Figure 5 As shown, lookuptable 51 contains low-dimensional dense vectors (v1 to v 10000 ). When the user data 52 indicates that the user has two tags, and the tag IDs are 308 and 4080 respectively, the computer device finds v from the lookuptable 51. 308 and v 4080 , and according to the weight corresponding to the label, the user vector 53 corresponding to the user data 52 is determined to be 0.7×v 308 +0.3×v 4080 .

[0102] Each neuron in the MLP layer takes the output of all neurons in the previous layer as input, and each neuron in the adjacent layer has its own connection weight. At the same time, by introducing nonlinear activation functions (such as ReLU), it has nonlinear fitting capabilities. Figure 6 As shown, when the input vector of the lth layer is x l, when the input vector of the l+1th layer is x l+1 , and the connection weight matrix between the lth layer and the l+1th layer is w l+1 , b l+1 is the bias vector of the l+1th layer, f is the nonlinear activation function, then x l+1 =f(W l+1 x l +b l+1 ).

[0103] Indicative, such as Figure 7 As shown, the first content recall model constructed by the computer device includes a user branch 71, a first content branch 72, and a second content branch 73, and the second content recall model includes a user branch 71 and a fused content branch 74. The user branch 71 is used to process and concatenate user data through the Embedding layer to obtain a user low-dimensional dense vector, and then process the user low-dimensional dense vector through the MLP layer to output a user feature vector. The first content branch 72, the second content branch 73, and the fused content branch 74 are used to process and concatenate content data through the Embedding layer to obtain a content low-dimensional dense vector, and then process the content low-dimensional dense vector through their respective MLP layers to obtain a single target feature vector and a fused target feature vector.

[0104] Step 403 : Determine at least two single-target probabilities of the first content recall model under the sample data. The single-target probability refers to the probability that the recalled content meets a single content recall target, and different content recall targets correspond to different single-target probabilities.

[0105] In order to measure the content recall effect of the first content recall model under at least two content recall targets, the computer device inputs sample data into the first content recall model to obtain a single target probability output by the first content recall model.

[0106] In one possible implementation, the content recall targets include content clicks and content conversions. After the computer device inputs the sample data into the first content recall model, it obtains a content click probability representing the probability of the sample content being clicked by the user, and a content conversion probability representing the probability of the sample content being converted.

[0107] Regarding the specific method of determining the single target probability, optionally, this step may include the following sub-steps.

[0108] 1. Perform feature extraction on sample user data through the first content recall model to obtain a sample user feature vector.

[0109] In the embodiment of the present application, the computer device uses vector inner product to represent the single-target probability of content click or conversion. Therefore, the computer device needs to extract features of the sample user data through the user branch in the first content recall model to obtain a sample user feature vector.

[0110] Indicative, such as Figure 7 As shown, the computer device processes and concatenates the sample user data through the Embedding layer in the user branch 71 to obtain a user low-dimensional dense vector 701, and then processes the user low-dimensional dense vector 701 through the MLP layer (Relu in the figure is the activation function of each layer) to output a sample user feature vector 711.

[0111] 2. Perform feature extraction on the sample content data using the first content recall model to obtain at least two sample content feature vectors, where different content recall targets correspond to different sample content feature vectors.

[0112] Similar to the process of obtaining sample user feature vectors, the computer device extracts features from the sample content data through different content branches in the first content recall model to obtain multiple sample content feature vectors, where different sample content feature vectors correspond to different content recall targets.

[0113] Indicative, such as Figure 7 As shown, the computer device processes and splices the sample content data through the Embedding layer in the first content branch 72 (corresponding to the content click target) to obtain a content low-dimensional dense vector 702, and then processes the content low-dimensional dense vector 702 through the MLP layer (Relu in the figure is the activation function of each layer) to output a content click feature vector 721; the computer device processes and splices the sample content data through the Embedding layer in the second content branch 73 (corresponding to the content conversion target) to obtain a content low-dimensional dense vector 702, and then processes the content low-dimensional dense vector 702 through the MLP layer (Relu in the figure is the activation function of each layer) to output a content conversion feature vector 731.

[0114] 3. Determine the single target probabilities corresponding to at least two content recall targets based on the inner product operation results of the sample user feature vector and each sample content feature vector.

[0115] Furthermore, the computer device performs an inner product operation on the sample user feature vector and each sample content feature vector, thereby determining the single target probability corresponding to each of the at least two content recall targets based on the inner product operation results. The inner product operation results are positively correlated with the single target probability.

[0116] Taking content clicks and content conversions as an example, the single target probability (content click probability) corresponding to the content click target can be expressed as:

[0117]

[0118] Among them, θ ctr is the network parameter corresponding to the content click branch, y = 1 means the content is clicked, x u is the sample user vector, v c is the content click feature vector.

[0119] The single target probability (content conversion probability) corresponding to the content conversion target can be expressed as:

[0120]

[0121] Among them, θ cvr is the network parameter corresponding to the content conversion branch, z = 1 means the content is converted, x u is the sample user vector, v d Convert the content into a feature vector.

[0122] Indicative, such as Figure 7 As shown, the computer device performs an inner product operation on the sample user feature vector 711 and the content click feature vector 721 to determine the content click probability 751; and performs an inner product operation on the sample user feature vector 711 and the content conversion feature vector 731 to determine the content conversion probability 761.

[0123] Step 404 : determining a first fusion probability based on at least two single-target probabilities, where the first fusion probability refers to a probability that the recalled content satisfies at least two content recall targets simultaneously.

[0124] In order to integrate the connections between different content recall targets during the training of the first content recall model, after the computer device determines the single target probability, it is necessary to further determine the integration probability when multiple content recall targets are met.

[0125] In a possible implementation, when the content recall targets are content clicks and content conversions, respectively, since the content click-through rate (CTR) is defined as the number of clicks / the number of exposures, and the content conversion rate (CVR) is defined as the number of conversions / the number of clicks, the computer device determines the product of the content click probability and the content conversion probability as the first fusion probability of the content click-through conversion rate (CTCVR).

[0126] In combination with the examples in the above embodiments, the first fusion probability (first content click-through conversion probability) can be expressed as:

[0127]

[0128] Right now

[0129] P ctcvr (θ ctr ,θ cvr )=P ctr (θ ctr )P cvr (θ cvr )

[0130] Indicative, such as Figure 7 As shown, the computer device multiplies the content click probability 751 and the content conversion probability 761 to obtain a first content click conversion probability 771 .

[0131] Step 405: Determine a first loss function based on the first fusion probability and the single target probability.

[0132] In one possible implementation, the computer device determines a single target loss based on the single target probability and the single target label corresponding to the sample content data; determines a fused target loss based on the first fused probability and the multi-target label corresponding to the sample content data, and then determines the single target loss and the fused target loss as a first loss function, i.e., the total loss function of the first content recall model.

[0133] In one possible implementation, the computer device determines the content click loss based on the deviation between the content click label corresponding to the sample content data (i.e., used to indicate whether the sample content data is clicked, and if so, the label is 1) and the content click probability (CTR); and determines the content click conversion loss based on the deviation between the content click conversion label corresponding to the sample content data (i.e., used to indicate whether the sample content data is clicked and converted, and if so, the label is 1, and if the click is not converted or not clicked, the label is 0) and the content click conversion probability (CTCVR).

[0134] Among them, the content click loss (two-category cross entropy loss) can be expressed as:

[0135] L1(θ ctr )=-ylogP ctr (θ ctr )-(1-y)log(1-P ctr (θ ctr ))

[0136] Content click conversion loss (binary cross entropy loss) can be expressed as:

[0137] L2(θ ctr ,θ cvr )=-zlogP ctr (θctr )P cvr (θ cvr )-(1-z)log(1-P ctr (θ ctr )P cvr (θ cvr ))

[0138] Correspondingly, the first loss function is L1(θ ctr )+L2(θ ctr ,θ cvr ).

[0139] Indicative, such as Figure 7 As shown, the computer device determines the content click loss based on the content click probability 751 and the content click label 752, determines the content click conversion loss based on the content click conversion probability 771 and the content click conversion label 752, and finally obtains the first loss function.

[0140] Step 406 : Determine a second fusion probability of the second content recall model under the sample data. The second fusion probability refers to the probability that the recalled content meets the fusion recall target.

[0141] Unlike the first content recall model, which requires probabilistic fusion of at least two single target probabilities to obtain the fusion probability, the recall target of the second content recall model is the fusion recall target. Therefore, the fusion probability can be obtained by inputting sample data into the second content recall model.

[0142] In a possible implementation, this step may include the following sub-steps.

[0143] 1. Perform feature extraction on the sample user data through the second content recall model to obtain the sample user feature vector.

[0144] Similar to the process of using the first content recall model to vectorize user features, the computer device performs word embedding and full connection processing on the sample user data through the user branch in the second content recall model to obtain a sample user feature vector.

[0145] Indicative, such as Figure 7 As shown, the computer device processes and concatenates the sample user data through the Embedding layer in the user branch 71 to obtain a user low-dimensional dense vector 701, and then processes the user low-dimensional dense vector 701 through the MLP layer (Relu in the figure is the activation function of each layer) to output a sample user feature vector 711.

[0146] 2. Perform feature extraction on the sample content data through the second content recall model to obtain a sample fusion feature vector.

[0147] Similar to the process of quantizing content data features under a single target, the computer device inputs the sample content data into the fusion content branch of the second content recall model to obtain a sample fusion feature vector output by the fusion content branch.

[0148] Indicative, such as Figure 7 As shown, the computer device processes and splices the sample content data through the Embedding layer in the fusion content branch 74 (corresponding to the content click conversion target) to obtain a content low-dimensional dense vector 702, and then processes the content low-dimensional dense vector 702 through the MLP layer (Relu in the figure is the activation function of each layer) to output a sample fusion feature vector 741.

[0149] 3. Determine a second fusion probability based on the inner product operation result of the sample user feature vector and the sample fusion feature vector.

[0150] Similar to the above process for determining the single target probability, the computer device performs an inner product operation on the sample user feature vector and the sample fusion feature vector, thereby determining a second fusion probability corresponding to the fusion recall target based on the inner product operation result. The inner product operation result is positively correlated with the second fusion probability.

[0151] Taking the fusion recall target as content click conversion as an example, the second fusion probability (content click conversion probability) corresponding to the content click fusion target can be expressed as:

[0152]

[0153] Among them, θ fusion is the network parameter corresponding to the fusion content branch, z = 1 means the content is clicked and converted, x u is the sample user vector, v f is the sample fusion feature vector.

[0154] Indicative, such as Figure 7 As shown, the computer device performs an inner product operation on the sample user feature vector 711 and the sample fusion feature vector 741 to obtain the second content click-through conversion probability 781.

[0155] Step 407: Determine a second loss function based on the probability distribution difference between the first fusion probability and the second fusion probability.

[0156] Unlike the first content recall model, which uses sample labels as supervision to determine the loss function, in this embodiment, since the first content recall model serves as the teacher model of the second content recall model, it is necessary to use the output results of the first content recall model as supervision to determine the loss function, so that during the knowledge distillation process, the output results of the second content recall model tend to the output results of the first content recall model.

[0157] In order to make the second fusion probability output by the second content recall model tend to the first fusion probability output by the first content recall model, even if the difference in the probability distributions of the two is as small as possible, the computer device determines a second loss function based on the difference in the probability distributions of the first fusion probability and the second fusion probability.

[0158] In one possible implementation, the computer device uses KL (Kullback-Leibler divergence) divergence to measure the probability distribution difference. Accordingly, the second loss function can be expressed as:

[0159]

[0160] Of course, the computer device may also use other methods to measure the probability distribution difference, and this embodiment is not limited to this.

[0161] Indicative, such as Figure 7 As shown, the computer device calculates the KL divergence of the probability distribution between the first content click-through conversion probability 771 and the second content click-through conversion probability 781 to determine the second loss function.

[0162] Step 408: The first loss function and the second loss function are integrated to obtain a target loss function.

[0163] Furthermore, the computer device performs loss fusion on the first loss function of the first content recall model and the second loss function of the second content recall model to obtain a target loss function. Combining the examples in the above steps, the target loss function can be expressed as:

[0164] L(θ ctr ,θ cvr ,θ fusion )=w1L1(θ ctr )+w2L2(θ ctr ,θ cvr )+w3L3(θ fusion )

[0165] Among them, w1, w2, and w3 are the weights of content click loss, content click conversion loss, and fusion loss, respectively.

[0166] Step 409 : Train the first content recall model and the second content recall model based on the target loss function.

[0167] The implementation of this step can refer to the above embodiment, and this embodiment will not be described in detail here.

[0168] In this embodiment, by utilizing knowledge distillation technology, the teacher model (i.e., the first content recall model) is more focused on the modeling and training of multiple targets, and the student model (i.e., the second content recall model) is focused on the fusion and transfer learning of multiple targets, thereby improving the content recall quality of multiple targets; and, since the teacher model in this scheme can independently model more targets and can effectively construct the dependency transformation relationship between different targets, it avoids the separation between different targets (the separation between targets will cause the model false positive rate to be high), thereby further improving the content recall quality.

[0169] It should be noted that Figure 7 The illustrated embodiment uses the example of a first content recall model composed of multiple single-target recall models (different single-target recall models correspond to different content recall targets). In other possible implementations, the first content recall model can also be a multi-target recall model with shared underlying parameters, thereby reducing the number of parameters for the entire model and the risk of overfitting. For example, the first content recall model can be a Share Bottom model, a Modeling task relationships in multi-task learning with multi-gate Mixture-of-Experts (MMoE) model, etc., which are not limited in this embodiment.

[0170] Indicatively, in Figure 7 On the basis of Figure 8 As shown, the user branch 71 includes a user-side neural network 703 for outputting a user feature vector, and the first content branch 72 , the second content branch 73 and the fused content branch 74 share the content-side neural network 704 .

[0171] The following uses an illustrative embodiment to illustrate the online content recall process after model training.

[0172] Figure 9 FIG. 1 is a flow chart of a content recall method according to an exemplary embodiment of the present application. The method includes the following steps.

[0173] Step 901: Receive a content recall request, which includes user data.

[0174] In a possible implementation, when receiving a recall request sent by a terminal, the computer device obtains corresponding user data from a user database based on the user identifier included in the recall request, wherein the user data is used to characterize user characteristics from multiple dimensions.

[0175] Step 902 : extract features from the user data using a second content recall model to obtain a user feature vector corresponding to the user data.

[0176] The second content recall model is trained using knowledge distillation based on the output of the first content recall model. The first content recall model corresponds to at least two content recall targets, and the second content recall model corresponds to a fused recall target, which is obtained by fusing at least two content recall targets. The specific training process for the first and second content recall models can be referenced from the model training method described above and will not be further described in this embodiment.

[0177] In a possible implementation, the computer device vectorizes the user data through the Embedding layer of the user branch in the second content recall model to obtain a user vector, and extracts features from the user vector through the MLP layer to obtain a user feature vector.

[0178] Indicative, such as Figure 10 As shown, the computer device vectorizes the user data through the Embedding layer of the user branch 1010 to obtain a user vector 1011 (a low-dimensional dense vector), and further extracts features from the user vector 1011 through the MLP layer to obtain a user feature vector 1012.

[0179] Step 903 : Determine the target content data to be recalled based on the user feature vector and the fused feature vector corresponding to the content data. The fused feature vector is obtained by extracting features from the content data using the second content recall model.

[0180] In one possible implementation, after the computer device completes the training of the second content recall model, it uses the second content recall model to extract features from the content data, obtains and stores the fused feature vector corresponding to the content data, and when subsequently recalling the content, the computer device performs an inner product operation on the user feature vector and each fused feature vector to obtain a recall score corresponding to the content data (which is positively correlated with the result of the inner product operation), thereby recalling the target content data based on the recall score, wherein the target content data is the content data before the recall score.

[0181] In one possible implementation, to improve the speed of online content recall, a computer uses a second content recall model to perform feature extraction on content data (including historical content data and newly added content data) in a content database. After obtaining a fused feature vector corresponding to the content data, a vector index is created for the fused feature vector and stored in a vector recall index library. Content can then be recalled from this vector recall index library, which can be Faiss.

[0182] Indicative, such as Figure 10 As shown, the computer device vectorizes the content data through the Embedding layer of the fusion feature branch 1020 to obtain a content vector 1021 (a low-dimensional dense vector), and further extracts features from the content vector 1021 through the MLP layer to obtain a fused feature vector 1022. Furthermore, the computer device stores the vector index corresponding to the fused feature vector 1022 in the Faiss vector recall index library 1030.

[0183] Accordingly, when the computer device recalls the target content data, it determines the target vector index from the vector recall index library based on the user feature vector, and recalls the target content data corresponding to the target vector index.

[0184] In one possible implementation, the computer device filters out candidate vector indexes from the vector recall index library based on the user feature vector by using an approximate nearest neighbor search method, and further determines the target vector index from the candidate vector indexes by calculating the inner product of the user feature vector and the content feature vector, thereby recalling the target content data corresponding to the target vector index.

[0185] Indicative, such as Figure 10 As shown, the computer device recalls content from the Faiss vector recall index library 1030 based on the user feature vector, and finally obtains a TopK recall list 1040, which contains the top K content with the highest click-through conversion probability.

[0186] In this embodiment, when using the trained second content recall model for online content recall, only a single fused feature vector needs to be indexed and stored, reducing the occupancy of storage resources, and only the inner product of a single user feature vector and a single fused feature vector needs to be calculated, which helps to improve the speed of content recall.

[0187] In a practical application scenario, the above solution is applied to article recommendation. The average reading time of recommended articles before and after the solution is applied is as follows: Figure 11 As shown in the figure, after applying this application solution, the average reading time of recommended articles increased by 10%, that is, the recommended articles are more in line with the user's interests.

[0188] Figure 12 : is a structural block diagram of a training device for a content recall model provided by an exemplary embodiment of the present application, the device comprising:

[0189] A sample acquisition module 1201 is configured to acquire sample data, wherein the sample data includes sample user data and sample content data, and the sample content data corresponds to at least two content recall targets;

[0190] Model construction module 1202, configured to construct a first content recall model and a second content recall model, wherein the first content recall model corresponds to at least two of the content recall targets, and the second content recall model corresponds to a fusion recall target, wherein the fusion recall target is obtained by fusion of the at least two content recall targets;

[0191] The model training module 1203 is used to train the first content recall model and the second content recall model based on the sample data, wherein the second content recall model is trained based on the output result of the first content recall model using a knowledge distillation method.

[0192] Optionally, the model training module 1203 includes:

[0193] a first loss determining unit, configured to determine a first loss function of the first content recall model under the sample data;

[0194] a second loss determining unit, configured to determine a second loss function of the second content recall model under the sample data based on an output result of the first content recall model;

[0195] a loss fusion unit, configured to fuse the first loss function and the second loss function to obtain a target loss function;

[0196] A training unit is configured to train the first content recall model and the second content recall model based on the target loss function.

[0197] Optionally, the first loss determining unit is configured to:

[0198] Determining at least two single-target probabilities of the first content recall model under the sample data, where the single-target probability refers to the probability that the recalled content meets a single content recall target, and different content recall targets correspond to different single-target probabilities;

[0199] determining a first fusion probability based on at least two of the single-target probabilities, where the first fusion probability refers to a probability that the recalled content simultaneously satisfies at least two of the content recall targets;

[0200] The first loss function is determined based on the first fusion probability and the single target probability.

[0201] Optionally, the second loss determining unit is configured to:

[0202] Determining a second fusion probability of the second content recall model under the sample data, where the second fusion probability refers to a probability that the recalled content meets the fusion recall target;

[0203] The second loss function is determined based on a difference in probability distribution between the first fusion probability and the second fusion probability.

[0204] Optionally, the first loss determination unit is specifically configured to:

[0205] extracting features from the sample user data using the first content recall model to obtain a sample user feature vector;

[0206] Performing feature extraction on the sample content data using the first content recall model to obtain at least two sample content feature vectors, where different content recall targets correspond to different sample content feature vectors;

[0207] The single target probabilities corresponding to at least two content recall targets are determined based on the inner product operation results of the sample user feature vector and each of the sample content feature vectors.

[0208] Optionally, the second loss determination unit is specifically configured to:

[0209] performing feature extraction on the sample user data using the second content recall model to obtain a sample user feature vector;

[0210] performing feature extraction on the sample content data using the second content recall model to obtain a sample fusion feature vector;

[0211] The second fusion probability is determined based on an inner product operation result of the sample user feature vector and the sample fusion feature vector.

[0212] Optionally, the loss fusion unit is configured to:

[0213] The target loss function is obtained by weighted fusion based on the first loss function, the first weight corresponding to the first loss function, the second loss function, and the second weight corresponding to the second loss function.

[0214] Optionally, the device further includes:

[0215] A positive sample selection module, used for randomly selecting positive sample data from the sample data;

[0216] The negative sample selection module is used to select negative sample data according to the sample heat of the sample content data in the sample data, and the selection ratio of the negative sample data is positively correlated with the sample heat.

[0217] Optionally, at least two of the content recall targets include content clicks and content conversions, and the fused recall target is content clicks and conversions.

[0218] Optionally, the first content recall model is a multi-target recall model with shared underlying parameters, or the first content recall model is composed of multiple single-target recall models, and different single-target recall models correspond to different content recall targets.

[0219] To summarize, the embodiment of the present application adopts the knowledge distillation method to distill multiple content recall targets into a single content recall target, and in the content recall model training stage, by constructing a first content recall model corresponding to at least two content recall targets, and a second content recall model corresponding to the fusion recall target, the first content recall model and the second content recall model are trained using sample data, so that the second content recall model learns the knowledge features of the first content recall model through knowledge distillation, thereby having a content recall capability similar to that of the first content recall model; since the second content recall model is essentially a single-target recall model, when the second content recall model is subsequently used for multi-target content recall, the content recall efficiency can be improved while ensuring the accuracy of content recall.

[0220] Figure 13 : is a structural block diagram of a content recall device provided by an exemplary embodiment of the present application, the device comprising:

[0221] A request receiving module 1301 is configured to receive a content recall request, wherein the content recall request includes user data;

[0222] A user feature extraction module 1302 is configured to extract features from the user data using a second content recall model to obtain a user feature vector corresponding to the user data. The second content recall model is trained using knowledge distillation based on the output of the first content recall model. The first content recall model corresponds to at least two content recall targets, and the second content recall model corresponds to a fusion recall target, which is obtained by fusing at least two content recall targets.

[0223] The recall module 1303 is configured to determine target content data to be recalled based on the user feature vector and a fused feature vector corresponding to the content data, where the fused feature vector is obtained by extracting features from the content data using the second content recall model.

[0224] Optionally, the device further includes:

[0225] a content feature extraction module, configured to extract features from the content data in the content database using the second content recall model to obtain the fused feature vector corresponding to the content data;

[0226] An index storage module, configured to create a vector index for the fused feature vector and store the vector index in a vector recall index library;

[0227] The recall module 1303 is used to:

[0228] A target vector index is determined from the vector recall index library based on the user feature vector, and the target content data corresponding to the target vector index is recalled.

[0229] It should be noted that the apparatus provided in the above embodiments is merely exemplified by the division of the above functional modules. In actual applications, the above functions can be distributed among different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The implementation process is detailed in the method embodiments and will not be repeated here.

[0230] Please refer to Figure 14 , which shows a schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application. Specifically, the computer device 1400 includes a central processing unit (CPU) 1401, a system memory 1404 including a random access memory 1402 and a read-only memory 1403, and a system bus 1405 connecting the system memory 1404 and the CPU 1401. The computer device 1400 also includes a basic input / output system (I / O system) 1406 that helps transmit information between various components within the computer, and a mass storage device 1407 for storing an operating system 1413, application programs 1414, and other program modules 1415.

[0231] The basic input / output system 1406 includes a display 1408 for displaying information and an input device 1409, such as a mouse or keyboard, for user input. Both the display 1408 and the input device 1409 are connected to the central processing unit 1401 via an input / output controller 1410 connected to the system bus 1405. The basic input / output system 1406 may also include an input / output controller 1410 for receiving and processing input from a variety of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1410 also provides output to a display screen, printer, or other types of output devices.

[0232] The mass storage device 1407 is connected to the central processing unit 1401 via a mass storage controller (not shown) connected to the system bus 1405. The mass storage device 1407 and its associated computer-readable media provide non-volatile storage for the computer device 1400. In other words, the mass storage device 1407 may include a computer-readable medium (not shown) such as a hard disk or drive.

[0233] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include random access memory (RAM), read-only memory (ROM), flash memory or other solid-state storage technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, tape cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media are not limited to the above-mentioned ones. The above-mentioned system memory 1404 and mass storage device 1407 can be collectively referred to as memory.

[0234] The memory stores one or more programs, and the one or more programs are configured to be executed by one or more central processing units 1401. The one or more programs contain instructions for implementing the above-mentioned methods. The central processing unit 1401 executes the one or more programs to implement the methods provided by the above-mentioned various method embodiments.

[0235] According to various embodiments of the present application, the computer device 1400 may also be connected to a remote computer on a network such as the Internet for operation. That is, the computer device 1400 may be connected to a network 1412 via a network interface unit 1411 connected to the system bus 1405, or the network interface unit 1411 may be used to connect to other types of networks or remote computer systems (not shown).

[0236] The memory also includes one or more programs, which are stored in the memory and include steps executed by a computer device in the method provided in the embodiment of the present application.

[0237] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the content recall model training method described in any of the above embodiments, or to implement the content recall method described in any of the above embodiments.

[0238] Embodiments of the present application provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the content recall model training method described in the above embodiments, or to perform the content recall method described in the above embodiments.

[0239] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing the relevant hardware through a program. The program can be stored in a computer-readable storage medium, which can be the computer-readable storage medium included in the memory in the above embodiments; or it can be a separate computer-readable storage medium that is not installed in the terminal. The computer-readable storage medium stores at least one instruction, at least one program, code set, or instruction set. The at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the method described in any of the above method embodiments.

[0240] Optionally, the computer-readable storage medium may include: ROM, RAM, solid-state drives (SSDs), or optical disks. Among them, RAM may include resistance random access memory (ReRAM) and dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are for descriptive purposes only and do not represent the advantages or disadvantages of the embodiments.

[0241] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0242] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A training method for a content recall model, characterized in that: The method comprises: Acquire sample data, the sample data including sample user data and sample content data, the sample content data corresponding to at least two content recall targets, the sample data including user data, article data, user click behavior data on the article, and user article reading time data; Constructing a first content recall model and a second content recall model, wherein the first content recall model corresponds to at least two of the content recall targets, and the second content recall model corresponds to a fused recall target, wherein the fused recall target is obtained by fusing at least two of the content recall targets. The content recall targets of the first content recall model include article clicks and article reading time reaching a time threshold, and the fused recall targets of the second content recall model include article clicks and article reading time reaching a time threshold. The first content recall model and the second content recall model are trained based on the sample data, wherein the second content recall model is trained based on the output result of the first content recall model using a knowledge distillation method.

2. The method according to claim 1, characterized in that The training of the first content recall model and the second content recall model based on the sample data includes: determining a first loss function of the first content recall model under the sample data; determining a second loss function of the second content recall model under the sample data based on an output result of the first content recall model; Fusing the first loss function and the second loss function to obtain a target loss function; The first content recall model and the second content recall model are trained based on the target loss function.

3. The method according to claim 2, characterized in that Determining a first loss function of the first content recall model under the sample data includes: Determining at least two single-target probabilities of the first content recall model under the sample data, where the single-target probability refers to the probability that the recalled content meets a single content recall target, and different content recall targets correspond to different single-target probabilities; determining a first fusion probability based on at least two of the single-target probabilities, where the first fusion probability refers to a probability that the recalled content simultaneously satisfies at least two of the content recall targets; The first loss function is determined based on the first fusion probability and the single target probability.

4. The method according to claim 3, characterized in that The determining, based on the output result of the first content recall model, a second loss function of the second content recall model under the sample data includes: Determining a second fusion probability of the second content recall model under the sample data, where the second fusion probability refers to a probability that the recalled content meets the fusion recall target; The second loss function is determined based on a difference in probability distribution between the first fusion probability and the second fusion probability.

5. The method according to claim 3, characterized in that The determining of at least two single-target probabilities of the first content recall model under the sample data includes: extracting features from the sample user data using the first content recall model to obtain a sample user feature vector; Performing feature extraction on the sample content data using the first content recall model to obtain at least two sample content feature vectors, where different content recall targets correspond to different sample content feature vectors; The single target probabilities corresponding to at least two content recall targets are determined based on the inner product operation results of the sample user feature vector and each of the sample content feature vectors.

6. The method according to claim 4, characterized in that Determining a second fusion probability of the second content recall model under the sample data includes: performing feature extraction on the sample user data using the second content recall model to obtain a sample user feature vector; performing feature extraction on the sample content data using the second content recall model to obtain a sample fusion feature vector; The second fusion probability is determined based on an inner product operation result of the sample user feature vector and the sample fusion feature vector.

7. The method according to claim 2, characterized in that The fusing the first loss function and the second loss function to obtain a target loss function includes: The target loss function is obtained by weighted fusion based on the first loss function, the first weight corresponding to the first loss function, the second loss function, and the second weight corresponding to the second loss function.

8. The method according to any one of claims 1 to 7, characterized in that: After obtaining the sample data, the method further includes: Randomly selecting positive sample data from the sample data; Negative sample data is selected according to the sample popularity of the sample content data in the sample data, and the selection ratio of the negative sample data is positively correlated with the sample popularity.

9. The method according to any one of claims 1 to 7, characterized in that: At least two of the content recall targets include content clicks and content conversions, and the fusion recall target is content clicks and conversions.

10. A content recall method, characterized in that: The method comprises: receiving a content recall request, wherein the content recall request includes user data; Performing feature extraction on the user data using a second content recall model to obtain a user feature vector corresponding to the user data. The second content recall model is trained using a knowledge distillation method based on the output of the first content recall model on sample data. The sample data includes user data, article data, user click behavior data on the article, and user article reading time data. The first content recall model corresponds to at least two content recall targets, and the second content recall model corresponds to a fusion recall target, which is obtained by fusing at least two content recall targets. The content recall targets of the first content recall model include article clicks and article reading time reaching a time threshold. The fusion recall targets of the second content recall model are article clicks and reading time reaching a time threshold. The target content data to be recalled is determined based on the user feature vector and a fused feature vector corresponding to the content data, wherein the fused feature vector is obtained by performing feature extraction on the content data by the second content recall model.

11. The method according to claim 10, characterized in that The method further comprises: performing feature extraction on the content data in the content database using the second content recall model to obtain the fused feature vector corresponding to the content data; Creating a vector index for the fused feature vector, and storing the vector index in a vector recall index library; The determining of the target content data to be recalled based on the user feature vector and the fused feature vector corresponding to the content data includes: A target vector index is determined from the vector recall index library based on the user feature vector, and the target content data corresponding to the target vector index is recalled.

12. A training device for a content recall model, characterized in that: The device comprises: A sample acquisition module is configured to acquire sample data, wherein the sample data includes sample user data and sample content data, wherein the sample content data corresponds to at least two content recall targets, and the sample data includes user data, article data, user click behavior data on the article, and user article reading time data; a model construction module, configured to construct a first content recall model and a second content recall model, wherein the first content recall model corresponds to at least two of the content recall targets, and the second content recall model corresponds to a fusion recall target, wherein the fusion recall target is obtained by fusion of the at least two content recall targets; A model training module is used to train the first content recall model and the second content recall model based on the sample data, wherein the second content recall model is trained based on the output result of the first content recall model using a knowledge distillation method, the content recall target of the first content recall model includes article clicks and article reading time reaching a time threshold, and the fusion recall target of the second content recall model is article clicks and reading time reaching a time threshold.

13. A content recall device, characterized in that: The device comprises: a request receiving module, configured to receive a content recall request, wherein the content recall request includes user data; A user feature extraction module is configured to extract features from the user data using a second content recall model to obtain a user feature vector corresponding to the user data. The second content recall model is trained using a knowledge distillation method based on the output of the first content recall model on sample data. The sample data includes user data, article data, user click behavior data on the article, and user article reading time data. The first content recall model corresponds to at least two content recall targets, and the second content recall model corresponds to a fusion recall target, which is obtained by fusing at least two content recall targets. The content recall targets of the first content recall model include article clicks and article reading time reaching a time threshold. The fusion recall targets of the second content recall model are article clicks and reading time reaching a time threshold. The recall module is configured to determine target content data to be recalled based on the user feature vector and a fused feature vector corresponding to the content data, wherein the fused feature vector is obtained by extracting features from the content data using the second content recall model.

14. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the training method of the content recall model as described in any one of claims 1 to 9, or to implement the content recall method as described in any one of claims 10 to 11.

15. A computer-readable storage medium, characterized in that The readable storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the content recall model training method as described in any one of claims 1 to 9, or to implement the content recall method as described in any one of claims 10 to 11.

Citation Information

Patent Citations

  • Information recommendation method and device, electronic equipment and storage medium

    CN111209477A

  • Search sorting method and device, computer equipment and storage medium

    CN111538908A