Long-term and short-term interest fused user preference prediction method and device
Features are extracted through the short-term interest capture module and the long-term interest capture module, and combined with the multi-grained timing builder and feature collaboration enhancement layer, the problems of long-term interest heterogeneity and excessive search space are solved, and the accuracy of user preference prediction is improved and model performance.
Patent Information
- Application Number
- CN202411062087.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-08-05
AI Technical Summary
The existing interest preference prediction methods fail to fully consider the heterogeneity between long-term and short-term interests of users, and the search space in long-term interest extraction is too large, resulting in redundant features retention and degrading model performance.
The short-term interest capture module and the long-term interest capture module respectively extract the user's short-term and long-term interest characteristics, and splice them through the prediction module, combine the multi-grained timing builder and feature collaboration enhancement layer, automated and adaptive short-term interest length, and use feature filtering. Methods generate high-quality feature characterization.
The problem of heterogeneity of long-term and short-term interest characteristics is solved, the accuracy of user preference prediction is improved, the training complexity is reduced, and effective user preference prediction is achieved.
Smart Images

Figure CN119004366A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence technology, and in particular relates to a method and device for predicting user preferences by integrating long-term and short-term interests. Background Art
[0002] Recommendation systems can effectively filter information resources and improve information utilization efficiency when dealing with massive amounts of data and unclear user needs. As a decision support system, recommendation systems predict users' interest in specific items, use information such as historical behavior and preferences to help users select content of interest, intelligently mine users' interests, and deploy predicted content to edge servers near users in advance to provide targeted services to users. Faced with the challenges of massive amounts of data and personalized user needs, how to accurately predict user preferences has become a research focus. Machine learning and deep learning methods in artificial intelligence provide users with personalized content recommendation services by analyzing information such as user historical requests and content features.
[0003] The application of deep learning technology in interest prediction is particularly prominent, among which models such as deep neural network (DNN), convolutional neural network (CNN), and recurrent neural network (RNN) have shown strong capabilities in capturing user behavior patterns and learning potential data features. DNN is widely used in user preference prediction models and is often used to mine high-order feature interactions and learn potential data patterns. The use of deep learning models can better capture the associations and long-term dependencies between user behavior sequences, thereby improving the accuracy and effect of interest prediction. Combination models such as Wide&Deep and DeepFM enhance the model's feature learning ability by learning feature cross-relationships, and can effectively learn complex relationships between features. However, they all learn high-order feature interactions in an implicit way and lack good model interpretability. Models such as AutoInt and FiBiNet use attention mechanisms to select more effective features, allowing the model to focus on more important information and reduce the impact of data noise on the results. However, these methods focus on capturing users' long-term interests and ignore the impact of short-term interests and user behavior sequences on user preference prediction. Recurrent Neural Networks (RNNs) and their variants such as Gated Recurrent Units (GRUs) or Long Short-Term Memory (LSTMs) can be used to process time series data. Based on user session behavior, they can learn the user's preference migration process and predict the content that the user may request next. However, RNNs are prone to degradation when facing long sequences, and there are problems with gradient vanishing and gradient exploding.
[0004] As mentioned above, the existing interest preference prediction still has the following problems. First, the impact of the heterogeneity between users' long-term and short-term interests on user preference prediction has not been fully considered. Second, most studies have adopted the LSTM and GRU methods. Although they can handle short-term interest sequences, these methods are insensitive to the order of the input sequence due to the nature of self-attention. In addition, the length of the short-term interest sequence is usually preset in advance, and it cannot automatically adapt to different recommendation tasks and occasions, which limits the flexibility of the model and directly affects the accuracy of preference prediction. Finally, in long-term interest extraction, the search space is mostly limited to the feature domain, which is too coarse to determine subtle features, thereby retaining redundant features and reducing model performance. Summary of the invention
[0005] In order to solve the problems existing in the background technology, one aspect of the present invention provides a user preference prediction method for integrating long-term and short-term interests, comprising:
[0006] S1: Obtain a data set from a social platform and preprocess it, wherein the data set includes: user data, video data, and historical interaction data between users and videos;
[0007] S2: Extract the user's short-term historical interaction behavior sequence based on the user's interaction data with the video within a short period of time T and input it into the short-term interest capture module to obtain the user's short-term interest features;
[0008] S3: Inputting user data, video data, and historical interaction data between the user and the video data into a long-term interest capture module according to a feature domain composition sequence to extract the user's long-term interest features;
[0009] S4: The user's short-term interest features and the user's long-term interest features are spliced and input into the prediction module to obtain the user's preference result for the video.
[0010] Preferably, preprocessing the data set obtained from the social platform includes: removing missing values in features and performing onehot encoding.
[0011] Preferably, the user data includes: a plurality of user features, each user feature including one of a user ID, a number of fans of the user, a number of followers of the user, and a number of days the user has been registered;
[0012] The video data includes a plurality of video features, each of which includes one of a video ID, a video author ID, a video visibility status, and a video duration;
[0013] The historical interaction data between the user and the video includes multiple interaction features, each interaction feature includes one of the interaction time between the user and the video, whether the user comments on the video, whether the user collects the video, whether the user likes the video, and whether the user shares the video; wherein each user feature, video feature, and interaction feature is respectively used as a feature domain, and n feature domains are constructed.
[0014] Preferably, the user's short-term historical interaction behavior sequence includes:
[0015]
[0016] Among them, S u represents the short-term historical interaction behavior sequence of user u, represents the video of user u interacting at time t, and T represents the length of the user's short-term historical interaction behavior sequence.
[0017] Preferably, the short-term interest capture module comprises: an embedding layer, an FC layer, a multi-granularity timing builder, a feature collaborative enhancement layer and a multi-granularity timing optimization layer;
[0018] The embedding layer uses a lookup table to find each video All corresponding video features and video All users who interact with the video Each interacting user further searches for all user features of the user, converts all the video features and user features found into low-dimensional dense embedding vectors through linear layers, and then concatenates all the embedding vectors to obtain the video The first intermediate feature c t , expressed as:
[0019]
[0020] Where D represents the dimension of the first intermediate feature;
[0021] The FC layer fuses the first intermediate features of the videos interacted by user u at T different times into an embedding table of size T×D to obtain the second intermediate feature C, which is expressed as:
[0022]
[0023] The multi-granularity timing builder is based on the predefined M candidate sequence lengths {J1, J2, ..., J a ,...,J M} In the time dimension T, the features corresponding to the length of the candidate sequence are respectively intercepted from the second intermediate features to obtain M third intermediate features, which are expressed as:
[0024]
[0025] in, represents the ath third intermediate feature, J a represents the length of the a-th candidate sequence, J a is an integer greater than or equal to 1 and less than T;
[0026] The feature collaborative enhancement layer includes: a first multi-layer perceptron MLP and a second multi-layer perceptron MLP; the feature collaborative enhancement layer first inputs the M third intermediate features after the transposition processing into the first multi-layer perceptron MLP for processing to obtain M fourth intermediate features, which are expressed as:
[0027]
[0028]
[0029]
[0030]
[0031] in, represents the ath fourth intermediate feature, W 11 and W 12 represents the weight parameter of the first multi-layer perceptron MLP, g1 represents the nonlinear activation function; LayerNorm1 represents the layer normalization processing;
[0032] Secondly, the M fourth intermediate features after transposition processing are respectively input into the second multi-layer perceptron MLP for processing to obtain M fifth intermediate features, which are expressed as:
[0033]
[0034]
[0035]
[0036]
[0037] Among them, W 21 and W 22 represents the weight parameters of the second multi-layer perceptron MLP, represents the ath fifth intermediate feature, g2 represents the nonlinear activation function; LayerNorm2 represents the layer normalization processing;
[0038] The multi-granularity timing optimization layer assigns a weight parameter to each of the M fifth intermediate features, multiplies each fifth intermediate feature by its corresponding weight parameter, and inputs the result into Softmax to predict the probability that the fifth intermediate feature is the optimal feature, and selects the fifth intermediate feature with the highest probability as the user's short-term interest feature.
[0039] Preferably, the input sequence z of the long-term interest capture module is expressed as:
[0040] z=[z1,z2,...,z i ,…z n ] T
[0041]
[0042] Among them, z i represents the i-th feature domain; n represents the number of feature domains; x ik represents the kth eigenvalue in the i-th feature domain, m i represents the number of eigenvalues in the i-th feature domain, and T represents the matrix transpose.
[0043] Preferably, the long-term interest capture module comprises: an embedding layer, a feature optimization layer, a feature collaborative enhancement layer and a feature fusion layer;
[0044] The embedding layer is used to linearly transform the input sequence z into a low-dimensional dense vector space to obtain the first long-term feature, which is expressed as:
[0045] e i =z i ×E i
[0046] e=[e1,e2,...,e n ]
[0047] in, represents the first long-term characteristic, represents the embedding table, and D represents the embedding dimension;
[0048] The feature optimization layer is each feature e in the first long-term feature i Assign a learnable binary gate from feature e i Select some feature elements as advanced features
[0049] The feature collaborative enhancement layer inputs the selected high-level features into the third multi-layer perceptron MLP for processing to obtain the second long-term features, which are expressed as:
[0050]
[0051]
[0052] Among them, W 31 and W 32 represents the weight parameters of the third multi-layer perceptron MLP, represents the second long-term feature, g3 represents the nonlinear activation function; LayerNorm3 represents the layer normalization processing;
[0053] The feature fusion layer is used to concatenate the second long-term feature and the optimal feature to obtain the user's long-term interest feature, which is expressed as:
[0054]
[0055] in, Represents the user's long-term interest characteristics.
[0056] Preferably, the prediction module uses a fourth multi-layer perceptron MLP and an output layer;
[0057] The fourth multi-layer perceptron MLP is used to interactively learn the concatenated features of the user's short-term interest features and the user's long-term interest features to obtain a first comprehensive feature, which is expressed as:
[0058]
[0059] Among them, h represents the first comprehensive feature, Represents the user's short-term interest characteristics; Represents the user's long-term interest characteristics; W 0 represents the learnable weight, b 0 is the bias parameter;
[0060] The output layer is used to input the first comprehensive feature into the activation function sigmoid for processing to obtain the user's preference result for the video, which is expressed as:
[0061]
[0062] in, Indicates the user's preference result for the video; w T represents the transpose of the matrix w; w represents the weight parameter matrix; b is the bias parameter; σ represents the sigmoid activation function.
[0063] Another aspect of the present invention provides a user preference prediction device for long-term and short-term interest fusion, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor is configured to implement the user preference prediction method for long-term and short-term interest fusion when executing the computer program.
[0064] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the user preference prediction method for integrating long-term and short-term interests.
[0065] The present invention has at least the following beneficial effects
[0066] The present invention solves the heterogeneity problem of long-term and short-term interest features by proposing a long-term interest capture module and a short-term interest capture module to learn different feature interactions respectively. For short-term interest prediction, an automated and adaptive short-term interest length search algorithm is used, and the best short-term interest behavior sequence is obtained through an end-to-end optimization method to predict short-term interest preferences; at the same time, for long-term interests, a feature screening method is proposed to generate high-quality feature representations, improve the accuracy of user preference prediction, and reduce the complexity of training, thereby achieving effective user preference prediction.
[0067] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0069] Figure 2 It is a schematic diagram of the framework flow of the method of the present invention. DETAILED DESCRIPTION
[0070] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0071] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0072] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0073] See also Figure 1 and Figure 2 The present invention provides a method for predicting user preferences by integrating long-term and short-term interests, comprising:
[0074] S1: Obtain a data set from a social platform and preprocess it, wherein the data set includes: user data, video data, and historical interaction data between users and videos;
[0075] S2: Extract the user's short-term historical interaction behavior sequence based on the user's interaction data with the video within a short period of time T and input it into the short-term interest capture module to obtain the user's short-term interest features;
[0076] S3: Inputting user data, video data, and historical interaction data between the user and the video data into a long-term interest capture module according to a feature domain composition sequence to extract the user's long-term interest features;
[0077] S4: The user's short-term interest features and the user's long-term interest features are spliced and input into the prediction module to obtain the user's preference result for the video.
[0078] The data set described in this embodiment adopts the kuairand data set, which records 12 kinds of feedback (such as whether to click, viewing time, whether to like, etc.) from users on all recommended videos in 15 recommendation scenarios (different pages). The kuairand data set used contains information such as the user's ID, the number of the user's fans, the number of users' attention, and the number of days the user has registered in the user data; the video ID, the video author's ID, the visible status of the video, and the length of the video in the video data; the user's interaction time with the video, whether the user comments on the video, whether the user collects the video, whether the user likes the video, and whether the user shares the video in the historical interaction data between the user and the video; the label used in training is whether the user clicks on the video 'is_click'. When this method is actually used, it is assumed that the data set contains P video data, and the probability of each user's preference for P videos is predicted according to step S4. The L videos with the largest probability can be selected for recommendation to the user, which will not be described in detail in this embodiment.
[0079] Preferably, preprocessing the data set obtained from the social platform includes: removing missing values in features and performing onehot encoding.
[0080] Preferably, the user data includes: a plurality of user features, each user feature including one of a user ID, a number of fans of the user, a number of followers of the user, and a number of days the user has been registered;
[0081] In this embodiment, the number of followers of a user is represented by the number of bloggers followed by the user, and the number of days the user has been registered is represented by the number of days the user has been registered on the platform;
[0082] The video data includes a plurality of video features, each of which includes one of a video ID, a video author ID, a video visibility status, and a video duration;
[0083] In this embodiment, the visible state of the video is represented by the public state of the video, for example, the video can be viewed by everyone, or the hidden video is visible only to oneself, when it is visible to everyone, it is marked as 1, and when it is visible only to oneself, it is marked as 0. Of course, those skilled in the art can also define the mark according to their own experience. This article will not go into too much detail.
[0084] The historical interaction data between the user and the video includes multiple interaction features, each of which includes one of the interaction time between the user and the video, whether the user comments on the video, whether the user collects the video, whether the user likes the video, and whether the user shares the video; wherein each user feature, video feature, and interaction feature is respectively used as a feature domain, and n feature domains are constructed;
[0085] In this embodiment, whether the user comments on the video can be defined as 1 when the user comments on the video, and 0 when there is no comment. Similarly, whether the user collects the video, whether the user likes the video, and whether the user shares the video are defined. Of course, technical personnel in this field can also define tags based on their experience, where each feature domain represents a user feature, video feature, or interaction feature, and the n feature domains include at least one user feature, at least one video feature, and at least one interaction feature.
[0086] Preferably, the user's short-term historical interaction behavior sequence includes:
[0087]
[0088] Among them, S u represents the short-term historical interaction behavior sequence of user u, represents the video of user u interacting at time t, and T represents the length of the user's short-term historical interaction behavior sequence.
[0089] Preferably, the short-term interest capture module comprises: an embedding layer, an FC layer, a multi-granularity timing builder, a feature collaborative enhancement layer and a multi-granularity timing optimization layer;
[0090] The embedding layer uses a lookup table to find each video All corresponding video features and video All users who interact with the video Each interacting user further searches for all user features of the user, converts all the video features and user features found into low-dimensional dense embedding vectors through linear layers, and then concatenates all the embedding vectors to obtain the video The first intermediate feature c t , expressed as:
[0091]
[0092] Where D represents the dimension of the first intermediate feature;
[0093] The FC layer fuses the first intermediate features of the videos interacted by user u at T different times into an embedding table of size T×D to obtain the second intermediate feature C, which is expressed as:
[0094]
[0095] The multi-granularity timing builder is based on the predefined M candidate sequence lengths {J1, J2, ..., J a ,...,J M} In the time dimension T, the features corresponding to the length of the candidate sequence are respectively intercepted from the second intermediate features to obtain M third intermediate features, which are expressed as:
[0096]
[0097] in, represents the ath third intermediate feature, J a represents the length of the a-th candidate sequence, J a is an integer greater than or equal to 1 and less than T;
[0098] The feature collaborative enhancement layer includes: a first multi-layer perceptron MLP and a second multi-layer perceptron MLP; the feature collaborative enhancement layer first inputs the M third intermediate features after the transposition processing into the first multi-layer perceptron MLP for processing to obtain M fourth intermediate features, which are expressed as:
[0099]
[0100]
[0101]
[0102]
[0103] in, represents the ath fourth intermediate feature, W 11 and W 12 represents the weight parameter of the first multi-layer perceptron MLP, g1 represents the nonlinear activation function; LayerNorm1 represents the layer normalization processing;
[0104] Secondly, the M fourth intermediate features after transposition processing are respectively input into the second multi-layer perceptron MLP for processing to obtain M fifth intermediate features, which are expressed as:
[0105]
[0106]
[0107]
[0108]
[0109] Among them, W 21 and W 22 represents the weight parameters of the second multi-layer perceptron MLP, represents the ath fifth intermediate feature, g2 represents the nonlinear activation function; LayerNorm2 represents the layer normalization processing;
[0110] The multi-granularity time series optimization layer assigns a weight parameter to each of the M fifth intermediate features, multiplies each fifth intermediate feature by its corresponding weight parameter, and then inputs the result into Softmax to predict the probability that the fifth intermediate feature is the optimal feature, and selects the fifth intermediate feature with the highest probability as the user's short-term interest feature;
[0111] In this embodiment, the optimal sequence length for short-term interest prediction is determined. In the multi-granularity timing optimization layer, the length of each feature-enhanced candidate sequence is J a Assign a learnable architecture weight α a , α a Dynamically adjusted during the training process. In order to make the search space continuous and the time series length optimization process efficient, the Softmax operation is used to convert it into a probability distribution, expressed as:
[0112]
[0113] In order to select the fifth intermediate feature with the highest probability as the user's short-term interest feature, while improving the performance of the model in predicting user preferences and maintaining the generalization ability of the model, the loss function is defined. To optimize the architectural weights of the short-term prediction module. The loss function includes training loss and regularization terms, which can be expressed as:
[0114]
[0115] Where W represents the weight parameter of the multi-layer perceptron MLP in the feature collaborative enhancement layer, α=[α1,α2,...,α M ] represents the architecture weights of the M fifth intermediate features, Represents the cross entropy loss function, λ represents the regularization parameter, and the regularization term uses L2 regularization. The two-level optimization technique is used for alternating optimization. The optimization of W is an external optimization process, and the optimization of the architecture weight α is an internal optimization process, which can be expressed as:
[0116]
[0117] Among them, W * (α) represents the optimal weight parameter in the feature collaborative enhancement layer based on the architecture weight α. Represents the loss gradient with respect to W, and η represents the learning rate. The architecture weights are optimized based on the optimal weight parameters, expressed as:
[0118]
[0119] in, represents the loss gradient with respect to the architecture weight α, and η represents the learning rate.
[0120] In order to more effectively model the user's short-term interests in this embodiment, the stacked embedding vectors are input into the feature collaborative enhancement layer, and the embedding vectors are analyzed from multiple angles through nonlinear technology. This layer is composed only of multi-layer perceptrons, aiming to maintain linear time and space complexity. The first multi-layer perceptron focuses on the time series dimension T, captures the time dependency in the user interaction sequence, and fuses the sequence information into each embedding vector through feature learning; the second multi-layer perceptron targets the feature embedding dimension D, learns the correlation between each content feature vector and fuses the feature information into each embedding vector, generates high-quality feature representation, and better mines the user's short-term preferences.
[0121] Preferably, the input sequence z of the long-term interest capture module is expressed as:
[0122] z=[z1,z2,...,z i ,...z n ] T
[0123]
[0124] Among them, z i represents the i-th feature domain; n represents the number of feature domains; x ik represents the kth eigenvalue in the i-th feature domain, m i represents the number of eigenvalues in the i-th feature domain, and T represents the matrix transpose.
[0125] Preferably, the long-term interest capture module comprises: an embedding layer, a feature optimization layer, a feature collaborative enhancement layer and a feature fusion layer;
[0126] The embedding layer is used to linearly transform the input sequence z into a low-dimensional dense vector space to obtain the first long-term feature, which is expressed as:
[0127] e i =z i ×E i
[0128] e=[e1,e2,...,e n ]
[0129] in, represents the first long-term characteristic, represents the embedding table, and D represents the embedding dimension;
[0130] The feature optimization layer is each feature e in the first long-term feature i Assign a learnable binary gate from feature e i Select some feature elements as advanced features
[0131] In this embodiment, considering that the search space of the feature domain is too rough and there are many subtle redundant features, the feature optimization layer goes deep into the feature level and uses the optimal loss as a measure to calculate the optimal loss for each feature. Assign a learnable gate when When , retain the characteristic elements When removing characteristic elements Get the best high-level features
[0132]
[0133] The feature collaborative enhancement layer inputs the selected high-level features into the third multi-layer perceptron MLP for processing to obtain the second long-term features, which are expressed as:
[0134]
[0135]
[0136] Among them, W 31 and W 32 represents the weight parameters of the third multi-layer perceptron MLP, represents the second long-term feature, g3 represents the nonlinear activation function; LayerNorm3 represents the layer normalization processing;
[0137] The feature fusion layer is used to concatenate the second long-term feature and the optimal feature to obtain the user's long-term interest feature, which is expressed as:
[0138]
[0139] in, Represents the user's long-term interest characteristics.
[0140] In this embodiment, the long-term interest capture module proposes a feature screening method to generate high-quality feature representation, thereby improving the accuracy of user preference prediction while reducing training complexity.
[0141] Preferably, the prediction module uses a fourth multi-layer perceptron MLP and an output layer;
[0142] The fourth multi-layer perceptron MLP is used to interactively learn the concatenated features of the user's short-term interest features and the user's long-term interest features to obtain a first comprehensive feature, which is expressed as:
[0143]
[0144] Among them, h represents the first comprehensive feature, Represents the user's short-term interest characteristics; Represents the user's long-term interest characteristics; W0 represents the learnable weight, b 0 is the bias parameter;
[0145] The output layer is used to input the first comprehensive feature into the activation function sigmoid for processing to obtain the user's preference result for the video, which is expressed as:
[0146]
[0147] in, Indicates the user's preference result for the video; w T represents the transpose of the matrix w; w represents the weight parameter matrix; b is the bias parameter; σ represents the sigmoid activation function.
[0148] In this embodiment, the preference prediction model is composed of a short-term interest capture module, a long-term interest capture module and a prediction module. In this embodiment, a cross entropy loss function is used to optimize the preference prediction model. The cross entropy loss function is expressed as:
[0149]
[0150] Among them, N is the number of training samples, y represents the true label of the user's preference, Represents the preference prediction results of the preference prediction model.
[0151] Another aspect of the present invention provides a user preference prediction device for long-term and short-term interest fusion, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor is configured to implement the user preference prediction method for long-term and short-term interest fusion when executing the computer program.
[0152] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the user preference prediction method for integrating long-term and short-term interests.
[0153] In summary, the present invention solves the heterogeneity problem of long-term and short-term interest features by proposing a long-term interest capture module and a short-term interest capture module to learn different feature interactions respectively. For short-term interest prediction, an automated and adaptive short-term interest length search algorithm is used, and the best short-term interest behavior sequence is obtained through an end-to-end optimization method to predict short-term interest preferences; at the same time, for long-term interests, a feature screening method is proposed to generate high-quality feature representations, improve the accuracy of user preference prediction, and reduce the complexity of training, thereby achieving effective user preference prediction.
[0154] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0155] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. A user preference prediction method based on long-term and short-term interest fusion, characterized in that: include: S1: Obtain a data set from a social platform and preprocess it, wherein the data set includes: user data, video data, and historical interaction data between users and videos; S2: Extract the user's short-term historical interaction behavior sequence based on the user's interaction data with the video within a short period of time T and input it into the short-term interest capture module to obtain the user's short-term interest features; S3: Inputting user data, video data, and historical interaction data between the user and the video data into a long-term interest capture module according to a feature domain composition sequence to extract the user's long-term interest features; S4: The user's short-term interest features and the user's long-term interest features are spliced and input into the prediction module to obtain the user's preference result for the video.
2. The method for predicting user preferences based on long-term and short-term interest fusion according to claim 1, characterized in that: Preprocessing of the dataset obtained from the social platform includes: removing missing values in the features and performing onehot encoding.
3. The method for predicting user preferences based on long-term and short-term interest fusion according to claim 1, characterized in that: The user data includes: a plurality of user features, each user feature including one of a user ID, a number of fans of the user, a number of followers of the user, and a number of days the user has registered; The video data includes a plurality of video features, each of which includes one of a video ID, a video author ID, a video visibility status, and a video duration; The historical interaction data between the user and the video includes multiple interaction features, each interaction feature includes one of the interaction time between the user and the video, whether the user comments on the video, whether the user collects the video, whether the user likes the video, and whether the user shares the video; wherein each user feature, video feature, and interaction feature is respectively used as a feature domain, and n feature domains are constructed.
4. The method for predicting user preferences by integrating long-term and short-term interests according to claim 3, characterized in that: The user's short-term historical interaction behavior sequence includes: Among them, S u represents the short-term historical interaction behavior sequence of user u, represents the video of user u interacting at time t, and T represents the length of the user's short-term historical interaction behavior sequence.
5. The method for predicting user preferences by integrating long-term and short-term interests according to claim 4, characterized in that: The short-term interest capture module includes: an embedding layer, an FC layer, a multi-granularity timing builder, a feature collaborative enhancement layer, and a multi-granularity timing optimization layer; The embedding layer uses a lookup table to find each video All corresponding video features and video All users who interact with the video Each interacting user further searches for all user features of the user, converts all the video features and user features found into low-dimensional dense embedding vectors through linear layers, and then concatenates all the embedding vectors to obtain the video The first intermediate feature c t , expressed as: Where D represents the dimension of the first intermediate feature; The FC layer fuses the first intermediate features of the videos interacted by user u at T different times into an embedding table of size T×D to obtain the second intermediate feature C, which is expressed as: The multi-granularity timing builder is based on the predefined M candidate sequence lengths {J1, J2, ..., J a ,...,J M } In the time dimension T, the features corresponding to the length of the candidate sequence are respectively intercepted from the second intermediate features to obtain M third intermediate features, which are expressed as: in, represents the ath third intermediate feature, J a represents the length of the a-th candidate sequence, J a is an integer greater than or equal to 1 and less than T; The feature collaborative enhancement layer includes: a first multi-layer perceptron MLP and a second multi-layer perceptron MLP; the feature collaborative enhancement layer first inputs the M third intermediate features after the transposition processing into the first multi-layer perceptron MLP for processing to obtain M fourth intermediate features, which are expressed as: in, represents the ath fourth intermediate feature, W 11 and W 12 represents the weight parameter of the first multi-layer perceptron MLP, g1 represents the nonlinear activation function; LayerNorm1 represents the layer normalization processing; Secondly, the M fourth intermediate features after transposition processing are respectively input into the second multi-layer perceptron MLP for processing to obtain M fifth intermediate features, which are expressed as: Among them, W 21 and W 22 represents the weight parameters of the second multi-layer perceptron MLP, represents the ath fifth intermediate feature, g2 represents the nonlinear activation function; LayerNorm2 represents the layer normalization processing; The multi-granularity timing optimization layer assigns a weight parameter to each of the M fifth intermediate features, multiplies each fifth intermediate feature by its corresponding weight parameter, and inputs the result into Softmax to predict the probability that the fifth intermediate feature is the optimal feature, and selects the fifth intermediate feature with the highest probability as the user's short-term interest feature.
6. The method for predicting user preferences by integrating long-term and short-term interests according to claim 3, characterized in that: The input sequence z of the long-term interest capture module is expressed as: z=[z1,z2,...,z i ,...With n ] T Among them, z i represents the i-th feature domain; n represents the number of feature domains; x ik represents the kth eigenvalue in the i-th feature domain, m i represents the number of eigenvalues in the i-th feature domain, and T represents the matrix transpose.
7. The method for predicting user preferences by integrating long-term and short-term interests according to claim 6, characterized in that: The long-term interest capture module includes: an embedding layer, a feature optimization layer, a feature collaborative enhancement layer and a feature fusion layer; The embedding layer is used to linearly transform the input sequence z into a low-dimensional dense vector space to obtain the first long-term feature, which is expressed as: yes i =with i ×E i e=[e1,e2,...,e n ] in, represents the first long-term characteristic, represents the embedding table, and D represents the embedding dimension; The feature optimization layer is each feature e in the first long-term feature i Assign a learnable binary gate from feature e i Select some feature elements as advanced features The feature collaborative enhancement layer inputs the selected high-level features into the third multi-layer perceptron MLP for processing to obtain the second long-term features, which are expressed as: Among them, W 31 and W 32 represents the weight parameters of the third multi-layer perceptron MLP, represents the second long-term feature, g3 represents the nonlinear activation function; LayerNorm3 represents the layer normalization processing; The feature fusion layer is used to concatenate the second long-term feature and the optimal feature to obtain the user's long-term interest feature, which is expressed as: in, Represents the user's long-term interest characteristics.
8. The method for predicting user preferences by integrating long-term and short-term interests according to claim 2, characterized in that: The prediction module uses a fourth multi-layer perceptron MLP and an output layer; The fourth multi-layer perceptron MLP is used to interactively learn the concatenated features of the user's short-term interest features and the user's long-term interest features to obtain a first comprehensive feature, which is expressed as: Among them, h represents the first comprehensive feature, Represents the user's short-term interest characteristics; Represents the user's long-term interest characteristics; W 0 represents the learnable weight, b 0 is the bias parameter; The output layer is used to input the first comprehensive feature into the activation function sigmoid for processing to obtain the user's preference result for the video, which is expressed as: in, Indicates the user's preference result for the video; w T represents the transpose of the matrix w; w represents the weight parameter matrix; b is the bias parameter; σ represents the sigmoid activation function.
9. A user preference prediction device for long-term and short-term interest fusion, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: The processor is configured to implement a user preference prediction method for integrating long-term and short-term interests according to any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it can implement a user preference prediction method for integrating long-term and short-term interests as described in any one of claims 1 to 8.
Citation Information
Patent Citations
User interest preference capturing method
CN112733030A
E-commerce platform session awareness recommendation prediction method based on long and short term interests
CN115293812A
Interest label learning method based on long-term and short-term behaviors
CN117573972A
