Content recommendation method and apparatus
By constructing a content list based on social relationship data and interactive behaviors, and recommending content based on a user count threshold, the problem of low accuracy and reliability of content recommendation in existing technologies is solved, thereby improving content diversity and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MICRO DREAM TECHTRONIC NETWORK TECH CHINACO
- Filing Date
- 2023-02-21
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, the accuracy and reliability of user content recommendations are low. Especially when users have many social relationship links, the use of TOPN truncation in the content material retrieval stage leads to the filtering of some content, resulting in content loss and reduced diversity.
By acquiring the social relationship data and interaction behavior of the first user, a first content list and a second content list are constructed. If the number of users in the user list exceeds a threshold, a set number of contents are retrieved from the first content list, or if the number of contents does not exceed the threshold, a corresponding number of contents are retrieved from the first and second content lists respectively for recommendation.
It improves the accuracy and reliability of content recommendations, avoids content loss, and increases content diversity and user experience.
Smart Images

Figure CN116204730B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet technology, and in particular to a content recommendation method and apparatus. Background Technology
[0002] With the continuous development of internet technology, information feeds have become an important channel for users to passively obtain information, occupying the vast majority of users' fragmented time. Information feed products distribute content in a waterfall-like manner; common examples include shopping apps, which distribute product information, and news apps, which distribute news information.
[0003] In some scenarios, a news feed is a data format that continuously provides users with content. It's a resource aggregator composed of multiple content providers, allowing users to actively subscribe to these sources and receive pushed content. Currently, a common approach is content distribution based on social relationships. This involves building a virtual social network of users, allowing content generated by ordinary people to spread exponentially along hierarchical relationship chains. Specifically: first, target users with social relationships are identified; second, content posted by these target users is retrieved; and finally, the content is sorted by posting time or CTR model prediction to form a news feed for distribution to users. However, with this approach, when users have many social relationship chains, due to machine resource limitations, the content retrieval stage often uses a TOPN truncation method for filtering. This truncation method is usually based on time or randomness, resulting in some users' content being filtered out, causing content loss for users, reducing content diversity, and lowering the accuracy and reliability of content recommendations. Summary of the Invention
[0004] The purpose of this application is to provide a content recommendation method and apparatus to solve the problems of user content loss and low accuracy and reliability of content recommendation.
[0005] To solve the above-mentioned technical problems, the embodiments of this application are implemented as follows:
[0006] In a first aspect, embodiments of this application provide a content recommendation method, comprising: receiving a content request initiated by a first user; responding to the content request, acquiring social relationship data of the first user and a list of first content published by second users who have interacted with the first user, the social relationship data including a user list of second users who have interacted with the first user; acquiring a list of second content of second content for which the second user has performed a first action, the interaction including the first action; if the number of second users in the user list exceeds a threshold, retrieving all first content corresponding to a predetermined number of second users in the user list from the first content list; recommending content to the first user based on the retrieved first content; if the number of second users in the user list does not exceed the threshold, retrieving a predetermined number of first content corresponding to all second users in the user list from the first content list, and retrieving a predetermined number of second content corresponding to all second users in the user list from the second content list; and recommending content to the first user based on the retrieved first and second content.
[0007] Secondly, embodiments of this application provide a content recommendation device, comprising: a receiving module for receiving a content request initiated by a first user; an acquisition module for acquiring, in response to the content request, the first user's social relationship data and a list of first content published by second users who have interacted with the first user, wherein the social relationship data includes a list of users of second users who have interacted with the first user; the acquisition module is further configured to acquire a list of second content of second content for which the second user has performed a first action, wherein the interaction includes the first action; a retrieval module for retrieving, when the number of second users in the user list exceeds a threshold, all first content corresponding to a predetermined number of second users in the user list from the first content list; a recommendation module for recommending content to the first user based on the retrieved first content; the retrieval module is further configured to, when the number of second users in the user list does not exceed the threshold, retrieve a predetermined number of first content corresponding to each of all second users in the user list from the first content list, and retrieve a predetermined number of second content corresponding to each of all second users in the user list from the second content list; the recommendation module is further configured to recommend content to the first user based on the retrieved first and second content.
[0008] Thirdly, embodiments of this application provide an electronic device, including a processor, a communication interface, a memory, and a communication bus; wherein the processor, the communication interface, and the memory communicate with each other via the bus; the memory is used to store computer programs; and the processor is used to execute the programs stored in the memory to implement the steps as described in the first aspect.
[0009] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method steps as described in the first aspect.
[0010] Fifthly, embodiments of this application provide a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method steps as described in the first aspect.
[0011] As can be seen from the technical solutions provided in the above embodiments of this application, in response to a content request initiated by a first user, the system can obtain the social relationship data of the first user, a first content list of first content published by second users who have interacted with the first user, and a second content list of second content in which the second user has performed the first action. Depending on whether the number of second users in the user list exceeds a threshold, the system can retrieve a set number of first contents corresponding to each of the second users from the first content list and recommend the content to the first user; or it can retrieve a set number of first contents corresponding to each of the second users from the first content list and a set number of second contents corresponding to each of the second users from the second content list and recommend the content to the first user. Thus, when recommending content to the first user in this embodiment, the system recommends content from all the content of the second users who have interacted with the first user, or from all the content of the second users who have interacted with the first user and all the content in which the second user has performed the first action. This avoids filtering some content, reduces content loss for the user, and improves the diversity of content and the accuracy and reliability of content recommendations. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A flowchart illustrating the content recommendation method provided in this application embodiment;
[0014] Figure 2 A schematic diagram of the functional modules of the content recommendation device provided in the embodiments of this application;
[0015] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0016] The purpose of this application is to provide a content recommendation method and apparatus that solves the problems of content loss for users and low accuracy and reliability of content recommendations.
[0017] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.
[0018] like Figure 1 As shown in the figure, this application embodiment provides a content recommendation method. The execution subject of this method can be a server, which can be an independent server or a server cluster composed of multiple servers. The content recommendation method specifically includes the following steps S101-S109:
[0019] In step S101, a content request initiated by the first user is received.
[0020] Specifically, a content request is a request initiated for content from a news feed product, including but not limited to shopping apps, news apps, and subscription accounts. A user can initiate a content request to access content from a particular news feed product, and each request has a corresponding timestamp. Initiating a content request can be done by entering keywords on the news feed product's input page to search for content corresponding to those keywords, or by selecting an option of interest from the news feed product's navigation bar. It's worth noting that content requests can also be initiated proactively by the system to recommend content to users.
[0021] In step S103, in response to a content request, the social relationship data of the first user and the first content list of the first content published by the second user who has interacted with the first user are obtained.
[0022] The social relationship data includes a list of users who have interacted with the first user and are considered second users.
[0023] Specifically, interactive behavior refers to actions such as exposure, forwarding, commenting, liking, clicking on images, videos, avatars, accessing content, and searching by a second user. For content posted by a first user, second users interact with that content. A user list is created for each second user who interacts with the first user. For each second user who interacts with the first user, the first content posted by each second user is retrieved, and a first content list is created. When creating the first content list, it can be formatted as <user identifier, content ID>, where the user identifier represents the second user's identity, and the content ID represents the address of the content posted by the second user.
[0024] In step S105, a list of second content that the second user has performed the first action is obtained, and the interaction action includes the first action.
[0025] Specifically, the first action can be a like, a comment, etc., and the second content is all the content that the second user has performed the first action. The first action can be any kind of interactive action, and the second content category includes all the content that the second user has performed the first action.
[0026] In step S107, if the number of second users in the user list exceeds a threshold, all first content corresponding to the set number of second users in the user list is retrieved from the first content list; content recommendations are then made to the first users based on the retrieved first content.
[0027] Specifically, the set quantity and threshold can be determined according to the actual situation, and this application embodiment does not limit them. For example, when the number of second users who have published content is greater than 75, only the content corresponding to the set number of second users in the first content list is selected to recommend to the first user, where the set number is less than the total number of second users in the user list.
[0028] In one possible implementation, recommending content to a first user based on the first content retrieved includes: sorting the first content retrieved; determining the first content ranked highest as the target first content; determining the first content corresponding to the second user who published the target first content; and recommending the target first content and the target second content to the first user, wherein the target second content is at least one piece of content other than the target first content among the first content corresponding to the second user who published the target first content.
[0029] Specifically, the target first content is the content ranked first among all the first content from a set number of second users. The second target content is the content from the first content of the second user who published the target first content, excluding the target first content. The second target content can be the top N content from the first content of the second user who published the target first content, where N can be an integer not less than 1. Furthermore, the ranking of each piece of content can be done by predicting the score of each piece of content using a CTR model and then ranking them according to the predicted scores; alternatively, it can be done by using the predicted scores from the CTR model and the number of times each second user is exposed within the refresh period to determine the final score of each piece of content, and then ranking them according to the final scores.
[0030] In one possible implementation, sorting the retrieved first content includes: inputting the first content corresponding to each second user, the reading time of the first content, and the type of interaction behavior of the first content into the CTR model for prediction to obtain the ranking score of the first content corresponding to each second user; determining the number of times the second user corresponding to the first content is exposed within a refresh cycle; determining the final ranking score of the first content corresponding to each second user based on the ranking score and the number of exposures; and sorting the first content according to the final ranking score.
[0031] Specifically, the first content samples of the second users extracted above are samples of real user exposure. They are spliced together with multi-dimensional features from the user side, content side, author side, contextual environment side, and relationship intersection side. A multi-task CTR model can be trained with the user's interaction behavior, clicks, and reading time as the target. At the same time, one complete backward refresh is considered as a cycle. That is, from the beginning of one forward pull-down refresh to the next forward pull-down refresh, all consecutive backward refreshes within this period are recorded as the same cycle. The number of times the user exposes the content author within this cycle is recorded in real time. Based on the feature X, the predicted score of the CTR model is decayed to obtain the final score S = CTR*1 / log(X), where CTR refers to the predicted score obtained by the CTR model, and X is the number of exposures. That is, within the same cycle, the greater the number of times the user exposes a certain content author X, the lower their ranking position. This can effectively alleviate the Matthew effect of distribution based on social relationships and promote the exposure and growth of ordinary second users' content.
[0032] In step S109, if the number of second users in the user list does not exceed the threshold, first content corresponding to the number of each second user in the user list is retrieved from the first content list, and second content corresponding to the number of each second user in the user list is retrieved from the second content list; content recommendations are then made to the first user based on the retrieved first and second content.
[0033] Specifically, when the number of second users is insufficient, quota control can be used to supplement the content that each second user has performed the first action in segments, such as supplementing the content that each second user has liked in segments. That is, the content recommended to the first user includes the content posted by the second users and the content liked by the second users. The threshold can be determined according to the actual situation, and this application embodiment does not limit it here. For example, when the number of second users who have posted content is greater than 75, the content liked by the second users is not included; only the content posted by users is selected to recommend to the first user. When the number of second users who have posted content is no more than 75, in addition to pulling the content to be recommended to the user from the first content list, the content to be recommended to the user can also be pulled from the second content list. Furthermore, the number of first contents pulled from the second content list can be further divided into more gradients, determining the number of first contents pulled from the second content list based on the different intervals in which the number of second users falls. For example, when the number of second users with published content is greater than 75, no content that has been liked will be displayed, i.e., no content will be selected from the second content list; when the number of users with published content is less than or equal to 75 but greater than 50, the content liked by the user ranked first in the first content list will be selected according to the content's order; when the number of second users with published content is less than or equal to 50 but greater than 15, the content liked by the top 3 users in the first content list will be selected according to the content's order; in other cases, the top 15 content will be directly output according to the content's ranking score from high to low. It is worth noting that the threshold for the number of second users with published content and the content quota control threshold for the liking type can be dynamically configured according to the actual situation, and this application embodiment does not limit them here.
[0034] In one possible implementation, retrieving a number of first contents corresponding to each of the second users in the user list from the first content list includes: determining a relationship score for each second user who has interacted with the first user based on the first user's social relationship data; the relationship score is used to describe the intimacy between the second user and the first user, and the relationship score is proportional to the intimacy; for any second user, retrieving a number of first contents corresponding to the second user's relationship score from the first content list, wherein the number of first contents retrieved is proportional to the second user's relationship score.
[0035] Specifically, for the first user, the intimacy of the relationship between the second user who interacts with the first user and the first user is different. Therefore, the amount of first content to be retrieved can be determined by determining the relationship score of the second user who interacts with the first user. The higher the relationship score, the more first content of the second user will be retrieved.
[0036] Specifically, the relationship score for each second user who interacts with the first user, based on the first user's social relationship data, includes: determining the type of interaction between the second user and the first user and the weight of the interaction corresponding to the type based on the social relationship data; determining the number of times the second user performs the type of interaction within a predetermined time period and the time decay coefficient of the interaction; and determining the relationship score based on the weight, number of times, and time decay coefficient.
[0037] Specifically, the types of interactive behaviors include, but are not limited to, the aforementioned behaviors such as exposure, forwarding, commenting, liking, clicking on images, clicking on videos, clicking on avatars, visiting, and searching. The weight of different types of behaviors is also different. The predetermined time period can be any period of time, such as 30 days, 10 days, and 20 days. Within this time period, the number of times a user performs the same type of interactive behavior is counted, as well as the decay coefficient of the type of interactive behavior over time. The longer the time since the occurrence of the type of interactive behavior, the smaller the decay coefficient.
[0038] For example, the relationship score can be calculated using the following formula:
[0039] The relationship score S = ∑(weight of interaction behavior n * ∑(number of times the interaction behavior occurred on day i * time decay coefficient λ)). For example, if user A follows user B, the distribution of user A's interaction behavior across the entire site in the past 30 days is as follows: {weight of forwarding behavior n = 0.8: {time decay coefficient λ = 1 / 30 1 day ago: number of forwarding behaviors m = 2, time decay coefficient λ = 10 / 30 10 days ago: number of forwarding behaviors m = 5}; weight of search behavior n = 1.0: {time decay coefficient λ = 2 / 30 2 days ago: number of search behaviors 3, time decay coefficient λ = 5 / 30 5 days ago: number of search behaviors m = 8}}. Then, the relationship score A->B between the first user and the second user is 0.8 * (2 * 1 / 30 + 5 * 10 / 30) + 1.0 * (3 * 2 / 30 + 8 * 5 / 30) = 2.92.
[0040] Based on the calculated relationship scores between each second user and the first user in the user list, sort them in descending order of relationship scores. From the first content list, pull at least one piece of first content for each second user according to different relationship scores. Iterate through each second user in the user list round by round until the maximum number of first content items pulled is reached or all second users in the first list have been extracted.
[0041] In one possible implementation, recommending content to a first user based on the first and second content retrieved includes: sorting the first and second content retrieved; determining the content ranked highest from the first and second content retrieved as the target content; determining at least one first content and at least one second content corresponding to the second user who published the target content, wherein the at least one first content or at least one second content includes the target content; and recommending at least one first content and at least one second content to the first user.
[0042] Specifically, ranking all the first and second content can be achieved by inputting the first content, the second content, the reading time of the first content, the reading time of the second content, and the types of interaction behaviors of the first and second content into a CTR model for prediction, thereby obtaining a ranking score for each second user's corresponding first and second content; within a refresh cycle, determining the number of times the second user corresponding to the first and second content is exposed within the refresh cycle; determining the final ranking score for each second user's corresponding first and second content based on the ranking score and the number of exposures; and ranking the first and second content according to the final ranking score. The ranking method for the first and second content has the same or similar implementation as the ranking method for the first content described above, and they can be referred to each other; the embodiments of this application will not be elaborated further here. In this way, for each first and second piece of content obtained from the sorting, the number of content items for each second user is counted and returned to the first user together. With the front-end display label "This author has XX more pieces of content", after the first user clicks on the label, other materials of the same author are pulled from the selected first pieces of content and returned to the first user together. In this way, multiple first pieces of content from the same author are fed back to the first user at the same time, thereby increasing the diversity and richness of the recommended content and improving the user experience.
[0043] In one possible implementation, before step S109, the method further includes: obtaining topic tag information for each first content, and aggregating the first content with the same topic tag information. Step S109 includes: determining the first content ranked highest and its topic tag information, recommending the first content ranked highest to the first user, and first content with the same topic tag information as the first content ranked highest.
[0044] Specifically, the topic tag information refers to the fixed-format topic tags carried by each piece of content, such as lifestyle tags, emotional tags, etc. After determining the top-ranked top-ranked content, the topic tag information carried by that top-ranked content is determined. Then, the top-ranked content with the same topic tags as the top-ranked content is searched from the selected top-ranked content. The top-ranked content with the same topic tags is aggregated, and the aggregation result is cached on the client. In conjunction with the front-end display tag "This topic has XX more pieces of content", after clicking the tag request, other content corresponding to the topic tag is directly retrieved from the client cache and returned to the first user. In this way, the extended consumption of content with the same topic provided by this application embodiment facilitates the centralized consumption of content with the same topic, improves user consumption stickiness, increases the diversity and richness of recommended content, and improves the user experience.
[0045] The technical solution disclosed in this application can respond to a content request initiated by a first user, obtain the first user's social relationship data, a first content list of first content published by second users who have interacted with the first user, and a second content list of second content for which the second user has performed the first action. Depending on whether the number of second users in the user list exceeds a threshold, it can either retrieve a set number of first contents corresponding to each of the second users from the first content list and recommend them to the first user, or retrieve a set number of first contents corresponding to each of the second users from the first content list and a set number of second contents corresponding to each of the second users from the second content list and recommend them to the first user. Thus, when recommending content to the first user, this application recommends content from all the content of the second users who have interacted with the first user, or from all the content of the second users who have interacted with the first user and all the content for which the second user has performed the first action. This avoids filtering some content, reduces content loss for the user, and improves the diversity of content and the accuracy and reliability of content recommendations.
[0046] Corresponding to the content recommendation method provided in the above embodiments, based on the same technical concept, this application also provides a content recommendation device. Figure 2 This is a schematic diagram of the module composition of a content recommendation device provided in an embodiment of this application. This content recommendation device is used to execute the content recommendation method described in the above embodiments, such as... Figure 2As shown, the content recommendation device 200 includes: a receiving module 201, used to receive a content request initiated by a first user; an acquisition module 202, used to, in response to the content request, acquire the social relationship data of the first user and a list of first content published by second users who have interacted with the first user, wherein the social relationship data includes a list of users of second users who have interacted with the first user; the acquisition module 202 is also used to acquire a list of second content of second content for which the second user has performed a first action, wherein the interaction action includes the first action; a pulling module 203, used to, when the number of second users in the user list exceeds a threshold, pull all first content corresponding to a set number of second users in the user list from the first content list; a recommendation module 204, used to recommend content to the first user based on the pulled first content; the pulling module 203 is also used to, when the number of second users in the user list does not exceed a threshold, pull a number of first content corresponding to each of all second users in the user list from the first content list, and pull a number of second content corresponding to each of all second users in the user list from the second content list; the recommendation module 204 is also used to recommend content to the first user based on the pulled first content and second content.
[0047] The technical solution disclosed in this application can respond to a content request initiated by a first user, obtain the first user's social relationship data, a first content list of first content published by second users who have interacted with the first user, and a second content list of second content for which the second user has performed the first action. Depending on whether the number of second users in the user list exceeds a threshold, a set number of first contents corresponding to each of the second users are retrieved from the first content list and recommended to the first user; or, a set number of first contents corresponding to each of the second users are retrieved from the first content list and a set number of second contents corresponding to each of the second users are retrieved from the second content list and recommended to the first user. Thus, when recommending content to the first user, this application recommends content from all the content of the second users who have interacted with the first user, or from all the content of the second users who have interacted with the first user and all the content for which the second user has performed the first action. This avoids filtering some content, reduces content loss for the user, and improves the diversity of content and the accuracy and reliability of content recommendations.
[0048] In one possible implementation, the recommendation module 204 is further configured to sort the first content retrieved; determine the first content ranked first as the target first content; determine the first content corresponding to the second user who published the target first content; and recommend the target first content and the target second content to the first user, wherein the target second content is at least one piece of content other than the target first content among the first content corresponding to the second user who published the target first content.
[0049] In one possible implementation, the acquisition module 202 is further configured to acquire the topic tag information of the first content; aggregate the first content with the same topic tag information; the recommendation module 204 is further configured to: determine the first content ranked first as the target first content, determine the topic tag information of the target first content; recommend the target first content and the first content with the same topic tag information as the target first content to the first user.
[0050] In one possible implementation, the retrieval module 203 is further configured to determine the relationship score of each second user who has interacted with the first user based on the social relationship data of the first user; the relationship score is used to describe the intimacy between the second user and the first user, and the relationship score is proportional to the intimacy; for any second user, the first content corresponding to the relationship score of the second user is retrieved from the first content list, wherein the number of retrieved first content is proportional to the relationship score of the second user.
[0051] In one possible implementation, the pull module 203 is further configured to determine the type of interaction behavior between the second user and the first user, and the weight of the interaction behavior corresponding to the type, based on social relationship data; determine the number of times the second user performs the type of interaction behavior within a predetermined time period, and the time decay coefficient of the type of interaction behavior; and determine the relationship score based on the weight, number of times, and time decay coefficient.
[0052] In one possible implementation, the recommendation module 204 is further configured to input the first content corresponding to each second user, the reading time of the first content, and the type of interaction behavior of the first content into the CTR model for prediction, to obtain the ranking score of the first content corresponding to each second user; within a refresh cycle, determine the number of times the second user corresponding to the first content is exposed within the refresh cycle; determine the final ranking score of the first content corresponding to each second user based on the ranking score and the number of exposures; and rank the first content according to the final ranking score.
[0053] The content recommendation device provided in this application embodiment can implement the various processes in the embodiments corresponding to the above-described content recommendation method. To avoid repetition, it will not be described again here.
[0054] It should be noted that the content recommendation device provided in this application embodiment and the content recommendation method provided in this application embodiment are based on the same inventive concept and have the same technical effect. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned content recommendation method, and the repeated parts will not be described again.
[0055] Corresponding to the content recommendation method provided in the above embodiments, based on the same technical concept, this application also provides an electronic device for executing the above content recommendation method. Figure 3 To illustrate the structure of an electronic device according to various embodiments of the present invention, as shown in the schematic diagram... Figure 3 As shown. Electronic devices can vary considerably due to differences in configuration or performance, and may include one or more processors 301 and memory 302. Memory 302 may store one or more application programs or data. Memory 302 may be temporary or persistent storage. The application programs stored in memory 302 may include one or more modules (not shown), each module may include a series of computer-executable instructions for the electronic device. Furthermore, processor 301 may be configured to communicate with memory 302 and execute the series of computer-executable instructions in memory 302 on the electronic device. The electronic device may also include one or more power supplies 303, one or more wired or wireless network interfaces 304, one or more input / output interfaces 305, and one or more keyboards 306.
[0056] In this embodiment, the electronic device includes a processor, a communication interface, a memory, and a communication bus; wherein, the processor, the communication interface, and the memory communicate with each other through the bus; the memory is used to store computer programs; the processor is used to execute the programs stored in the memory to implement the steps described in the above method embodiment.
[0057] It should be noted that the electronic device provided in this application embodiment and the content recommendation method provided in this application embodiment are based on the same inventive concept and have the same technical effect. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned content recommendation method, and the repeated parts will not be described again.
[0058] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps described in the above method embodiments.
[0059] It should be noted that the computer-readable storage medium provided in this application embodiment and the content recommendation method provided in this application embodiment are based on the same inventive concept and have the same technical effect. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned content recommendation method, and the repeated parts will not be described again.
[0060] In a specific embodiment, this application provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the steps described in the above method embodiments.
[0061] It should be noted that the chip provided in this application embodiment and the content recommendation method provided in this application embodiment are based on the same inventive concept and have the same technical effect. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned content recommendation method, and the repeated parts will not be described again.
[0062] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0063] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0064] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0065] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0066] In a typical configuration, an electronic device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0067] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0068] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0069] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0070] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0071] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A content recommendation method, characterized in that, include: Receive content requests initiated by the first user; In response to the content request, the system obtains the social relationship data of the first user and the first content list published by the second user who has interacted with the first user. The social relationship data includes the user list of the second user who has interacted with the first user. Obtain a list of second content items for which the second user has performed the first action, wherein the interaction action includes the first action; If the number of second users in the user list exceeds a threshold, retrieve all first content corresponding to each of the set number of second users in the user list from the first content list; and recommend content to the first users based on the retrieved first content. If the number of second users in the user list does not exceed the threshold, first content corresponding to the number of each second user in the user list is retrieved from the first content list, and second content corresponding to the number of each second user in the user list is retrieved from the second content list. Content recommendations are made to the first user based on the first and second retrieved content; The step of recommending content to the first user based on the retrieved first content includes: Sort the first content retrieved; Determine the first item in the sorted list as the target first item; Determine the first content corresponding to the second user who published the target first content; The first target content and the second target content are recommended to the first user. The second target content is at least one piece of content other than the first target content in the first content corresponding to the second user who published the first target content.
2. The content recommendation method according to claim 1, characterized in that, The sorting of the first retrieved content includes: The first content corresponding to each second user, the reading time of the first content, and the type of interaction behavior of the first content are respectively input into the CTR model for prediction to obtain the ranking score of the first content corresponding to each second user. Within a refresh cycle, determine the number of times the second user corresponding to the first content is exposed within the refresh cycle; The final ranking score of the first content corresponding to each second user is determined based on the ranking score and the number of exposures. Sort the first content according to the final sorting score.
3. The content recommendation method according to claim 1, characterized in that, Before recommending content to the first user based on the retrieved first content, the method further includes: Obtain the topic tag information of the first content; Aggregate the first content related to the same topic tags; The step of recommending content to the first user based on the retrieved first content includes: Determine the first content that appears at the top of the sorting list as the target first content, and determine the topic tag information of the target first content; The first content, which is the target first content, and the first content with the same topic tag information as the target first content are recommended to the first user.
4. The content recommendation method according to claim 1, characterized in that, The step of retrieving the first content from the first content list and corresponding to the number of each second user in the user list includes: Based on the social relationship data of the first user, a relationship score is determined for each second user who has interacted with the first user; the relationship score is used to describe the intimacy between the second user and the first user, and the relationship score is directly proportional to the intimacy. For any second user, retrieve a number of first contents from the first content list that correspond to the relationship score of the second user, wherein the number of first contents retrieved is proportional to the relationship score of the second user.
5. The content recommendation method according to claim 4, characterized in that, The step of determining the relationship score of each second user who has interacted with the first user based on the first user's social relationship data includes: The type of interaction between the second user and the first user, and the weight of the interaction corresponding to the type, are determined based on the social relationship data. Determine the number of times the second user performs the type of interaction within a predetermined time period, and the time decay coefficient for the type of interaction. The relationship score is determined based on the weights, the number of occurrences, and the time decay coefficient.
6. The content recommendation method according to claim 1, characterized in that, The step of recommending content to the first user based on the retrieved first and second content includes: Sort the first and second retrieved content; The content that appears first in the first and second retrieved content is selected as the target content. Identify at least one first piece of content and at least one second piece of content corresponding to the second user who published the target content, wherein the at least one first piece of content or the at least one second piece of content includes the target content; Recommend at least one piece of first content and at least one piece of second content to the first user.
7. A content recommendation device, characterized in that, include: The receiving module is used to receive content requests initiated by the first user; The acquisition module is configured to, in response to the content request, acquire the social relationship data of a first user and a list of first content published by a second user who has interacted with the first user, wherein the social relationship data includes a list of users of the second user who has interacted with the first user; The acquisition module is further configured to acquire a second content list of second content that the second user has performed the first action, wherein the interaction action includes the first action; The retrieval module is used to retrieve all first content corresponding to each of the set number of second users in the user list from the first content list when the number of second users in the user list exceeds a threshold. The recommendation module is used to recommend content to the first user based on the first content retrieved. The retrieval module is further configured to, when the number of second users in the user list does not exceed the threshold, retrieve a first content corresponding to the number of each second user in the user list from the first content list, and retrieve a second content corresponding to the number of each second user in the user list from the second content list. The recommendation module is also used to recommend content to the first user based on the first and second content retrieved. The recommendation module is specifically used to sort the first content retrieved; determine the first content ranked first as the target first content; and determine the first content corresponding to the second user who published the target first content. The first target content and the second target content are recommended to the first user. The second target content is at least one piece of content other than the first target content in the first content corresponding to the second user who published the first target content.
8. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the content recommendation method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the content recommendation method as described in any one of claims 1 to 6.