A movie recommendation system and method based on improved deep structured semantic model
By improving the deep structured semantic model, extracting the deep implicit semantic features of users and movies, and combining approximate nearest neighbor search technology, the efficiency and accuracy of the movie recommendation system under cold start and large-scale data is solved, and personalized and efficient movie recommendation is achieved.
Patent Information
- Application Number
- CN202210132815.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-14
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-02-14
AI Technical Summary
Existing movie recommendation systems do not work well when users record fewer movie ratings (cold start issues), and as the number of users and movies increases, the collaborative filtering matrix becomes too large, resulting in high computational costs.
Adopting an improved deep structured semantic model, the user interaction behavior log is collected and preprocessed through the user behavior acquisition and processing module. The offline training module uses a deep neural network to extract the deep implicit semantic features of users and movies, and uses approximate nearest neighbor search technology to recommend movies in the online recall and sorting module.
Effectively tapping user interests, providing personalized movie recommendations, solving the problem of cold start problems and high computing costs brought about by matrix scale growth, and improving the efficiency and accuracy of the recommendation system.
Smart Images

Figure CN114637909B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of semantic models, and in particular to a movie recommendation system and method based on an improved deep structured semantic model. Background Art
[0002] With the continuous development of the Internet, the scale of the online video market has been growing year by year. While enjoying the rich and diverse video feasts in various forms and contents, online users are also constantly bombarded with a large amount of redundant and invalid information. This huge amount of data information far exceeds the level that users can bear, seriously interfering with users' correct selection of the information they need, resulting in very low information utilization, and even causing trouble and disgust to users.
[0003] As an effective means to solve the problem of "information overload", the recommendation system has developed rapidly in recent years, and its role in Internet services has also increased. As a carrier of rich information, movies naturally become an important research object in personalized recommendation. With the continuous growth of the number of users and movies, how to deeply mine movie information, accurately match user interests, select suitable movies for users from the vast movie library, and provide accurate personalized services has become a hot topic in the industry.
[0004] The movie recommendation algorithm is the core of the movie recommendation system. Currently, collaborative filtering is more commonly used. It is based on the user's viewing history. It finds similar users who have watched the same video as the target user, and then finds other videos that these similar users like to watch and recommends them to the target user. The problem with this solution is that when the user has few movie rating records, the collaborative filtering recommendation effect is very poor, which is the cold start problem; as the number of users and movies continues to increase, the collaborative filtering matrix will be very large, and the cost of using matrix decomposition to obtain the feature vectors of users and movies will also increase. Other solutions are to use deep neural networks or recurrent neural networks to learn users' historical preferences. At present, there is still a lot of room for development in the research of movie recommendation algorithms. Summary of the invention
[0005] The purpose of the present invention is to provide a movie recommendation system and method based on an improved deep structured semantic model to solve the problems in the prior art.
[0006] To achieve the above-mentioned purpose, the present invention provides a movie recommendation system based on an improved deep structured semantic model, comprising a user behavior collection and processing module, an offline training module and an online recall and sorting module.
[0007] The user behavior collection and processing module collects the user's interactive behavior log, search behavior log and play record list by embedding points in the front end, and stores them in the file system feature library as user feature data. With the help of data warehouse tools, the collected logs are cleaned to obtain the basic sample original data set;
[0008] Based on the cleaned raw data, the system pre-processes the user's behavior log and merges the user's behavior log data;
[0009] The offline training module receives the merged data samples output by the user behavior collection and processing module, encodes and reduces the dimension of the data, re-weights the data, extracts and mines deep latent semantic features of the data, and matches users and movies according to the data features;
[0010] The online recall and ranking module extracts the user feature vector that has been trained based on the user's attribute features, and uses the approximate nearest neighbor search technology to perform vector retrieval in the movie vector library to recall the movie subset recommended for the user.
[0011] The offline training module includes an input layer, a self-attention layer, a feature extraction layer and a matching layer.
[0012] The user feature data output by the user behavior collection and processing module are combined and sent to the input layer, the input layer includes an encoding module and a dimensionality reduction module, and the input layer inputs the user feature data to the encoding module and the dimensionality reduction module;
[0013] The self-attention layer uses a compression excitation network SENET to re-weight the data of the input layer;
[0014] The feature extraction layer uses three fully connected networks to form a deep neural network, which is used to extract and mine deep latent semantic features of the input user and movie feature vectors;
[0015] The matching layer obtains the matching score between the user and the movie by calculating the cosine similarity between the extracted latent semantic feature vectors.
[0016] The user feature data includes user dense features and user sparse features, the user dense features are input into the encoding module, and the user sparse features are input into the dimension reduction module;
[0017] The user sparse features include sparse features with determined values and variable-length sparse features. After the sparse features with determined values are input into the encoding module, they are output as low-dimensional vectors.
[0018] The variable-length sparse features include viewing history and search history, and the movie embedding sequence corresponding to the viewing history is weighted averaged by the dimension reduction module vector to obtain the viewing vector;
[0019] The search history is trained by a dimension reduction module to obtain an embedding vector, and the corresponding movie embedding sequence is weighted averaged to obtain a search vector;
[0020] The search history and the viewing history are trained in an interlaced manner, and the input layer then concatenates the processed sparse features and dense features, and uses the concatenated user and movie vectors as initial embedding vectors.
[0021] The self-attention layer includes a compression module and an excitation module, wherein the compression module performs data compression and information aggregation on the embedding vector of each feature received from the input layer to form an initial weight vector;
[0022] The excitation module is used to perform feature crossover on the initial weight vector output by the compression module and maintain the output size dimension;
[0023] The matching layer of the offline recommendation module calculates the cosine similarity between the latent semantic feature vectors extracted by the feature extraction layer to obtain the matching score between the user and the movie.
[0024] The online recall and sorting module extracts the user feature vector that has been trained based on the user's attribute characteristics, and uses the approximate nearest neighbor search technology to recall the subset of movies recommended for the user in the movie vector library. In the sorting stage, the movies that the user has watched are removed, and the similarity between the remaining movies and the user feature vector is calculated, which is used as the sorting basis, and a list of recommended results is returned.
[0025] A movie recommendation method based on an improved deep structured semantic model comprises the following steps:
[0026] S1: User behavior collection and processing: By embedding points on the front end, collect user interaction behavior logs, search behavior logs and play record lists, store them in the file system, and use data warehouse tools to clean the collected logs to obtain the original data set;
[0027] Based on the cleaned raw data, the system pre-processes the user's behavior log and merges the user's behavior log data;
[0028] S2: Offline training: S1 receives the merged data output by the user behavior collection and processing module, encodes and reduces the dimension of the data, re-weights the data, extracts and mines the deep latent semantic features of the data, and matches users and movies based on the data features;
[0029] S3: Online recall and ranking: Extract the user feature vector that has been trained based on the user's attribute characteristics, and use the approximate nearest neighbor search technology to recall the subset of movies recommended for the user in the movie vector library.
[0030] Step S2 also includes the following steps:
[0031] A1: Feature input: after receiving the combined data of the user behavior collection and processing output, encode and reduce the dimension of the user feature data;
[0032] A2: Feature learning: Use the compression excitation network SENET to re-weight the data in the input layer;
[0033] A3: Feature extraction: Use three fully connected networks to form a deep neural network to extract and mine deep latent semantic features of the input user and movie feature vectors;
[0034] A4: Feature matching: Based on the extracted latent semantic feature vectors, the cosine similarity between them is calculated to obtain the matching score between the user and the movie.
[0035] In step A1, the user sparse features include sparse features with determined values and variable-length sparse features, and the sparse features with determined values are encoded and output as low-dimensional vectors;
[0036] The variable-length sparse features include viewing history and search history. The movie embedding sequence corresponding to the viewing history is weighted averaged by the dimension reduction vector to obtain the viewing vector. The formula is as follows:
[0037]
[0038] Among them, t represents the current time, t0 represents the viewing time, m i is the embedding vector of the i-th movie;
[0039] The search history is trained by dimensionality reduction to obtain an embedding vector, and the corresponding movie embedding sequence is weighted averaged to obtain a search vector, and the formula is as follows:
[0040]
[0041] The search history and the viewing history are trained in an interlaced manner, and the input layer then concatenates the processed sparse features and dense features, and uses the concatenated user and movie vectors as initial embedding vectors.
[0042] Step A2 also includes a compression phase and an excitation phase. In the compression phase, the embedding vector of each feature received from step A1 is compressed and information is aggregated to form an initial weight vector. The formula is as follows:
[0043]
[0044] The excitation stage performs feature crossover on the initial weight vector output in the compression stage and maintains the output size dimension. In the compression stage, a two-layer MLP network with a relatively narrow middle layer is introduced to act on the output vector Z in the excitation stage. The formula is as follows:
[0045] S=F ex (Z,W) = δ(W2δ(W1Z));
[0046] Among them, δ is the activation function, the role of the first MLP is to do feature crossover, and the role of the second MLP is to maintain the size dimension of the output.
[0047] In step A3, three fully connected networks are used to form a deep neural network to extract and mine deep latent semantic features of the input user and movie feature vectors. The latent semantic feature vector y is specifically expressed as:
[0048] l i =f(W i l i-1 +b i ),i=2,…,N-1;
[0049] y=f(W N l N-1 +b N );
[0050] Among them, {l i , i=1,2,…,N-1} represents the output of each fully connected layer, W i , b i Represent the weight matrix and bias term of the i-th layer respectively,
[0051] f represents the activation function tanh:
[0052]
[0053] Step A4 calculates the cosine similarity between the latent semantic feature vectors extracted by feature extraction in step A3 to obtain a matching score between the user and the movie;
[0054]
[0055] Among them, y U ,y M denote the final latent semantic feature vectors of users and movies, respectively, ‖·‖ denotes the modular operation;
[0056] During model training, the cosine similarity of the final feature vectors of users and movies is converted into posterior probability through the softmax function. The formula is as follows:
[0057]
[0058] Among them, γ represents the smoothing factor of the softmax function, and the loss function is minimized by maximum likelihood estimation. By increasing the time weight, the goal is to maximize the user's viewing time. The formula is as follows:
[0059] L(Λ)=-log∏ (U,M+) T j ·P(M + |U);
[0060] Among them, T j represents the duration of the jth movie, M represents the candidate movie set, Λ represents the model parameter, and M + Represents the positive samples in the candidate movies.
[0061] Step S3 extracts the user feature vector that has been trained based on the user's attribute characteristics, and uses the approximate nearest neighbor search technology to recall the subset of movies recommended for the user in the movie vector library. In the sorting stage, the movies that the user has watched are removed, and the similarity between the remaining movies and the user feature vector is calculated, which is used as the sorting basis, and a list of recommended results is returned.
[0062] Compared with the prior art, the present invention has the following beneficial effects:
[0063] 1. The improved deep structured semantic recommendation model proposed in this patent can effectively mine movies that meet the user's interests based on the explicit features and implicit interaction information between the user and the movie, and provide users with personalized recommendation services;
[0064] 2. This patent uses the Faiss framework to save the feature vectors of users and movies trained by the model according to their attribute characteristics. When the user visits the system again, the vector can be quickly retrieved and used for ANN search to obtain the recommendation results for the user;
[0065] 3. The movie recommendation system proposed in this patent will continuously collect user behavior logs and regularly update these historical records to the user's portrait to ensure that the system can learn the user's recent interests in a timely manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 A schematic diagram of a movie recommendation system based on an improved deep structured semantic model according to the present invention;
[0067] Figure 2 This is a structural diagram of an offline training model of a movie recommendation system based on an improved deep structured semantic model of the present invention;
[0068] Figure 3A schematic diagram of a movie recommendation system based on an improved deep structured semantic model for solving the time travel problem of the present invention;
[0069] Figure 4 This is a flow chart of an embodiment of a movie recommendation method based on an improved deep structured semantic model of the present invention. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the technical scheme in the embodiments of the present invention will be described clearly and completely below. If the specific conditions are not specified in the embodiments, they are carried out according to conventional conditions or conditions recommended by the manufacturer. If the manufacturer of the reagents or instruments is not specified, they are all conventional products that can be purchased commercially.
[0071] Example: Figure 1 As shown in FIG. 1 , a movie recommendation system based on an improved deep structured semantic model includes a user behavior collection and processing module, an offline training module, and an online recall and sorting module.
[0072] The user behavior collection and processing module collects the user's interactive behavior log, search behavior log and play record list by embedding points in the front end, and stores them in the file system feature library as user feature data. The feature library of this embodiment adopts the Faiss framework, and with the help of data warehouse tools, the collected logs are cleaned to obtain the basic sample original data set;
[0073] Based on the cleaned raw data, the system pre-processes the user's behavior log and merges the user's behavior log data;
[0074] The offline training module receives the merged data samples output by the user behavior collection and processing module, encodes and reduces the dimension of the data, re-weights the data, extracts and mines the deep latent semantic features of the data, completes model training, matches users and movies based on data features, and completes model prediction;
[0075] The online recall and sorting module extracts the user feature vector model prediction data that has been trained based on the user's attribute characteristics, and uses the approximate nearest neighbor search technology to perform vector retrieval in the movie vector library. In this embodiment, the vector retrieval uses the nearest neighbor search ANN to recall the movie subset recommended for the user.
[0076] like Figure 2 As shown in Figure 1, the offline training module includes input layer, self-attention layer, feature extraction layer and matching layer.
[0077] The user feature data output by the user behavior collection and processing module are merged and sent to the input layer, which includes an encoding module and a dimensionality reduction module. The input layer inputs the user feature data to the encoding module and the dimensionality reduction module;
[0078] The self-attention layer uses the compressed excitation network SENET to re-weight the data of the input layer;
[0079] The feature extraction layer uses three fully connected networks to form a deep neural network, which is used to extract and mine deep latent semantic features of the input user and movie feature vectors;
[0080] The matching layer obtains the matching score between users and movies by calculating the cosine similarity between the extracted latent semantic feature vectors.
[0081] User feature data includes user dense features and user sparse features. User dense features are input into the encoding module, and user sparse features are input into the dimension reduction module.
[0082] User sparse features include sparse features with certain values and variable-length sparse features. After the sparse features with certain values are input into the encoding module, they are output as low-dimensional vectors.
[0083] The variable-length sparse features include viewing history and search history. The movie embedding sequence corresponding to the viewing history is weighted averaged by the dimension reduction module vector to obtain the viewing vector.
[0084] The search history is trained by the dimension reduction module to obtain the Embedding embedding vector, and the corresponding movie Embedding embedding sequence is weighted averaged to obtain the search vector;
[0085] The search history and viewing history are trained in an interlaced manner. The input layer then concatenates the processed sparse features and dense features, and uses the concatenated user and movie vectors as the initial Embedding vector.
[0086] The self-attention layer includes a compression module and an excitation module. The compression module compresses data and summarizes information on the Embedding vector of each feature received from the input layer to form an initial weight vector.
[0087] The excitation module is used to perform feature crossover on the initial weight vector output by the compression module and maintain the output size dimension;
[0088] The matching layer of the offline recommendation module calculates the cosine similarity between the latent semantic feature vectors extracted by the feature extraction layer to obtain the matching score between the user and the movie.
[0089] The online recall and sorting module extracts the user feature vector that has been trained based on the user's attribute characteristics, and uses the approximate nearest neighbor search technology ANN to recall the subset of movies recommended for the user in the movie vector library. In the sorting stage, the movies that the user has watched are removed, and the similarity between the remaining movies and the user feature vector is calculated, which is used as the basis for sorting, and a list of recommended results is returned.
[0090] A movie recommendation method based on an improved deep structured semantic model comprises the following steps:
[0091] S1: User behavior collection and processing: By embedding points on the front end, collect user interaction behavior logs, search behavior logs and play record lists, store them in the file system, and use data warehouse tools to clean the collected logs to obtain the original data set;
[0092] Based on the cleaned raw data, the system pre-processes the user's behavior log and merges the user's behavior log data;
[0093] S2: Offline training: S1 receives the merged data output by the user behavior collection and processing module, encodes and reduces the dimension of the data, re-weights the data, extracts and mines the deep latent semantic features of the data, and matches users and movies based on the data features;
[0094] S3: Online recall and ranking: Extract the user feature vector that has been trained based on the user's attribute characteristics, and use the approximate nearest neighbor search technology to recall the subset of movies recommended for the user in the movie vector library.
[0095] Step S2 also includes the following steps:
[0096] A1: Feature input: After receiving the merged data of user behavior collection and processing output, encode and reduce the dimension of user feature data;
[0097] A2: Feature learning: Use the compression excitation network SENET to re-weight the data in the input layer;
[0098] A3: Feature extraction: Use three fully connected networks to form a deep neural network to extract and mine deep latent semantic features of the input user and movie feature vectors;
[0099] A4: Feature matching: Based on the extracted latent semantic feature vectors, the cosine similarity between them is calculated to obtain the matching score between the user and the movie.
[0100] In step A1, the user sparse features include sparse features with determined values and variable-length sparse features. The sparse features with determined values are encoded and output as low-dimensional vectors.
[0101] Perform one-hot encoding on dense user features, and embedding and dimension reduction to low-dimensional space on sparse user features.
[0102] The processing of user sparse features can be divided into two categories:
[0103] One is to process sparse features with certain values: such features are mainly coded features such as user ID, user age, user occupation, etc. Each user has only a unique value for such features. You can use machine learning libraries such as pytorch and the torch.nn.Embedding tool to create a word embedding model for encoding, and output sparse features with certain values into low-dimensional vectors.
[0104] The variable-length sparse features include viewing history and search history. The movie embedding sequence corresponding to the viewing history is weighted averaged by the dimension reduction vector to obtain the viewing vector. The formula is as follows:
[0105]
[0106] Among them, t represents the current time, t0 represents the viewing time, m i is the Embedding embedding vector of the i-th movie;
[0107] The processing of user search history is similar to that of viewing history. First, the keywords of historical search are segmented to obtain term tokens, and the Embedding embedding vector of the token is trained. Then, the Embedding embedding vectors corresponding to the tokens of the user's historical search are weighted averaged to obtain the search vector. In this way, the overall state of the user's search history can be learned. The shorter the time interval with the current time, the higher the weight of the Embedding embedding vector. The formula is as follows:
[0108] The search history is trained by dimensionality reduction to obtain an embedding vector, and the corresponding movie embedding sequence is weighted averaged to obtain the search vector. The formula is as follows:
[0109]
[0110] For the training of these two types of variable-length sequence features, the system has a mechanism to punish overly active users. It sets an upper limit for sequence features for each user to prevent the model from being represented by a small number of overly active users and to make equal recommendations to each user.
[0111] like Figure 3As shown, considering that users often watch videos and search in sequence, and some previous and subsequent viewing behaviors even have some causal relationships, the traditional recommendation model uses the previous and subsequent contexts as input information, which is equivalent to revealing some future information for training. In order to solve such a time travel problem, the present invention completely separates the future information from the training samples, and uses the search records of T-2 and the viewing history records of T-1 for training to solve the time travel problem.
[0112] The search history and viewing history are trained in an interlaced manner. The input layer then concatenates the processed sparse features and dense features, and uses the concatenated user and movie vectors as the initial embedding vectors.
[0113] In step A2, the compression excitation network SENET is used to dynamically learn the importance of these features. Ineffective low-frequency features are suppressed by reducing the weights, and important features are amplified by increasing the weights. The initial embedding vectors of users and movies are re-weighted. Specifically, it includes the Squeeze compression stage and the Excitation excitation stage. The Squeeze compression stage compresses the data and summarizes the information of the embedding vector of each feature received from step A1 to form an initial weight vector. The formula is as follows:
[0114]
[0115] Assume that a feature u i The dimension of the Embedding embedding vector is k, so we average the k numbers contained in the Embedding embedding vector to get the value z that can represent the summary information of this feature. i ;
[0116] Through the Squeeze compression stage, for each feature u i , are compressed into a single value z i , assuming that the concatenated Embedding embedding vector has f features, we can form the initial weight vector Z = {z1,z2,…,z f};
[0117] The Excitation stage performs feature crossover on the initial weight vector output in the Squeeze stage and maintains the output size dimension. In the Excitation stage, a two-layer MLP network with a relatively narrow middle layer is introduced to act on the output vector Z in the excitation stage. The formula is as follows:
[0118] S=F ex (Z,W) = δ(W2δ(W1Z));
[0119] Among them, δ is the activation function, the role of the first MLP is to do feature crossover, and the role of the second MLP is to maintain the size dimension of the output.
[0120] In step A3, three fully connected networks DNN are used to form a deep neural network to extract and mine deep latent semantic features of the input user and movie feature vectors. The latent semantic feature vector y is specifically expressed as:
[0121] l i =f(W i l i-1 +b i ),i=2,…,N-1;
[0122] y=f(W N l N-1 +b N );
[0123] Among them, {l i , i=1,2,…,N-1} represents the output of each fully connected layer, W i , b i Represent the weight matrix and bias term of the i-th layer respectively,
[0124] f represents the activation function tanh:
[0125]
[0126] Step A4 calculates the cosine similarity between the latent semantic feature vectors extracted by feature extraction in step A3 to obtain a matching score between the user and the movie;
[0127]
[0128] Among them, y U ,y M denote the final latent semantic feature vectors of users and movies, respectively, ‖·‖ denotes the modular operation;
[0129] The input of the model consists of a user and a set of multiple candidate movies. The movie set contains a certain proportion of positive and negative samples. The positive and negative ratios are divided according to the user's preference for the movie. A preference greater than 0.5 is a positive sample, and a preference less than 0.3 is a negative sample. The formula for calculating the preference is as follows:
[0130]
[0131] in, Represents user u i About the movie jIf the viewing time is less than 30% of the film length, 1 point is awarded; if it is more than 70%, 2 points are awarded. and Represents user u i About the movie j The scores for likes and reposts, this patent sets the scores for likes and reposts to 3 points and 4 points.
[0132] During model training, the cosine similarity of the final feature vectors of users and movies is converted into posterior probability through the softmax function. The formula is as follows:
[0133]
[0134] Among them, γ represents the smoothing factor of the softmax function, and the loss function is minimized by maximum likelihood estimation. By increasing the time weight, the goal is to maximize the user's viewing time. The formula is as follows:
[0135]
[0136] Among them, T j represents the duration of the jth movie, M represents the candidate movie set, Λ represents the model parameter, and M + Represents the positive samples in the candidate movies.
[0137] Step S3 extracts the user feature vector that has been trained based on the user's attribute characteristics, and uses the approximate nearest neighbor search technology to recall the subset of movies recommended for the user in the movie vector library. In the sorting stage, the movies that the user has watched are removed, and the similarity between the remaining movies and the user feature vector is calculated, which is used as the sorting basis, and a list of recommended results is returned.
[0138] The specific implementation flow chart is as follows Figure 4 As shown. First, the user enters the system and logs in. The system determines whether the user is a new user. If the user is not a new user, it means that the system already has historical data for the user. The system has obtained the feature vector of the user in the latent semantic space, and has created an index based on the user's ID and stored it in the Faiss framework. The system retrieves the feature vector based on the user ID, and uses this feature vector to perform an approximate nearest neighbor search (ANN) in the movie vector library to recall a candidate set of movies that the user may be interested in. Since the movie candidate set may contain movies that the user has already watched, the system will screen the movie candidate set again during the sorting stage, remove the movies that have already been watched, calculate the similarity between the remaining movies and the user's feature vector, use this as the basis for sorting, and return a TOP-N list of recommended results.
[0139] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit and essential features of the present invention. Therefore, the embodiments should be regarded as exemplary and non-limiting from any point of view, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention, and any reference numerals in the claims should not be regarded as limiting the claims involved.
[0140] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A movie recommendation system based on an improved deep structured semantic model, characterized in that: It includes user behavior collection and processing module, offline training module and online recall and sorting module. The user behavior collection and processing module collects the user's interactive behavior log, search behavior log and play record list by embedding points in the front end, and stores them in the file system feature library as user feature data. With the help of data warehouse tools, the collected logs are cleaned to obtain the basic sample original data set; Based on the cleaned raw data, the system pre-processes the user's behavior log and merges the user's behavior log data; The offline training module receives the merged data samples output by the user behavior collection and processing module, encodes the data for dimensionality reduction, re-weights and semantics, and outputs the longest movie collection among the movies that the user is most likely to watch; wherein, the offline training module includes an input layer, a self-attention layer, a feature extraction layer and a matching layer; the user feature data output by the user behavior collection and processing module are merged and sent to the input layer, the input layer includes an encoding module and a dimensionality reduction module, and the input layer inputs the user feature data to the encoding module and the dimensionality reduction module; the self-attention layer uses a compression excitation network SENET to re-weight the data of the input layer; the feature extraction layer uses three fully connected networks to form a deep neural network for extracting and mining deep latent semantic features of the input user and movie feature vectors; the matching layer obtains the matching score between the user and the movie by calculating the cosine similarity between the extracted latent semantic feature vectors; The online recall and ranking module extracts the user feature vector that has been trained based on the user's attribute features, and uses the approximate nearest neighbor search technology to perform vector retrieval in the movie vector library to recall the movie subset recommended for the user.
2. The movie recommendation system based on the improved deep structured semantic model according to claim 1, characterized in that: The user feature data includes user dense features and user sparse features, the user dense features are input into the encoding module, and the user sparse features are input into the dimension reduction module; The user sparse features include sparse features with determined values and variable-length sparse features. After the sparse features with determined values are input into the encoding module, they are output as low-dimensional vectors. The variable-length sparse features include viewing history and search history, and the movie embedding sequence corresponding to the viewing history is weighted averaged by the dimension reduction module vector to obtain the viewing vector; The search history is trained by a dimension reduction module to obtain an embedding vector, and the corresponding movie embedding sequence is weighted averaged to obtain a search vector; The search history and the viewing history are trained in an interlaced manner, and the input layer then concatenates the processed sparse features and dense features, and uses the concatenated user and movie vectors as initial embedding vectors.
3. The movie recommendation system based on the improved deep structured semantic model according to claim 1, characterized in that: The self-attention layer includes a compression module and an excitation module, wherein the compression module performs data compression and information aggregation on the embedding vector of each feature received from the input layer to form an initial weight vector; The excitation module is used to perform feature crossover on the initial weight vector output by the compression module and maintain the output size dimension; The matching layer of the offline training module calculates the cosine similarity between the latent semantic feature vectors extracted by the feature extraction layer to obtain the matching score between the user and the movie.
4. The movie recommendation system based on the improved deep structured semantic model according to claim 1, characterized in that: The online recall and sorting module extracts the user feature vector that has been trained based on the user's attribute characteristics, and uses the approximate nearest neighbor search technology to recall the subset of movies recommended for the user in the movie vector library. In the sorting stage, the movies that the user has watched are removed, and the similarity between the remaining movies and the user feature vector is calculated, which is used as the sorting basis, and a list of recommended results is returned.
5. A movie recommendation method based on an improved deep structured semantic model, characterized in that: The following steps are involved: S1: User behavior collection and processing: By embedding points on the front end, collect user interaction behavior logs, search behavior logs and play record lists, store them in the file system, and use data warehouse tools to clean the collected logs to obtain the original data set; Based on the cleaned raw data, the system pre-processes the user's behavior log and merges the user's behavior log data; S2: Offline training: S1 receives the merged data output by the user behavior collection and processing module, encodes the data for dimensionality reduction, re-weighting and semantic matching, and outputs the longest movie collection among the movies that the user is most likely to watch; Step S2 also includes the following steps: A1: Feature input: after receiving the combined data of the user behavior collection and processing output, encode and reduce the dimension of the user feature data; A2: Feature learning: Use the compression excitation network SENET to re-weight the data in the input layer; A3: Feature extraction: Use three fully connected networks to form a deep neural network to extract and mine deep latent semantic features of the input user and movie feature vectors; A4: Feature matching: Based on the extracted latent semantic feature vectors, the cosine similarity between them is calculated to obtain the matching score between the user and the movie; In step A1, the user sparse features include sparse features with determined values and variable-length sparse features, and the sparse features with determined values are encoded and output as low-dimensional vectors; The variable-length sparse features include viewing history and search history. The movie embedding sequence corresponding to the viewing history is weighted averaged by the dimension reduction vector to obtain the viewing vector. The formula is as follows: Among them, t represents the current time, t0 represents the viewing time, m j is the embedding vector of the jth movie; The search history is trained by dimensionality reduction to obtain an embedding vector, and the corresponding movie embedding sequence is weighted averaged to obtain a search vector, and the formula is as follows: Among them, token j A word vector representing the user’s search history; The search history and the viewing history are trained in an interlaced manner, and the input layer then concatenates the processed sparse features and dense features, and uses the concatenated user and movie vectors as initial embedding vectors; Step A2 also includes a compression phase and an excitation phase. In the compression phase, the embedding vector of each feature received from step A1 is compressed and information is aggregated to form an initial weight vector. The formula is as follows: Among them, K represents the dimension of the embedding vector; the excitation stage performs feature crossover on the initial weight vector output in the compression stage and maintains the output size dimension. In the compression stage, a two-layer MLP network with a relatively narrow middle layer is introduced to act on the output vector Z in the excitation stage. The formula is as follows: S=F ex (Z,w)=δ(w2δ(w1 Z)); Among them, δ is the activation function, the role of the first MLP is to do feature crossover, and the role of the second MLP is to maintain the size dimension of the output; w is the parameter calculated by the two-layer neural network, w1 and w2 represent the learning parameter matrix of the MLP neural network, w1 is the downsampling matrix, and w2 is the upsampling matrix; In step A3, three fully connected networks are used to form a deep neural network to extract and mine deep latent semantic features of the input user and movie feature vectors. The latent semantic feature vector y is specifically expressed as: l i =f(W i l i-1 +bi),i=2,…,N-1; y=f(W N l N-1 +b N ); Among them, {l i , i=1,2,…,N-1} represents the output of each fully connected layer, N represents the number of layers of the deep neural network; x represents the input of the latent semantic feature vector y, that is, the output of each layer of the deep neural network; W i , b i Respectively represent the weight matrix and bias term of the i-th layer, and f represents the activation function tanh: Step A4 calculates the cosine similarity between the latent semantic feature vectors extracted by feature extraction in step A3 to obtain a matching score between the user and the movie; Among them, y U ,y M They represent the final implicit semantic feature vectors of the user and the movie respectively, and ∥·∥ represents the modular operation. During model training, the cosine similarity of the final feature vectors of the user and the movie is converted into the posterior probability through the softmax function. The formula is as follows: Among them, γ represents the smoothing factor of the softmax function, and the loss function is minimized by maximum likelihood estimation. By increasing the time weight, the goal is to maximize the user's viewing time. The formula is as follows: Among them, T j represents the duration of the jth movie, M represents the candidate movie set, Λ represents the model parameter, and M + Represents the positive samples in the candidate movies; S3: Online recall and ranking: Extract the user feature vector that has been trained based on the user's attribute characteristics, and use the approximate nearest neighbor search technology to recall the subset of movies recommended for the user in the movie vector library.
6. The movie recommendation method based on the improved deep structured semantic model according to claim 5, characterized in that: Step S3 extracts the user feature vector that has been trained based on the user's attribute characteristics, and uses the approximate nearest neighbor search technology to recall the subset of movies recommended for the user in the movie vector library. In the sorting stage, the movies that the user has watched are removed, and the similarity between the remaining movies and the user feature vector is calculated, which is used as the sorting basis, and a list of recommended results is returned.
Citation Information
Patent Citations
Personalized recommendation method and system based on interactive data clustering
CN110162706A
Movie recommendation method and system based on knowledge graph and reinforcement learning
CN113051468A