Recommendation system based on knowledge graph completion

By combining multi-relational graph attention network and multi-scale convolution knowledge graph completion module, the problems of heterogeneous multi-relational connection and multi-dimensional feature interaction are solved, and the accuracy of knowledge graph completion and the output quality of recommendation system are improved. .

CN119228477AActive Publication Date: 2024-12-31UNIV OF ELECTRONICS SCI & TECH OF CHINA

Patent Information

Application Number
CN202411126645.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-12-31
Estimated Expiration
2044-08-16

AI Technical Summary

Technical Problem

The existing knowledge graph completion technology fails to make full use of heterogeneous multi-relationship connections and the difficulty in extracting multi-dimensional feature interactions at the same time, resulting in unsatisfactory knowledge graph completion effect and affecting the output results of the recommendation system.

Method used

Using a knowledge graph completion module based on multi-relational graph attention network and multi-scale convolution, the importance of heterogeneous multi-relational connections is calculated through the attention mechanism, neighborhood information is aggregated and entity and relationship embedding representations are updated, and multi-scale interaction is combined with multi-scale interaction. The feature extraction layer calculates the scores of the candidate triplets and selects the highest score as the completion result.

Benefits of technology

It improves the accuracy of knowledge graph completion and the output results of the recommendation system, enhances the interpretability of the knowledge graph and the accuracy of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228477A_ABST
    Figure CN119228477A_ABST
Patent Text Reader

Abstract

The invention provides a recommendation system based on knowledge graph completion, which can output recommended commodities more accurately by constructing a knowledge graph completion module capable of fully utilizing heterogeneous multi-relation connection and simultaneously extracting multi-dimensional feature interaction, and comprises a knowledge graph construction module, a knowledge graph completion module and a commodity recommendation module. A knowledge graph completion module combining a multi-relation graph attention network and a multi-scale convolution makes up for the defects that heterogeneous multi-relation connection is not considered and multi-dimensional feature interaction is difficult to extract at the same time at present, so that a knowledge graph completion task is better completed; therefore, the recommendation system has a more complete knowledge graph during reasoning of commodity recommendation, and the accuracy of outputting recommendation results by the recommendation system is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to knowledge graph technology, and in particular to a knowledge graph completion technology combining a multi-relational graph attention network and multi-scale convolution. Background Art

[0002] In the information society, the increasing flow of information has facilitated people's lives, but it has also brought about the problem of information overload. The huge amount of information often exceeds the limits that individuals or systems can accept and process. Therefore, how to effectively filter out the information that users really need from the massive amount of information has always been a hot topic in academia and industry. Based on this, the recommendation system came into being. It mainly models user profiles and historical preferences to recommend information that is truly valuable and interesting to users. At present, the recommendation system is widely used in e-commerce, news push, streaming media platforms and other fields. The recommendation system predicts and outputs the targets that users may be interested in based on the associated products or behavior information in the user's historical data.

[0003] Knowledge graph, also known as knowledge domain visualization or knowledge domain mapping, is a series of different graphics that show the development process and structural relationship of knowledge. It uses visualization technology to describe knowledge resources and their carriers, and to mine, analyze, construct, draw and display knowledge and their interrelationships. It displays complex knowledge domains through data mining, information processing, knowledge measurement and picture drawing, revealing the dynamic development laws of knowledge domains.

[0004] The knowledge graph stores a large amount of objective facts about user behaviors or related products in the form of triples, and is widely used in recommendation systems. The data results of the triples are composed of three elements: head entity, relationship and tail entity. The head entity represents the subject, the predicate represents the subject, and the tail entity represents the object. The predicate is used to express the relationship or attribute between the subject and the object. In the recommendation system, the head entity and the tail entity can be users or user-related products. The relationship can be user behavior. In real scenarios, the amount of information of massive users is growing exponentially, and the update speed of the knowledge graph is far behind the growth of user information, resulting in the knowledge graph storing massive user information being sparse and incomplete, thus affecting the accuracy of the results output by the recommendation system.

[0005] Therefore, it is of great research significance to use knowledge graph completion technology to identify missing triples.

