A fusion group collaborative knowledge graph network recommendation method

By constructing a collaborative knowledge graph and combining meta-paths and improved attention mechanisms, the problem of user attributes being difficult to integrate into the knowledge graph was solved, thereby enriching user data and improving recommendation accuracy.

CN116304372BActive Publication Date: 2026-01-02NANJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310321078.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2026-01-02
Estimated Expiration
2043-03-29

AI Technical Summary

Technical Problem

In existing knowledge graph-based recommendation systems, user attributes are difficult to incorporate, resulting in limited user data. Furthermore, the similarities and preferences between users and items are not effectively combined, leading to poor recommendation performance.

Method used

By acquiring user group data, user project interaction data, and knowledge graph data, a collaborative knowledge graph is constructed. The transR knowledge graph representation method is used for node and relationship embedding representation. Information transmission and aggregation are performed by combining meta-path and improved attention mechanism. Graph neural networks are used for project recommendation.

Benefits of technology

It enriches user data, improves the embedded representation of users and projects, alleviates data sparsity and cold start problems, and improves the accuracy of recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116304372B_ABST
    Figure CN116304372B_ABST
Patent Text Reader

Abstract

The application discloses a kind of fusion group's collaborative knowledge graph network recommendation method, including obtaining user group data, user item interaction data and knowledge graph data;Through item node fusion user item interaction and knowledge graph for collaborative knowledge graph, using user group data expansion collaborative knowledge graph in user item two-part graph into three-part graph;Using transR knowledge graph representation method, node and relationship are embedded representation;By the method of meta-path, group user item three-part graph is changed into multiple relationship subgraph;Similarity analysis is carried out to subgraph, and the similarity relationship and expression of user-user, item-item are obtained, and the node embedding of knowledge graph is updated;Using the improved attention mechanism based on user latent relationship tendency carries out information transmission and aggregation, and is learned by graph neural network modeling, reduces the influence of irrelevant data on prediction, obtains the recommendation of item using prediction function, improves recommendation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of recommendation system, and in particular to a collaborative knowledge graph network recommendation method fusing groups. BACKGROUND

[0002] With the rapid development of the Internet, the explosive growth of information in the network, the scale of information and the complexity and richness of information are constantly improving, and the massive information brings information overload to users, and how to filter information and obtain the information that users are really interested in becomes more and more important.

[0003] The recommendation system as an effective means to deal with such problems has been applied and developed, and the traditional recommendation method gives different vector representations to users and items through collaborative filtering technology, and then uses inner product, matrix decomposition, neural network and other operations for modeling, which faces the problems of data sparsity and cold start. In order to solve this problem, relevant professional experts propose to use the attributes of users and items to compensate for data sparsity to obtain a knowledge graph, and combine the knowledge graph with traditional recommendation.

[0004] The existing recommendation based on knowledge graph considers the item information, but due to user privacy, it is difficult to integrate the user attributes into the knowledge graph, resulting in relatively less user data, and the existing recommendation based on knowledge graph does not combine the similarity between users and items and the user's preference well before recommending. SUMMARY

[0005] This section aims to summarize some aspects of the embodiments of the present application and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the abstract and title of the specification to avoid obscuring the purpose of this section, abstract and title, and such simplifications or omissions cannot be used to limit the scope of the present application.

[0006] In view of the above existing problems, the present application is proposed. Therefore, the present application provides a collaborative knowledge graph network recommendation method fusing groups to solve the problems of relatively less user data caused by difficulty of user attributes into the knowledge graph and the existing knowledge graph cannot well provide user recommendation of interested information in practical problems.

[0007] To solve the above technical problems, the present application provides the following technical solutions:

[0008] The present application provides a collaborative knowledge graph network recommendation method fusing groups, comprising:

[0009] Obtaining user group data, user item interaction data and knowledge graph data;

[0010] Fusion user project interaction data and knowledge graph data as collaborative knowledge graph through project nodes;

[0011] Expand the user project bipartite graph in the collaborative knowledge graph to a tripartite graph using the user group data;

[0012] Use a knowledge graph representation method to embed the nodes and relationships in the collaborative knowledge graph; and convert the group user project tripartite graph into multiple relationship subgraphs through a meta-path method;

[0013] Perform similarity analysis on the relationship subgraphs to obtain user-to-user and project-to-project similarity expressions, and update the node embedding of the collaborative knowledge graph;

[0014] Use an improved attention mechanism based on user latent relationship inclination to perform information transmission and aggregation, and use a graph neural network modeling learning to make a prediction using a prediction function to recommend projects to users.

