Video recommendation method and system based on mixed feedback and time sequence

By introducing the CAT-DIENRec model into the video recommendation system, combining explicit and implicit feedback, using the Transformer and cross-attention mechanism to extract user interest status, and predicting interest evolution through the AUGRU model, it solves the problem of user interest in the existing technology. Addresses the issue of bias in status descriptions and achieves more accurate video recommendation results.

CN119357428AActive Publication Date: 2025-01-24ZHENGZHOU UNIVERSITY OF LIGHT INDUSTRY

Patent Information

Application Number
CN202411326989.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-01-24
Estimated Expiration
2044-09-23

AI Technical Summary

Technical Problem

Existing video recommendation methods mainly rely on a single feedback method, resulting in bias in depicting user interest status and inability to accurately capture user instantaneous and long-term interests.

Method used

Put forward a video recommendation method based on mixed feedback and time sequence, adopt the Cat-DienRec model, use the combination of explicit feedback and hidden feedback, use the Transformer model and cross-attention mechanism Evolution forecast.

Benefits of technology

Improving the capture ability of the model to the status of user interest, enhancing feature extraction and long -distance dependencies, and can more accurately recommend videos that users are interested in.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357428A_ABST
    Figure CN119357428A_ABST
Patent Text Reader

Abstract

The invention provides a video recommendation method and system based on mixed feedback and a time sequence, and the method comprises the steps: extracting a user behavior feature, a platform target, a context feature and a user portrait feature; respectively obtaining an explicit feedback embedding vector and an implicit feedback embedding vector; the platform target, the context features and the user portrait features are coded and converted into corresponding embedded vectors; performing cross attention calculation on the explicit feedback embedding vector and the implicit feedback embedding vector on the basis of a Transform model adopting time sequence coding; performing attention score calculation by using the user interest state and a platform target, and calculating the attention score and the user interest state based on an AUGRU model to obtain an AUGRU model output interest state sequence; and integrating an interest state sequence output by the AUGRU model with a platform target, and outputting a recommendation list. According to the method, the feature extraction and long-distance dependence capability of the model is improved, and the instantaneous interest and long-term interest of the user are better captured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of recommendation systems, and in particular to a video recommendation method and system based on mixed feedback and time series. Background Art

[0002] In recent years, short videos have gradually emerged and become popular. Short video platforms such as Tiktok and Kuaishou have huge user volumes and traffic. Faced with huge user volumes and traffic, the recommendation system (RS) has become a key technology in this field. In recent years, researchers have developed a variety of recommendation system methods, all of which are dedicated to building user portraits through user feedback to achieve better recommendations and achieve some of the platform's goals.

[0003] Early recommendation models evolved from collaborative filtering (CF) and matrix decomposition (TF) based methods to logistic regression algorithms that integrate multiple features, and developed some deep learning based methods, such as the AFM model that first introduced the attention mechanism. In recent years, researchers have proposed a variety of new recommendation system models, such as the Self-Attentive Sequential Recommendation (SASRec) model, the BERT4Rec model, and the Deep Interest Network (DIN) and Deep Interest Evolution Network (DIEN) models proposed by Alibaba. These recommendation models in the field of short videos all want to achieve the goals of short video platforms by interpreting user behavior, such as pursuing more user retention, higher user engagement, and longer viewing time. Among them, the DIEN model has been recognized by many researchers because it proposes the idea of ​​learning the evolution process of user interests and predicting user interests. For example, W Xu et al. introduced a hierarchical attention network based on it and proposed a deep interest prediction model with a hierarchical attention network. Feng et al. introduced Bi-LSTM based on it and proposed a deep conversational interest network. Shi et al. used a neural network to continuously model the evolution of interests and proposed a deep time stream framework.

[0004] In actual applications, users have two ways to participate in feedback. One is to provide explicit feedback through interactive behaviors such as likes, comments, and follows. These explicit feedbacks have been widely used as indicators of user preferences. Although these immediate feedbacks are effective, the explicit feedbacks brought by these interactive behaviors are somewhat random, and they provide limited insights into users' long-term impressions. In some cases, they may mislead the indication of content quality. For example, content with eye-catching titles but poor content quality may initially attract attention and receive positive feedback, but ultimately abuse the trust of users and lead to reduced user retention and engagement. At this time, another user feedback method is introduced, which is to provide implicit feedback through the length of time users watch videos, but implicit feedback itself is not completely reliable. For example, watching a 60-second video for 20 seconds does not bring stronger preference than repeatedly watching a 5-second video for 15 seconds, although the former has more viewing time. Therefore, directly extracting preference information from user feedback as a user's interest tag may produce bias against user interests. Therefore, some methods have been born to try to optimize the original feedback to eliminate the bias caused by the unreliability of the original feedback, but the disadvantage of this method is that it requires a lot of manual work and may not be compatible with the platform goals.

[0005] The invention patent with announcement number CN108875022B discloses a video recommendation method and device. The deep learning model obtained through training can make the predicted click-through rate of at least one first video in the video test set that is exposed but not clicked by the user greater than the preset click-through rate threshold. The first video with a predicted click-through rate greater than the click-through rate threshold is a video related to at least one second video in the video test set that is exposed and clicked by the user, and the click-through rate of the first video is less than the click-through rate of the second video. In this way, the deep learning model can select videos with higher click-through rates and lower click-through rates that match the user's interest points from the candidate recommended videos, and then recommend them to the user. Therefore, the video recommendation method provided by the above application can not only recommend videos that users like from the candidate recommended videos, but also solve the problem of cold start of new videos. However, this method only uses the method of displaying feedback for recommendation, and cannot accurately capture the user's interest status.

[0006] People have a variety of interests. At the same time, people may have many different interests. This situation can be described by "interest state". Secondly, each interest is changing dynamically and has its own evolution process. Third, the development of interest has certain causes and consequences (before and after correlation). Finally, interests will drift, that is, at each moment, each user's interest may be transformed into behavior. You may watch basketball-related videos for a period of time, and suddenly switch to watching calligraphy-related videos. However, due to some limitations of past models, it is only possible to predict the overall preferences of users based on a large number of historical behavior sequences of users, but not to predict the "next" preferences of users. Summary of the invention

[0007] In view of the technical problem that most video recommendation methods are single feedback and have a biased description of user interests, the present invention proposes a video recommendation method and system based on hybrid feedback and time series. The present invention proposes a model CAT-DIENRec (Cross Attention Transformer-Deep Interest Evolution NetworkRecommendation), which realizes the hybrid construction of user interest status using two feedback methods, and improves the feature extraction and long-distance dependency capabilities of the model, so as to better capture the user's instantaneous interest and long-term interest.

[0008] In order to achieve the above object, the technical solution of the present invention is achieved as follows:

[0009] A video recommendation method based on mixed feedback and time series includes the following steps:

[0010] S1: Obtain candidate videos, user information, and user interaction behavior information, and extract user behavior features, platform goals, context features, and user portrait features based on the candidate videos, user information, and user interaction behavior information;

[0011] S2: Divide the user behavior features into explicit feedback and implicit feedback, use word embedding to encode the explicit feedback and implicit feedback respectively, and obtain explicit feedback embedding vector and implicit feedback embedding vector respectively; encode the platform goals, context features, and user portrait features respectively and convert them into corresponding embedding vectors;

[0012] S3: Based on the Transformer model with time series encoding, cross-attention calculation is performed on the explicit feedback embedding vector and the implicit feedback embedding vector to obtain the user interest state;

[0013] S4: Calculate the attention score using the user's interest state and the platform goal, calculate the attention score and the user's interest state based on the AUGRU model, and obtain the AUGRU model output interest state sequence;