[0006] Existing knowledge graph completion technologies based on graph neural networks learn the feature embedding representations of entities and relationships in knowledge graphs by iteratively aggregating neighborhood structure information in knowledge graphs, so that entities and relationships can learn their local neighborhood information and the structural information of the entire knowledge graph. Methods based on graph neural networks often adopt an encoder-decoder structure, using the graph neural network structure as an encoder to generate entity relationship embedding representations that contain neighborhood information and global structure. After obtaining the updated entity relationship embedding representation, the decoder is required to score the candidate triples, calculate the loss value of the current batch training, and use backpropagation to update the training parameters of the encoder layer. The knowledge graph is completed through multiple trainings. Methods based on graph attention networks combine graph neural networks and attention mechanisms to selectively retain important information in the process of aggregating neighborhood information.

[0007] There are many behaviors between users and related products, such as clicks, comments, purchases, sharing, and adding to cart. These heterogeneous and variable relational connections can provide user information more effectively. However, the existing encoder does not take into account heterogeneous multi-relational connections when aggregating key neighborhood information, and the decoder uses only one convolutional structure, which makes it difficult to simultaneously extract the feature interactions of entity and relation embedding representations in the same dimension and different dimensions, making the knowledge graph completion model unsatisfactory and ultimately affecting the output results of the recommendation system. Summary of the invention

[0008] The technical problem to be solved by the present invention is to provide a recommendation system that more accurately outputs recommended products by constructing a knowledge graph completion module that can fully utilize heterogeneous multi-relationship connections and can simultaneously extract multi-dimensional feature interactions.

[0009] The technical solution adopted by the present invention to solve the above technical problems is a recommendation system based on knowledge graph completion, comprising:

[0010] Knowledge graph construction module: collects user information, product information, and user-related operations on products into the knowledge graph of the recommendation system in the form of triples; forms triples with user information as the head entity, user-related operations on products as the relationship, and product information as the tail entity; when there is a tail entity to be completed in the knowledge graph triple, the knowledge graph completion module is triggered, and the tail entity predicted by the knowledge graph completion module is added to the current knowledge graph to complete the completion update;

[0011] Knowledge graph completion module: Based on the currently constructed knowledge graph, candidate entities in the knowledge graph are combined with known entities and relations to form candidate triples, and then the scores of all candidate triples are calculated through the scoring function. Finally, the one with the highest score is selected as the completion result to predict the corresponding tail entity when the head entity and relationship are known; and the predicted tail entity is output to the knowledge graph construction module;

[0012] Product recommendation module: performs reasoning based on the latest knowledge graph in the knowledge graph construction module and outputs recommended products to users;

[0013] Among them, the knowledge graph completion module is an encoder-decoder structure, and the encoder includes an attention module and an aggregation module;

[0014] The attention module is used to calculate the attention score between the central entity and its neighbor entities; the central entity is the known head entity in the triple to be completed; the neighbor entity is the entity connected to the central entity through a relationship;

[0015] The aggregation module is used to aggregate the neighbor information of the central entity into the central entity according to the attention score calculated by the attention module, thereby generating an embedded representation of the central entity that integrates the neighborhood information, where the attention score controls how much of the neighbor information of the central entity is aggregated; at the same time, the embedded representation of the relationship is updated according to the learnable relationship matrix;

[0016] The decoder is used to input the embedded representation of the central entity and the relationship into the multi-scale interactive feature extraction layer to capture the interactive features and complete the feature fusion to form the fused features of the central entity and the relationship, and then calculate the similarity between the fused features and the embedded representation of the candidate tail entity to obtain the score of the candidate completion triple.

[0017] The present invention combines the knowledge graph completion of multi-relation graph attention network and multi-scale convolution to make up for the defects of existing methods that do not take into account heterogeneous multi-relation connections and difficulty in simultaneously extracting multi-dimensional feature interactions, so that it can better complete the knowledge graph completion task, and enable the recommendation system to have a more complete knowledge graph when reasoning about product recommendations.

