CN111651613A - Knowledge graph embedding-based dynamic recommendation method and system - Google Patents

Knowledge graph embedding-based dynamic recommendation method and system Download PDF

Info

Publication number
CN111651613A
CN111651613A CN202010649393.4A CN202010649393A CN111651613A CN 111651613 A CN111651613 A CN 111651613A CN 202010649393 A CN202010649393 A CN 202010649393A CN 111651613 A CN111651613 A CN 111651613A
Authority
CN
China
Prior art keywords
fact
query
graph
embedding
knowledge
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.)
Granted
Application number
CN202010649393.4A
Other languages
Chinese (zh)
Other versions
CN111651613B (en
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.)
Hainan University
Original Assignee
Hainan University
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 Hainan University filed Critical Hainan University
Priority to CN202010649393.4A priority Critical patent/CN111651613B/en
Publication of CN111651613A publication Critical patent/CN111651613A/en
Application granted granted Critical
Publication of CN111651613B publication Critical patent/CN111651613B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Abstract

The invention discloses a knowledge graph embedding-based dynamic recommendation method and system. The method comprises the following steps: receiving input query facts, searching whether the query facts exist in a knowledge graph, if the query facts exist, directly outputting a recommendation result, and if the query facts do not exist, updating the knowledge graph and then outputting the recommendation result; and updating the knowledge graph by adopting a dynamic knowledge graph embedding method combining a graph convolution neural network and an ANALOGY model. The invention can reduce the redundant learning process of the knowledge graph, so that the whole knowledge graph can be rapidly updated every time the user updates data or has new tendency and preference, and the reliability and the stability of the whole dynamic recommendation are greatly improved.

Description

