Animation recommendation method, device, equipment and storage medium
By constructing an animation knowledge graph and user-project interaction matrix, combining image features, a recommendation model for multi-task feature learning visual embedding and knowledge graph enhancement is established, and the problems of cold start-up and sparse data in animation recommendations are solved, achieving accurate personalized recommendations and improved user experience.
Patent Information
- Application Number
- CN202210655140.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-10
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2042-06-10
AI Technical Summary
In the prior art, the animation recommendation method has problems with cold start of projects and sparse data, which leads to the inability to accurately personalize recommendations for users, and the user experience is poor.
By constructing an animation knowledge graph and user-project interaction matrix, user feature vectors and relational entity feature vectors are extracted, and combined with image feature vectors, a recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement is established to perform animation recommendations.
It effectively alleviates the problems of cold start of the project and sparse data, provides accurate personalized animation recommendations, and improves the user experience.
Smart Images

Figure CN115114522B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of artificial intelligence and natural language processing, and relates to an animation recommendation method, device, equipment and storage medium. Background Art
[0002] With the development of information technology and the Internet, we have gradually entered an era of information overload from an era of information scarcity. Both information consumers and information producers have encountered great challenges: as an information consumer, it is very difficult to find the information of interest from a large amount of information; as an information producer, it is also very difficult to make the information produced stand out and attract the attention of the majority of users. The recommendation system is an important tool to solve this contradiction. The task of the recommendation system is to connect users and information. On the one hand, it helps users find valuable information for themselves, and on the other hand, it allows information to be displayed to users who are interested in it, thereby achieving a win-win situation for information consumers and information producers. While meeting the needs of life, people also pay more attention to the pursuit of spiritual level. Reading, watching movies, and chasing animation have become choices to enrich their spare time. Therefore, as animation appears more and more in the public eye, the research on animation recommendation system has received more and more attention. How to integrate knowledge graphs and image features into the recommendation system to provide users with more accurate recommendations has become the main direction of current research. Currently, there are very few methods for recommending animations. In the existing technology, the method is often based on the user's historical interaction records, calculating the similarity between the user and the item or the recommendation of friends. This recommendation method often has certain project cold start and data sparsity problems, and cannot accurately make personalized recommendations for users, resulting in an extremely unsatisfactory user experience. Summary of the invention
[0003] The purpose of the present invention is to solve the problem that the animation recommendation method in the prior art has certain project cold start and data sparsity defects, cannot accurately make personalized recommendations for users, and makes the user experience extremely unsatisfactory. An animation recommendation method, device, equipment and storage medium are provided to effectively make up for the project cold start and data sparsity defects in the traditional recommendation system, provide our users with accurate personalized recommendations, and enhance the user experience.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] The present invention provides an animation recommendation method, comprising the following steps:
[0006] Obtain data set information and build anime knowledge graph;
[0007] Construct a user-item interaction matrix based on the dataset information and animation knowledge graph;
[0008] According to the animation knowledge graph and the user-item interaction matrix, the user feature vector and the feature vector of the relationship entity in the knowledge graph triple are extracted;
[0009] According to the data set information, obtain the image feature vector;
[0010] According to the animation knowledge graph, user feature vector, feature vector of relational entities in knowledge graph triples, and image feature vector, a recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement is established to perform animation recommendation.
[0011] Preferably, the data set information includes user preference information and animation attributes and attribute values, and the animation attributes and attribute values include animation ID, animation name, animation theme, animation episode number, animation type, number of people joining the animation community, animation image and animation rating.
[0012] Preferably, the method for obtaining data set information and constructing an animation knowledge graph is:
[0013] Obtain data set information, analyze required data information, and define entities, attributes, and attribute values in the data information;
[0014] Use the Anime public dataset and use the web crawler technology in Python to crawl the data information related to anime in the Anime public dataset on the anime website to further enrich the project attributes;
[0015] Organize and clean the crawled data set information to ensure the integrity of the data;
[0016] Merge the sorted and cleaned dataset information with the public dataset Anime;
[0017] Import the entities in the data set information into the neo4j graph database and set the relationships between the entities;
[0018] Export the data according to entity-relationship-entity, store it in the form of documents, and build an animation knowledge graph.
[0019] Preferably, the method for constructing the user-item interaction matrix is:
[0020] According to the data set information, obtain user-item rating data information;
[0021] According to the user-item rating data information, the user is used as the column of the matrix and the animation ID is used as the row of the matrix to construct the rating matrix of animation user-animation ID;
[0022] The animations rated by the user are recorded as 1, and those without rating are recorded as 0, and the interaction matrix of each animation based on each user's rating is obtained.
[0023] Preferably, according to the animation knowledge graph and the user-item interaction matrix, the method for extracting the user feature vector and the feature vector of the relation entity in the knowledge graph triple is:
[0024] According to the animation knowledge graph and the user-item interaction matrix, the SDAE model is established respectively, and the relational entities in the user and knowledge graph triples are embedded by the SDAE model respectively;
[0025] Initialize SDAE network parameters;
[0026] Train the network parameters and obtain the user feature vector and the feature vector of the relation entity in the knowledge graph triple.
[0027] Preferably, according to the data set information, the method for obtaining the image feature vector is:
[0028] According to the dataset information, obtain the anime poster image;
[0029] Perform mean preprocessing on the anime poster image;
[0030] The VGG-16 convolutional neural network is used to extract the preprocessed anime poster image features and obtain the image feature vector.
[0031] Preferably, according to the animation knowledge graph, user feature vector, feature vector of relational entity in knowledge graph triple and image feature vector, a recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement is established, and the method for performing animation recommendation is:
[0032] Establish a recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement;
[0033] Use SDAE to extract user features and item features;
[0034] Concatenate the item features with the corresponding image feature vector;
[0035] The user features and project features are sent together into the MLP in the recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement. Given the user-project interaction matrix and the animation knowledge graph, the MLP model is used to predict the possibility of user participation in the project and make animation recommendations.
[0036] An animation recommendation device, comprising:
[0037] Data acquisition and knowledge graph construction module: used to obtain data set information and build animation knowledge graph;
[0038] User-item interaction matrix construction module: used to construct the user-item interaction matrix based on the dataset information;
[0039] User feature vector and feature vector extraction module for relational entities in knowledge graph triples: used to extract user feature vectors and feature vectors of relational entities in knowledge graph triples based on the animation knowledge graph and user-item interaction matrix;
[0040] Image feature vector acquisition module: used to obtain image feature vectors based on data set information;
[0041] Anime recommendation module: It is used to establish a recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement according to the animation knowledge graph, user feature vector, feature vector of relationship entities in the knowledge graph triple, and image feature vector to make animation recommendations.
[0042] A terminal device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0043] A computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the above method when executed by a processor.
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] The present invention provides a visual embedding and knowledge graph enhanced animation recommendation method, which can effectively alleviate the problems of project cold start and data sparsity existing in traditional recommendation methods by embedding the knowledge graph as auxiliary information into the recommendation model; by applying the acquired data set to the recommendation model recommendation framework based on multi-task feature learning visual embedding and knowledge graph enhancement, taking visual information into consideration, and integrating user-item features with image features, using the characteristics of visual information to give people greater sensory stimulation, better considering the user's personal preferences, and thus realizing personalized animation recommendations for users.
[0046] The present invention proposes to utilize the animation knowledge graph and the user-item interaction matrix to establish a stacked denoising autoencoder (SDAE) model to obtain the user feature vector and the feature vector of the relation entity in the knowledge graph triple, thereby further enhancing the robustness of entity embedding.
[0047] Because posters contain a lot of potential information, by extracting the image features of anime posters, it can further reflect the user's personalized preferences for user recommendations, thereby achieving the purpose of optimizing the anime recommendation system. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0049] Figure 1 This is a flow chart of the animation recommendation method of the present invention.
[0050] Figure 2 This is a structural diagram of the animation recommendation device of the present invention.
[0051] Figure 3 This is a flowchart for obtaining data set information and constructing an animation knowledge graph in an embodiment of the present invention.
[0052] Figure 4 Schematic diagram of the knowledge graph constructed in an embodiment of the present invention.
[0053] Figure 5 Schematic diagram of a convolutional picture of a convolutional neural network VGG-16 in an embodiment of the present invention.
[0054] Figure 6 Schematic diagram of SDAE in an embodiment of the present invention.
[0055] Figure 7 This is a diagram of a recommendation model based on cross compression unit and visual embedding in an embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0057] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0059] In the description of the embodiments of the present invention, it should be noted that if the terms "upper", "lower", "horizontal", "inner", etc. indicate an orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the invention is usually placed when in use, it is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0060] In addition, if the term "horizontal" appears, it does not mean that the component must be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", which does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0061] In the description of the embodiments of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0062] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0063] See also Figure 1 The present invention provides an animation recommendation method, comprising the following steps:
[0064] S1: Obtain data set information and construct an animation knowledge graph: the data set information includes user preference information and animation attributes and attribute values, and the animation attributes and attribute values include animation ID, animation name, animation theme, animation episode number, animation type, number of people joining the animation community, animation images and animation ratings.
[0065] See also Figure 3 ,First, obtain the data set information, analyze the required data ,information, and define the entities, attributes and attribute values in the data ,information;
[0066] Use the Anime public dataset and use the web crawler technology in Python to crawl the data information related to anime in the Anime public dataset on anime websites, and further enrich the project attributes: Use the Anime public dataset and use the web crawler technology in Python to crawl the data information related to anime in the Anime public dataset on anime websites such as MyAnimeList, and further enrich the project attributes and save them in csv files;
[0067] Organize and clean the crawled data set information to ensure data integrity: Organize and clean the crawled data set information to ensure data integrity; clean and integrate the information in the integrated csv file, delete the errors or mismatched information that appear in the crawling process, crawl and fill the empty values for a second time, integrate the information stored in different files according to attributes and attribute values, and supplement the missing attributes or attribute values of some entities in the file.
[0068] Merge the sorted and cleaned dataset information with the public dataset Anime: Merge the sorted and cleaned dataset information with the public dataset Anime; analyze data requirements, entities, attributes, and attribute values required in the recommendation process, such as the animation ID, name, subject matter, number of episodes, type, number of people joining the animation community, pictures, ratings, etc.
[0069] Import the entities in the data set information into the neo4j graph database and set the relationships between the entities: Import the entities in the data set information into the neo4j graph database, and import the sorted data information into the neo4j database according to entities, relationships, and attributes.
[0070] See also Figure 4 , export the data according to entity-relationship-entity, store it in the form of documents, and build an animation knowledge graph: set the relationship attributes and attribute values between entities, and build a triple animation knowledge graph of "entity-attribute-entity" structured knowledge, that is, establish the relationship between entities according to the actual connection between entities, and build an animation knowledge graph.
[0071] S2: Based on the dataset information and animation knowledge graph, construct a user-item interaction matrix:
[0072] According to the data set information, obtain user-item rating data information;
[0073] According to the user-item rating data information, the user is used as the column of the matrix and the animation ID is used as the row of the matrix to construct the rating matrix of animation user-animation ID;
[0074] The animations that users give ratings to are recorded as 1, and those that do not give ratings are recorded as 0, and the interaction matrix of each animation based on each user's rating is obtained. The interaction matrix is constructed as shown in the table below. m Represents the names of various animations, u1-u n On behalf of individual users:
[0075] <![CDATA[i1]]> <![CDATA[i2]]> <![CDATA[i3]]> ... <![CDATA[i m ]]> <![CDATA[u1]]> 1 0 1 ... 1 <![CDATA[u2]]> 1 0 0 ... 1 <![CDATA[u3]]> 0 1 1 ... 0 ... ... ... ... ... ... <![CDATA[u n ]]> 0 1 1 ... 1
[0076] S3: Extract the user feature vector and the feature vector of the relationship entity in the knowledge graph triple according to the animation knowledge graph and the user-item interaction matrix:
[0077] According to the animation knowledge graph and the user-item interaction matrix, the SDAE model is established respectively. The SDAE model is used to embed the users in the user-item interaction matrix and the relational entities in the knowledge graph triples respectively. Figure 6 The basic principle of SDAE is: let the input data be x, add some noise to the input data x to get x1, and the noise adding process q D The method of adding noise is to discard several neurons, that is, the neurons are randomly set to 0, and then f θ Matrix transformation, get y, and then perform g on y θ Matrix transformation, get Z, the loss function L is the distance between the original signal X and Z. The triple data in the knowledge graph, the relationship entity data and the user data in the user-item interaction matrix are fed into the SDAE model
[0078] Initialize the SDAE network parameters; during pre-training, only one layer is trained at a time, and each layer is trained as a denoising autoencoder (DAE). After training one layer, the next layer is trained. Then, the weight W is calculated by minimizing the error L(X, Z) between the input and output. The matrix X0 represents the noise interference matrix (that is, the neurons are randomly set to 0). W l and b l are the weight parameters and bias parameters of the Lth layer respectively.
[0079] Train network parameters, obtain user feature vectors and feature vectors of relational entities in knowledge graph triples: The number of training cycles in this embodiment depends on the number of layers of the network. A 2-layer network can be used. Each time the cycle is entered, the number of cycles can be set by yourself. Numpochs represents the number of times each layer of the network needs to be trained. Batch_x randomly takes 100 rows from the training set. The reason for doing this is that it can greatly reduce the number of parameters of the weight W, reduce memory consumption, and speed up execution time compared to inputting all rows of data at once. Add noise to batch_x. Here, the noise method added to batch_x is to randomly set some elements to 0, and the rest remain unchanged; batch_y is batch_x without noise. After the training is completed, a new weight W is obtained, and then the new weight W is used to train the next batchsize of data until all data is trained and the final weight W is obtained.
[0080] In the first layer of the network, a bias column of all 1s is added to batch_x, its value is multiplied by the weight W1, and then the sigmoid activation function is applied. Then a bias column of all 1s is added, and then the weight W2 is multiplied. Then the sigmoid function is applied, and a bias column of all 1s is added to output Z. Each layer of the network is trained three times. The error is the difference between the original unnoised input batch_y and the trained output Z. The error function is shown in formula (1):
[0081] L(batch_y,Z)=0.5*∑(batch_y-Z) 2 (1)
[0082] The stochastic gradient descent method is used to obtain the optimal solution of the objective function. For the second layer network, the weight W trained by the first layer network is multiplied by train_x to obtain the original input of the second layer network, which is consistent with the training steps of the first layer network, and the final output is Z, and the error function is the same as above.
[0083] Fine-tuning the network;
[0084] After training and fine-tuning the network, the network has been trained. The training data is input into the network, and the final output Z is the feature vector.
[0085] S4: Get image feature vectors based on the dataset information: Get anime poster images based on the dataset information, and perform mean preprocessing on the anime poster images; VGG input is a 224×224×3 image, with a color image width and height of 224, 3 for the number of color image channels, and 1 for black and white images. This article uses the python programming language to crawl 12,294 anime color posters from the MyAnimeList website as input. Perform mean preprocessing on the image, subtracting the RGB mean calculated on the training set from each pixel;
[0086] See also Figure 5 , use the VGG-16 convolutional neural network to extract the features of the preprocessed anime poster image and obtain the image feature vector: the VGG-16 network structure is divided into two parts. The first part is the convolution pooling operation with a total of 31 layers. The network uses continuous small convolution kernels (3×3) for continuous convolution. The fixed step size of the convolution is 1, and 1 pixel is filled at the edge of the image to keep the resolution of the image unchanged after convolution; one convolution layer is followed by a RELU activation function, followed by a second convolution layer and a RELU function, followed by a maximum pooling layer. Continuous convolution layers will be followed by a pooling layer to reduce the resolution of the image. The maximum pooling is performed on a 2×2 pixel window with a step size of 2; this basic structure is built up to 31 layers;
[0087] The second part is the fully connected layer, which mainly consists of 7 layers, namely the front connection layer followed by the RELU activation function and then the Dropout to prevent overfitting. This structure is repeated three times, and finally the feature vector of the image is obtained with a dimension of 514×14×14.
[0088] S5: Based on the animation knowledge graph, user feature vector, feature vector of relational entities in the knowledge graph triples, and image feature vector, a recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement is established to perform animation recommendations:
[0089] See also Figure 7 , establish a recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement; the recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement consists of three main parts: recommendation module, KGE module, and cross compression unit.
[0090] Extracting user features and item features using SDAE: The KGE module takes a head entity h and a relationship entity r as input, uses the cross compression unit and the SDAE shown in the previous step to extract the features of the head entity h and the relationship entity r respectively, and uses the head entity h L and relation entity r L Calculate the predicted tail entity Then use the function f to calculate the predicted tail entity The similarity with the actual tail entity t is used as the ability score of KGE link prediction. Specifically:
[0091] For a given knowledge triple (h, r, t), cross compression unit and stacked denoising encoder (SDAE) are used to extract features from the original head entity h and relation entity r, respectively.
[0092] The head entity h L and relation entity r LThe corresponding vectors are concatenated and passed through a multi-layer neural network to obtain a predicted tail entity corresponding to the tail entity t. The formulas are shown in (2) and (3):
[0093]
[0094]
[0095] Among them, S(h) is the collection of related items with entity h; r L is the relation entity embedding vector obtained after stacking denoising encoders; is a multi-layer perceptron; L, K are the number of network layers, [e] is used to distinguish the head entity vector; V is the item vector; C is the cross compression unit.
[0096] The knowledge graph embedding module hopes to predict the tail entity vector is close to the true tail entity vector t, and the score of the final triple (h, r, t) is calculated by the similarity function f kG Calculated, f kG The function can be t and After the inner product of , the sigmoid formula is taken as shown in (4) and (5):
[0097]
[0098]
[0099] Among them, σ is the activation function; score is the score function
[0100] The cross-feature sharing unit is a module that allows two tasks to exchange information. Since the item vector and entity vector are actually two descriptions of the same object, the cross-feature sharing between them allows both to obtain additional information from each other, thereby making up for the lack of their own information sparsity. The specific implementation steps are:
[0101] Cross operation: construct v l ∈R d and e l ∈R d The d*d interaction matrix formula (6) is as follows:
[0102]
[0103] Among them, v l is the vector of item, e l is the vector of the head entity.
[0104] compress operation:wl ∈R d and b l ∈R d is the training weight and bias vector. The weight vector converts the cross feature matrix from R d*d Compressed to R d , v l+1 With e l+1 It is expressed as shown in formulas (7) and (8):
[0105] v l+1 =C l w l VV +C l T w l EV +b l V =v l e l T w l VV +e l v l T w l EV +b l V (7)
[0106] e l+1 =C l w l VE +C l T w l EE +b l E =v l e l T w l VE +e l v l T w l EE +b l (8)
[0107] The cross compression unit is expressed as formula (9):
[0108] [v l+1 ,e l+1 ]=C(v l ,e l ) (9)
[0109] Among them, l is the number of network layers, w lis the training weight vector, b l is the deviation vector
[0110] Concatenate the item features with the corresponding image feature vector: The recommendation module is a click-through rate prediction model. The specific implementation steps are as follows:
[0111] Given the original feature vector u of user u, the stacked denoising encoder (SDAE) of the above steps is used to extract the user's latent feature u L .
[0112] For item v, L cross compression units are used to extract its features (where S(v) is the entity related to item v, and [v] is used to represent the item vector, see formula (10):
[0113]
[0114] After obtaining the project features extracted by the cross compression unit, the poster features v extracted by the VGG-16 convolutional neural network are p Splice it to form a new v e .
[0115] Get u L Eigenvector and fused v e After the feature vector is obtained, the prediction function f RS (f RS By connecting them together (either taking the inner product or H-layer MLP), the possibility of user u participating in item v can be calculated as shown in formula (11):
[0116]
[0117] Feed the user features and project features into the MLP in the MKR model together. Given the user-project interaction matrix Y and the anime knowledge graph, use the MLP model to predict the possibility of user participation in the project and make anime recommendations: Feed the user features and project features into the MLP in the MKR model together. Given the user-project interaction matrix Y and the anime knowledge graph, use the MLP model to predict the possibility of user participation in the project and make anime recommendations.
[0118] See also Figure 2 The present invention provides a cartoon recommendation device, comprising:
[0119] Data acquisition and knowledge graph construction module: used to obtain data set information and build animation knowledge graph;
[0120] User-item interaction matrix construction module: used to construct the user-item interaction matrix based on the dataset information;
[0121] User feature vector and feature vector extraction module for relational entities in knowledge graph triples: used to extract user feature vectors and feature vectors of relational entities in knowledge graph triples based on the animation knowledge graph and user-item interaction matrix;
[0122] Image feature vector acquisition module: used to obtain image feature vectors based on data set information;
[0123] Anime recommendation module: It is used to establish a recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement according to the animation knowledge graph, user feature vector, feature vector of relationship entities in the knowledge graph triple, and image feature vector to make animation recommendations.
[0124] In summary, MKR is a general, end-to-end deep recommendation framework that aims to use knowledge graph embedding (KGE) to assist recommendation tasks. The two tasks are independent of each other, but are highly related because the items in the recommendation module and the entities in the knowledge graph are interconnected. The entire framework can be trained by alternately optimizing the two tasks, giving MKR a high degree of flexibility and adaptability in real recommendation scenarios. The present invention applies the animation dataset to the MKR recommendation framework for the first time, and establishes a recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement to take visual information into consideration. Through convolutional neural network embedding, the dimension of project embedding is expanded. Since posters contain a lot of potential information, for user recommendations, it can further reflect the user's personalized preferences, thereby achieving the purpose of optimizing the animation recommendation system. In terms of embedding, the present invention proposes for the first time to embed user embedding and relationship entity embedding using stacked denoising encoder (SDAE). The purpose is that there will be noise and error data in the data. When SDAE is used for embedding, noise processing will be performed first, and then the purified data will be output through the neural network, which further enhances the robustness of entity embedding.
[0125] The present invention provides a terminal device including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0126] The computer program may be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to accomplish the present invention.
[0127] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0128] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0129] The memory may be used to store the computer programs and / or modules, and the processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory.
[0130] If the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0131] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for recommending animation, characterized in that: The following steps are involved: Obtain data set information and build anime knowledge graph; According to the data set information and the animation knowledge graph, a user-item interaction matrix is constructed, which is as follows: According to the data set information, obtain user-item rating data information; According to the user-item rating data information, the user is used as the column of the matrix and the animation ID is used as the row of the matrix to construct the rating matrix of animation user-animation ID; The animations rated by the user are recorded as 1, and those without rating are recorded as 0, and the interaction matrix of each animation based on each user's rating is obtained; According to the animation knowledge graph and the user-item interaction matrix, the user feature vector and the feature vector of the relationship entity in the knowledge graph triple are extracted, specifically: According to the animation knowledge graph and the user-item interaction matrix, the SDAE model is established respectively, and the relational entities in the user and knowledge graph triples are embedded by the SDAE model respectively; Initialize SDAE network parameters; Train network parameters to obtain user feature vectors and feature vectors of relationship entities in knowledge graph triples; According to the data set information, obtain the image feature vector; According to the animation knowledge graph, user feature vector, feature vector of relational entities in the knowledge graph triples, and image feature vector, a recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement is established to perform animation recommendation. Specifically: Establish a recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement; Use SDAE to extract user features and item features; Concatenate the item features with the corresponding image feature vector; The user features and project features are sent together into the MLP in the recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement. Given the user-project interaction matrix and the animation knowledge graph, the MLP model is used to predict the possibility of user participation in the project and make animation recommendations.
2. The animation recommendation method according to claim 1, characterized in that: The data set information includes user preference information and animation attributes and attribute values, and the animation attributes and attribute values include animation ID, animation name, animation theme, animation episode number, animation type, number of people joining the animation community, animation image and animation rating.
3. The animation recommendation method according to claim 1, characterized in that: The method to obtain data set information and build an animation knowledge graph is: Obtain data set information, analyze required data information, and define entities, attributes, and attribute values in the data information; Use the Anime public dataset and use the web crawler technology in Python to crawl the data information related to anime in the Anime public dataset on the anime website to further enrich the project attributes; Organize and clean the crawled data set information to ensure the integrity of the data; Merge the sorted and cleaned dataset information with the public dataset Anime; Import the entities in the data set information into the neo4j graph database and set the relationships between the entities; Export the data according to entity-relationship-entity, store it in the form of documents, and build an animation knowledge graph.
4. The animation recommendation method according to claim 1, characterized in that: According to the data set information, the method to obtain the image feature vector is: According to the dataset information, obtain the anime poster image; Perform mean preprocessing on the anime poster image; The VGG-16 convolutional neural network is used to extract the preprocessed anime poster image features and obtain the image feature vector.
5. An animation recommendation device, characterized in that: include: Data acquisition and knowledge graph construction module: used to obtain data set information and build animation knowledge graph; User-item interaction matrix construction module: used to construct the user-item interaction matrix based on the data set information, specifically: According to the data set information, obtain user-item rating data information; According to the user-item rating data information, the user is used as the column of the matrix and the animation ID is used as the row of the matrix to construct the rating matrix of animation user-animation ID; The animations rated by the user are recorded as 1, and those without rating are recorded as 0, and the interaction matrix of each animation based on each user's rating is obtained; The module for extracting the feature vectors of user feature vectors and relational entities in knowledge graph triples is used to extract the feature vectors of user feature vectors and relational entities in knowledge graph triples based on the animation knowledge graph and the user-item interaction matrix. Specifically: According to the data set information, obtain user-item rating data information; According to the user-item rating data information, the user is used as the column of the matrix and the animation ID is used as the row of the matrix to construct the rating matrix of animation user-animation ID; The animations rated by the user are recorded as 1, and those without rating are recorded as 0, and the interaction matrix of each animation based on each user's rating is obtained; Image feature vector acquisition module: used to obtain image feature vectors based on data set information; Anime recommendation module: It is used to establish a recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement according to the anime knowledge graph, user feature vector, feature vector of relationship entities in the knowledge graph triple, and image feature vector, and make anime recommendations. Specifically: Establish a recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement; Use SDAE to extract user features and item features; Concatenate the item features with the corresponding image feature vector; The user features and project features are sent together into the MLP in the recommendation model based on multi-task feature learning visual embedding and knowledge graph enhancement. Given the user-project interaction matrix and the animation knowledge graph, the MLP model is used to predict the possibility of user participation in the project and make animation recommendations.
6. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Scenic spot recommendation method and device based on tourism knowledge graph
CN112667877A
Improved Ripp-MKR recommendation method combining multi-task learning and knowledge graph
CN112800326A