[0018] The beneficial effect of the present invention is that it fully considers the heterogeneous multi-relation connection problem of the user data given by the recommendation system in the process of constructing the knowledge graph, calculates the importance of other users or commodities associated with the target user to the target user through the attention mechanism, and aggregates the neighborhood information according to the attention score to update the embedded representation of the target user, thereby improving the knowledge graph completion effect involving the target user and improving the interpretability of the knowledge graph on which the recommendation system is based. In the completion process, the feature interaction of the embedded representation of the target user and the operation behavior in the same and different dimensions is obtained, which further improves the effect of the knowledge graph completion model under the graph attention network structure in the recommendation system, and effectively improves the accuracy of the recommendation results output by the recommendation system. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 Flowchart of the knowledge graph completion module;

[0020] Figure 2 This is a schematic diagram of the encoder of the knowledge graph completion module of this embodiment;

[0021] Figure 3 This is a schematic diagram of the process of completing the knowledge graph in this embodiment. DETAILED DESCRIPTION

[0022] A recommendation system based on knowledge graph completion includes a knowledge graph construction module, a knowledge graph completion module, and a product recommendation module. The knowledge graph construction module and the product recommendation module respectively adopt the existing knowledge graph construction method and the knowledge graph reasoning method. The specific implementation method of the knowledge graph completion module is proposed in the present invention and will be explained in detail later.

[0023] The knowledge graph construction module is used to enter the collected user information, product information and user-related operations on products into the knowledge graph of the recommendation system in the form of triples; triples are formed with user information as the head entity, user-related operations on products as the relationship, and product information as the tail entity; when there is a tail entity to be completed in the knowledge graph triple, the knowledge graph completion module is triggered, and the tail entity predicted by the knowledge graph completion module is added to the current knowledge graph to complete the completion update; user-related operations on products include clicks, evaluations, purchases, sharing, and add-to-cart.

[0024] The knowledge graph completion module is an encoder-decoder structure, which outputs the predicted tail entity to the knowledge graph construction module based on the corresponding tail entity with the known head entity and relationship in the completion triple;

[0025] Product recommendation module: performs reasoning based on the latest knowledge graph in the knowledge graph construction module and outputs recommended products to users;

[0026] The encoder of the knowledge graph completion module includes an attention module and an aggregation module;

[0027] The attention module is used to calculate the attention score between the central entity and its neighbor entities; the central entity is the known head entity in the triple to be completed; the neighbor entity is the entity connected to the central entity through a relationship;

[0028] The aggregation module is used to aggregate the neighbor information of the central entity into the central entity according to the attention score calculated by the attention module, thereby generating an embedded representation of the central entity that integrates the neighborhood information, where the attention score controls how much of the neighbor information of the central entity is aggregated; at the same time, the embedded representation of the relationship is updated according to the learnable relationship matrix;

[0029] The decoder is used to input the embedded representation of the central entity and the relationship into the multi-scale interactive feature extraction layer to capture the interactive features and complete the feature fusion to form the fused features of the central entity and the relationship, and then calculate the similarity between the fused features and the embedded representation of the candidate tail entity to obtain the score of the candidate completion triple.

[0030] The knowledge graph completion module combines the knowledge graph completion method of multi-relation graph attention network and multi-scale convolution to make up for the defects of existing completion methods that do not take into account heterogeneous multi-relation connections and the difficulty in extracting multi-dimensional feature interactions at the same time, so that it can better complete the knowledge graph completion task. The completion implementation process is as follows:

[0031] A. Training the knowledge graph completion model:

[0032] A1. Initialize entities randomly using normal distribution and initialize relations using a linear combination of a set of basis vectors to obtain random initial embedding representations of entities and relations.

[0033] A2, the attention module calculates the attention score between the central entity and the neighboring entities of the central entity;

[0034] A3. The aggregation module aggregates the neighbor information of the central entity into the central entity according to the attention score calculated by the attention module, thereby generating an entity embedding representation that integrates the neighborhood information. The attention score controls how much of the neighbor information of the central entity is aggregated, and at the same time updates the embedding representation of the relationship according to the learnable relationship matrix.