[0015] As a preferred solution of the group-fused collaborative knowledge graph network recommendation method of the present application, wherein: the fusion of user project interaction data and knowledge graph data as a collaborative knowledge graph through project nodes comprises:

[0016] Fuse the user nodes and user group data in the collaborative knowledge graph to obtain a collaborative knowledge graph containing user group data.

[0017] As a preferred solution of the group-fused collaborative knowledge graph network recommendation method of the present application, wherein: the collaborative knowledge graph comprises:

[0018] The upper half of the collaborative knowledge graph is a group user project tripartite graph, and the lower half of the collaborative knowledge graph is a project knowledge graph.

[0019] As a preferred solution of the group-fused collaborative knowledge graph network recommendation method of the present application, wherein: the embedding representation of the nodes and relationships in the collaborative knowledge graph using a knowledge graph representation method comprises:

[0020] The embedding representation of the nodes and relationships in the collaborative knowledge graph is trained using a transR knowledge graph representation method.

[0021] The embedding representation needs to be negatively sampled to obtain sample data, and the head and tail entities are replaced by a negative sampling strategy to form negative triples and combined with positive triples to train the node and relationship embedding representation in the knowledge graph; the embedding representation of the nodes and relationships in the collaborative knowledge graph using the transR knowledge graph representation method is specifically represented as follows:

[0022] Projecting the entity into the relation space, the formula is satisfied when the head entity h and the tail entity t are projected into the r relation space e r The embedding representation of the relation is, The embedding representation of the head entity h in the r relation space is, The embedding representation of the tail entity t in the r relation space is;

[0023] The corresponding score formula of the embedding representation is:

[0024]

[0025] Wherein, g is the distance of the head entity h and the tail entity t in the r relation space, and the lower the score represents that the triple is more likely to be true; W r Is the conversion matrix of the relation r, which is used to convert the entity into the corresponding relation space;

[0026] The corresponding loss function of the transR knowledge graph representation method is represented as:

[0027]

[0028] Wherein, The loss function of the knowledge graph is, the lower the value obtained by the loss function, the better the training effect; lnσ is an activation function, which introduces nonlinear characteristics in the network; τ represents the set of positive and negative triples, h, r, t is the positive sampling triple, and h, r, t' is the negative sampling triple.

[0029] As a preferred scheme of the fusion group collaborative knowledge graph network recommendation method of the application, wherein: the negative sampling strategy comprises:

[0030] The negative sampling strategy adopts a biased importance sampling strategy, which takes the importance of the node as a sampling probability enhancement item and a relation-based sampling item, and normalizes and adds them to obtain the final negative sampling probability;

[0031] Wherein, the relation-based sampling divides the relation into many-to-one and many-to-many, in the many-to-one relation, the probability of error of the triple formed by replacing the head entity is less than that of the triple formed by replacing the tail entity; in the many-to-many relation, if the number of head entities is less than that of tail entities, the head entity is selected, otherwise the tail entity is selected;

[0032] The relation-based sampling probability calculation formula is:

[0033]

[0034] Wherein, p is the relation-based sampling probability, R p Is the average value of the number of head entities corresponding to the tail entities in the relation, Np The number of tail entities corresponding to the head entity is averaged;

[0035] The relationship-based sampling probability is converted into a Bernoulli sampling form, and the conversion formula is:

[0036] P{H=h} = p h (1-p) 1-h h=0,1

[0037] Wherein, P{H=h} is the sampling probability of entity H or entity h, if h is 0, it is the head entity replacement probability, if h is 1, it is the tail entity replacement probability;

[0038] The more edges connected to the node-based sampling enhancement item and the node, the more important the node is in the graph, and the larger the probability of being sampled is, which is the ratio of the edges of the node to the maximum value of the edges in the graph;

[0039] The relationship-based and node-based sampling probabilities are biasedly normalized, and the biased importance sampling probability is obtained by adding them, and the calculation formula is:

[0040]

[0041] Wherein, The node sampling enhancement item, W is the enhancement parameter of the enhancement item to the sampling probability.

[0042] As a preferred scheme of the fusion group collaborative knowledge graph network recommendation method, wherein: the group user item three graph is converted into a plurality of relationship subgraphs by the meta-path method, comprising:

[0043] The meta-path is divided into one-hop meta-path and two-hop meta-path according to the principle that the node correlation degree decreases after multi-hop;

[0044] The meta-path jump number is divided by the principle that the node correlation degree decreases, and the meta-path selection strategy is designed; the weight of the meta-path in the relationship subgraph is calculated;

[0045] The weight calculation formula of the one-hop meta-path is:

[0046]

[0047] Wherein, n is the number of meta-paths between two nodes, N max The maximum number of meta-paths between nodes under the meta-path;

[0048] The weight calculation formula of the two-hop meta-path is:

[0049]

[0050] Wherein, m is the number of a,b in the meta-path Ep intermediate node under the group fusion;

[0051] The meta-path selection strategy is to select the two-hop meta-path through probability, and the calculation formula is as follows:

[0052]

[0053] Wherein, p ab is the two-hop meta-path selection probability, and Σw ab is the sum of the edge weights of the current two-hop meta-path corresponding relation subgraph, and ∑∑w ab represents the sum of the edge weights of all two-hop meta-paths.

[0054] As a preferred scheme of the collaborative knowledge graph network recommendation method of the fusion group, wherein: the similarity analysis is performed on the relation subgraph to obtain a user-to-user and item-to-item similarity expression, and the node embedding of the collaborative knowledge graph is updated, including:

[0055] The similarity expression is obtained by fusing the similarities in multiple relation subgraphs;

[0056] The calculation formula of the similarity expression is:

[0057]

[0058] Wherein, e u,v represents the similarity expression of nodes u and v, W mean represents the average weight of the corresponding hop number, and represent the one-hop and two-hop neighbor sets of the nodes, and represent the neighbors therein;

[0059] According to the obtained similarity expression, the node embedding representation in the collaborative knowledge graph is updated.

[0060] As a preferred scheme of the collaborative knowledge graph network recommendation method of the fusion group, wherein: an improved attention mechanism based on user latent relationship tendency is used for information transmission and aggregation, including:

[0061] The improved attention mechanism includes an attention mechanism parameter item and a user relationship tendency parameter item.

[0062] As a preferred scheme of the collaborative knowledge graph network recommendation method of the fusion group, wherein: the information propagation and aggregation include:

[0063] The weight of the user relationship tendency parameter item is configured during information propagation, and the influence of the potential tendency of the user on node embedding during information propagation and aggregation is adjusted.

[0064] The information aggregation is represented as:

[0065]

[0066] The information aggregation of the neighbor of the entity h under the preference of the user u is represented as Pi (h, r, t) represents the weight of the t entity transmitted to the h entity. u (h, r, t) is fused by the attention mechanism formula and the user relationship tendency formula, and W ur The weight adjusts the influence degree of the user tendency, and the calculation formula is as follows:

[0067] Pi (h, r, t) represents the weight of the t entity transmitted to the h entity. u (h,r,t)=((W r e t ) T tanh(W r e h +e r ))*(e u ·e r )*W ur

[0068]

[0069] Wherein, tanh represents an activation function, and a nonlinear characteristic is introduced in the function;

[0070] The influence of the potential tendency of the user on node embedding during information propagation and aggregation is adjusted, and the calculation formula is:

[0071]

[0072] Wherein, LeakyReLU is a leaky rectified linear unit function, is a new h entity embedding aggregated by the attention mechanism and the preference of the user u, W1 represents a weight matrix during information aggregation and is learnable, represents the information aggregation of the neighbor of the entity h under the preference of the user u.

[0073] As a preferred scheme of the collaborative knowledge graph network recommendation method of the fusion group, the prediction function comprises:

[0074] The prediction function is represented as the dot product and normalization of the user embedding and the item embedding, and the prediction result is generated by graph neural network modeling learning to recommend items to the user.

[0075] Compared with the prior art, the application has the beneficial effects that: the user data is enriched by using the previous relationship of the existing users and groups, the similarity of users and items is obtained by analyzing the group user-item tripartite graph, the embedding representation of the users and items is improved by fusing the user group and user-item interaction data, and the data sparsity and cold start problem are alleviated; the improved attention mechanism is used to calculate different node embedding representations for different users, and the recommendation accuracy is improved. BRIEF DESCRIPTION OF DRAWINGS

[0076] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0077] Figure 1 The flowchart of the fusion group collaborative knowledge graph network recommendation method described in an embodiment of the present application;

[0078] Figure 2 The schematic diagram of entity space mapping to relationship space of the transR knowledge graph representation method of the fusion group collaborative knowledge graph network recommendation method described in an embodiment of the present application;

[0079] Figure 3 The fusion group user-item tripartite graph and the fusion knowledge graph collaborative knowledge graph of the fusion group collaborative knowledge graph network recommendation method described in an embodiment of the present application;

[0080] Figure 4 The partial relationship subgraph obtained by the meta-path of the fusion group collaborative knowledge graph network recommendation method described in an embodiment of the present application;

