CN114048331A - Knowledge graph recommendation method and system based on improved KGAT model - Google Patents

Knowledge graph recommendation method and system based on improved KGAT model Download PDF

Info

Publication number
CN114048331A
CN114048331A CN202111457641.6A CN202111457641A CN114048331A CN 114048331 A CN114048331 A CN 114048331A CN 202111457641 A CN202111457641 A CN 202111457641A CN 114048331 A CN114048331 A CN 114048331A
Authority
CN
China
Prior art keywords
recommendation
user
graph
knowledge
article
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202111457641.6A
Other languages
Chinese (zh)
Inventor
朱信忠
徐慧英
靳林通
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Normal University CJNU
Original Assignee
Zhejiang Normal University CJNU
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Normal University CJNU filed Critical Zhejiang Normal University CJNU
Priority to CN202111457641.6A priority Critical patent/CN114048331A/en
Publication of CN114048331A publication Critical patent/CN114048331A/en
Priority to PCT/CN2022/081055 priority patent/WO2023097929A1/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions

Abstract

The invention relates to a knowledge graph recommendation method and a knowledge graph recommendation system based on an improved KGAT model; the method comprises the following steps: constructing a domain knowledge graph; taking a user as a node of a domain knowledge graph, adding historical interaction of the user and an article as a relation edge into the knowledge graph, and constructing a collaborative knowledge graph; learning the collaborative knowledge map by adopting an improved KGAT model to obtain vectorization representation of users and articles and weight information of adjacent edges of article nodes; sequencing all the item sets to be recommended, and selecting the first N items as the item sets to be recommended for the user; generating a recommendation reason based on the sequencing result and the weight information of the adjacent edges of the article nodes corresponding to the sequencing result in the collaborative knowledge graph; when the user requests recommendation, a recommendation list is generated and returned to the user together with the item according to the recommendation reason. The invention realizes the generation of the personalized recommendation list aiming at the user and can also generate the personalized recommendation reason, thereby improving the credibility of the recommendation result.

Description