[0035] A4. Provide the updated entity and relationship embedding representations to the decoder, pass the head entity and relationship embedding representations through the multi-scale interactive feature extraction layer, perform feature fusion on the captured interactive features, and then calculate the similarity with the tail entity embedding representation to obtain the score of the triplet;

[0036] A5. Calculate the loss value of the model through the loss function, and train the knowledge graph completion model based on the loss value through the gradient descent method to optimize the network parameters and obtain the trained completion model;

[0037] B. Perform completion tasks based on the knowledge graph completion model:

[0038] The trained knowledge graph completion model is used for the actual knowledge graph completion task. The candidate entities in the knowledge graph are combined with known entities and relations to form candidate triples. Then the scores of all candidate triples are calculated through the scoring function, and finally the one with the highest score is selected as the completion result.

[0039] Step A1 is specifically as follows:

[0040] A11. Perform Xavier normal initialization on the entities of the knowledge graph to be completed, and obtain the entity initialization embedding representation e u ;

[0041] A12. Represent the initial embedding representation of the relationship using a linear combination of a set of basis vectors to obtain the initial embedding representation of the relationship e r ;

[0042] Step A2 specifically includes:

[0043] A21. Define a learnable key matrix K for each relationship r and the query matrix Q r ;

[0044] A22, query matrix projects the embedding representation of the central entity into a query vector The key matrix transforms the embedding representation of the neighbor entity to obtain the key vector

[0045] A23. Calculate the dot product of the query vector and the key vector to get the attention coefficient e ij , and use this to get the attention score a between the entity pair of the central entity and the neighbor entity ij ;

[0046] Step A3 specifically includes:

[0047] A31. Linearly combine the embedding representation vectors of neighbor entities according to the attention scores to aggregate on the central entity to update its embedding representation

[0048] A32. Use multi-head attention to update the embedding representation of the entity and combine multiple results to output an embedding vector

[0049] A33. Add residual connections to retain the original information of the central entity and obtain the central entity embedding representation e i ′ ;

[0050] A34. Update the embedding representation of the relationship through the learnable relationship weight matrix to obtain e r ′ ;

[0051] Step A4 specifically includes:

[0052] A41. Use a one-dimensional convolution kernel to extract the same-dimensional features and obtain the same-dimensional feature vector v1;

[0053] A42. Use the three-dimensional convolution kernel to extract heterodimensional interaction features and obtain the heterodimensional feature vector v2;

[0054] A43, projecting the obtained same-dimensional and different-dimensional feature vectors to the embedding representation dimension of the original entity through a fully connected layer, and fusing them to obtain the output fused feature vector v;

[0055] A44. The fused feature vector corresponding to the head entity and the relationship is embedded in the tail entity representation e t Perform inner product to get the score of triples

[0056] Step A5 specifically includes:

[0057] A51. Map the score of the triple to the range of (0,1);

[0058] A52. Use the cross entropy loss function to train the knowledge graph completion model.

[0059] See also Figure 1 , the specific completion implementation process is as follows:

[0060] S1. Initialization of embedding representation of entities and relations in the knowledge graph to be completed:

[0061] S11. Perform Xavier normal initialization on the entities of the knowledge graph to be completed, and make the input and output obey the same normal distribution as much as possible. This can ensure that the gradient of the network is relatively stable and effectively avoid the gradient disappearance or gradient explosion.

[0062] S12. In order to over-parameterize the method, the initial embedding representation of the relationship is represented by a linear combination of a set of basis vectors, which is specifically expressed as:

[0063]

[0064] where e r is the embedding representation of the relation, let {v1,v2,…v B} is a set of basis vectors that can be learned, is the learnable scalar weight corresponding to the relationship;

[0065] S2. Attention module: Since there are heterogeneous connections between entities in the knowledge graph, that is, a central entity may be connected to the same neighbor entity through different relations, or a central entity may be connected to multiple neighbor entities through the same relation, or a central entity may be connected to multiple neighbor entities through different relations, an attention mechanism is used to calculate the attention score between each central entity and its neighbor entities. In this process, the embedded representation of all entities is input, denoted as In the first pass through the process, the input is the initialized entity embedding representation, followed by the updated entity embedding representation of the previous output, and the output is the attention score of all entities with respect to neighboring entities, where N represents the number of all entities in the knowledge graph and D represents the dimension of the entity embedding representation:

[0066] S21. First, define a learnable key matrix and query matrix for each relationship: the key matrix is ​​denoted by K r , represents the key matrix corresponding to the relationship r, where The query matrix is ​​denoted as Q r , represents the query matrix corresponding to the relation r, F is the dimension of key vector and query vector;

[0067] S22. Given a central entity and a set of neighbor entities of the entity, the query matrix projects the embedding representation of the central entity into a query vector, and the key matrix transforms the embedding representation of the neighbor entities to obtain the key vector. The calculation process is as follows:

[0068]

[0069] where e i represents the embedding representation of the central entity, e j represents the embedding representation of neighbor entities, r is the relationship between two entities, is the query vector of the central entity corresponding relation r, is the key vector of the neighbor entity correspondence r;

[0070] S23. After obtaining the query vector and the key vector, the dot product of the query vector and the key vector is calculated to obtain the attention score between the entity pair of the central entity and the neighbor entity. The attention coefficient is obtained by performing the dot product of the two vectors as follows:

[0071]

[0072] Then use the softmax function to normalize the attention coefficient to get the attention score of the entity pair, as follows:

[0073]

[0074] where a ij represents the attention score of the central entity i to the neighbor entity j, N i Represents the set of all neighbor entities of entity i.

[0075] S3, aggregation module: According to the obtained attention score, the neighbor information of the central entity is aggregated into the central entity, thereby generating an entity embedding representation that integrates the neighborhood information, and at the same time updates the embedding representation of the relationship according to the learnable relationship matrix:

[0076] S31. Linearly combine the embedding representation vectors of neighbor entities according to the attention scores to aggregate on the central entity to update its embedding representation. The process of aggregating neighborhood information is as follows:

[0077]

[0078] in is a learnable linear transformation matrix, is the aggregated central entity embedding representation;

[0079] S32. Using the multi-head attention mechanism can stabilize the convergence of parameters during training and extract richer feature information. Therefore, multi-head attention is used to update the embedding representation of the entity, and multiple results are combined to output an embedding vector, as follows:

[0080]

[0081] in represents the embedding vector generated by the Kth attention head, concat represents vector concatenation, is a learnable linear transformation matrix that transforms the concatenated vector to the original dimension;

[0082] S33, residual connection: When aggregating the information of neighbor entities, the information of the central entity itself is lost, so a residual connection is added to retain the original information of the central entity. i , the central entity embedding representation update process is as follows:

[0083]

[0084] where σ(·) is a nonlinear activation function, which is used to obtain the updated embedding representation of all entities W is the weight of the residual connection;

[0085] S34. Update the embedded representation of the relationship. The updating process is as follows:

[0086] e r ′ =e r W rel

[0087] in It is a learnable relation weight matrix that projects the relation embedding representation into the same embedding space as the entity.

[0088] The encoder principle in the above steps S2-S3 is as follows Figure 2 Shown

[0089] S4, decoder score: The updated entity and relationship embedding representations are provided to the decoder, and the embedding representations of the head entity and relationship are passed through the multi-scale interactive feature extraction layer, the captured interactive features are fused, and then the similarity is calculated with the embedding representation of the tail entity to obtain the score of the triple:

[0090] S41, same-dimensional feature extraction: embed the updated head entity obtained in S3 into representation e u and relation embedding representation e r Simply stack them together to form a two-dimensional matrix, and then use the one-dimensional convolution kernel ω1 to perform a convolution operation on the two-dimensional matrix, where Indicates the use of m convolution kernels, which are The m feature maps of the same dimension are obtained as follows:

[0091]

[0092] in is the i-th feature map of the same dimension, [e u ;e r ] indicates a simple stacking of entities and relations, * indicates a traditional convolution operation, and f(·) indicates a nonlinear activation function.

[0093] Then, m feature maps of the same dimension are concatenated to obtain feature vectors of the same dimension as follows:

[0094]

[0095] in

