Content recommendation method, recommendation network training method and device

Feature extraction and weighted fusion are performed through expert nuclear networks, which solves the problem of insufficient user and material interaction information in the double tower model, and achieves more accurate content recommendations.

CN120336633APending Publication Date: 2025-07-18BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510450532.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The existing double tower model cannot fully capture the fine-grained interaction information between the user and the material in the content recommendation, resulting in poor accuracy of the coarse arrangement results.

Method used

Feature extraction is performed using the expert core network, and the user and content type characteristics are fused through the feature extraction module in the expert core network, and the user's interest characteristics in different content types are captured, and weighted fusion is performed based on the correlation between the candidate recommended content and the content type, so as to predict the probability of users' interest in content.

Benefits of technology

Improve the accuracy of content recommendations, can more fully capture the fine-grained interactive information between users and candidate recommendation content, and dynamically adjust user characteristics to improve recommendation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336633A_ABST
    Figure CN120336633A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a content recommendation method and device and a recommendation network training method and device, and the method comprises the steps: obtaining object related information of a target object, and extracting an initial object feature based on the object related information, performing feature extraction on the initial object feature and the type feature of the content type corresponding to the expert core network based on a feature extraction module in each expert core network to obtain a first object feature of the target object corresponding to the content type; based on the correlation between the content feature of each candidate recommendation content and the type feature of each content type, weighting the first object feature, corresponding to each content type, of the target object to obtain the target object feature, corresponding to the candidate recommendation content, of the target object; and on the basis of target object features and the content features of the candidate recommended content, predicting the probability of interest of the target object in the candidate recommended content to determine a recommended content set of the target object. Based on the method, the accuracy of content recommendation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer technology and may involve the fields of information recommendation and artificial intelligence technology. Specifically, this application relates to a content recommendation method, a training method for a recommendation network, and an apparatus therefor. Background Art

[0002] In large-scale sorting scenarios such as search, recommendation, and advertising, a funnel-shaped cascaded sorting structure has become a standard architecture. The cascaded sorting structure usually includes four stages: recall, rough ranking, fine ranking, and re-ranking. Among them, rough ranking plays an important role in connecting the previous and the following.

[0003] In related technologies, a two-tower model is usually adopted in the rough ranking stage. This model inputs user-side features and item-side features into two independent "towers" for processing respectively, and finally calculates the matching score between the user and the item through simple interaction.

[0004] However, due to limited interaction between the two towers of the two-tower model, the model cannot fully capture the fine-grained interaction information between the user and the item, resulting in poor accuracy of the rough ranking result. Summary of the Invention

[0005] The purpose of the embodiments of this application is to provide a content recommendation method, a training method for a recommendation network, and an apparatus therefor that can effectively improve the accuracy of content recommendation. To achieve this purpose, the technical solutions provided by the embodiments of this application are as follows: On the one hand, the embodiments of this application provide a content recommendation method, including: Obtain object-related information of a target object and a plurality of candidate recommended contents; For each of the candidate recommended contents, obtain the content feature of the candidate recommended content and the correlation between the content feature of the candidate recommended content and the type features of each content type among a plurality of content types; Extract features from the object-related information of the target object to obtain an initial object feature of the target object; Based on the feature extraction module in each expert kernel network, extract features from the initial object feature of the target object and the type feature of the content type corresponding to the expert kernel network to obtain a first object feature of the target object corresponding to the content type; For each of the candidate recommended contents, based on the correlation between the content feature of the candidate recommended content and the type features of each content type, perform weighted fusion on the first object features of the target object corresponding to each content type to obtain a target object feature of the target object corresponding to the candidate recommended content; according to the target object feature and the content feature of the candidate recommended content, predict the probability that the target object is interested in the candidate recommended content; Determine the recommended content set of the target object from the multiple candidate recommended contents based on the probability of interest of the target object in each candidate recommended content.

[0006] On the other hand, an embodiment of the present application further provides a content recommendation device, and the device includes: A first acquisition module, configured to acquire object-related information of a target object and multiple candidate recommended contents; A second acquisition module, configured to, for each candidate recommended content, acquire the content feature of the candidate recommended content and the correlation between the content feature of the candidate recommended content and the type features of each content type in multiple content types; A first feature extraction module, configured to perform feature extraction on the object-related information of the target object to obtain an initial object feature of the target object; A second feature extraction module, configured to, based on the feature extraction module in each expert kernel network, perform feature extraction on the initial object feature of the target object and the type feature of the content type corresponding to the expert kernel network to obtain a first object feature of the target object corresponding to the content type; An interest probability estimation module, configured to, for each candidate recommended content, based on the correlation between the content feature of the candidate recommended content and the type features of each content type, perform weighted fusion on the first object features of the target object corresponding to each content type to obtain a target object feature of the target object corresponding to the candidate recommended content; and predict the probability of interest of the target object in the candidate recommended content according to the target object feature and the content feature of the candidate recommended content; A content recommendation module, configured to determine the recommended content set of the target object from the multiple candidate recommended contents based on the probability of interest of the target object in each candidate recommended content.

[0007] Optionally, the second feature extraction module may be configured to: For the content type corresponding to each expert kernel network, determine the correlation between the initial object feature of the target object and the type feature of the content type corresponding to the expert kernel network, and perform weighted fusion on the initial object feature of the target object based on the correlation; and perform feature extraction on the weighted fusion object feature through the feature extraction module in the expert kernel network to obtain a first object feature of the target object corresponding to the content type.

[0008] Optionally, the second acquisition module may be configured to: Determine the content identifier of the candidate recommended content; Query the content identifier of the candidate recommended content in the feature database; wherein, the feature database pre-stores the content identifiers of multiple contents, the content features corresponding to each content identifier, and the correlation between the content features and the type features of each content type. If the content identifier of the candidate recommended content is queried in the feature database, then use the content features corresponding to the content identifier in the feature database and the correlation between the content features and the type features of each content type as the content features of the candidate recommended content and the correlation between the content features of the candidate recommended content and the type features of each content type. If the content identifier of the candidate recommended content is not queried in the feature database, obtain the content-related information of the candidate recommended content, perform feature extraction on the content-related information of the candidate recommended content to obtain the content features of the candidate recommended content, and determine the correlation between the content features of the candidate recommended content and the type features of each content type.

[0009] Optionally, the content recommendation device further includes a training module, and the training module can be used for: Obtain multiple samples with a first label, where each sample includes the object-related information of a sample object and the content-related information of multiple sample contents, and the first label of each sample includes the true interest probability of the sample object in each sample content. Based on the multiple samples, continuously perform training operations on the first recommendation network to be trained to obtain a trained first recommendation network: wherein, the first recommendation network includes the multiple expert kernel networks; the training operations include: For each sample, perform feature extraction on the object-related information of the sample to obtain the initial object feature of the sample object in the sample; based on the feature extraction module of each expert kernel network, perform feature extraction on the initial object feature of the sample object and the type features of the content type corresponding to the expert kernel network to obtain the first object feature of the sample object corresponding to the content type; for each sample content in the sample, perform feature extraction on the content-related information of the sample content to obtain the content features of the sample content, and according to the correlation between the content features of the sample content and the type features of each content type, perform weighted fusion on the first object features of the sample object corresponding to each content type to obtain the target object feature of the sample object corresponding to the sample content, and based on the target object feature and the content features of the sample content, obtain the predicted interest probability of the sample object in the sample content. Determine the total training loss based on the predicted interest probabilities of each sample content for the sample objects in each sample and the first label of each sample, and adjust the network parameters of the first recommendation network based on the total training loss; wherein, the network parameters of the first recommendation network include the network parameters of each expert kernel network, and the network parameters of each expert kernel network include the network parameters of the feature extraction module of the expert kernel network and the type features of the content type corresponding to the expert kernel network.

[0010] Optionally, the first recommendation network further includes an initial object feature extraction module, a content feature extraction module, a feature fusion module, and a prediction module; for each sample, the initial object feature of the sample object in the sample is extracted by the initial object feature extraction module, and the content features of each sample content are extracted by the content feature extraction module; for each sample content in the sample, the target object feature corresponding to the sample object for the sample content is obtained by feature fusion through the feature fusion module, and the predicted interest probability of the sample object for the sample content is predicted by the prediction module; Wherein, for each candidate recommended content, the content feature of the candidate recommended content and the correlation between the content feature of the candidate recommended content and the type features of each content type are obtained by the following method: Obtain the content-related information of the candidate recommended content, and extract the content feature of the candidate recommended content by the content feature extraction module of the trained first recommendation network for the content-related information of the candidate recommended content; For each content type, determine the correlation between the content feature of the candidate recommended content and the type features of each content type according to the content feature of the candidate recommended content and the type feature of the content type after training.

[0011] Optionally, each sample also has a second label, and the second label of each sample includes the reference sorting result of each sample content in the sample, and the reference sorting result is the sorting result of the interest probabilities predicted by the trained second recommendation network for the sample object in the sample for each sample content; The training module can also be used for: For each sample, sort each sample content in the sample according to the predicted interest probability of the sample object in the sample for each sample content, and obtain the predicted sorting result of each sample content in the sample; Determine the first training loss according to the predicted interest probabilities of the sample objects in each sample for each sample content and the first label of each sample; Determine the second training loss according to the difference between the predicted sorting results of each sample and the second label of each sample; Determine the total training loss based on the first training loss and the second training loss.

[0012] Optionally, the training module can be used to: Based on the multiple samples, continuously perform training operations on the first recommendation network to be trained until a first preset condition is met; For each of at least some of the samples, determine at least one of the first difference or the target proportion corresponding to the sample; According to at least one of the first differences or the target proportions corresponding to each sample, determine the performance evaluation result of the first recommendation network that meets the first preset condition; If the performance evaluation result meets the second preset condition, use the first recommendation network when the first preset condition is met as the trained first recommendation network; If the performance evaluation result does not meet the second preset condition, continue to perform training operations on the first recommendation network until the performance evaluation result of the trained first recommendation network meets the second preset condition; For each sample, at least one of the first difference or the target proportion corresponding to the sample is determined by the following method: Obtain the reference interest probability of the sample object in the sample for each sample content, and determine the first difference between the reference interest probability of the sample object in the sample for each sample content and the predicted interest probability; the predicted interest probability of the sample object in the sample content is obtained through the first recommendation network; According to the predicted interest probabilities of each sample content in the sample in descending order, determine the first set of sample content with the top first quantity, and determine the first proportion of the sample content that has not been exposed in the sample content set, or the second proportion of the sample content that the sample object is truly interested in in the sample content set; wherein, the target proportion includes at least one of the first proportion or the second proportion, and each sample also has a third label, and the third label of each sample includes whether each sample content in the sample has been exposed.

[0013] Optionally, the multiple samples are obtained by the following method: Obtain information query requests of multiple query request objects; wherein, each of the information query requests carries a query keyword; For each information query request, perform a query operation on the content database based on the query keyword in the information query request to obtain multiple contents associated with the query keyword; For each information query request, obtain the relevant information of the query request object of the information query request and the content-related information of multiple retrieved contents. Use the query request object of the query request as a sample object, and obtain a sample according to the relevant information of the query request object and the content-related information of multiple retrieved contents.

