Search

CN-121979979-A - Temporal feature knowledge graph logic query answering method, medium and equipment

CN121979979ACN 121979979 ACN121979979 ACN 121979979ACN-121979979-A

Abstract

A method for answering logic inquiry of temporal feature knowledge graph includes using fixed entity embedding as input according to subsequent traversal of inquiry calculation tree, carrying out single-jump projection operation of inquiry when traversing to projection operator, converting entity embedding or inquiry embedding to next-jump inquiry embedding, taking supplement when traversing to negative operator, extracting inquiry embedding input of branch pair and relation feature vector of branch pair when traversing to intersection or union operator, mapping semantic similarity of relation feature vector to initial weight of three logic systems, inputting MLP after splicing inquiry embedding and relation feature vector, calculating dynamic weight of three logic systems, utilizing gate control mechanism to generate mixed weight of three logic systems to obtain inquiry embedding, calculating inquiry score according to inquiry embedding and each entity embedding to obtain inquiry answer set. The invention solves the problem that the fixed logic strategy restricts the query precision.

Inventors

  • DONG LIJUN
  • WU ZIJIAN
  • WU TIEJUN
  • YAO HONG
  • KANG XIAOJUN
  • LI XINCHUAN

Assignees

  • 中国地质大学(武汉)
  • 绿盟科技集团股份有限公司

Dates

Publication Date
20260505
Application Date
20251230

Claims (10)

  1. 1. A logical query answering method of a temporal feature knowledge graph is characterized by comprising the following steps: S1, according to the subsequent traversal of a query computation tree, taking fixed entity embedding as input, and when traversing to a projection operator, performing single-jump projection operation of the query according to time and relation characteristics, and converting the entity embedding or the query embedding into the next-jump query embedding; The complement is performed when traversing to the negative operator, and when traversing to the intersection or union logic operation, the following steps are taken: (1) Obtaining logic query branching pair of intersection or union logic operation, extracting input of branching pair logic operation, namely embedding query And And a relational feature vector of the shunt pair And ; (2) Based on relation feature vectors And Calculating semantic similarity of relation feature vectors And mapping the semantic similarity to G del, product, Initial weights for ukasiewicz three logical systems ; Embedding queries And Relation feature vector And Inputting the MLP after splicing, and calculating 、 、 Dynamic weighting of three logic systems ; (3) Based on initial weights Dynamic weighting Generating with gating mechanism 、 、 Hybrid weights for three logic systems ; (4) Combining mixed weights And 、 、 The three logic systems output logic strategies and obtain query embedded output; S2, calculating query scores according to query embedding and entity embedding to obtain a query answer set.
  2. 2. The method for logically answering a query by using a temporal feature knowledge graph according to claim 1, wherein the query is embedded Or (b) Three types of extraction of the relationship feature vector of the shunt pair of the previous hop And The method comprises the following steps: (1) The logic of the previous hop is projection, and the characteristic vector of the previous hop is directly obtained; (2) The logic of the previous jump is negative, and a negative projected relation feature vector of the previous jump is obtained; (3) The logic of the previous hop is an intersection, and the results of obtaining the relationship feature vectors of the branch pairs of the intersection are averaged according to the types (1) and (2).
  3. 3. The method for logically querying and answering a query by using a temporal feature knowledge graph as claimed in claim 1, wherein the semantic similarity is The calculation formula of (2) is as follows: 。
  4. 4. the method for logically querying and answering a query by using a temporal feature knowledge graph as set forth in claim 1, wherein the semantic similarity is mapped to 、 、 Initial weights for three logical systems The method specifically comprises the following steps: , Wherein, the , Respectively represent 、 、 The initial weights of the three logic systems, T is the temperature parameter controlling the width of the transition interval, () Representing a Sigmoid function.
  5. 5. The method for logically querying and answering a query by using a temporal feature knowledge graph as claimed in claim 1, wherein the dynamic weights are The calculation formula of (2) is as follows: , , , Wherein, the And For the weight and bias parameters of the first layer, And For the weight and bias parameters of the output layer, , Respectively are 、 、 The dynamic weights of the three types of logic systems, The hidden layer feature vector representing the MLP, Representing the input feature vector of the MLP.
  6. 6. The method for logically querying and answering a temporal feature knowledge graph according to claim 1, wherein the weights are mixed The calculation formula of (2) is as follows: , , , Wherein, the , Respectively are 、 、 The mixing weights of the three logic systems, g is the gating vector, as well as the element-by-element multiplication, σ represents the sigmoid function, And The weight and bias of the gating mechanism, , Respectively represent 、 、 The initial weights of the three types of logic systems, , Respectively are 、 、 Dynamic weights of three logic systems.
  7. 7. A temporal feature knowledge graph logic query response method according to claim 1, characterized by improving the fosdel logic operator by: , , Wherein, the Representing the intersection of nodes a and b in the gdel logic, τ represents the temperature coefficient, Representing the union of nodes a and b under the gcel logic.
  8. 8. The method for logically querying and answering a query by using a temporal feature knowledge graph as claimed in claim 1, wherein the method is improved by Ukasiewicz logic operator: , , , Wherein, the Representation of The intersection of nodes a and b at ukasiewicz, k=1+γ, γ representing the leakage factor, λ being a learnable threshold, Representation of The union of nodes a and b under ukasiewicz logic will be when the input of the logic inquiry branch to the last hop where the branch exists is negative Replaced by 。
  9. 9. A computer-readable storage medium, in which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method according to any of the claims 1-8.
  10. 10. An electronic device comprising a processor and a memory, the processor being interconnected with the memory, wherein the memory is configured to store a computer program comprising computer readable instructions, the processor being configured to invoke the computer readable instructions to perform the method of any of claims 1-8.