[0081] Figure 5 The information propagation graph of the graph neural network node of the fusion group collaborative knowledge graph network recommendation method described in an embodiment of the present application. DETAILED DESCRIPTION

[0082] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.

[0083] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that the present application can be practiced without the specific details set forth in this description. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to unnecessarily obscure aspects of the present application.

[0084] It should also be noted that, as used in the specification and the appended claims, the articles "a," "an," "the" and "said" are intended to mean that there are one or more of the features (i.e., one or more implementations) being referred to. Furthermore, to recite that a component, feature or structure is "configured to" perform a task or function is merely background description for a step of manufacturing, where the component, feature or structure becomes configured (i.e., shaped and otherwise transformed) to perform the task or function after a step of manufacturing. Accordingly, the use of "configured to" has nothing to do with the "configuration settings" of a device or item, or the "configuration" or "configuring" of any such device or item in the practical, objective sense of those terms.

[0085] The present application is described in detail below with reference to the attached drawing figures, wherein the implementations of the present application are shown and described in connection with the exemplary embodiments. As should be appreciated, the present application is not limited to the exemplary embodiments, but is applicable to any environment that can benefit from the present application. The drawing figures can not be to scale. Like reference numerals in different drawings can represent similar elements.

[0086] In the description of the present application, it should be noted that the terms "upper and lower, inner and outer" and the like indicate the positional or relative relationship shown in the drawings based on the positional or relative relationship shown in the drawings, and are merely for the purpose of facilitating the description of the present application and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first, second or third" are only for the purpose of description, and cannot be understood as indicating or implying relative importance.

[0087] In the present application, unless otherwise specifically defined and limited, the terms "mounting, connecting, connection" should be understood broadly, for example: it can be fixed connection, detachable connection or integral connection; it can also be mechanical connection, electrical connection or direct connection, it can also be indirectly connected through intermediate medium, or it can be the communication between two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0088] Embodiment 1

[0089] With reference to Figure 1 For the first embodiment of the present application, the embodiment provides a collaborative knowledge graph network recommendation method for fusing groups, which comprises:

[0090] Obtain user group data, user item interaction data and knowledge graph data;

[0091] Fuse the user item interaction data and the knowledge graph data as a collaborative knowledge graph through the item node;

[0092] The user group data is used to expand a user-item bipartite graph in a collaborative knowledge graph into a tripartite graph;

[0093] The nodes and relationships in the collaborative knowledge graph are embedded and represented using a knowledge graph representation method, and the group user-item tripartite graph is converted into multiple relationship subgraphs through a meta-path method;

[0094] Similarity analysis is performed on the relationship subgraphs to obtain user-to-user and item-to-item similarity expressions, and the node embedding of the collaborative knowledge graph is updated;

[0095] An improved attention mechanism based on user latent relationship inclination is used for information transmission and aggregation, and a graph neural network is modeled and learned, and the prediction results of the prediction function are used for item recommendation for users;

[0096] Further, the user group data, user-item interaction data and knowledge graph data are obtained; the user group data is the relationship between users and groups, different users have the same group, which indicates that the users have similarity, the more groups that users have in common, the higher the similarity between the users, the user-item interaction data is data composed of user behaviors such as rating, clicking and purchasing on items, the more items that users have interacted with, the higher the similarity between the users, and similarly, the more users that an item contains, the higher the similarity between the items, and the knowledge graph data is a graph data composed of items and attributes, and the graph data is a triple composed of head entity-relation-tail entity;

[0097] Further, the embedding representation needs to be negatively sampled to obtain sample data, and a negative triple is formed by replacing the head and tail entities through a sampling strategy, and the model is trained in combination with the positive triple to obtain the embedding representation of the nodes and relationships in the knowledge graph; the biased importance sampling strategy is used for the negative sampling strategy, the importance of the node is taken as a sampling probability enhancement item and a basic sampling item based on the relationship is normalized, and then added to obtain the final negative sampling probability; wherein the relationship-based sampling divides the relationship into many-to-one and many-to-many, in the many-to-one relationship, the probability of error of the triple formed by replacing the head entity is less than that of the triple formed by replacing the tail entity; similarly, in the many-to-many relationship, if the number of head entities is less than that of tail entities, the head entity is selected, and vice versa.

[0098] Further, the more edges connected to the node, the more important the node is in the graph, and the probability of being sampled should be greater, specifically, the ratio of the edges of the node to the maximum value of the edges in the graph;