[0014] On the other hand, an embodiment of the present application further provides a training method for a recommendation network, and the method includes: Obtain multiple samples with a first label. Each sample includes the object-related information of a sample object and the content-related information of multiple sample contents. The first label of each sample includes the true interest probability of the sample object in each sample content. Based on the multiple samples, continuously perform training operations on the first recommendation network to be trained to obtain a trained first recommendation network; wherein, the first recommendation network includes multiple expert kernel networks. Wherein, the training operation includes: For each sample, perform feature extraction on the object-related information of the sample to obtain the initial object feature of the sample object in the sample; based on the feature extraction module of each expert kernel network, perform feature extraction on the initial object feature of the sample object and the type feature of the content type corresponding to the expert kernel network to obtain the first object feature of the sample object corresponding to the content type; for each sample content in the sample, perform feature extraction on the content-related information of the sample content to obtain the content feature of the sample content, and according to the correlation between the content feature of the sample content and the type features of each content type, perform weighted fusion on the first object features of the sample object corresponding to each content type to obtain the target object feature of the sample object corresponding to the sample content, and based on the target object feature and the content feature of the sample content, obtain the predicted interest probability of the sample object in the sample content. Determine the total training loss according to the predicted interest probabilities of the sample objects in each sample in each sample content and the first labels of each sample, and based on the total training loss, adjust the network parameters of the first recommendation network; wherein, the network parameters of the first recommendation network include the network parameters of each expert kernel network, and the network parameters of each expert kernel network include the network parameters of the feature extraction module of the expert kernel network and the type feature of the content type corresponding to the expert kernel network.

[0015] Optionally, based on the multiple samples, continuously perform the following training operations on the first recommendation network to be trained to obtain a trained first recommendation network, including: Based on the multiple samples, continuously perform training operations on the first recommendation network to be trained until a first preset condition is met. For each sample in at least part of the samples, determine at least one of the first difference or the target proportion corresponding to the sample; According to at least one of the first differences or the target proportions corresponding to each sample, determine the performance evaluation result of the first recommendation network that meets the first preset condition; If the performance evaluation result meets the second preset condition, use the first recommendation network when it meets the first preset condition as the trained first recommendation network; If the performance evaluation result does not meet the second preset condition, continue to perform a training operation on the first recommendation network until the performance evaluation result of the trained first recommendation network meets the second preset condition; For each sample, at least one of the first difference or the target proportion corresponding to the sample is determined by the following method: Obtain the reference interest probability of the sample object in the sample for each sample content, and determine the first difference between the reference interest probability and the predicted interest probability of the sample object for each sample content; the predicted interest probability of the sample object for the sample content is obtained through the first recommendation network; According to the order of the predicted interest probabilities of each sample content in the sample from large to small, determine the first set of sample content with the top first quantity, and determine the first proportion of the sample content that has not been exposed in the sample content set, or the second proportion of the sample content that the sample object is truly interested in in the sample content set; wherein, the target proportion includes at least one of the first proportion or the second proportion, and each sample also has a third label, and the third label of each sample includes whether each sample content in the sample has been exposed.

[0016] Optionally, the multiple samples are obtained by the following method: Obtain information query requests of multiple query request objects; wherein each of the information query requests carries a query keyword; For each information query request, perform a query operation on the content database based on the query keyword in the information query request to obtain multiple contents associated with the query keyword; For each information query request, obtain the relevant information of the query request object of the information query request and the content relevant information of the multiple contents obtained by the query, use the query request object of the information query request as a sample object, and obtain a sample according to the relevant information of the query request object and the content relevant information of the multiple contents obtained by the query.

[0017] On the other hand, an embodiment of the present application also provides a training device for a recommendation network, and the device includes: A sample acquisition module, configured to acquire a plurality of samples with a first label. Each sample includes object-related information of a sample object and content-related information of a plurality of sample contents. The first label of each sample includes the true interest probability of the sample object in each sample content in the sample. A training module, configured to, based on the plurality of samples, continuously perform a training operation on a first recommendation network to be trained to obtain a trained first recommendation network. The first recommendation network includes a plurality of expert kernel networks. The training operation includes: for each sample, extracting features from the object-related information of the sample to obtain an initial object feature of the sample object in the sample; based on the feature extraction module of each expert kernel network, extracting features from the initial object feature of the sample object and the type feature of the content type corresponding to the expert kernel network to obtain a first object feature of the sample object corresponding to the content type; for each sample content in the sample, extracting features from the content-related information of the sample content to obtain a content feature of the sample content, and based on the correlation between the content feature of the sample content and the type features of each content type, performing weighted fusion on the first object features of the sample object corresponding to each content type to obtain a target object feature of the sample object corresponding to the sample content, and based on the target object feature and the content feature of the sample content, obtaining a predicted interest probability of the sample object in the sample content; according to the predicted interest probabilities of the sample objects in each sample content in each sample and the first labels of each sample, determining a total training loss, and based on the total training loss, adjusting the network parameters of the first recommendation network. The network parameters of the first recommendation network include the network parameters of each expert kernel network, and the network parameters of each expert kernel network include the network parameters of the feature extraction module of the expert kernel network and the type feature of the content type corresponding to the expert kernel network.

[0018] Optionally, the first recommendation network further includes an initial object feature extraction module, a content feature extraction module, a feature fusion module, and a prediction module. The training module can be configured to: For each sample, based on the object-related information of the sample, extracting features through the initial object feature extraction module to obtain an initial object feature of the sample object. For each sample content in each sample, based on the content-related information of the sample content, extracting features through the content feature extraction module to obtain a content feature of the sample content. For each sample content in each sample, the feature fusion module determines the correlation between the content feature of the sample content and the type features of each content type, and performs weighted fusion on the first object features corresponding to each content type of the sample object based on the determined correlation to obtain the target object feature corresponding to the sample content of the sample object; For each sample content in each sample, based on the target object feature and the content feature of the sample content, the prediction module determines the predicted interest probability of the sample object for the sample content.

[0019] Optionally, each sample also has a second label, and the second label of each sample includes the reference sorting result of each sample content in the sample. The reference sorting result is the sorting result of the interest probabilities of the sample objects in the sample for each sample content predicted by the trained second recommendation network; The training module can also be used for: For each sample, sort each sample content in the sample according to the predicted interest probability of the sample object in the sample for each sample content to obtain the predicted sorting result of each sample content in the sample; The determining of the total training loss according to the predicted interest probabilities of the sample objects in each sample for each sample content and the first labels of each sample includes: Determine the first training loss according to the predicted interest probabilities of the sample objects in each sample for each sample content and the first labels of each sample; Determine the second training loss according to the difference between the predicted sorting result of each sample and the second label of each sample; Based on the first training loss and the second training loss, determine the total training loss.

[0020] An embodiment of the present application also provides an electronic device, which includes a memory and a processor. A computer program is stored in the memory, and the processor executes the computer program to implement the method provided in any optional embodiment of the present application.

[0021] On the other hand, an embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, it implements the method provided in any optional embodiment of the present application.

[0022] On the other hand, an embodiment of the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the method provided in any optional embodiment of the present application.

[0023] The beneficial effects brought by the technical solution provided by the embodiment of the present application are as follows: The content recommendation method provided by the embodiments of the present application extracts initial object features based on object-related information of a target object, and uses the feature extraction module in each expert kernel network to extract the initial object features of the target object and the type features of the content type corresponding to the expert kernel network, captures the interest features of the target object corresponding to different content types, and based on the correlation between the content features of candidate recommended content and the type features of each content type, fuses the interest features of the target object for different content types to obtain the target object features of the target object corresponding to the candidate recommended content, which can more fully capture the fine-grained interaction information between the target object and the candidate recommended content, enabling the object features of the target object to be dynamically adjusted according to different candidate recommended content, and improving the accuracy of content recommendation. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for the description of the embodiments of the present application.

[0025] Figure 1 Schematic diagram of an implementation environment applicable to the embodiments of the present application; Figure 2 Schematic flowchart of a training method for a recommendation network provided by the embodiments of the present application; Figure 3 Network architecture diagram of a first recommendation network provided by the embodiments of the present application; Figure 4 Another network architecture diagram of a first recommendation network provided by the embodiments of the present application; Figure 5 Schematic diagram of a sample construction process provided by the embodiments of the present application; Figure 6 Schematic flowchart of a content recommendation method provided by the embodiments of the present application; Figure 7 Schematic flowchart of a content query provided by the embodiments of the present application; Figure 8 Schematic diagram of a query interface provided by the embodiments of the present application; Figure 9 Schematic diagram of the structure of a training device for a recommendation network provided by the embodiments of the present application; Figure 10 Schematic diagram of the structure of a content recommendation device provided by the embodiments of the present application; Figure 11 Schematic diagram of the structure of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0026] The embodiments of the present application will be described below with reference to the accompanying drawings in the present application. It should be understood that the embodiments described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions of the embodiments of the present application.

[0027] Those skilled in the art of the present technology can understand that, unless specifically stated otherwise, the singular forms "a", "an", "the" and "said" used herein may also include the plural forms. It should be further understood that the terms "comprising" and "including" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements, and / or components, but do not exclude the implementation of other features, information, data, steps, operations, elements, components, and / or their combinations supported by the art of the present technology. It should be understood that when we say an element is "connected" or "coupled" to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used here can include wireless connection or wireless coupling. The term "and / or" used here indicates at least one of the items defined by the term, for example, "A and / or B" can be implemented as "A", or implemented as "B", or implemented as "A and B". When describing multiple (two or more) items, if the relationship between the multiple items is not clearly defined, the multiple items can refer to one, multiple, or all of the multiple items. For example, for the description of "parameter A includes A1, A2, A3", it can be implemented that parameter A includes A1 or A2 or A3, and it can also be implemented that parameter A includes at least two of the three items of parameter A1, A2, and A3.

[0028] To better understand and illustrate the method provided by the embodiments of the present application, some technical terms involved in the embodiments of the present application will be explained and described below.

[0029] Coarse ranking: Use multiple strategies to preliminarily screen the recalled content to be recommended, quickly and efficiently narrow the range of candidate recommended content, so as to reduce the computational burden in the fine ranking stage.

[0030] Fine ranking: On the basis of coarse ranking, through complex models and richer features, accurately predict indicators such as the click-through rate and conversion rate of each recommended content, and obtain a more refined ranking.

[0031] Sample Selection Bias (SSB): Since the sample space for model training is inconsistent with the sample space during inference, the model is unable to process unseen samples and performs poorly in actual applications.

[0032] Near-line calculation: A compromise calculation mode between online calculation and offline calculation. Compared with online calculation, since online calculation needs to respond to user requests within an extremely short time, the models used are usually relatively simple. If we want to improve the model complexity to enhance the model performance, a large amount of computing resources need to be invested. However, near-line calculation does not require immediate calculation for each request. It allows the calculation results to be cached in advance and directly used later. Compared with offline calculation, the data update frequency of offline calculation is relatively low, and it is usually difficult to capture the dynamic changes of object features in a timely manner. Near-line calculation, on the other hand, has stronger timeliness and can respond more quickly to the changes of object features.

[0033] Multi-gate Mixture-of-Experts (MMoE): A multi-objective model structure that can effectively handle the task correlation and task conflict problems in multi-task learning by introducing multiple expert networks and gating mechanisms.

[0034] Area Under Curve (AUC): An evaluation metric for measuring the quality of binary classification models. By comparing the results of rough ranking and fine ranking, it measures whether the rough ranking model can rank the high-quality content (TopN) recognized by the fine ranking in the front.

[0035] Redis: A non-relational database that runs based on memory and uses the key-value storage form, with extremely high data read and write speeds.

[0036] Hadoop Distributed File System (HDFS): It can store data distributively on multiple nodes to achieve redundant backup and parallel processing of data, so as to improve the data availability and processing efficiency.

[0037] Bayesian Personalized Ranking loss (BPR Loss): It makes the score difference between positive samples and negative samples as large as possible, so as to learn the user's personalized preferences.

[0038] DCG (Discounted Cumulative Gain) is a commonly used evaluation metric in information retrieval and recommendation systems, which is used to measure the quality and ranking rationality of search results or recommendation lists. Its core idea is that when highly relevant results are ranked in the front, they should obtain higher scores, and the contribution of results ranked later to the total score should be discounted.

