Content recommendation methods, devices, equipment, storage media, and program products

By expanding the recall in the existing content recommendation model, obtaining expanded sample content, and training the target recall model, the problem of low training accuracy of the existing model is solved, and higher content recommendation accuracy and effectiveness are achieved.

CN116150470BActive Publication Date: 2026-06-30TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2021-11-19
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing content recommendation models are trained solely based on whether sample accounts interact with sample content, resulting in low training accuracy and recommendation accuracy.

Method used

Based on the positive sample content, recall expansion is performed to obtain expanded sample content. The content recall model is then trained based on the matching relationship between positive samples, expanded samples, and negative samples to obtain the target recall model.

Benefits of technology

It improves the accuracy and effectiveness of content recommendations, enabling content recall that aligns with the target account's interest distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116150470B_ABST
    Figure CN116150470B_ABST
Patent Text Reader

Abstract

This application discloses a content recommendation method, apparatus, device, storage medium, and program product, relating to the field of computer technology. The method includes: acquiring positive and negative sample content corresponding to a sample account; performing recall expansion on the positive sample content to obtain expanded sample content; training a content recall model based on the matching relationship between the positive sample content, expanded sample content, and negative sample content to obtain a target recall model; and recommending target content to a target account through the target recall model. By performing recall expansion on the basis of positive sample content to obtain expanded sample content, and considering that the correlation between the expanded sample content and the positive sample content reflects the interest distribution of the sample account rather than specific interest points, the content recall model is trained using the fusion of interest distributions, thereby improving the accuracy and effectiveness of content recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a content recommendation method, apparatus, device, storage medium, and program product. Background Technology

[0002] Content recommendation is commonly used in various application scenarios such as video content recommendation, news content recommendation, and product content recommendation. For example, after obtaining user authorization, the system obtains the user's static attribute data and historical operation data, and then uses a content retrieval model to retrieve content that matches the user's interests from the content pool and display that content to the user.

[0003] In related technologies, content recall models are trained by sampling positive and negative sample content corresponding to sample accounts. The interaction between positive sample content and sample accounts, as well as the non-interaction between negative sample content and sample accounts, are used to train the content recall model.

[0004] However, during the training process of this content recall model, because the model is trained only based on whether the sample account interacts with the sample content, that is, the training only involves a single target, the accuracy of the model training is low, resulting in low accuracy of content recommendation. Summary of the Invention

[0005] This application provides a content recommendation method, apparatus, device, storage medium, and program product, which can improve the accuracy of content recommendation. The technical solution is as follows.

[0006] On the one hand, a content recommendation method is provided, the method comprising:

[0007] Obtain positive and negative sample content corresponding to the sample account, wherein the positive sample content is historical recommendation content that has an interactive relationship with the sample account;

[0008] The positive sample content is recalled and expanded to obtain expanded sample content, which is expanded content that is related to the positive sample content;

[0009] Based on the matching relationship between the positive sample content, the extended sample content, and the negative sample content, the content recall model is trained to obtain the target recall model, which is used to recommend content to the account.

[0010] The target recall model is used to analyze the target account and the content to be recommended, and the target recommended content to be recommended to the target account is obtained from the content to be recommended.

[0011] On the other hand, a content recommendation device is provided, the device comprising:

[0012] The acquisition module is used to acquire positive sample content and negative sample content corresponding to the sample account, wherein the positive sample content is historical recommendation content that has an interactive relationship with the sample account;

[0013] An extension module is used to recall and extend the positive sample content to obtain extended sample content, wherein the extended sample content is extended content that is related to the positive sample content;

[0014] The training module is used to train the content recall model based on the matching relationship between the positive sample content, the extended sample content and the negative sample content, to obtain the target recall model, which is used to recommend content to the account.

[0015] The analysis module is used to analyze the target account and the content to be recommended through the target recall model, and to obtain the target recommended content to be recommended to the target account from the content to be recommended.

[0016] In an optional embodiment, the extension module includes:

[0017] A determining unit is used to determine the content publishing account of the positive sample content;

[0018] An extension unit is used to obtain a first set of content published by the content publishing account, the first set of content including content published by the content publishing account within a historical time period; and to obtain the extended sample content based on the first set of content.

[0019] In an optional embodiment, the expansion unit is further configured to sort the content in the first content set based on the historical interaction data corresponding to the content to obtain a first content candidate set; and to filter the first content candidate set based on category conditions to obtain the expanded sample content, wherein the category conditions include conditions consistent with the category of the positive sample content.

[0020] In an optional embodiment, the extension module includes:

[0021] A determining unit is used to determine the associated account corresponding to the sample account, wherein the associated account is an account that has an association relationship with the sample account;

[0022] An extension unit is used to obtain a second set of content published by the associated account, the second set of content including content published by the associated account within a historical time period; and to obtain the extended sample content based on the second set of content.

[0023] In an optional embodiment, the expansion unit is further configured to sort the content in the second content set based on the association between the sample account and the associated account to obtain a second content candidate set; and to filter the second content candidate set based on category conditions to obtain the expanded sample content, wherein the category conditions include conditions consistent with the category of the positive sample content.

[0024] In an optional embodiment, the training module is further configured to obtain the cross-entropy loss between the positive sample content and the negative sample content based on a first matching relationship between the positive sample content, the negative sample content and the sample account;

[0025] The training module is further configured to obtain a first matching loss between the positive sample content and the negative sample content based on a second matching relationship between the positive sample content and the negative sample content.

[0026] The training module is further configured to obtain a second matching loss between the positive sample content and the extended sample content based on a third matching relationship between the positive sample content and the extended sample content.

[0027] The training module is also used to train the content recall model based on the cross-entropy loss, the first matching loss, and the second matching loss to obtain the target recall model.

