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

CN122986182APending Publication Date: 2026-10-27YEELION ONLINE NETWORK TECH BEIJING
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611245876.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-17
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

由于固定标签体系中的标签数量有限,难以充分表征海量内容的多维度特征与细节差异,导致内容推荐的准确性较低

Benefits of technology

[0043]第五方面,本申请还提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述方法的步骤。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122986182A_ABST
    Figure CN122986182A_ABST
Patent Text Reader

Abstract

The application relates to a content recommendation method, a computer device, a readable storage medium and a program product. The method comprises the following steps: acquiring a plurality of to-be-recommended contents, determining a heat value of each to-be-recommended content based on user interactive operation data of each to-be-recommended content within a preset time period; inputting the to-be-recommended content into a label generation model matched with the heat value of the to-be-recommended content to obtain a content label corresponding to the to-be-recommended content; updating a content label library according to the content label corresponding to each to-be-recommended content; recommending target content to a target user based on the content label library and a user label of the target user; the target content is a to-be-recommended content in the content label library, the content label of which matches the user label; the user label is determined according to historical interactive content of the target user or / and an associated user; the associated user is a user having a social relationship with the target user. The method can improve the accuracy of content recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the rapid growth of internet information, content recommendation technology has become one of the core functions of various information platforms. Content recommendation technology often requires tagging content within massive amounts of text, establishing a mapping relationship between content and tags, and then recommending content with corresponding tags to users. The quality of the tags directly affects the accuracy of content recommendations; high-quality tags can more accurately characterize content features, thereby improving the match between recommendation results and user interests.

[0003] However, traditional content recommendation technologies typically use a pre-defined fixed tagging system to label and match content. Because the number of tags in a fixed tagging system is limited, it is difficult to fully represent the multi-dimensional characteristics and detailed differences of massive amounts of content, resulting in low accuracy in content recommendations. Summary of the Invention

[0004] Therefore, it is necessary to provide a content recommendation method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the accuracy of content recommendation in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a content recommendation method, including:

[0006] Multiple pieces of content to be recommended are acquired, and based on user interaction data of each piece of content to be recommended within a preset time period, a popularity value is determined for each piece of content to be recommended; the popularity value is used to quantify the number of preset interaction operations input to the content to be recommended.

[0007] The content to be recommended is input into a tag generation model that matches the popularity value of the content to be recommended, and the content tags corresponding to the content to be recommended are obtained; the popularity value is positively correlated with the number of model parameters of the tag generation model;

[0008] The content tag library is updated based on the content tags corresponding to each of the recommended contents; the content tag library is used to record the mapping relationship between each recommended content and each content tag;

[0009] Based on the content tag library and the user tags of the target user, target content is recommended to the target user; the target content is the content to be recommended in the content tag library whose content tags match the user tags, and the user tags are determined based on the historical interaction content of the target user and / or associated users, and the associated users are users who have social relationships with the target user.

[0010] In one embodiment, different tag generation models process content to be recommended at different popularity levels, and the number of model parameters of the tag generation model is positively correlated with the corresponding popularity level. The step of inputting the content to be recommended into a tag generation model that matches the popularity value of the content to be recommended to obtain content tags corresponding to the content to be recommended includes:

[0011] The recommended content is sorted in descending order of its popularity value to obtain a content sequence.

[0012] The content sequence is divided into intervals according to the ranking intervals corresponding to each of the aforementioned popularity levels, resulting in a content set corresponding to each of the aforementioned popularity levels; the number of content to be recommended contained in the content set corresponding to any of the aforementioned popularity levels matches the content processing capacity of the tag generation model corresponding to that popularity level; the content processing capacity includes the number of content to be recommended that the tag generation model can process per unit time.

[0013] Input the set of content corresponding to any of the aforementioned popularity levels into the tag generation model that matches the popularity level to obtain the content tags corresponding to each of the content to be recommended.

[0014] In one embodiment, the step of inputting the content set corresponding to any of the popularity levels into a tag generation model that matches the popularity level to obtain content tags corresponding to each of the content to be recommended includes:

[0015] For any set of content corresponding to a given popularity level, obtain the number of target tags corresponding to the tag generation model matching that popularity level; the number of target tags includes the number of content tags that the tag generation model can output; the number of target tags is positively correlated with the number of model parameters of the tag generation model;

[0016] The set of content corresponding to the popularity level and the number of target tags are filled into a preset prompt word template to obtain the target input information;

[0017] The target input information is input into the tag generation model that matches the popularity level to obtain the content tags corresponding to each of the recommended contents.

[0018] In one embodiment, before recommending target content to the target user based on the content tag library and the target user's user tags, the method further includes:

[0019] Obtain multiple first historical interaction contents of the target user, and multiple second historical interaction contents of the associated user;

[0020] Based on the content identifier corresponding to each of the first historical interaction contents, the corresponding content tags are queried from the content tag library to obtain the first content tag set;

[0021] Based on the content identifier corresponding to each of the second historical interaction contents, the corresponding content tags are queried from the content tag library to obtain the second content tag set;

[0022] The user tags of the target user are determined based on the first set of content tags and the second set of content tags.

[0023] In one embodiment, determining the user tags of the target user based on the first content tag set and the second content tag set includes:

[0024] Obtain the weight value of each content tag in the first content tag set and the second content tag set; when the content tag belongs to the first content tag set, the weight value is a first weight value; when the content tag belongs to the second content tag set, the weight value is a second weight value; the first weight value is greater than the second weight value.

[0025] Multiple candidate content tag sets are divided from the first content tag set and the second content tag set; the content tags in the same candidate content tag set are the same;

[0026] For each candidate content tag set, the weight values ​​of each content tag in the candidate content tag set are summed to obtain the summed weight value corresponding to the candidate content tag set.

[0027] The set of candidate content tags whose accumulated weight values ​​meet the preset conditions is determined as the target content tag set;

[0028] The content tags in the target content tag set are determined as the user tags of the target user.

[0029] In one embodiment, updating the content tag library based on the content tags corresponding to each of the recommended contents includes:

[0030] For each piece of content to be recommended, if the content identifier of the content to be recommended does not exist in the content tag library, a new mapping record is added to the content tag library; the mapping record includes the content identifier of the content to be recommended, the content tag of the content to be recommended, and the recording time of the content to be recommended in the content tag library.

[0031] If the content identifier of the content to be recommended exists in the content tag library, update the content tag of the content to be recommended in the content tag library and the recording time of the content to be recommended in the content tag library.

[0032] In one embodiment, recommending target content to the target user based on the content tag library and the target user's user tags includes:

[0033] Content tags whose recording time falls within a recent preset time period are obtained from the content tag library and used as candidate content tags;

[0034] Based on the content to be recommended corresponding to the candidate content tags that match the user tags of the target user, determine the set of candidate content corresponding to the user tags;

[0035] The target content is determined from the candidate content set and recommended to the target user.

[0036] Secondly, this application also provides a content recommendation device, comprising:

