Content recommendation method, apparatus, device, storage medium, and computer program product

By acquiring representation vectors of target users' behaviors, preferences, and author behaviors across multiple recommendation scenarios, similar users are identified and candidate content is recommended. This solves the recommendation failure problem caused by sparse user behavior and achieves effective content recommendation in sparse scenarios.

CN114925288BActive Publication Date: 2025-12-16BIGO TECH PTE LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210540311.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-17
Publication Date
2025-12-16
Estimated Expiration
2042-05-17

AI Technical Summary

Technical Problem

Existing content recommendation methods based on user collaborative filtering struggle to identify similar users when user behavior is sparse, leading to recommendation failures.

Method used

By obtaining the first, second, and third representation vectors of the target user, similar users are identified, and candidate content is extracted from the historical behavior data of similar users to filter out the target content and recommend it to the client.

Benefits of technology

When the target user's content behavior data for the target recommendation scenario is sparse, it can recommend relevant and interesting content and avoid recommendation failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114925288B_ABST
    Figure CN114925288B_ABST
Patent Text Reader

Abstract

The application discloses a content recommendation method and device, equipment, a storage medium and a computer program product, comprising: receiving a content recommendation request sent by a target user through a client, obtaining a first representation vector representing the behavior of the target user to the content of multiple recommendation scenarios, a second representation vector representing the preference of the target user to the content of multiple recommendation scenarios, and a third representation vector representing the behavior of the target user to the author of the content of multiple recommendation scenarios; determining similar users of the target user according to the first representation vector, the second representation vector and the third representation vector; extracting content belonging to the target recommendation scenario from the historical behavior data of the similar users as candidate content; and filtering out target content from the candidate content and recommending the target content to the client, which realizes that when the behavior data of the user to the content of the target recommendation scenario is sparse, the target recommendation scenario and the content interested by the user are recommended to the user through the vectors of the user under multiple recommendation scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of data recommendation, and in particular, to a content recommendation method and device, equipment, a storage medium and a computer program product. BACKGROUND

[0002] On an application client, recommending content of interest to a user to the user is an important means to improve user experience, and therefore, how to obtain content of interest to the user and recommend it to the user is crucial.

[0003] At present, in a content recommendation method based on user collaborative filtering, when content of a certain recommendation scene needs to be recommended to a target user, only similar users of the target user are calculated based on behavior data of the target user on the content of the recommendation scene, and the content of the recommendation scene that the similar users have browsed or are interested in is recommended to the target user.

[0004] In the existing content recommendation method based on user collaborative filtering, when the historical behavior of the target user on the content of a certain recommendation scene is sparse, it is difficult to obtain similar users of the target user, resulting in failure to recall the content of the recommendation scene and recommend it to the target user. SUMMARY

[0005] Embodiments of the present application provide a content recommendation method, device, equipment, storage medium and computer program product to solve the problem that the existing content recommendation method based on user collaborative filtering is difficult to obtain similar users when user behavior is sparse, resulting in recommendation failure.

[0006] In a first aspect, embodiments of the present application provide a content recommendation method, comprising:

[0007] receiving a content recommendation request sent by a target user through a client, the content recommendation request including a target recommendation scene of requested content;

[0008] obtaining a first feature vector, a second feature vector and a third feature vector of the target user, wherein the first feature vector is a vector representing behavior of the target user on content of multiple recommendation scenes, the second feature vector is a vector representing preference of the target user on content of multiple recommendation scenes, and the third feature vector is a vector representing behavior of the target user on authors of content of multiple recommendation scenes;

[0009] determining similar users of the target user according to the first feature vector, the second feature vector and the third feature vector;

[0010] extracting content belonging to the target recommendation scene from historical behavior data of the similar users as candidate content;

[0011] filtering out target content from the candidate content and recommending the target content to the client.

[0012] In a second aspect, an embodiment of the present application provides a content recommendation device, comprising:

[0013] a request receiving module, configured to receive a content recommendation request sent by a target user through a client, wherein the content recommendation request comprises a target recommendation scenario of requested content;

[0014] a vector obtaining module, configured to obtain a first feature vector, a second feature vector and a third feature vector of the target user, wherein the first feature vector is a vector representing behaviors of the target user on content of multiple recommendation scenarios, the second feature vector is a vector representing preferences of the target user on content of multiple recommendation scenarios, and the third feature vector is a vector representing behaviors of the target user on authors of content of multiple recommendation scenarios;

[0015] a similar user determining module, configured to determine similar users of the target user according to the first feature vector, the second feature vector and the third feature vector;

[0016] a candidate content obtaining module, configured to extract content belonging to the target recommendation scenario from historical behavior data of the similar users as candidate content;

[0017] a content recommendation module, configured to filter out target content from the candidate content and recommend the target content to the client.

[0018] In a third aspect, an embodiment of the present application provides a content recommendation device, comprising:

[0019] one or more processors;

[0020] a storage device, configured to store one or more computer programs,