[0028] In an optional embodiment, the training module is further configured to obtain a matching loss based on the first matching loss and the second matching loss; fuse the cross-entropy loss and the matching loss to obtain a total loss; and train the content recall model based on the total loss to obtain the target recall model.

[0029] In an optional embodiment, the training module is further configured to train the content recall model based on the matching relationship between the positive sample content, the extended sample content, and the negative sample content, to obtain an account sub-model and a content sub-model. The account sub-model is used to analyze account information, and the content sub-model is used to analyze content data.

[0030] In an optional embodiment, the analysis module is further configured to analyze the target account through the account sub-model to obtain the account features of the target account; analyze the content to be recommended through the content sub-model to obtain the content features corresponding to the content to be recommended; and determine the target recommended content to be recommended to the target account from the content to be recommended based on the inner product between the account features and the content features.

[0031] In an optional embodiment, the acquisition module is further configured to acquire historical interaction events of the sample account within a historical time period, wherein the historical interaction events are interaction events between the sample account and historical recommended content; acquire the recommended content corresponding to positive interaction relationships in the historical interaction events as the positive sample content; and acquire the negative sample content corresponding to the sample account.

[0032] In an optional embodiment, the acquisition module is further configured to randomly sample the negative sample content from the content pool;

[0033] or,

[0034] The acquisition module is further configured to acquire recommended content corresponding to negative interaction relationships in the historical interaction events as the negative sample content.

[0035] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the content recommendation method as described in any of the embodiments of this application above.

[0036] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the content recommendation method as described in any of the embodiments of this application above.

[0037] On the other hand, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the content recommendation methods described in the above embodiments.

[0038] The beneficial effects of the technical solutions provided in this application include at least the following:

[0039] Based on the positive sample content, recall expansion is performed to obtain expanded sample content. The correlation between the expanded sample content and the positive sample content can reflect the interest distribution of the sample account rather than the interest points. Therefore, the content recall model is trained by fusing the interest distribution. The trained content recall model can recall the content to be recommended based on the account's interest distribution and determine the target recommended content to recommend to the account, thereby improving the accuracy and effectiveness of content recommendation. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a schematic diagram illustrating the training process of a content retrieval model in the related art provided by an exemplary embodiment of this application;

[0042] Figure 2 This is a schematic diagram illustrating the training process of a content retrieval model provided in an exemplary embodiment of this application;

[0043] Figure 3 This is a schematic diagram of an implementation environment provided by an exemplary embodiment of this application;

[0044] Figure 4 A flowchart of a content recommendation method provided in an exemplary embodiment of this application;

[0045] Figure 5 A flowchart of a content recommendation method provided in another exemplary embodiment of this application;

[0046] Figure 6 A flowchart of a content recommendation method provided in another exemplary embodiment of this application;

[0047] Figure 7 This is a schematic diagram of the overall process of content recall provided in an exemplary embodiment of this application;

[0048] Figure 8 This is a structural block diagram of a content recommendation apparatus provided in an exemplary embodiment of this application;

[0049] Figure 9 This is a structural block diagram of a content recommendation apparatus provided in another exemplary embodiment of this application;

[0050] Figure 10 This is a structural block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0052] Content recommendation is commonly used in various application scenarios such as video content recommendation, news content recommendation, and product content recommendation.

[0053] Recall, as the front end of a recommendation system, typically determines the upper and lower limits of the recommendation system. The deep learning model commonly used on the recall side is a dual-tower deep neural network (DNN). The dual-tower DNN consists of a user tower and a content feed tower. The user tower is used to extract features of user accounts, and the feed tower is used to extract features of content. The inner product maximization method is used as an online retrieval method to give K content that meets the requirements, where K is a positive integer.

[0054] However, in related technologies, the target of recall models is generally the click-through rate reflecting user interests, and the interaction rate such as collection, following, and tipping after a certain playback time is used as positive sample targets for training. This can be understood as a prediction of a single value of the user's overall interests. However, the user's positive behavior is actually a single-point sampling of the user's own interest distribution, which lacks a characterization of the entire interest distribution.

[0055] Indicative, such as Figure 1 As shown, in the related technology, after collecting positive sample content 120 and negative sample content 130 of sample account 110, the features of positive sample content 120, the features of negative sample content 130 and the information features of sample account 110 are extracted. Then, the loss is calculated based on the features of positive sample content 120, the features of negative sample content 130 and the information features of sample account 110, and the recall model is trained so as to achieve content recall that matches the single point of interest of the target account when analyzing the account information of the target account.

[0056] This application provides a content recommendation method. When training a content retrieval model, in addition to positive and negative sample content, extended sample content based on positive sample content is added, thereby expanding the single point of interest of a sample account into the interest distribution of the sample account through extended sample content.

[0057] Indicative, such as Figure 2 As shown in this embodiment, positive sample content 220 and negative sample content 230 of sample account 210 are collected, and extended distribution samples are generated for positive sample content 220 to obtain extended sample content 240. Features of positive sample content 220, features of negative sample content 230, features of extended sample content 240, and information features of sample account 210 are extracted. Based on the features of positive sample content 220, features of negative sample content 230, features of extended sample content 240, and information features of sample account 210, a fusion loss is calculated to train the recall model so that when analyzing the account information of the target account, content recall can be performed in accordance with the interest distribution of the target account.

[0058] Secondly, the implementation environment involved in the embodiments of this application will be described, for illustrative purposes only. Please refer to [the relevant documentation]. Figure 3 The implementation environment involves a terminal 310 and a server 320, which are connected via a communication network 330.