[0037] The determination module is used to acquire multiple pieces of content to be recommended, and determine the popularity value of each piece of content to be recommended based on user interaction data of each piece of content to be recommended within a preset time period; the popularity value is used to quantify the number of preset interaction operations input to the piece of content to be recommended.

[0038] The matching module is used to input the content to be recommended into a tag generation model that matches the popularity value of the content to be recommended, so as to obtain the content tag corresponding to the content to be recommended; the popularity value is positively correlated with the number of model parameters of the tag generation model;

[0039] The update module is used to update the content tag library according to the content tags corresponding to each of the content to be recommended; the content tag library is used to record the mapping relationship between each content to be recommended and each content tag;

[0040] The recommendation module is used to recommend target content to the target user based on the content tag library and the user tags of the target user; the target content is the content to be recommended in the content tag library whose content tags match the user tags, and the user tags are determined based on the historical interaction content of the target user and / or associated users, and the associated users are users who have social relationships with the target user.

[0041] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.

[0042] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0043] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.

[0044] The aforementioned content recommendation method, apparatus, computer equipment, computer-readable storage medium, and computer program product determine the popularity value of the content to be recommended based on user interaction data within a preset time period. The content to be recommended is then input into a tag generation model that matches the popularity value. The popularity value is positively correlated with the number of model parameters in the tag generation model, ensuring that more popular content is assigned to a tag generation model with a larger number of parameters, while less popular content is assigned to a tag generation model with a smaller number of parameters. This reduces the computational resources consumed in generating tags for less popular content while maintaining the accuracy of tag generation for popular content, thus improving the overall resource utilization efficiency of tag generation with limited computing resources. Furthermore, by updating the content tag library based on the content tags corresponding to each content to be recommended, the mapping relationships in the content tag library are dynamically updated with each iteration over time, improving the ability of tags to represent content features and enhancing the accuracy of subsequent content recommendations based on content tags. Finally, by determining user tags based on the historical interaction content of the target user and related users, and making recommendations based on the matching between the content tag library and user tags, social relationships are introduced into the construction of user interests, expanding the coverage dimensions of user interests and contributing to improved content recommendation accuracy. Attached Figure Description

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

[0046] Figure 1 This is a diagram illustrating the application environment of a content recommendation method in one embodiment.

[0047] Figure 2 This is a flowchart illustrating a content recommendation method in one embodiment;

[0048] Figure 3 This is a logic diagram of a content tag generation process based on a hierarchical large model in one embodiment;

[0049] Figure 4This is a logic diagram of a content recommendation process based on a content tag library in one embodiment;

[0050] Figure 5 This is a flowchart illustrating a content recommendation method in another embodiment;

[0051] Figure 6 This is a structural block diagram of a content recommendation device in one embodiment;

[0052] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0054] The content recommendation method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server.

[0055] Server 104 acquires multiple pieces of content to be recommended, and determines the popularity value of each piece of content based on user interaction data within a preset time period. The popularity value is used to quantify the number of preset interaction operations input to the content to be recommended. Server 104 inputs the content to be recommended into a tag generation model that matches the popularity value of the content to be recommended, and obtains the content tags corresponding to the content to be recommended. The popularity value is positively correlated with the number of model parameters of the tag generation model. Server 104 updates the content tag library according to the content tags corresponding to each piece of content to be recommended. The content tag library is used to record the mapping relationship between each piece of content to be recommended and each content tag. Server 104 recommends target content to the target user based on the content tag library and the user tags of the target user. The target content is the content to be recommended that matches the content tags and user tags in the content tag library. The user tags are determined based on the historical interaction content of the target user and / or associated users. Associated users are users who have social relationships with the target user.

[0056] The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle systems, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. The server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0057] In one exemplary embodiment, such as Figure 2 As shown, a content recommendation method is provided, which is then applied to... Figure 1 Taking server 104 as an example, the explanation includes:

[0058] Step S202: Obtain multiple pieces of content to be recommended, and determine the popularity value of each piece of content to be recommended based on user interaction data of each piece of content within a preset time period.

[0059] The content to be recommended can be text content to be displayed to users, such as subscription account articles, news articles, community posts, etc. The server can consider multiple newly published text content items within a certain period as content to be recommended. For example, each piece of content to be recommended can be represented as data containing a content identifier and text content, denoted as...<id, text> , where id represents the content identifier of the content to be recommended, used to uniquely identify the content to be recommended, and text represents the text content of the content to be recommended.

[0060] User interaction data refers to the data generated by users' interactive actions on the content to be recommended. Interactive actions can refer to the actions users take while browsing the content, such as clicking, liking, saving, sharing, and commenting.

[0061] Among them, preset interactive operations can refer to one or more types of interactive operations that are pre-set to reflect the user's level of attention to recommended content. For example, click and like operations can be set as preset interactive operations.

[0062] The preset time period can refer to a pre-defined duration for collecting user interaction data, such as 1 hour, 12 hours, or 24 hours. Within each preset time period, the server collects data on the preset interaction operations received by each piece of content to be recommended.

[0063] The popularity score quantifies the number of pre-defined interactive actions input for the content to be recommended. The more pre-defined interactive actions input for a particular piece of content to be recommended, the higher the popularity score for that content.

[0064] In practice, the popularity value of each piece of content to be recommended is determined based on user interaction data within a preset time period, and there are multiple ways to achieve this.

[0065] As an example, the number of preset interactive operations received by each piece of content to be recommended within a preset time period is counted, and this number of preset interactive operations is used as the popularity value of the content to be recommended. For example, the sum of the number of reads and likes of the content to be recommended within the preset time period is used as the popularity value of the content to be recommended.

[0066] Specifically, the server can calculate the popularity value of the content to be recommended based on the number of views and likes within a preset time period according to a preset popularity calculation formula. This process can be represented as score = CALC(views, likes), where score represents the popularity value of the content to be recommended, views represent the number of views, likes represent the number of likes, and CALC represents the function that calculates the popularity value based on the number of views and likes. For example, the sum of the number of views and likes of the content to be recommended within the preset time period can be used as the popularity value of the content to be recommended. Optionally, the completion rate and reading time can also be used as inputs to the CALC function, where the completion rate can refer to the completeness of the user's viewing of the content to be recommended, and the reading time can refer to the time the user spends viewing the content to be recommended. The higher the completion rate and the longer the reading time of the content to be recommended, the higher the popularity value of the content to be recommended.

[0067] As another example, the number of various preset interactive operations for each piece of content to be recommended within a preset time period is obtained. Then, the number of preset interactive operations is weighted and summed according to their respective weights to obtain the popularity value of the content to be recommended. Different types of preset interactive operations correspond to different weights; for example, the weight of a share operation is greater than the weight of a like operation.

[0068] By using the above methods, the popularity value of each piece of content to be recommended is determined based on user interaction data, so that the popularity value reflects the degree of attention users pay to the recommended content.

[0069] In practice, the server can perform a content cold start operation before initially determining the popularity value of the content to be recommended. The content cold start operation refers to pushing the content to be recommended to a subset of users to collect user interaction data when such data is lacking. For example, the content to be recommended can be pushed to users who have subscribed to it, or to randomly selected seed users, thereby collecting user interaction data. If user interaction data for the content to be recommended has already been collected in the previous preset time period, there is no need to perform a content cold start operation again in the next preset time period.