Knowledge graph embedding-based dynamic recommendation method and system
Technical Field
The invention belongs to the technical field of information processing, and particularly relates to a dynamic recommendation method and system based on knowledge graph embedding.
Background
Knowledge maps are useful for recommendation systems, and research on knowledge maps for prediction and recommendation is mainly focused on methods for embedding knowledge maps. Knowledge-graph embedding can convert a complex heterogeneous directed graph into a low-dimensional vector or linear transformation which conforms to certain characteristics. The conventional methods can be generally classified into a translation distance method, a matching semantic method and a neural network method. The knowledge-graph embedding algorithm used in the conventional recommendation system has the following two disadvantages.
(1) Because the whole knowledge graph needs to be learnt and embedded again each time the knowledge graph is embedded, in practical use, the recommendation system inevitably needs to update the data of the user in real time and dynamically, while the traditional method is obviously very tedious and inefficient for dynamic updating, and the experience of the user and the effectiveness of the whole recommendation system are greatly influenced by re-embedding the whole knowledge graph for each updating.
(2) For some data with clear rules and less data quantity, the embedding of the knowledge graph which lacks a large amount of data learning lacks accuracy, and the judgment of the light rate and the error is often made, so that the existing knowledge can not be effectively utilized, and the experience of a user on a recommendation system is influenced.
Disclosure of Invention
Aiming at least one defect or improvement requirement in the prior art, the invention provides a dynamic recommendation method, a system and a storage medium based on knowledge graph embedding, which can reduce the redundant learning process of the knowledge graph, ensure that a user can rapidly update the whole knowledge graph each time data is updated or new tendency and preference are generated, and greatly improve the reliability and stability of the whole dynamic recommendation.
To achieve the above object, according to a first aspect of the present invention, there is provided a dynamic recommendation method based on knowledge-graph embedding, including the steps of:
receiving input query facts, searching whether the query facts exist in a knowledge graph, if the query facts exist, directly outputting a recommendation result, and if the query facts do not exist, updating the knowledge graph and then outputting the recommendation result;
wherein the updating the knowledge-graph is implemented as follows:
obtaining other facts affected by the query fact;
respectively acquiring the associated subgraph of the query fact and the associated subgraphs of the other facts;
inputting the associated subgraph of the query fact and the associated subgraph of the other fact into a graph convolution neural network to output the embedded vector of the associated subgraph of the query fact and the embedded vector of the associated subgraph of the other fact respectively;
combining the original embedding vector of the query fact with the embedding vector of the associated sub-graph of the query fact, obtaining a context embedding vector of the query fact, combining the original embedding vector of the other fact with the embedding vector of the associated sub-graph of the other fact, obtaining the context embedding vector of the other fact, and storing the original embedding vector of the query fact, the original embedding vector of the other fact, the embedding vector of the associated sub-graph of the query fact, the embedding vector of the associated sub-graph of the other fact, the context embedding vector of the query fact and the context embedding vector of the other fact in the knowledge graph.
Preferably, the dynamic recommendation method further comprises the steps of: logic rules are predefined in advance, logic reasoning is carried out on the query facts based on the logic rules, and recommendation results are output.
Preferably, the dynamic recommendation method further comprises the steps of: and pre-training the convolution neural network, wherein the parameters of the convolution neural network are kept unchanged in the process of updating the knowledge graph.
Preferably, the relationships in the knowledge-graph are modeled using a linear transformation matrix or a distance model.
Preferably, the logically inferring the query fact based on the logical rule comprises:
judging the data type of the query fact, if the query fact is composite data, decomposing the query fact, then preprocessing the decomposed data, and if the query fact is atomic data, directly preprocessing the query fact;
performing unified filtering on the preprocessed data based on the logic rule, and outputting a replacement information subset;
and replacing the query fact according to the replacement information subset, and outputting a recommendation result.
Preferably, if the logic rule is a rule including a condition and a conclusion, before the unification filtering, the condition and the conclusion are separated from the logic rule, the conclusion and the preprocessed data are first unified and filtered, and if the matching is successful, the condition and the preprocessed data are unified and filtered.
Preferably, the preprocessing is renaming variables in the query fact to prevent variable name conflicts.
Preferably, the dynamic recommendation method further comprises the steps of: updating the knowledge-graph and the logic rules with the output recommendation results.
According to a second aspect of the present invention, there is provided a knowledge-graph-embedding-based dynamic recommendation system, comprising:
the query module is used for receiving input query facts, searching whether the query facts exist in a knowledge graph, if the query facts exist, directly outputting a recommendation result, and if the query facts do not exist, updating the knowledge graph and then outputting the recommendation result;
a knowledge graph embedding module for updating the knowledge graph;
wherein the knowledge-graph embedding module comprises:
the other fact acquisition module is used for acquiring other facts influenced by the query fact;
the associated subgraph acquisition module is used for respectively acquiring the associated subgraph of the query fact and the associated subgraphs of the other facts;
a graph convolution neural network for inputting the associated subgraph of the query fact and the associated subgraph of the other fact into the graph convolution neural network respectively to output the embedded vector of the associated subgraph of the query fact and the embedded vector of the associated subgraph of the other fact respectively;
an updating module, configured to combine the original embedding vector of the query fact with the embedding vector of the associated sub-graph of the query fact, obtain a context embedding vector of the query fact, combine the original embedding vector of the other fact with the embedding vector of the associated sub-graph of the other fact, obtain the context embedding vector of the other fact, and store the original embedding vector of the query fact, the original embedding vector of the other fact, the embedding vector of the associated sub-graph of the query fact, the embedding vector of the associated sub-graph of the other fact, the context embedding vector of the query fact, and the context embedding vector of the other fact in the knowledge-graph.
Compared with the prior art, the invention has the following beneficial effects:
(1) and the method of using the ANALOGY model and the graph convolution neural network is combined, so that the redundant learning process of the whole knowledge graph is reduced. The dynamic embedding method combining the ANALOGY model and the graph convolution neural network greatly reduces the complexity of embedding, modeling and using the whole recommendation system and the knowledge graph from two different levels and angles. The ANALOGY model reduces the learning complexity from the perspective of relational modeling, and the graph convolution neural network reduces the learning cost from the perspective of a learning mode.
(2) And the functions of the dynamic recommendation system are expanded by fusing logical programming and reasoning methods. The logic module is integrated into the recommendation system, so that the efficiency, reliability and stability of the recommendation system during recommendation can be greatly improved, the establishing and inputting processes of the knowledge map can be greatly simplified, a large number of facts meeting the rules can be constructed through a plurality of simple logic rules, and more selection and promotion spaces are provided for the dynamic recommendation system. And because knowledge-graphs do not infer and recommend according to inference rules, but rely on probabilities associated between facts to calculate the probability of a fact's existence. Moreover, knowledge maps are often missing facts, so the resulting probabilities may be inaccurate if the data is not complete enough. It is more reliable and accurate to introduce logic programming modules to explicitly make inferences using logic rules that determine reliability.
(3) Complementarity of the knowledge-graph embedding module and the logic module. The knowledge graph embedding module and the logic system module are mutually supplemented and promoted, the knowledge graph embedding module can mine new logic rules to supplement the logic modules, and the logic system can use the logic rules to generate more facts to train and supplement the knowledge graph system.
In summary, the invention adapts to the dynamic recommendation environment of the user data changing constantly by the real-time updating embedding mode of the knowledge map and the inference of the logic programming system to the facts and rules, so that the user can update the analysis of the whole knowledge map to the user quickly each time the data is updated or has new tendency and preference, and the reliability and stability of the whole recommendation system are greatly improved by effectively utilizing the existing logic rules.
Drawings
FIG. 1 is a schematic flow chart of a recommendation system according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an entity subgraph according to an embodiment of the invention;
FIG. 3 is a diagram of a relational sub-graph according to an embodiment of the invention;
FIG. 4 is a schematic diagram of knowledge-graph updating according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of logic blocks of an embodiment of the present invention;
FIG. 6 is a schematic diagram of comparative analysis of experimental effects.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
As shown in fig. 1, a method for dynamic recommendation based on knowledge-graph embedding according to an embodiment of the present invention includes steps a to E.
Step A: an input query fact is received.
The query fact is the data that the user inputs needs to be inferred. The data may be a speculative or inferred data pattern containing variables, or may be a simple piece of data that is used for direct queries.
And B: logic rules are predefined, logic reasoning is carried out on the query facts based on the logic rules, and recommendation results are output.
Based on the logical rules, facts that meet the rules can be constructed from the query facts.
If the query fact can be directly inferred by the logic module, the result can be directly output without executing the step C, namely without recommending by using a knowledge graph.
And C: and (3) dynamically embedding the knowledge graph by combining the graph convolution neural network with the ANALOGY model.
And C, if the query fact cannot be directly inferred by the logic module, performing the step C to recommend by using the knowledge graph. Searching whether query facts exist in the knowledge graph, if the query facts exist, directly outputting a recommendation result, if the query facts do not exist, updating the knowledge graph, obtaining the embedding result of the associated sub-graph of each fact through the graph convolution neural network, and then combining the result with the embedding vector of the original fact. The embedded vectors are overlapped through certain operation, so that the final result meets the constraint condition.
The data representations in the knowledge-graph include nodes and relationships. The scoring model of ANALOGY uses a linear transformation (matrix) to model the different relationships. In specific implementation, the matrix is required to meet regularity and composite interchangeability, so that all the matrices can be split into a block diagonal matrix, and the learning and embedding cost of the knowledge graph is greatly reduced.
When implementing knowledge-graph dynamic update, the KGCN model defines two different representation forms in the vector space for each entity or relationship in actual operation. When an entity (or relationship) represents its embedded original knowledge graph, we map it as a low-dimensional vector (or linear transformation) in vector space. When it represents a portion of a subgraph associated with an entity (or relationship), we define another representation of the subgraph (context) elements embedded in the representable vector space. To obtain Embedding of subgraphs, we use a graph convolutional neural network that combines the original vector Embedding with the subgraph Embedding associated with the element to obtain Context Embedding (Context Embedding). We can implement a dynamic learning algorithm for a dynamic knowledge graph in conjunction with using context element embedding.
To embed the subgraph associated with each entity (element), the graph convolution neural network required by that entity needs to be trained first. For the corresponding graph convolution neural network, the initial input data is a random embedded vector, and then a matrix composed of the embedded vectors passes through each layer of the graph convolution neural network (sharing the adjacent matrix information of each layer) to obtain the required subgraph embedding result x _ sub. The sub-graph embedding x _ sub and the vector embedding of the original element are combined to obtain x _ context, so that when the knowledge graph is dynamically updated each time, because the sub-graph embedding and the embedding of the element are separated and then combined, all nodes and relations of the knowledge graph do not need to be re-learned any more, and only the element with the changed context structure needs to be re-learned. The complexity of knowledge graph updating is greatly reduced, and the practicability of the whole recommendation system to the complex problem of the real world is improved.
And D, updating the knowledge graph.
And according to the output recommendation result, taking the newly presumed fact as the completion of the knowledge graph and updating the knowledge graph.
And E, outputting a recommendation result.
Finally, the result of the inference analysis is output, the result can be specific data or a probability value, and the result is used as a front-end database of the recommendation system to match specific articles or users.
Preferably, the logic module can be supplemented by mining new logic rules through dynamic knowledge graph embedding, and the logic system can use the logic rules to generate more facts to train and complement the knowledge graph system.
How to dig out rules from the knowledge graph can use a rule mining algorithm in the traditional data mining, and a plurality of algorithms can be used without specific requirements.
As shown in fig. 4, dynamically updating the knowledge graph may specifically be achieved in the following manner.
The dynamic optimization algorithm used in the embodiments of the present invention is described below. Since the knowledge graph in the real world is always dynamically changed and updated, how to realize a low-cost and high-efficiency knowledge graph embedded dynamic update algorithm becomes important. When one or more facts are updated, a good knowledge-graph embedding algorithm should not only be able to quickly obtain vector embedding of the updated facts, but should also be able to quickly adjust for other facts affected by the update. The most important thing for a dynamic update algorithm is therefore to quickly discover which fact's vector embedding needs to be updated and then deal with these changes in a targeted way.
Since the associated subgraph of each fact needs to be embedded, the graph convolution neural network parameters learned during KGCN initialization are kept unchanged, and the embedding of the associated subgraph of the fact already obtained is also kept unchanged. Thus, for knowledge graph updates, the elements we need to update are: (1) querying the embedded vector of facts; (2) querying an embedded vector of an associated subgraph of the fact; (3) embedded vectors of other facts affected by the query fact.
The main innovation point of the embodiment of the invention is a more accurate and efficient modeling method for fusing the graph convolution neural network and ANALOGY. ANALOGY can effectively reduce the complexity of embedded learning and simultaneously maintain the expression capability of a model on one-to-many and many-to-one relation and an asymmetric and symmetric relation. The combination of the graph convolution neural network further reduces the cost of embedding the whole knowledge base, and makes the practical use of the knowledge graph in the recommendation system possible.
The knowledge-graph updating implementation method specifically comprises steps C1-C5.
Step C1: looking up the query fact: based on the value and pattern of the query fact, a system within the knowledge-graph is searched for the presence of the query fact, if the query fact is found, no update is required, otherwise step C2 is performed.
Step C2: obtain other facts affected by the query fact: searching the associated subgraph of the query fact can adopt searching directly adjacent facts, namely other facts influenced by the query fact, and then jointly listing the facts into the data to be updated.
I.e. the data to be updated comprises the query fact and other facts affected by the query fact, i.e. new facts/new data as described below.
Step C3: acquiring a relevant subgraph of new data: the associated subgraph of the query fact and the associated subgraphs of the other facts are respectively obtained, and the entities and the relations associated with the new data are extracted to form the relevant subgraphs for inputting the graph convolutional neural network.
For the entities in each fact triplet, the most directly associated subgraphs are their neighbors. Due to the nature of the graph-convolutional neural network and to capture topological information between a given entity and its neighbors, the associated subgraph of each entity is defined as a directed subgraph composed of its neighbors and itself. In solving the practical problem, since the data size of the knowledge-graph is often very large and complex, the complexity of the KGCN must be reduced as much as possible, and therefore the number of captured neighboring entities should be as small as possible, such as considering only the directly neighboring entities. As shown in fig. 2, the neighboring nodes of the intermediate entity are surrounding entities.
For the relationship in each fact triple, the selection of the associated subgraph is more complicated. For a relationship in a fact triple, the relationship associated with the relationship, i.e., the adjacent relationship, needs to be captured first. In order to obtain all the adjacent relations, all the node entities connected to the relation need to be obtained first, and then the required adjacent relations are obtained through the node entities. The capture neighbor relation is no longer a relation and an arrow, but is connected with the relation selected at the beginning as a node to form a new undirected graph. As shown in fig. 3, the adjacent relation of the intermediate relation is a surrounding relation.
Step C4: learning data (facts) that need to be updated: and (4) performing back propagation updating on the whole processing process by adopting a gradient descent method. For updating of new facts, an original embedding vector of the new facts is initialized randomly, then an associated subgraph is input into a graph convolution neural network to obtain a new associated subgraph vector, the new associated subgraph vector is combined with the original embedding vector to evaluate an embedding result by using an ANALOGY model, then an error obtained through evaluation is propagated reversely (existing algorithms such as Adam and SGD can be used) to the graph convolution neural network and the original embedding vector, and parameters of the graph convolution neural network and parameters of the original embedding vector are updated until the result is appropriate.
Specifically, the method comprises the following steps: respectively inputting the associated subgraph of the query fact and the associated subgraphs of other facts into a graph convolution neural network so as to respectively output the embedded vector of the associated subgraph of the query fact and the embedded vector of the associated subgraph of other facts; combining the original embedding vector of the query fact with the embedding vector of the associated subgraph of the query fact, obtaining a context embedding vector of the query fact, combining the original embedding vector of the other fact with the embedding vector of the associated subgraph of the other fact, obtaining the context embedding vector of the other fact, and updating and storing the original embedding vector of the query fact, the original embedding vector of the other fact, the embedding vector of the associated subgraph of the query fact, the embedding vector of the associated subgraph of the other fact, the context embedding vector of the query fact and the context embedding vector of the other fact in a knowledge graph.
Step C5: and (3) completing knowledge graph updating: data embedding is saved in a knowledge graph system.
As shown in fig. 5, recommendation based on logical rules may be implemented in the following manner.
In setting forth the logic rule based recommendations, we use the term "data" instead of "facts" more, but in practice they are similar concepts.
A logic module may be constructed using three basic elements: atomic data (atom data), compound data (compound data) and logical rules (rule). Atomic data is indivisible data, such as a word; the composite data is data obtained by compositing a plurality of data, such as phrases, sentences; the logic rules specify what composition is valid and the logic rules can be used to generate large amounts of new data.
Preferably, the logic module core of the embodiment of the present invention uses a unified algorithm, that is, an equivalence relation is used to obtain a required result. And the unification algorithm directly compares whether the atomic data are equal or not and carries out recursive calling on the composite data. The entire system of logic modules of the present invention can be constructed using a unified algorithm.
Step B1: the data type of the query fact is determined.
Analyzing the data type of the query fact (data), if the query fact (data) is a piece of compound data, namely, the data is bound by a plurality of conditional statements, the data needs to be decomposed in the step B6 and is processed one by one as a Stream (Stream); otherwise, the data is a simple piece of data and goes directly to step B2 without decomposition.
Step B2: and preprocessing the decomposed data of the composite data or the original atomic data.
One of the most important functions of preprocessing is to rename the variables in the data that need to be matched to prevent all possible variable name conflicts for subsequent reasoning. This step may also make some transformations to the data to improve the efficiency of the reasoning.
Step B3: one in one (unity) filtration.
For the unify algorithm, three parameters, namely a matching object, a matching target and matching replacement information, need to be input. The matching object is the query fact, and the matching target is the logical rule. For each (var x), we consider x to be a variable that needs to be matched to result as long as the first word is var. When actual matching is carried out, firstly, whether one of a matched target and an object is a variable or not needs to be judged, if so, a match _ var function is used for carrying out next matching, otherwise, if a constant value is obtained, the two sides are equal, and otherwise, failure information is returned. If neither of the above conditions is true, we first take the first element of the two pieces of data, then try to match the first piece of data, and if successful, continue to match the remaining pieces of data.
With the uniform function, the next step we need to define is the match _ var function. The match _ var function firstly judges whether the two are equal, if so, the replacement information is directly returned, otherwise, the value of the variable is tried to be obtained from the replacement information, if so, the next matching is carried out, and if the corresponding value is not inquired, the variable is bound and added into the replacement information.
Finally, we also need to note that we need to check whether there is a loop definition on both sides of the uniform matching object, and if so, we directly return that the matching fails.
Step B4: a replacement result is obtained.
And (4) obtaining a replacement information subset consisting of replacement results of different variables from the step B3 integrated algorithm, and sorting and simplifying variable replacement values so as to prepare for the step B5.
Step B5: and finishing replacement and outputting a recommendation result.
According to the replacement information subset obtained in the step B4, we perform a replacement operation on the data, so as to obtain the final recommendation result we need. The results can be used as other modules of the recommendation system.
Step B6: the query fact is resolved.
If the step B1 finds that the input query fact is a composite data composed of a plurality of conditions, the step B6 decomposes the data item by item, then each item enters the step B2 preprocessing step, and performs unified filtering according to the processing result of each item, finally all the results are merged together, and finally the step B5 is entered to output the result.
Step B7: conditions and conclusions of the logical rules are separated.
When the unified filtering processing is carried out, if the logic rule in a certain knowledge base is a rule comprising a condition and a conclusion, the condition of the logic rule is separated from the conclusion, the input data to be processed is matched with the conclusion for filtering, and if the input data to be processed is successful, the condition part of the knowledge is matched and filtered.
The dynamic recommendation method based on knowledge graph embedding of the embodiment of the invention also has other possible alternative modes, such as:
(1) in the knowledge map embedding stage, in order to reduce the learning complexity and increase the processing speed, a distance model can be used instead of using a matrix to model the relationship, but the accuracy and expressiveness of the embedding result are reduced.
(2) As shown in fig. 1, the recommendation may be based on the logic rule, and if the inference cannot be successful, the recommendation may continue to be based on the knowledge graph. The sequence of the two methods can be changed, the recommendation is firstly based on the knowledge graph, and if the recommendation is not successful, the recommendation is continuously based on the logic rule. The methods of knowledge-graph based recommendation can also be used alone.
(3) The dynamic updating step and the recommending step can be performed in a multi-thread mode to achieve a certain degree of concurrence.
(4) More optimizations can be added in the preprocessing step of the logic module, such as performing logic formal simplification; moreover, instead of using the method of variable renaming, we can use a method of multiple namespaces.
Compared with the traditional core method using a recommendation system such as random walk, Bayesian inference and the like, the invention adopts a dynamic recommendation method based on knowledge graph embedding, the method can uniformly process thousands of big data in a network, and compared with a plurality of traditional embedding methods such as a distance vector method and other static embedding methods, the method uses a method combining graph convolution neural network and ANALOGY, so that modeling of the relationship has enough expressive force to express more one-to-many and asymmetrical relationships, and meanwhile, the efficiency and flexibility of the recommendation system are greatly improved by a progressive embedding mode.
FIG. 6 is a graph of the loss reduction in the data set WN18 experiment. The abscissa is the number of training times and the ordinate is the loss value. It can be seen that compared with the traditional TransE algorithm, the KGCN used in the embodiment of the present invention is already close to 0 in the initial training, and the convergence rate is greatly improved.
The embodiment of the invention also integrates a logic programming method, so that the facts and single data can be simply described, and thousands of new knowledge can be constructed by using logic reasoning. In the inference and speculation stage, the logic module greatly reduces the complexity of speculation and improves the accuracy and reliability of analysis.
The embodiment of the invention provides a knowledge graph embedding-based dynamic recommendation system, which comprises: the query module is used for receiving the input query facts, searching whether the query facts exist in the knowledge graph, if the query facts exist, directly outputting a recommendation result, and if the query facts do not exist, updating the knowledge graph and then outputting the recommendation result; the knowledge graph embedding module is used for updating the knowledge graph; the knowledge-graph embedding module comprises: the other fact acquisition module is used for acquiring other facts influenced by the query fact; the associated subgraph acquisition module is used for respectively acquiring an associated subgraph of the query fact and associated subgraphs of other facts; the graph convolution neural network is used for respectively inputting the associated subgraph of the query fact and the associated subgraphs of other facts into the graph convolution neural network so as to respectively output the embedded vector of the associated subgraph of the query fact and the embedded vector of the associated subgraph of other facts; and the updating module is used for combining the original embedding vector of the query fact with the embedding vector of the associated subgraph of the query fact, acquiring a context embedding vector of the query fact, combining the original embedding vector of other facts with the embedding vector of the associated subgraph of other facts, acquiring a context embedding vector of other facts, and updating and storing the original embedding vector of the query fact, the original embedding vector of other facts, the embedding vector of the associated subgraph of the query fact, the embedding vector of the associated subgraph of other facts, the context embedding vector of the query fact and the context embedding vector of other facts in a knowledge graph.
Preferably, the knowledge-graph-embedding-based dynamic recommendation system further comprises a logic module, which is used for predefining logic rules, performing logic reasoning on the query fact based on the logic rules, and outputting a recommendation result.
The implementation principle and technical effect of the knowledge graph embedding-based dynamic recommendation system are similar to those of the knowledge graph embedding-based dynamic recommendation method, and are not described herein again.
It must be noted that in any of the above embodiments, the methods are not necessarily executed in order of sequence number, and as long as it cannot be assumed from the execution logic that they are necessarily executed in a certain order, it means that they can be executed in any other possible order.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A dynamic recommendation method based on knowledge graph embedding is characterized by comprising the following steps:
receiving input query facts, searching whether the query facts exist in a knowledge graph, if the query facts exist, directly outputting a recommendation result, and if the query facts do not exist, updating the knowledge graph and then outputting the recommendation result;
wherein the updating the knowledge-graph is implemented as follows:
obtaining other facts affected by the query fact;
respectively acquiring the associated subgraph of the query fact and the associated subgraphs of the other facts;
inputting the associated subgraph of the query fact and the associated subgraph of the other fact into a graph convolution neural network to output the embedded vector of the associated subgraph of the query fact and the embedded vector of the associated subgraph of the other fact respectively;
combining the original embedding vector of the query fact with the embedding vector of the associated sub-graph of the query fact, obtaining a context embedding vector of the query fact, combining the original embedding vector of the other fact with the embedding vector of the associated sub-graph of the other fact, obtaining the context embedding vector of the other fact, and storing the original embedding vector of the query fact, the original embedding vector of the other fact, the embedding vector of the associated sub-graph of the query fact, the embedding vector of the associated sub-graph of the other fact, the context embedding vector of the query fact and the context embedding vector of the other fact in the knowledge graph.
2. The knowledge-graph-embedding-based dynamic recommendation method according to claim 1, further comprising the steps of: logic rules are predefined in advance, logic reasoning is carried out on the query facts based on the logic rules, and recommendation results are output.
3. The knowledge-graph-embedding-based dynamic recommendation method according to claim 1 or 2, further comprising the steps of: and pre-training the convolution neural network, wherein the parameters of the convolution neural network are kept unchanged in the process of updating the knowledge graph.
4. The knowledge-graph-embedding-based dynamic recommendation method according to claim 1 or 2, wherein the relations in the knowledge-graph are modeled by using a linear transformation matrix or a distance model.
5. The knowledge-graph-embedding-based dynamic recommendation method according to claim 2, wherein the logic reasoning on the query fact based on the logic rule comprises the steps of:
judging the data type of the query fact, if the query fact is composite data, decomposing the query fact, then preprocessing the decomposed data, and if the query fact is atomic data, directly preprocessing the query fact;
performing unified filtering on the preprocessed data based on the logic rule, and outputting a replacement information subset;
and replacing the query fact according to the replacement information subset, and outputting a recommendation result.
6. The method according to claim 5, wherein if the logic rule is a rule including a condition and a conclusion, the condition and the conclusion are separated from the logic rule before the unified filtering, the conclusion and the preprocessed data are first unified filtered, and if the matching is successful, the condition and the preprocessed data are unified filtered.
7. The knowledge-graph-embedding-based dynamic recommendation method of claim 5, wherein the preprocessing is to rename variables in the query facts to prevent variable name conflicts.
8. The knowledge-graph-embedding-based dynamic recommendation method according to claim 2, further comprising the steps of: updating the knowledge-graph and the logic rules with the output recommendation results.
9. A dynamic recommendation system based on knowledge graph embedding is characterized by comprising:
the query module is used for receiving input query facts, searching whether the query facts exist in a knowledge graph, if the query facts exist, directly outputting a recommendation result, and if the query facts do not exist, updating the knowledge graph and then outputting the recommendation result;
a knowledge graph embedding module for updating the knowledge graph;
wherein the knowledge-graph embedding module comprises:
the other fact acquisition module is used for acquiring other facts influenced by the query fact;
the associated subgraph acquisition module is used for respectively acquiring the associated subgraph of the query fact and the associated subgraphs of the other facts;
a graph convolution neural network for inputting the associated subgraph of the query fact and the associated subgraph of the other fact into the graph convolution neural network respectively to output the embedded vector of the associated subgraph of the query fact and the embedded vector of the associated subgraph of the other fact respectively;
an updating module, configured to combine the original embedding vector of the query fact with the embedding vector of the associated sub-graph of the query fact, obtain a context embedding vector of the query fact, combine the original embedding vector of the other fact with the embedding vector of the associated sub-graph of the other fact, obtain the context embedding vector of the other fact, and store the original embedding vector of the query fact, the original embedding vector of the other fact, the embedding vector of the associated sub-graph of the query fact, the embedding vector of the associated sub-graph of the other fact, the context embedding vector of the query fact, and the context embedding vector of the other fact in the knowledge-graph.
10. The system of claim 9, further comprising a logic module for predefining logic rules, performing logic inference on the query facts based on the logic rules, and outputting recommendation results.
CN202010649393.4A 2020-07-08 2020-07-08 Knowledge graph embedding-based dynamic recommendation method and system Active CN111651613B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010649393.4A CN111651613B (en) 2020-07-08 2020-07-08 Knowledge graph embedding-based dynamic recommendation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010649393.4A CN111651613B (en) 2020-07-08 2020-07-08 Knowledge graph embedding-based dynamic recommendation method and system