Description

Temporal feature knowledge graph logic query answering method, medium and equipment Technical Field The invention relates to the technical field of temporal feature knowledge graph, in particular to a method, medium and equipment for answering a logical query of a temporal feature knowledge graph. Background The traditional knowledge graph represents knowledge in the form of static triples, and the dynamic properties of facts cannot be effectively described. The temporal feature knowledge graph adopts a form of a quadruple (head entity, relation, tail entity, time) by introducing a time dimension, so that the time-based knowledge such as a user behavior sequence, employee occupational development track and the like can be accurately expressed. This expansion, while enriching the knowledge service capabilities, also presents a greater technical challenge. In the practical application of the temporal feature knowledge graph, users often have differentiated and complex query requirements, and need to execute queries containing multi-hop reasoning and logic operations. For example, on an e-commerce platform, it may be necessary to find "high-value users who have recently browsed smart home products and have long-term attention to health care categories", and in a human resource management scenario, it may be necessary to query "incumbent staff who have cloud computing project experience and have completed digital transformation training in the last 2 years". Such queries involve not only time constraints, but also logical connection operations, which pose serious challenges to existing approaches. The approach to solving this temporal logical query answering task is typically to embed the query in such a model. The temporal logic query answer is one of the leading edge tasks of the temporal feature knowledge graph, aiming at processing the combined query containing multi-hop reasoning and logic predicates (conjunctions, disjunctions, negations). The current temporal feature knowledge graph logic query answering method faces a key problem that in terms of processing of logic connection, in order to aggregate feature information of multiple logic query branches, the existing method generally adopts a single logic system (such as Gdel, product or GdUkasiewicz), however, such a fixed strategy cannot accommodate semantic correlation differences between different shunt pairs. For example, in a human resources management scenario, "Python skills mastered by staff-machine learning items in which staff participates" belongs to a high correlation branch because the two are semantically closely related, and it is highly probable that Python skills are mastered to participate in machine learning items. While the "department where staff is located-the emergency certificate held by staff" is not strongly associated, the holding of the emergency certificate is more personal choice. If the two branches with larger correlation difference are adopted to treat the low correlation branch by adopting the foster logic with strong inclusion, a large amount of noise answers can be introduced due to excessive inclusion, if the branches are adopted to filter strictlyUkasiewicz logic handles high correlation branches, which can lose potential positive examples due to excessive suppression, and even if the compromised Product logic is adopted, the fixed probability multiplication assumption of the high correlation branches can not keep optimal performance in differentiated semantic scenes. The contradiction of the fixed policy and the mismatch of semantic relevance can restrict the reasoning precision of the logic query, and the generalization capability is limited when processing heterogeneous logic structures. Disclosure of Invention The invention aims to provide a temporal feature knowledge graph logic query answering method for solving the problem that a fixed logic strategy of the traditional method restricts logic query reasoning accuracy, which comprises the following steps: S1, according to the subsequent traversal of a query computation tree, taking fixed entity embedding as input, and when traversing to a projection operator, performing single-jump projection operation of the query according to time and relation characteristics, and converting the entity embedding or the query embedding into the next-jump query embedding; The complement is performed when traversing to the negative operator, and when traversing to the intersection or union logic operation, the following steps are taken: (1) Obtaining logic query branching pair of intersection or union logic operation, extracting input of branching pair logic operation, namely embedding query AndAnd a relational feature vector of the shunt pairAnd; (2) Based on relation feature vectorsAndCalculating semantic similarity of relation feature vectorsAnd map semantic similarity to、、Initial weights for three logical systems; Embedding queriesAndRelation feature vectorAndInputting the ML