[0059] In some embodiments, the terminal 310 is equipped with a target application with content browsing functionality. This target application includes video playback programs, music playback programs, news browsing programs, shopping programs, short video programs, etc., and this application embodiment does not limit the scope of the application. Based on the user's interactive operations on the content browsing interface, the terminal 310 sends a content recommendation request to the server 320, thereby requesting the server 320 to recall and recommend content.

[0060] After receiving a content recommendation request from terminal 310, server 320 retrieves content from the target account logged in on terminal 310 based on the content recommendation request. The content retrieval model is trained based on the positive sample content, negative sample content, and extended sample content of the sample account. After analyzing the target account through the content retrieval model, the retrieved content is obtained. After sorting and randomly adding the retrieved content, the target recommended content is obtained and fed back to terminal 310.

[0061] The aforementioned terminal can be various forms of terminal devices such as mobile phones, tablets, desktop computers, portable laptops, and smart TVs, and this application embodiment does not limit this to any particular type.

[0062] It is worth noting that the aforementioned servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0063] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Based on the cloud computing business model, cloud technology encompasses network technology, information technology, integration technology, management platform technology, and application technology. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing.

[0064] In some embodiments, the server described above can also be implemented as a node in a blockchain system. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and cryptographic algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer.

[0065] It is understood that the specific implementation of this application involves user information, account information, historical interaction data and other related data. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0066] Based on the above description, the content recommendation method provided in this application will be explained. This method can be executed by a server or a terminal, or by both a server and a terminal. In this embodiment, the method is illustrated by being executed by a server. Figure 4 As shown, the method includes the following steps.

[0067] Step 401: Obtain the positive and negative sample content corresponding to the sample account.

[0068] Positive sample content refers to historical recommended content that has an interactive relationship with the sample account. That is, when content is recommended to the sample account within a historical time period, there is an interactive relationship between the sample account and the positive sample content. In some embodiments, there is a positive interaction relationship between the sample account and the positive sample content. A positive interaction relationship refers to an interaction relationship where the sample account shows interest in the recommended content. For example, if a sample account likes recommended content A, then recommended content A is identified as positive sample content; if a sample account comments on recommended content B, then recommended content B is identified as positive sample content, and so on.

[0069] Optionally, after determining the historical time period, positive sample content that has an interaction relationship with the sample account within the historical time period is obtained, wherein the historical time period is a specified time period; or, the historical time period is a random historical time period; or, the historical time period is the most recent time period of a preset duration, and this embodiment does not limit this.

[0070] The process involves obtaining historical interaction events of the sample account within a specific time period. These historical interaction events are defined as interactions between the sample account and historical recommended content. Recommended content corresponding to positive interactions within these historical interaction events is then used as positive sample content. Interaction events can correspond to either positive or negative interactions. A negative interaction indicates that the sample account has a negative interest in the historical recommended content. For example, if the sample account quickly scrolls past historical recommended content A, there is a negative interaction between the sample account and historical recommended content A; or, if the sample account sets historical recommended content B to "not interested," there is a negative interaction between the sample account and historical recommended content C.

[0071] Negative sample content refers to historical recommended content that has no interaction with the sample account; or, negative sample content refers to historical recommended content that has negative interaction with the sample account.

[0072] Optionally, negative sample content can be randomly sampled from the content pool; or, recommended content corresponding to negative interaction relationships in historical interaction events can be obtained as negative sample content.

[0073] Optionally, the ratio of positive to negative sample content is typically between 1:20 and 1:900.

[0074] Step 402: Recall and expand the positive sample content to obtain expanded sample content.

[0075] The extended sample content refers to content that is related to the positive sample content. This relationship can include at least one of the following: content publishing account association, content consuming account association, content publishing region association, or content publishing topic association.

[0076] Among them, content publishing account association refers to the relationship (e.g., friend relationship) between the publishing account of the extended sample content and the publishing account of the main sample content, or that they are the same account; content consumption account association refers to the relationship between the consumption account of the extended sample content and the consumption account of the main sample content; content publishing area association refers to the association or same publishing section of the extended sample content and the main sample content in the content publishing platform, where the association of publishing sections is pre-set; content publishing theme association refers to the association or same theme tags attached to the extended sample content and the main sample content when they are published.

[0077] In this embodiment, the method of recalling and expanding to obtain expanded sample content includes at least one of the following methods:

[0078] First, content publishing account association.

[0079] Identify the content publishing account for the positive sample content; obtain the first set of content published by the content publishing account, which includes content published by the content publishing account within a historical time period; obtain extended sample content based on the first content set, wherein, when obtaining extended sample content based on the first content set, the content in the first content set is sorted based on the historical interaction data corresponding to the content to obtain a first content candidate set; filter the first content candidate set based on category conditions to obtain extended sample content, the category conditions including conditions consistent with the category of the positive sample content.

[0080] Among them, the content publishing account refers to the account that publishes positive sample content. For example, when the positive sample content is video content, the content publishing account is the video publishing account that publishes the positive sample content. When the positive sample content is product content, the content publishing account is the store account that publishes the product content.

[0081] Historical interaction data refers to the data of interactive events received corresponding to the content, such as likes, shares, and comments. In some embodiments, the content in the first content set is sorted according to the number of interactive events in the historical interaction data, such as sorting the content in the first content set from highest to lowest based on the number of likes corresponding to each piece of content in the historical interaction data.

[0082] For illustration, the positive sample content is the content published by account M, that is, account M is the content publishing account. The first content set is obtained by integrating the content published by account M, and the content in the first content set is sorted to obtain the extended sample content.

[0083] In some embodiments, when filtering the first set of content candidates, extended sample content is obtained based on time decay score and category conditions. The time decay score refers to the fact that the greater the time difference between the publication time of the content and the current time, the higher the filtering score of the content and the higher the probability that the content will be filtered.