Publications (2)

Publication Number Publication Date
CN111651613A true CN111651613A (en) 2020-09-11
CN111651613B CN111651613B (en) 2021-07-27

Family

ID=72346320

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010649393.4A Active CN111651613B (en) 2020-07-08 2020-07-08 Knowledge graph embedding-based dynamic recommendation method and system

Country Status (1)

Country Link
CN (1) CN111651613B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112487199A (en) * 2020-11-24 2021-03-12 杭州电子科技大学 User characteristic prediction method based on user purchasing behavior
WO2022088417A1 (en) * 2020-10-29 2022-05-05 深圳大学 Content recommendation method based on heterogeneous feature deep residual network
CN115631008A (en) * 2021-07-16 2023-01-20 腾讯科技(深圳)有限公司 Commodity recommendation method, commodity recommendation device, commodity recommendation equipment and commodity recommendation medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874878A (en) * 2018-05-03 2018-11-23 众安信息技术服务有限公司 A kind of building system and method for knowledge mapping
US10157226B1 (en) * 2018-01-16 2018-12-18 Accenture Global Solutions Limited Predicting links in knowledge graphs using ontological knowledge
CN109508419A (en) * 2018-11-23 2019-03-22 成都品果科技有限公司 A kind of recommended method and system of knowledge based study
CN109583562A (en) * 2017-09-28 2019-04-05 西门子股份公司 SGCNN: the convolutional neural networks based on figure of structure
CN110245238A (en) * 2019-04-18 2019-09-17 上海交通大学 The figure embedding grammar and system of Process Based and syntax schema
CN110609902A (en) * 2018-05-28 2019-12-24 华为技术有限公司 Text processing method and device based on fusion knowledge graph
US10528871B1 (en) * 2018-09-24 2020-01-07 Yewno, Inc. Structuring data in a knowledge graph
US20200110746A1 (en) * 2018-10-05 2020-04-09 Accenture Global Solutions Limited Density-based computation for information discovery in knowledge graphs
CN111190968A (en) * 2019-12-16 2020-05-22 北京航天智造科技发展有限公司 Data preprocessing and content recommendation method based on knowledge graph

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109583562A (en) * 2017-09-28 2019-04-05 西门子股份公司 SGCNN: the convolutional neural networks based on figure of structure
US10157226B1 (en) * 2018-01-16 2018-12-18 Accenture Global Solutions Limited Predicting links in knowledge graphs using ontological knowledge
CN108874878A (en) * 2018-05-03 2018-11-23 众安信息技术服务有限公司 A kind of building system and method for knowledge mapping
CN110609902A (en) * 2018-05-28 2019-12-24 华为技术有限公司 Text processing method and device based on fusion knowledge graph
US10528871B1 (en) * 2018-09-24 2020-01-07 Yewno, Inc. Structuring data in a knowledge graph
US20200110746A1 (en) * 2018-10-05 2020-04-09 Accenture Global Solutions Limited Density-based computation for information discovery in knowledge graphs
CN109508419A (en) * 2018-11-23 2019-03-22 成都品果科技有限公司 A kind of recommended method and system of knowledge based study
CN110245238A (en) * 2019-04-18 2019-09-17 上海交通大学 The figure embedding grammar and system of Process Based and syntax schema
CN111190968A (en) * 2019-12-16 2020-05-22 北京航天智造科技发展有限公司 Data preprocessing and content recommendation method based on knowledge graph

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022088417A1 (en) * 2020-10-29 2022-05-05 深圳大学 Content recommendation method based on heterogeneous feature deep residual network
CN112487199A (en) * 2020-11-24 2021-03-12 杭州电子科技大学 User characteristic prediction method based on user purchasing behavior
CN115631008A (en) * 2021-07-16 2023-01-20 腾讯科技(深圳)有限公司 Commodity recommendation method, commodity recommendation device, commodity recommendation equipment and commodity recommendation medium
CN115631008B (en) * 2021-07-16 2024-02-13 腾讯科技(深圳)有限公司 Commodity recommendation method, device, equipment and medium