[0039] The content recommendation method provided in the embodiment of the present application can be applied to various information recommendation scenarios, such as news, advertising push, product search, etc. As an example, Figure 1 A schematic diagram of an implementation environment applicable to the present application is provided, wherein the implementation environment includes a server 10 and a terminal 20, wherein a client supporting information query / search functions, such as a browser, an e-commerce client, a music client, etc., is installed or running in the terminal 20, and the server 10 is a background server that provides information query functions, and multiple trained expert core networks are deployed in the server 10.

[0040] When the server 10 receives an information query request sent by the user through the terminal 20, the server 10 can perform a query operation on the content database according to the query keyword carried in the information query request, obtain multiple candidate recommended contents associated with the query keyword, and query the feature database for content features corresponding to the content identifier of each candidate recommended content, as well as the correlation between the content features of each candidate recommended content and the type features of each content type in multiple content types; and obtain relevant information of the user according to the user identifier carried in the information query request.

[0041] The user's relevant information is input into the embedding layer to extract the user's initial object features. The feature extraction module in each virtual-kernal expert (VKE) network extracts the user's initial object features and the type features of the content type corresponding to the virtual-kernal expert network to obtain the user's first object features corresponding to the content type. For each recalled candidate recommended content, based on the correlation between the content features of the candidate recommended content and the type features of each content type, the first object features output by each VKE network are weighted and fused to obtain the user's target object features (user embedding) corresponding to the candidate recommended content. According to the content features (item embedding) of the candidate recommended content and the user's target object features (user embedding) corresponding to the candidate recommended content, the user's interest probability in the candidate recommended content is determined; the server 10 can select a preset number of candidate recommended contents with the highest ranking according to the predicted probability of the user's interest in each candidate recommended content from large to small, as a recommended content set recommended to the user, wherein the recommended content set includes multiple target recommended contents.

[0042] Optionally, in order to further improve the quality of content recommendations, after determining a preset number of candidate recommended contents (rough ranking results) with high rankings based on the predicted probability of interest, each determined candidate recommended content can be further refined, and a recommended content set can be determined based on the refined ranking results of each candidate recommended content.

[0043] Among them, the above-mentioned server 10 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server. The terminal 20 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart voice interaction device (such as a smart speaker), a wearable electronic device (such as a smart watch), a vehicle-mounted terminal, a smart home appliance (such as a smart TV), an AR / VR device, etc., but is not limited thereto.

[0044] The above-mentioned terminal 20 and the server 10 can be directly or indirectly connected through wired or wireless communication means. For example, they can be connected through a wired network or a wireless network. Among them, the wired network may include a local area network, a metropolitan area network, a wide area network, etc., and the wireless network may include Bluetooth, WIFI, and other networks that implement wireless communication.

[0045] The technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application will be described below through the description of several embodiments. It should be noted that the following embodiments can refer to, draw on, or combine with each other. For the same terms, similar features, and similar implementation steps in different embodiments, they will not be described repeatedly.

[0046] The embodiment of the present application provides a method for training a recommendation network. This method can be executed by any electronic device. For example, it can be executed by Figure 1 the server in

[0047] Figure 2 is a schematic flowchart of the method for training a recommendation network provided by the embodiment of the present application. As Figure 2 shown, this method may include the following steps S110-step S120, where: Step S110: Obtain a plurality of samples with a first label. Each sample includes object-related information of a sample object and content-related information of a plurality of sample contents. The first label of each sample includes the true interest probability of the sample object in each sample content.

[0048] Among them, the sample object is the recommended sample user. The object-related information of the sample object includes one or more of user gender, age, city where located, user ID, type of device used, and historical behavior sequence, etc. The sample content is any form of content to be recommended, such as news, products, videos, etc. The content-related information of the sample content includes content attribute information, content feedback information, etc. For example, when the sample content is a product, the content-related information of the sample content may include product ID, product sales volume, product favorable comment rate, product category, product shipping location, etc. When the sample content is news, the content-related information of the sample content may include news title, news type, number of likes, number of comments, number of words in the news, etc.

[0049] For each sample, the first label of the sample indicates the true click situation of the sample object in the sample content. If the sample object clicks on the sample content, the true interest probability of the sample object in the sample content is 1, otherwise it is 0.

[0050] Step S120: Based on multiple samples, continuously perform training operations on the first recommendation network to be trained to obtain the trained first recommendation network, where the first recommendation network includes multiple expert kernel networks.

[0051] Among them, the training operations include: Step S1201: For each sample, perform feature extraction on the object-related information of the sample to obtain the initial object feature of the sample object in the sample; based on the feature extraction module of each expert kernel network, perform feature extraction on the initial object feature of the sample object and the type feature of the content type corresponding to the expert kernel network to obtain the first object feature of the sample object corresponding to the content type; for each sample content in the sample, perform feature extraction on the content-related information of the sample content to obtain the content feature of the sample content, and according to the correlation between the content feature of the sample content and the type features of each content type, perform weighted fusion on the first object features of the sample object corresponding to each content type to obtain the target object feature of the sample object corresponding to the sample content, and based on the target object feature and the content feature of the sample content, obtain the predicted interest probability of the sample object in the sample content.

[0052] Step S1202: Determine the total training loss according to the predicted interest probabilities of the sample objects in the sample contents in each sample and the first labels of each sample, and based on the total training loss, adjust the network parameters of the first recommendation network. Among them, the network parameters of the first recommendation network include the network parameters of each expert kernel network, and the network parameters of each expert kernel network include the network parameters of the feature extraction module of the expert kernel network and the type feature of the content type corresponding to the expert kernel network.

[0053] Among them, the content type can be divided according to different themes, styles, or forms of expression of the content. For example, according to different themes, the divided content types include: sports, movies, music, fashion, etc. The type characteristics of the content type can be the feature parameters obtained through training. Each network parameter of each expert kernel network includes the type characteristics of a content type corresponding to the expert kernel (also referred to as the virtual kernel parameter of the expert kernel network).

[0054] In the embodiment of the present application, after obtaining the initial object characteristics of the sample object in each sample, the initial object characteristics of the sample object can be respectively input into each expert kernel network for feature extraction. Specifically, for each expert kernel network, determine the type characteristics of the content type corresponding to the expert kernel network, that is, the virtual kernel parameter to be trained, and input the initial object characteristics of the sample object and the virtual kernel parameter into the feature extraction module of the expert kernel network to obtain the first object characteristics of the sample object corresponding to the content type.

[0055] Optionally, when extracting the first object characteristics through the expert kernel network, for each sample and the content type corresponding to each expert kernel network, the correlation between the initial object characteristics of the sample object and the type characteristics of the content type can be determined first, and based on the correlation between the initial object characteristics of the sample object and the type characteristics of the content type, the initial object characteristics of the sample object are weighted and fused to obtain the weighted and fused object characteristics; the feature extraction module in the expert kernel network is used to extract the features of the weighted and fused object characteristics to obtain the first object characteristics of the sample object corresponding to the content type. Among them, the first object characteristics of the sample object corresponding to each content type represent the interest representation of the sample object for the content type.

[0056] Optionally, each expert kernel network may further include a first attention network. For each sample and the content type corresponding to each expert kernel network, the initial object characteristics of the sample object and the type characteristics of the content type can be input into the first attention network of the expert kernel network. The first attention network is used to determine the correlation between the initial object characteristics of the sample object and the type characteristics of the content type, and perform attention weighting on the initial object characteristics of the sample object based on the determined correlation to obtain the weighted and fused object characteristics.

[0057] In the embodiment of the present application, the first recommendation network to be trained (also referred to as the ranking model) may further include an initial object feature extraction module, a content feature extraction module, a feature fusion module, and a prediction module, as Figure 3As shown in the figure. For each sample, the object-related information of the sample object in the sample is input into the initial object feature extraction module, and the initial object feature of the sample object is extracted. The extracted initial object features are respectively input into each expert kernel network, and each expert kernel network extracts features from the initial object feature and the type feature (virtual kernel parameter) of the content type corresponding to the expert kernel network, so as to obtain the first object feature of the sample object corresponding to the content type. For each sample content in the sample, the content-related information of the sample content is input into the content feature extraction module to obtain the content feature of the sample content. The content feature of the sample content and the first object features of the sample object corresponding to each content type are input into the feature fusion module. The feature fusion module determines the correlation between the content feature of the sample content and the type features of each content type, and performs weighted fusion on the first object features of the sample object corresponding to each content type based on the determined correlation, so as to obtain the target object feature of the sample object corresponding to the sample content. Among them, the type features of each content type can be the network parameters in the feature fusion module, or can also be input into the feature fusion module together with the content features. The target object features of the sample object corresponding to different sample contents are different, indicating that the user has different feature representations when facing different contents. Finally, the target object feature of the sample object corresponding to the sample content and the content feature of the sample content are input into the prediction module to obtain the predicted interest probability of the sample object for the sample content.

[0058] Optionally, the content feature extraction module may include a first feature extraction sub-module and a second feature extraction sub-module. For each sample content in each sample, the content-related information of the sample content is input into the first feature extraction sub-module to obtain the initial content feature of the sample content. The initial content feature of the sample content is input into the second feature extraction sub-module to obtain the target content feature of the sample content, and the target content feature of the sample content is used as the content feature corresponding to the sample content.

[0059] In the embodiment of the present application, when predicting the interest probability through the prediction module, the similarity between the target object feature of the sample object and the content feature (target content feature) of each sample content can be determined, and the similarity between the target object feature and the content feature of each sample content is used as the predicted interest probability of the sample object for the sample content. Among them, the greater the similarity, the higher the predicted interest probability.

[0060] Figure 4The figure is a network architecture diagram of a first recommendation network provided by an embodiment of this application. The first recommendation network is a network based on the Two-Tower structure, mainly including two parts: a User Tower network (initial object feature extraction module + multiple expert core networks + feature fusion module) and an Item Tower network (content feature extraction module).

[0061] Among them, the Item Tower network includes an Embedding Layer2 (first feature extraction sub-module) and an item network (second feature extraction sub-module). For each item in each sample, the relevant information of the item is input into the Embedding Layer2 to obtain the item feature embedding (initial content feature) of the item. Then, the item feature embedding is input into the item network to obtain the item embedding (target content feature / corresponding content feature).

[0062] Among them, the User Tower network includes an Embedding Layer1 (initial object feature extraction module), multiple Virtual Kernal Experts (VKE) networks, and a Virtual KernalGate (VKG) network (feature fusion module). Each VKE network corresponds to a virtual kernel parameter (Virtual Kernal, type feature of content type / theme feature of theme). As shown in the figure, the virtual kernel parameter in the VKE-1 network is Virtual Kernal-1, and the virtual kernel parameter in the VKE-2 network is Virtual Kernal-2.

[0063] For each sample user user in a sample, the relevant information of the user is input into the EmbeddingLayer1 to obtain a user feature embedding (initial object feature). Then, the user feature embedding is respectively input into each VKE network to calculate the correlation between the virtual kernel parameter Virtual Kernal in each VKE network and the initial object feature user feature embedding. Based on the determined correlation, attention weighting is performed on the initial object feature user feature embedding to obtain a weighted and fused object feature. The weighted and fused object feature is subjected to feature extraction through the feature extraction module (user network) in the VKE network to obtain a VKE output (the first object feature corresponding to a sample object for a content type), which represents the interest feature representation of the user under a certain topic. Then, the outputs VKE outputs of each VKE network, the Virtual Kernal corresponding to each VKE network respectively, and the item embedding are input into the VKG network to obtain a user embedding (the target object feature corresponding to the sample object for the sample content).

[0064] Finally, for each sample content, based on the user embedding corresponding to the sample user for the sample content and the item embedding of the sample content, the probability that the sample user is interested in the sample content is predicted. According to the probability that the sample user in each sample is interested in each sample content and the label of each sample (the true probability that the sample user is interested in each sample content), the first training loss is determined, and the total training loss is determined based on the first training loss. The network parameters of the first recommendation network are adjusted based on the total training loss. Among them, the network parameters of the first recommendation network include the network parameters in the Embedding Layer1, Embedding Layer2, multiple VKE networks, VKG network, and Item network. The network parameters of the VKE network include the virtual kernel parameter and the network parameters of the user network.