[0084] Second, content consumption account association

[0085] Identify the associated accounts corresponding to the sample accounts. Associated accounts are accounts that have a relationship with the sample accounts. Obtain the second set of content published by the associated accounts. The second set of content includes the content published by the associated accounts within a historical time period. Obtain extended sample content based on the second set of content.

[0086] Specifically, when obtaining extended sample content based on the second content set, the content in the second content set is sorted based on the correlation between the sample account and the associated account to obtain the second content candidate set; the second content candidate set is then filtered based on category conditions to obtain extended sample content, and the category conditions include conditions that are consistent with the positive sample content category.

[0087] The correlation between the associated account and the sample account is determined based on the similarity between the two accounts; or, the correlation between the associated account and the sample account is determined based on the degree of overlap of the interests between the two accounts; or, the correlation between the associated account and the sample account is determined based on the duration of the association between the two accounts.

[0088] For illustration, the positive sample content is the content posted by account P. We determine the account Q associated with account P, obtain the second content set corresponding to the content posted by account Q, and obtain the extended sample content based on the second content set.

[0089] Third, content publishing area association

[0090] Determine the publishing area of ​​the positive sample content, that is, the publishing section of the positive sample content on the content publishing platform, and obtain other published content from that publishing section as extended sample content.

[0091] Fourth, content publishing theme relevance

[0092] Obtain the topic tags attached to the positive sample content when it is published, and obtain the content labeled with the topic tags from the content publishing platform as extended sample content.

[0093] It is worth noting that the above-described method for determining the extended sample content is merely an illustrative example, and the embodiments of this application do not limit it.

[0094] Furthermore, the above-mentioned methods for determining the extended sample content can be implemented individually or in combination of two or more methods, and this application embodiment does not limit this.

[0095] Step 403: Based on the matching relationship between positive sample content, extended sample content and negative sample content, train the content recall model to obtain the target recall model.

[0096] In some embodiments, the content recall model is trained based on the matching relationships between positive sample content and sample account, negative sample content and sample account, extended sample content and positive sample content, and negative sample content and positive sample content, respectively, to obtain the target recall model.

[0097] The targeted recall model is used to recommend content to accounts.

[0098] Step 404: Analyze the target account and the content to be recommended using the target recall model to obtain the target recommended content to be recommended to the target account from the content to be recommended.

[0099] By using a target recall model to analyze the recommendation degree of the target account and each piece of content to be recommended, the target recommended content to be recommended to the target account can be obtained from the content to be recommended.

[0100] Optionally, the target account may be the same as the sample account mentioned above, or the target account may be a different account from the sample account mentioned above. This application embodiment does not limit this.

[0101] In some embodiments, a target recall model is used to analyze the recommendation degree of the target account and each piece of content to be recommended, thereby obtaining the recalled content. After sorting and diversity processing of the recalled content, the target recommended content is obtained and recommended to the target account.

[0102] In summary, the method provided in this embodiment expands the recall based on the positive sample content to obtain expanded sample content. The correlation between the expanded sample content and the positive sample content reflects the interest distribution of the sample account rather than specific interest points. Thus, the content recall model is trained by fusing the interest distribution. The trained content recall model can recall content to be recommended based on the account's interest distribution and determine the target recommended content to recommend to the account, thereby improving the accuracy and effectiveness of content recommendation.

[0103] The method provided in this embodiment, when determining extended sample content, expands the content belonging to the same content publishing account as the positive sample content by the association between content publishing accounts. Since there is an association between the content published by the same content publishing account, it indirectly reflects the interest distribution of the sample accounts and improves the recall accuracy.

[0104] The method provided in this embodiment determines the extended sample content by associating it with an account. Since there is a correlation between the associated account and the sample account, there is a certain correlation between the interests of the associated account and the sample account, which indirectly reflects the interest distribution of the sample account and improves the recall accuracy.

[0105] The method provided in this embodiment, after determining the content set (e.g., the first content set / the second content set), sorts the content in the content set to obtain a candidate set, and filters the candidate set based on category conditions to obtain extended sample content. Since the category conditions are used to control the extended sample content to keep the category the same as the positive sample content, the problem of low accuracy of interest distribution prediction caused by the two categories being different is avoided.

[0106] In an optional embodiment, a loss value is first calculated based on the matching relationship described above, and then the content recall model is trained using the loss value. Figure 5 This is a flowchart of a content recommendation method provided in another exemplary embodiment of this application. This method can be executed by a server or a terminal, or jointly by both. In this embodiment, the method is described using the server as an example. Figure 5 As shown, the method includes the following steps.

[0107] Step 501: Obtain the positive and negative sample content corresponding to the sample account.

[0108] The positive sample content consists of historical recommendation content that has interacted with the sample account. In other words, when content was recommended to the sample account within a historical time period, there was an interaction between the sample account and the positive sample content.

[0109] It is worth noting that the content of step 501 has already been explained in step 401 above, and will not be repeated here.

[0110] Step 502: Recall and expand the positive sample content to obtain expanded sample content.

[0111] The extended sample content refers to content that is related to the positive sample content. This relationship can include at least one of the following: content publishing account association, content consuming account association, content publishing region association, or content publishing topic association.

[0112] It is worth noting that the content of step 502 has already been explained in step 402 above, and will not be repeated here.

[0113] Step 503: Based on the first matching relationship between positive sample content, negative sample content and sample account, obtain the cross-entropy loss between positive sample content and negative sample content.

[0114] Optionally, since there is an interaction between positive sample content and sample account, but no interaction between negative sample content and sample account, the first matching result between positive sample content and sample account and the second matching result between negative sample content and sample account are obtained through the content recall model, and the cross-entropy loss is calculated based on the first matching result and the second matching result.