Knowledge graph recommendation method and system based on improved KGAT model
Technical Field
The invention belongs to the technical field of machine learning, and particularly relates to a knowledge graph recommendation method and system based on an improved KGAT model.
Background
The recommendation system is one of effective tools for solving the problem of information overload, and generally comprises a user portrait modeling module, an article portrait modeling module and a recommendation algorithm module, wherein the recommendation algorithm is a core module. Recommendation algorithms are generally classified into demographic-based recommendations, content-based recommendations, and collaborative filtering algorithms. The algorithm based on collaborative filtering is the most widely applied and successful algorithm because the algorithm does not depend on the characteristic data of the user or the article, and only carries out recommendation according to the historical interaction data of the user and the article, but still has the problems of data sparseness, cold start and the like.
The knowledge graph is a part of knowledge engineering technology, is a huge heterogeneous information network, and has the basic constituent elements of a triple, such as (h, r, t) representing a triple, and h, r and t respectively representing a head node, a relation and a tail node. The knowledge graph establishes a deep semantic relation among the articles, so that more associated information among the articles can be mined, the knowledge graph is applied to a recommendation system, and the problems of data sparseness, cold start and the like can be effectively relieved.
There are generally three methods of applying knowledge-maps to recommendation systems: an embedding-based approach, a path-based approach, and a hybrid approach. The embedding-based method and the path-based method have advantages and disadvantages respectively, and the hybrid method is a more efficient method by combining the former two modes. A Knowledge Graph Attention Network model (KGAT) is a Knowledge Graph embedding learning model based on a hybrid mode, and not only utilizes node information of a Graph, but also utilizes relation information of edges of the Graph, and simultaneously gives weight information of the edges based on the learning mode of Attention.
Present KGAT model, it is at first based on TransR map embedding algorithm imbeds the study to the knowledge map, and the vector space at relation r place is projected to the triplex group data to the TransR model, and this projection process can bring the noise influence to influence the model performance, in addition, the attention allocation function of current knowledge map attention network model is too simple, improves it also will promote the model performance at a certain degree.
Disclosure of Invention
In view of the above analysis, the present invention aims to disclose a knowledge-graph recommendation method and system based on an improved KGAT model, which solve the problems of the existing KGAT model and realize the generation of personalized recommendation reasons.
The invention discloses a knowledge graph recommendation method based on an improved KGAT model, which comprises the following steps:
constructing a domain knowledge graph by constructing a mode layer and a graph database of the knowledge graph;
taking a user as a node of the domain knowledge graph, adding historical interaction of the user and an article as a relation edge into the knowledge graph, and constructing a collaborative knowledge graph;
learning the collaborative knowledge map by adopting an improved KGAT model to obtain vectorization representation of users and articles and weight information of adjacent edges of article nodes; in the improved KGAT model, a three-layer MLP network is adopted as an attention distribution function to generate weight information;
sequencing all the item sets to be recommended, and selecting the first N items as the item sets to be recommended to the user finally;
generating a recommendation reason based on the sequencing result and the weight information of the adjacent edges of the article nodes corresponding to the sequencing result in the collaborative knowledge graph; and when the user requests recommendation, generating a recommendation list together with the item by the recommendation reason and returning the recommendation list to the user.
Further, in the process of learning the collaborative knowledge map by adopting an improved KGAT model,
simultaneously learning the structure information of the map and the cooperative interaction information of the user and the article in a joint learning mode by utilizing an improved KGAT model to obtain vectorized representation of the structure information of the map and the historical interaction information of the user and the article; learning based on an attention mechanism to obtain weight information of adjacent edges of the object nodes in the collaborative knowledge graph; and saving the learned vectorized representation of the user and the article and the weight information of the adjacent edges of the article nodes.
Further, the improved KGAT model comprises a map embedding learning layer, an attention propagation layer and a prediction layer;
the map embedding learning layer is used for adopting a distance-based translation model transR map embedding algorithm to learn vector representation of entity nodes of the map;
the attention propagation layer is used for carrying out information propagation, knowledge perception attention and information aggregation to obtain multilayer user node vector representation and multilayer article node vector representation;
and the prediction layer performs model prediction and optimization according to the output of the information transmission layer to obtain the characterization vectors of the user and the article.
Further, in the information dissemination layer, the three-layer MLP network as the attention allocation function is represented as:
Figure BDA0003387093490000031
where ω' (h, r, t) is the attention-assignment function; relu is a hidden layer activation function;
Figure BDA0003387093490000032
erand
Figure BDA0003387093490000033
an embedded vector in a vector space determined for the relationship r; w1、W2A trainable weight parameter matrix, an operation by bit;
deriving weights based on attention mechanism learning
Figure BDA0003387093490000034
NhIs a set of triples (h, r, t).
Further, an aggregation function for information aggregation in the information propagation layer is as follows:
Figure BDA0003387093490000035
wherein e ishAtlas inlayThe node representation learned by the entry layer,
Figure BDA0003387093490000036
represents the head node h as the weighted sum of the tail nodes connected with the head node h; wherein "" indicates a bitwise multiplication operation, W3、W4Is a trainable parameter matrix;
the node information fused with one layer of relationship is represented as:
Figure BDA0003387093490000037
through iteration, an lth layer representation for an entity is derived as:
Figure BDA0003387093490000038
wherein the content of the first and second substances,
Figure BDA0003387093490000039
Figure BDA00033870934900000310
is a representation of the tail node t generated by the previous layer information propagation step.
Further, the sorting all the item sets to be recommended includes:
1) recalling all the item sets to be recommended to obtain a candidate recommended item set of a rough sorting result;
2) loading feature vectors of the trained users and the trained articles according to the recommendation target users and the candidate article sets to be recommended, and multiplying the feature vectors of the users and the feature vectors of all the articles to be used as predicted click probabilities of the users on the articles;
3) and sorting the candidate item sets to be recommended according to the click probability from large to small, selecting the first N items as the item sets to be recommended for the user finally, and storing the item sets.
Further, when a recommendation reason is generated, according to the sorting result, the weight information of all adjacent edges of the nodes in the corresponding collaborative knowledge graph is obtained, the edge with the largest weight is selected, then a recommendation explanation is generated according to the type or the attribute of the edge, the generated recommendation reason and the corresponding article are stored together, and when a user requests recommendation, a recommendation list is generated together with the article and returned to the user.
The invention discloses a knowledge-graph recommendation system based on an improved KGAT model, which comprises the following components:
the domain knowledge graph building module is used for building and storing a mode layer of the knowledge graph; importing the acquired data layer data into a graph database after knowledge fusion;
the collaborative knowledge graph building module is used for taking a user as a node of the knowledge graph and adding historical interaction of the user and an article as an edge of a representative relationship into the knowledge graph to build the collaborative knowledge graph;
the map embedding and recommendation model training module is used for learning the collaborative knowledge map by adopting a KGAT model to obtain a set of all articles to be recommended;
the sorting module is used for sorting all the item sets to be recommended and selecting the first N items as the item sets to be recommended to the user finally;
the recommendation reason generating module is used for generating a recommendation reason based on the sequencing result and the weight information of the edges adjacent to the article nodes corresponding to the sequencing result in the collaborative knowledge graph; and storing the recommendation reason together with the corresponding article, and generating a recommendation list together with the article and returning the recommendation list to the user when the user requests recommendation.
In another aspect, the present invention discloses an electronic device, including:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the improved KGAT model-based knowledge-graph recommendation method as described above.
In another aspect, the present invention discloses a computer readable medium, on which a computer program is stored, which when executed by a processor implements the improved KGAT model-based knowledge-map recommendation method as described above.
The invention can realize at least one of the following beneficial effects:
the invention realizes the generation of the personalized recommendation list aiming at the user and can also generate the personalized recommendation reason, thereby improving the credibility of the recommendation result.
Compared with the existing KGAT model, the improved KGAT model reduces the noise influence caused by the adoption of the TransR projection process, the improved attention allocation function adopts a three-layer MLP network to replace the dot product operation of the attention allocation function in the reference model, and more accurate weight data are obtained through training. Experimental results on three common data sets demonstrate that the performance of the model is superior to the existing methods.
Drawings
The drawings are only for purposes of illustrating particular embodiments and are not to be construed as limiting the invention, wherein like reference numerals are used to designate like parts throughout.
FIG. 1 is a flow diagram of a knowledge-graph recommendation method in an embodiment of the invention;
FIG. 2 is a schematic diagram of a collaborative knowledge graph according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an improved KGAT model according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating mining of first-order connectivity information of neighboring nodes according to an embodiment of the present invention;
FIG. 5 is a block diagram illustrating the connections of the components of the knowledge-graph recommendation system in an embodiment of the invention;
FIG. 6 is a schematic block diagram of the connection of electronic device components in an embodiment of the present invention;
FIG. 7 is a block diagram of a computer-readable medium in an embodiment of the invention.
Detailed Description
The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form a part hereof, and which together with the embodiments of the invention serve to explain the principles of the invention.
Example one
The embodiment discloses a knowledge graph recommendation method based on an improved KGAT model, as shown in fig. 1, including:
s1, constructing a domain knowledge graph by constructing a mode layer and a graph database of the knowledge graph;
s2, taking the user as a node of the domain knowledge graph, adding historical interaction of the user and the article as a relation edge into the knowledge graph, and constructing a collaborative knowledge graph;
step S3, learning the collaborative knowledge map by adopting an improved KGAT model to obtain vectorization representation of users and articles and weight information of adjacent edges of article nodes; in the improved KGAT model, a three-layer MLP network is adopted as an attention distribution function to generate weight information;
s4, sequencing all the item sets to be recommended, and selecting the first N items as the item sets to be recommended to the user finally;
step S5, generating a recommendation reason based on the sequencing result and the weight information of the adjacent edges of the article nodes corresponding to the sequencing result in the collaborative knowledge graph; and when the user requests recommendation, generating a recommendation list together with the item by the recommendation reason and returning the recommendation list to the user.
Specifically, in step S1, a top-down construction method is adopted, and a knowledge graph pattern layer body framework is first constructed and stored. Then acquiring data layer data from a structured or unstructured data source, and storing the data layer data into a graph database after knowledge fusion; the data source is actually acquired data existing in reality.
Specifically, in step S2, the constructed collaborative knowledge map is mainly served by the improved KGAT model in this embodiment, and is used to learn the characteristics of the articles and the associated characteristics of the articles in the knowledge map, and learn the user characteristics at the same time, so that the collaborative filtering idea can be applied to recommendation. The structure of the collaborative knowledge graph is schematically shown in FIG. 2. The construction method comprises the steps of firstly using a user as a node of a knowledge graph, and then adding historical interaction of the user and an article into the knowledge graph as an edge of a representative relationship. The construction of the collaborative knowledge graph does not change the domain knowledge graph structure in step S1, but only adds the historical interaction data of the user and the article to the graph data saved in the form of the triplet (h, r, t) in the domain knowledge graph-derived data file referred to in module 1.
Not generally, taking a movie recommendation as an example, the items 1, 2, 3, 4 in FIG. 2 may be names of movies, and the entities 1, 2, 3 may be names of stars, where the relationship r1To interact, r2For director, r3Is a lead actor.
Specifically, in the step S3, in learning the collaborative knowledge map by using the improved KGAT model, the improved KGAT model is used to simultaneously learn the structure information of the map and the collaborative interaction information of the user and the article in a joint learning manner, so as to obtain vectorized representation of the map structure information and the historical interaction information of the user and the article; learning based on an attention mechanism to obtain weight information of adjacent edges of the object nodes in the collaborative knowledge graph; and saving the learned vectorized representation of the user and the article and the weight information of the adjacent edges of the article nodes.
The structure of the improved KGAT model is schematically shown in FIG. 3, and comprises a map embedding learning layer, an attention propagation layer and a prediction layer;
the map embedding learning layer is used for adopting a distance-based translation model transR map embedding algorithm to learn vector representation of entity nodes of the map;
the attention propagation layer is used for carrying out information propagation, knowledge perception attention and information aggregation to obtain multilayer user node vector representation and multilayer article node vector representation;
and the prediction layer performs model prediction and optimization according to the output of the information transmission layer to obtain the characterization vectors of the user and the article.
The specific implementation process of the model is as follows:
1) map embedding layer:
learning vector representation of entity nodes of the graph by adopting a distance-based translation model transR graph embedding algorithm, and assuming that the triples (h, r, t) are in the close stateThe embedded vector representations in the vector space determined by the system r are respectively
Figure BDA0003387093490000081
erAnd
Figure BDA0003387093490000082
then they have the relationship:
Figure BDA0003387093490000083
let WrIs a projection matrix, then there is a distance formula between the three:
Figure BDA0003387093490000084
wherein | | | purple hair2Is a norm of L2 and,
Figure BDA0003387093490000085
Wr∈Rk×dis a trainable parameter transformation matrix; e.g. of the typeh、et∈Rd,er∈Rk,eh、etIs a d-dimensional embedded vector representation of entity h, entity t, and er is a k-dimensional embedded vector representation of relationship r.
Then a loss function is established based on the distance:
LKG=∑(h,r,t,t′)∈T-lnδ(g(h,r,t′)-g(h,r,t));
wherein
Figure BDA0003387093490000086
g (h, r, t') is a negative sample, δ is a sigmoid function, and ln is a natural logarithm.
2) An information propagation layer:
and mining the first-order connected information adjacent to the nodes in a graph convolution mode, and then recursively mining the higher-order connected information. As shown in fig. 4, to mine the first order connectivity information of neighboring nodes, the head node h can be represented as a weighted sum of the tail nodes connected thereto:
Figure BDA0003387093490000087
where ω (h, r, t) is the weight of the relation r, etIs an embedded vector learned based on TransR in the previous layer,
Figure BDA0003387093490000088
is a weighted summed node representation, distinct from a graph-embedded representation vector e of a head node learned based on TransRh. The weight ω (h, r, t) is obtained based on attention mechanism learning.
Preferably, the attention-sharing function employs a three-layer MLP network. The three-layer MLP network as a function of attention allocation is represented as
Figure BDA0003387093490000089
Wherein relu is a hidden layer activation function;
Figure BDA00033870934900000810
i.e. et,ehMapping in vector space where the relation r is located, respectively.
Figure BDA00033870934900000811
Is an approximate representation of the tail node in the vector space of the relation r
Figure BDA00033870934900000812
W1、W2An element of a trainable weight parameter matrix indicates a bitwise multiplication operation. Then, performing normalization processing by adopting a softmax function:
weight of relation r
Figure BDA0003387093490000091
Will be provided with
Figure BDA0003387093490000092
Node representation e learned with graph embedding layerhAnd performing information aggregation, wherein an aggregation function is as follows:
Figure BDA0003387093490000093
Figure BDA0003387093490000094
indicating that a node information representation fused with a one-layer relationship, wherein "" indicates a bitwise multiplication operation, W3、W4Is a matrix of trainable parameters.
Repeating the steps, and iterating to obtain the L-th layer representation e related to the entity(l)
Figure BDA0003387093490000095
Wherein
Figure BDA0003387093490000096
Figure BDA0003387093490000097
Is a representation of the tail node t generated by the previous layer information propagation step, NhIs a set of triples (h, r, t).
3) Prediction layer:
representing the obtained multi-layer user node vector
Figure BDA0003387093490000098
And multi-layer article node vector representation
Figure BDA0003387093490000099
Multiplying to obtain a predicted score
Figure BDA00033870934900000910
The multi-layer vector representation of the user and the article node is to connect vector representations of different layers, namely:
Figure BDA00033870934900000911
the final pre-measured score was:
Figure BDA00033870934900000912
the final loss function is the synergistic loss L of user interaction with the objectCFLoss of spectrum L of the first layerKGAnd then adding a parameter regularization term:
Figure BDA00033870934900000913
collaborative loss L of user interaction with an itemCFIs defined as:
Figure BDA00033870934900000914
wherein O { (u, i, j) | (u, i) ∈ R+,(u,j)∈R-},R+As a positive example, R-For negative example samples, δ is the sigmoid function.
Specifically, in step S4, the sorting all the item sets to be recommended includes:
1) recalling all the item sets to be recommended to obtain a candidate recommended item set of a rough sorting result;
the recalling adopts a recalling algorithm based on articles, collaborative filtering, hot statistics and the like, and the candidate to-be-recommended article set obtained by recalling is a set which is much smaller than all the article sets to be recommended.
2) Loading feature vectors of the trained users and the trained articles according to the recommendation target users and the candidate article sets to be recommended, and multiplying the feature vectors of the users and the feature vectors of all the articles to be used as predicted click probabilities of the users on the articles;
3) and sorting the candidate item sets to be recommended according to the click probability from large to small, selecting the first N items as the item sets to be recommended for the user finally, and storing the item sets.
Specifically, in step S5, the weight information of the edges adjacent to the item node corresponding to the sorting result in the knowledge graph obtained by the model training in step S3 is based on the sorting result in step S4.
More specifically, according to the sorting result, the weight information of all adjacent edges of the nodes in the corresponding knowledge graph is obtained, the edge with the largest weight is selected, then a recommendation explanation is generated according to the type or the attribute of the edge, the generated recommendation reason and the corresponding article are stored together, and when the user requests recommendation, a recommendation list is generated together with the article and returned to the user.
In conclusion, the embodiment realizes that the personalized recommendation list is generated for the user, and meanwhile, the personalized recommendation reason can also be generated, so that the credibility of the recommendation result is improved.
Compared with the existing KGAT model, the improved KGAT model reduces the noise influence caused by the adoption of the TransR projection process, the improved attention allocation function adopts a three-layer MLP network to replace the dot product operation of the attention allocation function in the reference model, and more accurate weight data are obtained through training. Experimental results on three common data sets demonstrate that the performance of the model is superior to the existing methods.
Example two
The embodiment discloses a knowledge-graph recommendation system based on an improved KGAT model, as shown in fig. 5, including:
the domain knowledge graph building module is used for building and storing a mode layer of the knowledge graph; importing the acquired data layer data into a graph database after knowledge fusion;
the collaborative knowledge graph building module is used for taking a user as a node of the knowledge graph and adding historical interaction of the user and an article as an edge of a representative relationship into the knowledge graph to build the collaborative knowledge graph;
the map embedding and recommendation model training module is used for learning the collaborative knowledge map by adopting a KGAT model to obtain a set of all articles to be recommended;
the sorting module is used for sorting all the item sets to be recommended and selecting the first N items as the item sets to be recommended to the user finally;
the recommendation reason generating module is used for generating a recommendation reason based on the sequencing result and the weight information of the edges adjacent to the article nodes corresponding to the sequencing result in the collaborative knowledge graph; and storing the recommendation reason together with the corresponding article, and generating a recommendation list together with the article and returning the recommendation list to the user when the user requests recommendation.
The specific technical details and advantageous effects in this embodiment are the same as those in the first embodiment, and please refer to the first embodiment, which is not repeated herein.
EXAMPLE III
This example demonstrates the effectiveness of the improved knowledge-graph proposed by the present invention in comparison to existing methods across multiple data sets.
1. Data set
Three data sets of Amazon-book, LastFM and Yelp2018 are selected in the experiment, and the description of the relevant data sets is shown in Table 1:
TABLE 1
Figure BDA0003387093490000111
Figure BDA0003387093490000121
2. Evaluation index
In the embodiment, three model evaluation indexes of accuracy (accuracycacy), precision (precision) and recall (call) are selected. In the test data set, in combination with the prediction result, the recommended definition that is also interesting to the user is TP, the recommended definition that is not interesting to the user is FP, the non-recommended definition that is not interesting to the user is FN, and the non-recommended definition that is not interesting to the user is TN. The above concepts may be described as a confusion matrix, as in table 2 below.
TABLE 2
Of interest to the user (obverse type) The user is not interested (negative type)
Is recommended to TP FP
Is not recommended FN TN
The accuracy rate represents the proportion of all the items which are recommended and are not interested by the user to the total number of samples, namely:
Figure BDA0003387093490000122
the precision rate is also called precision rate, and represents the proportion of the recommended items of interest to all the recommended items, namely:
Figure BDA0003387093490000123
the recall rate is also called recall rate, and represents the proportion of the recommended user interest items to all the user interest items, namely:
Figure BDA0003387093490000124
3. learning process
In learning, the data set is divided according to a ratio of 2:8, wherein 20% of the data set is used as a verification data set, 80% of the data set is used as a training set, the size of an embedded vector is set to 64, the batch processing size is set to 1024, the learning rate range is adjusted to be 0.1-0.001, and the regularization parameter coefficient is initialized to be 0. In the process of the embodiment, after the model of the embodiment is iterated for 100 times, the accuracy of the model reaches the best.
4. Comparison results
The present invention compares The results on three Data sets with The results shown in The database of The invention for evaluation of Data in The database of evaluation of Data in evaluation of, the performance of the improved knowledge graph attention network model provided by the invention is obviously superior to that of a comparison method.
TABLE 3
Figure BDA0003387093490000131
Example four
The present embodiment discloses an electronic device, and its block diagram is shown in fig. 6, and the electronic device 900 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As in fig. 6, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 that connects the various system components (including the storage unit 620 and the processing unit 610), a display unit 640, and the like.
The storage unit stores a program code, which can be executed by the processing unit 610, so that the processing unit 610 executes the improved KGAT model-based knowledge-graph recommendation method according to the first embodiment.
The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)6201 and/or a cache memory unit 6202, and may further include a read-only memory unit (ROM) 6203.
The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
EXAMPLE five
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware.
Therefore, as shown in fig. 7, the technical solution according to the embodiment of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiment of the present invention.
The software product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The computer readable medium carries one or more programs which, when executed by the apparatus, implement the improved KGAT model-based knowledge-graph recommendation method as described in embodiment one.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention.