[0021] when the one or more computer programs are executed by the one or more processors, the one or more processors implement the content recommendation method in the first aspect of the present application.

[0022] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the content recommendation method in any one of the first aspect and the second aspect of the present application.

[0023] In a fifth aspect, an embodiment of the present application provides a computer program product, when instructions in the computer program product are executed by a processor, the content recommendation method in the first aspect is implemented.

[0024] When this embodiment receives a content recommendation request for a target recommendation scenario, it obtains a first representation vector representing the target user's behavior towards content in multiple recommendation scenarios, a second representation vector representing the target user's preferences for content in multiple recommendation scenarios, and a third representation vector representing the target user's behavior towards the authors of content in multiple recommendation scenarios. Similar users of the target user are then identified using these three representation vectors. Furthermore, content belonging to the target recommendation scenario is extracted from the historical behavior data of these similar users as candidate content. The target content is then selected from these candidate content and recommended to the client. By using the first, second, and third representation vectors of the target user in different recommendation scenarios, similar users of the target user can be determined from the content in multiple recommendation scenarios, user behavior data on the content, and user-to-user behavior. This avoids the problem of failing to recall similar users when the target user's historical behavior data for content in the target scenario is sparse, leading to recommendation failure. It can recommend content related to and of interest to the target user even when the target user's behavior data for content in the target recommendation scenario is sparse. Attached Figure Description

[0025] Figure 1 This is a flowchart of a content recommendation method provided in Embodiment 1 of this application;

[0026] Figure 2A This is a flowchart of a content recommendation method provided in Embodiment 2 of this application;

[0027] Figure 2B This is a schematic diagram of the heterogeneity diagram in the embodiments of this application;

[0028] Figure 2C This is a schematic diagram illustrating an example of content recommendations in the embodiments of this application;

[0029] Figure 3 This is a structural block diagram of a content recommendation device provided in Embodiment 3 of this application;

[0030] Figure 4 This is a structural block diagram of a content recommendation device provided in Embodiment 4 of this application. Detailed Implementation

[0031] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present application, not the entire structure.

[0032] The content recommendation can be recommending content to a target user on a client page. The content can be data that needs to be recommended in various recommendation scenarios. For example, in a video client, the recommendation scenarios can include a scenario of recommending a live broadcast room, a scenario of recommending a post, and a scenario of recommending a video. Then the content can be a live broadcast room, a post, and a short video, respectively.

[0033] In an existing content recommendation method based on user collaborative filtering, when it is needed to recommend content of a target recommendation scenario to a target user (an object of content recommendation), for example, when a video is recommended to a target user in a video recommendation scenario, usually, historical videos watched by the target user and behavior data such as likes and shares of the historical videos are obtained, and then similarity between the target user and other users is calculated based on the historical videos and the behavior data to determine similar users, and videos watched by the similar users are obtained and recommended to the target user. When the target user is a new user, or the target user has watched few videos or even no video, the historical video data and the behavior data are sparse, which causes that the similar users of the target user cannot be calculated, and finally the videos cannot be recalled and recommended to the target user. To solve the above problems, the present embodiment provides the following content recommendation method.

[0034] Embodiment one

[0035] Figure 1 A flowchart of a content recommendation method provided by the present embodiment one, the present embodiment can be applicable to a case of recommending content of a certain recommendation scenario to a user. The method can be executed by a content recommendation device implemented by the present embodiment. The content recommendation device can be implemented by hardware or software, and integrated in a content recommendation device provided by the present embodiment, such as a server in communication with a client. Specifically, as shown in the figure, the content recommendation method of the present embodiment can include the following steps: Figure 1

[0036] S101, receiving a content recommendation request sent by a target user through a client. The content recommendation request includes a target recommendation scenario of requested content.

[0037] The client can be a client taking video as main data, for example, a video client. The client can include a plurality of business modules, each of which can correspond to a recommendation scenario. For example, the client can include a live broadcast business module, a post bar business module, and a short video business module. Correspondingly, the recommendation scenario of the live broadcast business module is to recommend a live broadcast room, the recommendation scenario of the post bar business module is to recommend a post (such as an image, text, video, etc.), and the recommendation scenario of the short video business module is to recommend a video.

[0038] ​When the client detects the recommendation event, a content recommendation request is generated and sent to the server. For example, when the target user logs in to the client and then enters the live broadcast service module by default, a content recommendation request containing the user ID of the target user and indicating that the recommended scene is a recommended live broadcast room can be generated.

[0039] Of course, in actual applications, the target recommendation scene is related to the service module on the client and is not limited to a live broadcast room. For example, when the user browses the page of the BBS service module, the target recommendation scene is to recommend a post, and when the user browses the page of the short video service module, the target recommendation scene is to recommend a short video. The embodiments of the present application do not limit the recommendation scene.

[0040] S102, obtain the first representation vector, the second representation vector, and the third representation vector of the target user.