[0070] Step S204: Input the content to be recommended into a tag generation model that matches the popularity value of the content to be recommended, and obtain the content tags corresponding to the content to be recommended.

[0071] Among them, the popularity value is positively correlated with the number of model parameters of the tag generation model.

[0072] Here, the tag generation model refers to a model used to generate content tags based on the content to be recommended. Optionally, the tag generation model can be a large language model. Content tags can refer to characters or strings used to summarize the main idea of ​​the content to be recommended, such as "basketball," "rap," "singing and dancing," etc. The number of model parameters refers to the number of parameters included in the tag generation model.

[0073] In practice, the server is pre-configured with multiple tag generation models, each with a different number of parameters. A tag generation model with a larger number of parameters generates more accurate content tags, but correspondingly requires more computational resources. For example, the server may have three tag generation models configured with 30 billion (30B) parameters, 15 billion (15B) parameters, and 7 billion (7B) parameters.

[0074] The popularity value is positively correlated with the number of model parameters in the tag generation model. This means that the higher the popularity value of the content to be recommended, the larger the number of model parameters in the tag generation model that matches that content. For example, content with a high popularity value can be input into a tag generation model with a large number of model parameters, while content with a low popularity value can be input into a tag generation model with a small number of model parameters.

[0075] For example, the content to be recommended is input into a tag generation model that matches the popularity value of the content to be recommended. This can be done by pre-setting a popularity value range for each tag generation model, and the higher the number of model parameters, the higher the popularity value range. The popularity value of each content to be recommended is compared with each popularity value range, and the content to be recommended is input into the tag generation model corresponding to the popularity value range to which the popularity value of the content to be recommended belongs.

[0076] Therefore, the computational resources of the tag generation model with a large number of model parameters are allocated to the recommended content with high popularity values. This limits the consumption of computational resources while improving the accuracy of the content tags corresponding to the recommended content with high popularity values.

[0077] Step S206: Update the content tag library according to the content tags corresponding to each content to be recommended.

[0078] The content tag library records the mapping relationship between each piece of content to be recommended and its corresponding content tags. The mapping relationship refers to the correspondence between the content to be recommended and the content tags.

[0079] As an example, updating the content tag library based on the content tags corresponding to each piece of content to be recommended can involve recording the correspondence between the content identifiers of each piece of content to be recommended and the corresponding content tags in the content tag library; if the content tag library already records the content identifier of a piece of content to be recommended, then the recorded content tag of that piece of content to be recommended is replaced with the content tag obtained in this update. Here, the content identifier can refer to characters or strings used to uniquely identify the content to be recommended.

[0080] As another example, updating the content tag library based on the content tags corresponding to each piece of content to be recommended can be achieved by writing the content identifier, content tag, and record time of each piece of content to be recommended into the content tag library as a record within each preset time period. When querying content tags, the content tag with the most recent record time corresponding to the content identifier can be retrieved. Here, the record time can refer to the time when the record was written into the content tag library.

[0081] Therefore, the content tags corresponding to each piece of content to be recommended are recorded in the content tag library, so that the content tags recorded in the content tag library are updated as the preset time period progresses.

[0082] Step S208: Based on the content tag library and the target user's user tags, recommend target content to the target user.

[0083] The target content refers to the content to be recommended that matches the content tags and user tags in the content tag library. The user tags are determined based on the historical interaction content of the target user and / or associated users. Associated users are users who have social relationships with the target user.

[0084] In this context, "target users" refers to users to whom content is to be recommended. "User tags" can refer to tags reflecting the content a user follows. "Associated users" refers to users with whom the target users have social relationships. These social relationships can refer to connections between users, such as friendships, following relationships, or interactive relationships. "Historical interaction content" refers to content to be recommended that users have interacted with within a historical timeframe.

[0085] As an example, to determine the user tags of a target user, one could do so based on the content tags corresponding to the target user's historical interactions. For instance, the user tags could be determined by matching the target user's historical interactions with the content tags in a content tag library.

[0086] As another example, user tags for a target user can be determined by combining content tags corresponding to the target user's historical interactions with content tags corresponding to the historical interactions of associated users. For instance, different weights can be assigned to content tags from the target user's historical interactions and content tags from the associated users' historical interactions, and the target user's user tags can be determined based on the weights of each content tag.

[0087] In practice, based on a content tag library and the target user's user tags, target content is recommended to the target user. This can be achieved by querying the content tag library for content whose content tags match the user tags, and then recommending the retrieved content as the target content. Alternatively, it can be achieved by querying the content tag library for content whose record time is within a recent preset time period and whose content tags match the user tags, and then recommending the retrieved content as the target content. The recent preset time period can refer to a time period within a preset duration from the current time.

[0088] In the aforementioned content recommendation method, the popularity value of the content to be recommended is determined based on user interaction data within a preset time period. This content is then input into a tag generation model that matches the popularity value. The popularity value is positively correlated with the number of parameters in the tag generation model, ensuring that more popular content is assigned to a tag generation model with a larger number of parameters, while less popular content is assigned to a model with a smaller number of parameters. This approach maintains the accuracy of tag generation for popular content while reducing the computational resources consumed in generating tags for less popular content, thus improving the overall resource utilization efficiency of tag generation with limited computing resources. Furthermore, by updating the content tag library based on the content tags corresponding to each content to be recommended, the mapping relationships in the content tag library are dynamically updated over time, enhancing the ability of tags to represent content features and improving the accuracy of subsequent content recommendations based on content tags. Finally, by determining user tags based on the historical interaction content of the target user and related users, and making recommendations based on the matching between the content tag library and user tags, social relationships are introduced into the construction of user interests, expanding the coverage dimensions of user interests and contributing to improved content recommendation accuracy.

[0089] In an exemplary embodiment, different tag generation models process content to be recommended at different popularity levels, and the number of model parameters of the tag generation model is positively correlated with the corresponding popularity level. The content to be recommended is input into a tag generation model that matches the popularity value of the content to be recommended, resulting in content tags corresponding to the content to be recommended, including:

[0090] The content to be recommended is sorted from highest to lowest popularity value to obtain a content sequence. The content sequence is then divided into intervals according to the ranking intervals corresponding to each popularity level, resulting in a content set corresponding to each popularity level. The number of content to be recommended in the content set corresponding to any popularity level is matched with the content processing capacity of the tag generation model corresponding to that popularity level. The content processing capacity includes the number of content to be recommended that the tag generation model can process per unit of time. The content set corresponding to any popularity level is input into the tag generation model matching that popularity level to obtain the content tags corresponding to each content to be recommended.

[0091] Among them, the popularity level refers to the level that recommended content is divided into based on its popularity value.

[0092] Here, the content sequence can refer to the sequence of content to be recommended arranged from high to low according to their popularity value. For example, the content sequence can be denoted as TextItems, and the sorting process can be represented as sorting the content to be recommended according to its popularity value (i.e., the score field).