[0065] Suppose a sample user and a sample item pair in a sample are represented as < >, where represents the sample user in the i-th sample, represents the sample item in the i-th sample. The relevant information of the sample user includes information in m feature dimensions (feature domains). The function of the user tower network is represented as , and the network parameters in the user tower network are , and the function of the item tower network is represented as , the network parameters in the material tower network are , then the user embedding can be expressed as:

[0066] The item embedding can be expressed as:

[0067] In Figure 4 In the network structure of the VKE network shown, after inputting the initial object feature user feature embedding of the user containing multiple feature dimensions into the VKE network, Key and Value are determined based on the user's initial object feature user feature embedding, and Query is determined based on the virtual kernel Virtual Kernal (a type feature of a content type, an implicit interest vector of the user, representing the user's interest in a certain aspect) corresponding to the VKE network. It can be expressed by the following formula:

[0068] Among them, represents the weight matrix for adjusting Q, K, and V, represents the virtual kernel, represents the user feature embedding, , , represent the bias terms for adjusting Q, K, and V respectively.

[0069] Multiply the determined Key and Query matrix (MatMul), calculate the correlation between Key and Query, and based on the correlation between Key and Query, perform attention weighting on Value to obtain the attention weighting results of each feature domain. By performing weighted concatenation on the attention weighting results of each feature domain, the comprehensive weighted result (the object feature after weighted fusion):

[0070] Input the comprehensive weighted result into the user network to obtain the output of the VKE network (the first object feature of the sample object corresponding to this content type):

[0071] Among them, represents the user output by the k-th VKE network Feature representation (first object feature corresponding to a content type), Represents the function of the user network in the k-th VKE network.

[0072] In Figure 4 In the network structure of the VKG network shown, after inputting the output VKE outputs of each VKE network, the virtual kernel Virtual Kernal, and the content feature item embedding of the sample material into the VKG network, based on each VKE output, determine , based on the virtual kernel Virtual-Kernal, determine , based on the material 's item embedding, determine Query = . Multiply the determined Key and Query matrix (MatMul), calculate the correlation between Key and Query, and based on the correlation between Key and Query, perform attention weighted summation on Value to obtain the user vector (corresponding to 's target object feature) is represented as:

[0073] Among them, K represents the number of VKE networks and also represents the number of types of content types.

[0074] In the embodiments of the present application, the virtual kernel Virtual Kernal is used as a bridge between the user tower and the material tower, realizing intra-tower interaction and inter-tower cross. By evaluating the feature importance in the VKE expert network, the features that can reflect user interests are more prominent, enhancing the representation ability of the features within the (user) tower; in the VKG network, the fine-grained interaction information between the sample object and the sample content is more fully captured, improving the accuracy of content recommendation.

[0075] Based on Figure 2The training method of the recommended network shown, during the training process, for each sample, based on the object-related information of the sample object in the sample, an initial object feature is extracted, and based on the feature extraction module of each expert kernel network, the initial object feature of the sample object and the type feature of the content type corresponding to the expert kernel network are used for feature extraction to capture the first object feature of the sample object corresponding to different content types. For each sample content in each sample, according to the correlation between the content feature of the sample content and the type features of each content type, the first object features of the sample object corresponding to each content type are weighted and fused to obtain the target object feature of the sample object corresponding to the sample content, so as to calculate the training loss based on the target object feature for model training. By analyzing the interest features of the sample object for different content types and based on the correlation between the sample content and each content type, this method fuses the interest features of the sample object for different content types to obtain the target object feature, strengthens the feature interaction between the sample object and the sample content, can capture the fine-grained interaction information between the sample object and the sample content more fully, and improves the accuracy of content recommendation.

[0076] In the embodiments of the present application, the multiple samples for the training of the first recommended network can be obtained through the following methods: Obtain information query requests of multiple query request objects; wherein, each information query request carries a query keyword. For each information query request, perform a query operation on the content database based on the query keyword in the information query request to obtain multiple contents associated with the query keyword. For each information query request, obtain the relevant information of the query request object of the information query request and the content-related information of the multiple contents obtained by the query, use the query request object of the query request as a sample object, and obtain a sample according to the relevant information of the query request object and the content-related information of the multiple contents obtained by the query.

[0077] Among them, the first label of each sample can be obtained according to the feedback information of the query request object on the multiple contents associated with the query keyword. For the content clicked by the query request object, it is determined that the true interest probability of the query request object for this content is 1, otherwise the true interest probability is 0.

[0078] Optionally, the first label of each sample can also be obtained through the following methods: According to the object-related information of the sample object in the sample and the content-related information of multiple sample contents, through the third recommended network, predict the interest probability of the sample object in the sample for each sample content. Determine a second quantity of first candidate contents from each sample content of the sample according to the ranking of the interest probabilities predicted by the third recommendation network from large to small; According to the object-related information of the sample object in the sample and the content-related information of each first candidate content, through the trained fourth recommendation network, predict the interest probability of the sample object for each first candidate content; Determine a third quantity of second candidate contents from each first candidate content according to the ranking of the interest probabilities predicted by the fourth recommendation network from large to small; Based on each second candidate content, determine each target content to be shown to the query request object corresponding to the sample; Determine the click situation of the sample object on each target content, set the true interest probability of each target content clicked by the sample object to 1, and set the true interest probability of other contents in the sample except the clicked target contents to 0.

[0079] Among them, the third recommendation network and the fourth recommendation network can be recommendation networks / ranking models used in different stages of the recommendation system, and the prediction accuracy of the fourth recommendation network is higher than that of the third recommendation network. As an optional method, the third recommendation network can be an online rough ranking network, and the fourth recommendation network is an online fine ranking network.

[0080] Optionally, after determining the third quantity of second candidate contents, it is also possible to re-rank each second candidate content based on a pre-set re-ranking strategy to obtain each target content and the re-ranking order, and display each target content according to the determined re-ranking order.

[0081] Optionally, each sample also has a second label, and the second label of the sample includes the reference ranking results of each sample content in the sample. Among them, the reference ranking result is the ranking result of the interest probabilities of the sample object in the sample for each content predicted by the trained second recommendation network. Among them, the training operation also includes: for each sample, sort each sample content in the sample according to the predicted interest probability of the sample object in the sample for each sample content to obtain the predicted ranking result of each sample content in the sample. When determining the training loss, determine the second training loss according to the difference between the predicted ranking result of each sample and the reference ranking result in the label of each sample; based on the first training loss and the second training loss, determine the total training loss.

[0082] Among them, the second recommendation network can be a network model with higher prediction accuracy than the first recommendation network. As an optional method, the second recommendation network can be a near-line fine ranking network.

[0083] Figure 5A schematic diagram of a sample construction process provided by an embodiment of the present application. For an information query request of each query request object, online recall is performed based on the query keywords in the information query request to obtain multiple contents associated with the query keywords; then, the multiple recalled contents are online coarsely ranked through a coarse ranking model (the third recommendation network), and the first candidate contents of the second quantity are determined according to the ranking from largest to smallest of the interested probabilities predicted by the coarse ranking model; the first candidate contents are online finely ranked through a fine ranking model (the fourth recommendation network), and the second candidate contents of the third quantity are determined according to the ranking from largest to smallest of the interested probabilities predicted by the online fine ranking model; the second candidate contents are online re-ranked to obtain the target contents and the re-ranking order, and the target contents are displayed according to the determined re-ranking order.

[0084] For the multiple contents recalled online, the multiple recalled contents are offline finely ranked through a fine ranking model (the second recommendation network) to obtain the scores of the fine ranking model for each content, that is, the predicted interested probabilities of the query request object for each content. At the same time, the relevant information of the query request object (user-related information) and the content-related information of each recalled content are recorded in Redis, and the recorded user-related information, the content-related information of each content, and the user feedback are asynchronously stored in HDFS through Redis, so as to construct multiple samples with labels for training the first recommendation network based on the user-related information, the content-related information of each recalled content, the user feedback, and the offline fine ranking scores of each recalled content corresponding to each information query request stored in HDFS.

[0085] In the embodiment of the present application, the fine ranking model is deployed to the offline service and the online service respectively. The user feedback information is recorded through the online service, and the entire recalled content space is scored based on the offline fine ranking service. Samples and labels are constructed based on the content-related information of the entire content space, the fine ranking score results, and the user feedback information. Compared with the samples constructed only based on the exposure click data in the online fine ranking stage in the prior art, the samples constructed in the embodiment of the present application keep the training space and the inference space consistent, solve the problem of sample selection bias existing in the prior art, improve the accuracy of the samples, and further improve the coarse ranking effect.

[0086] In the embodiment of the present application, the obtained sample can be expressed as: [user1, (item_1, pctr_1, y_1), (item_2, pctr_2, y_2), …, (item_n, pctr_n, y_n)], where pctr_n represents the offline fine ranking score for item_n, and y_n represents whether the user clicks on item_n (the true interested probability). Optionally, item_1, item_2, … can be arranged in descending order of the fine ranking scores.

[0087] When determining the training loss, the first training loss can be calculated by cross-entropy :

[0088] Among them, represents the scoring result (predicted probability of interest) of the first recommendation network, y represents whether the user clicks, and the first training loss is used to evaluate the loss of the first recommendation network in predicting user clicks (probability of interest).

[0089] The second training loss can be calculated based on the sorting results of the refined ranking and the rough ranking :

[0090] Among them, the refined ranking of each item can be determined according to the pctr scores of each item, and the rough ranking of each item can be determined according to the predicted scores (predicted probabilities of interest) of each item through the first recommendation network. A partial order relationship is constructed based on the refined ranking and rough ranking of each item. S represents the set of partial orders represents the rough ranking score of the first recommendation network. The second training loss is the BPR loss, which is used to evaluate the consistency between the rough and refined rankings.

[0091] Based on the first training loss and the second training loss, the total training loss is determined:

[0092] Among them, is a parameter that can be adjusted. By minimizing L, the click-through rate (probability of interest) prediction ability of the first recommendation network and the consistency between the rough and refined rankings are explicitly optimized.

[0093] Optionally, when continuously performing training operations on the first recommendation network, if the training meets the first preset condition, the performance of the first recommendation network that currently meets the first preset condition can be evaluated. Specifically, for each sample in at least part of the samples, at least one of the first difference or the target ratio corresponding to the sample is determined; according to at least one of the first differences or the target ratios corresponding to each sample, the performance evaluation result of the recommendation network that meets the first preset condition is determined; if the performance evaluation result meets the second preset condition, the first recommendation network when meeting the first preset condition is used as the trained first recommendation network; if the performance evaluation result does not meet the second preset condition, the training operation on the first recommendation network is continued until the performance evaluation result of the trained first recommendation network meets the second preset condition.

[0094] The first preset condition and the second preset condition can be configured as required. For example, the first preset condition may include but is not limited to the number of training times reaching a preset number, the loss function convergence (such as the training loss of the model is less than a preset value, or the training losses for multiple consecutive times are less than a preset value, etc.), the test index of the model meets the preset index, etc. The second preset condition may include the performance evaluation result meeting the preset evaluation index, etc.

[0095] For each sample, the first difference corresponding to the sample may be determined in the following manner: A reference interest probability of the sample object in the sample for each sample content is obtained, and a first difference between the reference interest probability and the predicted interest probability of the sample object for each sample content is determined, wherein the predicted interest probability of the sample object for the sample content is obtained through a recommendation network.