[0041] In the embodiments of the present application, the first representation vector, the second representation vector, and the third representation vector of each user in the system can be generated in advance, and the above representation vectors are stored in the database and are updated regularly. When the server receives the content recommendation request sent by the client, the first representation vector, the second representation vector, and the third representation vector matched with the target user are searched in the database. For example, the first representation vector, the second representation vector, and the third representation vector matched with the user ID of the target user can be searched.

[0042] Of course, in actual applications, the server can also obtain the historical behavior data of the target user and the historical behavior data of other users when receiving the content recommendation request. The historical behavior data can be content behavior data of the user's interaction with the content of multiple recommendation scenes, and user behavior data of the user's interaction with the user. The content behavior data is data generated by the user's behavior on the content, such as data generated by the user's like, share, and other behaviors. The user behavior data can be data generated by the user's behavior on the user, such as data generated by the user's attention behavior on the user. The first representation vector, the second representation vector, and the third representation vector of the target user are calculated from the historical behavior data of the target user and the historical behavior data of other users.

[0043] In the embodiments of the present application, the first representation vector is a vector representing the user's behavior on the content of multiple recommendation scenes. For example, each component of the first representation vector represents the target user's behavior on the content of a certain recommendation scene. The subscript of each component can be the content ID of the content of each recommendation scene, and the value of the component is the score corresponding to the target user's behavior on the content. For example, if the target user likes the video with content ID 1001, the component A 1001 , A 1001 is represented as A

[0044] The second representation vector is a vector representing the preference of the target user for the content of the multiple recommendation scenarios. The second representation vector can be predicted by a pre-trained user vector extraction model used to predict the preference degree of the user for the content. For example, the user information of the target user, the content of each recommendation scenario, and the content behavior data of the target user for the content are input into the user vector extraction model, and the vector output by the hidden layer of the user vector extraction model is the second representation vector.

[0045] The third representation vector is a vector representing the behavior of the author of the content of the multiple recommendation scenarios. In an optional embodiment, the author of the content is also a user, and the users can follow each other. The content ID in the first representation vector can be replaced by the user ID of the author of the content. For the corresponding component value, if the target user follows the author of the content, a preset score is given, otherwise no score is given or other scores are given, thereby obtaining the third representation vector.

[0046] Of course, in actual application, user IDs of users other than the target user can also be listed. If the target user follows the corresponding user, the user ID is given a score as a vector value to obtain the third representation vector.

[0047] S103, determining similar users of the target user according to the first representation vector, the second representation vector, and the third representation vector.

[0048] In an optional embodiment, the system generates the first representation vector, the second representation vector, and the third representation vector for each user. Then, the similarity between the target user and other users can be calculated according to the first representation vector, the second representation vector, and the third representation vector of the target user and the other users. The N users with the highest similarity are determined as the similar users of the target user. For example, the first distance of the first representation vector between the target user and other users can be calculated, the second distance of the second representation vector between the target user and other users can be calculated, and the third distance of the third representation vector between the target user and other users can be calculated. The first distance, the second distance, and the third distance are weighted and summed to obtain the similarity between the target user and other users. Of course, the inner product of the vectors can also be calculated by a neighbor engine to obtain the similarity between the users. The embodiments of the present application do not limit the way of calculating the similarity between the users by vectors.

[0049] S104, extracting content belonging to the target recommendation scenario from the historical behavior data of the similar users as candidate content.

[0050] The similar users can have historical behavior data in multiple recommendation scenarios, for example, the similar users browse, like videos in a recommended video scenario, like, share posts in a recommended post bar scenario, and have rewarded a live broadcast room in a recommended live broadcast room scenario. Therefore, the content related to the target recommendation scenario of the similar users can be obtained as candidate content, for example, the target recommendation scenario is a recommended video, and the videos watched, liked, and shared by the similar users can be obtained as candidate content.

[0051] S105, filtering target content from the candidate content and recommending the target content to the client.

[0052] In an optional embodiment, each candidate content can be scored by a preset scoring mechanism to obtain a score, and the candidate contents can be sorted in descending order of the scores. The top K candidate contents can be pushed to the client, so as to realize content recommendation.

[0053] When the content recommendation request for the target recommendation scenario is received, the first feature vector representing the behavior of the target user to the content of the multiple recommendation scenarios, the second feature vector representing the preference of the target user to the content of the multiple recommendation scenarios, and the third feature vector representing the behavior of other users of the target user to the content of the multiple recommendation scenarios are obtained. The similar users of the target user are determined through the first feature vector, the second feature vector, and the third feature vector. Further, the content belonging to the target recommendation scenario is extracted from the historical behavior data of the similar users as candidate content. The target content is filtered from the candidate content and recommended to the client. Through the first feature vector, the second feature vector, and the third feature vector of the target user in different recommendation scenarios, the similar users of the target user can be determined from the content of multiple recommendation scenarios, the behavior data of the user to the content, and the behavior between users. When the behavior data of the target user to the content of the target recommendation scenario is sparse, the problem that the similar users cannot be recalled to cause the content recommendation to fail is avoided. The content related to the target recommendation scenario and interesting to the target user can be recommended to the target user when the behavior data of the target user to the content of the target recommendation scenario is sparse.