[0014] S5: Integrate and output the interest state sequence output by the AUGRU model with the embedding vectors corresponding to the platform goal, context features, and user portrait features, respectively, to obtain the probability value that the user is interested in the candidate video, and output a recommendation list based on the probability value that the user is interested in the candidate video.

[0015] The method of obtaining the explicit feedback embedding vector and the implicit feedback embedding vector respectively in step S2 is as follows: the user behavior feature is divided into the explicit feedback b caused by the user's interactive behavior i =[b i (1),b i (2),...,b i (t),...,b i (T-1),b i (T)] and the implicit feedback from the user’s viewing time b d =[b d (1),b d (2),...,b d (t),...,b d (T-1),b d (T)], based on the category, the explicit feedback b i and implicit feedback b d Perform word embedding to obtain explicit feedback word embedding vector e i =[e i (1),e i (2),...,e i (t),…,e i (T-1),e i (T)] and the implicit feedback word embedding vector e d =[e d (1),e d (2),...,e d (t),…,e d (T-1),e d (T)], where e i (t), e d (t) respectively represent the explicit feedback word embedding vector and the implicit feedback word embedding vector at the t-th moment, and T represents the final moment; the process of encoding the platform goals, context features, and user portrait features is: after One-hot encoding the platform goals, context features, and user portrait features, they are directly encoded in the Embeding layer and converted into embedding vectors.

[0016] The method for calculating the cross attention of the explicit feedback embedding vector and the implicit feedback embedding vector based on the Transformer model using time series encoding described in step S3 is as follows: in the encoder part of the Transformer model, accurate time information is used to replace the original position encoding, firstly, accurate time features are extracted from the timestamp of the user behavior feature, the time features are periodically encoded, and the extracted time features are respectively combined with the explicit feedback word embedding vector e after linear transformation. i and the implicit feedback word embedding vector e d The dimensions of are matched and summed up respectively to obtain the explicit feedback embedding vector Te with time series information i and the implicit feedback embedding vector Te with time series information d , and then undergo linear transformation to obtain the explicit feedback embedding vector Te with time series information i Query Q i , key Ki and value V i and the implicit feedback embedding vector Te with time series information d Query Q d , key K d Sum value V d ; query Q i With query Q d To exchange, query Q d , key K i Sum value V i And query Q i , key K d Sum value V d is the input of the multi-head attention in the encoder, which is calculated by the encoder and decoder to obtain the explicit feedback probability distribution Hi and the implicit feedback probability distribution Hd respectively, and the explicit feedback probability distribution Hi and the implicit feedback probability distribution Hd are weighted summed to obtain the user interest state h t .

[0017] The method for calculating the attention score using the user's interest state and the platform target in step S4 is as follows: first, the interest state h is calculated. t The correlation score e at the tth time step with the platform target t :

[0018] e t =v T tanh(W3h t +W4q+b3)

[0019] Among them, q represents the embedding vector of the currently recommended platform target, W3 and W4 are the weight matrices of the projection, v is a learnable weight parameter, tanh represents the activation function, and b3 is the bias term;

[0020] Then the attention weight is normalized to get the attention score a t :

[0021]

[0022] Exp(e t ) means converting the correlation score into a positive number, e j represents the relevance score at the j-th time step.

[0023] The method for calculating the attention score and the user interest state based on the AUGRU model in step S4 is as follows: first, the user's displayed feedback and implicit feedback at time t are concatenated to obtain the current time step input x t , the update gate passes the current time step input x t and the state of interest h at the previous time step t-1 , calculate the state of interest h from the previous time step t-1 To the state of interest h at the current time step t Historical information that should be retained t , through the external attention weight u t Dynamically adjust the update gate according to the current time step input x t and the state of interest h at the previous time step t-1 Compute candidate hidden states Based on the candidate hidden state and historical information t Calculate the output state of interest h' t Finally, we get the state sequence of interest h′=[h'1,h'2,...,h' T ].

[0024] The current time step input x t The calculation formula is: t =Concat(b i ,b d ); the historical information z t The calculation formula is: t =σ(W z [x t ,h t-1 ]+b z ), where W z and b z is the weight and bias of the update gate, σ is the activation function; the formula for dynamically adjusting the update gate is: Candidate hidden states The calculation formula is: Among them, W h and b h is the weight and bias calculated for the candidate hidden state, tanh is the activation function, r t is the reset gate, r t =σ(W r [x t ,h t-1 ]+b r ), W r and b r To reset their weights and biases; the output state of interest h' t The calculation formula is:

[0025] The method for integrated output described in step S5 is: encode the interest state sequence h′ obtained by the AUGRU model with the platform goal, context feature and user portrait feature, respectively obtain the embedded vectors, perform concat operation to obtain a comprehensive feature vector representation x, and then enter the fully connected layer to perform a linear transformation y2=W5x+b4 on the comprehensive feature vector representation x, W5 is the weight matrix, b4 is the bias vector, and then perform a nonlinear transformation on the output y2 of the fully connected layer through the PReLU or Dice activation function, and finally convert the output of the PReLU or Dice activation function into a probability value of the user's interest in the candidate video through the Sigmoid function.

[0026] The PReLU activation function is:

[0027] y3=max(0,y2)+αmin(0,y2)

[0028] The Dice activation function is:

[0029] y3=p·y2+(1-p)·w6y2

[0030] Among them, p is the activation probability and W6 is a learnable parameter.

[0031] A video recommendation system based on mixed feedback and time series, comprising a behavior sequence layer, an interest extraction layer, an interest evolution layer and an output layer connected in sequence;

[0032] Behavior sequence layer: used to divide user behavior features into explicit feedback and implicit feedback, and use word embedding to encode explicit feedback and implicit feedback respectively, and obtain explicit feedback embedding vector and implicit feedback embedding vector respectively; encode platform goals, context features, and user portrait features respectively and convert them into corresponding embedding vectors;

[0033] Interest extraction layer: used to perform cross-attention calculation on explicit feedback embedding vectors and implicit feedback embedding vectors based on the Transformer model using time series encoding to obtain the user's interest status;

[0034] Interest evolution layer: used to calculate the attention score using the user's interest state and the platform goal. The attention score and the user's interest state are calculated based on the AUGRU model to obtain the AUGRU model output interest state sequence.

[0035] Output layer: It is used to integrate and output the interest state sequence output by the AUGRU model with the dense vectors corresponding to the platform goals, context features, and user portrait features, obtain the probability that the user is interested in the candidate video, and output the recommendation list based on the probability that the user is interested in the candidate video.

[0036] The loss function L during the video recommendation system training process is:

[0037] L=L target +β*L aux

[0038] Among them, L target is the cross entropy loss after full connection, L aux is the designed auxiliary loss, β is the auxiliary loss weight;

[0039] The cross entropy loss is:

[0040]

[0041] Among them, y j It is the real behavior of users. is the probability σ(y3) that the model predicts that the user is interested in the candidate video, N is the sum of the samples, and j=1 to N represents all the samples at this moment.

[0042] The auxiliary loss of the design is:

[0043]

[0044] in, Indicates the user's real behavior at the next moment. The behavior obtained by negative sampling, σ is the Sigmoid function.

[0045] The beneficial effects of the present invention are:

[0046] 1) In order to solve the problem of single feedback, the core role of explicit and implicit hybrid feedback mechanisms is particularly emphasized in the present invention, which is crucial for constructing and refining user interest status. Explicit feedback such as users' likes, comments, shares, and following behaviors directly reflect users' preferences, but these feedbacks are often immediacy and superficial, and may not fully represent users' long-term interests and deep needs. In contrast, implicit feedback such as viewing time, browsing path, and page dwell time, although not directly expressing users' intentions, can provide more detailed insights and reflect users' potential interests and habits.