[0115] Step 504: Based on the second matching relationship between positive sample content and negative sample content, obtain the first matching loss between positive sample content and negative sample content.

[0116] Optionally, positive sample features S of positive sample content can be extracted using a content recall model. i And the negative sample features S extracted from negative sample content through the content recall model. j Calculate the first matching loss between positive sample features and negative sample features, as shown in Formula 1 below:

[0117] Formula 1:

[0118] Among them, P ij This represents the loss of the first matching.

[0119] Step 505: Based on the third matching relationship between the positive sample content and the extended sample content, obtain the second matching loss between the positive sample content and the extended sample content.

[0120] Optionally, positive sample features S of positive sample content can be extracted using a content recall model. i And the extended sample features S extracted from the extended sample content through the content recall model. k The second matching loss between positive sample features and expanded sample features is calculated as shown in Formula 2 below:

[0121] Formula 2:

[0122] Among them, P ik This represents the second matching loss.

[0123] Step 506: Based on cross-entropy loss, first matching loss and second matching loss, train the content recall model to obtain the target recall model.

[0124] Optionally, based on the first matching loss and the second matching loss, a matching loss is obtained. The cross-entropy loss and the matching loss are then fused to obtain the total loss. The content recall model is then trained based on the total loss to obtain the target recall model.

[0125] Optionally, the weighted sum of the first matching loss and the second matching loss is used as the matching loss, wherein the weights are preset or randomly determined, and optionally, the weights of the first matching loss and the second matching loss are both 1.

[0126] The total loss is a weighted sum of the cross-entropy loss and the matching loss. In some embodiments, the total loss is the sum of the cross-entropy loss and the matching loss.

[0127] The model parameters in the content recall model are adjusted based on the total loss to obtain the target recall model.

[0128] Optionally, the content recall model can be iteratively trained using the total loss calculated through rounds of iterations to obtain the target recall model.

[0129] Step 507: Analyze the target account and the content to be recommended using the target recall model to obtain the target recommended content to be recommended to the target account from the content to be recommended.

[0130] By using a target recall model to analyze the recommendation degree of the target account and each piece of content to be recommended, the target recommended content to be recommended to the target account can be obtained from the content to be recommended.

[0131] In some embodiments, a target recall model is used to analyze the recommendation degree of the target account and each piece of content to be recommended, thereby obtaining the recalled content. After sorting and diversity processing of the recalled content, the target recommended content is obtained and recommended to the target account.

[0132] In summary, the method provided in this embodiment expands the recall based on the positive sample content to obtain expanded sample content. The correlation between the expanded sample content and the positive sample content reflects the interest distribution of the sample account rather than specific interest points. Thus, the content recall model is trained by fusing the interest distribution. The trained content recall model can recall content to be recommended based on the account's interest distribution and determine the target recommended content to recommend to the account, thereby improving the accuracy and effectiveness of content recommendation.

[0133] The method provided in this embodiment calculates cross-entropy loss for positive and negative sample content, and adds matching loss based on positive, negative, and extended sample content. This allows the content recall model to be trained using cross-entropy loss and matching loss. While ensuring the interest prediction accuracy of the target recall model, it also incorporates the characterization of distribution modeling, thereby improving the recall accuracy of the target recall model.

[0134] In an optional embodiment, the above target recall model is implemented as a dual-tower model, that is, the target recall model includes an account sub-model (corresponding to the user tower) and a content sub-model (corresponding to the feed tower). Figure 6 This is a flowchart of a content recommendation method provided in another exemplary embodiment of this application. This method can be executed by a server or a terminal, or jointly by both. In this embodiment, the method is described using the server as an example. Figure 6 As shown, the method includes the following steps.

[0135] Step 601: Obtain the positive and negative sample content corresponding to the sample account.

[0136] The positive sample content consists of historical recommendation content that has interacted with the sample account. In other words, when content was recommended to the sample account within a historical time period, there was an interaction between the sample account and the positive sample content.

[0137] It is worth noting that the content of step 601 has already been explained in step 401 above, and will not be repeated here.

[0138] Step 602: Recall and expand the positive sample content to obtain expanded sample content.

[0139] The extended sample content refers to content that is related to the positive sample content. This relationship can include at least one of the following: content publishing account association, content consuming account association, content publishing region association, or content publishing topic association.

[0140] It is worth noting that the content of step 602 has already been explained in step 402 above, and will not be repeated here.

[0141] Step 603: Based on the matching relationship between positive sample content, extended sample content and negative sample content, train the content retrieval model to obtain the account sub-model and the content sub-model.

[0142] The account sub-model and the content sub-model constitute the target recall model, which is used to recommend content to the account.

[0143] The account sub-model is used to analyze account information, while the content sub-model is used to analyze content data.

[0144] Step 604: Analyze the target account through the account sub-model to obtain the account characteristics of the target account.

[0145] Optionally, after the content retrieval model is trained, an account sub-model and a content sub-model are obtained, which are used to extract features from the account and content, respectively. The account sub-model and content sub-model are implemented as deep neural network (DNN) models.

[0146] When the account sub-model is implemented as an online model, the account sub-model trained offline is converted into a lightweight inference format for real-time online application.

[0147] In some embodiments, the target account is input into the account sub-model, where a neural network layer extracts features from the target account layer by layer to obtain the account features corresponding to the target account. Specifically, when inputting the target account into the account sub-model, the account information is obtained and input into the account sub-model in a preset format. For example, the account identifier, browsing history, gender data, and age data corresponding to the target account are obtained. After converting the account information into a unified data format, the various account information items are arranged and connected sequentially according to a preset order to obtain the input content. The input content is then input into the account sub-model, and the account features corresponding to the target account are output.

