A movie recommendation method based on multi-angle mask interest modeling
By employing a multi-angle masking interest modeling method, combined with deep learning and masking technology, we optimize the representation of user and movie features, solving the problem of singular interest learning in existing technologies and achieving more personalized movie recommendations.
Patent Information
- Application Number
- CN202210804502.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-08
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-07-08
AI Technical Summary
Existing movie recommendation methods mainly rely on historical behavioral data, resulting in a relatively singular understanding of user interests and failing to fully reflect the multi-faceted interests users have when choosing movies.
A multi-angle masking interest modeling method is adopted. By using a deep learning model to map users and movies to a feature vector space, the dominant interest and specific interest are combined. Multiple interaction records are discarded using masking technology to optimize feature representation and fuse multiple feature vectors to reflect the multi-angle interests of users and movies.
It achieves a more comprehensive reflection of user interests and preferences, improves the personalization of movie recommendations, saves storage space and computing costs, and ensures the effectiveness of recommendations.
Smart Images

Figure CN115203270B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of movie recommendation, and particularly relates to a movie recommendation method based on multi-angle mask interest modeling. BACKGROUND
[0002] With the development and progress of society, people's spiritual needs are more and more, and the content requirements of video works are higher and higher. The development of the film industry has caused a large number of movie works to be overloaded, and the overwhelming movies make users unable to efficiently find the works they want to watch. The emergence of movie recommendation technology alleviates this problem, which can individualize recommend movies that meet the user's preferences according to the user's browsing and rating records.
[0003] At present, the traditional movie recommendation method mainly obtains the behavior preferences of users by means of historical behavior data, and generates interest recommendations by using collaborative filtering and other methods, so that the learned interest is relatively single. However, the interest angle of a user selecting a movie is diverse, so learning multi-angle interest is particularly important for movie recommendation technology. SUMMARY
[0004] In view of this, the purpose of the present application is to provide a movie recommendation method based on multi-angle mask interest modeling, which learns the multi-angle interest of users when they like movies by using mask technology. The multi-angle interest is interpreted from the aspects of dominant interest and specific interest of preferred movies, and the multi-angle interest and attribute characteristics of users and movies are described by combining the dominant interest and the specific interest, so as to realize personalized movie recommendation.
[0005] The present application solves the above technical problems by the following technical means:
[0006] A movie recommendation method based on multi-angle mask interest modeling, the operation steps are as follows:
[0007] S1: Collect the historical movie watching records and rating records of users as original data, and number the users and movies in the original data after preprocessing the original data;
[0008] S2: Map the users and movies into a feature vector space by using a deep learning model, and obtain the initial feature representation of the users and the initial feature representation of the movies by Gaussian initialization;
[0009] S3: Use multi-mask technology on the original user-movie interaction records, mask the user-movie interaction records with a small proportion, map the users and movies after multi-interaction mask into a feature vector by using a deep learning model, and obtain a plurality of user feature representations and movie feature representations after mask;
[0010] S4: obtaining the user feature vector and the movie feature vector with the dominant interest attribute according to the mean of the user feature representation and the movie feature representation after the multiple masks;
[0011] S5: obtaining the user feature vector and the movie feature vector with the specific interest attribute by performing difference between the initial user feature representation and the movie feature representation and the multiple user feature representations and movie feature representations after the masks, and aggregating the values thereof;
[0012] S6: fusing the user feature vector and the movie feature vector representing the dominant interest attribute and the specific interest attribute to obtain the user feature vector and the movie feature vector containing multi-angle interests;
[0013] S7: performing similarity calculation on the obtained user feature vector and the movie feature vector containing the dominant interest and the specific interest, sorting the similarity measurement values of each user vector with respect to all movie vectors, and selecting the top K movies according to the size of the measurement values to generate Top-K movie recommendations for the user.
[0014] Further, the viewing data and the film rating data (the full score of the rating is 5) of the user are collected as the original data, the original data is preprocessed, and the user and the movie in the original data are numbered, specifically including: regarding the user giving a movie a score of 5 as having interaction with the movie, and regarding the user giving a movie a score of 0-4 as having no interaction with the movie, to generate a user-movie interaction record. The user and the movie are uniformly numbered, and unique IDs are set for the user and the movie respectively.
[0015] Further, the deep learning model is an MF (Matrix Factorization) model, the loss function is a BPR (Bayesian Pairwise Loss) function, the user-movie interaction is trained by the MF model, the feature representation of the user and the movie is initialized by Gaussian, and the feature representation of the user and the movie is optimized by a stochastic gradient descent optimization algorithm to obtain the initial feature representation of the user and the movie.
[0016] Further, the mask technology is random proportion discarding of the user-movie interaction record, the MF model is trained on the user-movie interaction discarded in multiple random small proportions, the feature representation of the user and the movie is initialized by Gaussian, and the feature representation of the user and the movie is optimized by a stochastic gradient descent optimization algorithm to obtain the multiple user feature representations and movie feature representations after the masks.
[0017] Further, the mean of the multiple user feature representations and movie feature representations after the masks is a weighted average operation on the multiple user feature representations and movie feature representations after the masks to obtain the user feature vector and the movie feature vector with the dominant interest attribute.
[0018] Further, the aggregate value of the initial feature representation and the plurality of mask feature representations is a specific interest expression, specifically comprising: subtracting the initial user feature representation and the movie feature representation from the plurality of mask user feature representations and movie feature representations in the vector space to obtain a plurality of user feature vectors and movie feature vectors with different specific interests; and aggregating the plurality of different specific interests by using a splicing operation to obtain user feature vectors and movie feature vectors with specific interest attributes.
[0019] Further, the dominant interest attribute and the specific interest attribute are aggregated by using a splicing operation to obtain user feature vectors and movie feature vectors containing multi-angle interests.
[0020] Further, the spatial distance similarity of the user vector and the candidate movie vector is calculated by using inner product; and the similarity measurement value is sorted to obtain a Top-K movie recommendation for the user.
[0021] The present application has the following beneficial effects:
[0022] The present application uses the MF model to efficiently model the user interest and the movie attribute, retains the initial user feature and the initial movie feature, and saves the storage space and the calculation cost;
[0023] The present application uses the mask technology to mask the user movie interaction record multiple times, efficiently models the user and the movie respectively, and obtains a plurality of mask feature representations; the mean value of the plurality of mask feature representations can reflect the dominant interest feature and the dominant attribute feature of the user and the movie; the initial feature representation and the plurality of mask feature representations are subtracted to obtain a plurality of feature representations reflecting different specific interests; the plurality of specific interest expressions are fused to obtain the specific interest feature and the specific attribute feature of the user and the movie; reasonable interest modeling can more comprehensively reflect the movie interest preference of the user;
[0024] The present application combines the dominant interest feature and the specific interest feature of the user, and combines the dominant attribute feature and the specific attribute feature of the movie by using the vector fusion method; the fused user and movie features can reflect the interest of the user and the attribute of the movie from multiple angles, and ensure the effectiveness of the movie recommendation technology; the similarity of the user vector and the movie vector is calculated by using the efficient inner product operation, and the personalized movie recommendation is realized. BRIEF DESCRIPTION OF DRAWINGS
[0025] The drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation on the present application. In the drawings:
[0026] Figure 1 It is a general block diagram of the movie recommendation method based on the mask technology multi-angle interest modeling in the present application.
[0027] Figure 2 modeling the schematic diagram for multiple mask features;
[0028] Figure 3 modeling the schematic diagram for leading interest and attribute features;
[0029] Figure 4 modeling the schematic diagram for specific interest and attribute features;
[0030] Figure 5 modeling the schematic diagram for aggregated features and interaction prediction. DETAILED DESCRIPTION
[0031] In order to make the objectives, characteristics and advantages of the technical solutions proposed in the present application more obvious and easy to understand, the embodiments of the technical solutions proposed in the present application will be clearly and completely described below with reference to the drawings. Obviously, the described embodiments are only a part of the embodiments of the proposed technical solutions, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0032] As shown in Figure 1 The movie recommendation method based on multi-angle mask interest modeling of the present application specifically comprises:
[0033] S1: Collect the historical movie watching records and rating records of users as original data, and after pre-processing the original data, number the users and movies in the original data;
[0034] S2: Map the users and movies into a feature vector space by using a deep learning model, and obtain the initial feature representation of the users and the initial feature representation of the movies through Gaussian initialization;
[0035] S3: Adopt multiple mask technologies for the original user-movie interaction records, and mask the user-movie interaction records with a small proportion; map the users and movies after multiple interaction masks into a feature vector by using a deep learning model, and obtain multiple user feature representations and movie feature representations after masks;
[0036] S4: Obtain the user feature vector and the movie feature vector with leading interest attributes according to the mean of the multiple user feature representations and movie feature representations after masks;
[0037] S5: Subtract the initial user feature representation and the initial movie feature representation from the multiple user feature representations and movie feature representations after masks, and obtain the user feature vector and the movie feature vector with specific interest attributes from the aggregated values;
[0038] S6: The user feature vector and movie feature vector representing the dominant interest attribute and specific interest attribute are fused to obtain user feature vector and movie feature vector containing multi-angle interests;
[0039] S7: Calculate the similarity between the obtained user feature vectors containing dominant and specific interests and the movie feature vectors. Sort the similarity measure values of each user vector with respect to all movie vectors, select the top K movies according to the size of the measure value, and generate Top-K movie recommendations for users.
[0040] Figure 2 This diagram illustrates multiple mask feature modeling steps used in this method. The specific steps include:
[0041] S1: Collect user viewing data and film rating data (ratings are out of 5) as raw data. After preprocessing the raw data, assign numbers to users and movies in the raw data. Specifically, a user rating a movie to 5 stars is considered an interaction with the movie, while a rating of 0-4 stars is considered no interaction. Generate user movie interaction records. Assign unique IDs to users and movies, starting from 0 and sorted in ascending order.
[0042] S2: After obtaining the preprocessed data from step S1, a deep learning model of MF (Matrix Factorization) is used, employing a Bayesian pairwise loss function. Positive examples in the loss function represent user interactions with movies they like, i.e., interactions with movies they've watched and rated 5 stars; negative examples represent interactions with movies they haven't viewed or disliked, i.e., interactions with movies they haven't watched or rated 0-4 stars. The stochastic gradient descent algorithm is used to optimize the Bayesian pairwise loss, yielding initial feature representations of users and movies.
[0043] S3: Uses masking technology to randomly record user movie interactions. Second-rate Discard proportionally, here Set to 8, ratio Set to 20%. Similar to the training steps in step S2, the MF model performs n random iterations. The user-movie interactions were discarded proportionally during training. Gaussian initialization was used for the user and movie feature representations, which were then optimized using a stochastic gradient descent algorithm. User feature representation and movie feature representation after masking.
[0044] Figure 3 This diagram illustrates the dominant interest and attribute feature modeling in this method. The specific steps include:
[0045] S4: Step S3 yielded After the user feature representation and movie feature representation after the mask, the... The average value of the user feature representation and the movie feature representation after each mask is calculated separately.
[0046]
[0047]
[0048] A weighted average of the user feature representations and movie feature representations after multiple masks is performed to obtain the user feature vector and movie feature vector with dominant interest attributes.
[0049] Figure 4 This diagram illustrates the modeling of specific interests and attribute features in this method. The specific steps include:
[0050] S5: In step S2, the initial feature representations of users and movies were obtained respectively. In step S3, the initial feature representations of users and movies were obtained. Each mask feature representation combines the initial feature representation with the vector space. Subtracting the feature representations after each mask yields... The masked features convey specific user and film interest information. and ,Right now
[0051]
[0052] Multiple different specific interests are aggregated using a concatenation operation to obtain user feature vectors and movie feature vectors with specific interest attributes, which are the user's specific interest features and the movie's specific attribute features. and ,Right now
[0053]
[0054] "||" is the vector splicing symbol.
[0055] Figure 5 This diagram illustrates the aggregated features and interactive predictions used in this method. The specific steps include:
[0056] S6: After obtaining the dominant interest / attribute features and specific interest / attribute features of users and movies from steps S4 and S5 respectively, the dominant interest attributes and specific interest attributes are aggregated using a concatenation operation to obtain user feature vectors and movie feature vectors containing multi-angle interests.
[0057]
[0058] S7: Obtain the user feature vector and the movie feature vector after the aggregation from step S6, and calculate the spatial distance similarity of the user vector and the candidate movie vector by using the inner product, i.e.
[0059]
[0060] wherein denote the predicted scores of the user and the movie , and then the similarity measure value is sorted to obtain the Top-K movie recommendation of the user.
[0061] The deep learning model MF in the present application refers to a matrix factorization model, and the loss function BPR refers to a Bayesian pairwise loss function.
Claims
1. A movie recommendation method based on multi-angle mask interest modeling, characterized in that, The operation steps are: S1: Collect the user's historical movie watching records and rating records as original data, and number the users and movies in the original data after preprocessing the original data; S2: Map the users and movies to a feature vector space using a deep learning model, and obtain the initial feature representation of the users and the initial feature representation of the movies through Gaussian initialization; S3: Use multiple masking techniques on the original user-movie interaction records, mask a preset proportion of user-movie interaction records, and map the multiple interaction masked users and movies to a feature vector using a deep learning model to obtain multiple user feature representations and movie feature representations after masking; S4: Obtain user feature vectors and movie feature vectors with dominant interest attributes according to the mean of the multiple masked user feature representations and movie feature representations; S5: Subtract the initial user feature representation and movie feature representation from the multiple masked user feature representations and movie feature representations, and obtain user feature vectors and movie feature vectors with specific interest attributes from the aggregated values; S6: Fuse the user feature vectors and movie feature vectors representing the dominant interest attributes and specific interest attributes to obtain user feature vectors and movie feature vectors containing multi-angle interests; S7: Calculate the similarity of the obtained user feature vectors and movie feature vectors containing dominant interests and specific interests, sort the similarity measurement values of each user vector with respect to all movie vectors, and select the top K movies according to the size of the measurement values to generate a Top-K movie recommendation for the user. 2.The movie recommendation method based on multi-angle mask interest modeling of claim 1, wherein: The S1 collects the user's viewing data and movie rating data as original data, and numbers the users and movies in the original data after preprocessing the original data, and the specific steps are: S11: User ratings of 5 for a movie are considered as having interaction with the movie, and user ratings of 0-4 for a movie are considered as having no interaction with the movie, and user-movie interaction records are generated; S12: Uniformly number the users and movies, and set unique IDs for the users and movies. 3.The movie recommendation method based on multi-angle mask interest modeling of claim 1, wherein: The deep learning model is an MF (Matrix Factorization) model, the loss function is a BPR (Bayesian Pairwise Loss) function, and the optimizer is a stochastic gradient descent optimization algorithm. The user-movie interaction is trained by the MF model, the feature representation of the user and the movie is initialized by Gaussian, and the feature representation of the user and the movie is optimized by the stochastic gradient descent optimization algorithm to obtain the initial feature representation of the user and the movie.
4. The movie recommendation method based on multi-angle mask interest modeling according to claim 1, characterized in that: The masking technique is a random proportion of user-movie interaction records, and the MF model trains multiple random preset proportion discarded user-movie interactions, initializes the feature representation of the user and the movie by Gaussian, and optimizes the feature representation of the user and the movie by the stochastic gradient descent optimization algorithm to obtain multiple user feature representations and movie feature representations after masking.
5. The movie recommendation method based on multi-angle mask interest modeling according to claim 1, characterized in that: The mean of the multiple masked user feature representations and movie feature representations is a weighted average operation of the multiple masked user feature representations and movie feature representations, and the user feature vectors and movie feature vectors with dominant interest attributes are obtained.
6. The movie recommendation method based on multi-angle mask interest modeling according to claim 1, characterized in that: The initial feature representation of S5 is aggregated with the difference between the plurality of mask feature representations, specifically comprising: S51: In the vector space, the initial user feature representation and the movie feature representation are subtracted from the plurality of masked user feature representations and movie feature representations, to obtain a plurality of user feature vectors and movie feature vectors with different specific interests; S52: The plurality of different specific interests are aggregated by using a splicing operation aggregation method to obtain user feature vectors and movie feature vectors with specific interest attributes.
7. The movie recommendation method based on multi-angle mask interest modeling according to claim 6, characterized in that: The leading interest attribute and the specific interest attribute are aggregated by using a splicing operation aggregation method to obtain user feature vectors and movie feature vectors containing multi-angle interests. 8.The movie recommendation method based on multi-angle mask interest modeling of claim 1, wherein, The specific operation of S7 is: S71: Calculate the spatial distance similarity of the user vector and the candidate movie vector by using inner product; S72: Sort the similarity measure values to obtain the Top-K movie recommendation of the user.