Short video recommendation method enhanced by causal feature, electronic device and storage medium
The short video recommendation method enhanced by causal features utilizes user historical interaction records and causal network models to solve the problem of inaccurate recommendations caused by changes in user attributes in existing technologies, thereby improving the accuracy of the recommendation system and the user interaction effect.
Patent Information
- Application Number
- CN202310052390.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-02
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-02-02
AI Technical Summary
Existing short video recommendation systems struggle to accurately capture changes in user preferences caused by shifts in user attributes, thus failing to provide personalized and robust recommendations.
By collecting users' historical interaction records with short videos, feature vectors are extracted using a fully connected neural network, and causal networks are designed to extract causal features. A causal feature-enhanced video recommendation model is then constructed using a perceptron, and model parameters are optimized to improve recommendation accuracy.
It enables more accurate and robust video recommendations even when user attributes change, improving the accuracy of the recommendation system and user interaction metrics.
Smart Images

Figure CN116089718B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of short video recommendation, specifically a short video recommendation method, electronic device, and storage medium with causal feature enhancement. Background Technology
[0002] Short videos have garnered widespread attention in recent years due to factors such as fragmented user time, the rapid proliferation of mobile internet and smartphones, and low production barriers. The key to short videos' ability to capture user attention and traffic lies in their ability to provide precise video recommendations based on user preferences. User preferences often change rapidly with shifts in user attributes; for example, when traveling, users tend to focus on local food and attractions. However, recommendation systems often rely on historical browsing records, failing to accurately capture these changes. If the causal relationship between user attributes and short video preferences could be learned from historical user interactions and incorporated into the recommendation model as a feature enhancement, the model's accuracy could be improved. Therefore, uncovering the direct causal relationship between user attributes and short video preferences to create more accurate and robust short video recommendations has become a crucial issue for short video platforms. Summary of the Invention
[0003] The present invention addresses the shortcomings of the existing technology by proposing a short video recommendation method, electronic device, and storage medium with enhanced causal features. This aims to uncover the causal relationship between user attributes and user preferences for short videos, and to provide users with more accurate recommendations.
[0004] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0005] The present invention provides a short video recommendation method with causal feature enhancement, characterized by the following steps:
[0006] S1. Collect historical interaction records between users and short videos and input them into a pre-trained fully connected neural network for feature extraction to obtain a set of sample feature vectors. Among them, u i Represents the i-th sample (u i ,c i The user feature vector in ) c i Represents the i-th sample (u i ,c i The video feature vector in the sample; i = 1, 2, ..., N, where N represents the total number of samples;
[0007] S2, Set the sample feature vectors Each sample is input into another two-layer fully connected neural network, which outputs a set of interaction feature vectors for all samples. Where, x i Represents the i-th sample (u i ,c i The interaction feature vector of );
[0008] S3. Design a causal network and extract causal features:
[0009] S3.1 The causal network consists of a dimensionality reduction network and a DAG matrix W; the set of interaction feature vectors Input the dimensionality reduction network and output a set of d-dimensional dimensionality reduction interactive feature vectors. Among them, X i Represents the i-th sample (u i ,c i Dimensionally reduced interactive feature vectors;
[0010] S3.2, Based on dimensionality reduction interactive feature vector X i Given a d×d DAG matrix W, the i-th sample (u) is calculated using equation (1). i ,c i The causal eigenvector X′ i :
[0011] X′ i =RELU(WX i (1)
[0012] In equation (1), RELU is the ReLU activation function;
[0013] S4. Set the causal feature vectors With the set of interactive feature vectors After concatenation, the data is input into the perceptron to obtain the set of model predictions. in, Represents the i-th sample (u i ,c i The predicted value of );
[0014] S5. A causal feature-enhanced video recommendation model is constructed from a pre-trained fully connected neural network, a two-layer fully connected neural network, a causal network, and a perceptron, and the loss function L of the causal feature-enhanced video recommendation model is constructed:
[0015] S5.1 Construct the loss function L of the perceptron using equation (2) reco :
[0016]
[0017] In equation (2), sigmoid is the activation function, yi Represents the i-th sample (u i ,c i ) authentic label;
[0018] S5.2, Construct the loss function L of the causal network using equation (3) casual :
[0019]
[0020] In equation (3), α is a parameter taking the value [0.1, 0.2], and β is a parameter taking the value [0.05, 0.1]. represents the square of the L2 norm regularization term, ⊙ represents the Hadamard product of matrices, and tr represents the trace of a matrix;
[0021] S5.3. Construct the loss function L of the causal feature-enhanced video recommendation model using equation (4):
[0022] L = L reco +λL casual (4)
[0023] In equation (4), λ is a parameter that takes the value [0.1, 0.2].
[0024] S6. Train the causal feature-enhanced video recommendation model using gradient descent and minimize the loss function L to obtain the optimal recommendation model, which is then used for personalized video recommendations for users.
[0025] The present invention provides an electronic device, including a memory and a processor, wherein the memory is used to store a program that supports the processor in executing the short video recommendation method, and the processor is configured to execute the program stored in the memory.
[0026] The present invention discloses a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, performs the steps of the short video recommendation method.
[0027] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0028] 1. This invention designs a causal network to extract causal feature vectors that reflect the causal relationship between user attributes and user preferences for short videos. The causal vectors are then used as additional auxiliary features to enhance the recommendation model, thereby achieving better recommendation accuracy.
[0029] 2. This invention can learn the causal relationship between user attributes and users' favorite short videos by learning from the historical interaction records between users and short videos. Without using additional auxiliary content, the recommendation model can learn the interaction relationship between users and videos more accurately, thereby achieving better recommendation accuracy.
[0030] 3. This invention combines users' long-term basic attribute features and recent interest features, and uses a fully connected neural network to vectorize the user's long-term basic feature and recent interest feature vectors, and concatenates the two as the user's latent features, thereby more realistically and comprehensively reflecting the user's personalized preferences and improving the model's recommendation accuracy for all users.
[0031] 4. This invention is based on a deep neural network model and uses causal features generated by a causal network model for feature enhancement. It constructs a loss function for a causal feature-enhanced video recommendation model and uses stochastic gradient descent to continuously optimize the model parameters, thereby enhancing the robustness and accuracy of the recommendation system under changes in user attributes. Attached Figure Description
[0032] Figure 1 This is a flowchart of the short video recommendation method of the present invention. Detailed Implementation
[0033] In this embodiment, a short video recommendation method with causal feature enhancement is described, such as... Figure 1 As shown, the method includes the following steps: 1) Collecting historical interaction information between users and short videos, and extracting feature vectors for users and videos; 2) Inputting the user feature vector and video feature vector into a fully connected neural network to obtain an interaction vector; 3) Inputting the interaction vector into a causal network to extract causal features, obtaining a causal vector; 4) Concatenating the interaction vector and the causal vector and inputting them into a perceptron to calculate the probability of a user clicking on a video, obtaining a Top-K recommendation list. Specifically, this causal feature-enhanced short video recommendation method includes the following steps:
[0034] S1. Collect users' historical interaction records with short videos, including users' preferences for specific video categories and video publishers representing users' long-term interests, and users' current video browsing records representing users' short-term interests. Input these records into a pre-trained fully connected neural network for feature extraction to obtain a set of sample feature vectors. Among them, u i Represents the i-th sample (u i ,c i The user feature vector in () includes the user's identity, age, region, gender, and occupation characteristics, c i Represents the i-th sample (u i ,c iThe video feature vector in the sample includes the video ID, category, duration, popularity, and release time; i = 1, 2, ..., N, where N represents the total number of samples;
[0035] S2. Construct a two-layer fully connected neural network and combine the sample feature set. The user feature vector and video feature vector of each sample are concatenated and input into the network model, which then outputs a set of interaction feature vectors for the corresponding samples. Where, x i Let represent the interaction feature vector of the i-th sample, with a feature dimension of 32.
[0036] S3. Design causal networks to extract causal features:
[0037] S3.1, A causal network consists of a one-layer fully connected neural network and a DAG matrix; it combines the set of interaction feature vectors. In a fully connected neural network, the input is a d-dimensional set of reduced-dimensional interactive feature vectors. d takes the value 16, where X i Let represent the dimension-reduced interactive feature vector of the i-th sample;
[0038] S3.2 Input the dimension-reduced interactive feature vector into a d×d DAG matrix, and use equation (1) to calculate the dimension-reduced interactive feature vector X of the i-th sample. i The causal eigenvector X′ output by the DAG matrix i :
[0039] X′ i =RELU(WX i (1)
[0040] Where W is the DAG matrix and ReLU is the ReLU activation function;
[0041] S4. Set the causal feature vectors With the set of interactive feature vectors After concatenation, the data is input into the perceptron to obtain the set of model predictions. in, This indicates that the causal feature-enhanced video recommendation model applies to the i-th sample (u i ,c i The predicted value of ) is in the range of [0,1].
[0042] S5. Construct the loss function for the causal feature-enhanced video recommendation model:
[0043] S5.1 Construct the loss function of the recommendation model using equation (2):
[0044]
[0045] In equation (2), sigmoid is the activation function, y i Represents the i-th sample (u i ,c i The label ) has a value range of {0,1};
[0046] S5.2. Construct the loss function for the causal network model using equation (3):
[0047]
[0048] In equation (3), α is a parameter taking the value [0.1, 0.2], and β is a parameter taking the value [0.05, 0.1]. represents the square of the L2 norm regularization term, ⊙ represents the Hadamard product of matrices, and tr represents the trace of a matrix; This represents the reconstruction error, the purpose of which is to make the causal features output by the DAG network similar to the input features, thus ensuring the direct correlation between variables; (tr(e W⊙W )-d) 2 Used to ensure the directed acyclicity of the DAG matrix; These three losses are used to ensure the sparsity of the DAG matrix, and together they guarantee the direct causality between the variables.
[0049] S5.3. Construct the loss function of the causal feature-enhanced video recommendation model using equation (4):
[0050] L = L reco +λL casual (4)
[0051] In equation (4), λ is a parameter that takes the value [0.1, 0.2].
[0052] S6. Use gradient descent to train the causal feature-enhanced video recommendation model and minimize the loss function L to obtain the optimal recommendation model, which is then used for personalized video recommendations for users.
[0053] In this embodiment, an electronic device includes a memory and a processor. The memory is used to store a program that supports the processor in executing the short video recommendation method described above, and the processor is configured to execute the program stored in the memory.
[0054] In this embodiment, a computer-readable storage medium stores a computer program, which, when run by a processor, executes the steps of the aforementioned short video recommendation method.
[0055] The method of this invention has been applied to the featured page of the Kuaishou short video APP, resulting in a 0.1% increase in average usage time per user, a 0.7% increase in likes, and a 2.1% increase in the number of comments.
[0056] In summary, this invention improves the robustness and accuracy of recommendations by enhancing causal features, and increases the average user time spent and interaction metrics, making it applicable to the field of short video recommendation.
Claims
1. A method for short video recommendation with causal feature enhancement, characterized in that, The method comprises the following steps: S1, collect the historical interaction records of the user and the short video and input into a pre-trained fully connected neural network for feature extraction to obtain a sample feature vector set wherein u i represents the user feature vector in the i-th sample (u i , c i ) i i represents the video feature vector in the i-th sample (u i , c i ); i = 1, 2, …, N, and N represents the total number of samples S2, the sample feature vector set Each sample input is input into another two-layer fully connected neural network, and the interaction feature vector set of all samples is output accordingly Wherein, x i represents the interaction feature vector of the i-th sample (u i ,c i ) S3, designing a causal network and extracting causal features; S3.1, the causal network is composed of a dimension reduction network and a DAG matrix W; a set of interaction feature vectors are input into the dimension reduction network and output a set of d-dimensional dimension reduction interaction feature vectors wherein X i represents the dimension reduction interaction feature vector of the i-th sample (u i , c i ) S3.2, the reduced dimensionality interaction feature vector X i with the DAG matrix W of size d x d, the causal feature vector X' i i i : X' i = RELU(WX i ) (1) In formula (1), RELU is a Relu activation function; S4, a set of causal feature vectors with a set of interaction feature vectors a set of model prediction values obtained in the concatenated input perception machine wherein, denotes a prediction value for the i-th sample (u i ,c i ) S5, a causal feature enhanced video recommendation model is formed by the pre-trained full connection neural network, the two-layer full connection neural network, the causal network and the perception mechanism, and a loss function L of the causal feature enhanced video recommendation model is constructed; S5.1, constructing a loss function L for the perceptron using formula (2) reco : In formula (2), sigmoid is an activation function, y i represents the true label of the i-th sample (u i ,c i ). S5.2, constructing the loss function L of the causal network with formula (3) casual : In formula (3), a is a parameter with a value in [0.1, 0.2], and β is a parameter with a value in [0.05, 0.1], represents the square of the two-norm regular term, represents the Hadamard product of matrices, and tr represents the trace of a matrix. S5.3, the loss function L of the causal feature enhanced video recommendation model is constructed by using formula (4): L = L reco + λL casual (4) In formula (4), λ is a parameter with a value in [0.1, 0.2]; S6, the causal feature enhanced video recommendation model is trained by using a gradient descent method, and the loss function L is minimized, so that an optimal recommendation model is obtained and used for personalized video recommendation of a user.
2. An electronic device comprising a memory and a processor, characterized in that The memory is used for storing a program supporting the processor to execute the short video recommendation method in claim 1, and the processor is configured to execute the program stored in the memory.
3. A computer-readable storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to execute the steps of the short video recommendation method in claim 1.
Citation Information
Patent Citations
Multi-task recommendation method and system combining Bayesian reasoning and weighted reject sampling
CN110210944A
User online shopping behavior prediction recommendation method and system
CN113421146A