[0093] Here, "ranking range" refers to the ranking range corresponding to each popularity level in the content sequence. "Content set" refers to a collection of multiple pieces of content to be recommended, categorized into the same popularity level.

[0094] The number of content items to be recommended within the content set corresponding to any given popularity level is matched with the content processing capacity of the tag generation model corresponding to that popularity level. The content processing capacity includes the number of content items to be recommended that the tag generation model can process per unit of time. In practice, the number of content items to be recommended assigned to each tag generation model can be determined based on the number of content items that each tag generation model can process per unit of time.

[0095] For example, the server is configured with a first tag generation model, a second tag generation model, and a third tag generation model. The number of model parameters decreases sequentially, the corresponding popularity levels decrease sequentially, and the number of recommended content that can be processed per unit time by the three models is the first, second, and third, respectively. Specifically, the first number of recommended content in the content sequence can be divided into a first content set, the second number of recommended content after the first number can be divided into a second content set, and the third number of recommended content after the first and second content sets can be divided into a third content set. The first content set is input into the first tag generation model, the second content set is input into the second tag generation model, and the third content set is input into the third tag generation model.

[0096] It should be noted that the larger the number of model parameters in a tag generation model, the longer it takes to run once. Therefore, the number of content items to be recommended that it can process per unit of time is smaller; that is, the first number is smaller than the second number, and the second number is smaller than the third number. For content items to be recommended that are not ranked in the first, second, or third content sets in the content sequence, no content tags will be generated for them.

[0097] For example, the server is configured with three tag generation models with parameter counts of 30B, 15B, and 7B. The number of recommended content items that each model can process per unit time is denoted as K1, K2, and K3, respectively. The recommended content items with a ranking range of [0, K1) are divided into a first content set (Set1), the recommended content items with a ranking range of [K1, K1+K2) are divided into a second content set (Set2), and the recommended content items with a ranking range of [K1+K2, K1+K2+K3) are divided into a third content set (Set3). The first content set (Set1) is input into the tag generation model with parameter count of 30B, the second content set (Set2) is input into the tag generation model with parameter count of 15B, and the third content set (Set3) is input into the tag generation model with parameter count of 7B. Among these, the larger the number of model parameters, the longer it takes to run once, and therefore the fewer pieces of content to be recommended it can process per unit of time; that is, K1 is less than K2, and K2 is less than K3. For content to be recommended that ranks after K1+K2+K3 in the content sequence, no more content tags will be generated for it.

[0098] The technical solution of this embodiment sorts each content to be recommended according to its popularity value and divides the content sequence into intervals according to the content processing capacity of each tag generation model. This allows content to be recommended with high popularity values ​​to be assigned to tag generation models with a large number of model parameters. In this way, while limiting the computational resource consumption of the tag generation model, the content to be recommended with high popularity values ​​can obtain content tags with high accuracy.

[0099] In an exemplary embodiment, the content set corresponding to any popularity level is input into the tag generation model matching that popularity level to obtain content tags corresponding to each content to be recommended. This includes: for any content set corresponding to any popularity level, obtaining the number of target tags corresponding to the tag generation model matching that popularity level; the number of target tags includes the number of content tags that the tag generation model can output; the number of target tags is positively correlated with the number of model parameters of the tag generation model; filling the content set corresponding to the popularity level and the number of target tags into a preset prompt word template to obtain target input information; and inputting the target input information into the tag generation model matching that popularity level to obtain content tags corresponding to each content to be recommended.

[0100] The number of target tags includes the number of content tags that the tag generation model can output. The number of target tags is positively correlated with the number of model parameters in the tag generation model; that is, the more model parameters a tag generation model has, the more target tags it will have. The prompt word template refers to a preset format used to input information into the tag generation model. The prompt word template contains instructions to guide the tag generation model in generating content tags, as well as positions for filling in the content to be recommended and the number of target tags. The target input information refers to the information obtained after filling the prompt word template with the content to be recommended and the number of target tags.

[0101] For example, if we denote the target input information as Q, the prompt word template as Template, the number of target tags as N, and the text content of the content to be recommended as text, then the process of filling the prompt word template with the text content of the content to be recommended and the number of target tags can be represented as:

[0102] Q = Template(text, N).

[0103] As an example, the prompt word template includes the following: instructing the tag generation model to read the populated content to be recommended, combine it with a preset tag library, and output a specified number of content tags, with each content tag having a character limit not exceeding a preset character limit. Here, the preset tag library can refer to a set of content tags pre-defined according to business needs, which the server refers to when generating content tags; the preset character limit can refer to the upper limit set for the number of characters in a single content tag.

[0104] For example, the prompt template could look like this: "You are a content understanding expert. Please read the following content, and using the existing tag library (optional), output a series of tags, totaling N tags. Each tag should not exceed six characters. The output should be a string array." The prompt template should also specify the positions for filling the preset tag library and the positions for filling the text content to be recommended. Here, N represents the number of target tags; each content tag should not exceed 6 characters.

[0105] For example, the target input information (Q) is input into the tag generation model that matches the popularity level to obtain the content tags (denoted as Tags) corresponding to each content to be recommended. This process can be represented as Tags = LLM.Get(Q), where LLM represents the tag generation model that matches the popularity level, and Tags is an array of multiple content tags. Combining the above example, the target input information corresponding to the first content set (Set1) can be input into a tag generation model with 30 billion (30B) parameters, the target input information corresponding to the second content set (Set2) can be input into a tag generation model with 15 billion (15B) parameters, and the target input information corresponding to the third content set (Set3) can be input into a tag generation model with 7 billion (7B) parameters.

[0106] As another example, after obtaining the content tags corresponding to the content to be recommended, it can be determined whether the number of content tags corresponding to the content to be recommended is equal to the number of target tags. For example, it can be determined whether the number of content tags corresponding to the content to be recommended satisfies Tags.length == N, that is, whether the number of content tags (Tags.length) is equal to the number of target tags (N). If the number of content tags is not equal to the number of target tags, the target input information can be re-inputted into the tag generation model to obtain the content tags corresponding to the content to be recommended again.

[0107] The technical solution of this embodiment sets a large number of target tags for the tag generation model with a large number of model parameters, and then fills the content set and the number of target tags into the prompt word template and inputs it into the tag generation model, so that the recommended content with high popularity value obtains a large number of content tags, and further adapts the number of content tags to the tag generation model.

[0108] For the convenience of those skilled in the art, Figure 3 An exemplary logic diagram of the content tag generation process based on a hierarchical large-scale model is provided. Specifically, newly published content to be recommended within a certain period is acquired; a priority weight sorter is used to determine the popularity value of each content to be recommended based on user interaction data, and the content to be recommended is sorted according to the popularity value to obtain a content priority queue. Here, the priority weight sorter can refer to a module used to sort the content to be recommended by popularity, and the content priority queue is the content sequence obtained by sorting by popularity value. The higher the ranking of the content to be recommended in the content priority queue, the higher its popularity value.

