A book recommendation method and system based on knowledge graph and multi-objective optimization
User and project features are extracted through a multi-task learning framework and a ripple propagation network, and combined with a multi-object optimization algorithm to optimize the recommendation list, the problems of modeling imbalance and advanced semantic attenuation in traditional book recommendations are solved, and better personalized recommendations are achieved.
Patent Information
- Application Number
- CN202510078899.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-01-17
AI Technical Summary
The existing knowledge graph-based book recommendation method has uneven modeling on the user side and project side, high-order semantic propagation attenuation, and only the recommendation accuracy is the only standard, which cannot meet the diverse needs of users.
The multi-task learning framework and ripple propagation network are used to extract user and project features, combine the gated loop unit (GRU) of the attention mechanism to generate user representation, and optimize the Top-K candidate recommendation list through a multi-objective optimization algorithm, taking into account accuracy, diversity and novelty.
It improves the accuracy, diversity and novelty of the recommendation results, meets users' personalized needs, effectively alleviates information overload problems, adapts to market demands and expands application scenarios.
Smart Images

Figure CN119903238B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of book recommendation, and in particular relates to a book recommendation method and system based on knowledge graph and multi-objective optimization. Background Art
[0002] Books are a precious treasure of human wisdom and culture, carrying the accumulation of diverse knowledge, ideas, and history. Reading books allows us to acquire specialized knowledge, broaden our horizons, deepen our thinking, and cultivate critical thinking and innovative abilities. Books not only record the progress of human civilization and the spiritual world, but also serve as an important bridge for dialogue across time and space and across cultures. They inspire our creativity, enrich our emotional lives, and provide a constant source of inspiration for personal growth and social progress. The power of books is immense, playing an irreplaceable role in education, science, technology, the arts, and other fields. With the continuous development of internet technology and the popularization of electronic products, people are gradually shifting their focus from traditional paper-based books to electronic resources. The "2022 China Digital Reading Report" shows that the number of digital readers in my country reached 530 million in 2022, a year-on-year increase of 4.75%. The number of digital readers in China continued to expand between 2017 and 2022, demonstrating the enormous potential for the digital reading market.
[0003] In the internet age, the rapid growth and massive accumulation of data and information in the digital reading field has led to a serious problem of information overload. In this context, helping users find the most appropriate books among the vast library has become a crucial issue. Recommendation algorithms are one of the most effective ways to address information overload. Recommendation systems analyze users' historical behavior, identify their interests, and recommend products of interest. They are now widely used in scenarios such as online shopping, movies, and music. Traditional recommendation systems suffer from issues such as cold start, sparsity, insufficient recommendation accuracy, and interpretability, making them unable to meet the diverse needs of users. Introducing knowledge graphs as auxiliary information into recommendation algorithms has become an increasingly popular research topic in the recommendation field. This approach alleviates the cold start and sparse matrix issues inherent in traditional recommendation algorithms, thereby improving the overall effectiveness of recommendation systems.
[0004] Knowledge graph-based recommendations are mainly divided into three categories: recommendation methods based on knowledge graph embedding, recommendation methods based on knowledge graph paths, and joint recommendation methods.
[0005] Through the above analysis, the problems and defects of the existing technology are as follows:
[0006] (1) Recommendation method based on knowledge graph embedding: By embedding entities and relationships in the knowledge graph into a low-dimensional vector space, its potential semantic information is captured for recommendation. It has the advantages of high computational efficiency and the ability to capture complex relationships, but it lacks solvability and relies heavily on high-quality embedding.
[0007] (2) Recommendation method based on knowledge graph path: recommending items by analyzing the connection path between users and items. The advantage is that the recommendation results are highly interpretable, but the disadvantage is that the path calculation is complex and has high requirements on the integrity of the knowledge graph.
[0008] (3) Joint-based recommendation method: Recommendations are made by combining path information and embedded representations. The principle is to use the interpretability of the path and the low-dimensional representation of the embedding to complement each other. The advantage is that it takes into account both recommendation effect and interpretability. The disadvantage is that in the process of information dissemination, it focuses on optimizing and updating the representation of the user side or the project side, and the degree of modeling of the user side and the project side is uneven. Summary of the Invention
[0009] In response to the problems existing in the prior art, the present invention provides a book recommendation method based on knowledge graph and multi-objective optimization.
[0010] The present invention is implemented as follows: a book recommendation method based on knowledge graph and multi-objective optimization includes:
[0011] Step 1, initialization parameters;
[0012] Step 2: knowledge graph embedding task;
[0013] Step 3, recommend tasks;
[0014] Step 4, joint optimization;
[0015] Step 5: Multi-objective optimization.
[0016] Furthermore, the initialization parameters:
[0017] Initialize model parameters, including user embedding vectors, item embedding vectors, entity embeddings in the knowledge graph, and relationship embeddings; these parameters can be randomly initialized or obtained through pre-training.
[0018] Furthermore, the knowledge graph embedding task:
[0019] For a given knowledge triple (h, r, t), the head entity and the corresponding relation are taken as input, and the original feature vectors of the head entity h and the relation r are processed separately using multiple cross-compression units and nonlinear layers; their latent features are then concatenated together, and then an L-layer MLP is used to predict the tail t:
[0020] h L =Ev~S(h) [C L (v,h)[e]]
[0021] Among them C L is a cross-compression unit that outputs the latent features of the L-layer header entity h, and S(h) is the relevant item of entity h;
[0022] r L =M L (r)
[0023]
[0024] The original vectors of h and r can be feature vectors, including ID, type, or text description; then their potential features are connected to predict the tail entity; finally, the score of the triple (h, r, t) is calculated by the similarity function, as follows:
[0025]
[0026] In the above formula, f KG The function is defined in the form of inner product and the output is normalized by the nonlinear activation function sigmoid;
[0027]
[0028] The purpose of the cross-compression unit is to achieve information sharing between the recommendation module and the knowledge graph embedding module;
[0029] For item v and its corresponding entity e in the knowledge graph, construct the cross feature C between them l ∈R d×d , where d is the dimension of the hidden layer;
[0030]
[0031] The output of the cross-compression unit for item v and entity e is:
[0032]
[0033] in, is the cross compression unit weight, is the bias parameter. Through the cross-compression unit, the model can adaptively adjust the weight of knowledge transfer and learn the correlation between the two tasks. For simplicity, the cross-compression unit is expressed as:
[0034] [v l+1 , e l+1 ]=C(v l ,e l ).
[0035] Furthermore, the recommended tasks:
[0036] In the recommendation module, the ripple propagation network is used to replace the original user vector representation method, and the final user representation U and item representation V are used as the input of the module;
[0037] Given the interaction matrix Y and the knowledge graph G, the h-layer neighbor nodes of user u are defined as As follows:
[0038]
[0039] Where: h = 1, 2..., H is the number of propagation layers; A collection of historical items for user u;
[0040] Then As the seed set of the knowledge graph, the hierarchical interest set of user u is constructed along the connection path in the knowledge graph through a ripple-like propagation method. The interest set is defined as:
[0041]
[0042] The item vector h and the candidate entity vector v are concatenated and normalized by the Softmax function to obtain the weight p. The user's historical items are dynamically fused with the weight p to obtain the user's interest representation, which is defined as:
[0043]
[0044] After the above calculations, we get a multi-layer user interest representation set:
[0045]
[0046] Use reset gate r t Control the speed of forgetting information; use update gate z t The hidden state information of the previous moment is forgotten and selectively retained; the candidate hidden state is calculated based on the activation result of the update gate On this basis, the hidden state h at the current moment t is calculated t , the calculation process is as follows:
[0047] r t =σ(W r x t +U r h t-1 )
[0048] z t =σ(W z x t +U z h t-1 )
[0049]
[0050] Where σ represents the Sigmoid activation function; W r and U r Represents the weight parameter of the reset gate; W z and U z Represents the weight parameter of the update gate; the symbol * represents the Hadamard product;
[0051] The entity responses of user u at different link lengths in the knowledge graph are input into the GRU in the order from the inner layer to the outer layer. In order to extract the key features of the preference diffusion set, the attention mechanism is used to assign weights to the feature vectors extracted by the GRU, and then the final vector representation u of the user is generated, as shown below:
[0052]
[0053] Where n represents the maximum link length of the preference diffusion set diffusion; is the hidden state vector representation of user u’s entity response o to the preference diffusion set in the GRU unit; θ jn is the weight corresponding to the current j-th hidden state vector, indicating the relative importance of the hidden state vector;
[0054] Finally, the user's final vector representation and the candidate item vector representation are combined to calculate the predicted user click probability, as shown below:
[0055]
[0056] Furthermore, the joint optimization:
[0057] In order to optimize the model performance, the present invention adopts the following loss function:
[0058]
[0059] Where: the first term F is the cross entropy loss; the second term is the knowledge graph embedding unit loss, λ1 is the loss value parameter; the third term is the L2 regularization loss, and λ2 is the regularization parameter.
[0060] Furthermore, the multi-objective optimization:
[0061] The Top-K candidate recommendation list is used as the initial population of the multi-objective optimization algorithm, and the Sobol sequence is used to initialize the population; secondly, the fuzzy dominance relationship is used: assuming x i and x j Represent any two individuals in the population, then use Bt (x i , x j ) represents x i x j The number of targets with good performance, W s (x i , x j ) represents x i x j The number of targets with poor performance is calculated, so the fuzzy dominance membership c is as follows, which uses the proportion of the number of better targets to express the degree of dominance between individuals, called fuzzy dominance membership c:
[0062]
[0063] When the fuzzy dominance membership degree c is greater than the set threshold, that is, the proportion of the number of better targets is within an acceptable range, the dominance relationship is established; otherwise, the dominance relationship is not established;
[0064] In addition, in order to avoid cyclic domination of individuals in the population, each individual in the population is given an energy parameter Q(x i ), as the overall standard for measuring the size of the individual objective function value, its calculation method is shown in the following formula:
[0065]
[0066] f j (x i ) is individual x i The jth (j∈[1,m]) objective function value; z j is the minimum value of the jth (j∈[1,m]) objective function; when the true minimum value of the objective function is difficult to obtain, z j The value of takes the minimum value of the jth objective function corresponding to the current population;
[0067] Then the discoverer in the sparrow population is introduced into the t-distribution disturbance, and the improved discoverer position update formula is:
[0068]
[0069] in, Indicates the information position of the jth dimension when the i-th sparrow iterates to the t-th time; random number α∈(0,1]; iter maxdenotes the maximum number of iterations; R2 ∈ [0, 1], representing the warning value; ST ∈ [0.5, 1], representing the safety value; Q is a random number following a normal distribution; L is a 1×d matrix where each element is 1. When R2 < ST, that is, there is no danger around, the population continues to forage. When R2 ≥ ST, it indicates that there is danger in this area, and the discoverer needs to issue an alarm and lead other individuals in the population to move to the safe area; t(iter) is a t-distribution whose degrees of freedom increase with the increase of the iteration number. In the initial stage of algorithm iteration, the t-distribution is similar to the Cauchy distribution, which enables the algorithm to have strong global search ability. In the later stage of algorithm iteration, the t-distribution is similar to the Gaussian distribution, which helps the algorithm to have good local search ability, so as to enable the algorithm to maintain the diversity of the population in both local and global aspects;
[0070] Finally, calculate the crowding degree, update the sparrow population and the external archive set, and output the final recommended list.
[0071] Another object of the present invention is to provide a book recommendation system based on knowledge graph and multi-objective optimization, including:
[0072] An initialization module for initializing parameters;
[0073] An embedding module for knowledge graph embedding tasks;
[0074] A recommendation module for recommendation tasks;
[0075] A joint optimization module for joint optimization;
[0076] A multi-objective optimization module for multi-objective optimization.
[0077] Another object of the present invention is to provide a computer device, which includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor executes the steps of the book recommendation method based on knowledge graph and multi-objective optimization.
[0078] Another object of the present invention is to provide a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the steps of the book recommendation method based on knowledge graph and multi-objective optimization.
[0079] Another object of the present invention is to provide an information data processing terminal for implementing the book recommendation system based on knowledge graph and multi-objective optimization.
[0080] Combined with the above technical solutions and the solved technical problems, the advantages and positive effects of the technical solution to be protected by the present invention are:
[0081] First, the present invention is a book recommendation method based on knowledge graph and multi-objective optimization. This method fully utilizes the advantages of the multi-task learning framework and the ripple propagation network to simultaneously extract features from both users and items. First, for the extraction of user features, the ripple propagation network is used to obtain the user's representation, and the user features at different levels are combined with the gated recurrent unit (GRU) combined with the attention mechanism to explore the user's potential dynamic interest preferences and generate the user's final representation. Secondly, for the extraction of item features, the cross-compression unit is used to achieve information sharing between item information and head entities, and learn richer item entity representations. The obtained user vector and entity vector are input into the prediction layer to predict the probability of user interaction with the entity item. Finally, the Top-K candidate recommendation list results are used as the initialization population of the multi-objective optimization algorithm, and the candidate recommendation list is optimized using the multi-objective optimization algorithm. The recommendation effect is comprehensively evaluated from the three aspects of recommendation accuracy, diversity and novelty, and then a better recommendation list is generated to improve user satisfaction with the recommendation results.
[0082] The purpose of the present invention is to further optimize the results of the improved knowledge graph-based recommendation algorithm using a multi-objective optimization algorithm to obtain the final recommendation results, so as to effectively solve the problems existing in book recommendations. The ripple propagation network is a recommendation system model based on the knowledge graph, which improves the accuracy and diversity of recommendations by simulating the "ripple effect" of user interests in the knowledge graph. It uses the structured information of the knowledge graph to explore and predict the user's potential interests through an iterative propagation mechanism to achieve personalized recommendations. The present invention addresses the problems of uneven modeling of the user side and the project side in the traditional knowledge graph-based recommendation algorithm and the attenuation of high-order semantic propagation of entities. At the same time, the practice of using only the accuracy of the recommendation results as the only criterion for recommendation can no longer meet the needs of users. The invention uses a multi-task learning framework and a ripple propagation network to perform feature extraction on both the user side and the project side. First, for user feature extraction, the ripple propagation network is used to obtain the user's representation. When the ripple network propagation is attenuated at high-order semantic propagation, the user features at different levels are solved by using a gated recurrent unit combined with an attention mechanism to mine the user's potential dynamic interest preferences, thereby generating the user's final representation. For the extraction of item features, a cross-compression unit is used to achieve information sharing between item information and head entities, and learn richer item entity representations; finally, the Top-K candidate recommendation list results are used as the initialization population of the multi-objective optimization algorithm to further optimize the recommendation results and output the final recommendation list. Experiments have shown that the method proposed in the present invention solves the above-mentioned problems very well, and at the same time comprehensively evaluates the recommendation effect from three aspects: accuracy, diversity, and novelty of the recommendation, thereby generating a better recommendation list and improving user satisfaction with the recommendation results.
[0083] Inspired by ripple networks and multi-objective optimization algorithms, this paper proposes a book recommendation algorithm based on knowledge graphs and multi-objective optimization to solve the book recommendation problem. Through multi-task learning and the ripple propagation network, user and item representations can be learned simultaneously. A gated recurrent unit (GRU) combined with an attention mechanism is then used to address the attenuation of high-order semantic propagation in the ripple propagation network. Finally, a multi-objective optimization algorithm is used to further optimize the Top-K candidate recommendation list to obtain the final recommendation list. This paper has the following advantages:
[0084] (1) The present invention utilizes a multi-task learning framework and a ripple propagation network to simultaneously learn user and item representations.
[0085] (2) To more accurately capture a user's interest in an item and their potential preferences, the present invention introduces a ripple propagation network to extract key information from the user's browsing history, explore the user's potential interests and preferences, and obtain a representation of the user entity. A gated recurrent unit (GRU) combined with an attention mechanism is then used to address the attenuation of high-order semantic propagation, and then generate the final representation of the user.
[0086] (3) This invention aims to solve the problem that most current book recommendation methods only care about the accuracy of the recommendation results. However, considering only the accuracy can no longer meet the personalized needs of learners, and it is not advisable to use only one indicator to measure the pros and cons of the recommendation algorithm. Therefore, a multi-objective optimization algorithm is introduced to further optimize the recommendation list to obtain the final recommendation list.
[0087] Second, as auxiliary evidence of the invention's inventiveness, it is also reflected in the following important aspects:
[0088] (1) The expected benefits and commercial value of the technical solution of the present invention after transformation are:
[0089] Improve user satisfaction: By introducing a multi-task learning framework, ripple propagation network, and multi-objective optimization algorithm, the accuracy, diversity, and novelty of recommendation results have been significantly improved, which can better meet user needs.
[0090] Optimize recommendation performance: Use multi-objective optimization algorithms to further optimize recommendation results, comprehensively evaluate recommendation effects from multiple dimensions (accuracy, diversity, novelty), and provide users with better recommendation services.
[0091] Solve the problem of information overload: effectively alleviate the information overload problem caused by the growth of digital reading resources and help users quickly find books of interest.
[0092] The commercial value of the technical solution of the present invention after transformation is reflected in the following aspects:
[0093] Adapting to market demand: As the scale of digital reading users continues to grow (for example, the scale of digital reading users in China will reach 530 million in 2022), this technology can provide a competitive advantage for e-book platforms and digital reading companies.
[0094] Improve platform stickiness: By optimizing recommendation effects, attract more users, increase user retention rate and platform usage time.
[0095] Expanding application scenarios: The technology can not only be applied to book recommendations, but can also be extended to other recommendation scenarios such as movies, music, and e-commerce, and has broad commercial prospects.
[0096] (2) The technical solution of the present invention fills the technical gap in the industry at home and abroad:
[0097] The present invention introduces the Ripple Network and a multi-objective optimization algorithm to simultaneously model both the user side and the project side, thus solving the problem of insufficient user-side modeling in traditional recommendation algorithms.
[0098] To address the attenuation problem of traditional knowledge graph-based recommendation algorithms in high-order semantic propagation, this paper proposes a gated recurrent unit (GRU) combined with an attention mechanism, which greatly improves the accuracy of user interest feature extraction.
[0099] The present invention takes the accuracy, diversity and novelty of recommendations as comprehensive optimization goals, and achieves a comprehensive improvement in the recommendation effect through a multi-objective optimization algorithm.
[0100] (3) The technical solution of the present invention solves the technical problems that people have been eager to solve but have never been able to solve successfully:
[0101] High-level semantic propagation attenuation: During the knowledge graph embedding and propagation process, the high-level semantic information of user interests gradually decays. This paper uses GRU combined with the attention mechanism to alleviate this problem.
[0102] The problem of uniform recommendation results: Traditional algorithms only focus on recommendation accuracy, ignoring the optimization of diversity and novelty. This invention alleviates this problem through a multi-objective optimization algorithm.
[0103] Uneven user and item modeling: Traditional recommendation algorithms primarily model items, neglecting information sharing and feature extraction on the user side. This paper optimizes both user and item modeling through a ripple propagation network.
[0104] (4) The technical solution of the present invention overcomes technical prejudice:
[0105] Emphasis on a single goal: Traditional recommendation systems only optimize accuracy. This invention breaks the single-goal bias through a multi-objective optimization algorithm, taking into account accuracy, diversity, and novelty.
[0106] Over-reliance on item-side features: Traditional algorithms tend to optimize item-side modeling while ignoring user-side dynamic features. This paper overcomes this bias by using a ripple propagation network and an attention mechanism.
[0107] Ignoring the interpretability of recommendation results: Traditional algorithms focus on performance improvement but lack interpretability. This invention combines knowledge graph paths and embedded information to make recommendation results more interpretable. BRIEF DESCRIPTION OF THE DRAWINGS
[0108] Figure 1 This is a flow chart of a book recommendation method based on knowledge graph and multi-objective optimization provided by an embodiment of the present invention.
[0109] Figure 2 This is a structural block diagram of a book recommendation system based on knowledge graph and multi-objective optimization provided by an embodiment of the present invention.
[0110] Figure 3 2 is a diagram of a cross-compression unit provided by an embodiment of the present invention.
[0111] Figure 4 This is a gated recurrent unit diagram provided by an embodiment of the present invention.
[0112] Figure 5 This is a flow chart of a book recommendation algorithm based on knowledge graph and multi-objective optimization provided by an embodiment of the present invention.
[0113] Figure 6 This is a diagram of the Top-k experimental results provided by an embodiment of the present invention.
[0114] Figure 7 It is a histogram of the accuracy index of the multi-objective optimization provided by the embodiment of the present invention.
[0115] Figure 8 It is a histogram of diversity indicators of multi-objective optimization provided by an embodiment of the present invention.
[0116] Figure 9 It is a histogram of novelty indicators of multi-objective optimization provided by an embodiment of the present invention.
[0117] Figure 10 This is a diagram showing the home page of the book recommendation system provided by an embodiment of the present invention.
[0118] Figure 11 This is a diagram of a book details page of a book recommendation system provided by an embodiment of the present invention.
[0119] Figure 12 This is a recommendation page diagram of the book recommendation system provided by an embodiment of the present invention.
[0120] Figure 13 This is a search page diagram of the book recommendation system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0121] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0122] The following are two specific industrial application examples of the book recommendation method based on knowledge graph and multi-objective optimization:
[0123] Example 1: Personalized teaching material recommendation on online education platform
[0124] Online education platforms need to recommend personalized learning materials to users (students or teachers), including e-books, course resources or exercise books.
[0125] 1. Knowledge Graph Construction: Build an educational knowledge graph, including entities and relationships such as subject knowledge points, textbook content, course relationships, and user learning behaviors. For example, the prerequisite relationships between knowledge points, the age range for textbook adaptation, and the user's learning history.
[0126] 2. Recommended implementation:
[0127] The system embeds various semantic information of learning behavior, course content and teaching materials based on students' learning progress and historical learning records, combined with knowledge graphs.
[0128] Using multi-objective optimization methods, we balance the accuracy and diversity of recommendations to ensure that the recommended teaching materials not only meet the user's learning needs but also have a certain breadth of knowledge coverage.
[0129] 3. Result output: Recommend teaching materials that match students’ current learning progress, or recommend teaching resources that suit teachers’ teaching needs to improve teaching efficiency and user satisfaction.
[0130] Improved personalization of recommendations;
[0131] Knowledge graphs enhance the adaptability of textbook recommendations;
[0132] Multi-objective optimization ensures the diversity and fairness of user experience.
[0133] Example 2: Interest-based recommendation on an electronic book sales platform
[0134] E-book sales platforms (such as the Kindle Store or Douban Reading) need to recommend books that suit users' reading interests, while taking into account the breadth of recommendations and sales growth goals.
[0135] 1. Knowledge Graph Construction: Build a knowledge graph covering book content, user interests, and sales data. For example, the book's author, category, content keywords, user review relationships, and user reading preferences and behavior data.
[0136] 2. Recommended implementation:
[0137] Match user interests with book content through knowledge graph embedding.
[0138] In multi-objective optimization, the user ratings, user interest matching and sales contribution of books are comprehensively considered to ensure that the recommended books are both in line with user interests and beneficial to the platform's sales goals.
[0139] 3. Result output: Based on the user's interests and historical purchasing behavior, a set of recommended book lists is generated, covering both books commonly preferred by users and books with high sales potential, thereby enhancing the commercial value of the recommendations.
[0140] Improve user purchase rate and reading experience;
[0141] Balance business goals and user interests in recommendations;
[0142] The knowledge graph enhances the relevance recommendations between books and promotes the discovery of long-tail books.
[0143] These two embodiments demonstrate the specific application scenarios of this method in the two major industries of online education and electronic book sales.
[0144] like Figure 1 As shown, the book recommendation method based on knowledge graph and multi-objective optimization provided by the embodiment of the present invention includes the following steps:
[0145] S101, initialization parameters;
[0146] S102, knowledge graph embedding task;
[0147] S103, recommended tasks;
[0148] S104, joint optimization;
[0149] S105: Multi-objective optimization.
[0150] The following is the detailed working principle of the book recommendation method based on knowledge graph and multi-objective optimization:
[0151] 1. Parameter initialization
[0152] During the initialization phase of the recommendation system, the model needs to set a series of parameters, including user embedding vectors, item embedding vectors, entity embeddings in the knowledge graph, and relationship embeddings.
[0153] The parameters can be initialized using random distribution or by using the results of a pre-trained model to ensure that the initial embedding vector has certain semantic information.
[0154] The initialization parameters lay the foundation for subsequent embedding training and recommendation optimization, enabling the model to effectively process multi-source information.
[0155] 2. Knowledge Graph Embedding Task
[0156] The core of the knowledge graph embedding task is to map the entities and relations in the knowledge graph into a high-dimensional vector space.
[0157] Use embedding algorithms (such as TransE, DistMult, etc.) to represent entities and relations in the knowledge graph as vectors, thereby capturing the semantic and structural information in the knowledge graph.
[0158] The embedding results not only enhance the semantic understanding ability of book recommendations, but also provide rich contextual information for modeling the association between users and items.
[0159] 3. Recommended tasks
[0160] In the recommendation task, the recommendation score is calculated by the user embedding vector, item embedding vector and knowledge graph embedding vector.
[0161] Calculate the matching degree between users and books, and use the scoring function to predict the books that users are interested in.
[0162] In addition, the semantic relevance in the knowledge graph is combined to improve the diversity and accuracy of recommendation results.
[0163] The goal of the recommendation task is to maximize the matching score between users and correct items while minimizing the score of incorrect items.
[0164] 4. Joint Optimization and Multi-Objective Optimization
[0165] Joint optimization simultaneously trains the model parameters of the knowledge graph embedding task and the recommendation task, enabling the two to share information and improve the expressive power of the embedding.
[0166] Joint optimization: By sharing the objective function (such as the loss function), the model can simultaneously improve the accuracy of knowledge graph embedding and recommendation performance.
[0167] Multi-objective optimization: During the optimization process, the system balances multiple objectives (such as recommendation accuracy, diversity, fairness, etc.) and uses weighted loss functions or Pareto optimal solutions to ensure that the system meets the requirements of multiple performance indicators.
[0168] This optimization method can improve the quality of recommendations while avoiding overfitting to a certain target and enhancing the adaptability and versatility of the system.
[0169] Through the above steps, the present invention fully utilizes the semantic information of the knowledge graph and multi-objective optimization technology to achieve accurate and efficient book recommendations.
[0170] Initialization parameters provided by the embodiment of the present invention:
[0171] Initialize model parameters, including user embedding vectors, item embedding vectors, entity embeddings in the knowledge graph, and relationship embeddings; these parameters can be randomly initialized or obtained through pre-training.
[0172] The knowledge graph embedding task provided by the embodiment of the present invention is:
[0173] For a given knowledge triple (h, r, t), the head entity and the corresponding relation are taken as input, and the original feature vectors of the head entity h and the relation r are processed separately using multiple cross-compression units and nonlinear layers; their latent features are then concatenated together, and then an L-layer MLP is used to predict the tail t:
[0174] h L =E v~S(h) [C L (v,h)[e]]
[0175] Among them C L is a cross-compression unit that outputs the latent features of the L-layer header entity h, and S(h) is the relevant item of entity h;
[0176] r L =M L (r)
[0177]
[0178] The original vectors of h and r can be feature vectors, including ID, type, or text description; then their potential features are connected to predict the tail entity; finally, the score of the triple (h, r, t) is calculated by the similarity function, as follows:
[0179]
[0180] In the above formula, f KG The function is defined in the form of inner product and the output is normalized by the nonlinear activation function sigmoid;
[0181]
[0182] The purpose of the cross unit is to achieve information sharing between the recommendation module and the knowledge graph embedding module;
[0183] For item v and its corresponding entity e in the knowledge graph, construct the cross feature C between them l ∈R d×d , where d is the dimension of the hidden layer;
[0184]
[0185] The output of the cross-compression unit for item v and entity e is:
[0186]
[0187] in, is the cross compression unit weight, is the bias parameter. Through the cross-compression unit, the model can adaptively adjust the weight of knowledge transfer and learn the correlation between the two tasks. For simplicity, the cross-compression unit is expressed as:
[0188] [v l+1 , e l+1 ]=C(v l ,e l ).
[0189] The recommended tasks provided by the embodiment of the present invention are:
[0190] In the recommendation module, the ripple propagation network is used to replace the original user vector representation method, and the final user representation U and item representation V are used as the input of the module;
[0191] Given the interaction matrix Y and the knowledge graph G, the h-layer neighbor nodes of user u are defined as As follows:
[0192]
[0193] Where: h = 1, 2..., H is the number of propagation layers; A collection of historical items for user u;
[0194] Then As the seed set of the knowledge graph, the hierarchical interest set of user u is constructed along the connection path in the knowledge graph through a ripple-like propagation method. The interest set is defined as:
[0195]
[0196] The item vector h and the candidate entity vector v are concatenated and normalized by the Softmax function to obtain the weight p. The user's historical items are dynamically integrated with the weight p to obtain the user's interest representation, which is defined as:
[0197]
[0198] After the above calculations, we get a multi-layer user interest representation set:
[0199]
[0200] Use reset gate r t Control the speed of forgetting information; use update gate z t The hidden state information of the previous moment is forgotten and selectively retained; the candidate hidden state is calculated based on the activation result of the update gate On this basis, the hidden state h at the current moment t is calculated t , the calculation process is as follows:
[0201] r t =σ(W r x t +U r h t-1 )
[0202] z t =σ(W z x t +U z h t-1 )
[0203]
[0204] Where σ represents the Sigmoid activation function; W r and U r Represents the weight parameter of the reset gate; W z and U z Represents the weight parameter of the update gate; the symbol * represents the Hadamard product;
[0205] The entity responses of user u at different link lengths in the knowledge graph are input into the GRU in the order from the inner layer to the outer layer. In order to extract the key features of the preference diffusion set, the attention mechanism is used to assign weights to the feature vectors extracted by the GRU, and then the final vector representation u of the user is generated, as shown below:
[0206]
[0207] Where n represents the maximum link length of the preference diffusion set diffusion; is the hidden state vector representation of user u’s entity response o to the preference diffusion set in the GRU unit; θ jn is the weight corresponding to the current j-th hidden state vector, indicating the relative importance of the hidden state vector;
[0208] Finally, the user's final vector representation and the candidate item vector representation are combined to calculate the predicted user click probability, as shown below:
[0209]
[0210] The joint optimization provided by the embodiment of the present invention:
[0211] In order to optimize the model performance, the present invention adopts the following loss function:
[0212]
[0213] Where: the first term F is the cross entropy loss; the second term is the knowledge graph embedding unit loss, λ1 is the loss value parameter; the third term is the L2 regularization loss, and λ2 is the regularization parameter.
[0214] The multi-objective optimization provided by the embodiment of the present invention:
[0215] The Top-K candidate recommendation list is used as the initial population of the multi-objective optimization algorithm, and the Sobol sequence is used to initialize the population; secondly, the fuzzy dominance relationship is used: assuming x i and x j Represent any two individuals in the population, then use B t (x i , x j ) represents x i x j The number of targets with good performance, W s (x i , x j ) represents x i x j The number of targets with poor performance is calculated, so the fuzzy dominance membership c is as follows, which uses the proportion of the number of better targets to express the degree of dominance between individuals, called fuzzy dominance membership c:
[0216]
[0217] When the fuzzy dominance membership degree c is greater than the set threshold, that is, the proportion of the number of better targets is within an acceptable range, the dominance relationship is established; otherwise, the dominance relationship is not established;
[0218] In addition, in order to avoid cyclic domination of individuals in the population, each individual in the population is given an energy parameter Q(x i ), as the overall standard for measuring the size of the individual objective function value, its calculation method is shown in the following formula:
[0219]
[0220] f j (x i ) is the j-th (j ∈ [1, m]) objective function value of individual x; z i is the minimum value of the j-th (j ∈ [1, m]) objective function; when it is difficult to obtain the true minimum value of the objective function, the value of z j takes the minimum value of the j-th objective function corresponding to the current population; j
[0221] Then, the discoverers in the sparrow population are introduced to the t-distribution perturbation, and the updated formula for the position of the improved discoverer is:
[0222]
[0223] where, represents the information position of the j-th dimension when the i-th sparrow iterates to the t-th time; the random number α ∈ (0, 1]; iter max represents the maximum number of iterations; R2 ∈ [0, 1], representing the warning value; ST ∈ [0.5, 1], representing the safety value; Q is a random number subject to the normal distribution; L is a 1×d matrix with each element being 1. When R2 < ST, that is, there is no danger around, the population continues to forage. When R2 ≥ ST, it means that there is danger in this area, and the discoverer needs to issue an alarm and lead other individuals in the population to move to the safe area; t(iter) is a t-distribution that increases continuously as the degree of freedom increases with the number of iterations; in the initial stage of algorithm iteration, the t-distribution is similar to the Cauchy distribution, which enables the algorithm to have strong global search ability; in the later stage of algorithm iteration, the t-distribution is similar to the Gaussian distribution, which helps the algorithm to have good local search ability, so as to enable the algorithm to maintain the diversity of the population in both local and global aspects;
[0224] Finally, calculate the crowding degree, update the sparrow population and the external archive set, and output the final recommendation list.
[0225] As Figure 2 shown, a book recommendation system based on knowledge graph and multi-objective optimization provided by an embodiment of the present invention includes:
[0226] An initialization module, used to initialize parameters;
[0227] An embedding module, used for knowledge graph embedding tasks;
[0228] A recommendation module, used for recommendation tasks;
[0229] A joint optimization module, used for joint optimization;
[0230] A multi-objective optimization module, used for multi-objective optimization.
[0231] The book recommendation system based on knowledge graph and multi-objective optimization provided by the embodiments of the present invention achieves accurate and personalized book recommendations by integrating knowledge graph technology and multi-objective optimization algorithms. The working principle of this system will be explained in detail below.
[0232] First, the system's initialization module is responsible for initializing various parameters and data structures to prepare for the subsequent recommendation process. Specifically, this module loads basic information about users and books, constructing preliminary user profiles and book feature vectors. It also initializes the basic structure of the knowledge graph, including entities (such as authors, publishers, and categories) and relationships (such as the relationship between authors and books, and between books and categories). The initialization module ensures that the system has complete basic data and reasonable parameter configuration upon startup, laying the foundation for the efficient operation of subsequent modules.
[0233] Next, the embedding module takes on the task of embedding the knowledge graph, converting the entities and relationships in the knowledge graph into low-dimensional vector representations. By using graph embedding techniques such as TransE, GraphSAGE, or other advanced graph neural network models, the embedding module is able to capture the rich semantic information and structural features of the knowledge graph. These embedding vectors not only reflect the multidimensional nature of books but also reveal the underlying relationships between users and books, thus providing high-quality input data for the recommendation module.
[0234] In the recommendation module, the system makes personalized book recommendations based on the user's historical behavior and preferences, as well as the book vectors generated by the embedding module. The recommendation module uses algorithms such as collaborative filtering, content recommendation, or hybrid recommendation, combined with knowledge graph embedding vectors, to generate a preliminary list of recommendations. By leveraging the semantic relationships in the knowledge graph, the recommendation module can better understand user needs and provide book recommendations that are highly relevant to the user's interests, thereby improving recommendation accuracy and user satisfaction.
[0235] The joint optimization module integrates the outputs of the recommendation and embedding modules, improving overall recommendation effectiveness through joint optimization. Specifically, this module jointly trains the recommendation task with the knowledge graph embedding task, ensuring that the embedding vectors not only accurately represent books and users but also optimize recommendation results. By sharing parameters and a common loss function, the joint optimization module ensures that the embedding vectors not only improve recommendation performance but also effectively capture the semantic information of the knowledge graph, achieving synergistic benefits.
[0236] The Multi-Objective Optimization module further enhances the performance of the recommendation system by simultaneously optimizing multiple objectives to meet diverse recommendation needs. Common optimization objectives include recommendation accuracy, recommendation diversity, novelty, and user satisfaction. The Multi-Objective Optimization module utilizes advanced optimization algorithms, such as genetic algorithms, particle swarm optimization, or weight adjustment methods, to balance conflicting objectives and generate optimal recommendations that comprehensively consider multiple factors. This module ensures that the system delivers accurate recommendations while also meeting user needs for diversity and novelty, enhancing the overall user experience.
[0237] Finally, the fusion module integrates the output of each module to generate a final recommendation list. Using weighted averaging, ranking algorithms, or other fusion strategies, the fusion module comprehensively considers the recommendation results of each module, ensuring that the final recommended books are both relevant to the user's interests and diverse and novel. The system also includes computer equipment, computer-readable storage media, and information data processing terminals. These components collectively support the system's efficient operation and widespread application. The computer equipment is responsible for processing and storing data, the storage medium stores the programs that implement the functions of each module, and the information data processing terminal serves as the user interaction interface, enabling the efficient operation of the book recommendation system based on knowledge graphs and multi-objective optimization in practical application scenarios.
[0238] In summary, the present invention fully utilizes the multidimensional information of users and books through modular design and deep integration of knowledge graphs and multi-objective optimization, achieving efficient, accurate, and personalized book recommendations. This system has significant advantages in practical applications, can significantly improve users' reading experience and satisfaction, and has broad market application prospects and significant practical value. The purpose of the present invention is to further optimize the results of the improved knowledge graph-based recommendation algorithm using a multi-objective optimization algorithm to obtain the final recommendation results, thereby effectively solving the problems existing in book recommendations. The ripple propagation network is a recommendation system model based on the knowledge graph that improves the accuracy and diversity of recommendations by simulating the "ripple effect" of user interests in the knowledge graph. It uses the structured information of the knowledge graph to explore and predict users' potential interests through an iterative propagation mechanism to achieve personalized recommendations. The present invention addresses the problems of uneven modeling between the user and item sides and the attenuation of high-order semantic propagation of entities in traditional knowledge graph-based recommendation algorithms. At the same time, the practice of using the accuracy of recommendation results as the only criterion for recommendation is no longer able to meet user needs. The invention uses a multi-task learning framework and a ripple propagation network to perform feature extraction on both the user side and the project side. First, for user feature extraction, the ripple propagation network is used to obtain the user's representation. When the ripple network propagation is attenuated at high-order semantic propagation, the user features at different levels are solved by using a gated recurrent unit combined with an attention mechanism to mine the user's potential dynamic interest preferences, thereby generating the user's final representation. For the extraction of item features, a cross-compression unit is used to achieve information sharing between user information and head entities, and learn richer item entity representations; finally, the Top-K candidate recommendation list results are used as the initialization population of the multi-objective optimization algorithm to further optimize the recommendation results and output the final recommendation list. Experiments have shown that the method proposed in the present invention solves the above-mentioned problems very well, and at the same time comprehensively evaluates the recommendation effect from three aspects: accuracy, diversity, and novelty of the recommendation, thereby generating a better recommendation list and improving user satisfaction with the recommendation results.
[0239] The original steps of combining multi-task learning and knowledge graph recommendation algorithm (MKR) are:
[0240] Step 1. Initialize parameters: First, randomly or pre-train the embedding vectors of users, items, and knowledge graphs;
[0241] Step 2. Recommendation task: Positive and negative samples are sampled through user-item interaction data, allowing the item representation in the recommendation task and the head entity representation embedded in the knowledge graph to transfer information to each other, then predict the matching score between the user and the item, and finally optimize the loss of the recommendation task.
[0242] Step 3. Knowledge graph embedding task: Sampling is performed through triple data, allowing the item representation in the recommendation task and the head entity representation of the knowledge graph embedding to communicate with each other, calculating the triple distance, and finally optimizing the knowledge graph embedding loss.
[0243] Step 4. Joint optimization: Combine the losses of the recommendation task and the knowledge graph task to achieve multi-task training.
[0244] When combining knowledge graphs with multi-objective optimization algorithms to solve book recommendation problems, the algorithm's modeling is uneven between the user and item sides. When the algorithm performs the recommendation task in step 2, it only considers modeling on the item side, sharing information between the item side and the head entity of the indicator graph to complete the modeling of the item side. However, the user-side knowledge is only extracted using the MLP to extract user representations, resulting in uneven modeling on both ends. By the time the algorithm reaches step 4, the accuracy of the recommendation results as the sole criterion no longer meets user needs, and the recommendation results need to be measured from multiple perspectives.
[0245] To this end, the present invention is influenced by the ripple propagation network and designs a book recommendation method based on knowledge graph and multi-objective optimization algorithm. In this model, the advantages of the multi-task learning framework and the ripple propagation network are utilized to simultaneously extract features from both users and items. First, for the extraction of user features, the ripple propagation network is used to obtain the user's representation, and the user features at different levels are combined with the gated recurrent unit (GRU) combined with the attention mechanism to mine the user's potential dynamic interest preferences and generate the user's final representation. Secondly, for the extraction of item features, the cross-compression unit is used to realize information sharing between user information and head entities, and learn richer item entity representations. Then, the obtained user vector and entity vector are input into the prediction layer to predict the probability of user interaction with the entity item. Finally, the obtained recommendation results are used as the initial population of the multi-objective optimization algorithm, and the recommendation results are further optimized to obtain the final results.
[0246] The improvement proposed in this paper combines multi-task learning and knowledge graph recommendation algorithm (MKUIP) steps as follows:
[0247] Input: interaction matrix Y, knowledge graph G
[0248] Output: Top-K final recommendation list
[0249] 1) Initialization parameters: First, randomly or pre-train the embedding vectors of users, items, and knowledge graphs;
[0250] 2) Recommendation task: Positive and negative samples are sampled through user-item interaction data, allowing the item representation in the recommendation task and the head entity representation embedded in the knowledge graph to transfer information to each other, then predict the matching score between users and items, and finally optimize the loss of the recommendation task.
[0251] 3) Knowledge graph embedding task: By sampling triple data, the item representation in the recommendation task and the head entity representation of the knowledge graph embedding are mutually transmitted, the triple distance is calculated, and finally the knowledge graph embedding loss is optimized.
[0252] 4) Joint optimization: Combine the losses of the recommendation task and the knowledge graph task to achieve multi-task training.
[0253] 5) Multi-objective optimization: A multi-objective optimization algorithm is used to optimize the candidate recommendation list. The recommendation effect is comprehensively evaluated from three aspects: accuracy, diversity, and novelty, to obtain the final recommendation list.
[0254] The following is a detailed description of the technical solution. First, we provide the algorithm inputs: the user-item interaction matrix Y and the knowledge graph G. The following describes the detailed steps for applying the improved multi-task learning and knowledge graph recommendation algorithm to the book recommendation problem:
[0255] Step 1: Initialize parameters
[0256] Initialize model parameters, including user embedding vectors, item embedding vectors, entity embeddings in the knowledge graph, and relationship embeddings. These parameters can be randomly initialized or obtained through pre-training.
[0257] Step 2: Knowledge graph embedding task
[0258] Knowledge graph embedding is the process of embedding entities and relations into a continuous vector space while preserving their structure. In this paper, we adopt a deep semantic matching architecture. For a given knowledge triple (h, r, t), the head entity and the corresponding relation are taken as input. Multiple cross-compression units and nonlinear layers are used to process the raw feature vectors of the head h and relation r respectively. Their latent features are then concatenated together, and an L-layer MLP is used to predict the tail t:
[0259] h L =E v~S(h) [C L (v,h)[e]]
[0260] Among them C L It is a cross compression unit used to output the latent features of the L-layer header entity h, and S(h) is the relevant item of entity h.
[0261] r L =M L(r)
[0262]
[0263] The original vectors of h and r can be feature vectors, including IDs, types, or text descriptions. Their potential features are then concatenated to predict the tail entity. Finally, the score of the triple (h, r, t) is calculated using a similarity function, as follows:
[0264]
[0265] In the above formula, f KG The function is defined in the form of an inner product and its output is normalized by a nonlinear activation function sigmoid.
[0266]
[0267] The purpose of the cross compression unit is to achieve information sharing between the recommendation module and the knowledge graph embedding module. Its structure is as follows Figure 3 shown.
[0268] For item v and its corresponding entity e in the knowledge graph, construct the cross feature C between them l ∈R d×d , where d is the dimension of the hidden layer.
[0269]
[0270] The output of the cross-compression unit for item v and entity e is:
[0271]
[0272] in, is the cross compression unit weight, is the bias parameter. Through the cross-compression unit, the model can adaptively adjust the weight of knowledge transfer and learn the correlation between the two tasks. For simplicity, the cross-compression unit is expressed as:
[0273] [v l+1 , e l+1 ]=C(v l ,e l )
[0274] Step 3: Recommend tasks
[0275] In the recommendation module, the ripple propagation network is used to replace the original user vector representation method, and the final user representation U and item representation V are used as the input of the module.
[0276] Given the interaction matrix Y and the knowledge graph G, the h-layer neighbor nodes of user u are defined as As follows:
[0277]
[0278] Where: h = 1, 2..., H is the number of propagation layers; A collection of historical items for user u.
[0279] Then As the seed set of the knowledge graph, the hierarchical interest set of user u is constructed along the connection path in the knowledge graph through a ripple-like propagation method. The interest set is defined as:
[0280]
[0281] User historical behavior is important information for modeling user interests. By mining user historical behavior, we can improve the model's ability to express interests. Therefore, this paper first uses the attention mechanism to fuse user historical items and uses the fused user feature vector as the user's shallow interest representation. The attention mechanism takes the user's historical items and candidate items as input. The item vector h and the candidate entity vector v are concatenated and normalized using the Softmax function to obtain the weight c. The user's historical items are dynamically fused with the weight c to obtain the user's interest representation, which is defined as:
[0282]
[0283] After the above calculations, we get a multi-layer user interest representation set:
[0284]
[0285] After obtaining the entity response of user u in the preference diffusion set, a preference feature sequence from the inner layer to the outer layer is formed. The gated recurrent unit structure is introduced for deep feature extraction of the feature sequence and the attention mechanism is integrated for weight distribution, thereby capturing the feature representation that is more important to the user in the user preference diffusion set and refining the granularity of the user interest description. The GRU model framework is as follows Figure 4 shown.
[0286] GRU uses reset gate r t Control the degree of forgetting of information; use update gate z t The hidden state information of the previous moment is forgotten and selectively retained; the candidate hidden state is calculated based on the activation result of the update gate On this basis, the hidden state h at the current time t is calculated t , the calculation process is as follows:
[0287] r t =σ(W r x t +Ur h t-1 )
[0288] z t =σ(W z x t +U z h t-1 )
[0289]
[0290] Where σ represents the Sigmoid activation function; W r and U r Represents the weight parameter of the reset gate; W z and U z Represents the weight parameter of the update gate; the symbol * represents the Hadamard product.
[0291] Considering that the user preference intensity decreases with the increase of link length in the preference diffusion set, and entities with farther distances are less important for the representation of user interest preferences, the entity responses of user u at different link lengths in the knowledge graph are input into the GRU in the order from the inner layer to the outer layer. In order to extract the key features of the preference diffusion set, the attention mechanism is used to assign weights to the feature vectors extracted by the GRU, and then the final vector representation u of the user is generated, as shown below:
[0292]
[0293] Where n represents the maximum link length of the preference diffusion set diffusion; is the hidden state vector representation of user u’s entity response o to the preference diffusion set in the GRU unit; θ jn is the weight corresponding to the current j-th hidden state vector, indicating the relative importance of the hidden state vector.
[0294] Finally, the user's final vector representation and the candidate item vector representation are combined to calculate the predicted user click probability, as shown below:
[0295]
[0296] Step 4: Joint Optimization
[0297] In order to optimize the model performance, the present invention adopts the following loss function:
[0298]
[0299] Where: the first term F is the cross entropy loss; the second term is the knowledge graph embedding unit loss, λ1 is the loss value parameter; the third term is the L2 regularization loss, and λ2 is the regularization parameter.
[0300] Step 5: Multi-objective optimization
[0301] The Top-K candidate recommendation list is used as the initial population of the multi-objective optimization algorithm, and the Sobol sequence is used to initialize the population; secondly, the fuzzy dominance relationship is used: assuming x i and x j Represent any two individuals in the population, then use B t (x i , x j ) represents x i x j The number of targets with good performance, W s (x i , x j ) represents x i x j The number of targets with poor performance is calculated, so the fuzzy dominance membership c is as follows, which uses the proportion of the number of better targets to express the degree of dominance between individuals, called fuzzy dominance membership c:
[0302]
[0303] When the fuzzy dominance membership degree c is greater than the set threshold, that is, the proportion of the number of better targets is within an acceptable range, the dominance relationship is established; otherwise, the dominance relationship is not established.
[0304] In addition, in order to avoid cyclic domination of individuals in the population, each individual in the population is given an energy parameter Q(x i ), as the overall standard for measuring the size of the individual objective function value, its calculation method is shown in the following formula:
[0305]
[0306] f j (x i ) is individual x i The jth (j∈[1,m]) objective function value; z j is the minimum value of the jth (j∈[1,m]) objective function; when the true minimum value of the objective function is difficult to obtain, z j The value of is the minimum value of the jth objective function corresponding to the current population.
[0307] Then the discoverer in the sparrow population is introduced into the t-distribution disturbance, and the improved discoverer position update formula is:
[0308]
[0309] in, It represents the information position of the j-th dimension when the i-th sparrow iterates to the t-th time; the random number α ∈ (0, 1]; iter max It represents the maximum number of iterations; R2 ∈ [0, 1], representing the warning value; ST ∈ [0.5, 1], representing the safety value; Q is a random number subject to the normal distribution; L is a 1×d matrix where each element is 1. When R2 < ST, that is, there is no danger around, the population continues to forage. When R2 ≥ ST, it means there is danger in this area, and the discoverer needs to issue an alarm and lead other individuals in the population to move to the safe area; t(iter) is the t-distribution that increases continuously with the increase of the degree of freedom as the number of iterations increases. In the initial stage of the algorithm iteration, the t-distribution is similar to the Cauchy distribution, which enables the algorithm to have strong global search ability; in the later stage of the algorithm iteration, the t-distribution is similar to the Gaussian distribution, which helps the algorithm to have good local search ability, so as to enable the algorithm to maintain the diversity of the population in both local and global aspects.
[0310] Finally, calculate the crowding degree, update the sparrow population and the external archive set, and output the final recommendation list.
[0311] The flowchart of the book recommendation algorithm based on the knowledge graph and multi-objective optimization for recommendation is as follows Figure 5 shown:
[0312] The parameter settings of the present invention are shown in the following table, where d is the dimension of the knowledge graph vector representation, n is the sampling number of the interest set, h is the propagation layer number, t is the training frequency of the model recommendation unit, λ1 and λ2 are hyperparameters, P is the population size, G max is the maximum number of evolutionary generations, M is the number of objective functions, K is the length of the final recommendation list, P c is the crossover probability, P m is the mutation probability.
[0313] Table 1 Experimental parameter settings
[0314] Table1 Model parameters
[0315]
[0316] To verify the practicability of MKUIP, in the Top-K experiment, accuracy (Precision@K) and recall (Recall@K) are used to measure the recommendation effect of the model. The experimental results of Top-K are as Figure 6 :
[0317] To verify the effectiveness of the multi-objective optimization algorithm, different metrics are used to evaluate the recommendation performance of the recommendation algorithm. In this section, the performance of the recommendation algorithm is measured from three dimensions, and the accuracy, diversity and novelty of the recommendation are used as the evaluation metrics of the algorithm.
[0318] UserCF MF MORS MKUIP Accuracy 0.29 0.26 0.33 0.32 Diversity 0.49 0.45 0.47 0.54 Novelty 0.78 0.92 0.93 0.98
[0319] This paper studies the problem of rating prediction in recommendation systems and proposes a book recommendation method MKUIP based on knowledge graph and multi-objective optimization. MKUIP first introduces GRU combined with attention mechanism into the interest propagation method to alleviate the user interest decay characteristic and generate user representation, thereby improving the model's ability to express user interests. It then generates item representations through multi-layer cross-compression operations and uses multi-task learning to optimize the recommendation unit and knowledge graph embedding unit, thereby enhancing the model's generalization ability. It then uses item and user representations to make recommendations for users. Finally, a multi-objective optimization algorithm is used to further optimize the Top-K recommendation results to obtain the final recommendation results. Experiments were conducted on a book dataset in the recommendation system field. The results show that the proposed MKUIP has improved diversity and novelty indicators compared to the other three reference methods. The Top-K experimental results also show that the improved recommendation algorithm of this paper has significantly improved precision and recall compared to the other methods, thus verifying the effectiveness and feasibility of the present invention.
[0320] Book recommendation system main page: Figure 10 This is the main page display of the book recommendation system, which is mainly divided into popular books module, guess you like module, and recommended books module.
[0321] Book details page: In the three modules of popular books, guess you like and recommended books on the homepage, click on any book to jump to the book details page, where you can see the relevant information of the book and perform rating operations. The operation results are shown in Figure 11 :
[0322] Book recommendation page: Book recommendation interface, based on the user's book rating data, find users with similar preferences to the user, and recommend books liked by these similar users to the user to meet the user's preferences. The user-based collaborative filtering algorithm is mainly used here. The operation results are as follows Figure 12 :
[0323] Book search page: Provide a search box on the homepage for retrieval. For example, search for Red Tent as shown below and the corresponding results will be given. Figure 13 :
[0324] To validate the effectiveness of the MKUIP algorithm's recommendations, we used a dataset consisting of a book knowledge graph, keyword data for 3,682 books, 943 users, and 100,000 ratings. We tested this dataset and calculated the average accuracy, diversity, and novelty of the recommendations for all target users.
[0325] as follows Figure 7-Figure 9Figure 1 shows a comparison of the accuracy, diversity, and novelty of different algorithms on this book dataset. As can be seen from the figure, for this book dataset, while MKUIP's accuracy is slightly lower than MORS's, it outperforms UserCF and MF, with MF's recommendation results performing the worst. In terms of both diversity and novelty, MKUIP performs well, outperforming the other compared algorithms. UesrCF's recommendation results are less diverse than MF's, but MF outperforms UesrCF in terms of novelty.
[0326] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware portion can be implemented using dedicated logic; the software portion can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art will appreciate that the above-mentioned devices and methods can be implemented using computer-executable instructions and / or contained in processor control code, for example, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, or can be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0327] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with this technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered by the scope of protection of the present invention.
Claims
1. A book recommendation method based on knowledge graph and multi-objective optimization, characterized in that: The following steps are involved: Step 1, parameter initialization: Initialize the user embedding vector, item embedding vector, entity embedding and relationship embedding in the knowledge graph. The parameters are obtained by random initialization or pre-training. Step 2: Knowledge graph embedding task: Based on the entities and relationships in the knowledge graph, the knowledge graph is embedded into a high-dimensional vector space using an embedding model to capture the semantic and structural information of the knowledge graph. Step 3, recommendation task: Based on the user embedding vector, item embedding vector, and knowledge graph embedding vector, calculate the matching score between the user and the book, and predict the books that the user is interested in; Step 4, joint optimization: Combine the objective functions of the knowledge graph embedding task and the recommendation task to optimize model parameters and improve embedding expression ability and recommendation accuracy; Step 5, multi-objective optimization: Based on multiple objectives such as recommendation accuracy, diversity, and fairness, a weighted loss function or Pareto optimal solution method is used to achieve multi-objective optimization of the recommendation task. The recommended tasks: In the recommendation module, the ripple propagation network is used to replace the original user vector representation method, and the final user representation U and item representation V are used as the input of the module; Given the interaction matrix Y and the knowledge graph G, the h-layer neighbor nodes of user u are defined as As follows: Where: h = 1, 2..., H is the number of propagation layers; A collection of historical items for user u; Then As the seed set of the knowledge graph, the hierarchical interest set of user u is constructed along the connection path in the knowledge graph through a ripple-like propagation method. The interest set is defined as: The item vector h and the candidate entity vector v are concatenated and normalized by the Softmax function to obtain the weight p. The user's historical items are dynamically fused with the weight p to obtain the user's interest representation, which is defined as: After the above calculations, we get a multi-layer user interest representation set: Use reset gate r t Control the degree of forgetting of information; use update gate z t Forget and selectively retain the hidden state information of the previous moment; The candidate hidden state is calculated based on the activation result of the update gate On this basis, the hidden state h at the current moment t is calculated t , the calculation process is as follows: r t =σ(W r x t +U r h t-1 z t =σ(W z x t +U z h t-1 Where σ represents the Sigmoid activation function; W r and U r Represents the weight parameter of the reset gate; W z and U z Represents the weight parameter of the update gate; the symbol * represents the Hadamard product; The entity responses of user u at different link lengths in the knowledge graph are input into the GRU in the order from the inner layer to the outer layer. In order to extract the key features of the preference diffusion set, the attention mechanism is used to assign weights to the feature vectors extracted by the GRU, and then the final vector representation u of the user is generated, as shown below: Where n represents the maximum link length of the preference diffusion set diffusion; is the hidden state vector representation of user u’s entity response o to the preference diffusion set in the GRU unit; θ jn is the weight corresponding to the current j-th hidden state vector, indicating the relative importance of the hidden state vector; Finally, the user's final vector representation and the candidate item vector representation are combined to calculate the predicted user click probability, as shown below: The joint optimization: In order to optimize the model performance, the following loss function is used: Where: the first term F is the cross entropy loss; the second term is the knowledge graph embedding unit loss, λ1 is the loss value parameter; the third term is the L2 regularization loss, and λ2 is the regularization parameter.
2. The book recommendation method based on knowledge graph and multi-objective optimization as claimed in claim 1, characterized in that: The parameters are initialized: Initialize model parameters, including user embedding vectors, item embedding vectors, entity embeddings in the knowledge graph, and relationship embeddings; these parameters can be randomly initialized or obtained through pre-training.
3. The book recommendation method based on knowledge graph and multi-objective optimization as claimed in claim 1, characterized in that: The knowledge graph embedding task: For a given knowledge triple (h, r, t), the head entity and the corresponding relation are taken as input, and the original feature vectors of the head entity h and the relation r are processed separately using multiple cross-compression units and nonlinear layers; their latent features are then concatenated together, and then an L-layer MLP is used to predict the tail t: h L =E v~S(h) [C L (v,h)[e]] Among them C L is a cross-compression unit that outputs the latent features of the L-layer header entity h, and S(h) is the relevant item of entity h; r L =M L (r) The original vectors of h and r are feature vectors, including descriptions of ID, type, or text; their potential features are then connected to predict the tail entity; finally, the score of the triple (h, r, t) is calculated through the similarity function, as follows: In the above formula, f KG The function is defined in the form of inner product and the output is normalized by the nonlinear activation function sigmoid; The purpose of the cross unit is to achieve information sharing between the recommendation module and the knowledge graph embedding module; For item v and its corresponding entity e in the knowledge graph, construct the cross feature C between them l ∈R d×d , where d is the dimension of the hidden layer; The output of the cross-compression unit for item v and entity e is: in, is the cross compression unit weight, b . l ∈R d is the bias parameter. Through the cross-compression unit, the model can adaptively adjust the weight of knowledge transfer and learn the correlation between the two tasks. For simplicity, the cross-compression unit is expressed as: [v l+1 ,e l+1 ]=C(v l ,e l )。 4. The book recommendation method based on knowledge graph and multi-objective optimization as claimed in claim 1, characterized in that: The multi-objective optimization: The Top-K candidate recommendation list is used as the initial population of the multi-objective optimization algorithm, and the Sobol sequence is used to initialize the population; secondly, the fuzzy dominance relationship is used: assuming x i and x j Represent any two individuals in the population, then use B t (x i , x j ) represents x i x j The number of targets with good performance, W s (x i , x j ) represents x i x j The number of targets with poor performance is calculated, so the fuzzy dominance membership c is as follows, which uses the proportion of the number of better targets to express the degree of dominance between individuals, called fuzzy dominance membership c: When the fuzzy dominance membership degree c is greater than the set threshold, that is, the proportion of the number of better targets is within an acceptable range, the dominance relationship is established; otherwise, the dominance relationship is not established; In addition, in order to avoid cyclic domination of individuals in the population, each individual in the population is given an energy parameter Q(x i ), as the overall standard for measuring the size of the individual objective function value, its calculation method is shown in the following formula: f j (x i ) is individual x i The jth (j∈[1,m]) objective function value; z j is the minimum value of the jth (j∈[1,m]) objective function; When the true minimum value of the objective function is difficult to obtain, z j The value of takes the minimum value of the jth objective function corresponding to the current population; Then the discoverer in the sparrow population is introduced into the t-distribution disturbance, and the improved discoverer position update formula is: Among them, represents the information position of the j-th dimension when the i-th sparrow iterates to the t-th time; the random number α ∈ (0, 1]; iter max represents the maximum number of iterations; R2 ∈ [0, 1], representing the warning value; ST ∈ [0.5, 1], representing the safety value; Q is a random number subject to the normal distribution; L is a 1×d matrix where each element is 1; when R2 < ST, that is, there is no danger around, the population continues to forage, and when R2 ≥ ST, it means there is danger in this area, and the discoverer needs to issue an alarm and lead other individuals in the population to move to the safe area; t(iter) is a t-distribution that increases continuously with the increase of the degree of freedom with the number of iterations; in the initial stage of the algorithm iteration, the t-distribution is the Cauchy distribution, which enables the algorithm to have global search ability; in the later stage of the algorithm iteration, the t-distribution is the Gaussian distribution, which helps the algorithm to have local search ability, so that the algorithm can maintain the diversity of the population in both local and global aspects; Finally, the crowding degree is calculated, the sparrow population and the external archive set are updated, and the final recommendation list is output.
5. A book recommendation system based on knowledge graph and multi-objective optimization that implements the book recommendation method based on knowledge graph and multi-objective optimization as described in any one of claims 1 to 4, characterized in that: The book recommendation system based on knowledge graph and multi-objective optimization includes: Initialization module, used to initialize parameters; Embedding module, used for knowledge graph embedding tasks; Recommendation module, used for recommendation tasks; Joint optimization module, used for joint optimization; Multi-objective optimization module, used for multi-objective optimization.
6. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the book recommendation method based on knowledge graph and multi-objective optimization as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the book recommendation method based on knowledge graph and multi-objective optimization as described in any one of claims 1 to 4.
8. An information data processing terminal, characterized in that: The information data processing terminal is used to implement the book recommendation system based on knowledge graph and multi-objective optimization as described in claim 5.
Citation Information
Patent Citations
Content recommendation method based on semantic feature and knowledge feature fusion
CN115659018A
Multi-task recommendation method fusing preference propagation
CN115905704A