[0054] Embodiment Two

[0055] Figure 2A A flowchart of a content recommendation method provided by Embodiment Two of the present application is based on the optimization of Embodiment One described above. Specifically, as shown in FIG. 2, the content recommendation method of the present embodiment can include the following steps: Figure 2A

[0056] S201, receiving a content recommendation request sent by a target user through a client. The content recommendation request includes a target recommendation scenario of the requested content.

[0057] ​Embodiments of the present application take the target recommendation scene as an example for convenience of illustration, and the target recommendation scene can also be a recommendation post, a live broadcast room, and the like.

[0058] The client can generate a content recommendation request containing the user ID of the target user and information of the recommendation video scene and send the content recommendation request to the server when the user enters the video service module page. The server can receive the content recommendation request and obtain the user ID of the target user from the content recommendation request.

[0059] S202, for each recommendation scene, obtaining an initial first feature vector, an initial second feature vector and an initial third feature vector of the target user in the recommendation scene.

[0060] In one example, for each recommendation scene, user information of the target user, content behavior data of the target user on the content of the recommendation scene and user behavior data of the target user on other users are obtained, the initial first feature vector of the target user in each recommendation scene is generated by using the content behavior data, the initial second feature vector of the target user in each recommendation scene is obtained by inputting the user information and the content behavior data of the content of each recommendation scene into a pre-trained feature vector extraction model, and the initial third feature vector of the target user in each recommendation scene is generated by using the initial first feature vector, the content behavior data and the user behavior data of the target user on other users.

[0061] Exemplarily, as shown in Figure 2B , a heterogeneous graph can be constructed for each user according to the historical behavior of each user, and then the content behavior data of the user on the content of each recommendation scene, the user behavior data of the user on other users and the like can be obtained according to the heterogeneous graph. The heterogeneous graph contains user nodes, content nodes of various recommendation scenes, and edges between nodes are behaviors, such as Figure 2B , for example, user A follows user B, subscribes to live broadcast room 1, and watches video 1, and at the same time, user B subscribes to live broadcast room 1 and watches video 2 and video 3, the content of the recommendation video scene: video 1, video 2 and video 3, and the content of the recommendation live broadcast room scene: live broadcast room 1 are included in the heterogeneous graph. The content behavior data of each user on the content of various recommendation scenes can be obtained through the heterogeneous graph, such as the content behavior data of the user on a piece of content, such as likes and shares, and the user behavior data of the target user on other users, such as user A following user B.

[0062] Specifically, for the initial first feature vector, the content ID of the content and the behavior of the target user to the content can be determined for each piece of content in each recommended scenario, the content ID is taken as the subscript of the vector component, and the score of the behavior of the target user to the content is taken as the vector value of the vector component, to generate the initial first feature vector of the target user in each recommended scenario.

[0063] Illustratively, taking the recommendation scenarios in the system including recommending videos and recommending live rooms as examples, of course, other content can also be recommended, in order to obtain the initial first feature vector of the target user, the video ID of the video watched by the target user and the live room ID of the live room can be obtained, then the initial first feature vector of the target user in the recommended video scenario can be generated as An, where n is the video ID, A is the vector value, and a preset score can be given according to the behavior of the target user to the content, for example, 0.3 for liking video n, 0.6 for sharing video n, etc. Similarly, the initial first feature vector of the target user in the recommended live room scenario can be generated as Bm, where m is the live room ID, B is the vector value, such as 0.8 for rewarding the host of the live room, 0.2 for sending a barrage in the live room, etc.

[0064] For the initial second feature vector, the feature vector extraction model can be pre-trained, in the training, the content in each recommended scenario that has been pushed to the user can be obtained, and the corresponding label can be labeled according to whether the content pushed to the user has been browsed by the user, the user information of the user, the information of the content and the content behavior data of the user to the content are taken as input to predict the probability of the user browsing the content, and the feature vector extraction model is adjusted according to the probability and the label, so that the feature vector extraction model learns the preference degree of the user to the content.

[0065] Specifically, the feature vector extraction model is initialized, the feature vector extraction model includes an input layer, a hidden layer and an output layer, the input layer includes a first input channel and a second input channel, the hidden layer includes a first hidden layer channel and a second hidden layer channel, the input and output of the first hidden layer channel are connected with the output of the first input channel and the input of the output layer respectively, the input and output of the second hidden layer channel are connected with the output of the second input channel and the input of the output layer respectively, the first hidden layer channel is used to extract the user vector when the user information is input through the first input channel, the second hidden layer channel is used to output the content vector when the content and the content behavior data of the user to the content are input, and the output layer outputs the interest score of the user to the content after inputting the user vector and the content vector.