[0109] Then, according to the hierarchical large model prompt word template, the content priority queue is divided into content sets corresponding to different tag generation models according to the aforementioned ranking interval division method, and each content set is input into the corresponding tag generation model. The hierarchical large model prompt word template can refer to the prompt word template used to input information into tag generation models with different parameter levels. Each tag generation model analyzes the corresponding content set to obtain the content tags corresponding to each content to be recommended. The content tags generated by tag generation models with different parameter levels can be denoted as first-level tags, second-level tags, etc., and can be processed in conjunction with a preset tag library when generating content tags. The preset tag library can refer to a set of content tags pre-set according to business needs.

[0110] Finally, the content tags corresponding to each piece of content to be recommended are recorded in the large model content tag library; the large model content tag library is the aforementioned content tag library, which is used to record the mapping relationship between each piece of content to be recommended and each content tag.

[0111] In an exemplary embodiment, before recommending target content to the target user based on the content tag library and the target user's user tags, the method further includes: obtaining multiple first historical interaction contents of the target user and multiple second historical interaction contents of the associated user; querying the corresponding content tags from the content tag library according to the content identifiers corresponding to each first historical interaction content to obtain a first content tag set; querying the corresponding content tags from the content tag library according to the content identifiers corresponding to each second historical interaction content to obtain a second content tag set; and determining the target user's user tags based on the first content tag set and the second content tag set.

[0112] The first historical interaction content can refer to the recommended content for which the target user has performed preset interactive operations within a historical time period, such as articles read or posts liked by the target user. Alternatively, it can refer to the recommended content for which the target user has performed more preset interactive operations within a historical time period than a preset threshold. The second historical interaction content refers to the recommended content for which associated users have performed preset interactive operations within a historical time period. Again, it can refer to the recommended content for which the associated users have performed more preset interactive operations within a historical time period than a preset threshold.

[0113] In the specific implementation, the content identifiers of each first historical interaction content of the target user can be traversed, and the content tag library can be checked to see if a corresponding content identifier exists. If it exists, the content tag corresponding to the content identifier is obtained and added to the first content tag set; otherwise, the content identifier is skipped. Similarly, the content identifiers of each second historical interaction content of the associated user can be traversed, and the content tag library can be checked to see if a corresponding content identifier exists. If it exists, the content tag corresponding to the content identifier is obtained and added to the second content tag set; otherwise, the content identifier is skipped.

[0114] The first set of content tags can refer to the set of content tags corresponding to each first historical interaction content, and these content tags can be regarded as the popular tags of the target user; the second set of content tags can refer to the set of content tags corresponding to each second historical interaction content, and these content tags can be regarded as the popular tags of the associated user.

[0115] For example, obtain the first historical interaction content (denoted as ids) of the target user (U), ids=GetHistory(U); iterate through each first historical interaction content and query the content identifier id of each first historical interaction content. i If the tag exists in the content tag library (DB), and if it exists, retrieve the corresponding content tag (denoted as tags) from the content tag library. i ), tags i =GetIfExists(DB, id) i If a content identifier does not exist in the content tag library, the query result corresponding to that content identifier is an empty set, i.e., GetIfExists returns an empty set; the union of all the retrieved content tags is used to obtain the first content tag set, denoted as UTags, which can be represented as UTags = tags1 ∪ tags2 ∪ … ∪ tags M Among them, tags1~ tags M This can represent the M content tags corresponding to the target user. Simultaneously, it can obtain the content tags corresponding to the second historical interaction content of each of the target user's associated users (denoted as F), and take the union of the content tags of each associated user (without deduplication) to obtain the second content tag set, denoted as FTags, which can be represented as FTags = (tags1 ∪ tags2 ∪ ... ∪ tags). X )∪(tags1∪tags2∪…∪tags Y )∪…,where, tags1~ tags X This can represent the X content tags corresponding to the associated user F1, tags1~tags Y This can represent the Y content tags corresponding to the associated user F2, and so on.

[0116] For example, the server determines the target user's user tag based on the first content tag set and the second content tag set. This can be done by taking the union of the first and second content tag sets as the target user's user tag, or by merging and counting the content tags in the first and second content tag sets to obtain the frequency of occurrence of each content tag, and then determining the content tags with a frequency greater than a preset frequency as the target user's user tag.

[0117] The technical solution of this embodiment uses the content tags corresponding to the target user's historical interaction content and the historical interaction content of associated users in the content tag library as the basis for determining user tags, so that the determined user tags simultaneously reflect the content that the target user himself and users who have social relationships with the target user are interested in.

[0118] In an exemplary embodiment, determining the target user's user tags based on a first set of content tags and a second set of content tags includes:

[0119] Obtain the weight values ​​of each content tag in the first content tag set and the second content tag set; if a content tag belongs to the first content tag set, the weight value is the first weight value; if a content tag belongs to the second content tag set, the weight value is the second weight value; the first weight value is greater than the second weight value; divide the first content tag set and the second content tag set into multiple candidate content tag sets; the content tags in the same candidate content tag set are the same; for each candidate content tag set, accumulate the weight values ​​of each content tag in the candidate content tag set to obtain the accumulated weight value corresponding to the candidate content tag set; determine the candidate content tag set whose accumulated weight value meets the preset conditions as the target content tag set; determine the content tags in the target content tag set as the user tags of the target user.

[0120] The weight value refers to a numerical value used to measure the influence of content tags on determining user tags. When a content tag belongs to a first set of content tags, its weight value is the first weight value; when a content tag belongs to a second set of content tags, its weight value is the second weight value. A first weight value is greater than a second weight value. This means that content tags originating from the target user's own historical interactions have a higher weight than content tags originating from related users' historical interactions. This is because the target user's own historical interactions better reflect their interests than those of related users; therefore, content tags generated by the target user themselves should be assigned a higher weight.

[0121] Among them, the candidate content tag set can refer to a set consisting of the same content tags, and the content tags in the same candidate content tag set are the same.

[0122] The cumulative weight value refers to the value obtained by summing the weight values ​​of each content tag in the candidate content tag set.

[0123] In other words, identical content tags in the first and second content tag sets can be grouped into the same candidate content tag set. For each candidate content tag set, the weight values ​​of each content tag in that set are summed to obtain the accumulated weight value for that candidate content tag set. For example, if a content tag appears twice in the first content tag set and three times in the second content tag set, then the candidate content tag set corresponding to that content tag contains five content tags. The weight value of two of these tags is the first weight value, the weight value of the three tags is the second weight value, and the accumulated weight value is equal to the product of 2 and the first weight value plus the product of 3 and the second weight value.

[0124] The target content tag set can refer to the set of candidate content tags whose cumulative weight values ​​meet preset conditions. The preset conditions can refer to the conditions used to filter the candidate content tag set, such as the cumulative weight value being greater than a preset threshold, or the cumulative weight value ranking being higher than a preset ranking.

[0125] For example, different tag sources should have different weight values. The server can establish a mapping between each content tag and its weight value. Assume the first set of content tags is denoted as UTags, the second set of content tags is denoted as FTags, and the initial weight value of each content tag is zero. For each candidate set of content tags, iterate through each content tag (denoted as tag) in the candidate set. i ), for each content tag i The tag is obtained by assigning different weight values ​​to its source. i The accumulated weight value, Tag2Score. The accumulated weight value, Tag2Score, can be expressed as:

[0126] .

[0127] In content tags i In the case of belonging to the first set of content tags (UTags), Tag2Score[tag] i Add P; in the content tag i In the case of belonging to the second content tag set (FTags), Tag2Score[tag] i Increase Q. Where P is the first weight value, Q is the second weight value, and P is greater than Q.

[0128] For example, the first weight is 10, the second weight is 5, and the initial weight of each content tag is zero. Iterating through each content tag in any candidate content tag set: for content tags belonging to the first content tag set, increase the current weight value by 10; for content tags belonging to the second content tag set, increase the current weight value by 5. This candidate content tag set includes 5 "rap" content tags. Of these 5 "rap" content tags, 2 belong to the first content tag set and 3 belong to the second content tag set. Therefore, after accumulating the weight values ​​of the "rap" content tags, the accumulated weight value is 0 + 2 * 10 + 3 * 5 = 35.

[0129] Then, the set of candidate content tags whose cumulative weight values ​​meet preset conditions is determined as the target content tag set, and the content tags in the target content tag set are determined as the user tags of the target user. The preset conditions may include the cumulative weight value being greater than a preset threshold, or the cumulative weight value being in the top preset position in the sorting. For example, by calculating the cumulative weight value corresponding to each candidate content tag set, the cumulative weight value of the "rap" content tag is 35, the cumulative weight value of the "basketball" content tag is 15, and the cumulative weight value of the "singing and dancing" content tag is 30. Then, each content tag can be sorted from high to low according to the cumulative weight value to obtain the user tag queue, denoted as RecTags, and the content tags whose cumulative weight value ranks in the top preset position (e.g., the top M positions) are determined as the user tags of the target user. For example, the "rap" and "singing and dancing" content tags, which rank in the top 2, are used as the user tags of the target user.

[0130] The technical solution of this embodiment, through the above-mentioned weighted fusion method, enables the server to comprehensively consider the target user's own historical interests and the historical interests of associated users to determine the target user's user tags, so that the user tags can reflect both the target user's personal interests and the influence of associated users on the target user's interests.

[0131] In an exemplary embodiment, updating the content tag library based on the content tags corresponding to each content to be recommended includes: for each content to be recommended, if the content identifier of the content to be recommended does not exist in the content tag library, adding a mapping record in the content tag library; the mapping record includes the content identifier of the content to be recommended, the content tags of the content to be recommended, and the recording time of the content to be recommended in the content tag library; if the content identifier of the content to be recommended exists in the content tag library, updating the content tags of the content to be recommended in the content tag library and the recording time of the content to be recommended in the content tag library.

[0132] In this context, a mapping record refers to a record in the content tag library used to record the mapping relationship between a single piece of content to be recommended and its content tags. The mapping record includes the content identifier of the content to be recommended, the content tags of the content to be recommended, and the recording time of the content to be recommended in the content tag library. For example, a mapping record can be denoted as Row, and represented as Row=<Timestamp, Id, Tags> The mapping record is inserted into or updated in the content tag library (DB). Each mapping record in the content tag library (DB) corresponds to a piece of content to be recommended and its content tags.

[0133] If the content identifier of the content to be recommended has already been recorded in the content tag library, the content tag already recorded for the content to be recommended can be replaced with the content tag obtained this time, and the recording time of the content to be recommended can be updated to the time when it was written into the content tag library this time.

[0134] It should be noted that the server repeats steps S202 to S206 within each preset time period. For content to be recommended that is processed in multiple preset time periods, its content identifier is written into the content tag library in the first preset time period in which the content to be recommended is processed, and is updated in subsequent preset time periods.

[0135] The technical solution of this embodiment adds a mapping record when there is no content identifier for the content to be recommended in the content tag library, and updates the content tag and recording time when there is a content identifier, so that the content tag library records the content tag and recording time of each content to be recommended as a preset time period progresses.

[0136] In an exemplary embodiment, recommending target content to a target user based on a content tag library and the target user's user tags may include: obtaining content tags from the content tag library whose recording time is within a recent preset time period as candidate content tags; determining a set of candidate content corresponding to a user tag based on the content to be recommended corresponding to the candidate content tags that match the target user's user tags; determining the target content from the set of candidate content and recommending the target content to the target user.

[0137] The recent preset time can refer to a time period within a preset duration from the current time, such as within 24 hours from the current time. Candidate content tags can refer to content tags whose recording time falls within the recent preset time period.

[0138] In the specific implementation, the server only considers content tags whose recording time is within the most recent preset time as candidate content tags, and does not consider content tags whose recording time is outside the most recent preset time as candidate content tags.

[0139] In this context, matching candidate content tags with user tags can mean that the candidate content tags and user tags are the same.

[0140] In practice, for each user tag, the system queries the content tag library for recommended content whose record time is within a recent preset time period and whose content tag matches the user tag, thus obtaining a candidate content set corresponding to that user tag. From the candidate content sets corresponding to each user tag, some or all of the recommended content is selected as the target content to be recommended to the target user. The recommended content can be randomly selected from the candidate content set, or a preset number of recommended content can be selected from the candidate content set.

[0141] For example, a target user's user tag includes multiple content tags. For each content tag in the user tag (denoted as RecTag)... i Select records from the content tag library whose recording time is within the most recent preset time and whose content tag contains RecTag. i The mapping record corresponds to the content identifier, and the candidate content set (denoted as CandidateIds) corresponding to the content tag is obtained. i ), can be represented as:

[0142] .

[0143] Among them, Row.id represents the content identifier in the mapping record, Row.Tags represents the content tags in the mapping record, Row.Timestamp represents the recording time in the mapping record, Now represents the current timestamp, and Period represents the duration corresponding to the recent preset time.

[0144] Then, from each candidate content set (CandidateIds) i Select some or all of the content to be recommended from the candidate sets, and use the selected content as the target content to recommend to the target user, denoted as Result. Alternatively, you can randomly select content to be recommended from each candidate set and take the union of the results, which can be represented as:

[0145] Result=RAND(CandidateIds_1)∪RAND(CandidateIds_2)∪…;

[0146] RAND represents the random selection of content to be recommended from the candidate content set.

[0147] The technical solution of this embodiment uses only content tags whose recording time is within a recent preset time as candidate content tags, and determines the target content based on the content to be recommended corresponding to the content tags that match the user tags in the candidate content tags, so that the recommended target content is the recently recorded content to be recommended, thereby making the content recommendation adapt to the update of the content tag library.

[0148] For the convenience of those skilled in the art, Figure 4 An exemplary logical diagram of a content recommendation process based on a content tag library is provided. Specifically, the reading history of the target user and the reading history of associated users with whom the target user has a social relationship are obtained; wherein, the reading history of the target user is the aforementioned first historical interaction content of the target user, and the reading history of associated users is the aforementioned second historical interaction content of the associated users.

[0149] Based on the target user's reading history, the historical popular tags corresponding to the target user are retrieved from the large model content tag library; based on the reading history of associated users, the historical popular tags corresponding to the associated users are retrieved from the large model content tag library; the historical popular tags corresponding to the target user are the aforementioned first set of content tags, and the historical popular tags corresponding to the associated users are the aforementioned second set of content tags.