Claims (10)

1. A knowledge graph recommendation method based on an improved KGAT model is characterized by comprising the following steps:
constructing a domain knowledge graph by constructing a mode layer and a graph database of the knowledge graph;
taking a user as a node of the domain knowledge graph, adding historical interaction of the user and an article as a relation edge into the knowledge graph, and constructing a collaborative knowledge graph;
learning the collaborative knowledge map by adopting an improved KGAT model to obtain vectorization representation of users and articles and weight information of adjacent edges of article nodes; in the improved KGAT model, a three-layer MLP network is adopted as an attention distribution function to generate weight information;
sequencing all the item sets to be recommended, and selecting the first N items as the item sets to be recommended to the user finally;
generating a recommendation reason based on the sequencing result and the weight information of the adjacent edges of the article nodes corresponding to the sequencing result in the collaborative knowledge graph; and when the user requests recommendation, generating a recommendation list together with the item by the recommendation reason and returning the recommendation list to the user.
2. The knowledge-graph recommendation method according to claim 1, wherein in learning the collaborative knowledge-graph using an improved KGAT model,
simultaneously learning the structure information of the map and the cooperative interaction information of the user and the article in a joint learning mode by utilizing an improved KGAT model to obtain vectorized representation of the structure information of the map and the historical interaction information of the user and the article; learning based on an attention mechanism to obtain weight information of adjacent edges of the object nodes in the collaborative knowledge graph; and saving the learned vectorized representation of the user and the article and the weight information of the adjacent edges of the article nodes.
3. The knowledge-graph recommendation method according to claim 2, wherein said modified KGAT model comprises a graph embedding learning layer, an attention propagation layer and a prediction layer;
the map embedding learning layer is used for adopting a distance-based translation model transR map embedding algorithm to learn vector representation of entity nodes of the map;
the attention propagation layer is used for carrying out information propagation, knowledge perception attention and information aggregation to obtain multilayer user node vector representation and multilayer article node vector representation;
and the prediction layer performs model prediction and optimization according to the output of the information transmission layer to obtain the characterization vectors of the user and the article.
4. The knowledge-graph recommendation method according to claim 3, wherein, in the information dissemination layer, the three-layer MLP network as the attention allocation function is represented as:
Figure FDA0003387093480000021
where ω' (h, r, t) is the attention-assignment function; relu is a hidden layer activation function;
Figure FDA0003387093480000022
erand
Figure FDA0003387093480000023
an embedded vector in a vector space determined for the relationship r; w1、W2A trainable weight parameter matrix, an operation by bit;
deriving weights based on attention mechanism learning
Figure FDA0003387093480000024
NhIs a set of triples (h, r, t).
5. The knowledge-graph recommendation method of claim 4, wherein the aggregation function for information aggregation in the information dissemination layer is as follows:
Figure FDA0003387093480000025
wherein e ishThe node representations learned by the graph embedding layer,
Figure FDA0003387093480000026
represents the head node h as the weighted sum of the tail nodes connected with the head node h; w3、W4Is a trainable parameter matrix;
the node information fused with one layer of relationship is represented as:
Figure FDA0003387093480000027
through iteration, an lth layer representation for an entity is derived as:
Figure FDA0003387093480000028
wherein the content of the first and second substances,
Figure FDA0003387093480000029
Figure FDA00033870934800000210
is a representation of the tail node t generated by the previous layer information propagation step.
6. The knowledge-graph recommendation method of claim 1,
the sorting of all the item sets to be recommended includes:
1) recalling all the item sets to be recommended to obtain a candidate recommended item set of a rough sorting result;
2) loading feature vectors of the trained users and the trained articles according to the recommendation target users and the candidate article sets to be recommended, and multiplying the feature vectors of the users and the feature vectors of all the articles to be used as predicted click probabilities of the users on the articles;
3) and sorting the candidate item sets to be recommended according to the click probability from large to small, selecting the first N items as the item sets to be recommended for the user finally, and storing the item sets.
7. The knowledge graph recommendation method according to claim 1, wherein when a recommendation reason is generated, according to a sorting result, weight information of all adjacent edges of nodes in the corresponding collaborative knowledge graph is obtained, an edge with the largest weight is selected, then a recommendation explanation is generated according to the type or attribute of the edge, the generated recommendation reason is stored together with the corresponding article, and when a user requests recommendation, a recommendation list is generated together with the article and returned to the user.
8. A knowledge-graph recommendation system based on an improved KGAT model is characterized by comprising:
the domain knowledge graph building module is used for building and storing a mode layer of the knowledge graph; importing the acquired data layer data into a graph database after knowledge fusion;
the collaborative knowledge graph building module is used for taking a user as a node of the knowledge graph and adding historical interaction of the user and an article as an edge of a representative relationship into the knowledge graph to build the collaborative knowledge graph;
the map embedding and recommendation model training module is used for learning the collaborative knowledge map by adopting a KGAT model to obtain a set of all articles to be recommended;
the sorting module is used for sorting all the item sets to be recommended and selecting the first N items as the item sets to be recommended to the user finally;
the recommendation reason generating module is used for generating a recommendation reason based on the sequencing result and the weight information of the edges adjacent to the article nodes corresponding to the sequencing result in the collaborative knowledge graph; and storing the recommendation reason together with the corresponding article, and generating a recommendation list together with the article and returning the recommendation list to the user when the user requests recommendation.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the improved KGAT model-based knowledge-graph recommendation method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, implements the improved KGAT model-based knowledge-graph recommendation method according to any one of claims 1 to 7.
CN202111457641.6A 2021-12-01 2021-12-01 Knowledge graph recommendation method and system based on improved KGAT model Withdrawn CN114048331A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111457641.6A CN114048331A (en) 2021-12-01 2021-12-01 Knowledge graph recommendation method and system based on improved KGAT model
PCT/CN2022/081055 WO2023097929A1 (en) 2021-12-01 2022-03-16 Knowledge graph recommendation method and system based on improved kgat model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111457641.6A CN114048331A (en) 2021-12-01 2021-12-01 Knowledge graph recommendation method and system based on improved KGAT model