[0096] Here are three alternative ways to calculate the first difference: (1) The first difference is the consistency score of the coarse and fine sorting Specifically, a fourth number of third candidate contents with a top ranking are determined according to the order from large to small of the probability of the sample objects in each sample predicted by the first recommendation network to be interested in each sample content; a fifth number of fourth candidate contents with a top ranking are determined according to the order from large to small of the probability of the sample objects in each sample predicted by the trained second recommendation network to be interested in each sample content; the common content (intersection) between each third candidate content and each fourth candidate content is determined, and a coarse and fine sorting consistency score is determined based on the proportion of the common content in the fourth candidate content.

[0097]

[0098] Where n represents the number of samples (number of requests), represents a set containing each third candidate content, represents a set containing each fourth candidate content, Representing a collection The amount of content in Representing a collection and The number of items in the intersection.

[0099] (2) The first difference is the sorting quality indicator

[0100] Specifically, according to the order of the probability of interest of the sample object in each sample content predicted by the first recommendation network from large to small, the fourth number of third candidate contents ranked first are determined, and according to the predicted probability of interest of each third candidate content, the discounted cumulative gain is calculated. Scores; considering that the true list lengths (the number of clicked contents) in different samples may be different, the scores of different samples can be normalized. Calculate the scores according to the true interest probabilities of the sample objects in each sample content in each sample label; determine the normalized score of each sample according to the ratio of the score of each sample to the score of each sample .

[0101]

[0102] Among them, represents the number of samples (request times), K represents the number of third candidate contents, represents the predicted score (predicted interest probability) of the first recommendation network for the i-th content, represents calculating DCG based on the top K contents for a single user request, represents the score after sample normalization, which is used to measure the overall benefit of the top K contents.

[0103] (3) The first difference is the sorting accuracy / classification ability index CAUC Specifically, use the trained second recommendation network (fine-rank model) to predict the interest probabilities of the sample objects in each sample content in each sample. According to the predicted interest probabilities of the second recommendation network, determine the fifth number of fourth candidate contents from the multiple sample contents of each sample; use the fourth candidate contents of each sample as positive examples, and use the sample contents in the third candidate contents of each sample except the fourth candidate contents as negative examples to calculate the classification ability index CAUC of the first recommendation network for positive and negative examples:

[0104] Among them, n represents the number of samples (request times), represents the AUC score of the i-th sample.

[0105] Among them, for each sample, the target proportion corresponding to the sample can be determined in the following way: Determine the first number of sample content sets ranked at the top according to the predicted interest probabilities corresponding to each sample content in the sample from large to small, and determine the first proportion of the sample contents not exposed in the sample content set, or the second proportion of the sample contents that the sample object is truly interested in in the sample content set; among them, the target proportion includes at least one of the first proportion or the second proportion, and each sample also has a third label, and the third label of each sample includes whether each sample content in the sample is exposed.

[0106] Among them, the first proportion can be expressed by the following formula:

[0107] Among them, represents the first proportion (sample penetration score), n represents the number of samples (request times), represents the number of the third candidate content (the fourth quantity), represents the number of content without exposure. The higher the score, the greater the degree of SSB problem mitigation.

[0108] Among them, the second proportion can be expressed by the following formula:

[0109] Among them, n represents the number of samples (request times), is the second proportion, representing the proportion of hits of user feedback (clicks) among the third candidate content with higher rankings predicted by the first recommendation network. Hit_Num is the number of user feedback (click) content among the third candidate content, and K represents the number of the third candidate content.

[0110] In the embodiments of the present application, by effectively evaluating the first recommendation network through one or more of the above indicators, the actual effect of rough ranking can be objectively evaluated.

[0111] The embodiments of the present application also provide a content recommendation method. This method can perform content recommendation based on multiple expert kernel networks in the above-mentioned trained first recommendation network. Among them, this method can be executed by any electronic device. For example, it can be executed by the server or terminal in the above Figure 1 above.

[0112] Figure 6 is a schematic flowchart of the content recommendation method provided by the embodiments of the present application. As Figure 6 shown, this method can include the following steps S210-step S240, where: Step S210: Obtain object-related information of the target object and multiple candidate recommended contents.

[0113] Among them, the target object can be any user / user account to be recommended. The object-related information of the target object includes one or more of information such as user gender, age, city where located, user ID, type of device used, and historical behavior sequence. The recommended content can be various forms of content such as news, products, videos, etc., The content recommendation method provided by the embodiments of the present application can be applied to active recommendation scenarios or passive recommendation scenarios. For example, the recommendation system can actively push personalized content to users, or recommend relevant content based on the user's query intent when receiving an information query request sent by the user through a terminal. Among them, when applied to a passive recommendation scenario, the object-related information of the target object further includes the query time when the user conducts an information query, and the candidate recommended content can be the relevant content recalled based on the keywords queried by the user.

[0114] Step S220: For each candidate recommended content, obtain the content feature of the candidate recommended content and the correlation between the content feature of the candidate recommended content and the type features of each content type among multiple content types.

[0115] The content recommendation method provided by the embodiments of the present application can be applied to an online recommendation scenario. Since the online recommendation scenario needs to respond to user requests within a very short time, in order to shorten the online calculation time, the content features of the content to be recommended in the recommendation system can be stored in advance. And since the type features of multiple content types have also been obtained through training, the correlation between the content feature of each content and the type features of multiple content types can also be stored in advance.

[0116] Optionally, for each candidate recommended content, the content identifier of the candidate recommended content can be determined, and the content identifier of the candidate recommended content can be queried from the feature database; wherein, the content identifiers of multiple contents, the content feature corresponding to each content identifier, and the correlation between the content feature and the type features of each content type are pre-stored in the feature database; If the content identifier of the candidate recommended content is queried in the feature database, the content feature corresponding to the content identifier in the feature database and the correlation between the content feature and the type features of each content type are used as the content feature of the candidate recommended content and the correlation between the content feature of the candidate recommended content and the type features of each content type; If the content identifier of the candidate recommended content is not queried in the feature database, obtain the content-related information of the candidate recommended content, perform feature extraction on the content-related information of the candidate recommended content to obtain the content feature of the candidate recommended content, and determine the correlation between the content feature of the candidate recommended content and the type features of each content type.

[0117] Optionally, when performing feature extraction based on content-related information, the content-related information of the candidate recommended content can be input into the content feature extraction module in the trained first recommendation network to obtain the content feature of the candidate recommended content.

[0118] Among them, the content features of each content stored in the feature database can be extracted and stored in the feature database in advance by using the content feature extraction module in the first recommendation network after training; the correlation between each content feature and the type features of each content type can be calculated based on the extracted content features and the type features of each content type obtained by training. Among them, the training process of the first recommendation network can refer to the embodiments of the above steps S110 - S120, which will not be elaborated in this application. The network parameters of the trained first recommendation network include the network parameters of the trained expert kernel network, and the network parameters of each expert kernel network include the type features of the content type corresponding to the expert kernel network.

[0119] In the embodiments of the present application, by pre - storing the content features of the content to be recommended and the relationship between the content features and the type features of each content type in the database, it can be directly read from the database during online recommendation, greatly reducing the real - time calculation amount and significantly improving the recommendation efficiency and system stability.

[0120] Step S230: Extract features from the object - related information of the target object to obtain the initial object features of the target object.

[0121] Step S240: Based on the feature extraction module in each expert kernel network, extract features from the initial object features of the target object and the type features of the content type corresponding to the expert kernel network to obtain the first object features of the target object corresponding to the content type.

[0122] Step S250: For each candidate recommended content, based on the correlation between the content features of the candidate recommended content and the type features of each content type, perform weighted fusion on the first object features of the target object corresponding to each content type to obtain the target object features of the target object corresponding to the candidate recommended content, and predict the probability that the target object is interested in the candidate recommended content according to the target object features and the content features of the candidate recommended content.

[0123] Among them, the content type can be divided according to different themes, styles, or forms of expression of the content, etc. For example, according to different themes, the divided content types are: sports, movies, music, fashion, etc.

[0124] Optionally, when extracting the first object features through the expert kernel network, for the content type corresponding to each expert kernel network, determine the correlation between the initial object features of the target object and the type features of the content type, perform weighted fusion on the initial object features of the target object based on the determined correlation to obtain the weighted - fused object features, and extract features from the weighted - fused object features through the feature extraction module in the expert kernel network to obtain the first object features of the target object corresponding to the content type.

[0125] In the embodiments of the present application, by performing weighted fusion on the initial object features of the target object based on the correlation between the initial object features of the target object and the type features of the content type, it is possible to capture the user's preferences at a finer granularity, highlight the features that can reflect the user's interests more prominently, and improve the accuracy of the object features.

[0126] Optionally, the trained first recommendation network may further include an initial object feature extraction module, a content feature extraction module, a feature fusion module, and a prediction module. Among them, the initial object feature extraction module can extract initial object features based on the object-related information of the object; the feature fusion module is used to determine the correlation between the content features of the content and the type features of each content type, and perform weighted fusion on the first object features corresponding to the object for each content type based on the correlation to obtain the target object features corresponding to the object for the content; the prediction module can predict the probability that the object is interested in the content based on the target object features of the object and the content features of the content.

[0127] It can be understood that since the content features of each content and the correlation between the content features and the type features of each content type can be determined in advance and stored in the feature database, when performing online recommendation based on the first recommendation network, only the object feature extraction and prediction modules in the trained first recommendation network can be deployed, so that when an information query request of the user is received online, based on the target object features of the target object extracted by the object feature extraction and the content features of each candidate recommended content read from the feature database, the probability that the target object is interested in each candidate recommended content can be predicted.

[0128] Exemplarily, for each content in the recommendation system, extract the content feature item embedding of the content, and determine based on the content feature item embedding of the content , and determine based on the type features (Virtual Kernal) of the content type corresponding to each trained expert kernel network , perform matrix multiplication (MatMul) on the determined Key and Query, and calculate the correlation w between the Key and the Query:

[0129] Since the type features of the content type corresponding to the K VKE networks are obtained after training, the correlation between the content features of each content and the type features of the K content types can be obtained:

[0130] The corresponding relationship between the content identification and content features of each content, and the corresponding relationship between each content identification and the correlation set are established and stored in the feature database. The correlation set includes the correlation between the content features of the content and the type features of each content type.

[0131] When receiving a user's information query request, the initial object features can be extracted based on the user's relevant information, and the initial object features are respectively input into K VKE networks, and the user's first object features are output through each VKE network. For each candidate recommended content recalled by the query keyword, the feature correlation (correlation set) between the candidate recommended content and K content types can be found from the feature database based on the content ID of the candidate recommended content. According to the feature correlation between the candidate recommended content and the K content types, the first object feature of the user Perform weighted fusion to obtain the target object features :

[0132] In an embodiment of the present application, the initial object feature extraction module, multiple expert core networks, content feature extraction modules, feature fusion modules and prediction modules in the trained first recommendation network can also be deployed in an online recommendation system. Based on the initial object feature extraction module, real-time feature extraction can be performed on the object-related information of the object requested online, and the extracted initial object features can be input into the expert core network to further extract the first object features of the object corresponding to each different content type. Based on the content feature extraction module, real-time feature extraction can be performed on the content-related information of each content recalled online, and real-time feature fusion and real-time prediction can be performed based on the feature fusion module and the prediction module, thereby ensuring the real-time and accuracy of online recommendations.

[0133] Step S260: determining a recommended content set for the target object from a plurality of candidate recommended contents based on the probability that the target object is interested in each candidate recommended content.

[0134] In an embodiment of the present application, a preset number of top ranked candidate recommended contents may be determined from a plurality of candidate recommended contents in descending order of the probability of the target object being interested in each candidate recommended content, and displayed to the target object as a recommended content set.

[0135] Optionally, when displaying, each target recommended content in the recommended content set may be displayed in descending order of interest probability of each target recommended content.