[0099] Further, the weight of the obtained relationship subgraph is the ratio of the number of current node inter-path and the number of maximum node inter-path in the graph; the relationship subgraph is analyzed in U-U and I-I similarity by calculating the weight of node connection in the subgraph, and then the similarity expression is obtained by normalization and addition, and the embedding representation of the node in the collaborative knowledge graph is updated by the expression.

[0100] Embodiment 2

[0101] Referring to Figure 2 For the second embodiment of the application, the embodiment provides a collaborative knowledge graph network recommendation method fusing groups, comprising:

[0102] The user-item interaction graph and the knowledge graph have common item nodes, the user-item interaction and the knowledge graph are fused through the item nodes to obtain a collaborative knowledge graph, and then the user nodes and the user group data in the collaborative knowledge graph are fused to obtain a collaborative knowledge graph containing user group data;

[0103] The upper half of the collaborative knowledge graph is a group user-item tripartite graph, and the lower half of the collaborative knowledge graph is an item knowledge graph.

[0104] As Figure 2 As shown in the figure, the collaborative knowledge graph is divided into two bipartite graphs through the Items node, the upper half is a group user-item tripartite graph, which includes three types of Groups, Users, Items nodes and corresponding relationships r1, r2, and the lower half is an item knowledge graph, which includes two types of Items, Entities nodes and corresponding relationships r3, r4, r5, etc.

[0105] Among them, the group user-item tripartite graph is divided into two bipartite graphs through the Users node, the upper half is a group user bipartite graph, and the lower half is a user-item bipartite graph.

[0106] Through the construction of the collaborative knowledge graph, the user attributes can be better integrated into the knowledge graph, and the user data volume can be increased to realize more extensive user recommendation.

[0107] Embodiment 3

[0108] Referring to Figure 3 For the third embodiment of the application, the embodiment provides a collaborative knowledge graph network recommendation method fusing groups, comprising:

[0109] The collaborative knowledge graph is taken as input and trained by the transR knowledge graph representation method to finally obtain the embedding representation of nodes and relations. Specifically, the entity is projected into the relation space. For the head entity h and the tail entity, the projection into the r relation space satisfies the formula is the embedding representation of the relation, is the embedding representation of the head entity h in the r relation space, is the embedding representation of the tail entity t in the r relation space. As shown in the formula Figure 3 , the h entity and the t entity are in the entity space in the graph, h r and t r are respectively the representations of h and t mapped to the relation space, M r is the conversion matrix of the relation r;

[0110] The embedding representation corresponds to the following score formula during model training:

[0111]

[0112] Wherein, g is the distance between the head entity h and the tail entity t in the r relation space, and the lower the score represents the more likely the triple is true; W r is the conversion matrix of the relation r, used to convert the entity into the corresponding relation space;

[0113] The corresponding loss function of the transR knowledge graph representation method is:

[0114]

[0115] Wherein, is the loss function of the knowledge graph, and the lower the value obtained by the loss function, the better the training effect; lnσ is an activation function, which introduces a nonlinear characteristic in the network; τ represents the set of positive and negative triples, h, r, t is the positive sampling triple, and h, r, t' is the negative sampling triple.

[0116] The embedding representation needs to be negatively sampled to obtain sample data. The model is trained by replacing the head and tail entities to form negative triples and combining positive triples to obtain the embedding representation of nodes and relations in the knowledge graph. The biased importance sampling strategy is used in the negative sampling strategy. The importance of the node is taken as a sampling probability enhancement item and a relation-based basic sampling item to be normalized and then added to obtain the final negative sampling probability. The relation-based sampling divides the relation into many-to-one and many-to-many. In the many-to-one tail relation, the probability of error of the triple formed by replacing the head entity is less than that of replacing the tail entity. In the many-to-many head relation, if the number of head entities is less than that of tail entities, the head entity is selected, otherwise the tail entity is selected. The relation-based sampling probability calculation formula is:

[0117]

[0118] wherein p is the sampling probability based on the relation, R p is the average of the number of tail entities corresponding to the head entity in the relation, N p is the average of the number of head entities corresponding to the tail entity;

[0119] The sampling probability based on the relation is converted into the Bernoulli sampling form, and the calculation formula is as follows:

[0120] P{H=h}=p h (1-p) 1-h h=0,1

[0121] wherein P{H=h} is the sampling probability of the entity H or the entity h, and if h is 0, it is the head entity replacement probability, and if h is 1, it is the tail entity replacement probability;

[0122] The node-based sampling enhancement term considers that the more important the edge connected to the node is in the graph, the greater the probability of being sampled should be, and specifically, it is the ratio of the edge of the node to the maximum value of the edge in the graph;

