Content recommendation method, model training method and dynamic feature prediction method
By acquiring the dynamic characteristics of target accounts and using a dynamic characteristic transfer prediction model to predict the dynamic characteristics that users may transfer to, recommendation weights are determined based on the transfer probability. This solves the problem of single-interest content recommendation and achieves more accurate and richer recommendation results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XINGIN INFORMATION TECH (SHANGHAI) CO LTD
- Filing Date
- 2026-01-08
- Publication Date
- 2026-05-01
AI Technical Summary
Existing content recommendation methods suffer from the problem of recommending content with a single interest, and cannot effectively predict the shift and change of user interests.
By acquiring the dynamic characteristics of the target account's transfer, a dynamic characteristic transfer prediction model is used to predict the dynamic characteristics that the user may transfer to. Based on the transfer probability, recommendation weights are determined, and recommended content is filtered and ranked.
It improves the accuracy and richness of content recommendations, better meets users' dynamic changes in interests, and enhances the user experience.
Smart Images

Figure CN121958657A_ABST
Abstract
Description
Content recommendation methods, model training methods, and dynamic feature prediction methods Technical Field
[0001] This application relates to the field of Internet technology, and in particular to a content recommendation method, a training method for a prediction model of dynamic transfer features, a prediction method for dynamic transfer features, an apparatus, a computer device, a computer-readable storage medium, and a computer program product. Background Technology
[0002] For internet platforms, optimizing recommendation algorithms to improve the overall user experience and ultimately increase long-term user retention is a crucial task. Currently, this primarily relies on users' long-term historical behavioral data to deduce their interests and then use these deduced conclusions for content recommendations. However, this approach suffers from the problem of recommending content based on a single user interest. Summary of the Invention
[0003] Therefore, it is necessary to provide a content recommendation method, apparatus, computer device, computer-readable storage medium, and computer program product that can overcome the problem of recommending content with a single interest in the recommended content, in order to address the above-mentioned technical problems.
[0004] Firstly, this application provides a content recommendation method, including:
[0005] Obtain candidate recommendation content for the target account;
[0006] Based on at least one transfer dynamic feature of the target account, determine the target recommendation content related to the at least one transfer dynamic feature from the candidate recommendation content;
[0007] The target recommended content is sorted according to the recommendation weight corresponding to the at least one transition dynamic feature;
[0008] The sorted target recommendation content is then recommended to the target account.
[0009] The recommendation weight is determined based on the transfer probability of each dynamic feature; each dynamic feature and its corresponding transfer probability are predicted based on the static features, current dynamic features, and duration parameters of the current dynamic features of the target account.
[0010] Secondly, this application also provides a method for training a prediction model of transitional dynamic features, including:
[0011] Obtain dynamic feature transfer samples; the dynamic feature transfer samples include: static features of the sample account, duration parameters of the preceding dynamic features of the sample account, and dynamic feature transfer pairs constructed based on the preceding dynamic features, wherein the dynamic feature transfer pairs consist of the preceding dynamic features and the transferred dynamic features;
[0012] The dynamic feature transfer samples are input into the dynamic feature transfer prediction model to be trained. The dynamic feature transfer prediction model predicts the transfer dynamic features in at least one dynamic feature transfer pair to obtain the dynamic feature transfer prediction result.
[0013] Based on the dynamic feature transfer prediction results and the dynamic feature transfer model loss calculated in at least one dynamic feature transfer pair, the model parameters of the dynamic feature transfer prediction model are updated based on the model loss until a preset training cutoff condition is reached.
[0014] Thirdly, this application also provides a method for predicting dynamic features of a transfer, which obtains the static features of a target account, the current dynamic features, and the duration parameter of the current dynamic features;
[0015] The static features, the current dynamic features, and the duration parameter are input into a pre-trained dynamic feature transfer prediction model. The dynamic feature transfer prediction model performs feature transfer prediction and outputs at least one transfer dynamic feature and its corresponding transfer probability.
[0016] Fourthly, this application also provides a content recommendation device, comprising:
[0017] The acquisition module is used to acquire candidate recommendation content for the target account;
[0018] A determination module is used to determine target recommended content related to at least one transfer dynamic feature from the candidate recommended content based on at least one transfer dynamic feature of the target account.
[0019] The sorting module is used to sort the target recommendation content according to the recommendation weight corresponding to the at least one transition dynamic feature;
[0020] The recommendation module is used to recommend the sorted target content to the target account;
[0021] The recommendation weight is determined based on the transfer probability of each dynamic feature; each dynamic feature and its corresponding transfer probability are predicted based on the static features, current dynamic features, and duration parameters of the current dynamic features of the target account.
[0022] Fifthly, this application also provides a training device for a dynamic feature transfer prediction model, comprising:
[0023] The acquisition module is used to acquire dynamic feature transfer samples; the dynamic feature transfer samples include: static features of the sample account, duration parameters of the preceding dynamic features of the sample account, and dynamic feature transfer pairs constructed based on the preceding dynamic features, wherein the dynamic feature transfer pairs consist of the preceding dynamic features and the transferred dynamic features;
[0024] The prediction module is used to input the dynamic feature transfer samples into the dynamic feature transfer prediction model to be trained, and the dynamic feature transfer prediction model predicts the transfer dynamic features in at least one dynamic feature transfer pair to obtain the dynamic feature transfer prediction result.
[0025] The parameter tuning module is used to calculate the model loss based on the dynamic feature transfer prediction result and the dynamic features transferred in at least one dynamic feature transfer pair, and to update the model parameters of the dynamic feature transfer prediction model based on the model loss until a preset training cutoff condition is reached.
[0026] Sixthly, this application also provides a dynamic feature prediction device, comprising:
[0027] The acquisition module is used to acquire the static characteristics, current dynamic characteristics, and duration parameters of the current dynamic characteristics of the target account;
[0028] The prediction module is used to input the static features, the current dynamic features, and the duration parameters into a pre-trained dynamic feature transfer prediction model, and the dynamic feature transfer prediction model performs feature transfer prediction and outputs at least one transfer dynamic feature and the corresponding transfer probability.
[0029] In a seventh aspect, 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 methods provided in the first, second, or third aspects.
[0030] Eighthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the methods provided in the first, second, or third aspects.
[0031] Ninthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the methods provided in the first, second, or third aspects.
[0032] The aforementioned content recommendation method, training method for a prediction model of transfer dynamic features, prediction method for transfer dynamic features, apparatus, computer equipment, computer-readable storage medium, and computer program product acquire candidate recommendation content for a target account; based on at least one transfer dynamic feature of the target account, target recommendation content related to the at least one transfer dynamic feature is determined from the candidate recommendation content; each transfer dynamic feature and its corresponding transfer probability are predicted based on the static features of the target account, the current dynamic features, and the duration parameter of the current dynamic features. This processing method can filter out candidate recommendation content that matches the dynamic features to which the target account may transfer. The target recommendation content is sorted according to the recommendation weight corresponding to the at least one transfer dynamic feature; the recommendation weight is determined based on the transfer probability of each transfer dynamic feature. The transfer probability corresponding to the transfer dynamic feature represents the likelihood of the target account transferring to the corresponding dynamic feature. The higher the transfer probability, the greater the likelihood of the target account transferring to the corresponding dynamic feature. By converting the transfer probability corresponding to each transfer dynamic feature into a recommendation weight, and using this recommendation weight as the basis for sorting the selected target recommendation content, it is possible to prioritize the target recommendation content that matches the dynamic feature to which the target account is most likely to transfer. This makes the sorted target recommendation content more in line with user expectations and improves the accuracy and richness of content recommendations. Attached Figure Description
[0033] 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.
[0034] Figure 1 is an application environment diagram of the content recommendation method in one embodiment;
[0035] Figure 2 is a flowchart illustrating a content recommendation method in one embodiment;
[0036] Figure 3 is a flowchart of interest transfer prediction during the inference stage in one embodiment;
[0037] Figure 4 is a flowchart illustrating the training method of a prediction model for transferring dynamic features in one embodiment.
[0038] Figure 5 is a flowchart of sample construction in one embodiment;
[0039] Figure 6 is a schematic diagram of the embedding process in one embodiment;
[0040] Figure 7 is a schematic diagram of adding position coding in one embodiment;
[0041] Figure 8 is a schematic diagram of mask processing in one embodiment;
[0042] Figure 9 is a schematic diagram of interest shift prediction in one embodiment;
[0043] Figure 10 is a flowchart illustrating a method for predicting dynamic features of a transition in one embodiment;
[0044] Figure 11 is a flowchart of interest transfer prediction during the inference stage in one embodiment;
[0045] Figure 12 is a flowchart of interest transfer prediction during the inference stage in one embodiment;
[0046] Figure 13 is an internal structure diagram of a computer device in one embodiment. Detailed Implementation
[0047] 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.
[0048] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0049] The content recommendation method provided in this application embodiment can be applied to the application environment shown in Figure 1. 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 on server 104 or placed on a cloud or other network server. During the content recommendation process for a target account, server 104 obtains candidate recommendation content for the target account; determines target recommendation content related to at least one transfer dynamic feature from the candidate recommendation content based on at least one transfer dynamic feature of the target account; sorts the target recommendation content according to the recommendation weight corresponding to the at least one transfer dynamic feature; and recommends the sorted target recommendation content to the target account. The recommendation weight is determined based on the transfer probability of each transfer dynamic feature; each transfer dynamic feature and its corresponding transfer probability are predicted based on the static features, current dynamic features, and duration parameters of the current dynamic features of the target account. The sorted target recommendation content better meets user expectations, improving the accuracy of content recommendation. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, and projection equipment. 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. 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.
[0050] In an exemplary embodiment, as shown in FIG2, a content recommendation method is provided. Taking the application of this method to the server in FIG1 as an example, the method includes the following steps 202 to 208. Wherein:
[0051] Step 202: Obtain candidate recommended content for the target account.
[0052] Optionally, the target account can be any account that triggered the content recommendation.
[0053] Optionally, one way to trigger content recommendations is to trigger the opening of the content recommendation page.
[0054] Optionally, the content recommendation page can be any page used to display recommended content. For example, the content recommendation page can be the homepage, the e-commerce page, etc.
[0055] Specifically, when the terminal's currently logged-in account triggers the opening of the content recommendation page, the terminal sends a content recommendation request to the server. This content recommendation request may include the current logged-in account. After receiving the content recommendation request, the server uses the current logged-in account as the account that triggered the content recommendation, i.e., the target account, and further executes steps 202-208 in this embodiment of the application.
[0056] Optionally, the candidate recommended content for the target account consists of content that the target account may be interested in, filtered according to certain rules. There may be one or more candidate recommended content items; this embodiment of the application does not limit the number.
[0057] Optionally, the server can retrieve candidate recommended content for the target account from the dynamic content pool. The dynamic content pool is used to store content published by any account in real time; that is, once any account publishes a piece of content, that content will be stored in the dynamic content pool in real time.
[0058] Optionally, the server can obtain the matching degree between each published content in the dynamic content pool and the target account, and use the published content that meets the preset matching conditions as the candidate recommended content for the target account.
[0059] In one possible implementation, the server can input the account information of each published content and the target account from the dynamic content pool into the content recommendation model, and the content recommendation model can output the matching degree between each published content and the target account.
[0060] In one possible implementation, the server can extract content features of each published content in the dynamic content pool and extract account features of the target account. For each published content, the content features of the published content and the account features of the target account are input into a target recommendation model, which then outputs the matching degree between the published content and the target account. This method can be used to obtain the matching degree between each published content in the dynamic content pool and the target account. For example, the content features of the published content may include the author, category, etc., and the account features of the target account may include gender, age, historical interaction data, etc., but this embodiment does not limit these features.
[0061] Optionally, candidate recommendations can be sorted in descending order of their match with the target account.
[0062] Step 204: Based on at least one transfer dynamic feature of the target account, determine the target recommended content that is related to at least one transfer dynamic feature from the candidate recommended content.
[0063] Optionally, the target account can have static and dynamic characteristics. Static characteristics refer to those that do not change, such as age, gender, historical preferences, and demographic attributes. Dynamic characteristics refer to those that change, such as interests.
[0064] Optionally, the target account transfer dynamic characteristics refer to the predicted dynamic characteristics that the target account may transfer to.
[0065] Optionally, at least one transfer dynamic feature of the target account can be predicted based on the target account's static features, current dynamic features, and duration parameters of the current dynamic features.
[0066] Optionally, the current dynamic characteristics of the target account refer to the dynamic characteristics of the target account within a preset time period.
[0067] Optionally, the server maintains a corresponding dynamic feature list for each account. Every preset time interval, based on the account's interactions with published content within that preset time interval, such as clicks, views exceeding the preset time, likes, favorites, and comments, new dynamic features that meet the criteria will be added to the dynamic feature list. For example, the preset time interval could be 1 day.
[0068] Optionally, the dynamic feature list can be updated using a first-in, first-out (FIFO) rule. When adding a dynamic feature to the dynamic feature list, if the list is already full, the first dynamic feature added to the list can be deleted.
[0069] Optionally, the current dynamic characteristics of the target account are the dynamic characteristics included in the dynamic characteristic list of the target account within a preset time period. For example, the preset time period can be today.
[0070] Optionally, the duration parameter of the current dynamic feature refers to the time identifier of the aforementioned preset time period. The time identifier can be a date. For example, if the preset time period is today, the duration parameter is today's date.
[0071] Optionally, the static features, current dynamic features, and duration parameters of the current dynamic features of the target account can be input into a pre-trained dynamic feature transfer prediction model, which will then perform dynamic feature transfer prediction and output at least one transfer dynamic feature of the target account.
[0072] For example, the dynamic feature is interest. The server maintains a corresponding interest list for each account. Every preset time interval, such as midnight each day, based on the account's interaction with published content over the past day, it determines whether the account has developed new interests. If so, the new interest is added to the account's interest list. Thus, the account's interest list may be updated daily. The static features of the target account, the interests included in the target account's interest list for today, and today's date can be input into a pre-trained dynamic feature transfer prediction model. The dynamic feature transfer prediction model then performs interest transfer prediction and outputs at least one transferable interest of the target account and its corresponding transfer probability.
[0073] For example, at preset intervals, such as midnight each day, all content viewed by the account in the past day can be retrieved, and the category (e.g., third-level category) to which each piece of content belongs can be counted. For each category, further interaction behavior data related to that category in the past day can be retrieved. Interaction behavior data includes, for example, the number of clicks and the number of purchases. Purchase behaviors include, for example, liking, commenting, saving, and watching for more than a preset time. If the interaction behavior data meets preset conditions, the corresponding category is added as a new interest for the account and added to the account's interest list. For example, if content in a certain category has 2a or more clicks and a or more purchases in the past day, then that category can be added as a new interest for the account.
[0074] Optionally, candidate recommended content can be matched with each transition dynamic feature. If a match is successful with any transition dynamic feature, the candidate recommended content can be used as the target recommended content.
[0075] Optionally, content features can be extracted from the candidate recommended content to obtain the content features of the candidate recommended content. The content features of the candidate recommended content can be matched with each transition dynamic feature. If a match is successful with any transition dynamic feature, the candidate recommended content can be used as the target recommended content.
[0076] Alternatively, the category to which the candidate recommended content belongs can be obtained, and the category can be matched with each dynamic feature of the transition. If a match is successful with any dynamic feature of the transition, the candidate recommended content can be used as the target recommended content.
[0077] Optionally, the category to which the candidate recommended content belongs can be a first-level category, a second-level category, or a third-level category; this embodiment of the application does not limit this.
[0078] In one possible implementation, the category to which the candidate recommended content belongs can be compared with each dynamic feature of the transition. If the candidate recommended content matches any dynamic feature of the transition, it is determined that the category to which the candidate recommended content belongs and the dynamic feature of the transition are successfully matched, and the candidate recommended content is used as the target recommended content.
[0079] For example, the dynamic feature is interest. As mentioned above, interest is a category that meets certain conditions. The category to which the candidate recommended content belongs can be compared with the transfer interest. If it matches any transfer interest, the candidate recommended content is taken as the target recommended content.
[0080] In one possible implementation, the feature vector of the category to which the candidate recommended content belongs (referred to as the first feature vector for convenience) can be extracted, and the feature vector of each transition dynamic feature (referred to as the second feature vector for convenience) can be extracted. The similarity between the first feature vector and each second feature vector is calculated. If the similarity between the first feature vector and any second feature vector is greater than a preset threshold, it is determined that the category to which the candidate recommended content belongs and the corresponding transition dynamic feature are successfully matched, and the candidate recommended content is used as the target recommended content.
[0081] In one possible implementation, the category to which the candidate recommended content belongs and each dynamic feature of the transition can be input into a pre-trained matching model. The matching model outputs the matching degree between the category to which the candidate recommended content belongs and each dynamic feature of the transition. If the matching degree between the category to which the candidate recommended content belongs and any dynamic feature of the transition is greater than a preset threshold, it is determined that the category to which the candidate recommended content belongs and the dynamic feature of the transition are successfully matched, and the candidate recommended content is used as the target recommended content.
[0082] Step 206: Sort the target recommended content according to the recommendation weight corresponding to at least one transition dynamic feature.
[0083] Optionally, based on the static features, current dynamic features, and duration parameters of the current dynamic features of the target account, it is possible not only to predict at least one transfer dynamic feature of the target account, but also to obtain the transfer probability corresponding to each transfer dynamic feature.
[0084] Optionally, the static features, current dynamic features, and duration parameters of the current dynamic features of the target account can be input into a pre-trained dynamic feature transfer prediction model. The dynamic feature transfer prediction model will then perform dynamic feature transfer prediction and output at least one transfer dynamic feature of the target account and the transfer probability corresponding to each transfer dynamic feature.
[0085] Optionally, after obtaining at least one transfer dynamic feature of the target account and the transfer probability corresponding to each transfer dynamic feature, the transfer probability can be mapped to the recommendation weight, thereby obtaining the recommendation weight corresponding to each of the at least one transfer dynamic feature.
[0086] Optionally, a mapping relationship between transition probabilities and recommendation weights can be pre-built. After obtaining the transition probabilities corresponding to at least one transition dynamic feature, the recommendation weights mapped to each transition probability can be determined through this mapping relationship.
[0087] In one possible implementation, the mapping relationship between transition probabilities and recommendation weights is represented using a mapping table. After obtaining the transition probabilities corresponding to at least one transition dynamic feature, the recommendation weights mapped to each transition probability can be found in the mapping table.
[0088] In one possible implementation, the mapping relationship between transition probabilities and recommendation weights is represented by a weight mapping function. After obtaining the transition probabilities corresponding to at least one transition dynamic feature, the recommendation weights can be mapped to each transition probability through this weight mapping function.
[0089] In one possible implementation, the mapping relationship between transition probabilities and recommendation weights is represented using a mapping model. After obtaining the transition probabilities corresponding to at least one transition dynamic feature, each transition probability can be input into the mapping model, and the mapping model outputs the recommendation weights mapped to each transition probability.
[0090] Optionally, as mentioned in step 204 above, candidate recommended content can be matched with each transition dynamic feature to filter out target recommended content. For each target recommended content, the transition dynamic feature that successfully matches the target recommended content can be obtained, and the recommendation weight of the transition dynamic feature can be used as the recommendation weight of the target recommended content.
[0091] In some possible implementations, the target recommended content obtained in step 204 above is unsorted. After obtaining the recommendation weight of each target recommended content, all target recommended content can be sorted in descending order of recommendation weight.
[0092] In some possible implementations, as described above, after obtaining the candidate recommended content, it can be sorted in descending order of its matching degree with the target account. After determining the target recommended content in step 204, the target recommended content is retained from the sorted candidate recommended content, while other recommended content is deleted. In this case, the remaining target recommended content also has an order, and can be ranked and improved according to the recommendation weight of each target recommended content. Optionally, the recommendation weight of the target recommended content can be mapped to a ranking improvement percentage, and for each target recommended content, its ranking can be improved according to this ranking improvement percentage. This comprehensively considers the matching degree between the recommended content and the target account, as well as the prediction results of the target account's dynamic characteristics, making the ranking result more in line with user expectations.
[0093] Step 208: Recommend the sorted target content to the target account.
[0094] Optionally, the server can return the sorted target recommendations to the terminal, and the terminal can display the target recommendations in the sorted order for the user to view.
[0095] Optionally, corresponding to the scheme in step 202 that triggers the opening of the content recommendation page, the terminal displays each target recommended content in sorted order on the content recommendation page.
[0096] Optionally, the content recommendation page can display each target recommended content in a single column or in two columns. This application embodiment does not limit the display layout of the recommended content on the content recommendation page.
[0097] The recommendation weights are determined based on the transfer probabilities of each dynamic feature; each dynamic feature and its corresponding transfer probability are predicted based on the target account's static features, current dynamic features, and the duration of the current dynamic features. For details, please refer to the above text, which will not be repeated here.
[0098] In one possible scenario, the dynamic feature is interest. The implementation process of the content recommendation method provided in this application embodiment in this scenario is described below:
[0099] When the currently logged-in account on the terminal triggers the opening of the content recommendation page, the terminal sends a content recommendation request to the server. This request may include the currently logged-in account. Upon receiving the request, the server designates the currently logged-in account as the account that triggered the content recommendation, i.e., the target account. The server retrieves candidate recommendation content for the target account. The server can input the static features of the target account, the interests included in the target account's today's interest list, and today's date into a pre-trained dynamic feature transfer prediction model. The dynamic feature transfer prediction model performs interest transfer prediction and outputs at least one transfer interest for the target account and its corresponding transfer probability. The server can compare the category to which the candidate recommendation content belongs with the transfer interest. If it matches any transfer interest, the candidate recommendation content is selected as the target recommendation content. The server can map the transfer probabilities corresponding to each transfer interest to recommendation weights. For each target recommendation content, transfer interests that match the category to which the target recommendation content belongs can be retrieved, and the recommendation weight of the transfer interest is used as the recommendation weight of the target recommendation content. All target recommendation content is sorted in descending order of recommendation weight. The sorted target recommendation content is then recommended to the target account.
[0100] In the above embodiments, candidate recommended content for the target account is obtained; based on at least one transfer dynamic feature of the target account, target recommended content related to the at least one transfer dynamic feature is determined from the candidate recommended content; each transfer dynamic feature and its corresponding transfer probability are predicted based on the static features, current dynamic features, and duration parameters of the current dynamic feature of the target account. This processing method can filter out candidate recommended content that matches the dynamic features to which the target account may transfer. The target recommended content is sorted according to the recommendation weight corresponding to the at least one transfer dynamic feature; the recommendation weight is determined based on the transfer probability of each transfer dynamic feature. The transfer probability corresponding to the transfer dynamic feature represents the likelihood of the target account transferring to the corresponding dynamic feature. The higher the transfer probability, the greater the likelihood of the target account transferring to the corresponding dynamic feature. By converting the transfer probability corresponding to each transfer dynamic feature into a recommendation weight, and using this recommendation weight as the basis when sorting the selected target recommended content, it is possible to prioritize the target recommended content that matches the dynamic feature to which the target account is most likely to transfer, making the sorted target recommended content more in line with user expectations and improving the accuracy and richness of content recommendations.
[0101] In some embodiments, determining target recommended content related to at least one transfer dynamic feature from candidate recommended content based on at least one transfer dynamic feature of the target account includes:
[0102] The candidate recommended content is matched with each of the transition dynamic features. If a match is successful with any transition dynamic feature, the candidate recommended content is used as the target recommended content.
[0103] Optionally, the category to which the candidate recommended content belongs refers to a first-level category, a second-level category, or a third-level category; this embodiment of the application does not limit this.
[0104] Optionally, dynamic features can be characteristics of the target account that may change over time, such as interests and content preferences.
[0105] In one possible implementation, the dynamic feature is interest, which refers to categories that meet certain conditions. For a detailed explanation of interest, please refer to the above description. The category to which the candidate recommended content belongs can be compared with each dynamic feature of the transfer. If it matches any of the dynamic features of the transfer, it is determined that the candidate recommended content is consistent with the predicted dynamic features of the target account, and then the candidate recommended content is used as the target recommended content.
[0106] In one possible implementation, the dynamic feature is interest, which refers to categories that meet certain conditions. For a detailed explanation of interest, please refer to the above description. Feature vectors of the categories to which candidate recommended content belongs (referred to as the first feature vector for convenience) and feature vectors of each transition dynamic feature (referred to as the second feature vector for convenience) can be extracted. The similarity between the first feature vector and each second feature vector is calculated. This similarity represents the degree of proximity between the category to which the candidate recommended content belongs and the transition dynamic feature. For example, the cosine similarity between the first feature vector and each second feature vector can be calculated. If the similarity between the first feature vector and any second feature vector is greater than a preset threshold, it is determined that the candidate recommended content matches the predicted transition dynamic feature of the target account, and the candidate recommended content is then used as the target recommended content.
[0107] In one possible implementation, the dynamic feature is interest, which refers to categories that meet certain conditions (see above for a detailed explanation of interest). The category to which the candidate recommended content belongs and each dynamic feature are input into a pre-trained matching model. This model outputs the similarity between the category to which the candidate recommended content belongs and each dynamic feature. If the similarity between the category to which the candidate recommended content belongs and any dynamic feature is greater than a preset threshold, it is determined that the candidate recommended content matches the predicted dynamic features of the target account, and the candidate recommended content is then used as the target recommended content.
[0108] In the above embodiments, the category to which the candidate recommended content belongs is matched with each transfer dynamic feature. If a match is successful with any transfer dynamic feature, the candidate recommended content is used as the target recommended content. This processing method can filter out candidate recommended content that matches the dynamic features that the target account may transfer to, achieving accurate prediction of content that users are interested in.
[0109] In some embodiments, the recommendation weight is determined based on the transition probability of the corresponding transition dynamic feature and the pre-built mapping relationship between the transition probability and the recommendation weight.
[0110] Optionally, a mapping relationship between transition probabilities and recommendation weights can be pre-constructed. This mapping relationship can be represented using a mapping table, a weight mapping function, or a mapping model; the embodiments of this application do not impose any limitations. After obtaining the transition probabilities corresponding to at least one transition dynamic feature, the recommendation weights mapped to each transition probability can be determined through this mapping relationship.
[0111] Specifically, the mapping relationship between transition probabilities and recommendation weights is represented by a mapping table. After obtaining the transition probabilities corresponding to at least one transition dynamic feature, the recommendation weights mapped to each transition probability can be found in the mapping table.
[0112] Alternatively, the mapping relationship between transition probabilities and recommendation weights can be represented using a weight mapping function. After obtaining the transition probabilities corresponding to at least one transition dynamic feature, the recommendation weights can be mapped to each transition probability through this weight mapping function.
[0113] Alternatively, the mapping relationship between transition probabilities and recommendation weights can be represented using a mapping model. After obtaining the transition probabilities corresponding to at least one transition dynamic feature, each transition probability can be input into the mapping model, and the mapping model can output the recommendation weights mapped to each transition probability.
[0114] In the above embodiments, the recommendation weight is determined based on the transfer probability of the corresponding dynamic feature and the pre-built mapping relationship between the transfer probability and the recommendation weight. When sorting the selected target recommendation content, the recommendation weight is used as the basis, which can make the target recommendation content that matches the dynamic feature that the target account is most likely to transfer to be ranked first, thereby improving the accuracy of content recommendation.
[0115] In some embodiments, the mapping relationship is represented by a weighted mapping function, which is a piecewise function divided according to the range of transition probabilities; the recommendation weight is obtained by substituting the transition probability of the corresponding transition dynamic feature into the piecewise function corresponding to the range of transition probabilities.
[0116] Optionally, multiple transition probability ranges can be divided according to actual needs, and a piecewise function can be constructed for each transition probability range. Each transition probability range and the corresponding piecewise function constitute a weight mapping function.
[0117] Optionally, the independent variable for each piecewise function is the transition probability, and the dependent variable is the recommendation weight.
[0118] Optionally, for any dynamic feature, the range of transition probabilities into which the transition probability corresponding to the dynamic feature falls can be determined, and the transition probability can be substituted into the piecewise function corresponding to the range of transition probabilities to obtain the recommendation weight corresponding to the dynamic feature.
[0119] For example, the following weight mapping function can be pre-constructed:
[0120]
[0121] Where p is the transition probability. The weight is set as the recommendation weight. This weight mapping function includes two piecewise functions: one with a transition probability range of (0.5, 0.75], and the other with a transition probability range of (0.75, 1). After obtaining the transition probabilities for each dynamic feature, for each feature, its transition probability is compared with the two ranges. If it falls within the range of (0.5, 0.75), the transition probability is used in the first piecewise function to obtain the recommendation weight. If it falls within the range of (0.75, 1), the transition probability is used in the second piecewise function to obtain the recommendation weight. This weight mapping function ensures that when the transition probability is greater than 0.75, a recommendation weight significantly greater than 1 is output; when the transition probability is between 0.5 and 0.75, a moderate recommendation weight significantly greater than 1 is output. This achieves differentiated weight mapping for different transition probability ranges, effectively responding to the dynamic feature transition trend.
[0122] In the above embodiments, the mapping relationship is represented by a weighted mapping function, which is a piecewise function divided according to the range of transition probabilities. The recommendation weight is obtained by substituting the transition probability of the corresponding dynamic feature into the piecewise function corresponding to its respective transition probability range. When sorting the selected target recommendation content, this recommendation weight is used as the basis to prioritize target recommendation content that matches the dynamic features that the target account is most likely to transfer to, thereby improving the accuracy of content recommendation.
[0123] In some embodiments, each transfer dynamic feature and its corresponding transfer probability are predicted and output by inputting the static features of the target account, the current dynamic features, and the duration parameters of the current dynamic features into a pre-trained dynamic feature transfer prediction model.
[0124] Optionally, a dynamic feature transfer prediction model can be pre-trained, which can accurately predict the transfer of dynamic features and output the transferred dynamic features and the corresponding transfer probabilities.
[0125] Optionally, the static features, current dynamic features, and duration parameters of the current dynamic features of the target account can be input into a pre-trained dynamic feature transfer prediction model. The dynamic feature transfer prediction model will then perform dynamic feature transfer prediction and output at least one transfer dynamic feature of the target account and the transfer probability corresponding to each transfer dynamic feature.
[0126] For example, if the dynamic feature is interest, the static features of the target account, the interests included in the target account's interest list for today, and today's date can be input into a pre-trained dynamic feature transfer prediction model. The dynamic feature transfer prediction model will then predict the interest transfer and output at least one transferable interest of the target account and its corresponding transfer probability. For details, please refer to the previous text, which will not be repeated here.
[0127] In the above embodiments, each transition dynamic feature and its corresponding transition probability are obtained by inputting the static features of the target account, the current dynamic features, and the duration parameters of the current dynamic features into a pre-trained dynamic feature transition prediction model, which then predicts and outputs the results. The transition dynamic features can serve as the basis for filtering target recommended content from candidate recommended content, and the transition probability can be mapped to recommendation weights for ranking the target recommended content. This makes the ranked target recommended content more in line with user expectations, improving the accuracy of content recommendations.
[0128] For example, the dynamic feature is interest. See Figure 3, taking a scenario where the content recommendation page is the homepage and the homepage displays recommended content in two columns. In this scenario, the recommendation system achieves personalized recommendations by accurately learning the matching degree between the account and the published content. User interests are extremely important user information, directly determining the core connection between the recommended content and the user's real needs. Different users have different interests, and these interests are not static but evolve naturally over time. For example, a user may naturally transition from one interest to another closely related interest, forming a continuous "interest chain." Currently, most solutions still focus on "mining" users' static interests from historical behavior. Furthermore, when utilizing interest information, it is often treated as an isolated label and directly given to the recommendation system. This prevents the recommendation system from predicting the next surge in user demand from the continuous perspective of "interest transfer," thus limiting the forward-looking nature of recommended content and the smoothness of user exploration. This application proposes, based on the user's current interests, to predict the Top N interests that the user's current interests are most likely to transfer to in the future, and the corresponding transfer probabilities. Specifically, referring to Figure 3 as an example, during the online recommendation process, when a user enters the homepage, the recommendation system on the server acquires real-time samples. These real-time samples include: the static features of the currently logged-in account, today's date, and the current account's interests for today (current interests). These real-time samples are input into a pre-trained dynamic feature transfer prediction model. The model outputs the top K transfer interests with the highest transfer probabilities, along with their respective transfer probabilities. The transfer probability corresponding to each transfer interest is then input into a weight mapping function to obtain the recommendation weight for each transfer interest. Alternatively, real-time samples can be input into an online model. The online model is used to filter highly relevant and high-quality content through dynamic content pool construction, multi-source recall, and multi-level ranking. It should be noted that the information contained in the real-time samples input into the dynamic feature transfer prediction model and the information contained in the real-time samples input into the online model may be different, the same, or overlap, depending on the samples used in the training phases of the two models. Then, candidate recommended content with a click-through rate greater than the average click-through rate is further filtered from the content selected by the online model. Then, target recommended content related to the transfer interest output by the dynamic feature transfer prediction model is selected from the candidate recommended content. The target recommended content is ranked based on the recommendation weight, and the ranked target recommended content is recommended to the currently logged-in account.
[0129] In some embodiments, as shown in FIG4, a method for training a prediction model for transferring dynamic features is provided. This method can be applied to the server in FIG1 and includes steps 402 to 406. Wherein:
[0130] Step 402: Obtain dynamic feature transfer samples; dynamic feature transfer samples include: static features of the sample account, duration parameters of the preceding dynamic features of the sample account, and dynamic feature transfer pairs constructed based on the preceding dynamic features. The dynamic feature transfer pairs consist of preceding dynamic features and transfer dynamic features.
[0131] Optionally, any account can be used as a sample account.
[0132] Optionally, static features of sample accounts refer to features that do not change, such as age, gender, historical preferences, demographic attributes, etc.
[0133] Optionally, the preceding dynamic features of the sample account can be the dynamic features of the sample account in the first historical time period.
[0134] As described above, the server maintains a dynamic feature list for each account. Every preset time interval, based on the account's interactions with published content within that preset time interval—such as clicks, views exceeding the preset time, likes, favorites, and comments—new dynamic features that meet the criteria are added to the dynamic feature list. Therefore, an account's dynamic feature list may be updated every preset time interval. For example, the preset time interval could be one day, meaning the dynamic feature list could be updated at midnight every day.
[0135] Optionally, the first time period can be a specific day in history. The preceding dynamic features of the sample account can be dynamic features from the dynamic feature list of the sample account for that day.
[0136] Optionally, the duration parameter of the preceding dynamic feature refers to the time identifier of the first time period. The time identifier can be a date.
[0137] Optionally, the dynamic characteristics of the sample account in a second historical time period can be obtained. The second time period can also be a specific day in history, with the first time period preceding the second time period. For example, the first and second time periods can be two consecutive days. For ease of distinction, the dynamic characteristics of the sample account in the second historical time period are referred to as target dynamic characteristics or transitional dynamic characteristics. Dynamic feature transition pairs can be constructed based on the preceding dynamic characteristics and transitional dynamic characteristics of the sample account.
[0138] Optionally, the static features of the sample account, the duration parameter of the preceding dynamic features of the sample account, and the dynamic feature transfer pairs constructed in the above manner constitute a dynamic feature transfer sample for training the dynamic feature transfer prediction model.
[0139] For example, the dynamic feature is interest. The server maintains a corresponding interest list for each account. The updating of the interest list is described above and will not be repeated here. Interests from the sample account's historical interest list on a specific day (e.g., January 1, 2025) can be obtained as preceding interests. Interests from the sample account's interest list on the following day (e.g., January 2, 2025) can be obtained as transferring interests. Interest transfer pairs are constructed based on preceding and transferring interests. The static features of the sample account, the duration parameter of the preceding interest (i.e., January 1, 2025), and the interest transfer pairs constitute an interest transfer sample.
[0140] Step 404: Input the dynamic feature transfer samples into the dynamic feature transfer prediction model to be trained. The dynamic feature transfer prediction model predicts the transfer dynamic features in at least one dynamic feature transfer pair to obtain the dynamic feature transfer prediction result.
[0141] Optionally, the structure of the dynamic feature transfer prediction model can be set according to actual needs.
[0142] For example, a dynamic feature transfer prediction model may include one or more of the following: a model input layer, a structured masking layer, an encoding layer, a mask location extraction layer, and an interest prediction layer.
[0143] Optionally, after inputting the dynamic feature transfer samples into the dynamic feature transfer prediction model to be trained, the dynamic feature transfer prediction model predicts the transfer dynamic features in some dynamic feature transfer pairs in the dynamic feature transfer samples, and can obtain the prediction results of the transfer dynamic features in these dynamic feature transfer pairs, that is, the dynamic feature transfer prediction results.
[0144] Step 406: Calculate the model loss based on the dynamic feature transfer prediction results and the dynamic features transferred in at least one dynamic feature transfer pair. Update the model parameters of the dynamic feature transfer prediction model based on the model loss until the preset training cutoff condition is reached.
[0145] Optionally, cross-entropy loss can be calculated as the model loss based on the dynamic feature transfer prediction results and the original dynamic features in the dynamic feature transfer pair. The model parameters of the dynamic feature transfer prediction model are then updated based on the model loss, and training continues until a preset training cutoff condition is reached.
[0146] In the above embodiments, dynamic feature transfer samples are obtained. These samples include: static features of the sample account, duration parameters of the sample account's preceding dynamic features, and dynamic feature transfer pairs constructed based on the preceding dynamic features. Each dynamic feature transfer pair consists of preceding dynamic features and transition dynamic features. The dynamic feature transfer samples are input into the dynamic feature transfer prediction model to be trained. The model predicts the transition dynamic features in at least one dynamic feature transfer pair to obtain a dynamic feature transfer prediction result. The model loss is calculated based on the dynamic feature transfer prediction result and the transition dynamic features in at least one dynamic feature transfer pair. The model parameters of the dynamic feature transfer prediction model are updated based on the model loss until a preset training cutoff condition is reached. The trained dynamic feature transfer prediction model can be used to predict the transfer of dynamic features of an account. The prediction results can be applied to content recommendation, accurately capturing the natural evolution path of dynamic features. This provides users with a content experience that better suits their dynamic feature evolution needs.
[0147] In some embodiments, obtaining dynamic feature transfer samples includes:
[0148] Obtain the preceding dynamic feature list of the sample account in the first historical time period, and obtain the target dynamic feature list of the sample account in the second historical time period, where the first time period is before the second time period; compare the preceding dynamic feature list and the target dynamic feature list to obtain at least one new dynamic feature in the target dynamic feature list relative to the preceding dynamic feature list; construct a dynamic feature transfer pair based on the preceding dynamic feature list and at least one new dynamic feature; obtain a dynamic feature transfer sample consisting of at least the static features of the sample account, the first time period, and the dynamic feature transfer pair.
[0149] Optionally, any account can be used as a sample account.
[0150] Optionally, both the first and second time periods can be historical dates. The first time period can also be the day before the second time period. For example, the first time period could be October 10, 2024, and the second time period could be October 11, 2024.
[0151] As described above, the server maintains a corresponding dynamic feature list for each account. The dynamic feature list of a sample account within the first historical time period can be obtained as the preceding dynamic feature list. The dynamic feature list of the sample account within the second historical time period can be obtained as the target dynamic feature list.
[0152] Optionally, after obtaining the preceding dynamic feature list and the target dynamic feature list, the preceding dynamic feature list and the target dynamic feature list are compared, and the dynamic features that do not appear in the preceding dynamic feature list among all the dynamic features contained in the target dynamic feature list are identified as new dynamic features. By searching, at least one new dynamic feature can be obtained.
[0153] Optionally, a dynamic feature can be selected from the preceding dynamic feature list each time, and then m new dynamic features can be selected from at least one new dynamic feature according to the association strength with that dynamic feature. Each new dynamic feature and the selected dynamic feature form a dynamic feature transition pair, resulting in a total of m dynamic feature transition pairs. When there are n dynamic features in the preceding dynamic feature list, a total of n*m dynamic feature transition pairs can be formed.
[0154] Optionally, static features of the sample account can be obtained, such as age, gender, historical preferences, and demographic attributes. These static features, the time markers of the first time period mentioned above, and the constructed dynamic feature transfer pairs constitute a dynamic feature transfer sample. This dynamic feature transfer sample aims to enable the model to accurately learn and predict personalized patterns in the dynamic feature evolution of an account from continuous daily behavior.
[0155] For example, the dynamic feature is interest. The server maintains a corresponding interest list for each account. The updating of the interest list is described above and will not be repeated here. The interest list of a sample account on a specific historical day (e.g., January 1, 2025) can be obtained as the preceding interest list. The interest list of the sample account on the following day (e.g., January 2, 2025) can be obtained as the target interest list. The preceding interest list and the target interest list are compared, and the interests not appearing in the preceding interest list among all interests included in the target interest list are identified as new interests, resulting in at least one new interest. Each time, one interest can be selected from the preceding interest list, and then m new interests can be selected from the at least one new interest based on their association strength. This new interest and each of the new interests constitute an interest transfer pair, resulting in a total of m interest transfer pairs. If there are n interests in the preceding interest list, a total of n*m interest transfer pairs can be formed. The static features of the sample account, the duration parameter of the preceding interest (i.e., January 1, 2025), and all interest transfer pairs constitute an interest transfer sample.
[0156] The above embodiments provide a method for constructing dynamic feature transfer samples, which can be used to train a dynamic feature transfer prediction model. This dynamic feature transfer prediction model is used to predict the transfer of dynamic features and achieve accurate content recommendation.
[0157] In some embodiments, a dynamic feature transfer pair is constructed based on a prior dynamic feature list and at least one newly added dynamic feature, including:
[0158] For any preceding dynamic feature in the preceding dynamic feature list, based on global historical data, determine the association strength between at least one newly added dynamic feature and the current preceding dynamic feature; select the m newly added dynamic features with the highest association strength; and construct m dynamic feature transition pairs based on the current preceding dynamic feature and the m newly added dynamic features.
[0159] Specifically, any preceding dynamic feature is selected from the list of preceding dynamic features. For each new dynamic feature, the number of accounts that have moved from the current preceding dynamic feature to the new dynamic feature is found in the global historical data. The number of accounts is used as the correlation strength between the new dynamic feature and the current preceding dynamic feature. Alternatively, after obtaining the number of accounts, the number of accounts is mapped to the correlation strength using a preset formula.
[0160] Optionally, the global historical data includes a list of dynamic characteristics for each account, as described above, which is updated periodically. For the current preceding dynamic characteristic, accounts that have appeared in the dynamic characteristic list can be retrieved. From these accounts, accounts that appeared in the current preceding dynamic characteristic and then appeared in the aforementioned new dynamic characteristic within a certain period of time can be selected. The number of selected accounts can be used as the number of accounts that have moved from the current preceding dynamic characteristic to the new dynamic characteristic.
[0161] Optionally, after obtaining the association strength corresponding to each newly added dynamic feature, at least one newly added dynamic feature is sorted in descending order of association strength, and the top m newly added dynamic features are obtained. The current preceding dynamic feature and each of the newly added dynamic features constitute a dynamic feature transition pair, and a total of m dynamic feature transition pairs are formed.
[0162] For example, the dynamic feature is interest. For any previous interest in the previous interest list, based on global historical data, determine the association strength between at least one new interest and the current previous interest; select the m new interests with the highest association strength; and construct m interest transfer pairs based on the current previous interest and the m new interests.
[0163] The above embodiments provide an implementation method for constructing dynamic feature transfer pairs. The dynamic feature transfer samples constructed based on the dynamic feature transfer pairs aim to enable the model to accurately learn and predict the personalized patterns of dynamic feature evolution of accounts from continuous daily behavior, thereby improving the prediction accuracy of dynamic features.
[0164] In some embodiments, the training method provided in this application further includes:
[0165] If the number of newly added dynamic features is less than m, all candidate features are sorted in descending order of their correlation strength with the current preceding dynamic feature based on global historical data. The top n candidate features are selected based on the difference n between m and the number of newly added dynamic features. Based on the current preceding dynamic feature, the newly added dynamic feature, and the n candidate features, m dynamic feature transition pairs are constructed.
[0166] Optionally, you can statistically analyze the dynamic features included in the current dynamic feature list of all accounts to obtain a full set of candidate features. Alternatively, you can statistically analyze the categories to which all published content belongs to to obtain a full set of candidate features.
[0167] Optionally, if the number of newly added dynamic features is less than m, the correlation strength between each candidate feature and the current preceding dynamic feature can be obtained based on global historical data.
[0168] Optionally, the global historical data includes a list of dynamic features for each account. Accounts that have appeared in the current preceding dynamic feature can be retrieved from this list. From these accounts, those that appeared with the current preceding dynamic feature and subsequently exhibited a candidate feature within a certain period can be selected. The number of selected accounts can be used as the correlation strength between the candidate feature and the current preceding dynamic feature. Alternatively, the number of accounts can be mapped to correlation strength using a preset formula. All candidate features are then sorted from highest to lowest correlation strength.
[0169] Optionally, the objective of this application embodiment is to construct m dynamic feature transfer pairs. If the number of newly added dynamic features is less than m, the number of newly added dynamic features can be subtracted from m to obtain the number n of dynamic features that need to be supplemented.
[0170] Optionally, the top n candidate features can be obtained from the sorted full set of candidate features. These n candidate features, together with the newly added dynamic features, make up m dynamic features. The current preceding dynamic feature and each of these dynamic features constitute a dynamic feature transition pair, thus forming m dynamic feature transition pairs. Each dynamic feature transition pair contains the current preceding dynamic feature. For ease of explanation, in this embodiment, the other dynamic feature in the dynamic feature transition pair is referred to as the transition dynamic feature.
[0171] The above embodiments provide an implementation method for constructing dynamic feature transfer pairs, which enables each preceding dynamic feature to construct m dynamic feature transfer pairs, providing a foundation for the construction of subsequent samples.
[0172] In some embodiments, obtaining a list of preceding dynamic features of a sample account within a historical first time period includes:
[0173] Obtain all published content viewed by the sample account within the first historical time period, and obtain the target category to which each published content belongs; for each target category, obtain the interaction behavior data of the published content under the target category; if the interaction behavior data meets the preset conditions, use the target category as the preceding dynamic feature within the first time period to obtain the preceding dynamic feature list.
[0174] Optionally, retrieve all published content viewed by the sample account within a specific historical time period. For example, the first time period could be a specific day in history. Then, for each published content, retrieve its third-level category as the target category.
[0175] Optionally, for each target category obtained above, interaction data of sample accounts with content published under that target category within the first time period can be obtained. This interaction data includes, for example, the number of clicks and the number of consumption actions. Consumption actions include, for example, liking, commenting, saving, and watching for more than a preset time.
[0176] Optionally, if the interaction behavior data meets the preset conditions, the corresponding target category is taken as a preceding dynamic feature in the first time period, and the preceding dynamic features determined in this way form a preceding dynamic feature list.
[0177] Optionally, preset conditions could include, for example, that the sample account had at least 2a clicks on content published under the target category within the first time period, and also had at least a consumption transactions.
[0178] Optionally, the same method can be used to obtain the list of target interests of the sample account in the second historical time period. The first time period occurred before the second time period, for example: the first time period was the day before the second time period.
[0179] In the above embodiments, if the sample account's behavioral richness for a certain target category reaches a certain threshold within a single day, it is considered that the sample account is interested in this target category, and the target category is then used as a preceding dynamic feature for that day. The preceding dynamic feature is used to construct dynamic feature transfer samples, aiming to enable the model to accurately learn and predict the personalized patterns of the account's dynamic feature evolution from continuous daily behavior.
[0180] In some embodiments, the positive samples obtained by the method for constructing dynamic feature transfer samples provided in the above embodiments are further described in this application embodiment as a method for constructing negative samples, the method comprising:
[0181] From the full pool of candidate features, select m candidate features that have not appeared in the historical posts of the sample account and are used as noise features; based on any one of the preceding dynamic features and the noise features in the preceding dynamic feature list, construct m dynamic feature negative transition pairs; the static features of the sample account, the first time period, and the m dynamic feature negative transition pairs constitute the dynamic feature transition negative sample.
[0182] As described above, you can statistically analyze the dynamic features included in the current dynamic feature list of all accounts to obtain a full set of candidate features. Alternatively, you can statistically analyze the categories to which all published content belongs to obtain a full set of candidate features.
[0183] Optionally, you can obtain the historical content posted by the sample account, extract the target category to which each post belongs, and form a category set. The full candidate features include the categories to which all posted content on the platform belongs. You can find m categories that are not in the category set from the full candidate features, and use these m categories as m noise features.
[0184] Optionally, any preceding dynamic feature can be selected from the preceding dynamic feature list. This preceding dynamic feature and a noise feature can form a dynamic feature negative transition pair, and together with m noise features, a total of m dynamic feature negative transition pairs can be formed. If there are n dynamic features in the preceding interest list, a total of n*m dynamic feature negative transition pairs can be formed. The static features of the sample account, the time identifier of the first time period, and the constructed dynamic feature negative transition pairs constitute a dynamic feature transfer negative sample.
[0185] The above embodiments provide a method for constructing negative samples. Dynamic feature transfer positive samples can teach the model to recognize the real dynamic feature evolution path; dynamic feature transfer negative samples can enable the model to learn to distinguish invalid transfer directions, thereby improving the model's prediction accuracy.
[0186] For example, the dynamic feature is interest. Referring to Figure 5, taking a homepage double-column display of recommended content (feed stream) as an example, we obtain the interaction events that occurred on the homepage each day throughout history, extract the interaction event set corresponding to each account, and store this set as a sample in a sample pool. Interest transfer samples can be constructed based on any account. Specifically, we can take the static features of any account from the account feature pool, and based on the interaction event set corresponding to that account, obtain the account's prior interest list for the first time period and its target interest list for the second time period from the content feature pool. Based on the prior interest list and the target interest list, we determine the new interests added from the first time period to the second time period, and construct interest transfer pairs based on the prior interest list and the new interests. The aforementioned static features, prior interest time (time identifier of the first time period), and the constructed interest transfer pairs constitute an interest transfer sample. A large number of interest transfer samples can be obtained using a similar method, as shown in Figure 5 as sample A1, sample A2, ..., sample An.
[0187] In some embodiments, the dynamic feature transfer prediction model includes: a model input layer, a structured mask layer, an encoding layer, a mask location extraction layer, and an interest prediction layer; the dynamic feature transfer prediction model predicts the transferred dynamic features in at least one dynamic feature transfer pair to obtain a dynamic feature transfer prediction result, including:
[0188] The model input layer converts the static features of the sample account, the duration parameters of the preceding dynamic features of the sample account, and the dynamic feature transition pairs into static feature embedding vectors, temporal feature embedding vectors, and dynamic feature embedding vectors, respectively. These vectors are then assembled into a structured sequence according to predefined rules. A structured masking layer performs transition feature masking on the structured sequence to obtain a masked sequence. An encoding layer fuses the information in the masked sequence to obtain a hidden state sequence. A mask position extraction layer extracts the mask position vector from the hidden state sequence. This mask position vector is then input into an interest prediction layer, which predicts the transition dynamic features at the masked locations in the masked sequence to obtain the dynamic feature transition prediction result.
[0189] Optionally, dynamic feature transfer samples can be input into the model input layer, whereby the model input layer converts the static features of the sample account, the duration parameters of the preceding dynamic features of the sample account, and the dynamic feature transfer pairs into static feature embedding vectors, temporal feature embedding vectors, and dynamic feature embedding vectors, respectively.
[0190] Optionally, after obtaining the static feature embedding vector, the temporal feature embedding vector, and the dynamic feature embedding vector, the static feature embedding vector, the temporal feature embedding vector, and the dynamic feature embedding vector are assembled into a structured sequence according to a preset rule.
[0191] Optionally, the structured sequence can be input into a structured masking layer, which then performs feature masking on the structured sequence to obtain a masked sequence.
[0192] Optionally, the mask sequence is input to the coding layer, which fuses the information in the mask sequence to obtain the hidden state sequence. The hidden state sequence is then input to the mask position extraction layer, which extracts the mask position vector from the hidden state sequence. For example, the coding layer can be an HSTU encoder.
[0193] Optionally, the mask position vector is finally input to the interest prediction layer, which predicts the dynamic features of the mask position in the mask sequence to obtain the dynamic feature transfer prediction result.
[0194] The above embodiments introduce a possible structural configuration of the dynamic feature transfer prediction model package, and the function of each network layer under this configuration. This configuration endows the model with accurate generative prediction capabilities, simulating the "predicting the next step" process in the natural evolution of human interest through a structured masking strategy. Accurate prediction of dynamic features can be achieved.
[0195] In some embodiments, the static features of the sample account, the duration parameters of the preceding dynamic features of the sample account, and the dynamic feature transition pairs are converted into static feature embedding vectors, temporal feature embedding vectors, and dynamic feature embedding vectors, respectively, through the model input layer, including:
[0196] The static features of the sample accounts are transformed by an independent embedding table to obtain static feature embedding vectors; the duration parameter is encoded into a periodic two-dimensional vector to obtain time feature embedding vectors; and the dynamic feature transition pairs are converted into dynamic feature embedding vectors using a unified embedding matrix shared by all candidate features.
[0197] Optionally, during training, dynamic feature transfer samples are input into the model input layer. The model input layer uses a dedicated embedding layer to vectorize the information of different properties contained in the dynamic feature transfer samples. Its core function is to convert discrete symbols (such as ID and category) that cannot be directly calculated into semantically rich numerical vectors, thereby obtaining static feature embedding vectors, temporal feature embedding vectors, and dynamic feature embedding vectors.
[0198] Optionally, for the static features of sample accounts in dynamic feature transfer samples, static feature embedding vectors can be obtained through a separate embedding table. For example, the account ID can be mapped to a unique vector to characterize its long-term stable interest preference base.
[0199] Optionally, instead of simply using date numbers for the duration parameter in dynamic feature transition samples, the date number is encoded as a periodic two-dimensional vector as a time feature embedding vector. For example, "Monday" is encoded as a two-dimensional vector, allowing the model to understand the similarity between Monday and the following Monday, thereby capturing the periodic pattern of dynamic feature evolution.
[0200] Optionally, all candidate features in the server share a unified embedding matrix. For each dynamic feature transfer pair in the dynamic feature transfer sample, the model input layer searches for the embedding vectors of the two dynamic features contained in the dynamic feature transfer pair in the unified embedding matrix. The embedding vectors of the two dynamic features constitute the dynamic feature embedding vector of the dynamic feature transfer pair.
[0201] For example, the dynamic feature is interest. In a dynamic feature transfer pair, the preceding dynamic feature is "fitness" and the transfer dynamic feature is "healthy meal". All candidate features share a unified embedding matrix, which means that the positions of the two dynamic features "fitness" and "healthy meal" in the vector space are related. The model can learn the potential transfer probability between them by calculating the distance or angle between the vectors.
[0202] For example, the dynamic feature is interest. As shown in Figure 6, the static features of the sample account, the duration parameter of the preceding interest, and the interest transfer pairs are input to the model input layer. The interest transfer pairs include: "Previous interest A, current interest B1", "Previous interest A, current interest B2", ..., "Previous interest A, current interest Bn". The model input layer uses the feature embedding layer to embed the received information to obtain the sample feature embedding vector: [user_v,time_v,a_v,b1_v,a_v,b2_v,...], where user_v represents the static feature embedding vector, time_v represents the time feature embedding vector, a_v,b1_v represents the interest embedding vector corresponding to the first interest transfer pair, a_v,b2_v represents the interest embedding vector corresponding to the second interest transfer pair, and so on.
[0203] In the above embodiments, an embedding process is provided after the model input layer receives dynamic feature transfer samples. This embedding process maps high-dimensional sparse category IDs to low-dimensional dense real number vectors, which not only greatly alleviates the challenges brought by data sparsity in terms of technology, but also lays a solid and computable foundation for the model to deeply understand and predict dynamic feature transfers in terms of semantics.
[0204] In some embodiments, static feature embedding vectors, temporal feature embedding vectors, and dynamic feature embedding vectors are assembled into a structured sequence according to preset rules, including:
[0205] Positional encoding is added to the static feature embedding vector, the temporal feature embedding vector, and the dynamic feature embedding vector corresponding to each dynamic feature transition pair to obtain static vector units, temporal vector units, and feature pair vector units corresponding to each dynamic feature transition pair; the static vector units, temporal vector units, and feature pair vector units corresponding to each dynamic feature transition pair are woven into the sequence to obtain a structured sequence.
[0206] The positional encoding is used to indicate the order of the vectors.
[0207] Optionally, positional encoding can be added to the static feature embedding vector to obtain static vector units; positional encoding can be added to the temporal feature embedding vector to obtain temporal vector units; and positional encoding can be added to the dynamic feature embedding vector corresponding to each dynamic feature transition pair to obtain feature pair vector units corresponding to each dynamic feature transition pair.
[0208] As mentioned earlier, the dynamic feature embedding vector corresponding to a dynamic feature transfer pair is composed of the embedding vectors of the preceding dynamic feature and the transferred dynamic feature contained in the dynamic feature transfer pair.
[0209] Optionally, static vector units representing the inherent attributes of the sample account and temporal vector units representing the temporal context can be concatenated end-to-end to form an enhanced context vector rich in personalization and timeliness. This context vector can be placed at the very beginning of the sequence. Then, the feature pair vector units are placed sequentially according to their positions, thus obtaining a structured sequence.
[0210] It should be noted that the above-described enhanced context vector configuration is only one possible implementation; the static vector units and time vector units can also be omitted from the chain. After adding positional encoding, the units are directly arranged according to their positional encodings to obtain a structured sequence.
[0211] For example, the dynamic feature is interest. Referring to Figure 7, the static feature embedding vector output from the model input layer is represented by "user embedding user_v", and the temporal feature embedding vector output from the model input layer is represented by "time embedding time_v". The embedding vector for interest A in the first interest transfer pair is "interest A embedding a_v", the embedding vector for interest B1 in the first interest transfer pair is "interest B1 embedding b1_v", and so on, until the embedding vector for interest A in the nth interest transfer pair is "interest A embedding a_v", and the embedding vector for interest Bn in the nth interest transfer pair is "interest Bn embedding bn_v". A positional encoding P_user is added to the "user embedding user_v" to obtain a static vector unit, represented by "P_user user_v". Similarly, a positional encoding P_time is added to the "time embedding time_v" to obtain a temporal vector unit, represented by "P_time time_v". A positional code P0 is added to the interest embedding vector corresponding to the first interest transfer pair to obtain the interest pair vector unit corresponding to the first interest transfer pair, denoted as "interest pair unit P0 a_v, b1_v", and so on. A positional code Pn is added to the interest embedding vector corresponding to the nth interest transfer pair to obtain the interest pair vector unit corresponding to the nth interest transfer pair, denoted as "interest pair unit Pn a_v, b1_v". The final output structured sequence is: S=[P0 a_v, b1_v, ..., Pn a_v, b1_v, P_useruser_v, P_time time_v].
[0212] The above embodiments provide a specific method for assembling static feature embedding vectors, temporal feature embedding vectors, and dynamic feature embedding vectors into a structured sequence. This unique sequence structure forces the model to focus on a "one-to-many" mapping relationship, that is, to focus on learning the diverse subsequent dynamic features that may be derived from a specific preceding dynamic feature, rather than a simple temporal order, thus improving training efficiency. In addition, this embodiment also introduces "paired position encoding." Traditional sequence models assign an encoding to each element in the sequence to represent its order, but the method in this embodiment goes a step further, allowing each "dynamic feature transfer pair" in the sequence (such as interest A and its corresponding interest Bi in Figure 7) to share the same position encoding. This design explicitly tells the model that interest A and interest Bi are an indivisible structural unit with an inherent logical connection, thereby injecting strong prior knowledge into the model and helping it to more accurately understand the paired transfer relationship between interests.
[0213] In some embodiments, the structured sequence is subjected to transfer feature masking processing via a structured masking layer, including:
[0214] In all feature pairs vector units contained in the structured sequence, a preset number of target units are randomly selected, and the embedding vectors corresponding to the transition dynamic features in the target units are replaced with preset mask markers.
[0215] The training of the structured mask layer aims to endow the model with accurate generative prediction capabilities. Its core mechanism is to simulate the "predicting the next step" process in the natural evolution of human interests through a structured masking strategy.
[0216] Optionally, the structured sequence is input into the structured masking layer. The structured masking layer randomly selects a target unit from all feature pair vector units and uses a pre-set masking decision to determine whether to mask it. If yes, the embedding vector of the transferred dynamic feature in the target unit is replaced with a preset mask label. If no, the next target unit is randomly selected and the above judgment is made until the number of replaced target units reaches a preset value.
[0217] For example, the dynamic feature is interest. As shown in Figure 8, the structured sequence obtained above is input to the structured masking layer. The structured masking layer randomly selects a target unit from the interest pair vector units corresponding to all interest transition pairs and uses a pre-set masking decision to determine whether to perform masking processing. If yes, the embedding vector corresponding to the current interest in the target unit is replaced with a preset mask label. For example, in Figure 8, the embedding vector b_v corresponding to the current interest is replaced with MASK. If no, another target unit is randomly selected from the remaining interest pair vector units, and the above steps are repeated until the number of interest pair vector units that have been masked reaches a preset value. Then, the masking processing stops, thus obtaining the mask sequence S_MASK. The mask sequence S_MASK is further input to the HSTU encoder and the mask position extraction layer. After receiving the mask sequence S_MASK, the HSTU encoder performs the processing shown in Figure 8, thereby outputting the hidden state sequence H. The hidden state sequence H is input to the mask position extraction layer, which locates the mask position and extracts the corresponding vector, finally outputting the mask position vector h_mask_list.
[0218] Optionally, as shown in Figure 9, the mask position vector can be input into the interest prediction layer. The interest prediction layer processes the received mask position vector as shown in Figure 9 and outputs the dynamic feature transfer prediction result. Then, the cross-entropy loss is calculated based on the dynamic feature transfer prediction result and the original interest (true label) at the mask position. The network parameters of each layer of the model are updated based on the model loss until the preset training cutoff condition is reached.
[0219] It should be noted that the network structure in the prediction model for the transfer of dynamic features can be increased or decreased as needed, as long as the functions described in the embodiments of this application can be achieved. The embodiments of this application do not limit the number of network structure layers.
[0220] The above embodiments introduce the internal processing mechanisms of the structured masking layer and the interest prediction layer, making the model's task a "interest inference engine." It must comprehensively utilize all unmasked clues in the sequence (including static feature embedding vectors, temporal feature embedding vectors, embedding vectors of preceding dynamic features as the starting point, and embedding vectors of other unmasked true subsequent dynamic features) to infer which specific dynamic feature should have been at each masked position. This transforms model training from a passive multi-classification task to an active generative task, forcing the model to go beyond simple statistical associations and deeply understand the inherent logical chain of "why, starting from preceding dynamic features, it is most likely to transfer to b1 rather than b2 under specific user context and temporal environment." During training, the model's prediction results at each masked position are compared with the true dynamic feature labels, and the prediction error is quantified using the cross-entropy loss function to drive model parameter updates. Through extensive practice of this kind, the model eventually learns a generative ability: given a static feature of an account, a point in time (the duration parameter of the preceding dynamic feature), and a preceding dynamic feature, it can generate a probability distribution that covers all candidate features, accurately reflecting the likelihood of each candidate feature as the next reasonable "landing point".
[0221] In some embodiments, as shown in FIG10, a method for predicting dynamic transfer features is provided. This method can be applied to the server in FIG1 and includes the following steps 1002 to 1004. Wherein:
[0222] Step 1002: Obtain the static characteristics, current dynamic characteristics, and duration parameters of the current dynamic characteristics of the target account.
[0223] The explanations of the target account, current dynamic characteristics, and duration parameters of current dynamic characteristics are provided above and will not be repeated here.
[0224] Step 1004: Input the static features, current dynamic features, and duration parameters into the pre-trained dynamic feature transfer prediction model. The dynamic feature transfer prediction model performs feature transfer prediction and outputs at least one transfer dynamic feature and its corresponding transfer probability.
[0225] The training process of the dynamic feature transfer prediction model is described above and will not be repeated here.
[0226] Specifically, the static features, current dynamic features, and duration parameters of the current dynamic features of the target account can be input into a pre-trained dynamic feature transfer prediction model. The dynamic feature transfer prediction model then performs dynamic feature transfer prediction and outputs at least one transfer dynamic feature of the target account and the transfer probability corresponding to each transfer dynamic feature.
[0227] As described above, the dynamic feature transfer prediction model includes an input layer, a structured mask layer, an encoding layer, a mask location extraction layer, and an interest prediction layer. The static features, current dynamic features, and duration parameters of the current dynamic features of the target account input into the dynamic feature transfer prediction model are processed sequentially through these network layers, ultimately outputting at least one transition dynamic feature and the corresponding transition probability for each transition dynamic feature. The processing procedure for each network layer is described above and will not be repeated here.
[0228] In the above embodiments, the static features, current dynamic features, and duration parameters of the current dynamic features of the target account are obtained; the static features, current dynamic features, and duration parameters are input into a pre-trained dynamic feature transfer prediction model, which performs feature transfer prediction and outputs at least one transfer dynamic feature and its corresponding transfer probability. This achieves accurate prediction of dynamic features.
[0229] In some embodiments, the dynamic feature transfer prediction model determines the probability that a target account will transfer from the current dynamic feature to each candidate feature in the full set of candidate features based on static features, current dynamic features, and duration parameters. Candidate features whose probabilities meet preset conditions are then used as the transfer dynamic features, and the model outputs the transfer dynamic features and their corresponding transfer probabilities. Optionally, a preset number of candidate features with probabilities greater than a preset value and ranked first in descending order of probability can be used as the transfer dynamic features.
[0230] For example, the dynamic feature is interest. As shown in Figure 11, an interest prediction method is provided, including: during the content recommendation process of the target account, obtaining the static features of the target account, the current interest of the target account, and the duration parameter of the current interest. The model input layer transforms this information to obtain the static feature embedding vector, the temporal feature embedding vector, and the current interest embedding vector. Then, the structured masking layer constructs the static feature embedding vector, the temporal feature embedding vector, the current interest embedding vector, and the preset mask marker to obtain the query sequence. The query sequence is position-encoded and then sent to the HSTU encoder. Subsequently, the MASK position extraction processing and the interest prediction layer processing are performed to obtain the transition probability corresponding to each of the full candidate interests. The full candidate interests are sorted in descending order of transition probability, and the top K candidate interests are selected as the transition interests, which is the prediction result in Figure 11.
[0231] For example, the dynamic feature is interest. As shown in Figure 12, in the homepage dual-column feed recommendation scenario, interest transfer samples can be constructed based on the homepage dual-column feed scenario data retrieved from the online feature pool. These interest transfer samples are used to train the dynamic feature transfer prediction model. The trained dynamic feature transfer prediction model is deployed online. After a user triggers the opening of the homepage, the static features of the currently logged-in account, current interests, and today's date are input as queries into the dynamic feature transfer prediction model. The model outputs at least one transferred interest and its corresponding transfer probability. Then, the transfer probabilities are mapped to recommendation weights using a weight mapping function. The query corresponding to the online running model is obtained and input into the online running model. This model filters highly relevant and high-quality content through dynamic content pool construction, multi-source recall, and multi-level ranking. Candidate recommendation content with a click-through rate greater than the average click-through rate is then selected from these contents. Target recommendation content belonging to the transferred interest is then selected from the candidate recommendation content, and the target recommendation content is ranked and improved based on the recommendation weight. The ranked target recommendation content is then sent to the target account.
[0232] 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 in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0233] Based on the same inventive concept, this application also provides an apparatus for implementing the various methods involved above. The solution provided by this apparatus is similar to the implementation solutions described in the methods above. Therefore, the specific limitations of one or more apparatus embodiments provided below can be found in the limitations of the methods above, and will not be repeated here.
[0234] In some embodiments, this application provides a content recommendation apparatus, including:
[0235] The acquisition module is used to acquire candidate recommendation content for the target account;
[0236] A determination module is used to determine target recommended content related to at least one transfer dynamic feature from the candidate recommended content based on at least one transfer dynamic feature of the target account.
[0237] The sorting module is used to sort the target recommendation content according to the recommendation weight corresponding to the at least one transition dynamic feature;
[0238] The recommendation module is used to recommend the sorted target content to the target account;
[0239] The recommendation weight is determined based on the transfer probability of each dynamic feature; each dynamic feature and its corresponding transfer probability are predicted based on the static features, current dynamic features, and duration parameters of the current dynamic features of the target account.
[0240] In some embodiments, the determining module is configured to match the category to which the candidate recommended content belongs with each dynamic feature of the transfer, and if a match is successful with any dynamic feature of the transfer, the candidate recommended content is used as the target recommended content.
[0241] In some embodiments, the recommendation weight is determined based on the transfer probability of the corresponding transfer dynamic feature and the pre-constructed mapping relationship between the transfer probability and the recommendation weight.
[0242] In some embodiments, the mapping relationship is represented by a weighted mapping function, which is a piecewise function divided according to the range of transition probabilities; the recommendation weight is obtained by substituting the transition probability of the corresponding dynamic feature into the piecewise function corresponding to the range of transition probabilities.
[0243] In some embodiments, each transfer dynamic feature and the corresponding transfer probability are predicted and output by inputting the static features, current dynamic features and duration parameters of the target account into a pre-trained dynamic feature transfer prediction model.
[0244] In some embodiments, a training apparatus for a dynamic feature transfer prediction model is provided, comprising:
[0245] The acquisition module is used to acquire dynamic feature transfer samples; the dynamic feature transfer samples include: static features of the sample account, duration parameters of the preceding dynamic features of the sample account, and dynamic feature transfer pairs constructed based on the preceding dynamic features, wherein the dynamic feature transfer pairs consist of the preceding dynamic features and the transferred dynamic features;
[0246] The prediction module is used to input the dynamic feature transfer samples into the dynamic feature transfer prediction model to be trained, and the dynamic feature transfer prediction model predicts the transfer dynamic features in at least one dynamic feature transfer pair to obtain the dynamic feature transfer prediction result.
[0247] The parameter tuning module is used to calculate the model loss based on the dynamic feature transfer prediction result and the dynamic features transferred in at least one dynamic feature transfer pair, and to update the model parameters of the dynamic feature transfer prediction model based on the model loss until a preset training cutoff condition is reached.
[0248] In some embodiments, the acquisition module is configured to acquire a list of preceding dynamic features of a sample account within a first historical time period, and acquire a list of target dynamic features of the sample account within a second historical time period, wherein the first time period precedes the second time period; compare the list of preceding dynamic features and the list of target dynamic features to obtain at least one newly added dynamic feature in the target dynamic feature list relative to the list of preceding dynamic features; construct a dynamic feature transfer pair based on the list of preceding dynamic features and the at least one newly added dynamic feature; and acquire a dynamic feature transfer sample consisting of at least the static features of the sample account, the first time period, and the dynamic feature transfer pair.
[0249] In some embodiments, the acquisition module is configured to, for any preceding dynamic feature in the preceding dynamic feature list, determine the association strength between at least one newly added dynamic feature and the current preceding dynamic feature based on global historical data; select the m newly added dynamic features with the highest association strength; and construct m dynamic feature transition pairs based on the current preceding dynamic feature and the m newly added dynamic features.
[0250] In some embodiments, the acquisition module is configured to, when the number of newly added dynamic features is less than m, sort all candidate features according to global historical data in descending order of their association strength with the current preceding dynamic feature; select the top n candidate features based on the difference n between m and the number of newly added dynamic features; and construct m dynamic feature transition pairs based on the current preceding dynamic feature, the newly added dynamic feature, and the n candidate features.
[0251] In some embodiments, the acquisition module is used to acquire all published content viewed by the sample account within a historical first time period, and acquire the target category to which each published content belongs; for each acquired target category, acquire the interaction behavior data of the published content under the target category, and if the interaction behavior data meets preset conditions, use the target category as the preceding dynamic feature within the first time period to obtain a preceding dynamic feature list.
[0252] In some embodiments, the acquisition module is used to filter m candidate features from the full set of candidate features that have not appeared in the published content that the sample account has interacted with in the past, as noise features; based on any one of the preceding dynamic features in the preceding dynamic feature list and the noise features, m dynamic feature negative transition pairs are constructed; the static features of the sample account, the first time period, and the m dynamic feature negative transition pairs constitute dynamic feature transfer negative samples.
[0253] In some embodiments, the prediction module is configured to convert the static features of the sample account, the duration parameters of the preceding dynamic features of the sample account, and the dynamic feature transition pairs into static feature embedding vectors, temporal feature embedding vectors, and dynamic feature embedding vectors, respectively, through the model input layer; assemble the static feature embedding vectors, temporal feature embedding vectors, and dynamic feature embedding vectors into a structured sequence according to a preset rule; perform transition feature masking on the structured sequence through the structured masking layer to obtain a mask sequence; perform fusion processing on the information in the mask sequence through the encoding layer to obtain a hidden state sequence; extract the mask position vector from the hidden state sequence through the mask position extraction layer; input the mask position vector to the interest prediction layer; and predict the transition dynamic features at the mask positions in the mask sequence through the interest prediction layer to obtain a dynamic feature transition prediction result.
[0254] In some embodiments, the prediction module is configured to transform the static features of the sample account through an independent embedding table to obtain a static feature embedding vector; encode the duration parameter into a periodic two-dimensional vector to obtain a time feature embedding vector; and convert the dynamic feature transition pair into a dynamic feature embedding vector using a unified embedding matrix shared by all candidate features.
[0255] In some embodiments, the prediction module is configured to add positional encoding to the static feature embedding vector, the temporal feature embedding vector, and the dynamic feature embedding vector corresponding to each dynamic feature transition pair, respectively, to obtain static vector units, temporal vector units, and feature pair vector units corresponding to each dynamic feature transition pair; and to weave the static vector units, the temporal vector units, and the feature pair vector units corresponding to each dynamic feature transition pair into a sequence to obtain a structured sequence.
[0256] In some embodiments, the prediction module is configured to randomly select a preset number of target units from all feature pair vector units contained in the structured sequence, and replace the embedding vector corresponding to the transition dynamic feature in the target unit with a preset mask label.
[0257] In some embodiments, a dynamic feature prediction apparatus is provided, comprising:
[0258] The acquisition module is used to acquire the static characteristics, current dynamic characteristics, and duration parameters of the current dynamic characteristics of the target account;
[0259] The prediction module is used to input the static features, the current dynamic features, and the duration parameters into a pre-trained dynamic feature transfer prediction model, and the dynamic feature transfer prediction model performs feature transfer prediction and outputs at least one transfer dynamic feature and the corresponding transfer probability.
[0260] In some embodiments, the dynamic feature transfer prediction model determines the probability that the target account will transfer from the current dynamic feature to each candidate feature in the full set of candidate features based on the static feature, the current dynamic feature, and the duration parameter. The model then selects the candidate features whose probabilities meet preset conditions as the transfer dynamic features and outputs the transfer dynamic features and the corresponding transfer probabilities.
[0261] Each module in the above-mentioned 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.
[0262] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram is shown in Figure 13. The 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 connected to the system bus via the I / O interfaces. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store XX data. The I / O interfaces of the computer device are used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a content recommendation method.
[0263] Those skilled in the art will understand that the structure shown in Figure 13 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.
[0264] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described content recommendation method, the training method for a prediction model of transitional dynamic features, and the prediction method for transitional dynamic features.
[0265] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the above-described content recommendation method, the training method for the prediction model of transition dynamic features, and the prediction method for transition dynamic features.
[0266] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described content recommendation method, the training method for a prediction model of transitional dynamic features, and the prediction method for transitional dynamic features.
[0267] 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.
[0268] 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.
[0269] 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.
[0270] 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: acquiring candidate recommended content for a target account; determining target recommended content related to at least one transfer dynamic feature from the candidate recommended content based on at least one transfer dynamic feature of the target account; sorting the target recommended content according to the recommendation weight corresponding to the at least one transfer dynamic feature; and recommending the sorted target recommended content to the target account; wherein the recommendation weight is determined based on the transfer probability of each transfer dynamic feature; and each transfer dynamic feature and its corresponding transfer probability are predicted based on the static features, current dynamic features, and duration parameters of the current dynamic features of the target account.
2. The method according to claim 1, characterized in that, The step of determining target recommended content related to at least one transfer dynamic feature from the candidate recommended content based on at least one transfer dynamic feature of the target account includes: matching the category to which the candidate recommended content belongs with each transfer dynamic feature respectively, and if a match is successful with any transfer dynamic feature, using the candidate recommended content as the target recommended content.
3. The method according to claim 1, characterized in that, The recommendation weights are determined based on the transfer probabilities of the corresponding dynamic features and the pre-built mapping relationship between the transfer probabilities and the recommendation weights.
4. The method according to claim 1, characterized in that, The mapping relationship is represented by a weighted mapping function, which is a piecewise function divided according to the range of transition probabilities. The recommendation weight is obtained by substituting the transition probability of the corresponding dynamic feature into the piecewise function corresponding to the range of transition probabilities.
5. The method according to claim 1, characterized in that, Each transfer dynamic feature and its corresponding transfer probability are predicted and output by inputting the static features, current dynamic features, and duration parameters of the current dynamic features of the target account into a pre-trained dynamic feature transfer prediction model.
6. A training method for a prediction model of transitional dynamic features, characterized in that, The method includes: acquiring dynamic feature transfer samples; the dynamic feature transfer samples include: static features of a sample account, duration parameters of preceding dynamic features of the sample account, and dynamic feature transfer pairs constructed based on the preceding dynamic features, wherein the dynamic feature transfer pairs consist of the preceding dynamic features and the transfer dynamic features; inputting the dynamic feature transfer samples into a dynamic feature transfer prediction model to be trained, wherein the dynamic feature transfer prediction model predicts the transfer dynamic features in at least one dynamic feature transfer pair to obtain a dynamic feature transfer prediction result; calculating the model loss based on the dynamic feature transfer prediction result and the transfer dynamic features in the at least one dynamic feature transfer pair, and updating the model parameters of the dynamic feature transfer prediction model based on the model loss until a preset training cutoff condition is reached.
7. The method according to claim 6, characterized in that, The process of obtaining dynamic feature transfer samples includes: obtaining a list of preceding dynamic features of a sample account within a first historical time period, and obtaining a list of target dynamic features of the sample account within a second historical time period, wherein the first time period precedes the second time period; comparing the preceding dynamic feature list and the target dynamic feature list to obtain at least one newly added dynamic feature in the target dynamic feature list relative to the preceding dynamic feature list; constructing a dynamic feature transfer pair based on the preceding dynamic feature list and the at least one newly added dynamic feature; and obtaining a dynamic feature transfer sample consisting of at least the static features of the sample account, the first time period, and the dynamic feature transfer pair.
8. The method according to claim 7, characterized in that, The step of constructing dynamic feature transfer pairs based on the preceding dynamic feature list and the at least one newly added dynamic feature includes: for any preceding dynamic feature in the preceding dynamic feature list, determining the association strength between at least one newly added dynamic feature and the current preceding dynamic feature based on global historical data; selecting the m newly added dynamic features with the highest association strength; and constructing m dynamic feature transfer pairs based on the current preceding dynamic feature and the m newly added dynamic features.
9. The method according to claim 8, characterized in that, The method further includes: when the number of newly added dynamic features is less than m, sorting all candidate features according to global historical data in descending order of their association strength with the current preceding dynamic feature; selecting the top n candidate features based on the difference n between m and the number of newly added dynamic features; and constructing m dynamic feature transition pairs based on the current preceding dynamic feature, the newly added dynamic feature, and the n candidate features.
10. The method according to claim 7, characterized in that, The step of obtaining the preceding dynamic feature list of the sample account in the first historical time period includes: obtaining all published content viewed by the sample account in the first historical time period, and obtaining the target category to which each published content belongs; for each obtained target category, obtaining the interaction behavior data of the published content under the target category; and if the interaction behavior data meets preset conditions, taking the target category as the preceding dynamic feature in the first time period to obtain the preceding dynamic feature list.
11. The method according to claim 7, characterized in that, The method further includes: selecting m candidate features from the full set of candidate features that have not appeared in the historical posts of the sample account, as noise features; constructing m dynamic feature negative transition pairs based on any one of the preceding dynamic features in the preceding dynamic feature list and the noise features; the static features of the sample account, the first time period, and the m dynamic feature negative transition pairs constitute dynamic feature transfer negative samples.
12. The method according to claim 6, characterized in that, The dynamic feature transfer prediction model includes: a model input layer, a structured masking layer, an encoding layer, a mask position extraction layer, and an interest prediction layer. The process of predicting the transfer dynamic features in at least one dynamic feature transfer pair using the dynamic feature transfer prediction model to obtain a dynamic feature transfer prediction result includes: converting the static features of the sample account, the duration parameters of the preceding dynamic features of the sample account, and the dynamic feature transfer pair into static feature embedding vectors, temporal feature embedding vectors, and dynamic feature embedding vectors, respectively, through the model input layer; assembling the static feature embedding vectors, temporal feature embedding vectors, and dynamic feature embedding vectors into a structured sequence according to preset rules; performing transfer feature masking on the structured sequence through the structured masking layer to obtain a mask sequence; fusing the information in the mask sequence through the encoding layer to obtain a hidden state sequence; extracting mask position vectors from the hidden state sequence through the mask position extraction layer; inputting the mask position vectors to the interest prediction layer; and predicting the transfer dynamic features at the mask positions in the mask sequence through the interest prediction layer to obtain a dynamic feature transfer prediction result.
13. The method according to claim 12, characterized in that, The step of converting the static features of the sample account, the duration parameter of the preceding dynamic features of the sample account, and the dynamic feature transition pairs into static feature embedding vectors, temporal feature embedding vectors, and dynamic feature embedding vectors respectively through the model input layer includes: converting the static features of the sample account through an independent embedding table to obtain a static feature embedding vector; encoding the duration parameter into a periodic two-dimensional vector to obtain a temporal feature embedding vector; and converting the dynamic feature transition pairs into dynamic feature embedding vectors using a unified embedding matrix shared by all candidate features.
14. The method according to claim 12, characterized in that, The step of assembling the static feature embedding vector, the temporal feature embedding vector, and the dynamic feature embedding vector into a structured sequence according to preset rules includes: adding positional encoding to the static feature embedding vector, the temporal feature embedding vector, and the dynamic feature embedding vector corresponding to each dynamic feature transition pair to obtain static vector units, temporal vector units, and feature pair vector units corresponding to each dynamic feature transition pair; and weaving the static vector units, temporal vector units, and feature pair vector units corresponding to each dynamic feature transition pair into the sequence to obtain the structured sequence.
15. The method according to claim 14, characterized in that, The step of performing transfer feature masking processing on the structured sequence through the structured mask layer includes: randomly selecting a preset number of target units from all feature pair vector units contained in the structured sequence, and replacing the embedding vector corresponding to the transfer dynamic feature in the target unit with a preset mask label.
16. A method for predicting dynamic characteristics of a transition, characterized in that, include: Obtain the static features, current dynamic features, and duration parameters of the current dynamic features of the target account; input the static features, current dynamic features, and duration parameters into a pre-trained dynamic feature transfer prediction model, and have the dynamic feature transfer prediction model perform feature transfer prediction, outputting at least one transfer dynamic feature and the corresponding transfer probability.
17. The method according to claim 16, characterized in that, The dynamic feature transfer prediction model determines the probability that the target account will transfer from the current dynamic feature to each candidate feature in the full set of candidate features based on the static feature, the current dynamic feature, and the duration parameter. The model then selects the candidate features whose probabilities meet preset conditions as the transfer dynamic features and outputs the transfer dynamic features and their corresponding transfer probabilities.
18. A content recommendation device, characterized in that, The apparatus includes: an acquisition module for acquiring candidate recommended content for a target account; a determination module for determining target recommended content related to at least one transfer dynamic feature from the candidate recommended content based on at least one transfer dynamic feature of the target account; a sorting module for sorting the target recommended content according to the recommendation weight corresponding to the at least one transfer dynamic feature; and a recommendation module for recommending the sorted target recommended content to the target account; wherein the recommendation weight is determined based on the transfer probability of each transfer dynamic feature; and each transfer dynamic feature and its corresponding transfer probability are predicted based on the static features, current dynamic features, and duration parameters of the current dynamic features of the target account.
19. A training device for a dynamic feature transfer prediction model, characterized in that, The apparatus includes: an acquisition module for acquiring dynamic feature transfer samples; the dynamic feature transfer samples include: static features of a sample account, duration parameters of preceding dynamic features of the sample account, and dynamic feature transfer pairs constructed based on the preceding dynamic features, the dynamic feature transfer pairs consisting of the preceding dynamic features and the transfer dynamic features; a prediction module for inputting the dynamic feature transfer samples into a dynamic feature transfer prediction model to be trained, the dynamic feature transfer prediction model predicting the transfer dynamic features in at least one dynamic feature transfer pair to obtain a dynamic feature transfer prediction result; and a parameter tuning module for calculating the model loss based on the dynamic feature transfer prediction result and the transfer dynamic features in the at least one dynamic feature transfer pair, updating the model parameters of the dynamic feature transfer prediction model based on the model loss, until a preset training cutoff condition is reached.
20. A dynamic feature prediction device, characterized in that, The device includes: an acquisition module for acquiring static features, current dynamic features, and duration parameters of the current dynamic features of a target account; and a prediction module for inputting the static features, the current dynamic features, and the duration parameters into a pre-trained dynamic feature transfer prediction model, wherein the dynamic feature transfer prediction model performs feature transfer prediction and outputs at least one transfer dynamic feature and its corresponding transfer probability.
21. 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 17.
22. 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 17.
23. 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 17.