[0136] Optionally, considering that the sorting result based on the interest probability predicted by the first recommendation network may not be accurate enough, the top-ranked preset number of candidate recommended contents selected according to the sorting result of the interest probability predicted by the first recommendation network can be used as the first candidate content set, and then the second recommendation network with higher accuracy is further used to sort each candidate recommended content in the first candidate content set, so as to, based on the sorting result of the second recommendation network, use the candidate recommended contents ranked top in the first candidate content set as the target recommended contents in the recommended content set.

[0137] As Figure 7 shown, content recommendation usually includes four stages: recall, rough ranking, fine ranking, and re-ranking. Among them, the first recommendation network is deployed in the rough ranking stage, and the second recommendation network is deployed in the fine ranking stage. After obtaining the query keywords input by the user, various candidate recommended contents related to the query keywords can be recalled from the content database, the user-related information of the user can be obtained, and the user-related information is input into the first recommendation network. Through the initial object feature extraction module of the first recommendation network, the initial object features of the user are extracted, and based on the feature extraction module in each expert kernel network, the initial object features and the type features of the content type corresponding to the expert kernel network are subjected to feature extraction to obtain the first object features of the user corresponding to each content type. Then, based on the content identifiers of the candidate recommended contents, the corresponding content features and the correlation set are found from the feature database. Among them, the correlation set corresponding to each content includes the correlation between the content features of the content and the type features of each content type.

[0138] For each candidate recommended content, based on the correlation between the content features of the candidate recommended content and the type features of each content type, the first object features of the user corresponding to each content type are weighted and fused to obtain the target object features of the user corresponding to the candidate recommended content. Based on the target object features of the user corresponding to the candidate recommended content and the content features of the candidate recommended content, the prediction model of the first recommendation network predicts the interest probability of the user in each candidate recommended content, and in the order from large to small of the interest probability, the top-ranked first preset number of candidate recommended contents are selected as the rough-ranked recommended contents.

[0139] Continue to use the second recommendation network deployed in the fine ranking stage to predict the interest probability of the user in each rough-ranked recommended content respectively, and in the order from large to small of the interest probability, select the top-ranked second preset number of candidate recommended contents as the fine-ranked recommended contents. Finally, use each fine-ranked recommended content as the target recommended content, re-rank each target recommended content according to the business strategy, and display each target recommended content on the user terminal in the re-ranked order.

[0140] Based on Figure 6The content recommendation method shown above extracts initial object features based on object-related information of a target object, and uses the feature extraction modules in each expert kernel network to extract features from the initial object features of the target object and the type features of the content type corresponding to the expert kernel network, capturing the interest features of the target object corresponding to different content types. Based on the correlation between the content features of candidate recommended content and the type features of each content type, the interest features of the target object for different content types are fused to obtain the target object features of the target object corresponding to the candidate recommended content, which can more fully capture the fine-grained interaction information between the target object and the candidate recommended content, enabling the object features of the target object to be dynamically adjusted according to different candidate recommended content, achieving "one thousand objects, one thousand faces", and improving the accuracy of content recommendation.

[0141] To facilitate a better understanding and explanation of the method provided in the embodiments of the present application, the following introduces optional implementation manners of the method provided in the present application in combination with a specific scenario embodiment.

[0142] As Figure 8 shown, the user enters "Zhang San" through the browser in the terminal. In response to the user's click search operation, the terminal sends an information query request to the server. Among them, the information query request carries the query keyword "Zhang San" and the user ID. The server can, based on the user ID, search for user-related information in the user database, including but not limited to user age, gender, city where the user is located, and historical operation data, etc., obtain the type features of each content type obtained through training, input the user-related information into the initial object feature extraction module of the trained first recommendation network to obtain the initial object features of the user, and then input the initial object features of the user into each expert kernel network of the trained first recommendation network respectively. Based on the feature extraction module in each expert kernel network, features are extracted from the initial object features and the type features of the content type corresponding to the expert kernel network to obtain the first object features of the user corresponding to each content type.

[0143] Based on the query keyword "Zhang San", search for each associated content related to "Zhang San" in the content database, and based on the content identifiers of each associated content, search for the corresponding content features in the feature database, as well as the correlation between each content feature and the type features of each content type , where K is the number of content types.

[0144] For each associated content related to "Zhang San", based on the relevance w corresponding to the associated content, the target object features of the user are weighted and fused to obtain the target object features of the user corresponding to the associated content. Based on the target object features and the content features of the associated content, the probability of the user's interest in each associated content is determined. The associated content is screened in descending order of the probability of interest to obtain the coarsely ranked associated content, which is then further refined and re-ranked to obtain multiple target associated contents with a higher degree of user interest, and sent to the user terminal for display, such as Figure 8 the multiple entries related to "Zhang San" shown in Figure 8 : Zhang San's latest movie, Zhang San's classic old songs, 150 full movies of Zhang San, Zhang San appeared at the XX dinner, Li Si staged XX, 100 songs of Zhang San... The top ten most popular songs of Zhang San.

[0145] If the user clicks on "Zhang San's latest movie" among the displayed entries, then "Zhang San's latest movie" is used as the query keyword, and the above four stages of recall, coarse ranking, fine ranking, and re-ranking are repeated to obtain multiple movies with a higher degree of user interest (the target associated content of "Zhang San's latest movie"), and sent to the user terminal for display.

[0146] Based on the same principle as the training method of the Figure 2 recommendation network shown, an embodiment of the present application provides a training device for the recommendation network, as Figure 9 shown, the training device 300 may include: a sample acquisition module 310 and a training module 320, where: The sample acquisition module 310 is configured to acquire multiple samples with a first label. Each sample includes object-related information of a sample object and content-related information of multiple sample contents. The first label of each sample includes the true probability of interest of the sample object in each sample content; A training module 320, configured to obtain a trained first recommendation network by continuously performing training operations on a first recommendation network to be trained based on the multiple samples; wherein, the first recommendation network includes multiple expert kernel networks: The training operations include: for each sample, extracting features from the object-related information of the sample to obtain an initial object feature of the sample object in the sample; based on the feature extraction module of each expert kernel network, extracting features from the initial object feature of the sample object and the type feature of the content type corresponding to the expert kernel network to obtain a first object feature of the sample object corresponding to the content type; for each sample content in the sample, extracting features from the content-related information of the sample content to obtain a content feature of the sample content, and based on the correlation between the content feature of the sample content and the type features of each content type, performing weighted fusion on the first object features of the sample object corresponding to each content type to obtain a target object feature of the sample object corresponding to the sample content, and based on the target object feature and the content feature of the sample content, obtaining a predicted interest probability of the sample object for the sample content; determining a total training loss according to the predicted interest probabilities of the sample objects in each sample for each sample content and the first labels of each sample, and based on the total training loss, adjusting the network parameters of the first recommendation network; wherein, the network parameters of the first recommendation network include the network parameters of each expert kernel network, and the network parameters of each expert kernel network include the network parameters of the feature extraction module of the expert kernel network and the type feature of the content type corresponding to the expert kernel network.

[0147] Optionally, the training module 320 may be configured to: For each content type corresponding to each expert kernel network, determining the correlation between the initial object feature of the target object and the type feature of the content type, and performing weighted fusion on the initial object feature of the target object based on the correlation; and extracting features from the weighted-fused object feature through the feature extraction module in the expert kernel network to obtain a first object feature of the target object corresponding to the content type.

[0148] Optionally, the first recommendation network further includes an initial object feature extraction module, a content feature extraction module, a feature fusion module, and a prediction module; The training module 320 may be configured to: For each sample, based on the object-related information of the sample, extracting features through the initial object feature extraction module to obtain an initial object feature of the sample object; For each sample content in each sample, extracting features through the content feature extraction module to obtain a content feature of the sample content; For each sample content in each sample, the feature fusion module determines the correlation between the content feature of the sample content and the type features of each content type, and based on the determined correlation, weights and fuses the first object features corresponding to each content type of the sample object to obtain the target object feature corresponding to the sample content of the sample object; For each sample content in each sample, based on the target object feature and the content feature of the sample content, the prediction module determines the predicted interest probability of the sample object for the sample content.

[0149] Optionally, each sample also has a second label, and the second label of each sample includes the reference sorting result of each sample content in the sample. The reference sorting result is the sorting result of the interest probabilities of the sample objects in the sample for each sample content predicted by the trained second recommendation network; The training module 320 can also be used for: For each sample, sort each sample content in the sample according to the predicted interest probability of the sample object in the sample for each sample content, to obtain the predicted sorting result of each sample content in the sample; The determination of the total training loss according to the predicted interest probabilities of the sample objects in each sample for each sample content and the first labels of each sample includes: Determine the first training loss according to the predicted interest probabilities of the sample objects in each sample for each sample content and the first labels of each sample; Determine the second training loss according to the difference between the predicted sorting result of each sample and the second label of each sample; Based on the first training loss and the second training loss, determine the total training loss.

[0150] Based on the same principle as Figure 6 the content recommendation method shown, an embodiment of the present application provides a content recommendation device, as Figure 10 shown. The content recommendation device 400 may include: a first acquisition module 410, a second acquisition module 420, a first feature extraction module 430, a second feature extraction module 440, an interest probability estimation module 450, and a content recommendation module 460, where: The first acquisition module 410 is configured to acquire object-related information of a target object and a plurality of candidate recommended contents; The second acquisition module 420 is configured to, for each of the candidate recommended contents, acquire the content feature of the candidate recommended content and the correlation between the content feature of the candidate recommended content and the type features of each content type in a plurality of content types; The first feature extraction module 430 is configured to extract features from the object-related information of the target object to obtain the initial object features of the target object; The second feature extraction module 440 is configured to, based on the feature extraction module in each expert kernel network, extract features from the initial object features of the target object and the type features of the content type corresponding to the expert kernel network, to obtain the first object features of the target object corresponding to the content type; The interest probability prediction module 450 is configured to, for each of the candidate recommended contents, based on the correlation between the content features of the candidate recommended content and the type features of each content type, perform weighted fusion on the first object features of the target object corresponding to each content type to obtain the target object features of the target object corresponding to the candidate recommended content; and predict the interest probability of the target object for the candidate recommended content according to the target object features and the content features of the candidate recommended content; The content recommendation module 460 is configured to determine a recommended content set of the target object from the multiple candidate recommended contents based on the interest probabilities of the target object for each of the candidate recommended contents.

[0151] Optionally, the second feature extraction module 440 may be configured to: For each content type corresponding to an expert kernel network, determine the correlation between the initial object features of the target object and the type features of the content type corresponding to the expert kernel network, and perform weighted fusion on the initial object features of the target object based on the correlation; and extract features from the weighted fusion object features through the feature extraction module in the expert kernel network to obtain the first object features of the target object corresponding to the content type.

[0152] Optionally, the second acquisition module 420 may be configured to: Determine the content identifier of the candidate recommended content; Query the content identifier of the candidate recommended content in the feature database; wherein, the feature database pre-stores the content identifiers of multiple contents, the content features corresponding to each content identifier, and the correlation between the content features and the type features of each content type; If the content identifier of the candidate recommended content is queried in the feature database, then use the content features corresponding to the content identifier in the feature database and the correlation between the content features and the type features of each content type as the content features of the candidate recommended content and the correlation between the content features of the candidate recommended content and the type features of each content type; If the content identifier of the candidate recommended content is not found in the feature database, obtain the content-related information of the candidate recommended content, extract features from the content-related information of the candidate recommended content to obtain the content features of the candidate recommended content, and determine the correlation between the content features of the candidate recommended content and the type features of each content type.