[0096] S42, interactive extraction of heterogeneous features: embed the head entity obtained in S3 into representation e u and relation embedding representation e r After being reshaped into three-dimensional matrices, they are cross-stacked to maximize the heterogeneous feature interactions of entity and relationship embedding representations, and convolution operations are performed using three-dimensional convolution kernels, where Indicates the use of n convolution kernels, represented as The process of obtaining n heterodimensional feature maps is as follows:

[0097]

[0098] in and They represent the three-dimensional matrices reshaped into head entity embedding and relation embedding, Represents the cross stacking operation, and the resulting feature map of the same dimension

[0099]

[0100] Concatenate n feature maps of the same dimension into feature vectors of different dimensions as follows:

[0101]

[0102] in

[0103] S43, feature fusion: The same-dimensional and different-dimensional feature vectors obtained in S41 and S42 are projected to the embedding representation dimension of the original entity through a fully connected layer, and fused to obtain the output fused feature vector as follows:

[0104] v=v1W1+v2W2

[0105] in

[0106] S44, triple scoring: The fused feature vector corresponding to the head entity and relationship calculated in S43 is combined with the tail entity embedding representation e t Perform the inner product and get the score of the triple as follows:

[0107]

[0108] S5. Calculate the loss value of the model through the loss function, and train the knowledge graph completion model based on the loss value through the gradient descent method to optimize the network parameters and obtain the trained completion model:

[0109] S51, use the sigmoid activation function to map the score of the triple obtained in S44 to the range of (0,1), intuitively indicating the possibility that the triple is true, as follows:

[0110]

[0111] where σ(·) is the sigmoid function.

[0112] S52. The model uses a 1-N scoring strategy to train the model, taking the head entity and relationship as input, and the candidate tail entity and the head entity and relationship form a candidate triple, and calculate the score of all candidate triples. The cross entropy loss function is used to train the knowledge graph completion model as follows:

[0113]

[0114] in represents the set of correct triples, represents the set of incorrect triples obtained by replacing the head and tail entities of the correct triples, y i Represents the label of the i-th sample, and the corresponding values ​​are as follows:

[0115]

[0116] S6. Use the trained knowledge graph completion model for the actual knowledge graph completion task. The candidate entities in the knowledge graph are combined with known entities and relations to form candidate triples. Then, the scores of all candidate triples are calculated through the scoring function. Finally, the highest score is selected as the completion result:

[0117] like Figure 3 As shown, for example, given a triple to be completed (h, r, ?), predict the head entity and the tail entity corresponding to the relationship, bring the candidate entity set into step S4 for triple scoring, and obtain the score set {score0, score1, ..., score m}, sort the score set and obtain the candidate triples with the highest scores as the knowledge graph completion result.

[0118] After outputting the knowledge graph completion results to the knowledge graph construction module, the system's product recommendation module performs reasoning based on the latest completed knowledge graph in the knowledge graph construction module, thereby outputting recommended products to users more accurately.

[0119] Although the present invention is described herein with reference to the embodiments of the present invention, the above embodiments are only preferred embodiments of the present invention, and the embodiments of the present invention are not limited to the above embodiments. It should be understood that those skilled in the art can design many other modifications and implementations, which will fall within the scope and spirit of the principles disclosed in this application.

Claims