[0150] Then, the terminal performs a weighted fusion of the historical popular tags corresponding to the target user and the historical popular tags corresponding to the associated users to obtain the score corresponding to each content tag, and sorts the content tags according to the score corresponding to each content tag to obtain the user tag weight queue; where, weighted fusion can refer to the process of setting different weights for content tags according to the source of the content tags, and accumulating the weights of the same content tags; the user tag weight queue is the user tag of the target user determined by the score ranking mentioned above.

[0151] Finally, based on the content tags in the user tag weight queue, the recommended content is selected from the large model content tag library that has a recording time within a recent preset time and whose content tag matches the content tag. This yields a candidate set corresponding to each content tag. The candidate sets corresponding to each content tag are then selected and their union is taken to obtain the target content recommended to the target user.

[0152] In another embodiment, such as Figure 5 As shown, a content recommendation method is provided, which is then applied to... Figure 1 Taking server 104 as an example, the following steps are included:

[0153] Step S502: Obtain multiple pieces of content to be recommended, and determine the popularity value of each piece of content to be recommended based on user interaction data of each piece of content within a preset time period.

[0154] The popularity value is used to quantify the number of preset interactive actions input for the content to be recommended.

[0155] Step S504: Sort the content to be recommended in descending order of popularity value to obtain a content sequence; divide the content sequence into intervals according to the ranking intervals corresponding to each popularity level to obtain a content set corresponding to each popularity level.

[0156] Among them, the popularity value is positively correlated with the number of model parameters of the tag generation model.

[0157] Different tag generation models process recommended content of different popularity levels, and the number of model parameters of the tag generation model is positively correlated with the corresponding popularity level.

[0158] The number of recommended content items in the content set corresponding to any popularity level is matched with the content processing capacity of the tag generation model corresponding to that popularity level; the content processing capacity includes the number of recommended content items that the tag generation model can process per unit of time.

[0159] Step S506: For any content set corresponding to a popularity level, obtain the number of target tags corresponding to the tag generation model matching that popularity level; fill the content set corresponding to the popularity level and the number of target tags into a preset prompt word template to obtain target input information; input the target input information into the tag generation model matching that popularity level to obtain the content tags corresponding to each content to be recommended.

[0160] The number of target tags includes the number of content tags that the tag generation model can output; the number of target tags is positively correlated with the number of model parameters of the tag generation model.

[0161] Step S508: For each piece of content to be recommended, if the content identifier of the content to be recommended does not exist in the content tag library, a new mapping record is added to the content tag library; if the content identifier of the content to be recommended exists in the content tag library, the content tag of the content to be recommended in the content tag library and the record time of the content to be recommended in the content tag library are updated.

[0162] The content tag library is used to record the mapping relationship between each piece of content to be recommended and each content tag.

[0163] The mapping record includes the content identifier of the content to be recommended, the content tag of the content to be recommended, and the recording time of the content to be recommended in the content tag library.

[0164] Step S510: Obtain multiple first historical interaction contents of the target user and multiple second historical interaction contents of the associated user; according to the content identifier corresponding to each first historical interaction content, query the corresponding content tag from the content tag library to obtain a first content tag set; according to the content identifier corresponding to each second historical interaction content, query the corresponding content tag from the content tag library to obtain a second content tag set.

[0165] Step S512: Obtain the weight values ​​of each content tag in the first content tag set and the second content tag set; divide the first content tag set and the second content tag set into multiple candidate content tag sets; for each candidate content tag set, accumulate the weight values ​​of each content tag in the candidate content tag set to obtain the accumulated weight value corresponding to the candidate content tag set; determine the candidate content tag set whose accumulated weight value meets the preset conditions as the target content tag set; determine the content tags in the target content tag set as the user tags of the target user.

[0166] Specifically, when a content tag belongs to the first set of content tags, the weight value is the first weight value; when a content tag belongs to the second set of content tags, the weight value is the second weight value; the first weight value is greater than the second weight value; and the content tags in the same candidate set of content tags are the same.

[0167] Step S514: Obtain content tags whose recording time is within a recent preset time period from the content tag library as candidate content tags; determine the candidate content set corresponding to the user tag based on the content to be recommended corresponding to the candidate content tags that match the user tag; determine the target content from the candidate content set and recommend the target content to the target user.

[0168] The target content refers to the content to be recommended in the content tag library whose content tags match the user tags. The user tags are determined based on the historical interaction content of the target user and / or associated users, and the associated users are users who have social relationships with the target user.

[0169] It should be noted that the specific limitations of the above steps can be found in the specific limitations of a content recommendation method described above.

[0170] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0171] Based on the same inventive concept, this application also provides a content recommendation apparatus for implementing the content recommendation method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more content recommendation apparatus embodiments provided below can be found in the limitations of the content recommendation method described above, and will not be repeated here.

[0172] In one exemplary embodiment, such as Figure 6 As shown, a content recommendation device is provided, including:

[0173] The determining module 610 is used to acquire multiple pieces of content to be recommended, and to determine the popularity value of each piece of content to be recommended based on user interaction data of each piece of content to be recommended within a preset time period; the popularity value is used to quantify the number of preset interaction operations input to the piece of content to be recommended.

[0174] The matching module 620 is used to input the content to be recommended into a tag generation model that matches the popularity value of the content to be recommended, so as to obtain the content tag corresponding to the content to be recommended; the popularity value is positively correlated with the number of model parameters of the tag generation model.

[0175] The update module 630 is used to update the content tag library according to the content tags corresponding to each of the recommended contents; the content tag library is used to record the mapping relationship between each recommended content and each content tag.

[0176] The recommendation module 640 is used to recommend target content to the target user based on the content tag library and the user tags of the target user; the target content is the content to be recommended in the content tag library whose content tags match the user tags, and the user tags are determined based on the historical interaction content of the target user and / or associated users, and the associated users are users who have social relationships with the target user.

[0177] In one embodiment, different tag generation models process content to be recommended at different popularity levels, and the number of model parameters of the tag generation model is positively correlated with the corresponding popularity level. The matching module 620 is specifically used to sort the content to be recommended in descending order of popularity value to obtain a content sequence; divide the content sequence into intervals according to the ranking intervals corresponding to each popularity level to obtain a content set corresponding to each popularity level; the number of content to be recommended contained in the content set corresponding to any popularity level is matched with the content processing capacity of the tag generation model corresponding to that popularity level; the content processing capacity includes the number of content to be recommended that the tag generation model can process per unit time; input the content set corresponding to any popularity level into the tag generation model matching that popularity level to obtain content tags corresponding to each content to be recommended.

[0178] In one embodiment, the matching module 620 is specifically used to obtain, for any content set corresponding to a popularity level, the number of target tags corresponding to the tag generation model matching that popularity level; the number of target tags includes the number of content tags that the tag generation model can output; the number of target tags is positively correlated with the number of model parameters of the tag generation model; the content set corresponding to the popularity level and the number of target tags are filled into a preset prompt word template to obtain target input information; the target input information is input into the tag generation model matching that popularity level to obtain the content tags corresponding to each of the recommended contents.