[0047] 2) In order to improve the long-distance dependency capability of the model, the present invention uses the Transformer structure, which has demonstrated excellent capabilities in processing complex sequence data. The core feature of the Transformer structure is its self-attention mechanism, which can effectively solve the long-distance dependency problem encountered by traditional sequence processing models such as recurrent neural networks (RNNs) and long short-term memory networks (LSTMs) when processing long sequence data.

[0048] 3) In order to further refine the analysis of user behavior data and improve the accuracy of feature extraction, the present invention incorporates a cross-attention mechanism into the model. This mechanism is an innovative extension of the traditional self-attention framework, allowing the model to focus more on the information most relevant to the current recommendation task when processing user behavior data. The introduction of the cross-attention mechanism is particularly suitable for complex recommendation system environments, where user behavior data often involves multiple types of interactions, and each type of data may have different importance in affecting the prediction task. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 It is the overall framework diagram of the CAT-DIENRec model of the present invention.

[0051] Figure 2 This is a diagram of the Transformer architecture of the present invention.

[0052] Figure 3 This is the architecture diagram of the cross-attention mechanism of the present invention.

[0053] Figure 4This is a structural diagram of the AUGRU (Attention-based Gated Recurrent Unit) module of the present invention.

[0054] Figure 5 It is a schematic diagram of the auxiliary loss structure of the present invention.

[0055] Figure 6 The present invention uses four evaluation indicators, namely, recall index NDCG, user usage time DS, user engagement IR and user retention PTR, to evaluate the popular recommendation system model. DETAILED DESCRIPTION

[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] like Figure 1 As shown, a video recommendation system based on hybrid feedback and time series includes: a behavior sequence layer, an interest extraction layer (Interest Extractor), an interest evolution layer and an output layer connected in sequence.

[0058] The main function of the behavior sequence layer is to receive and organize the user's historical behavior data to form a time series, which includes the user's viewing, liking and other behaviors. This layer is the basic input part of the model, which is used to obtain the user's historical behavior sequence and prepare to provide basic data for subsequent interest extraction and evolution modeling.

[0059] The interest extraction layer processes the user's historical behavior sequence to extract the user's interest status at different times. The purpose is to capture the user's interest status in different items over a period of time and compress the long-term behavior sequence into a more concentrated interest state for easy processing by subsequent layers.

[0060] The interest evolution layer captures the dynamic evolution of user interest status over time through further sequence modeling. This layer focuses on how user interest status changes over time and with new behavior inputs. This layer can identify the direction and trend of user interest status changes, helping the model predict the user's next behavior or interest point.

[0061] The output layer is used to fuse the user interest representation obtained from the interest evolution layer with other auxiliary features (such as user profile, context information, etc.) and finally generate output for prediction. These layers play a key role in the final prediction stage of the model, responsible for mapping high-dimensional feature vectors into specific recommendation scores or categories.

[0062] like Figure 1 As shown, a video recommendation method based on mixed feedback and time series includes the following steps:

[0063] S1: Obtain candidate videos, user information, and user interaction behavior information, and extract user behavior features (duration and interaction), platform objects, context features, and user profile features based on the candidate videos, user information, and user interaction behavior information.

[0064] User behavior features include user behavior data within a specific time period, such as video viewing time, likes, comments and other interactive behaviors. The duration feature is to calculate the user's dwell time when browsing a certain product or page. This duration feature is normalized or binned to form a category feature or continuous feature, while the interactive feature is to extract the user's specific interactive behavior, such as the number of clicks, the number of purchases, etc. These user behavior features can be directly used as elements in the behavior sequence. These user behavior features help the model understand the evolution of users' short-term and long-term interests. These user behavior features are processed through the sequence model to capture the dynamic characteristics of user interests over time. By analyzing the user's behavior patterns, the model can predict the content that the user may be interested in in the future and make personalized recommendations.

[0065] The platform goal refers to the effect that the model is expected to achieve after trying to recommend. Combining some previous studies on video recommendation, three indicators are used as platform goals: user usage time, user engagement, and user retention. The first two indicators are mainly derived from the total viewing time of users and the number of user interactions, and the third indicator is affected by the user's interest in the recommended content;

[0066] Contextual features refer to environmental information related to the current behavior, such as time, location, device type, etc. The contextual information of the user's behavior, including timestamp, geographic location, device type, network status, etc., is collected and encoded;

[0067] User profile features include static information about the user, such as age, gender, membership level, etc. These features reflect the user's long-term preferences and attributes. User registration information, historical behavior, and external data sources collect user profile data. This data is usually static or updated less frequently, and is then encoded.

[0068] S2: Divide the user behavior features into explicit feedback and implicit feedback, use word embedding to encode the explicit feedback and implicit feedback respectively, and obtain the explicit feedback embedding vector and implicit feedback embedding vector respectively; perform One-hot encoding on the platform goals, context features, and user portrait features, and then directly encode them in the Embedding layer to convert them into embedding vectors.

[0069] In the behavior sequence layer of the CAT-DIENRec model, the user behavior features are divided into explicit feedback from the user’s interactive behavior. i =[b i (1),b i (2),...,b i (t),...,b i (T-1),b i (T)] and the implicit feedback from the user’s viewing time b d =[b d (1),b d (2),...,b d (t),...,b d (T-1),b d (T)] respectively for explicit feedback b i and implicit feedback b d Word embedding is performed. Here, category embedding is used. For applications such as recommendation systems, category features such as user ID and product ID are mapped to low-dimensional vectors through an Embedding layer. This vector is learned to represent the correlation between categories, and the explicit feedback word embedding vector e is obtained. i =[e i (1),e i (2),...,e i (t),…,e i (T-1),e i (T)] and the implicit feedback word embedding vector e d =[e d (1),e d (2),...,e d (t),…,e d (T-1),e d (T)], where e i (t), e d(t) represents the explicit feedback word embedding vector and implicit feedback word embedding vector at the t-th moment, and T represents the final moment.

[0070] Explicit Feedbackb i and implicit feedback b d It represents two behaviors of users from time 1 to T, which are reflected in the viewing time and whether interaction occurs.

[0071] Explicit feedback word embedding vector e i and the implicit feedback word embedding vector e d It represents the encoding vector obtained after encoding the user behavior features from the first moment to the Tth moment.

[0072] S3: Based on the Transformer model with time series encoding, cross-attention calculation is performed on the explicit feedback embedding vector and the implicit feedback embedding vector to obtain the user interest state.

[0073] Transformer is a deep learning model whose core feature is to process sequence data using a self-attention mechanism, which allows the model to process data without any recurrent (RNN) or convolutional (CNN) structures. The input of the Transformer model is word embedding vectors, which add positional information to the sequence through positional encoding. Positional encoding uses different frequencies of sine and cosine functions to encode positions, and these frequencies vary with position. The self-attention mechanism allows each position of the input sequence in the model to pay attention to other positions. This process involves calculating the relationship between the query, key, and value to determine the degree of influence between each position. The calculation of self-attention includes dot product and softmax function to generate the final attention weight. The Transformer model has an encoder and decoder structure. Each encoder includes multiple encoding layers, and each decoder includes multiple decoding layers. Each encoder layer includes two main parts: a multi-head self-attention layer and a feedforward neural network. Each part is equipped with residual connections and layer normalization to help improve the stability and efficiency of training. In the multi-head attention mechanism, attention is divided into multiple heads, and each head processes different parts of the input data. This allows the model to obtain information from different representation subspaces at the same time. Behind each multi-head attention layer, there is a feedforward neural network that processes the vector at each position independently. The decoder includes layers similar to the encoder, but in each decoder layer, an encoder-decoder attention layer (cross attention layer in the present invention) is added, which helps the decoder focus on the relevant parts of the encoder output. Finally, the output is processed, and the output of the decoder is converted into a final probability distribution through a linear layer and a softmax layer. This distribution indicates the possibility of the next word. It can be seen that the Transformer model optimizes parallel processing capabilities through these designs and significantly improves the model's ability to handle long-distance dependencies. This structure is particularly suitable for complex sequence processing tasks such as machine translation, text generation, and interest state prediction.