Publications (1)

Publication Number Publication Date
CN114048331A true CN114048331A (en) 2022-02-15

Family

ID=80212007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111457641.6A Withdrawn CN114048331A (en) 2021-12-01 2021-12-01 Knowledge graph recommendation method and system based on improved KGAT model

Country Status (2)

Country Link
CN (1) CN114048331A (en)
WO (1) WO2023097929A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115221413A (en) * 2022-08-03 2022-10-21 湖北工业大学 Sequence recommendation method and system based on interactive graph attention network
CN115934990A (en) * 2022-10-24 2023-04-07 北京数慧时空信息技术有限公司 Remote sensing image recommendation method based on content understanding
WO2023097929A1 (en) * 2021-12-01 2023-06-08 浙江师范大学 Knowledge graph recommendation method and system based on improved kgat model
CN117252664A (en) * 2023-11-10 2023-12-19 浙江口碑网络技术有限公司 Medicine recommendation reason generation method, device, medium and equipment
CN117290611A (en) * 2023-11-24 2023-12-26 北京信立方科技发展股份有限公司 Instrument recommendation method and device based on multi-level knowledge graph

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116541538B (en) * 2023-07-06 2023-09-01 广东信聚丰科技股份有限公司 Intelligent learning knowledge point mining method and system based on big data
CN117033775B (en) * 2023-07-28 2024-03-19 广东工业大学 Knowledge graph-based industrial software component recommendation method and system
CN117056575B (en) * 2023-10-12 2024-01-30 深圳市华图测控系统有限公司 Method for data acquisition based on intelligent book recommendation system
CN117216417B (en) * 2023-11-07 2024-02-20 北京智谱华章科技有限公司 Recommendation method, device, equipment and medium for fusing knowledge information and collaborative information
CN117539996A (en) * 2023-11-21 2024-02-09 北京拓医医疗科技服务有限公司 Consultation question-answering method and system based on user portrait
CN117688247B (en) * 2024-01-31 2024-04-12 云南大学 Recommendation method, terminal device and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190266497A1 (en) * 2018-02-23 2019-08-29 Microsoft Technology Licensing, Llc Knowledge-graph-driven recommendation of career path transitions
CN112199508B (en) * 2020-08-10 2024-01-19 淮阴工学院 Parameter self-adaptive agricultural knowledge graph recommendation method based on remote supervision
CN113158033A (en) * 2021-03-19 2021-07-23 浙江工业大学 Collaborative recommendation model construction method based on knowledge graph preference propagation
CN114048331A (en) * 2021-12-01 2022-02-15 浙江师范大学 Knowledge graph recommendation method and system based on improved KGAT model

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023097929A1 (en) * 2021-12-01 2023-06-08 浙江师范大学 Knowledge graph recommendation method and system based on improved kgat model
CN115221413A (en) * 2022-08-03 2022-10-21 湖北工业大学 Sequence recommendation method and system based on interactive graph attention network
CN115934990A (en) * 2022-10-24 2023-04-07 北京数慧时空信息技术有限公司 Remote sensing image recommendation method based on content understanding
CN117252664A (en) * 2023-11-10 2023-12-19 浙江口碑网络技术有限公司 Medicine recommendation reason generation method, device, medium and equipment
CN117290611A (en) * 2023-11-24 2023-12-26 北京信立方科技发展股份有限公司 Instrument recommendation method and device based on multi-level knowledge graph
CN117290611B (en) * 2023-11-24 2024-02-23 北京信立方科技发展股份有限公司 Instrument recommendation method and device based on multi-level knowledge graph