[0148] Step 605: Analyze the content to be recommended using the content sub-model to obtain the content features corresponding to the content to be recommended.

[0149] In some embodiments, the content to be recommended is all the content in the candidate pool; or, the content to be recommended is the candidate content obtained after preliminary screening of the candidate pool; or, the content to be recommended is the candidate content of a specified format or type in the candidate pool, which is not limited in this embodiment.

[0150] In some embodiments, the content to be recommended is input into the content sub-model sequentially or simultaneously, and the neural network layer in the content sub-model extracts features of the content to be recommended layer by layer, finally obtaining the content features corresponding to the content to be recommended.

[0151] Specifically, when inputting content to be recommended into the content sub-model, the text, image, and audio content within the content are acquired and input into the content sub-model in a preset manner. For example: when the content to be recommended includes text, the text is input into the text extraction channel of the content sub-model; when the content to be recommended includes image content, the image is input into the image extraction channel of the content sub-model; when the content to be recommended includes audio content, the audio is input into the audio extraction channel of the content sub-model; or, the text, image, or audio content of the content to be recommended is used for feature extraction through a unified feature extraction channel in the content sub-model.

[0152] After the content sub-model extracts features from the content to be recommended, it outputs the content features corresponding to the content to be recommended.

[0153] Step 606: Based on the inner product between account features and content features, determine the target recommended content to be recommended to the target account from the content to be recommended.

[0154] Optionally, the inner product between the account features and each content feature can be calculated separately, and the content to be recommended can be sorted according to the inner product. The top K in the sorted list can be determined as the recall result, where K is a positive integer.

[0155] In some embodiments, the vector inner product between account features and each content feature is calculated respectively, and the recommended content is sorted from smallest to largest according to the vector inner product results, so as to determine the top K sorted content as the recall result.

[0156] In some embodiments, the target recall model first determines the recall content from the content to be recommended, and then determines the target recommended content from the recall content based on subsequent interest analysis.

[0157] Indicative, Figure 7 This is an overall flowchart of the content recall process provided in an exemplary embodiment of this application, such as... Figure 7 As shown, the process includes:

[0158] Step 701: Receive real-time messages. These messages correspond to user behaviors generated when an account browses content. For example, after a user likes content A, user behavior data is generated, and real-time messages are retrieved. The user behavior data is then aggregated based on the session record. Step 702: Real-time data processing. This involves retrieving real-time user behavior data from the real-time messages and analyzing it. Step 703: Pull and concatenate features. This involves pulling and concatenating features from each user behavior data set to determine whether the corresponding content belongs to positive or negative sample content. Step 704: Construct positive and negative samples. This involves obtaining positive sample data based on user behavior data and obtaining negative sample data through random sampling. Step 705: Perform multi-path retrieval on positive sample content to obtain extended sample content. Step 706: Store the positive and negative sample content and extended sample content in an offline sample center. Subsequent model training can directly retrieve sample content from the offline sample center. Step 707: Obtain positive and negative samples and extended sample content, and train the model online. Optionally, the model is trained using multi-loss value fusion calculation to obtain the user tower and feed tower. Step 708: Convert the user tower to online infer format for online scoring. The typical training framework is, for example, TensorFlow or PyTorch, including forward inference and backward gradient optimization of the DNN network. Online inference only requires forward inference operations, so it is converted to a lighter inference format, such as ONNX. Step 709: Feed tower DNN inference candidate pool feed. Optionally, feature extraction is performed on the feed in the candidate pool using the feed tower. Optionally, the feed tower does not need to score online in real time, but rather is updated offline on a minute-by-minute basis. The model needs to use the offline scoring of all candidate sets to cache the content features in online storage. Step 710: Online index update. After the feed features are extracted, the index pool is updated, thus enabling feed indexing based on user features. Step 711: Online service. This is the online recall scoring service. After obtaining the recall content corresponding to the account through account features and feed feature index, content recommendations are made to the account based on the recall content.

[0159] In summary, the method provided in this embodiment expands the recall based on the positive sample content to obtain expanded sample content. The correlation between the expanded sample content and the positive sample content reflects the interest distribution of the sample account rather than specific interest points. Thus, the content recall model is trained by fusing the interest distribution. The trained content recall model can recall content to be recommended based on the account's interest distribution and determine the target recommended content to recommend to the account, thereby improving the accuracy and effectiveness of content recommendation.

[0160] The method provided in this embodiment uses a dual-tower model to recall and recommend content to target accounts. It leverages the parallel and independent operation of the user tower and the feed tower to improve recall efficiency and accuracy.

[0161] Figure 8 This is a structural block diagram of a content recommendation apparatus provided in an exemplary embodiment of this application, such as... Figure 8 As shown, the device includes:

[0162] The acquisition module 810 is used to acquire positive sample content and negative sample content corresponding to the sample account, wherein the positive sample content is historical recommendation content that has an interactive relationship with the sample account;

[0163] The extension module 820 is used to recall and extend the positive sample content to obtain extended sample content, wherein the extended sample content is extended content that is related to the positive sample content;

[0164] Training module 830 is used to train the content recall model based on the matching relationship between the positive sample content, the extended sample content and the negative sample content to obtain the target recall model, which is used to recommend content to the account.

[0165] The analysis module 840 is used to analyze the target account and the content to be recommended through the target recall model to obtain the target recommended content to be recommended to the target account from the content to be recommended.

[0166] In an optional embodiment, such as Figure 9 As shown, the expansion module 820 includes:

[0167] Determining unit 821 is used to determine the content publishing account of the positive sample content;

[0168] The extension unit 822 is used to obtain a first set of content published by the content publishing account, the first set of content including content published by the content publishing account within a historical time period; and to obtain the extended sample content based on the first set of content.