[0074] Because we want to correctly extract the user's interest status at each moment from the user's behavioral characteristics, we need to introduce a Transformer network that can process time series. During the training process, the implicit feedback word obtained in the lower layer is first embedded into the vector e d and the explicit feedback word embedding vector e i They are respectively passed into the encoder of the Transformer model for learning, and the cross-attention mechanism is referenced when they are respectively passed into the self-attention mechanism of the encoder of the Transformer to exchange the query matrices generated by them.

[0075] The input of the Transformer model is an embedding vector, which increases the position information of the sequence through position encoding. However, the present invention cancels the position encoding of the Transformer and directly uses the correct time series encoding as a substitute.

[0076] In the Interest Extractor layer of the CAT-DIENRec model;

[0077] like Figure 2 As shown in FIG. 1 , the method for processing sequence data of explicit feedback embedding vector and implicit feedback embedding vector respectively based on the Transformer model using time series encoding is as follows: in the encoder part of the Transformer model, accurate time information is used to replace the original position encoding, firstly, accurate time features are extracted from the timestamp of user behavior, these time features are periodically encoded, and the extracted time features are linearly transformed and combined with the explicit feedback word embedding vector e i and the implicit feedback word embedding vector e d The dimensions of are matched and then summed to obtain a new explicit feedback embedding vector Te with time series information i and the implicit feedback embedding vector Te with time series information d , and respectively obtain the explicit feedback embedding vector Te with time series information after linear transformation i Query Q i , key K i Sum value V i and the implicit feedback embedding vector Te with time series information d Query Q d , key K d Sum value V d ;like Figure 3 As shown, the explicit feedback is embedded in the vector e i and the implicit feedback embedding vector e d The queries Q generated after being passed into the Transformer model represent explicit feedback. i Query Q with implicit feedback d By exchanging, the two behaviors of the user and their impact on long-term and short-term interests can be taken into account during the learning process of Transformer. d , key K i Sum value V i And query Q i , key K d Sum value V d For input.

[0078] The subsequent calculation process in the two Transformer models is the same. Here we take the subsequent calculation of the explicit feedback embedding vector as an example;

[0079] First is the encoder part: In the first layer of encoding, we get the query Q d , key K i Sum value V i After that, multi-head attention calculation is performed. Multi-head attention calculation allows each position in the input sequence to pay attention to other positions. For the input matrix, different linear transformation matrices are used to project it into the query, key, and value spaces. This step generates separate query, key, and value vectors for each head.

[0080] Each head of the multi-head attention is a self-attention calculation, which will go through three steps of Scale, Softmax, and MatMul to calculate the attention output.

[0081] First, in the Scale operation, query Q d and key K i The dot product result is scaled to prevent the vector dimension from being too large and causing numerical instability, so that the attention score remains in a reasonable range. The formula is:

[0082]

[0083] d k is the dimension of the key, which is used to scale the size of the dot product to prevent excessive values ​​from causing the softmax function to enter a region with a small gradient. Softmax (normalization) is then performed to obtain the attention weight, which is formulated as:

[0084] AttentionWeights i =Softmax(ScaledScores i )

[0085] Finally, MatMul (matrix multiplication) combines the attention weight with the value V i Multiply them together to get the attention output of each head, and the formula is:

[0086] AttentionOutput i =AttentionWeights i ·V i

[0087] The above calculation process is the calculation process of multi-head attention calculation:

[0088]

[0089] The multi-head attention then concatenates the outputs of all heads and maps them back to the original dimensions of the model through a linear layer:

[0090] MultiHead(Q d ,K i ,V i )=Concat(head1,head2,...,head i ,...,head n )W

[0091] W is the final linear transformation matrix used to map the concatenated output back to the dimensions of the model.

[0092] The output of the multi-head attention is then residually connected to the original input and layer normalized to obtain the output O1:

[0093] O1=LayerNorm(Te i +MultiHead(Q d ,K i ,V i ))

[0094] Residual connections facilitate the direct flow of information and prevent gradient vanishing, while layer normalization is to ensure the numerical stability of each layer.

[0095] After the output of the multi-head attention mechanism, the next step in the Transformer model is the Feed-Forward Neural Network layer I (FFN), which performs independent nonlinear transformations on the vectors at each position to further extract features and enhance the expressiveness of the model. In the feed-forward neural network, first, the ReLU activation function is applied to the output O1 to perform the first layer of linear transformation:

[0096] h=ReLu(W1O1+b1)

[0097] Next, the vector h after the activation function is transformed by a second linear transformation and retracted back to the original embedding dimension:

[0098] y1=W2h+b2

[0099] Finally, Add&Norm (residual connection and layer normalization)

[0100] O2=LayerNorm(O1+y1)

[0101] After completing the above steps, the encoder output features are obtained through calculations in multiple encoding layers. Then, the encoder output features are linearly transformed to obtain the query, key K1 and value V1 corresponding to the encoder output features, which are input into the multi-head cross attention layer of the decoder.

[0102] In the decoder part: In the first layer of the decoder, the features of the candidate videos (including the historical recommendations or generated sequences before the decoder) are embedded and time-encoded to obtain the decoder input features, which are then passed to the decoder. These embeddings help the decoder to refer to the information of different candidate videos during the prediction process. First, the decoder input features are linearly transformed to generate the query Q z , key K z Sum value V z , and sent to the calculation of the masked multi-head. The calculation of each decoding layer of the masked multi-head is similar to the multi-head attention mechanism, but after each self-attention scale, a masked process is added:

[0103] Apply masks as needed to cover up the parts that do not need attention to ensure that the model focuses on the relevant content. The formula is:

[0104]

[0105] MaskedScore=ScaledScores+Mask

[0106] d z Yes Key K z Dimension, apply Softmax to the masked score matrix to get the attention weights, which are used to measure the degree of attention of the current query vector to other key vectors.

[0107] AttentionWeights=Softmax(MaskedScore)

[0108] And the attention weight matrix and the value vector matrix V z Multiply them together to get the attention output. This output reflects the weighted combination of different positions in the input sequence to get the attention output. Multiple heads (multiple independent attention calculations) perform the above steps in parallel, and each head gets an attention output. The outputs of all heads are concatenated and converted to the final output through an Add&Norm layer.

[0109] Then, the query Q2 obtained by the result of the masked multi-head attention calculation and the key K1 and value V1 obtained by the encoder output features are used for the multi-head cross attention calculation of the encoder and decoder. The process of the multi-head cross attention calculation is the same as that of the encoder.

[0110] The output features of the multi-head cross attention calculation are concatenated (Add) and layer normalized (Norm), and then residually connected with the results of the masked multi-head attention calculation. Then, they pass through a feedforward neural network layer II and concatenate (Add) and layer normalized (Norm), and then residually connected with the input of the feedforward neural network layer II. After multiple identical decoding layer calculations, the probability distribution Hi is finally obtained through a linear layer (liner) and the Softmax function.