[0066] After the representation vector extraction model is initialized, assuming that video A is pushed to user 1, user 2, user 3 and user 4, and user 1 and user 4 browse video A, the first training data is obtained as {user information of user 1; information and behavior data of video A (content); label 1}, and a plurality of training data are obtained in the same manner to train the representation vector extraction model, wherein the user information can be age, gender, user ID, historical click rate, access frequency, etc., the content information can be content ID, content author, content type, content click frequency, like frequency, etc., when the user information of the target user, the content of various recommendation scenarios and the content behavior data of the target user to the content are input into the trained representation vector extraction model, the preference degree of the target user to the content of a certain type in the recommendation scenario is obtained, and the user vector output by the first hidden layer channel in the representation vector extraction model is taken as the initial second representation vector, which represents the preference degree of the target user to various types of content in the recommendation scenario, for example, for the recommendation video scenario, the initial second representation vector represents the preference degree of the target user to the animation video and the preference degree of the target user to the competitive game video, and the initial second representation vector of the target user in the live streaming room recommendation scenario is obtained in the same manner.

[0067] For the initial third representation vector, the subscript of each component in the initial first representation vector can be replaced with the user ID of the author of the content, the user ID of the user followed by the target user is determined from the user behavior data, and the value of the component with the user ID as the subscript in the first representation vector is updated by using a preset score to obtain the initial third representation vector of the target user in each recommendation scenario, wherein the preset score is the value corresponding to the follow behavior. For example, for each component An in the initial first representation vector in the recommendation video scenario, the video ID with subscript n can be replaced with the user ID of the author of the video, and then the value of the component is updated according to the behavior of the target user to the author of the video, for example, if the target user follows the author of the video, the vector value is updated to 1, otherwise it is updated to 0, thereby obtaining the initial third representation vector of the target user in the recommendation video scenario, and the initial third representation vector of the target user in the recommendation live streaming room can be obtained in the same manner.

[0068] Through the above process, the initial first representation vector, the initial second representation vector and the initial third representation vector of the target user in each recommendation scenario can be obtained to represent the behavior of the target user to the content in each recommendation scenario, the preference of the target user to the content in each recommendation scenario and the behavior of the target user to the author of the content in each recommendation scenario.

[0069] S203, processing the initial first representation vector, the initial second representation vector and the initial third representation vector into vectors in a unified scale to obtain an intermediate first representation vector, an intermediate second representation vector and an intermediate third representation vector.

[0070] The initial first feature vector, the initial second feature vector, and the initial third feature vector are processed into vectors in a unified scale according to the following formula:

[0071]

[0072] wherein v i represents the initial i-th feature vector, a i represents the preset weight of the initial i-th feature vector, a j represents the preset weight of the initial i-th feature vector, represents the intermediate feature vector of the initial i-th feature vector after being unified in scale.

[0073] Since the target user includes the initial first feature vector v1, the initial second feature vector v2, and the initial third feature vector v3 in each recommendation scenario, the intermediate first feature vector of the target user in each recommendation scenario is obtained after unified scale processing by the above formula the intermediate second feature vector the intermediate third feature vector

[0074] S204, the intermediate first feature vector, the intermediate second feature vector, and the intermediate third feature vector of the target user in each recommendation scenario are spliced respectively to obtain the first feature vector, the second feature vector, and the third feature vector of the target user in multiple recommendation scenarios.

[0075] Taking the recommendation video scenario and the recommendation live room scenario as examples, the intermediate first feature vector of the target user in the recommendation video scenario is the intermediate second feature vector the intermediate third feature vector the intermediate first feature vector of the target user in the recommendation live room scenario is the intermediate second feature vector the intermediate third feature vector the first feature vector of the target user in the recommendation video scenario and the recommendation live scenario is the second feature vector the third feature vector

[0076] The above only illustrates the determination of the first representation vector, the second representation vector, and the third representation vector of the target user in the recommended video scene and the recommended live room scene. When there are more than two recommended scenes, the first representation vector, the second representation vector, and the third representation vector of the target user in the multiple recommended scenes can be obtained by referring to the above S202-S204 to represent the behavior of the target user to the content of the multiple recommended scenes, represent the preference of the target user to the content of the multiple recommended scenes, and represent the behavior of the target user to the author of the content of the multiple recommended scenes.

[0077] S205, obtaining the first representation vector, the second representation vector, and the third representation vector of the other user.

[0078] For the other user, the first representation vector, the second representation vector, and the third representation vector of the user in multiple scenes can be obtained by referring to the above S202-S204, and the user ID of the user and the above three vectors are associated and stored in data, so as to find the first representation vector, the second representation vector, and the third representation vector matching the user ID in the database.

[0079] S206, respectively calculating the distance of the first representation vector, the distance of the second representation vector, and the distance of the third representation vector between the target user and the other user, obtaining the first distance, the second distance, and the third distance.

[0080] In one example, the distance between two vectors can be the L1 distance, L2 distance, etc. of the two vectors, and the application embodiment does not limit the way of calculating the distance between two vectors.

[0081] Specifically, the distance between the first representation vector of the target user and the first representation vector of the other user can be calculated to obtain the first distance, the distance between the second representation vector of the target user and the second representation vector of the other user can be calculated to obtain the second distance, and the distance between the third representation vector of the target user and the third representation vector of the other user can be calculated to obtain the third distance.