[0169] In an optional embodiment, the expansion unit 822 is further configured to sort the content in the first content set based on the historical interaction data corresponding to the content to obtain a first content candidate set; and to filter the first content candidate set based on category conditions to obtain the expanded sample content, wherein the category conditions include conditions consistent with the category of the positive sample content.

[0170] In an optional embodiment, the expansion module 820 includes:

[0171] The determining unit 821 is used to determine the associated account corresponding to the sample account, wherein the associated account is an account that has an association relationship with the sample account;

[0172] The extension unit 822 is used to obtain a second set of content published by the associated account, the second set of content including content published by the associated account within a historical time period; and to obtain the extended sample content based on the second set of content.

[0173] In an optional embodiment, the expansion unit 822 is further configured to sort the content in the second content set based on the association between the sample account and the associated account to obtain a second content candidate set; and to filter the second content candidate set based on category conditions to obtain the expanded sample content, wherein the category conditions include conditions consistent with the category of the positive sample content.

[0174] In an optional embodiment, the training module 830 is further configured to obtain the cross-entropy loss between the positive sample content and the negative sample content based on the first matching relationship between the positive sample content, the negative sample content and the sample account;

[0175] The training module 830 is further configured to obtain a first matching loss between the positive sample content and the negative sample content based on a second matching relationship between the positive sample content and the negative sample content;

[0176] The training module 830 is further configured to obtain a second matching loss between the positive sample content and the extended sample content based on a third matching relationship between the positive sample content and the extended sample content;

[0177] The training module 830 is also used to train the content recall model based on the cross-entropy loss, the first matching loss and the second matching loss to obtain the target recall model.

[0178] In an optional embodiment, the training module 830 is further configured to obtain a matching loss based on the first matching loss and the second matching loss; fuse the cross-entropy loss and the matching loss to obtain a total loss; and train the content recall model based on the total loss to obtain the target recall model.

[0179] In an optional embodiment, the training module 830 is further configured to train the content recall model based on the matching relationship between the positive sample content, the extended sample content, and the negative sample content, to obtain an account sub-model and a content sub-model. The account sub-model is used to analyze account information, and the content sub-model is used to analyze content data.

[0180] In an optional embodiment, the analysis module 840 is further configured to analyze the target account through the account sub-model to obtain the account features of the target account; analyze the content to be recommended through the content sub-model to obtain the content features corresponding to the content to be recommended; and determine the target recommended content to be recommended to the target account from the content to be recommended based on the inner product between the account features and the content features.

[0181] In an optional embodiment, the acquisition module 810 is further configured to acquire historical interaction events of the sample account within a historical time period, wherein the historical interaction events are interaction events between the sample account and historical recommended content; acquire recommended content corresponding to positive interaction relationships in the historical interaction events as the positive sample content; and acquire negative sample content corresponding to the sample account.

[0182] In an optional embodiment, the acquisition module 810 is further configured to randomly sample the negative sample content from the content pool;

[0183] or,

[0184] The acquisition module 810 is further configured to acquire recommended content corresponding to negative interaction relationships in the historical interaction events as the negative sample content.

[0185] In summary, the device provided in this embodiment expands the recall based on the positive sample content to obtain expanded sample content. The correlation between the expanded sample content and the positive sample content reflects the interest distribution of the sample account rather than specific interest points. Thus, the content recall model is trained by fusing the interest distribution. The trained content recall model can recall content to be recommended based on the account's interest distribution and determine the target recommended content to recommend to the account, thereby improving the accuracy and effectiveness of content recommendation.

[0186] It should be noted that the content recommendation device provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the content recommendation device and the content recommendation method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0187] Figure 10 This illustration shows a schematic diagram of a server provided in an exemplary embodiment of this application. The server may be as follows: Figure 3 The terminal or server shown.

[0188] Specifically, server 1000 includes a central processing unit (CPU) 1001, a system memory 1004 including random access memory (RAM) 1002 and read-only memory (ROM) 1003, and a system bus 1005 connecting the system memory 1004 and the CPU 1001. Server 1000 also includes a mass storage device 1006 for storing the operating system 1013, application programs 1014, and other program modules 1015.

[0189] Mass storage device 1006 is connected to central processing unit 1001 via a mass storage controller (not shown) connected to system bus 1005. Mass storage device 1006 and its associated computer-readable media provide non-volatile storage for server 1000. That is, mass storage device 1006 may include computer-readable media (not shown) such as hard disk or compact disc read-only memory (CD-ROM) drive.

[0190] Without loss of generality, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include RAM, ROM, erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other solid-state storage technologies, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that computer storage media are not limited to the above-mentioned types. The system memory 1004 and mass storage device 1006 described above can be collectively referred to as memory.

[0191] According to various embodiments of this application, server 1000 can also be connected to a remote computer on a network, such as the Internet. That is, server 1000 can be connected to network 1012 via network interface unit 1011 connected to system bus 1005, or it can use network interface unit 1011 to connect to other types of networks or remote computer systems (not shown).

[0192] The aforementioned memory also includes one or more programs, which are stored in the memory and configured to be executed by the CPU.

[0193] Embodiments of this application also provide a computer device that can be implemented as follows: Figure 2 The terminal or server shown. The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the content recommendation method provided in the above-described method embodiments.

[0194] Embodiments of this application also provide a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the content recommendation method provided in the above-described method embodiments.

[0195] Embodiments of this application also provide a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the content recommendation methods described in the above embodiments.

