Online learning platform video course recommendation method and system
By combining course transcripts and video frame stream data from online learning platforms, long-term and short-term interest features of users are extracted. A self-attention sequence recommendation model is then used for course recommendation, which solves the problem of low recommendation accuracy caused by ignoring short-term interests in existing technologies and achieves higher-precision course recommendation.
Patent Information
- Application Number
- CN202211008340.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-22
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-08-22
AI Technical Summary
Existing online learning platform course recommendation technologies are mainly based on users' long-term interest characteristics, ignoring users' short-term interest characteristics. This results in low recommendation accuracy, and the manually labeled tags are subjective and lack a systematic approach, further reducing recommendation accuracy.
By acquiring users' video course viewing data, the topic features of the course lectures are extracted using the LDA model, and style features are extracted by flattening the Gram matrix of the video frame stream. After masking and embedding, the topic features and style features are concatenated as course features and input into the self-attention sequence recommendation model for pre-training. Long-term and short-term features are then extracted for course recommendation.
It improves the accuracy and rationality of video course recommendations on online learning platforms, taking into account both users' long-term and short-term interests to enhance the accuracy of recommendations.
Smart Images

Figure CN115344744B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the online learning platform recommendation technical field, in particular to an online learning platform video course recommendation method and system. BACKGROUND
[0002] The current online learning platform course recommendation technology is mainly divided into pre-deep learning era and deep learning era. The pre-deep learning era is based on collaborative filtering and content recommendation. Collaborative filtering is based on the overall interaction data of users and products, which can only capture the long-term interest of users and cannot capture the short-term interest. Moreover, only using the overall interaction information of users and products cannot effectively introduce user features, item features and context features. Therefore, a machine learning model with a logistic regression model as the core is emerged, which can integrate different types of features. However, this kind of model has weak expression ability and cannot perform high-level operations such as feature high-order cross or feature selection. 2) The deep learning era usually builds a model of input-multilayer neural network-output (different models are mainly different in these three parts) to make course recommendations. For example, the residual network layer in the Deep Crossing model, the product layer in the PNN (Probabilistic Neural Network) model, and the linear in the Wide&Deep model can all be combined with neural networks, or attention weights, sequence layers, reinforcement learning perturbations or competition mechanisms can be added to the neural networks. In the deep learning recommendation era, hidden vectors, feature cross and feature engineering modeling are the main points to improve the model and improve the recommendation effect. Among them, the hidden vector is also called embedding. From the feature point of view, the hidden vector refers to mapping a set of features to another representation. Formally, the hidden vector is a low-dimensional dense vector representing the features of an object (or a high-dimensional sparse feature vector). The hidden vector itself is an extremely important feature vector.
[0003] In summary, the current course recommendation technology usually recommends courses based on the extraction of long-term interest features of users, ignoring the short-term interest features of users, which results in low recommendation accuracy. The manually annotated labels are subjective and lack a system, which is easy to miss and also causes the reduction of recommendation accuracy. SUMMARY
[0004] The purpose of the present application is to provide an online learning platform video course recommendation method and system, which can recommend courses based on both long-term interest features and short-term interest features of users, thereby improving the accuracy and rationality of online learning platform video course recommendation.
[0005] To achieve the above purpose, the present application provides the following solutions.
[0006] An online learning platform video course recommendation method, comprising:
[0007] Obtaining a viewing video course sequence of a user on an online learning platform;
[0008] Obtaining a course script sequence and a video frame stream sequence corresponding to the viewing video course sequence; any video frame stream in the video frame stream sequence comprises a plurality of video frames of the same viewing video course arranged in sequence;
[0009] Inputting the course script sequence into a topic feature extraction model to obtain topic features; the topic feature extraction model is obtained by training an LDA model using historical course scripts;
[0010] Determining a Gram matrix flattening vector of each video frame stream in the video frame stream sequence as a style feature of the corresponding viewing video course;
[0011] Masking and embedding the topic features in sequence to obtain topic feature vectors;
[0012] Masking and embedding the style features in sequence to obtain style feature vectors;
[0013] Concatenating the topic feature vectors and the style feature vectors corresponding to the same viewing video course as course features, embedding the plurality of course features respectively to obtain a viewing course feature sequence;
[0014] Inputting the viewing course feature sequence into the course recommendation model to obtain a recommended course feature sequence; the course recommendation model is obtained by pre-training a self-attention sequence recommendation model using a plurality of historical viewing video course sequences; the course recommendation model is used to extract long-term features and short-term features of the viewing course feature sequence, and determine the recommended course feature sequence according to the long-term features and the short-term features;
[0015] Recommending a video course to the user according to the recommended course feature sequence.
[0016] Optionally, a viewing ratio of any viewing video course in the viewing video course sequence is greater than a threshold of a viewing ratio; the viewing ratio is a ratio of a viewing duration to a total duration of the viewing video course.
[0017] Optionally, the determination of the Gram matrix flattening vector of each video frame stream in the video frame stream sequence as the style feature of the corresponding viewing video course comprises:
[0018] Determining any video frame stream in the video frame stream sequence as a current video frame stream;
[0019] Determining any video frame in the current video frame stream as a current video frame;
[0020] Performing convolution operation on the current video frame to obtain a feature map corresponding to the current video frame;
[0021] flattening the height and the width of the feature map into a one-dimensional vector to obtain a flattened vector;
[0022] performing a matrix transposition operation on the feature map and then flattening it into a one-dimensional vector to obtain a flattened transposed vector;
[0023] inner product of the flattened vector and the flattened transposed vector to obtain a Gram vector of the current video frame;
[0024] updating the current video frame and returning to the step of performing a convolution operation on the current video frame to obtain a feature map corresponding to the current video frame;
[0025] traversing all video frames in the current video frame stream to obtain a plurality of Gram vectors;
[0026] sequentially connecting a plurality of the Gram vectors in the order of the video frames in the current video frame stream to obtain a Gram matrix flattened vector of the current video frame stream;
[0027] determining that the Gram matrix flattened vector of the current video frame stream is a style feature corresponding to the video course being watched;
[0028] updating the current video frame stream and returning to the step of determining that any video frame in the current video frame stream is a current video frame;
[0029] traversing all video frame streams to obtain a plurality of style features of the video courses being watched.
[0030] Optionally, before the step of obtaining the sequence of watching video courses, the method further comprises:
[0031] obtaining a plurality of historical sequences of watching video courses; the users corresponding to the plurality of historical sequences of watching video courses are different;
[0032] determining video features of the historical video courses to obtain a plurality of historical video feature sequences;
[0033] pre-training the self-attention sequence recommendation model using the plurality of historical video feature sequences.
[0034] An online learning platform video course recommendation system, comprising:
[0035] a sequence of watching video courses obtaining module configured to obtain a sequence of watching video courses of a user on an online learning platform;
[0036] a script video frame stream sequence obtaining module configured to obtain a course script sequence and a video frame stream sequence corresponding to the sequence of watching video courses; any video frame stream in the video frame stream sequence comprises a plurality of video frames of the same video course arranged in sequence.
[0037] a subject feature determination module, configured to input the course script sequence into a subject feature extraction model to obtain subject features, the subject feature extraction model being obtained by training an LDA model using historical course scripts;
[0038] a style feature determination module, configured to determine a Gram matrix flattened vector of each video frame stream in the video frame stream sequence as a style feature of a video course watched by the user;
[0039] a subject feature vector determination module, configured to sequentially perform mask processing and embedding processing on the subject features to obtain subject feature vectors;
[0040] a style feature vector determination module, configured to sequentially perform mask processing and embedding processing on the style features to obtain style feature vectors;
[0041] a watched course feature sequence determination module, configured to connect the subject feature vectors and the style feature vectors corresponding to the same video course watched by the user as course features, and perform embedding processing on the course features to obtain a watched course feature sequence;
[0042] a recommended course feature sequence determination module, configured to input the watched course feature sequence into the course recommendation model to obtain a recommended course feature sequence, the course recommendation model being obtained by pre-training a self-attention sequence recommendation model using a plurality of historical watched video course sequences, and the course recommendation model being configured to extract long-term features and short-term features of the watched course feature sequence, and determine the recommended course feature sequence according to the long-term features and the short-term features;
[0043] a video course recommendation module, configured to recommend a video course to the user according to the recommended course feature sequence.
[0044] Optionally, a watching proportion of any video course in the watched video course sequence is greater than a threshold of a watching proportion, and the watching proportion is a proportion of a watching duration of the user to a total duration of the video course.
[0045] Optionally, the style feature determination module includes:
[0046] a current video frame stream determination unit, configured to determine any video frame stream in the video frame stream sequence as a current video frame stream;
[0047] a current video frame determination unit, configured to determine any video frame in the current video frame stream as a current video frame;
[0048] a feature map determination unit, configured to perform convolution operation on the current video frame to obtain a feature map corresponding to the current video frame;
[0049] A flattening vector determination unit is configured to flatten the height and width of the feature map into a one-dimensional vector to obtain a flattening vector;
[0050] A flattening transposed vector determination unit is configured to flatten the feature map into a one-dimensional vector after a matrix transposition operation to obtain a flattening transposed vector;
[0051] A Gram vector determination unit is configured to obtain a Gram vector of the current video frame by performing an inner product operation on the flattening vector and the flattening transposed vector;
[0052] A current video frame updating unit is configured to update the current video frame and call the feature map determination unit;
[0053] A Gram vector group determination unit is configured to obtain a plurality of Gram vectors by traversing all video frames in the current video frame stream;
[0054] A Gram matrix flattening vector determination unit is configured to sequentially connect a plurality of Gram vectors in the order of the video frames in the current video frame stream to obtain a Gram matrix flattening vector of the current video frame stream;
[0055] A style feature determination unit is configured to determine that the Gram matrix flattening vector of the current video frame stream is a style feature corresponding to a video course being watched;
[0056] A current video frame stream updating unit is configured to update the current video frame stream and call the current video frame determination unit;
[0057] A style feature group determination unit is configured to obtain a plurality of style features of video courses being watched by traversing all video frame streams.
[0058] Optionally, the system further comprises:
[0059] A historical video course sequence acquisition module is configured to acquire a plurality of historical video course sequences; the plurality of historical video course sequences correspond to different users;
[0060] A historical video feature sequence determination module is configured to determine video features of historical video courses to obtain a plurality of historical video feature sequences;
[0061] A pre-training module is configured to pre-train the self-attention sequence recommendation model by using the plurality of historical video feature sequences.
[0062] According to the embodiments of the present application, the following technical effects are provided:
[0063] The application provides an online learning platform video course recommendation method and system, including: obtaining a course script sequence and a video frame stream sequence corresponding to a viewing video course sequence; inputting the course script sequence into a topic feature extraction model to obtain topic features; the topic feature extraction model is obtained by training an LDA model using historical course scripts; determining that a Gram matrix flattening vector of each video frame stream in the video frame stream sequence is a style feature corresponding to the viewing video course; after mask and embedding processing, connecting the topic features and the style features corresponding to the same viewing video course as video features to obtain a viewing course feature sequence; inputting the viewing course feature sequence into a course recommendation model to obtain a recommended course feature sequence; the application pre-trains a self-attention sequence recommendation model using a plurality of historical viewing video course sequences to obtain the course recommendation model, can perform course recommendation based on long-term interest features and short-term interest features of a user, and improves the accuracy and rationality of online learning platform video course recommendation. BRIEF DESCRIPTION OF DRAWINGS
[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings described in the following are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0065] Figure 1 The online learning platform video course recommendation method flowchart in embodiment 1 of the present application. DETAILED DESCRIPTION
[0066] The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0067] The purpose of the present application is to provide an online learning platform video course recommendation method and system, which can simultaneously recommend courses based on long-term interest features and short-term interest features of a user, and improve the accuracy and rationality of online learning platform video course recommendation.
[0068] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0069] Embodiment 1
[0070] As Figure 1As shown, the embodiment provides an online learning platform video course recommendation method, which comprises the following steps:
[0071] Step 101: Obtain a video course watching sequence of a user on an online learning platform; any video course watching in the video course watching sequence has a watching ratio greater than a threshold value of the watching ratio; the watching ratio is a ratio of a watching time length to a total time length of the video course.
[0072] Step 102: Obtain a course script sequence and a video frame stream sequence corresponding to the video course watching sequence; any video frame stream in the video frame stream sequence comprises a plurality of video frames of the same video course arranged in sequence;
[0073] Step 103: input the course script sequence into a theme feature extraction model to obtain theme features; the theme feature extraction model is obtained by training an LDA model using historical course scripts;
[0074] Step 104: determine a Gram matrix flattened vector of each video frame stream in the video frame stream sequence as a style feature of the corresponding video course.
[0075] Step 104 comprises: determining any video frame stream in the video frame stream sequence as a current video frame stream; determining any video frame in the current video frame stream as a current video frame; performing convolution operation on the current video frame to obtain a feature map corresponding to the current video frame; flattening the height and width of the feature map into a one-dimensional vector to obtain a flattened vector; performing matrix transposition operation on the feature map and then flattening it into a one-dimensional vector to obtain a flattened transposed vector; performing inner product operation on the flattened vector and the flattened transposed vector to obtain a Gram vector of the current video frame; updating the current video frame and returning to the step of performing convolution operation on the current video frame to obtain a feature map corresponding to the current video frame; traversing all video frames in the current video frame stream to obtain a plurality of Gram vectors; sequentially connecting the plurality of Gram vectors in the order of the video frames in the current video frame stream to obtain a Gram matrix flattened vector of the current video frame stream; determining the Gram matrix flattened vector of the current video frame stream as a style feature of the corresponding video course; updating the current video frame stream and returning to the step of determining any video frame in the current video frame stream as a current video frame; traversing all video frame streams to obtain a style feature of each video course.
[0076] Step 105: sequentially perform mask processing and embedding processing on the theme features to obtain theme feature vectors;
[0077] Step 106: sequentially perform mask processing and embedding processing on the style features to obtain style feature vectors;
[0078] Step 107: connect the theme feature vector and the style feature vector corresponding to the same video course as the course feature, respectively embed the plurality of course features to obtain a viewing course feature sequence;
[0079] Step 108: input the viewing course feature sequence into a course recommendation model to obtain a recommended course feature sequence; the course recommendation model is obtained by pre-training a self-attention sequence recommendation model using a plurality of historical video course sequence; the course recommendation model is used to extract long-term features and short-term features of the viewing course feature sequence, and determine the recommended course feature sequence according to the long-term features and the short-term features;
[0080] Step 109: recommend a video course to the user according to the recommended course feature sequence.
[0081] The online learning platform video course recommendation method provided in this embodiment further includes, before step 101: obtaining a plurality of historical video course sequence; the users corresponding to the plurality of historical video course sequence are different; determining the video features of the historical video course to obtain a plurality of historical video feature sequence; and pre-training a self-attention sequence recommendation model using the plurality of historical video feature sequence.
[0082] Embodiment 2
[0083] The online learning platform video course recommendation method provided in this embodiment includes:
[0084] Step 1: obtain a user viewing video sequence.
[0085] Note that a video watched by a user for more than 80% (hyperparameter, which can be manually tuned or selected by cross-grid to obtain the best parameter) of the time is an element in the sequence, and a video can have multiple videos as an element if it is divided into upper, middle and lower. If a video is watched multiple times, it is recorded as multiple elements in the sequence. The viewing video sequence is a time sequence, and the time order of the sequence is noted.
[0086] Step 2: video features of the user viewing video sequence
[0087] 1) User viewing video sequence theme feature engineering.
[0088] For each video watched by the user, a topic feature vector is used to represent it. First, the script of the video watched by the user is selected as a document for LDA topic analysis to obtain the topic distribution vector of the user's selection. LDA (Latent Dirichlet Allocation, document topic generation model) is a three-layer Bayesian topic model that discovers the hidden topic information in the text through unsupervised learning method. The purpose is to discover the hidden semantic dimension in the text, i.e. "Topic" or "Concept", through unsupervised learning method. The essence of latent semantic analysis is to use the co-occurrence characteristics of terms in the text to discover the Topic structure of the text. This method does not require any background knowledge about the text. Similar to the processing of LDA topic model for documents, the probability of the same word appearing in different topic backgrounds is different. LDA reflects the topic through the probability distribution of the word. The probability of the same topic appearing in different videos is also different. Therefore, each video will correspond to a topic distribution, and each topic will correspond to a word distribution. As long as the two distributions (topic and word distribution, script and topic distribution) are determined, the topic distribution of each video watched by the user can be obtained, which is the topic feature vector of an element in the video sequence watched by the user. LDA topic model has a mature method system, and gensim library has ldamodel model that can directly call LDA method to run. Among them, all the scripts of the videos need to be preprocessed (such as word segmentation, stop word removal), use the function corpora.Dictionary(*) to establish the dictionary, and use the function corpora.Dictionary.doc2bow(*) to bag-of-words processing to vectorize the video document, set the number of topics (such as 50), then use the LDA topic model to train, and finally the topic distribution of each document can be obtained.
[0089] 2) User video sequence style feature engineering:
[0090] For each video watched by the user, a style feature vector is used to represent the video, first, the video stream selected by the user to watch the video part is selected for Gram Matrix (Gram Matrix flattening vector) style analysis, and the style vector selected by the user this time is obtained. First, the video stream is sampled into a picture set at a certain interval or directly taken as an image sequence. Calculate the gram matrix style, you can directly call keras.backend and keras.models model and keras.applications.vgg16 VGG16. Among them, keras.backend, and keras.models model and keras.applications.vgg16 are functions in the keras library in Python language; VGG-16 convolution operation is performed on each input image, that is, the features of the previous image (or feature map) are concentrated on the map after convolution kernel convolution, which is called feature map (feature map). The parameters of the feature map are [ch, h, w] (channel, height, width). After flattening (using the function backend.batch_flatten(*) to flatten h*w into a one-dimensional vector) and matrix transpose operation (function backend.dot(*)), the feature map is deformed into a matrix of [ch, h*w] and [h*w, ch]. Then, the inner product of the two flattened one-dimensional vectors is obtained to obtain the Gram Matrices style feature. Finally, the Gram Matrix vectors of each image are connected to obtain the video style feature vector. Each number on the feature map represents a feature, and the inner product represents the most important stroke expansion of the image, which highlights the style of the image.
[0091] The user watches the video sequence theme feature vector can be according to length arrangement whether pad mask (fixed length is N, through manual parameter adjustment or grid cross validation obtains), theme feature vector length is less than N, then after the last non-zero item fills one or more zero elements until its length reaches N, if theme feature vector length is greater than N, then from back to front cut off the length as N sequence. The theme feature vector after mask processing is compressed into a dense feature vector with only 512 dimensions through an embedding layer (i.e. multiplied by an N*512 matrix, where N is the sequence length). Similarly, the user watches the video sequence style feature vector can be according to length arrangement whether pad mask (fixed length is N), then through an embedding layer (i.e. multiplied by an N*512 matrix, where N is the sequence length) compression into a feature vector with only 512 dimensions. Then the theme feature vector and style feature vector are connected, and then compressed into a feature vector with only 512 dimensions through an embedding layer (using a 3-layer fully connected neural network as the embedding layer). Finally, each element of the user's video sequence is a 512-dimensional feature vector.
[0092] Step 3: send into SASRec model (i.e. self-attention sequence recommendation model) training, the trained model can be used for prediction.
[0093] SASRec is a sequence-to-sequence transformer model (one of the sequence-to-sequence models) applied in the field of recommendation. The transformer model is a relatively good sequence-to-sequence model at present, and is widely used in language translation. Input a sentence with indefinite vocabulary, and get a translated sentence with indefinite vocabulary. Each word in the input is an element in the sequence, which is converted into a word vector through embedding. The input of the SASRec model is the feature vector of the user watching the video sequence plus the relative position embedding sequence: Where, M s1 represents the feature matrix of watching videos (i.e. multiple video feature vectors watched each day are composed into a matrix by rows), I| represents the number of videos watched by the user, d is the dimension of the feature vector, (s1, s2,..., s n ) represents the user watching the video sequence, P is the relative position matrix, n represents the sequence length. After the relative position embedding sequence is input into the SASRec model through a self-attention module, a stacked self-attention module, a prediction layer and model training, the prediction model is used to predict a plurality of videos that a user is interested in, and the relevance of the video i and the user information feature vector F is predicted through an MF (Matrix Factorization) layer:
[0094]
[0095] wherein r i,t represents that after the user behavior sequence s1, s2,..., s t the i-th video becomes the relevance of the user's interest, is an embedding matrix of the video. Therefore, the higher r i,t is, the higher the relevance is, and therefore the recommendation can be made by sorting.
[0096] Embodiment 3
[0097] The embodiment provides an online learning platform video course recommendation system, comprising:
[0098] A viewing video course sequence acquisition module is configured to acquire a viewing video course sequence of a user on an online learning platform. Any viewing video course in the viewing video course sequence has a viewing ratio greater than a threshold of the viewing ratio; the viewing ratio is a ratio of a viewing duration of the user to a total duration of the viewing video course.
[0099] A lecture video frame stream sequence acquisition module is configured to acquire a course lecture sequence and a video frame stream sequence corresponding to the viewing video course sequence; any video frame stream in the video frame stream sequence comprises a plurality of video frames of the same viewing video course arranged in sequence.
[0100] A theme feature determination module is configured to input the course lecture sequence into a theme feature extraction model to obtain a theme feature; the theme feature extraction model is obtained by training an LDA model using historical course lectures.
[0101] A style feature determination module is configured to determine a Gram matrix flattening vector of each video frame stream in the video frame stream sequence as a style feature of the corresponding viewing video course.
[0102] A theme feature vector determination module is configured to sequentially perform mask processing and embedding processing on the theme feature to obtain a theme feature vector.
[0103] A style feature vector determination module is configured to sequentially perform mask processing and embedding processing on the style feature to obtain a style feature vector.
[0104] The watching course feature sequence determination module is configured to connect the theme feature vector and the style feature vector corresponding to the same watching video course as a course feature, perform embedding processing on the plurality of course features respectively, and obtain a watching course feature sequence.
[0105] The recommended course feature sequence determination module is configured to input the watching course feature sequence into a course recommendation model to obtain a recommended course feature sequence; the course recommendation model is obtained by pre-training a self-attention sequence recommendation model using the plurality of historical watching video course sequences; and the course recommendation model is configured to extract long-term features and short-term features of the watching course feature sequence, and determine the recommended course feature sequence according to the long-term features and the short-term features.
[0106] The video course recommendation module is configured to recommend a video course to the user according to the recommended course feature sequence.
[0107] The historical watching video course sequence acquisition module is configured to acquire a plurality of historical watching video course sequences; the users corresponding to the plurality of historical watching video course sequences are different.
[0108] The historical video feature sequence determination module is configured to determine video features of the historical watching video courses to obtain a plurality of historical video feature sequences.
[0109] The pre-training module is configured to pre-train the self-attention sequence recommendation model using the plurality of historical video feature sequences.
[0110] The style feature determination module includes:
[0111] The current video frame stream determination unit is configured to determine any video frame stream in a video frame stream sequence as a current video frame stream; the current video frame determination unit is configured to determine any video frame in the current video frame stream as a current video frame; the feature map determination unit is configured to perform convolution operation on the current video frame to obtain a feature map corresponding to the current video frame; the flattening vector determination unit is configured to flatten the height and width of the feature map into a one-dimensional vector to obtain a flattening vector; the flattening transpose vector determination unit is configured to perform matrix transpose operation on the feature map and then flatten the matrix into a one-dimensional vector to obtain a flattening transpose vector; the Gram vector determination unit is configured to perform inner product operation on the flattening vector and the flattening transpose vector to obtain a Gram vector of the current video frame; the current video frame updating unit is configured to update the current video frame and call the feature map determination unit; the Gram vector group determination unit is configured to traverse all video frames in the current video frame stream to obtain a plurality of Gram vectors; the Gram matrix flattening vector determination unit is configured to sequentially connect the plurality of Gram vectors according to the order of the video frames in the current video frame stream to obtain a Gram matrix flattening vector of the current video frame stream; the style feature determination unit is configured to determine the Gram matrix flattening vector of the current video frame stream as a style feature corresponding to a video course being watched; the current video frame stream updating unit is configured to update the current video frame stream and call the current video frame determination unit; and the style feature group determination unit is configured to traverse all video frame streams to obtain a plurality of style features corresponding to the video course being watched.
[0112] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the system disclosed by the embodiments, since it corresponds to the method disclosed by the embodiments, the description is relatively simple, and the related parts can be referred to the method part.
[0113] The principles and implementation manners of the present application are described by using specific examples in the present application, and the above embodiment description is only used to help understand the method of the present application and its core idea; at the same time, for the general technical personnel in the art, according to the idea of the present application, the specific implementation manner and application range will be changed. In view of the above, the content of the specification should not be understood as a limitation of the present application.
Claims
1. An online learning platform video course recommendation method, characterized in that, The method comprises the following steps: Obtain a viewing video course sequence on an online learning platform of a user; Obtain a course script sequence and a video frame stream sequence corresponding to the viewing video course sequence; any video frame stream in the video frame stream sequence comprises a plurality of video frames of the same viewing video course arranged in sequence; Input the course script sequence into a topic feature extraction model to obtain topic features; the topic feature extraction model is obtained by training an LDA document topic generation model using historical course scripts; LDA is a three-layer Bayesian topic model that discovers hidden topic information in a text through an unsupervised learning method, and the purpose is to discover the hidden semantic dimension from the text in an unsupervised learning method; Determine a Gram matrix flattened vector of each video frame stream in the video frame stream sequence as a style feature of the corresponding viewing video course; Perform mask processing and embedding processing on the topic features in sequence to obtain topic feature vectors; Perform mask processing and embedding processing on the style features in sequence to obtain style feature vectors; Connect the topic feature vectors and the style feature vectors corresponding to the same viewing video course as course features, and perform embedding processing on the plurality of course features to obtain a viewing course feature sequence; Input the viewing course feature sequence into a course recommendation model to obtain a recommended course feature sequence; the course recommendation model is obtained by pre-training a self-attention sequence recommendation model using a plurality of historical viewing video course sequences; the course recommendation model is used to extract long-term features and short-term features of the viewing course feature sequence, and determine the recommended course feature sequence according to the long-term features and the short-term features; Recommend a video course to the user according to the recommended course feature sequence; The determination of the Gram matrix flattened vector of each video frame stream in the video frame stream sequence as the style feature of the corresponding viewing video course comprises the following steps: Determine any video frame stream in the video frame stream sequence as a current video frame stream; Determine any video frame in the current video frame stream as a current video frame; Perform convolution operation on the current video frame to obtain a feature map corresponding to the current video frame; Flatten the height and width of the feature map into a one-dimensional vector to obtain a flattened vector; Perform matrix transposition operation on the feature map and then flatten it into a one-dimensional vector to obtain a flattened transposed vector; Calculate the inner product of the flattened vector and the flattened transposed vector to obtain a Gram vector of the current video frame; Update the current video frame and return to the step of performing convolution operation on the current video frame to obtain a feature map corresponding to the current video frame; Traverse all video frames in the current video frame stream to obtain a plurality of Gram vectors; Connect the plurality of Gram vectors in sequence according to the order of the video frames in the current video frame stream to obtain a Gram matrix flattened vector of the current video frame stream; Determine the Gram matrix flattened vector of the current video frame stream as the style feature of the corresponding viewing video course; Update the current video frame stream and return to the step of determining any video frame in the current video frame stream as a current video frame; Traverse all video frame streams to obtain a style feature of each viewing video course.
2. The method of claim 1, wherein, The proportion of watching video courses in the watching video course sequence is greater than a threshold of the proportion of watching video courses.
3. The method of claim 1, wherein, Before the watching video course sequence is obtained, the method further includes: A plurality of historical watching video course sequences are obtained, and the users corresponding to the plurality of historical watching video course sequences are different. Video features of the historical watching video courses are determined to obtain a plurality of historical video feature sequences. The self-attention sequence recommendation model is pre-trained by using the plurality of historical video feature sequences.
4. An online learning platform video course recommendation system characterized in that, The method includes: A watching video course sequence obtaining module is configured to obtain a watching video course sequence of a user on an online learning platform. A lecture video frame stream sequence obtaining module is configured to obtain a course lecture sequence and a video frame stream sequence corresponding to the watching video course sequence; any video frame stream in the video frame stream sequence includes a plurality of video frames of a same watching video course arranged in sequence. A theme feature determining module is configured to input the course lecture sequence into a theme feature extraction model to obtain theme features; the theme feature extraction model is obtained by training an LDA document theme generation model by using historical course lectures; LDA is a three-layer Bayesian theme model, and theme information hidden in a text is discovered by using an unsupervised learning method, and the purpose is to discover the semantic dimension hidden in the text by using an unsupervised learning method. A style feature determining module is configured to determine a Gram matrix flattened vector of each video frame stream in the video frame stream sequence as a style feature of a corresponding watching video course. A theme feature vector determining module is configured to sequentially perform mask processing and embedding processing on the theme features to obtain theme feature vectors. A style feature vector determining module is configured to sequentially perform mask processing and embedding processing on the style features to obtain style feature vectors. A watching course feature sequence determining module is configured to connect the theme feature vectors and the style feature vectors corresponding to a same watching video course as course features, and perform embedding processing on the plurality of course features to obtain a watching course feature sequence. A recommended course feature sequence determining module is configured to input the watching course feature sequence into a course recommendation model to obtain a recommended course feature sequence; the course recommendation model is obtained by pre-training a self-attention sequence recommendation model by using a plurality of historical watching video course sequences; and the course recommendation model is used to extract long-term features and short-term features of the watching course feature sequence, and determine the recommended course feature sequence according to the long-term features and the short-term features. A video course recommendation module is configured to recommend a video course to a user according to the recommended course feature sequence. The style feature determining module includes: A current video frame stream determining unit is configured to determine any video frame stream in the video frame stream sequence as a current video frame stream. A current video frame determining unit is configured to determine any video frame in the current video frame stream as a current video frame. A feature map determining unit is configured to perform convolutional operation on the current video frame to obtain a feature map corresponding to the current video frame. A flattening vector determination unit is configured to flatten the height and width of the feature map into a one-dimensional vector to obtain a flattened vector; A flattened transposed vector determination unit is configured to perform a matrix transposition operation on the feature map and then flatten the transposed feature map into a one-dimensional vector to obtain a flattened transposed vector; A Gram vector determination unit is configured to perform an inner product operation on the flattened vector and the flattened transposed vector to obtain a Gram vector of the current video frame; A current video frame updating unit is configured to update the current video frame and call the feature map determination unit; A Gram vector group determination unit is configured to traverse all video frames in the current video frame stream to obtain a plurality of Gram vectors; A Gram matrix flattened vector determination unit is configured to sequentially connect the plurality of Gram vectors in the order of the video frames in the current video frame stream to obtain a Gram matrix flattened vector of the current video frame stream; A style feature determination unit is configured to determine that the Gram matrix flattened vector of the current video frame stream is a style feature corresponding to a video course being watched; A current video frame stream updating unit is configured to update the current video frame stream and call the current video frame determination unit; A style feature group determination unit is configured to traverse all video frame streams to obtain a style feature of each video course being watched.
5. The online learning platform video course recommendation system of claim 4, wherein, The proportion of watching the video course in the sequence of video courses being watched is greater than a threshold value of the proportion of watching the video course; the proportion of watching the video course is a proportion of the user watching duration to the total duration of the video course being watched.
6. The online learning platform video course recommendation system of claim 4, wherein, The system further comprises: A historical video course sequence acquisition module is configured to acquire a plurality of historical video course sequences; the users corresponding to the plurality of historical video course sequences are different; A historical video feature sequence determination module is configured to determine a video feature of a historical video course to obtain a plurality of historical video feature sequences; A pre-training module is configured to pre-train the self-attention sequence recommendation model by using the plurality of historical video feature sequences.
Citation Information
Patent Citations
A student modeling and personalized course recommendation method in an online learning system
CN109919810A
Online course recommendation method and device, computer equipment and storage medium
CN111209474A