[0123] The relation-based sampling probability and the node-based sampling probability are subjected to biased normalization and addition to obtain the biased importance sampling probability, and the calculation formula is as follows:

[0124]

[0125] wherein, is the node sampling enhancement term, and W is the enhancement parameter of the enhancement term to the sampling probability.

[0126] Embodiment 4

[0127] Referring to Figure 4 , the fourth embodiment of the application provides a group-fused collaborative knowledge graph network recommendation method, which comprises the following steps:

[0128] The group user item tripartite graph is converted into a plurality of relation subgraphs through the method of meta-path;

[0129] Further, the group user item tripartite graph is analyzed through the construction of one-hop meta-paths U-I-U, U-G-U, I-U-I and I-U-G to obtain four one-hop relation subgraphs; and two-hop meta-paths U-I-U-I-U, U-I-U-G-U, U-G-U-G-U, I-U-I-U-I and I-U-G-U-I are constructed to obtain five two-hop relation subgraphs.

[0130] wherein U, I and G respectively represent a user, an item and a group;

[0131] Further, by scanning the original three-part graph node between the meta path exists, it represents that there is a connection between the nodes in the new relationship subgraph, and the original connection is replaced by the new connection in the relationship subgraph. According to the principle that the correlation degree is weakened after multiple hops of nodes, a meta path selection strategy is designed to remove the relationship subgraph with small similarity to reduce the interference data. The meta path selection strategy is to select the two-hop meta path by probability, and the calculation formula is as follows:

[0132]

[0133] Wherein, p ab is the two-hop meta path selection probability, ∑w ab is the sum of the edge weights of the current two-hop meta path corresponding relationship subgraph, ∑∑w ab represents the sum of the edge weights of all two-hop meta paths.

[0134] In this embodiment, p ab is selected as 1 for convenience of calculation, that is, all one-hop and two-hop meta path conversion relationship subgraphs are considered when calculating the similarity expression.

[0135] As shown in Figure 4 , the upper half of the figure represents that the group user item three-part graph converts the original connection into the connection between users through the meta path U-I-U; the connection between the nodes of Users represents that there is one or more meta paths U-I-U between the nodes in the three-part graph, and the first three nodes and the last two nodes of Users have similarity, respectively. The third node and the fourth node have no similarity; the lower half of the figure represents that the group user item three-part graph converts the original connection into the connection between items through the meta path I-U-I; similarly, the second and third nodes of Items have similarity, and the first node and the fourth node have no similarity with other nodes.

[0136] Further, through the one-hop meta paths U-I-U, U-G-U, I-U-I and I-U-G, and the two-hop meta paths U-I-U-I-U, U-I-U-G-U, U-G-U-G-U, I-U-I-U-I and I-U-G-U-I, a total of nine relationship subgraphs can be obtained.

[0137] Through the meta path selection strategy, the relationship subgraph with small similarity can be removed to reduce the interference data and improve the accuracy of the data.

[0138] Embodiment 5

[0139] Referring to Figure 5 , this is the fifth embodiment of the application, which provides a collaborative knowledge graph network recommendation method fusing groups, comprising:

[0140] The improved attention mechanism based on the user potential relationship tendency is used for information transmission and aggregation, and is modeled and learned through a graph neural network;

[0141] Further, the improved attention mechanism based on the user potential relationship tendency is used for information aggregation, the improved attention mechanism includes an attention mechanism parameter item and a user relationship tendency parameter item, the influence of the user potential tendency on the node embedding during information transmission and aggregation is adjusted by configuring the weight of the relationship tendency parameter item during information propagation, and the information transmission of irrelevant neighbors is reduced, and the information transmission of neighbors preferred by the user and similar to the item is increased; specifically, the information aggregation of the neighbor of the entity h under the preference of the user u is The calculation is

[0142] The formula is

[0143]

[0144] Wherein, π(h,r,t) represents the weight of the t entity transmitted to the h entity;

[0145] π u (h,r,t) is obtained by fusing the attention mechanism formula and the user relationship tendency formula, and the weight w ur The calculation of the influence degree of the user's tendency is adjusted, and the calculation formula is

[0146] π u (h,r,t) = ((W r e t ) T tanh(W r e h +e r ))*(e u ·e r )*W ur

[0147]

[0148] Wherein, tanh represents an activation function, and a nonlinear characteristic is introduced in the function;

[0149] The attention mechanism allocates a higher score to the head entity and the tail entity that are closer in the relationship space, and then performs weighted fusion on the dot product of the user embedding and the relationship embedding to obtain a new information transmission weight and normalization, and finally obtains which neighbor nodes need to transmit more information. It should be noted that in the embodiment, w ur The value is 1.