Also Published As

Publication number Publication date
WO2023097929A1 (en) 2023-06-08

Similar Documents

Publication Publication Date Title
CN114048331A (en) Knowledge graph recommendation method and system based on improved KGAT model
CN110796190B (en) Exponential modeling with deep learning features
CN112529168B (en) GCN-based attribute multilayer network representation learning method
WO2023000574A1 (en) Model training method, apparatus and device, and readable storage medium
TWI612488B (en) Computer device and method for predicting market demand of commodities
Lu et al. Machine learning for synthetic data generation: a review
CN113535984B (en) Knowledge graph relation prediction method and device based on attention mechanism
Luo et al. Online learning of interpretable word embeddings
CA3053531A1 (en) Method and apparatus of machine learning using a network with software agents at the network nodes and then ranking network nodes
CN109766557B (en) Emotion analysis method and device, storage medium and terminal equipment
CN112861936B (en) Graph node classification method and device based on graph neural network knowledge distillation
WO2021034932A1 (en) Automated path-based recommendation for risk mitigation
Lee et al. Streamlined mean field variational Bayes for longitudinal and multilevel data analysis
CN112905801A (en) Event map-based travel prediction method, system, device and storage medium
Seya et al. A comparison of residential apartment rent price predictions using a large data set: Kriging versus deep neural network
CN112131261A (en) Community query method and device based on community network and computer equipment
CN115879508A (en) Data processing method and related device
CN112055038B (en) Method for generating click rate estimation model and method for predicting click probability
CN111178986A (en) User-commodity preference prediction method and system
Liu et al. Deep learning and collaborative filtering-based methods for students’ performance prediction and course recommendation
Zhang et al. Efficient history matching with dimensionality reduction methods for reservoir simulations
Zekić-Sušac et al. Modeling the cost of energy in public sector buildings by linear regression and deep learning
CN112069404A (en) Commodity information display method, device, equipment and storage medium
CN116208399A (en) Network malicious behavior detection method and device based on metagraph
CN115344794A (en) Scenic spot recommendation method based on knowledge map semantic embedding

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information

Inventor after: Xu Huiying

Inventor after: Zhu Xinzhong

Inventor after: Jin Lintong

Inventor before: Zhu Xinzhong

Inventor before: Xu Huiying

Inventor before: Jin Lintong

CB03 Change of inventor or designer information
WW01 Invention patent application withdrawn after publication

Application publication date: 20220215

WW01 Invention patent application withdrawn after publication