1. A recommendation system based on knowledge graph completion, characterized in that: include: Knowledge graph construction module: collects user information, product information, and user-related operations on products into the knowledge graph of the recommendation system in the form of triples; A triple is formed with user information as the head entity, the user's associated operations on the product as the relationship, and the product information as the tail entity. When a tail entity to be completed appears in the knowledge graph triple, the knowledge graph completion module is triggered, and the tail entity predicted by the knowledge graph completion module is added to the current knowledge graph to complete the completion update. Knowledge graph completion module: Based on the currently constructed knowledge graph, candidate entities in the knowledge graph are combined with known entities and relations to form candidate triples, and then the scores of all candidate triples are calculated through the scoring function. Finally, the one with the highest score is selected as the completion result to predict the corresponding tail entity when the head entity and relationship are known; and the predicted tail entity is output to the knowledge graph construction module; Product recommendation module: performs reasoning based on the latest knowledge graph in the knowledge graph construction module and outputs products recommended to users; Among them, the knowledge graph completion module is an encoder-decoder structure, and the encoder includes an attention module and an aggregation module; The attention module is used to calculate the attention score between the central entity and the neighboring entities; the central entity is the known head entity in the triple to be completed; the neighboring entity is the entity connected to the central entity through a relationship; The aggregation module is used to aggregate the neighbor information of the central entity into the central entity according to the attention score calculated by the attention module, thereby generating an embedded representation of the central entity that integrates the neighborhood information, where the attention score controls how much of the neighbor information of the central entity is aggregated; at the same time, the embedded representation of the relationship is updated according to the learnable relationship matrix; The decoder is used to input the embedded representation of the central entity and the relationship into the multi-scale interactive feature extraction layer to capture the interactive features and complete the feature fusion to form the fused features of the central entity and the relationship, and then calculate the similarity between the fused features and the embedded representation of the candidate tail entity to obtain the score of the candidate completion triple.

2. The system according to claim 1, characterized in that: The aggregation module randomly initializes the embedding representation of the central entity and the embedding representation of the tail entity through normal distribution, and initializes the embedding representation of the relationship with a linear combination of a set of basis vectors.

3. The system according to claim 1, characterized in that: During the training process, the knowledge graph completion module calculates the loss value of the model through the cross entropy function, and optimizes the network parameters of the knowledge graph completion module through the gradient descent method based on the loss value.

4. The system according to claim 1, characterized in that: The specific way in which the attention module calculates the attention score between the central entity and the neighboring entities is: The attention module defines a learnable key matrix and query matrix for each relationship between the central entity and the neighbor entities; the query matrix projects the embedding representation of the central entity into a query vector, and the key matrix transforms the embedding representation of the neighbor entity to obtain the key vector; The attention module obtains the attention coefficient by calculating the dot product of the query vector and the key vector, and obtains the attention score between the central entity and the neighbor entity based on the attention coefficient.

5. The system according to claim 1, characterized in that: The specific way in which the aggregation module generates an embedded representation of the central entity that incorporates neighborhood information is as follows: The aggregation module linearly combines the embedding representation vectors of neighbor entities according to the attention scores, aggregates the linear combination on the central entity to update the embedding representation of the central entity; then uses multi-head attention to update the embedding representation of the central entity, combines the multi-head results to output an embedding vector; the embedding vector is combined with the embedding representation of the central entity with a residual connection to obtain the embedding representation of the central entity.

6. The system according to claim 1, characterized in that: The specific way in which the multi-scale interactive feature extraction layer in the decoder obtains the fusion features of the central entity and the relationship is: Use one-dimensional convolution kernel to extract same-dimensional features to obtain same-dimensional feature vectors; use three-dimensional convolution kernel to extract different-dimensional interaction features to obtain different-dimensional feature vectors; project the obtained same-dimensional and different-dimensional feature vectors to the embedding representation dimension of the central entity and relationship through a fully connected layer to fuse them to obtain fused features.

7. The system according to claim 1, characterized in that: The specific method of calculating the similarity between the fusion feature and the embedding representation of the candidate tail entity to obtain the score of the candidate completion triple is: The fused features are inner-producted with the tail entity embedding representation, and the inner-product result is used to represent the score of the triple.

Citation Information

Patent Citations

  • Recommendation system and method based on commodity knowledge graph and user social graph

    CN116308652A

  • Recommendation algorithm based on knowledge graph and neural network

    CN116955647A

  • Personalized recommendation system and method based on knowledge graph and collaborative filtering

    CN118227884A

  • Intelligent recommendation system and method based on knowledge graph

    CN118400423A

  • System and Method for Extremely Efficient Image and Pattern Recognition and Artificial Intelligence Platform

    US20220121884A1

Cited By

  • Knowledge graph completion method and system for power system

    CN119962648A

  • Knowledge graph link prediction method and device, equipment, medium and program product

    CN119990283A

  • Drainage basin pollution discharge transaction knowledge reasoning method based on TransE and Compgcn

    CN120409701A