[0179] In one embodiment, the recommendation module 640 is specifically configured to: acquire multiple first historical interaction contents of the target user and multiple second historical interaction contents of the associated user; query corresponding content tags from the content tag library based on the content identifiers corresponding to each first historical interaction content to obtain a first content tag set; query corresponding content tags from the content tag library based on the content identifiers corresponding to each second historical interaction content to obtain a second content tag set; and determine the user tag of the target user based on the first content tag set and the second content tag set.

[0180] In one embodiment, the recommendation module 640 is specifically configured to obtain the weight values ​​of each content tag in the first content tag set and the second content tag set; when a content tag belongs to the first content tag set, the weight value is a first weight value; when a content tag belongs to the second content tag set, the weight value is a second weight value; the first weight value is greater than the second weight value; divide multiple candidate content tag sets from the first content tag set and the second content tag set; the content tags in the same candidate content tag set are the same; for each candidate content tag set, accumulate the weight values ​​of each content tag in the candidate content tag set to obtain the accumulated weight value corresponding to the candidate content tag set; determine the candidate content tag set whose accumulated weight value meets the preset conditions as the target content tag set; and determine the content tags in the target content tag set as the user tags of the target user.

[0181] In one embodiment, the update module 630 is specifically configured to, for each piece of content to be recommended, if the content identifier of the content to be recommended does not exist in the content tag library, add a mapping record in the content tag library; the mapping record includes the content identifier of the content to be recommended, the content tag of the content to be recommended, and the recording time of the content to be recommended in the content tag library; if the content identifier of the content to be recommended exists in the content tag library, update the content tag of the content to be recommended in the content tag library and the recording time of the content to be recommended in the content tag library.

[0182] In one embodiment, the recommendation module 640 is specifically used to obtain content tags whose recording time is within a recent preset time period from the content tag library as candidate content tags; determine the candidate content set corresponding to the user tag based on the candidate content tags that match the user tag of the target user; determine the target content from the candidate content set, and recommend the target content to the target user.

[0183] The modules in the aforementioned recommended device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0184] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores a content tag library. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a content recommendation method.

[0185] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0186] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0187] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0188] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0189] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0190] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0191] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0192] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A content recommendation method, characterized in that, The method includes: Multiple pieces of content to be recommended are acquired, and based on user interaction data of each piece of content to be recommended within a preset time period, a popularity value is determined for each piece of content to be recommended; the popularity value is used to quantify the number of preset interaction operations input to the content to be recommended. The content to be recommended is input into a tag generation model that matches the popularity value of the content to be recommended, and the content tags corresponding to the content to be recommended are obtained; the popularity value is positively correlated with the number of model parameters of the tag generation model; The content tag library is updated based on the content tags corresponding to each of the recommended contents; the content tag library is used to record the mapping relationship between each recommended content and each content tag; Based on the content tag library and the user tags of the target user, target content is recommended to the target user; the target content is the content to be recommended in the content tag library whose content tags match the user tags, and the user tags are determined based on the historical interaction content of the target user and / or associated users, and the associated users are users who have social relationships with the target user.

2. The method according to claim 1, characterized in that, Different tag generation models process content to be recommended at different popularity levels, and the number of model parameters of each tag generation model is positively correlated with the corresponding popularity level. The step of inputting the content to be recommended into a tag generation model that matches the popularity value of the content to be recommended to obtain content tags corresponding to the content to be recommended includes: The recommended content is sorted in descending order of its popularity value to obtain a content sequence. The content sequence is divided into intervals according to the ranking intervals corresponding to each of the aforementioned popularity levels, resulting in a content set corresponding to each of the aforementioned popularity levels; the number of content to be recommended contained in the content set corresponding to any of the aforementioned popularity levels matches the content processing capacity of the tag generation model corresponding to that popularity level; the content processing capacity includes the number of content to be recommended that the tag generation model can process per unit time. Input the set of content corresponding to any of the aforementioned popularity levels into the tag generation model that matches the popularity level to obtain the content tags corresponding to each of the content to be recommended.

3. The method according to claim 2, characterized in that, The step of inputting the content set corresponding to any of the popularity levels into the tag generation model that matches the popularity level to obtain the content tags corresponding to each of the content to be recommended includes: For any set of content corresponding to a given popularity level, obtain the number of target tags corresponding to the tag generation model matching that popularity level; the number of target tags includes the number of content tags that the tag generation model can output; the number of target tags is positively correlated with the number of model parameters of the tag generation model; The set of content corresponding to the popularity level and the number of target tags are filled into a preset prompt word template to obtain the target input information; The target input information is input into the tag generation model that matches the popularity level to obtain the content tags corresponding to each of the recommended contents.

4. The method according to claim 1, characterized in that, Before recommending target content to the target user based on the content tag library and the target user's user tags, the method further includes: Obtain multiple first historical interaction contents of the target user, and multiple second historical interaction contents of the associated user; Based on the content identifier corresponding to each of the first historical interaction contents, the corresponding content tags are queried from the content tag library to obtain the first content tag set; Based on the content identifier corresponding to each of the second historical interaction contents, the corresponding content tags are queried from the content tag library to obtain the second content tag set; The user tags of the target user are determined based on the first set of content tags and the second set of content tags.

5. The method according to claim 4, characterized in that, The step of determining the user tags of the target user based on the first content tag set and the second content tag set includes: Obtain the weight value of each content tag in the first content tag set and the second content tag set; when the content tag belongs to the first content tag set, the weight value is a first weight value; when the content tag belongs to the second content tag set, the weight value is a second weight value; the first weight value is greater than the second weight value. Multiple candidate content tag sets are divided from the first content tag set and the second content tag set; the content tags in the same candidate content tag set are the same; For each candidate content tag set, the weight values ​​of each content tag in the candidate content tag set are summed to obtain the summed weight value corresponding to the candidate content tag set. The set of candidate content tags whose accumulated weight values ​​meet the preset conditions is determined as the target content tag set; The content tags in the target content tag set are determined as the user tags of the target user.

6. The method according to claim 1, characterized in that, The step of updating the content tag library based on the content tags corresponding to each of the recommended contents includes: For each piece of content to be recommended, if the content identifier of the content to be recommended does not exist in the content tag library, a new mapping record is added to the content tag library; the mapping record includes the content identifier of the content to be recommended, the content tag of the content to be recommended, and the recording time of the content to be recommended in the content tag library. If the content identifier of the content to be recommended exists in the content tag library, update the content tag of the content to be recommended in the content tag library and the recording time of the content to be recommended in the content tag library.

7. The method according to claim 1, characterized in that, The step of recommending target content to the target user based on the content tag library and the target user's user tags includes: Content tags whose recording time falls within a recent preset time period are obtained from the content tag library and used as candidate content tags; Based on the content to be recommended corresponding to the candidate content tags that match the user tags of the target user, determine the set of candidate content corresponding to the user tags; The target content is determined from the candidate content set and recommended to the target user.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.