[0150] The information aggregation is to multiply the embedding of the h entity and the information transmission The new h entity embedding representation is aggregated by an aggregation function, and the calculation formula is:

[0151]

[0152] wherein LeakyReLU is a leaky rectified linear unit function, is a new h entity embedding aggregated by an attention mechanism and user u preference, W1 represents a weight matrix that is learnable during information aggregation, represents information aggregation of the neighbor of entity h under the preference of user u.

[0153] The information propagation and aggregation need to pass through multiple layers of stacking, and the information of the local neighbor and the non-local neighbor of the h entity is aggregated; specifically, the node embedding representation obtained after aggregation of the previous layer is taken as the basic embedding representation for calculation of a new layer; in order to reduce the complexity of calculation and improve stability, only a fixed number of neighbors are sampled for each entity, and at the same time, the information propagation of irrelevant data is reduced, the number of stacked layers is 2 to 3, and only the first fixed number of neighbors with the largest connection weight are taken from the sorted connection weight of the neighbor of the node;

[0154] As shown in Figure 5 , the number of stacked layers of information propagation is 2, the number of fixed sampled neighbors is 3, the information propagation of the node is stacked in two layers, 3 neighbors with the largest connection weight are selected in each layer of stacking, the original embedding representation of the node and the information propagated from the first layer of stacking are aggregated by an aggregation function to obtain a first-order embedding representation, the first-order embedding representation of the node and the information propagated from the second layer of stacking are aggregated to obtain a second-order embedding representation, and the original embedding and the first-order and second-order embedding representations are combined to obtain the final node embedding representation;

[0155] The improved attention mechanism can reduce the information transmission of irrelevant neighbors, increase the information transmission of neighbors preferred by the user and similar to the item, so as to realize the accuracy of content recommendation of user interest.

[0156] Embodiment 6

[0157] Referring to Tables 1 to 4, a sixth embodiment of the present application provides a collaborative knowledge graph network recommendation method fusing groups, which comprises:

[0158] First, the user group data and the user item interaction data need to be obtained respectively, and the specific data table is referred to Tables 1 and 2:

[0159] Table 1 User group interaction

[0160] Group 1 Group 2 … Group g User 1 1 null … null User 2 null 1 … null User 3 1 1 … null … … … … … User u null 1 … null

[0161] Table 2 User item interaction

[0162] Item 1 Item 2 … Item i User 1 1 1 … null User 2 null 1 … null User 3 1 null … null … … … … … User u 1 1 … 1

[0163] The 1 between the user and the group in Table 1 represents that the user enters the group, different users entering the same group represent that the users have similarity, and the more common groups, the greater the similarity; similarly, the users and the users in the user-item interaction graph and the items and the items also have the same similarity, the group-user-item tripartite graph is constructed through the user group and the user item, and the similarity analysis is performed through the meta-path method, the similarity expression between the users and the items is obtained, then the knowledge graph data is obtained, the head and tail entities and the relationship are re-allocated id and constructed into a triple format, and the specific data table is referred to Table 3:

[0164] Table 3 Knowledge graph triplets

[0165] Head entity Relation Tail entity 2086 0 3846 1601 1 3847 3355 2 3848 3798 0 3849 … … … 462 34 5643

[0166] Then the group-user-item tripartite graph and the knowledge graph are combined and embedded through the transR knowledge graph representation method, the obtained embedding vectors are updated through the similarity expression, and the improved neural network method of the attention mechanism is trained to obtain the final recommendation result; in order to further verify the effect of the application, three public data sets are used for multiple comparison experiments by using the application and another five methods, and the five methods are as follows:

[0167] RippleNet: Explore multiple waves of user behavior on the knowledge graph, and recursively propagate information layer by layer;

[0168] KGCN: On the basis of NGCF, the two network architectures of nonlinear conversion and activation function which are not suitable for the recommendation system are removed, and the efficiency of the recommendation algorithm is improved on the basis of simplifying the model;

[0169] KGNN-LS: A model based on GNN, which converts the KG into a user-oriented graph, and integrates the user preference information and label smoothing when information is aggregated to generate a user-specific item representation;

[0170] KGAT: The user-item interaction and the knowledge graph are fused and alternately trained by combining the attention mechanism.

[0171] KPRN: The user-item path is directly modeled in the knowledge graph through LSTM, and then the path is aggregated for final prediction; refer to Table 4:

[0172] Table 4 Comparison of recommendation performance of different models

[0173]