[0082] S207, weighting and summing the first distance, the second distance, and the third distance by using a preset weight to obtain the similarity between the target user and the other user.

[0083] In an optional embodiment, weights can be set for the first representation vector, the second representation vector, and the third representation vector respectively. After the corresponding first distance, second distance, and third distance are calculated, the weighted sum of the distances is calculated by the weight as the similarity between the target user and the other user.

[0084] In another example, the similarity between users can be calculated by establishing a near neighbor index by the recall engine, for example, by establishing a near neighbor index based on the first feature vector, a near neighbor index based on the second feature vector, and a near neighbor index based on the second feature vector based on the hnswlib engine, and calculating the similarity between users through the near neighbor index. Specifically, the hnswlib engine stores the first feature vector, the second feature vector, and the third feature vector of each user. After sending the first feature vector, the second feature vector, and the third feature vector of the target user to the hnswlib engine, the hnswlib engine performs an inner product between the above feature vectors of the target user and the feature vectors of other users, and takes the inner product as the similarity between the target user and other users. This solves the problem of low timeliness of content recommendation in existing user collaborative filtering-based content recommendation, which requires a huge amount of user-to-user similarity matrix data calculated from user behavior data, improves the efficiency of determining similar users, and quickly determines similar users to improve the real-time performance of subsequent content recommendation.

[0085] Of course, the recall engine can also be a faiss, annoy, or other engine. The embodiments of the present application do not limit the recall engine.

[0086] S208, determining the first M users with the highest similarity as similar users of the target user.

[0087] After calculating the similarity between the target user and other users, the M users with the highest similarity can be determined as similar users of the target user. M can be determined according to actual conditions.

[0088] S209, extracting content belonging to the target recommendation scenario from the historical behavior data of similar users as candidate content.

[0089] The content recommendation request is a content recommendation request for a target recommendation scenario. The similar users can obtain the content belonging to the target recommendation scenario that they have recently interacted with as candidate content. Taking a recommended video as an example, the target recommendation scenario can obtain N historical videos watched by similar users, and determine historical videos watched after a specified date as candidate videos from the multiple historical videos.

[0090] S210, inputting the candidate content into the pre-trained feature vector extraction model to obtain a score of the candidate content, the score representing the interest degree of the target user in the candidate content.

[0091] As described in S202 above, the pre-trained representation vector extraction model can predict the user's preference for content. Each candidate content can be sequentially input into the second input channel layer of the representation vector extraction model to obtain the content vector of the candidate content. Since the user information of the target user has been input into the first input channel, the user vector of the user is output in the first hidden layer. The content vector of the candidate content and the user vector of the target user are input into the output layer and the score of the candidate content is output. The score represents the target user's interest in the candidate content, that is, the probability that the target user will browse the candidate content.

[0092] Of course, in practical applications, the score of candidate content can also be calculated based on behavioral data such as click-through rate and number of visits. This application embodiment does not limit the method of scoring technical candidate content.

[0093] S211. The K candidate contents with the highest scores are identified as the target contents.

[0094] In one optional embodiment, the candidate content can be sorted in ascending order according to its score, and the K candidate contents with the highest scores can be determined as the target content, where K is a natural number that can be set according to the actual situation.

[0095] S212. Recommend the target content to the client.

[0096] like Figure 2C As shown, the target user subscribed to live stream 1 and watched video 2. Other users subscribed to live stream 1 and watched videos 1, 3, and 4. No other users watched video 2. Existing user-based collaborative filtering video recommendation methods, when recommending videos to the target user, only recall other users who watched video 2 as similar users because the target user has only watched video 2. However, video 2 has not been watched by other users, resulting in the inability to recall similar users for the target user, and consequently, the inability to recommend videos to the target user. After applying the content recommendation method of this application embodiment, it is no longer limited to recalling similar users based on video 2 watched by the target user. It also recalls other users who watched videos 3 and 4 as similar users based on the target user's subscription to live stream 1, thus enabling the recommendation of videos 3 and 4 to the target user. Furthermore, if the target user follows other users who watched video 1, video 1 can also be recommended to the target user.

[0097] The first feature vector, the second feature vector and the third feature vector of the target user in different recommendation scenarios can be used to determine the similar user of the target user from the content of multiple recommendation scenarios, the behavior data of the user on the content and the behavior between users, so as to avoid the problem that the similar user cannot be recalled when the historical behavior data of the target user on the content in the target scenario is sparse, and the content recommendation fails, and the target user can be recommended the content related to the target recommendation scenario and interested in the target recommendation scenario when the behavior data of the target user on the content in the target recommendation scenario is sparse.

[0098] Embodiment three

[0099] Figure 3 is a structural block diagram of a content recommendation device provided by Embodiment three of the present application, as Figure 3 shown, the content recommendation device of the present application can specifically include the following modules:

[0100] The request receiving module 301 is configured to receive a content recommendation request sent by a target user through a client, and the content recommendation request includes a target recommendation scenario of requested content;