[0153] Optionally, the content recommendation device further includes a training module, and the training module can be used for: Obtain a plurality of samples with a first label. Each sample includes object-related information of a sample object and content-related information of a plurality of sample contents. The first label of each sample includes the true interest probability of the sample object in each sample content. Based on the plurality of samples, continuously perform training operations on the first recommendation network to be trained to obtain a trained first recommendation network: wherein, the first recommendation network includes the plurality of expert kernel networks; the training operations include: For each sample, extract features from the object-related information of the sample to obtain the initial object features of the sample object in the sample; based on the feature extraction module of each expert kernel network, extract features from the initial object features of the sample object and the type features of the content type corresponding to the expert kernel network to obtain the first object features of the sample object corresponding to the content type; for each sample content in the sample, extract features from the content-related information of the sample content to obtain the content features of the sample content, and based on the correlation between the content features of the sample content and the type features of each content type, perform weighted fusion on the first object features of the sample object corresponding to each content type to obtain the target object features of the sample object corresponding to the sample content, and based on the target object features and the content features of the sample content, obtain the predicted interest probability of the sample object in the sample content. Determine the total training loss according to the predicted interest probabilities of the sample objects in each sample content in each sample and the first labels of each sample, and based on the total training loss, adjust the network parameters of the first recommendation network; wherein, the network parameters of the first recommendation network include the network parameters of each expert kernel network, and the network parameters of each expert kernel network include the network parameters of the feature extraction module of the expert kernel network and the type features of the content type corresponding to the expert kernel network.

[0154] Optionally, the first recommendation network further includes an initial object feature extraction module, a content feature extraction module, a feature fusion module, and a prediction module; for each sample, the initial object feature of the sample object in the sample is extracted by the initial object feature extraction module, and the content features of each sample content are extracted by the content feature extraction module; for each sample content in the sample, the target object feature corresponding to the sample object for the sample content is obtained by feature fusion through the feature fusion module, and the predicted interest probability of the sample object for the sample content is predicted by the prediction module; Wherein, for each candidate recommended content, the content feature of the candidate recommended content and the correlation between the content feature of the candidate recommended content and the type features of each content type are obtained in the following manner: Obtain the content-related information of the candidate recommended content, and through the content feature extraction module of the trained first recommendation network, perform feature extraction on the content-related information of the candidate recommended content to obtain the content feature of the candidate recommended content; For each content type, determine the correlation between the content feature of the candidate recommended content and the type features of each content type according to the content feature of the candidate recommended content and the type feature of the trained content type.

[0155] Optionally, each sample also has a second label, and the second label of each sample includes the reference sorting result of each sample content in the sample, and the reference sorting result is the sorting result of the interest probabilities of the sample object in the sample for each sample content predicted by the trained second recommendation network; The training module can also be used for: For each sample, sort each sample content in the sample according to the predicted interest probability of the sample object in the sample for each sample content, to obtain the predicted sorting result of each sample content in the sample; Determine the first training loss according to the predicted interest probabilities of the sample objects in each sample for each sample content and the first label of each sample; Determine the second training loss according to the difference between the predicted sorting result of each sample and the second label of each sample; Based on the first training loss and the second training loss, determine the total training loss.

[0156] Optionally, the training module can be used for: Based on the multiple samples, continuously perform training operations on the first recommendation network to be trained until a first preset condition is met; For each sample in at least some of the samples, determine at least one of the first difference or the target ratio corresponding to the sample; Determine the performance evaluation result of the first recommendation network that meets the first preset condition according to at least one of the first differences or target ratios corresponding to each sample; If the performance evaluation result meets the second preset condition, use the first recommendation network when the first preset condition is met as the trained first recommendation network; If the performance evaluation result does not meet the second preset condition, continue to perform a training operation on the first recommendation network until the performance evaluation result of the trained first recommendation network meets the second preset condition; For each sample, at least one of the first difference or target ratio corresponding to the sample is determined by the following method: Obtain the reference interest probability of the sample object in each sample content in the sample, and determine the first difference between the reference interest probability and the predicted interest probability of the sample object in each sample content; the predicted interest probability of the sample object in the sample content is obtained through the first recommendation network; According to the predicted interest probabilities of the sample contents in the sample from large to small, determine the first number of sample content sets with the highest ranking, and determine the first ratio of the unexposed sample contents in the sample content set, or the second ratio of the sample contents that the sample object is truly interested in in the sample content set; wherein, the target ratio includes at least one of the first ratio or the second ratio, and each sample also has a third label, and the third label of each sample includes whether each sample content in the sample is exposed.

[0157] Optionally, the multiple samples are obtained by the following method: Obtain information query requests of multiple query request objects; wherein, each information query request carries a query keyword; For each information query request, perform a query operation on the content database based on the query keyword in the information query request to obtain multiple contents associated with the query keyword; For each information query request, obtain the relevant information of the query request object of the information query request and the content-related information of the multiple contents obtained by the query, use the query request object of the information query request as a sample object, and obtain a sample according to the relevant information of the query request object and the content-related information of the multiple contents obtained by the query.

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

[0159] In the embodiments of the present application, an electronic device is provided, which includes a memory, a processor, and a computer program stored on the memory. When the processor executes the computer program stored in the memory, the method in any optional embodiment of the present application can be implemented.

[0160] Figure 11 The structural schematic diagram of an electronic device applicable to the embodiments of the present invention is shown, as Figure 11 shown, the electronic device can be a server or a user terminal, and the electronic device can be used to implement the method provided in any embodiment of the present invention.

[0161] As Figure 11 shown, the electronic device 2000 mainly includes at least one processor 2001 ( Figure 11 one is shown), a memory 2002, a communication module 2003, and an input / output interface 2004 and other components. Optionally, the components can be connected and communicate with each other through a bus 2005. It should be noted that, Figure 11 the structure of the electronic device 2000 shown is only schematic and does not constitute a limitation on the electronic device applicable to the method provided in the embodiments of the present application.

[0162] Among them, the memory 2002 can be used to store the operating system, application programs, etc. The application programs can include computer programs that implement the methods shown in the embodiments of the present invention when called by the processor 2001, and can also include programs for implementing other functions or services. The memory 2002 can be a ROM (Read Only Memory), or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory), or other types of dynamic storage devices that can store information and computer programs. It can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0163] The processor 2001 is connected to the memory 2002 through the bus 2005 and realizes corresponding functions by calling the application programs stored in the memory 2002. Among them, the processor 2001 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in connection with the disclosure of the present invention. The processor 2001 can also be a combination that realizes computing functions, such as a combination including one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0164] The electronic device 2000 can be connected to a network through the communication module 2003 (which can include but is not limited to components such as a network interface) to communicate with other devices (such as user terminals or servers) through the network and achieve data interaction, such as sending data to other devices or receiving data from other devices. Among them, the communication module 2003 can include a wired network interface and / or a wireless network interface, etc., that is, the communication module can include at least one of a wired communication module or a wireless communication module.

[0165] The electronic device 2000 can be connected to the required input / output devices through the input / output interface 2004, such as a keyboard, a display device, etc. The electronic device 2000 itself can have a display device and can also externally connect other display devices through the interface 2004. Optionally, a storage device, such as a hard disk, etc., can also be connected through the interface 2004 to store the data in the electronic device 2000 into the storage device, or read the data in the storage device, and the data in the storage device can also be stored in the memory 2002. It can be understood that the input / output interface 2004 can be a wired interface or a wireless interface. According to different actual application scenarios, the devices connected to the input / output interface 2004 can be components of the electronic device 2000 or external devices connected to the electronic device 2000 when needed.

[0166] The bus 2005 for connecting each component can include a path to transmit information between the above components. The bus 2005 can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. According to different functions, the bus 2005 can be divided into an address bus, a data bus, a control bus, etc.

[0167] Optionally, for the solution provided in the embodiments of the present invention, the memory 2002 can be used to store the computer program for executing the solution of the present invention, and is run by the processor 2001. When the processor 2001 runs the computer program, it implements the actions of the method or device provided in the embodiments of the present invention.

[0168] Based on the same principle as the method provided in the embodiments of the present application, the embodiments of the present application provide a computer-readable storage medium. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the corresponding content of the foregoing method embodiments can be implemented.

[0169] The embodiments of the present application also provide a computer program product, which includes a computer program. When the computer program is executed by a processor, the corresponding content of the foregoing method embodiments can be implemented.

[0170] It should be noted that the terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification, claims and the above-mentioned drawings of the present application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order other than the one shown in the drawings or described in words.

[0171] It should be understood that although the flowcharts in the embodiments of the present application indicate each operation step by arrows, the execution order of these steps is not limited to the order indicated by the arrows. Unless clearly stated in this article, in some implementation scenarios of the embodiments of the present application, the implementation steps in each flowchart can be executed in other orders according to requirements. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage among these sub-steps or stages can also be executed at different times. In the scenario where the execution times are different, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and the embodiments of the present application do not limit this.

[0172] The above are only optional implementation manners of some implementation scenarios of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the technical concept of the solution of the present application, using other similar implementation means based on the technical idea of the present application also belongs to the protection scope of the embodiments of the present application.

Claims

1. A content recommendation method, characterized in that, Including: Obtain object-related information of a target object and a plurality of candidate recommended contents; For each of the candidate recommended contents, obtain the content feature of the candidate recommended content and the correlation between the content feature of the candidate recommended content and the type features of each content type among the plurality of content types; Extract features from the object-related information of the target object to obtain the initial object feature of the target object; Based on the feature extraction module in each expert kernel network, extract features from the initial object feature of the target object and the type feature of the content type corresponding to the expert kernel network, to obtain the first object feature of the target object corresponding to the content type; For each of the candidate recommended contents, based on the correlation between the content feature of the candidate recommended content and the type features of each content type, perform weighted fusion on the first object features of the target object corresponding to each content type, to obtain the target object feature of the target object corresponding to the candidate recommended content; According to the target object feature and the content feature of the candidate recommended content, predict the probability that the target object is interested in the candidate recommended content; Based on the probabilities that the target object is interested in each of the candidate recommended contents, determine a recommended content set of the target object from the plurality of candidate recommended contents.

2. The method according to claim 1, wherein The step of, based on the feature extraction module in each expert kernel network, extracting features from the initial object feature of the target object and the type feature of the content type corresponding to the expert kernel network, to obtain the first object feature of the target object corresponding to the content type, includes: For the content type corresponding to each expert kernel network, determine the correlation between the initial object feature of the target object and the type feature of the content type, and perform weighted fusion on the initial object feature of the target object based on the correlation; extract features from the weighted-fused object feature through the feature extraction module in the expert kernel network, to obtain the first object feature of the target object corresponding to the content type.

3. The method according to claim 1, wherein For each of the candidate recommended contents, the step of obtaining the content feature of the candidate recommended content and the correlation between the content feature of the candidate recommended content and the type features of each content type among the plurality of content types includes: Determine the content identifier of the candidate recommended content; Query the content identifier of the candidate recommended content in a feature database; wherein, the feature database pre-stores content identifiers of a plurality of contents, content features corresponding to each content identifier, and the correlation between the content feature and the type features of each content type; If the content identifier of the candidate recommended content is queried in the feature database, use the content feature corresponding to the content identifier in the feature database and the correlation between the content feature and the type features of each content type as the content feature of the candidate recommended content and the correlation between the content feature of the candidate recommended content and the type features of each content type; If the content identifier of the candidate recommended content is not found in the feature database, obtain the content-related information of the candidate recommended content, extract features from the content-related information of the candidate recommended content to obtain the content features of the candidate recommended content, and determine the correlation between the content features of the candidate recommended content and the type features of each content type.