[0111] Similarly, in the subsequent calculation of the implicit feedback embedding vector, the probability distribution Hd is obtained, and then the two probability distributions Hd and Hi are weighted averaged with a one-to-one weight to synthesize an interest state h t .

[0112] The present invention utilizes the CrossAttention mechanism at the input of the Transformer model encoder to embed the explicit feedback vector e i and the implicit feedback embedding vector e d The value Q generated after passing in represents the explicit feedback i and the value Q representing implicit feedback d The cross attention mechanism is used to achieve information fusion of the two feedback forms, so that in the process of extracting the user's interest status, both the long-term interest and the short-term interest can be well captured, thus building a more accurate portrait of the user's interest status.

[0113] S4: Calculate the attention score using the user interest state and the platform goal. Calculate the attention score and the user interest state based on the AUGRU model to obtain the AUGRU model output interest state sequence.

[0114] In the interest evolving layer, the method of calculating the attention score is divided into three steps:

[0115] First, calculate the interest state h t The correlation score e at the tth time step with the platform target t :

[0116] e t =v T tanh(W3h t +W4q+b3)

[0117] Among them, q refers to the embedding vector of the current recommended platform target (such as video), which represents the current recommended platform target, W3 and W4 are the weight matrices of the projection, v is the context vector used to map to the scalar, which is a learnable weight parameter, tanh represents the activation function, which is used to increase nonlinearity and capture complex relationships, and b3 is the bias term. Next, the attention weight is normalized to obtain the attention score:

[0118]

[0119] Here exp(e t ) is the correlation score e of time step t t Convert to a positive number, e j represents the relevance score at the j-th time step.

[0120] After obtaining the attention score, it is also necessary to add it to the GRU, that is, to embed the attention operation into the GRU update gate, and use this layer to more specifically simulate the interest evolution path related to the platform goal. GRU is a type of recurrent neural network. Like the LSTM network, it is also proposed to solve problems such as long-term memory and gradients in back propagation. Compared with the LSTM network, the use of the GRU network can achieve comparable results and is easier to train, which can greatly improve the training efficiency. Its structure is as follows: Figure 4 shown.

[0121] The GRU with attentional input (AIGRU) network is an improvement of the GRU network, which directly converts the attention score a t With interest status h t Multiply as the input of the next layer, but the effect of the AIGRU network is not good, because even if the input is reduced to 0, it can still change the hidden layer state of the GRU network, that is, even very irrelevant interests will affect the evolutionary state of interest.

[0122] As another improvement of the GRU network, the Attention based GRU (AGRU) network directly replaces the update gate with the attention score, which can alleviate the problems of AIGRU, such as the interest state h at a certain time step t It has nothing to do with the platform goal. That is, the attention score a tis 0. At this time, the hidden state of the AGRU network is directly updated with the previous moment. Similarly, if the interest state at the previous moment is also irrelevant to the current candidate ad, then continue to use the previous moment. That is to say: if the hidden state of a previous time step is related to the current platform target, in extreme cases it is very relevant, then at this time update the hidden state of the AGRU network to the current very relevant interest. Through this mechanism, AGRU can ensure that it only pays attention to the interest evolution process related to the current candidate ad. Its disadvantage is that the attention score a t After replacing the update gate, the importance of values ​​in different dimensions is ignored, because the update gate is a vector whose dot product is the state of interest h t When , the coefficients of different dimensions will be different, so that the importance of different dimensions can be maintained, but after changing to a scalar here, the attention score a t is a value, equivalent to the interest state h t Each dimension of the vector is multiplied by the same coefficient, and the importance of different dimensions is ignored.

[0123] The AUGRU model of the present invention retains the advantages of the AGRU network, and can make the interests related to the current platform target evolve reasonably without being affected by irrelevant interests; it overcomes the deficiency of AGRU that ignores the importance of maintaining interests in different dimensions, because the AUGRU model does not change the vector dimension of the update gate, it is still a vector, and each dimension can still determine the importance of the corresponding dimension of the interest. The AUGRU model can make each step of local activation strengthen the role of related interests, reduce the interference of interest drift, and help simulate the interest evolution process relative to the platform target.

[0124] In the AUGRU model, by dynamically adjusting the update gate, combined with the attention score a t , allowing the model to selectively update the user's interest status based on the relevance of the current goal. This mechanism enables the model to pay enough attention to the latest input or changes while retaining important historical information, thereby more accurately tracking and predicting changes in user interests. In this way, the AUGRU model can better capture the dynamic evolution of user interests and optimize the personalized experience of the recommendation system.

[0125] During the calculation:

[0126] First, concatenate the vectors of the two behaviors of the user at time t to obtain the current time step input x t =Concat(b i ,b d );

[0127] Then the update gate of the AUGRU model passes the current time step input x tand the state of interest h at the previous time step t-1 , the calculation determines the state of interest h from the previous time step t-1 To the state of interest h at the current time step t How much historical information should be retained? The formula is:

[0128] z t =σ(W z [x t ,h t-1 ]+b z )

[0129] The AUGRU model uses the external attention weight u t Dynamically adjust the update gate:

[0130]

[0131] Then we need a candidate hidden state The candidate hidden state is a key intermediate calculation used to update the current hidden state of the network. This mechanism enables these networks to maintain long-term dependencies and short-term correlations of information when processing sequence data. Based on the current time step input x t and the state of interest h at the previous time step t-1 The gating combination of is calculated as:

[0132]

[0133] Among them, r t is the reset gate, which determines whether the candidate state should be calculated from the state of interest h in the previous time step. t-1 How much information is retained is calculated as:

[0134] r t =σ(W r [x t ,h t-1 ]+b r )

[0135] Here σ represents the Sigmoid function, which is used to compress the linear combination of the update gate and the reset gate into the range of [0,1]. Tanh represents the hyperbolic tangent activation function, which is used to introduce nonlinearity to help the network capture complex patterns and relationships.

[0136] With the above formula, the AUGRU model state update can be expressed as:

[0137]

[0138] Finally, we get the state sequence of interest h′=[h′1,h′2,...,h′ T ].

[0139] The output state of interest h' from the AUGRU model t is a vector that represents the high-dimensional representation of the user's interest state at a specific point in time. It mainly has the following meanings:

[0140] 1. Dynamic representation of user interests:

[0141] Each h' t It represents the user's interest state for a specific goal at a given time point t. These states reflect how users' interests change over time based on their behaviors and interactions.

[0142] 2. Target-sensitive interest adjustment:

[0143] Since the AUGRU model takes into account the relevance to the platform target (through the attention score a t ), the output interest state can better reflect the user's attention and interest depth to the current recommendation target. This enables the recommendation system to more accurately predict the user's acceptance of the recommended content.

[0144] 3. Personalized recommendation input:

[0145] The interest state sequence output by the AUGRU model can be directly used as the input of the subsequent recommendation model to predict the probability of users' click-through rate or other behaviors for the recommended items, thereby supporting the generation of more personalized recommendation results.

[0146] S5: Integrate and output the interest state sequence output by the AUGRU model with the dense vectors corresponding to the platform goals, context features, and user portrait features, respectively, to obtain the probability value that the user is interested in the candidate video, and output a recommendation list based on the probability value that the user is interested in the candidate video.

[0147] The interest state sequence h′ obtained by the AUGRU model is concatenated with the embedding vectors of the platform goal, context features, and user portrait features to obtain a comprehensive feature vector representation x. This representation more comprehensively reflects the user's current state and environment. It enters the multi-layer fully connected layer (MLP) to perform a linear transformation on the input feature vector representation x:

[0148] y2=W5x+b4

[0149] W5 is the weight matrix, b4 is the bias vector, and y2 is the output vector.