[0101] The vector obtaining module 302 is configured to obtain a first feature vector, a second feature vector and a third feature vector of the target user, wherein the first feature vector is a vector representing the behavior of the target user on the content of multiple recommendation scenarios, the second feature vector is a vector representing the preference of the target user on the content of multiple recommendation scenarios, and the third feature vector is a vector representing the behavior of the target user on the authors of the content of multiple recommendation scenarios;

[0102] The similar user determining module 303 is configured to determine the similar user of the target user according to the first feature vector, the second feature vector and the third feature vector;

[0103] The candidate content obtaining module 304 is configured to extract the content belonging to the target recommendation scenario from the historical behavior data of the similar user as candidate content;

[0104] The content recommendation module 305 is configured to filter the target content from the candidate content and recommend the target content to the client.

[0105] The content recommendation device provided by the present application can execute the content recommendation method provided by Embodiments one and two, and has the corresponding function modules and beneficial effects of the execution method.

[0106] Embodiment four

[0107] Referring to Figure 4 , a structural schematic diagram of a content recommendation device in one example of the present application is shown. As Figure 4As shown, the content recommendation device can specifically include: a processor 400, a memory 401, a display screen 402 with touch function, an input device 403, an output device 404, and a communication device 405. The number of processors 400 in the content recommendation device can be one or more, Figure 4 The processor 400 in the content recommendation device is taken as an example. The processor 400, the memory 401, the display screen 402, the input device 403, the output device 404, and the communication device 405 of the content recommendation device can be connected through a bus or other means, and the connection through the bus is taken as an example in the figure 400. The content recommendation device of the embodiment of the present application is used to execute the content recommendation method provided by the embodiment of the present application.

[0108] Embodiment five

[0109] The embodiment of the present application also provides a computer readable storage medium, instructions in the storage medium are executed by a processor of a device, so that the device can execute the content recommendation method as described in the above method embodiment.

[0110] Embodiment six

[0111] The embodiment of the present application provides a computer program product, instructions in the computer program product are executed by a processor to implement the content recommendation method as described in the above method embodiment.

[0112] For the present application, the computer readable storage medium can be any device that can contain, store, communicate, propagate or transport programs for use by or in connection with an instruction execution system, apparatus or device, or in conjunction with these instruction execution systems, apparatus or devices. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections having one or more wires (electronic devices), portable computer disk boxes (magnetic devices), random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memories), optical fiber devices, and portable compact disc read-only memories (CDROMs). In addition, the computer readable medium can even be paper or other suitable medium on which the program can be printed, because the program can be electronically obtained, for example, by optical scanning of the paper or other medium, followed by editing, interpretation or processing as necessary, or in other suitable manner, and then stored in the computer memory. The computer program product can be a product containing a computer readable storage medium, so that the instructions in the computer readable storage medium are executed by the processor to implement the content recommendation method as described in the above method embodiment.

[0113] It should be noted that, for the device, equipment, storage medium, computer program product embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the related parts are referred to the part of the method embodiment.

Claims

1. A content recommendation method characterized by, The method comprises the following steps: receiving a content recommendation request sent by a target user through a client, wherein the content recommendation request comprises a target recommendation scenario of requested content; obtaining a first feature vector, a second feature vector and a third feature vector of the target user, wherein the first feature vector is a vector representing the behavior of the target user to the content of multiple recommendation scenarios, the second feature vector is a vector representing the preference of the target user to the content of multiple recommendation scenarios, and the third feature vector is a vector representing the behavior of the target user to the author of the content of multiple recommendation scenarios; determining similar users of the target user according to the first feature vector, the second feature vector and the third feature vector; extracting content belonging to the target recommendation scenario from historical behavior data of the similar users as candidate content; screening target content from the candidate content and recommending the target content to the client; The first feature vector, the second feature vector and the third feature vector of the target user are pre-generated and stored in a database by the following method: for each recommendation scenario, obtaining user information of the target user, content behavior data of the target user to the content of the recommendation scenario, and user behavior data of the target user to other users; generating an initial first feature vector of the target user in each recommendation scenario by using the content behavior data; inputting the user information and the content behavior data of the content of each recommendation scenario into a pre-trained feature vector extraction model to obtain an initial second feature vector of the target user in each recommendation scenario; generating an initial third feature vector of the target user in each recommendation scenario by using the initial first feature vector, the content behavior data and the user behavior data of the target user to other users; processing the initial first feature vector, the initial second feature vector and the initial third feature vector into vectors in a unified scale to obtain an intermediate first feature vector, an intermediate second feature vector and an intermediate third feature vector; splicing the intermediate first feature vector, the intermediate second feature vector and the intermediate third feature vector of the target user in each recommendation scenario to obtain the first feature vector, the second feature vector and the third feature vector of the target user in multiple recommendation scenarios.

2. The content recommendation method of claim 1, wherein, The content behavior data comprises a content ID of the content, and the initial first feature vector of the target user in each recommendation scenario is generated by using the content behavior data, which comprises the following steps: for each content in each recommendation scenario, determining the content ID of the content and the behavior of the target user to the content; using the content ID as the subscript of the vector component and the score of the behavior of the target user to the content as the vector value of the vector component to generate the initial first feature vector of the target user in each recommendation scenario.