[0174] As shown in Table 4, compared with the existing baseline model, the method proposed in the application has made certain progress in the indicators of recall and normalized discounted cumulative gain ndcg; on the one hand, the application fuses the relationship of the user group, enriches the data, and analyzes the group data and the user item interaction data jointly, to help improve the embedding representation capability of the nodes and relationships of the knowledge graph; on the other hand, the application fuses the user's preference for the relationship and the attention mechanism to improve the item information aggregation capability from the user's perspective, and through the sampling, meta path selection, graph fusion and information propagation method for the user specially for recommendation, the effect of the recommendation method is improved.

[0175] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not limiting. Although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application, and they should be covered in the scope of the claims of the present application.

Claims

1. A method for recommending a collaborative knowledge graph network of a fusion group, characterized in that, The method comprises the following steps: Obtain user group data, user-item interaction data and knowledge graph data; Fuse the user-item interaction data and the knowledge graph data as a collaborative knowledge graph through an item node; Fuse the user nodes and the user group data in the collaborative knowledge graph to obtain a collaborative knowledge graph containing user group data; Expand the user-item bipartite graph in the collaborative knowledge graph to a tripartite graph using the user group data; Embed and represent the nodes and relationships in the collaborative knowledge graph using a knowledge graph representation method; Train the embedding representation of the nodes and relationships in the collaborative knowledge graph using the transR knowledge graph representation method; The embedding representation needs to be negatively sampled to obtain sample data, and the negative sampling strategy is used to replace the head and tail entities to form negative triples and combine them with positive triples to train the embedding representation of the nodes and relationships in the knowledge graph; The negative sampling strategy uses a biased importance sampling strategy, which takes the importance of the nodes as a sampling probability enhancement item and normalizes the sampling item based on the relationship, and then adds them to obtain the final negative sampling probability; The relationship-based sampling divides the relationship into many-to-one and many-to-many, and in the many-to-one relationship, the probability of error of the triple formed by replacing the head entity is less than that of the triple formed by replacing the tail entity; in the many-to-many relationship, if the number of head entities is less than that of tail entities, the head entity is selected, otherwise the tail entity is selected; Convert the group user-item tripartite graph into multiple relationship subgraphs through a meta-path method; Analyze the similarity of the relationship subgraphs to obtain the similarity expressions of users to users and items to items, and update the node embedding of the collaborative knowledge graph; Use an improved attention mechanism based on the user's potential relationship tendency to perform information transmission and aggregation, and use a graph neural network model to learn and use the prediction results of a prediction function to recommend items to users. 2.The fusion group's collaborative knowledge graph network recommendation method of claim 1, wherein, The collaborative knowledge graph comprises: The upper half of the collaborative knowledge graph is a group user-item tripartite graph, and the lower half of the collaborative knowledge graph is an item knowledge graph. 3.The fusion group's collaborative knowledge graph network recommendation method of claim 2, wherein, Convert the group user-item tripartite graph into multiple relationship subgraphs through a meta-path method, which comprises: The meta-path divides the meta-path into one-hop and two-hop according to the principle that the correlation degree of the nodes decreases after multiple hops; Calculate the weight of the meta-path in the relationship subgraph. 4.The fusion group's collaborative knowledge graph network recommendation method of claim 3, wherein, Analyze the similarity of the relationship subgraphs to obtain the similarity expressions of users to users and items to items, and update the node embedding of the collaborative knowledge graph, which comprises: Obtain the similarity expressions by fusing the similarities in multiple relationship subgraphs; Update the node embedding representation in the collaborative knowledge graph according to the obtained similarity expressions.

5. The method of claim 4, wherein the fusion group of collaborative knowledge graph network recommendation method is characterized in that, Use an improved attention mechanism based on the user's potential relationship tendency to perform information transmission and aggregation, which comprises: The improved attention mechanism includes an attention mechanism parameter item and a user relationship tendency parameter item.

6. The method of claim 5, wherein the fusion group of collaborative knowledge graph network recommendation method is characterized in that, The information transmission and aggregation comprises: Adjust the influence of the user's potential tendency on the node embedding during information transmission and aggregation by configuring the weight of the user relationship tendency parameter item during information propagation.

7. The method of claim 6, wherein the fusion group of collaborative knowledge graph network recommendation method is characterized in that, The prediction function comprises: The prediction function is represented as a dot product of user embedding and item embedding and normalized, modeled and learned by a graph neural network to produce a prediction result for recommending items to users.

Citation Information

Patent Citations

  • Knowledge graph-based user group recommendation system and method

    CN112364257A

  • Group recommendation method based on mixed attention network

    CN113407864A