[0150] There will be an activation function after the fully connected layer to introduce nonlinear factors so that the model can learn and simulate more complex functions. This step uses the PReLU or Dice activation function to perform a nonlinear transformation on the output of the fully connected layer. The PReLU activation function provides a learnable parameter for each neuron, allowing adaptive gradient transfer when the input is less than zero. The Dice activation function dynamically adjusts the activation threshold to adapt to the distribution of the input data, and is particularly suitable for processing feature data with complex distributions.

[0151] PReLu:

[0152] y3=max(0,y2)+αmin(0,y2)

[0153] α represents the learning rate, and the Dice activation function calculates an activation probability p, based on which it dynamically determines whether each neuron should be activated. The activation probability p is calculated based on the statistical information of the data (such as the mean and variance).

[0154] The Dice activation function is calculated as follows:

[0155] y3=p·y2+(1-p)·w6y2

[0156] Where W6 is a learnable parameter.

[0157] Finally, the output of the PReLU or Dice activation function is converted to a value between 0 and 1 through the Sigmoid function, indicating the predicted probability:

[0158]

[0159] According to the probability value output by the model, all candidate videos are sorted, and the items are arranged from high to low according to the probability value. Usually, the top k items (for example, the top 10) are selected as the items recommended to the user, and the user's feedback on the recommended content is collected to further train and optimize the model.

[0160] The Loss of the entire model is:

[0161] L=L target +β*L aux

[0162] Where L target is the cross entropy loss after full connection, L aux is the designed auxiliary loss, β is the auxiliary loss weight, used to balance

[0163] Balance the two losses. The formula for cross entropy loss is:

[0164]

[0165] where y j It is the real behavior of users. is the probability predicted by the model that the user is interested in the candidate video, that is, σ(y3), N is the sum of the samples, and j=1 to N represents all the samples at this moment.

[0166] Auxiliary loss design: The overall loss of the entire network is L = L target +β*L aux This is because if the user's time series is directly added to it, new problems will also arise. Here we introduce a new concept: user behavior sequence, which is to regard the user's behavior as a sequence. However, the user behavior sequence is different from the text sequence. The text sequence has clear grammatical constraints. For example, "I am a good person" is a sentence with a clear meaning. If the order is disrupted, "I am a good person" obviously has no meaning. However, the user behavior sequence, such as the behavior sequence "jeans-harem pants-wide-leg pants" and "harem pants->jeans"

[0167] There is little difference between "wide-leg pants -> wide-leg pants", which means that the user behavior sequence is not very sensitive to the order.

[0168] So the first question is the interest status h t Simply capturing the dependency of user behavior sequences cannot effectively reflect user interests. Second, user behavior feedback definitely reflects user interests. If we only rely on the loss after the last fully connected layer, we can only learn the user's final comprehensive interest (because the final comprehensive interest leads to the user's click behavior), while the interest state h t It is impossible to obtain effective supervision signal guidance. The present invention adds an auxiliary loss to the user's explicit behavior feedback to guide the learning of the intermediate state. Here, the user's interactive behavior is taken as an example. Its structure is shown in the figure. It can be seen from the figure that this is a binary classification model used to calculate the accuracy of interest extraction. It is used to make a binary classification and calculate the binary classification loss to determine whether the user is interested in the video. As a positive example, the behavior obtained by negative sampling is used as a negative example The inner product is performed with the extracted interest h(t) respectively, and then input into the designed auxiliary network to obtain the prediction result, and then log loss An auxiliary loss is calculated by using the true behavior at the next moment to supervise the accuracy of the state prediction at this moment.

[0169] The formula for auxiliary loss is:

[0170]

[0171] in, It represents the inner product, σ is the Sigmoid function, N is the sum of the samples, and j=1 to N represents all the samples at this moment.

[0172] From this loss design, it can be seen that it is to force the interest state h t (intermediate hidden state) fits the user's behavior and thus better captures the user's interests. t and The more similar they are, the larger their inner product is, so is close to 1, tends to 0; also tends to 0, so the auxiliary loss L aux tends to 0. It is consistent with minimizing the auxiliary loss L aux On the contrary, if h t and Not similar, tends to negative infinity, Also tends to negative infinity, at this time the auxiliary loss L aux tends to positive infinity.

[0173] The purpose of designing auxiliary loss is to extract the state of interest at each moment. If only the last state of interest is used for supervision, all the states of the hidden layer serve the last state, and the extracted hidden layer state is obviously distorted.

[0174] Experiments: A large number of experiments are conducted in the examples to verify the effectiveness of the proposed method. First, the dataset, experimental settings, baseline methods, and evaluation criteria used are introduced. In order to verify the high performance of the proposed method, the proposed method is compared with the existing methods, and finally the experimental results and performance analysis are given.

[0175] Dataset: We conducted extensive experiments on the real-world dataset KuaiRand, which is an unbiased sequential recommendation dataset collected from the recommendation logs of the video sharing mobile app Kuaishou. It is the first recommendation dataset that inserts millions of randomly displayed items into the standard recommendation information stream. It is also the first dataset that inserts random videos into such a video sequence recommendation scenario. This dataset has the following advantages:

[0176] This is the first sequential recommendation dataset containing millions of randomly exposed items with intervention interactions inserted in a standard recommendation source.

[0177] It has the most comprehensive additional information, including explicit user IDs, interaction timestamps, and rich user and project features.

[0178] It has 15 policies, each targeting a specific recommendation scenario in the Kuaishou App.

[0179] The present invention introduces 12 feedback signals (such as clicks, likes, and viewing time) for each interaction to describe the user's comprehensive feedback. Each user has thousands of historical interactions on average.

[0180] The details of the evaluation dataset are shown in the following table:

[0181] Table 1: Statistical details of the evaluation dataset

[0182]

[0183] The statistical information of the preprocessed data set is shown in Table 1. The data set is divided into three parts. The data of the first 10 days are the training set, the data of the middle 5 days are the test set, and the data of the last 3 days are the validation set. In addition, in order to strengthen the display feedback, when preprocessing the data set, the six display feedback items [whether to click, whether to like, whether to follow, whether to comment, whether to forward, whether to click "not interested"] are merged into one item "clfcf", where as long as "whether to click not interested" is 1, clfcl is 0, indicating that the user actively chooses not to like. When "whether to click not interested" is 0, any two of the first five items are 1 (that is, more than two interactive behaviors are generated), the user is judged to like it, and clfcf is 1.

[0184] Experimental setup:

[0185] The present invention sets the dimension of the Embedding layer in the CAT-DIENRec model to 128, and then converts it to 256 dimensions in the linear layer of the Transformer. The number of Transformer layers is set to 2, the number of heads is set to 4, the dimension of each head is 64, the dimension of the feedforward neural network is 512, the activation function in the Transformer selects the ReLu activation function, the Drop rate selects 0.1, and the hidden layer dimension in the CAT-DIENRec model is 128, which is consistent with the model dimension. Adam is selected as the optimizer in the CAT-DIENRec model, which is responsible for adjusting the weights and parameters of the model to minimize or Optimize the loss function so that the model can gradually improve its performance during training. The auxiliary loss weight β attenuation range is: {1e-2, 1e-4, 1e-6, 0}, the search learning rate α range is: {1e-1, 1e-2, 1e-3, 1e-4}, the micro-batch size range is: {512, 1024, 2048}, and the adaptation parameter (a learnable parameter designed in the model for adaptive adjustment to improve performance, mainly used for the adaptive gating parameter of AUGRU mentioned above) ranges from {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0], default = 0.5}. The training cycle is 10 rounds each time, and the training uses an early stopping strategy with a patience of 5 (Early Stopping is a technology used to prevent overfitting of machine learning models. It is also an effective resource-saving strategy. It can dynamically decide when to stop training during model training, rather than fixedly executing a preset number of training rounds (epochs). The core idea of ​​early stopping is to stop training when the performance of the model's validation set no longer improves. This can avoid overfitting on the training set and save unnecessary training time and computing resources.). The hyperparameter k of the top-k list metric is set to 10 (as mentioned above, the CAT-DIENRec model will finally get a user interest state, and then select the "several" videos with the highest correlation with this interest state for recommendation. k is the specific number, usually 10).

[0186] Evaluation indicators: In order to comprehensively evaluate the compared methods, it is necessary to use a variety of indicators to evaluate the performance of the models in terms of recommendation accuracy, user retention, engagement, and playback time. First, for recommendation accuracy, the present invention uses the NDCG@k metric, which is a widely used recall indicator in recommendation systems: it is an indicator to measure the quality of ranking, especially for evaluating the ranking results of recommendation systems. It takes into account the relevance of items in the recommendation list and their position in the list. In theory, items with high relevance should be ranked first. The value range of NDCG is usually 0 to 1, close to 1 means that the quality of the recommendation list is very high, and close to 0 means the opposite.

[0187] Since the purpose of the present invention is to achieve the platform goals, the three indicators used are: user usage time, user engagement, and user retention. Therefore, the present invention formulates three standards DS (Duration Standard), IR (Interaction Ratio) and PTR (Play Time Ratio) as measurement criteria.

[0188] For the retention goal, we pursue the maximization of diversity and project duration in the top k recommendation lists, so the evaluation uses standard deviation as a direct measurement indicator. This paper mainly measures the diversity of duration, which can reflect the degree of time deviation removal, and marks this metric as Duration Std@k (DS@k).

[0189] For engagement, we seek the ratio of users’ interactions with videos in the top k recommended lists, and set the baseline to 1. Values ​​greater than 1 indicate that the recommended content has received more interactions than the baseline level, which is a positive signal that users have a good acceptance of the recommended content. We label this metric as Play Time Ratio@k (PTR@k).

[0190] For the user's playback time, the ratio of the video playback time in the user's top k recommendation lists to the total playback time is used. The baseline is set to 1. A value greater than 1 indicates that the playback time of the recommended content is usually longer than the average level, which may mean that the user is more interested in these recommended contents. This metric is marked as Clfcf Ratio@k (CR@k).

[0191] Experimental results and analysis: This paper evaluates the overall performance of the current popular recommendation system model in this system, and the summary results are as follows:

[0192] Table 2 Comparative experimental results

[0193]

[0194]

[0195] In all evaluation aspects, the CAT-DIENRec model showed superior performance, and the NDCG@10 of the proposed model reached 0.8343, which is the highest NDCG value among all models, indicating that it performs best in the relevance and ranking quality of the recommendation list. A high NDCG value means that the recommendation system is able to put the content that the user is most likely to be interested in at the top of the list, which is crucial to the user experience.

[0196] In the other three items, CAT-DIEN achieved 77.2623 in the DS@10 indicator, which is significantly higher than DIEN and DIN. This indicator reflects the diversity of the duration of recommended content. CAT-DIEN's high score means that it can provide users with a wide range of content choices to meet different viewing preferences. This not only improves the user experience, but also helps to increase the overall user engagement time on the platform, which is a direct reflection of content diversity and user satisfaction. The score of PTR@10 is 1.152, which indicates that users interact more frequently with their recommended content compared to the baseline. This performance is better than other models such as DIEN (1.118) and DIN (1.076), highlighting the ability of the CAT-DIENRec model in stimulating user interaction. Higher interaction rates are generally associated with higher content quality and user satisfaction, indicating that CAT-DIENRec does a good job in personalized content matching.

[0197] CAT-DIEN also performed best in the CR@10 indicator, with a score of 1.125. CR@10 measures the ratio of the time users spend watching recommended content to the total viewing time. A score above 1 means that the recommended content is very attractive and can effectively encourage users to increase their viewing time. This shows that CAT-DIENRec can understand and meet the deep interests of users, and the recommended content can continue to attract users, which is crucial to improving user stickiness and platform retention.

[0198] These results are sufficient to verify two key points: 1. After the introduction of the Transformer model, the model extracts and expresses user interests more accurately. 2. The recommendation of the user's next interest is more in line with the recommendation system and is more conducive to the expression of the platform's goals.

[0199] The overall advantage of the CAT-DIENRec model lies not only in its excellent numerical performance, but also in the technology behind it—the effective combination of cross-attention and Transformer network, which makes the model excellent in capturing long-distance dependencies and understanding complex user behavior patterns. In addition, these results also suggest future research directions: such as further optimizing the cross-attention mechanism to enhance the model's response speed to users' immediate feedback, or introducing more contextual information in the model to enhance the personalization and accuracy of recommended content.

[0200] The present invention proposes a video recommendation method and system based on mixed feedback and time series, and designs a CAT-DIENRec model, including a behavior sequence layer, an interest extraction layer, an interest evolution layer and an output layer; first, an embedding layer is used in the behavior sequence layer to encode the explicit feedback and implicit feedback of users in different time series respectively; then, a Transformer model is used to learn the features of the two feedbacks respectively, and the two features are fused by using a cross attention mechanism; then a user interest state representing the user interest state is obtained through a linear layer mapping; the model's ability to depict user interests is enhanced to improve recommendation accuracy. Secondly, the attention mechanism and platform goals are used to obtain a user interest weight distribution with a greater correlation with the platform goal; in order to capture the user interest state that contributes the most to the platform goal in different time series. Finally, the AUGRU model is used in combination with the attention mechanism to infer the user's interest at the next moment, and a global model for video recommendation is obtained, which improves the long-distance dependency ability of the global model. The present invention accurately depicts the user's interest state and has excellent video recommendation performance.

[0201] 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, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A video recommendation method based on hybrid feedback and time series, characterized in that: The following steps are involved: S1: Obtain candidate videos, user information, and user interaction behavior information, and extract user behavior features, platform goals, context features, and user portrait features based on the candidate videos, user information, and user interaction behavior information; S2: Divide the user behavior features into explicit feedback and implicit feedback, use word embedding to encode the explicit feedback and implicit feedback respectively, and obtain explicit feedback embedding vector and implicit feedback embedding vector respectively; encode the platform goals, context features, and user portrait features respectively and convert them into corresponding embedding vectors; S3: Based on the Transformer model with time series encoding, cross-attention calculation is performed on the explicit feedback embedding vector and the implicit feedback embedding vector to obtain the user interest state; S4: Calculate the attention score using the user's interest state and the platform goal, calculate the attention score and the user's interest state based on the AUGRU model, and obtain the AUGRU model output interest state sequence; S5: Integrate and output the interest state sequence output by the AUGRU model with the embedding vectors corresponding to the platform goal, context features, and user portrait features, respectively, to obtain the probability value that the user is interested in the candidate video, and output a recommendation list based on the probability value that the user is interested in the candidate video.

2. The video recommendation method based on hybrid feedback and time series according to claim 1, characterized in that: The method of obtaining the explicit feedback embedding vector and the implicit feedback embedding vector respectively in step S2 is as follows: the user behavior feature is divided into the explicit feedback b caused by the user's interactive behavior i =[b i (1),b i (2),...,b i (t),...,b i (T-1),b i (T)] and the implicit feedback from the user’s viewing time b d =[b d (1),b d (2),...,b d (t),...,b d (T-1),b d (T)], based on the category, the explicit feedback b i and implicit feedback b d Perform word embedding to obtain explicit feedback word embedding vector e i =[e i (1),e i (2),...,e i (t),…,e i (T-1),e i (T)] and the implicit feedback word embedding vector e d =[e d (1),e d (2),...,e d (t),…,e d (T-1),e d (T)], where e i (t), e d (t) respectively represent the explicit feedback word embedding vector and the implicit feedback word embedding vector at the t-th moment, and T represents the final moment; the process of encoding the platform goals, context features, and user portrait features is: after One-hot encoding the platform goals, context features, and user portrait features, they are directly encoded in the Embeding layer and converted into embedding vectors.

3. The video recommendation method based on hybrid feedback and time series according to claim 2, characterized in that: The method for calculating the cross attention of the explicit feedback embedding vector and the implicit feedback embedding vector based on the Transformer model using time series encoding described in step S3 is as follows: in the encoder part of the Transformer model, accurate time information is used to replace the original position encoding, firstly, accurate time features are extracted from the timestamp of the user behavior feature, the time features are periodically encoded, and the extracted time features are respectively combined with the explicit feedback word embedding vector e after linear transformation. i and the implicit feedback word embedding vector e d The dimensions of are matched and summed up respectively to obtain the explicit feedback embedding vector Te with time series information i and the implicit feedback embedding vector Te with time series information d , and then undergo linear transformation to obtain the explicit feedback embedding vector Te with time series information i Query Q i , key Ki and value V i and the implicit feedback embedding vector Te with time series information d Query Q d , key K d Sum value V d ; query Q i With query Q d To exchange, query Q d , key K i Sum value V i And query Q i , key K d Sum value V d is the input of the multi-head attention in the encoder, which is calculated by the encoder and decoder to obtain the explicit feedback probability distribution Hi and the implicit feedback probability distribution Hd respectively, and the explicit feedback probability distribution Hi and the implicit feedback probability distribution Hd are weighted summed to obtain the user interest state h t .

4. The video recommendation method based on hybrid feedback and time series according to claim 3, characterized in that: The method for calculating the attention score using the user's interest state and the platform target in step S4 is as follows: first, the interest state h is calculated. t The correlation score e at the tth time step with the platform target t : e t =v T ·tanh(W3h t +W4q+b3) Among them, q represents the embedding vector of the currently recommended platform target, W3 and W4 are the weight matrices of the projection, v is a learnable weight parameter, tanh represents the activation function, and b3 is the bias term; Then the attention weight is normalized to get the attention score a t : Exp(e t ) means converting the correlation score into a positive number, e j represents the relevance score at the j-th time step.

5. The video recommendation method based on hybrid feedback and time series according to claim 4, characterized in that: The method for calculating the attention score and the user interest state based on the AUGRU model in step S4 is as follows: first, the user's displayed feedback and implicit feedback at time t are concatenated to obtain the current time step input x t , the update gate passes the current time step input x t and the state of interest h at the previous time step t-1 , calculate the state of interest h from the previous time step t-1 To the state of interest h at the current time step t Historical information that should be retained t , through the external attention weight u t Dynamically adjust the update gate according to the current time step input x t and the state of interest h at the previous time step t-1 Compute candidate hidden states Based on the candidate hidden state and historical information t Calculate the output interest state h′ t Finally, we get the state sequence of interest h′=[h'1,h'2,...,h' T ].