3. The content recommendation method of claim 1, wherein, The content behavior data comprises the author of the content, and the initial third feature vector of the target user in each recommendation scenario is generated by using the initial first feature vector, the content behavior data and the user behavior data of the target user to other users, which comprises the following steps: replace the subscript of each component in the initial first feature vector with a user ID of an author of the content; determine a user ID of a user followed by the target user from user behavior data of the target user on other users; update a value of a component with a subscript of each user ID in the first feature vector by using a preset score value, to obtain an initial third feature vector of the target user in each recommendation scenario, wherein the preset score value is a value corresponding to a following behavior.

4. The content recommendation method according to any one of claims 1 to 3, characterized by, processing the initial first feature vector, the initial second feature vector, and the initial third feature vector into vectors in a unified scale to obtain an intermediate first feature vector, an intermediate second feature vector, and an intermediate third feature vector, includes: processing the initial first feature vector, the initial second feature vector, and the initial third feature vector into vectors in a unified scale according to the following formula: wherein v i represents an initial i-th feature vector, a i represents a preset weight of the initial i-th feature vector, a j represents a preset weight of the initial i-th feature vector, represents an intermediate feature vector after the initial i-th feature vector is unified in scale.

5. The content recommendation method according to any one of claims 1 to 3, wherein determining the similar users of the target user according to the first feature vector, the second feature vector, and the third feature vector, includes: obtaining the first feature vector, the second feature vector, and the third feature vector of other users; calculating distances of the first feature vector, the second feature vector, and the third feature vector of the target user and other users respectively to obtain first distances, second distances, and third distances; weighting and summing the first distances, the second distances, and the third distances by using a preset weight to obtain similarities of the target user and other users; determining the first M users with the highest similarities as the similar users of the target user.

6. The content recommendation method according to any one of claims 1 to 3, wherein, filtering target content from the candidate content and recommending the target content to the client, includes: inputting the candidate content into a pre-trained feature vector extraction model to obtain a score of the candidate content, the score representing an interest degree of the target user in the candidate content; determining the first K candidate contents with the highest scores as the target content; recommending the target content to the client.

7. A content recommendation apparatus characterized by comprising: includes: a request receiving module, configured to receive a content recommendation request sent by a target user through a client, the content recommendation request including a target recommendation scenario of requested content; a vector obtaining module, configured to obtain a first feature vector, a second feature vector, and a third feature vector of the target user, wherein the first feature vector is a vector representing behaviors of the target user on content in multiple recommendation scenarios, the second feature vector is a vector representing preferences of the target user on content in multiple recommendation scenarios, and the third feature vector is a vector representing behaviors of the target user on authors of content in multiple recommendation scenarios; a similar user determining module, configured to determine similar users of the target user according to the first feature vector, the second feature vector, and the third feature vector; a candidate content obtaining module, configured to extract content belonging to the target recommendation scenario from historical behavior data of the similar users as candidate content; a content recommendation module, configured to filter target content from the candidate content and recommend the target content to the client; the first feature vector, the second feature vector, and the third feature vector of the target user are pre-generated and stored in a database in the following manner: For each recommended scenario, obtain user information of the target user, content behavior data of the target user on content of the recommended scenario, and user behavior data of the target user on other users; generate an initial first feature vector of the target user in each recommended scenario using the content behavior data; input the user information and the content behavior data of the content of each recommended scenario into a pre-trained feature vector extraction model to obtain an initial second feature vector of the target user in each recommended scenario; generate an initial third feature vector of the target user in each recommended scenario using the initial first feature vector, the content behavior data, and the user behavior data of the target user on other users; process the initial first feature vector, the initial second feature vector, and the initial third feature vector into vectors in a uniform scale to obtain an intermediate first feature vector, an intermediate second feature vector, and an intermediate third feature vector; concatenate the intermediate first feature vector, the intermediate second feature vector, and the intermediate third feature vector of the target user in each recommended scenario to obtain a first feature vector, a second feature vector, and a third feature vector of the target user in multiple recommended scenarios.

8. A content recommendation device characterized by comprising: The content recommendation device comprises: one or more processors; a storage device for storing one or more computer programs, when the one or more computer programs are executed by the one or more processors, the one or more processors implement the content recommendation method of any one of claims 1-6.

9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the content recommendation method of any one of claims 1-6.

10. A computer program product, characterised in that, When the instructions in the computer program product are executed by the processor, the content recommendation method of any one of claims 1-6 is implemented.

Citation Information

Patent Citations

  • Application data recommendation method and device, model training method and device and storage medium

    CN110309357A

  • File recommendation method and device and server

    CN111552835A

  • Cross-modal commodity classification method and device, equipment, medium and product

    CN113850201A

  • Product data pushing method and device, and computer non-volatile readable storage medium

    WO2020098163A1