[0196] Optionally, the computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. The random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM). The sequence numbers of the embodiments in this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0197] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0198] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A content recommendation method, characterized in that, The method includes: Obtain positive and negative sample content corresponding to the sample account. The positive sample content is historical recommendation content that has an interactive relationship with the sample account. The negative sample content includes historical recommendation content that has no interactive relationship with the sample account and historical recommendation content that has a negative interactive relationship with the sample account. The positive sample content is recalled and expanded to obtain expanded sample content, which is expanded content that is related to the positive sample content; the relationship includes at least one of the following: content publishing account association, content consuming account association, content publishing region association, and content publishing topic association; the expanded sample content has the same category as the positive sample content; the relationship between the expanded sample content and the positive sample content is used to reflect the interest distribution of the sample accounts; Based on the first matching result between the positive sample content and the sample account and the second matching result between the negative sample content and the sample account, the cross-entropy loss is obtained; Based on the second matching relationship between the positive sample content and the negative sample content, the first matching loss between the positive sample content and the negative sample content is obtained; Based on the third matching relationship between the positive sample content and the extended sample content, a second matching loss between the positive sample content and the extended sample content is obtained; The weighted sum of the first matching loss and the second matching loss is used as the matching loss; The cross-entropy loss and the matching loss are fused to obtain the total loss; The content recall model is trained based on the total loss to obtain the target recall model, which is used to recommend content to the account. The target recall model is used to analyze the target account and the content to be recommended, and the target recommended content to be recommended to the target account is obtained from the content to be recommended.

2. The method according to claim 1, characterized in that, The process of recalling and expanding the positive sample content to obtain expanded sample content includes: Determine the content publishing account for the positive sample content; Obtain a first set of content published by the content publishing account, wherein the first set of content includes content published by the content publishing account within a historical time period; The extended sample content is obtained based on the first content set.

3. The method according to claim 2, characterized in that, The process of obtaining the extended sample content based on the first content set includes: The content in the first content set is sorted based on the historical interaction data corresponding to the content to obtain the first content candidate set; The first content candidate set is filtered based on category conditions to obtain the extended sample content, wherein the category conditions include conditions that are consistent with the category of the positive sample content.

4. The method according to claim 1, characterized in that, The process of recalling and expanding the positive sample content to obtain expanded sample content includes: Identify the associated accounts corresponding to the sample accounts, wherein the associated accounts are accounts that have a relationship with the sample accounts; Obtain a second set of content published by the associated account, the second set of content including content published by the associated account within a historical time period; The extended sample content is obtained based on the second content set.

5. The method according to claim 4, characterized in that, The process of obtaining the extended sample content based on the second content set includes: The content in the second content set is sorted based on the association between the sample account and the associated account to obtain the second content candidate set; The second content candidate set is filtered based on category conditions to obtain the extended sample content. The category conditions include conditions that are consistent with the category of the positive sample content.

6. The method according to any one of claims 1 to 5, characterized in that, The process of training the content recall model to obtain the target recall model includes: The content retrieval model is trained to obtain an account sub-model and a content sub-model. The account sub-model is used to analyze account information, and the content sub-model is used to analyze content data.

7. The method according to claim 6, characterized in that, The step of analyzing the target account and the content to be recommended using the target recall model to obtain the target recommended content to be recommended to the target account from the content to be recommended includes: The target account is analyzed using the account sub-model to obtain the account characteristics of the target account; The content to be recommended is analyzed using the content sub-model to obtain the content features corresponding to the content to be recommended. Based on the inner product between the account features and the content features, target recommended content is determined from the content to be recommended to the target account.

8. The method according to any one of claims 1 to 5, characterized in that, The acquisition of positive and negative sample content corresponding to the sample account includes: Obtain the historical interaction events of the sample account within a historical time period, wherein the historical interaction events are the interaction events between the sample account and historical recommended content; The recommended content corresponding to positive interaction relationships in the historical interaction events is obtained as the positive sample content; Obtain the negative sample content corresponding to the sample account.

9. The method according to claim 8, characterized in that, The step of obtaining the negative sample content corresponding to the sample account includes: The negative sample content is obtained by randomly sampling from the content pool; or, The recommended content corresponding to negative interaction relationships in the historical interaction events is obtained as the negative sample content.

10. A content recommendation device, characterized in that, The device includes: The acquisition module is used to acquire positive sample content and negative sample content corresponding to the sample account. The positive sample content is historical recommendation content that has an interactive relationship with the sample account. The negative sample content includes historical recommendation content that has no interactive relationship with the sample account and historical recommendation content that has a negative interactive relationship with the sample account. An extension module is used to recall and expand the positive sample content to obtain extended sample content. The extended sample content is extended content that is related to the positive sample content. The relationship includes at least one of the following: content publishing account association, content consuming account association, content publishing region association, and content publishing topic association. The extended sample content has the same category as the positive sample content. The relationship between the extended sample content and the positive sample content is used to reflect the interest distribution of the sample accounts. The training module is used to obtain a cross-entropy loss based on a first matching result between the positive sample content and the sample account, and a second matching result between the negative sample content and the sample account; to obtain a first matching loss between the positive sample content and the negative sample content based on the second matching relationship between the positive sample content and the negative sample content; to obtain a second matching loss between the positive sample content and the extended sample content based on a third matching relationship between the positive sample content and the extended sample content; to use the weighted sum of the first matching loss and the second matching loss as the matching loss; to fuse the cross-entropy loss and the matching loss to obtain a total loss; and to train the content recall model based on the total loss to obtain a target recall model, which is used to recommend content to accounts. The analysis module is used to analyze the target account and the content to be recommended through the target recall model, and to obtain the target recommended content to be recommended to the target account from the content to be recommended.

11. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one program, which is loaded and executed by the processor to implement the content recommendation method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The storage medium stores at least one program segment, which is loaded and executed by a processor to implement the content recommendation method as described in any one of claims 1 to 9.

13. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the content recommendation method as described in any one of claims 1 to 9.