Also Published As

Publication number Publication date
CN111651613B (en) 2021-07-27

Similar Documents

Publication Publication Date Title
CN111651613B (en) Knowledge graph embedding-based dynamic recommendation method and system
Demirović et al. Murtree: Optimal decision trees via dynamic programming and search
CN112507699B (en) Remote supervision relation extraction method based on graph convolution network
CN110110858B (en) Automatic machine learning method based on reinforcement learning
CN111459988B (en) Automatic design method for machine learning assembly line
CN113254630B (en) Domain knowledge map recommendation method for global comprehensive observation results
CN111767216B (en) Cross-version depth defect prediction method capable of relieving class overlap problem
Munch et al. Towards interactive causal relation discovery driven by an ontology
Demirović et al. MurTree: optimal classification trees via dynamic programming and search
Mihaljević et al. Learning Bayesian network classifiers with completed partially directed acyclic graphs
Kalifullah et al. Retracted: Graph‐based content matching for web of things through heuristic boost algorithm
CN112905906B (en) Recommendation method and system fusing local collaboration and feature intersection
Simiński Extraction of rules dependencies for optimization of backward inference algorithm
Martínez-Plumed et al. Learning with configurable operators and rl-based heuristics
WO2021248319A1 (en) Database management system and method for graph view selection for relational-graph database
CN113449869A (en) Learning method of easy-reasoning Bayesian network
Loza Mencía et al. Tree-based dynamic classifier chains
Meng et al. Enhancing graph neural networks with edge features through sequential representation
Rahimov et al. STRUCTURAL-FUNCTIONAL ORGANIZATION AND CORRECTNESS OF KNOWLEDGE MODELS OF PRODUCT SYSTEMS
Sitnikov et al. An algebraic approach to defining rough set approximations and generating logic rules
Chen et al. GOOSE: Learning domain-independent heuristics
Montero-Hernandez et al. Intervals of causal effects for learning causal graphical models
Saada et al. Model matching for Model Transformation a meta-heuristic approach
Vargas-Vera The implementation of DSSim: a multi-agent ontology mapping system
CN117670069A (en) Retail industry digital transformation scheme personalized recommendation system based on knowledge graph reinforcement learning

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
GR01 Patent grant
GR01 Patent grant