4. The method according to claim 1, wherein The multiple expert kernel networks are trained in the following manner: Obtain multiple samples with first labels, where each sample includes object-related information of a sample object and content-related information of multiple sample contents, and the first label of each sample includes the true interest probability of the sample object in each sample content; Based on the multiple samples, continuously perform training operations on the first recommendation network to be trained to obtain the trained first recommendation network; wherein, the first recommendation network includes the multiple expert kernel networks; Among them, the training operations include: For each sample, extract features from the object-related information of the sample to obtain the initial object features of the sample object in the sample; based on the feature extraction module of each expert kernel network, extract features from the initial object features of the sample object and the type features of the content type corresponding to the expert kernel network to obtain the first object features of the sample object corresponding to the content type; for each sample content in the sample, extract features from the content-related information of the sample content to obtain the content features of the sample content, and based on the correlation between the content features of the sample content and the type features of each content type, perform weighted fusion on the first object features of the sample object corresponding to each content type to obtain the target object features of the sample object corresponding to the sample content, and based on the target object features and the content features of the sample content, obtain the predicted interest probability of the sample object in the sample content; Determine the total training loss based on the predicted interest probabilities of the sample objects in each sample for each sample content and the first labels of each sample, and based on the total training loss, adjust the network parameters of the first recommendation network; wherein, the network parameters of the first recommendation network include the network parameters of each expert kernel network, and the network parameters of each expert kernel network include the network parameters of the feature extraction module of the expert kernel network and the type features of the content type corresponding to the expert kernel network.

5. The method according to claim 4, characterized in that, The first recommendation network further includes an initial object feature extraction module, a content feature extraction module, a feature fusion module, and a prediction module; for each sample, the initial object features of the sample object in the sample are extracted by the initial object feature extraction module, and the content features of each sample content are extracted by the content feature extraction module; for each sample content in the sample, the target object features of the sample object corresponding to the sample content are obtained through feature fusion by the feature fusion module, and the predicted interest probability of the sample object in the sample content is predicted by the prediction module; Among them, for each candidate recommended content, the content features of the candidate recommended content and the correlation between the content features of the candidate recommended content and the type features of each content type are obtained in the following manner: Obtain the content-related information of the candidate recommended content, and extract the content features of the candidate recommended content from the content-related information of the candidate recommended content through the content feature extraction module of the first recommendation network after training; For each content type, determine the correlation between the content features of the candidate recommended content and the type features of each content type according to the content features of the candidate recommended content and the type features of the content type after training.

6. The method according to claim 4, wherein Each sample also has a second label, and the second label of each sample includes the reference sorting result of each sample content in the sample. The reference sorting result is the sorting result of the probability of interest of the sample object in the sample in each sample content predicted by the second recommendation network after training; The training operation further includes: For each sample, sort each sample content in the sample according to the predicted probability of interest of the sample object in each sample content in the sample, and obtain the predicted sorting result of each sample content in the sample; The determination of the total training loss according to the predicted probability of interest of the sample object in each sample content and the first label of each sample includes: Determine the first training loss according to the predicted probability of interest of the sample object in each sample content in each sample and the first label of each sample; Determine the second training loss according to the difference between the predicted sorting result of each sample and the second label of each sample; Based on the first training loss and the second training loss, determine the total training loss.

7. The method according to claim 4, wherein Based on the multiple samples, by continuously performing the training operation on the first recommendation network to be trained, obtain the first recommendation network after training, including: Based on the multiple samples, continuously perform the training operation on the first recommendation network to be trained until the first preset condition is met; For each sample in at least part of the samples, determine at least one of the first difference or the target ratio corresponding to the sample; According to at least one of the first differences or the target ratios corresponding to each sample, determine the performance evaluation result of the first recommendation network that meets the first preset condition; If the performance evaluation result meets the second preset condition, use the first recommendation network when the first preset condition is met as the first recommendation network after training; If the performance evaluation result does not meet the second preset condition, continue to perform the training operation on the first recommendation network until the performance evaluation result of the first recommendation network after training meets the second preset condition; For each sample, at least one of the first difference or the target ratio corresponding to the sample is determined in the following manner: Obtain the reference probability of interest of the sample object in each sample content in the sample, and determine the first difference between the reference probability of interest and the predicted probability of interest of the sample object in each sample content; the predicted probability of interest of the sample object in the sample content is obtained through the first recommendation network; Determine a set of sample contents with the top first quantity in descending order of the predicted probability of interest corresponding to each sample content in the sample, and determine the first proportion of the sample contents that are not exposed in the set of sample contents, or the second proportion of the sample contents that the sample objects in the set of sample contents are truly interested in; wherein, the target proportion includes at least one of the first proportion or the second proportion, each sample also has a third label, and the third label of each sample includes whether each sample content in the sample is exposed.

8. The method according to claim 4, characterized in that, The multiple samples are obtained in the following manner: Obtain information query requests of multiple query request objects; wherein, each of the information query requests carries a query keyword. For each information query request, perform a query operation on the content database based on the query keyword in the information query request to obtain multiple contents associated with the query keyword. For each information query request, obtain the relevant information of the query request object of the information query request and the content-related information of the multiple contents obtained by the query, use the query request object of the query request as a sample object, and obtain a sample according to the relevant information of the query request object and the content-related information of the multiple contents obtained by the query.

9. A training method for a recommendation network, characterized in that, The method includes: Obtain multiple samples with a first label, each sample includes object-related information of a sample object and content-related information of multiple sample contents, and the first label of each sample includes the true probability of interest of the sample object in each sample content. Based on the multiple samples, continuously perform a training operation on the first recommendation network to be trained to obtain a trained first recommendation network; wherein, the first recommendation network includes multiple expert kernel networks. Wherein, the training operation includes: For each sample, extract features from the object-related information of the sample to obtain the initial object features of the sample object in the sample; based on the feature extraction module of each expert kernel network, extract features from the initial object features of the sample object and the type features of the content type corresponding to the expert kernel network to obtain the first object features of the sample object corresponding to the content type; for each sample content in the sample, extract features from the content-related information of the sample content to obtain the content features of the sample content, and based on the correlation between the content features of the sample content and the type features of each content type, perform weighted fusion on the first object features of the sample object corresponding to each content type to obtain the target object features of the sample object corresponding to the sample content, and based on the target object features and the content features of the sample content, obtain the predicted probability of interest of the sample object in the sample content. Determine the total training loss based on the predicted interest probabilities of each sample content for the sample objects in each sample and the first label of each sample, and adjust the network parameters of the first recommendation network based on the total training loss; wherein, the network parameters of the first recommendation network include the network parameters of each expert kernel network, and the network parameters of each expert kernel network include the network parameters of the feature extraction module of the expert kernel network and the type features of the content type corresponding to the expert kernel network.

10. The method according to claim 9, wherein For each sample, the feature extraction of the initial object feature of the sample object based on the feature extraction module of each expert kernel network and the type features of the content type corresponding to the expert kernel network to obtain the first object feature of the sample object corresponding to the content type includes: For the content type corresponding to each expert kernel network, determine the correlation between the initial object feature of the sample object and the type features of the content type, and perform weighted fusion on the initial object feature of the sample object based on the correlation; perform feature extraction on the weighted fusion object feature through the feature extraction module in the expert kernel network to obtain the first object feature of the sample object corresponding to the content type.

11. The method according to claim 9, wherein The first recommendation network further includes an initial object feature extraction module, a content feature extraction module, a feature fusion module, and a prediction module; For each sample, the feature extraction of the object-related information of the sample to obtain the initial object feature of the sample object in the sample includes: Based on the object-related information of the sample, perform feature extraction through the initial object feature extraction module to obtain the initial object feature of the sample object; For each sample content in each sample, the feature extraction of the content-related information of the sample content to obtain the content feature of the sample content includes: Based on the content-related information of the sample content, perform feature extraction through the content feature extraction module to obtain the content feature of the sample content; For each sample content in each sample, the weighted fusion of the first object features of the sample object corresponding to each content type based on the correlation between the content feature of the sample content and the type features of each content type to obtain the target object feature of the sample object corresponding to the sample content includes: The feature fusion module determines the correlation between the content feature of the sample content and the type features of each content type, and performs weighted fusion on the first object features of the sample object corresponding to each content type based on the determined correlation to obtain the target object feature of the sample object corresponding to the sample content; For each sample content in each sample, the obtaining of the predicted interest probability of the sample object for the sample content based on the target object feature and the content feature of the sample content includes: Based on the target object feature and the content feature of the sample content, determine the predicted interest probability of the sample object for the sample content through the prediction module.

12. The method according to claim 9, wherein Each sample also has a second label, and the second label of each sample includes the reference sorting result of each sample content in the sample. The reference sorting result is the sorting result of the probability of interest of the sample objects in the sample for each sample content predicted by the trained second recommendation network; The training operation further includes: For each sample, sort each sample content in the sample according to the predicted probability of interest of the sample object in the sample for each sample content, to obtain the predicted sorting result of each sample content in the sample; Determining the total training loss according to the predicted probability of interest of the sample objects in each sample for each sample content and the first label of each sample includes: Determine a first training loss according to the predicted probability of interest of the sample objects in each sample for each sample content and the first label of each sample; Determine a second training loss according to the difference between the predicted sorting result of each sample and the second label of each sample; Based on the first training loss and the second training loss, determine the total training loss.

13. A content recommendation device, characterized in that, The device includes: A first acquisition module, configured to acquire object-related information of a target object and a plurality of candidate recommended contents; A second acquisition module, configured to, for each of the candidate recommended contents, acquire the content feature of the candidate recommended content and the correlation between the content feature of the candidate recommended content and the type features of each content type among a plurality of content types; A first feature extraction module, configured to perform feature extraction on the object-related information of the target object to obtain the initial object feature of the target object; A second feature extraction module, configured to perform feature extraction on the initial object feature of the target object and the type feature of the content type corresponding to the expert kernel network based on the feature extraction module in each expert kernel network, to obtain the first object feature of the target object corresponding to the content type; An interest probability estimation module, configured to, for each of the candidate recommended contents, based on the correlation between the content feature of the candidate recommended content and the type features of each content type, perform weighted fusion on the first object features of the target object corresponding to each content type, to obtain the target object feature of the target object corresponding to the candidate recommended content; and predict the probability of interest of the target object in the candidate recommended content according to the target object feature and the content feature of the candidate recommended content; A content recommendation module, configured to determine a recommended content set of the target object from the plurality of candidate recommended contents based on the probability of interest of the target object in each of the candidate recommended contents.

14. A training device for a recommendation network, characterized in that, The device includes: A sample acquisition module, configured to acquire a plurality of samples with first labels. Each sample includes object-related information of a sample object and content-related information of a plurality of sample contents. The first label of each sample includes the true probability of interest of the sample object in the sample for each sample content; A training module, configured to obtain a trained first recommendation network by continuously performing training operations on a to-be-trained first recommendation network based on the multiple samples; wherein, the first recommendation network includes a plurality of expert kernel networks; the training operations include: for each sample, extracting features from the object-related information of the sample to obtain an initial object feature of the sample object in the sample; based on the feature extraction module of each expert kernel network, extracting features from the initial object feature of the sample object and the type feature of the content type corresponding to the expert kernel network to obtain a first object feature of the sample object corresponding to the content type; for each sample content in the sample, extracting features from the content-related information of the sample content to obtain a content feature of the sample content, and based on the correlation between the content feature of the sample content and the type features of each content type, performing weighted fusion on the first object features of the sample object corresponding to each content type to obtain a target object feature of the sample object corresponding to the sample content, and based on the target object feature and the content feature of the sample content, obtaining a predicted interest probability of the sample object for the sample content; determining a total training loss according to the predicted interest probabilities of the sample objects in each sample for each sample content and the first labels of each sample, and based on the total training loss, adjusting the network parameters of the first recommendation network; wherein, the network parameters of the first recommendation network include the network parameters of each expert kernel network, and the network parameters of each expert kernel network include the network parameters of the feature extraction module of the expert kernel network and the type feature of the content type corresponding to the expert kernel network.

15. An electronic device, characterized in that, The electronic device includes a memory and a processor, and a computer program is stored in the memory, and the processor executes the computer program to implement the method according to any one of claims 1 to 8 or claims 9 to 12.

16. A computer-readable storage medium, characterized in that, A computer program is stored in the storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 or claims 9 to 12 is implemented.