6. The video recommendation method based on hybrid feedback and time series according to claim 5, characterized in that: The current time step input x t The calculation formula is: t =Concat(b i ,b d ); the historical information z t The calculation formula is: t =σ(W z [x t ,h t-1 ]+b z ), where W z and b z is the weight and bias of the update gate, σ is the activation function; the formula for dynamically adjusting the update gate is: Candidate hidden states The calculation formula is: Among them, W h and b h is the weight and bias calculated for the candidate hidden state, tanh is the activation function, r t is the reset gate, r t =σ(W r [x t ,h t-1 ]+b r ), W r and b r To reset their weights and biases; the output state of interest h′ t The calculation formula is:

7. The video recommendation method based on hybrid feedback and time series according to claim 6, characterized in that: The method for integrating and outputting described in step S5 is: encode the interest state sequence h′ obtained by the AUGRU model with the platform goal, context feature and user portrait feature, respectively obtain the embedded vectors, perform concat operation to obtain the comprehensive feature vector representation x, and then enter the fully connected layer to perform a linear transformation y2=W5x+b4 on the comprehensive feature vector representation x, W5 is the weight matrix, b4 is the bias vector, and then perform a nonlinear transformation on the output y2 of the fully connected layer through the PReLU or Dice activation function, and finally convert the output of the PReLU or Dice activation function into the probability value of the user's interest in the candidate video through the Sigmoid function. The PReLU activation function is: y3=max(0,y2)+αmin(0,y2) The Dice activation function is: y3=p·y2+(1-p)·w6y2 Among them, p is the activation probability and W6 is a learnable parameter.

8. A video recommendation system based on mixed feedback and time series, used in the video recommendation method based on mixed feedback and time series according to claims 1-7, characterized in that: It includes a behavior sequence layer, an interest extraction layer, an interest evolution layer and an output layer connected in sequence; Behavior sequence layer: used to divide user behavior features into explicit feedback and implicit feedback, and use word embedding to encode explicit feedback and implicit feedback respectively, and obtain explicit feedback embedding vector and implicit feedback embedding vector respectively; encode platform goals, context features, and user portrait features respectively and convert them into corresponding embedding vectors; Interest extraction layer: used to perform cross-attention calculation on explicit feedback embedding vectors and implicit feedback embedding vectors based on the Transformer model using time series encoding to obtain the user's interest status; Interest evolution layer: used to calculate the attention score using the user's interest state and the platform goal. The attention score and the user's interest state are calculated based on the AUGRU model to obtain the AUGRU model output interest state sequence. Output layer: It is used to integrate and output the interest state sequence output by the AUGRU model with the dense vectors corresponding to the platform goals, context features, and user portrait features, obtain the probability that the user is interested in the candidate video, and output the recommendation list based on the probability that the user is interested in the candidate video.

9. The video recommendation system based on hybrid feedback and time series according to claim 8, characterized in that: The loss function L during the video recommendation system training process is: L=L target +β*L aux Among them, L target is the cross entropy loss after full connection, L aux is the designed auxiliary loss, β is the auxiliary loss weight; The cross entropy loss is: Among them, y j It is the real behavior of users. is the probability σ(y3) that the model predicts that the user is interested in the candidate video, N is the sum of the samples, and j=1 to N represents all the samples at this moment.

10. The video recommendation method based on hybrid feedback and time series according to claim 9, characterized in that: The auxiliary loss of the design is: in, Indicates the user's real behavior at the next moment. The behavior obtained by negative sampling, σ is the Sigmoid function.

Citation Information

Patent Citations

  • A video recommendation method and apparatus

    CN108875022B

  • Video recommendation system and method for prolonging retention time of user in video website

    CN112699271A

  • Intelligent news recommendation method and system based on explicit and implicit interest features

    CN116340641A

  • Transform-based article-behavior cross-sequence recommendation method

    CN116644226A

  • User dynamic interest recommendation method and system based on recurrent neural network

    CN117312668A

Cited By

  • Standardized demand retrieval matching method and system based on user portrait feature fusion

    CN119807540A

  • Sequence recommendation method based on positive and negative feedback and logic rule fusion

    CN120067449A

  • Online education platform data storage management method

    CN120216770A

  • An online education platform data storage management method

    CN120216770B

  • Data processing method for reading recommendation

    CN120296249A