CN112800237A - Prediction method and device based on knowledge graph embedded representation and computer equipment - Google Patents

Prediction method and device based on knowledge graph embedded representation and computer equipment Download PDF

Info

Publication number
CN112800237A
CN112800237A CN202110070124.7A CN202110070124A CN112800237A CN 112800237 A CN112800237 A CN 112800237A CN 202110070124 A CN202110070124 A CN 202110070124A CN 112800237 A CN112800237 A CN 112800237A
Authority
CN
China
Prior art keywords
entity
mapping
target
embedded
relationship
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
CN202110070124.7A
Other languages
Chinese (zh)
Other versions
CN112800237B (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.)
China Reinsurance Group Co ltd
Original Assignee
China Reinsurance Group Co ltd
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 China Reinsurance Group Co ltd filed Critical China Reinsurance Group Co ltd
Priority to CN202110070124.7A priority Critical patent/CN112800237B/en
Publication of CN112800237A publication Critical patent/CN112800237A/en
Application granted granted Critical
Publication of CN112800237B publication Critical patent/CN112800237B/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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models
    • 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/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to a prediction method, a prediction device, computer equipment and a storage medium based on knowledge graph embedded representation. The method comprises the following steps: acquiring a first entity, a second entity and a target relation in a target knowledge graph; acquiring a first normal vector and a second normal vector corresponding to the target relationship, and acquiring a relationship matrix; determining a first mapping entity according to the first normal vector, determining a second mapping entity according to the second normal vector, and determining an entity relation mapping vector according to a cyclic matrix corresponding to the relation matrix; training the first mapping entity, the second mapping entity and the entity relationship mapping vector according to a preset scoring function to obtain a first embedded entity, a second embedded entity and a target embedded relationship; and applying the first embedded entity, the second embedded entity and the target embedded relation to predict at least one of semantic knowledge and association relation corresponding to the target knowledge graph. Therefore, semantic knowledge and association relation can be accurately predicted.

Description

Prediction method and device based on knowledge graph embedded representation and computer equipment
Technical Field
The present application relates to the field of knowledge graph technology, and in particular, to a prediction method, apparatus, computer device, and storage medium based on knowledge graph embedded representation.
Background
With the development of artificial intelligence technology, knowledge graph technology for semantic analysis and inference prediction functions has emerged. In order to better utilize the knowledge graph to process semantics and relations, entities and relations in the knowledge graph generally need to be embedded and expressed, so that the semantics can be analyzed and predicted quickly and accurately. The traditional prediction method based on knowledge graph embedded representation generally converts and represents entities and relations through a transfer distance model or a semantic matching model, and provides a basis for subsequent semantic analysis and inference prediction.
However, the conventional prediction method based on knowledge graph embedded representation generally performs uniform translation or analysis on different entities and relationships, and when the head entity and the tail entity are not equal, the characteristics of the head entity, the tail entity and the relationship cannot be considered, and the related semantics or the relationship cannot be accurately analyzed and predicted.
Disclosure of Invention
In view of the above, it is necessary to provide a prediction method, apparatus, computer device and storage medium based on knowledge-graph embedded representation, which can accurately analyze and predict related semantics or relationships.
A prediction method based on a knowledge-graph-embedded representation, the method comprising:
acquiring a target knowledge graph based on semantic knowledge and association relation, and acquiring triples in the target knowledge graph, wherein the triples comprise a first entity, a second entity and a target relation;
acquiring a first normal vector and a second normal vector corresponding to the target relationship, and acquiring a relationship matrix formed based on the first entity, the second entity and the target relationship;
determining a first mapping entity corresponding to the first entity according to the first normal vector, determining a second mapping entity corresponding to the second entity according to the second normal vector, and determining an entity relation mapping vector corresponding to the target relation according to a cyclic matrix corresponding to the relation matrix;
training the first mapping entity, the second mapping entity and the entity relationship mapping vector according to a preset scoring function to obtain a first embedded entity corresponding to the first mapping entity, a second embedded entity corresponding to the second mapping entity and a target embedded relationship corresponding to the target relationship;
and applying the first embedded entity, the second embedded entity and the target embedded relation to predict at least one of semantic knowledge and association relation corresponding to the target knowledge graph.
In one embodiment, the obtaining of the target knowledge graph based on semantic knowledge and association comprises:
and if the reverse relationship between the first entity and the second entity is inconsistent with the target relationship, or the semantic category corresponding to the first entity is inconsistent with the semantic category corresponding to the second entity, or the out-degree or in-degree corresponding to the first entity or the second entity is inconsistent, or the number of first entities corresponding to the target relationship connection is inconsistent with the number of second entities corresponding to the target relationship connection, determining the knowledge graph spectrum corresponding to the first entity and the second entity as the target knowledge graph spectrum.
In one embodiment, the determining, according to the first normal vector, a first mapping entity corresponding to the first entity, determining, according to the second normal vector, a second mapping entity corresponding to the second entity, and determining, according to a cyclic matrix corresponding to the relationship matrix, an entity relationship mapping vector corresponding to the target relationship includes:
mapping the first entity to a first hyperplane corresponding to the first normal vector to obtain a first mapping entity;
mapping the second entity to a second hyperplane corresponding to the second normal vector to obtain a second mapping entity;
and for the target relationship, mapping the first entity and the second entity through a cyclic matrix corresponding to the relationship matrix to obtain an entity relationship mapping vector corresponding to the target relationship.
In one embodiment, the obtaining manner of the circulant matrix includes:
and translating the elements in the relation matrix to obtain the cyclic matrix.
In one embodiment, the preset scoring function comprises a first scoring function and a second scoring function;
the training the first mapping entity, the second mapping entity and the entity relationship mapping vector according to a preset scoring function to obtain a first embedded entity corresponding to the first mapping entity, a second embedded entity corresponding to the second mapping entity and a target embedded relationship corresponding to the target relationship comprises:
training the first mapping entity and the second mapping entity according to the first scoring function to obtain a first embedded entity corresponding to the first mapping entity and a second embedded entity corresponding to the second mapping entity;
and training the target relation and the entity relation mapping vector according to the second scoring function to obtain a target embedding relation corresponding to the target relation.
In one embodiment, the training the first mapping entity and the second mapping entity according to the first scoring function to obtain a first embedded entity corresponding to the first mapping entity and a second embedded entity corresponding to the second mapping entity includes:
determining an entity portrait corresponding to the second entity according to the first mapping entity and the target relation;
obtaining a similarity between the second mapping entity and the entity representation;
and training the first mapping entity and the second mapping entity according to the first scoring function and the mapping similarity to obtain a first embedded entity corresponding to the first mapping entity and a second embedded entity corresponding to the second mapping entity.
In one embodiment, the method further comprises:
setting a corresponding time window for the target knowledge graph, and constructing a target knowledge graph based on streaming data;
and according to the time window, executing the step of obtaining the target knowledge graph based on the semantic knowledge and the association relation until the first embedded entity, the second embedded entity and the target embedded relation are obtained, and applying the first embedded entity, the second embedded entity and the target embedded relation to predict at least one of the semantic knowledge and the association relation corresponding to the target knowledge graph based on the streaming data.
A prediction apparatus based on a knowledge-graph-embedded representation, the apparatus comprising:
the system comprises a first data acquisition module, a second data acquisition module and a third data acquisition module, wherein the first data acquisition module is used for acquiring a target knowledge graph based on semantic knowledge and association relation and acquiring triples in the target knowledge graph, and the triples comprise a first entity, a second entity and a target relation;
the second data acquisition module is used for acquiring a first normal vector and a second normal vector corresponding to the target relationship and acquiring a relationship matrix formed based on the first entity, the second entity and the target relationship;
a mapping data obtaining module, configured to determine a first mapping entity corresponding to the first entity according to the first normal vector, determine a second mapping entity corresponding to the second entity according to the second normal vector, and determine an entity relationship mapping vector corresponding to the target relationship according to a cyclic matrix corresponding to the relationship matrix;
the data embedding representation module is used for training the first mapping entity, the second mapping entity and the entity relationship mapping vector according to a preset scoring function to obtain a first embedding entity corresponding to the first mapping entity, a second embedding entity corresponding to the second mapping entity and a target embedding relationship corresponding to the target relationship;
and the embedded prediction module is used for applying the first embedded entity, the second embedded entity and the target embedded relation to predict at least one of semantic knowledge and association relation corresponding to the target knowledge graph.
A computer device comprising a memory storing a computer program and a processor implementing the method of any of the above embodiments when the processor executes the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of any of the above embodiments.
According to the prediction method, the prediction device, the computer equipment and the storage medium based on the knowledge graph embedded representation, the first mapping entity corresponding to the first entity is determined according to the first normal vector, the second mapping entity corresponding to the second entity is determined according to the second normal vector, the entity relation mapping vector corresponding to the target relation is determined according to the circulation matrix corresponding to the relation matrix, independent mapping can be performed on the first entity, the second entity and the target relation respectively, the characteristics of the first entity, the second entity and the target relation are considered, the first mapping entity, the second mapping entity and the entity relation mapping vector are trained according to the preset scoring function, the first embedded entity corresponding to the first mapping entity, the second embedded entity corresponding to the second mapping entity and the target embedded relation corresponding to the target relation are obtained, and the target embedded relation corresponding to the first entity, the second embedded entity and the target relation is considered, And on the basis of the characteristics of the second entity and the target relation, the first embedded entity, the second embedded entity and the target embedded relation are applied to accurately predict at least one of semantic knowledge and association relation corresponding to the target knowledge graph.
Drawings
FIG. 1 is a diagram of an embodiment of an application environment for a prediction method based on knowledge-graph embedded representation;
FIG. 2 is a flow diagram of a prediction method based on an embedded representation of a knowledge-graph in one embodiment;
FIG. 3 is a schematic flow chart diagram illustrating one possible implementation of step S300 in one embodiment;
FIG. 4 is a diagram illustrating a method for entity-individual mapping in one embodiment;
FIG. 5 is a schematic flow chart diagram illustrating one possible implementation of step S400 in one embodiment;
FIG. 6 is a flow diagram of a prediction device based on an embedded representation of a knowledge-graph in one embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application 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 present application and are not intended to limit the present application.
The prediction method based on the knowledge graph embedded representation can be applied to the application environment shown in FIG. 1. The method comprises the steps of aiming at multi-source heterogeneous real-time big data collected in real time, constructing a knowledge graph according to semantic knowledge and association relations, modeling entities and relations in the knowledge graph to obtain a first embedded entity, a second embedded entity and a target embedded relation of the knowledge graph, applying the first embedded entity, the second embedded entity and the target embedded relation, accurately predicting at least one of the semantic knowledge and the association relations corresponding to the target knowledge graph on the basis of considering characteristics of the first entity, the second entity and the target relation, and carrying out risk management according to a prediction result. Optionally, the specificity of the knowledge graph and the influence on the embedded representation method are dynamically analyzed in terms of semantics, structure, quantity and the like of the entities and the relations. Designing a dynamic cross-correlation knowledge graph embedding expression algorithm based on a sliding window according to the unequal characteristics of dynamic changes of a head entity (a first entity) and a tail entity (a second entity) of a streaming knowledge graph and the interaction of the entities and the relationship; and the influence of unequal features on model learning is reduced by adopting the self-adaptive learning rate in the window. By way of example, the method is applied to the insurance field for explanation, and in order to improve efficiency and accuracy of insurance industry underwriting and claim checking work and further prevent moral risks and inverse selection events, an external data source needs to be fused to construct a knowledge graph of the insurance industry. Firstly, multi-source heterogeneous real-time big data relates to structured, semi-structured and non-structured data, and the real-time coming data needs to be processed quickly; in addition, a knowledge graph based on semantic knowledge and association relation needs to be constructed, and different scene applications are used for dynamically constructing inference rules of expert decision. And analyzing the unequal characteristics of the dynamic changes of the head entity and the tail entity according to the interaction of the entities and the relationship, and realizing the fusion processing aiming at the variable data stream by adopting an embedded expression algorithm of independently modeling the head entity and the tail entity and an embedded expression algorithm based on a cyclic matrix.
In one embodiment, as shown in fig. 2, a prediction method based on knowledge-graph embedded representation is provided, and this embodiment is illustrated by applying the method to a terminal, and it is to be understood that the method may also be applied to a server, and may also be applied to a system including a terminal and a server, and is implemented by interaction between the terminal and the server. In this embodiment, the method includes the steps of:
step S100, a target knowledge graph based on semantic knowledge and association relation is obtained, and triples in the target knowledge graph are obtained, wherein the triples comprise a first entity, a second entity and a target relation.
Step S200, a first normal vector and a second normal vector corresponding to the target relationship are obtained, and a relationship matrix formed based on the first entity, the second entity and the target relationship is obtained.
Step S300, a first mapping entity corresponding to the first entity is determined according to the first normal vector, a second mapping entity corresponding to the second entity is determined according to the second normal vector, and an entity relation mapping vector corresponding to the target relation is determined according to a cyclic matrix corresponding to the relation matrix.
Step S400, training the first mapping entity, the second mapping entity and the entity relationship mapping vector according to a preset scoring function to obtain a first embedded entity corresponding to the first mapping entity, a second embedded entity corresponding to the second mapping entity and a target embedded relationship corresponding to the target relationship.
Step S500, applying the first embedded entity, the second embedded entity and the target embedded relation to predict at least one of semantic knowledge and association relation corresponding to the target knowledge map.
The target knowledge graph is a knowledge graph which needs to be embedded and expressed and carries out semantic knowledge and/or incidence relation prediction according to the embedded expression.
Specifically, a target knowledge graph is obtained, and two corresponding normal vectors, namely a first normal vector and a second normal vector, are set for a target relation in the target knowledge graph. And mapping the first entity according to the first normal vector to obtain a first mapping entity. And mapping the second entity according to the second normal vector to obtain a second mapping entity. And determining an entity relation mapping vector corresponding to the target relation according to the cyclic matrix corresponding to the relation matrix. The first entity, the second entity and the target relation are mapped independently, and the obtained mapping vectors of the first mapping entity, the second mapping entity and the entity relation can take the respective characteristics of the first entity, the second entity and the target relation into consideration. And then, training the first mapping entity, the second mapping entity and the entity relationship mapping vector according to a preset scoring function, and obtaining a first embedded entity corresponding to the first mapping entity, a second embedded entity corresponding to the second mapping entity and a target embedded relationship corresponding to the target relationship under the constraint of the scoring function. And finally, applying the first embedded entity, the second embedded entity and the target embedded relation to predict at least one of semantic knowledge and association relation corresponding to the target knowledge graph.
The prediction method based on the knowledge graph embedded representation comprises the steps of determining a first mapping entity corresponding to a first entity according to a first normal vector, determining a second mapping entity corresponding to a second entity according to a second normal vector, determining an entity relation mapping vector corresponding to a target relation according to a circulation matrix corresponding to a relation matrix, independently mapping the first entity, the second entity and the target relation, considering the characteristics of the first entity, the second entity and the target relation, training the first mapping entity, the second mapping entity and the entity relation mapping vector according to a preset scoring function to obtain the target embedding relation corresponding to the first embedding entity corresponding to the first mapping entity, the second embedding entity corresponding to the second mapping entity and the target relation, and on the basis of considering the characteristics of the first entity, the second entity and the target relation, and applying the first embedded entity, the second embedded entity and the target embedded relation to accurately predict at least one of semantic knowledge and association relation corresponding to the target knowledge graph.
In one embodiment, one possible implementation of step S100 includes:
and if the reverse relationship between the first entity and the second entity is inconsistent with the target relationship, or the semantic category corresponding to the first entity is inconsistent with the semantic category corresponding to the second entity, or the out-degree or in-degree corresponding to the first entity or the second entity is inconsistent, or the number of the first entity corresponding to the target relationship connection is inconsistent with the number of the second entity, determining the knowledge map spectrum corresponding to the first entity and the second entity as the target knowledge map.
Specifically, in this embodiment, the knowledge graph with unequal head entities and tail entities is identified, and in general, if a reverse relationship between a first entity and a second entity is inconsistent with a target relationship (a forward relationship), or a semantic category corresponding to the first entity is inconsistent with a semantic category corresponding to the second entity, or an out-degree or in-degree corresponding to the first entity or the second entity is inconsistent, or a number of first entities corresponding to target relationship connections is inconsistent with a number of second entities corresponding to the first entity, the knowledge graph is determined to be the knowledge graph with unequal head entities and tail entities, and the knowledge graph is determined to be the target knowledge graph.
Specifically, the case that the head entity and the tail entity are not equal is as follows: given knowledge graph G ═ great face<h,r,t,τ>L h, t E E, R, τ Ω, wherein h represents the first entity (head entity), t represents the second entity (tail entity), R represents the target relationship, τ represents the timestamp. E represents the entity set, R represents the relationship set, and Ω represents the window size of the sliding window. Within window time Ω, let r be assumed-1The inverse relation of the relation r is shown, and the out-degree node of the entity e is (e)i,rx) The entry node of entity e is (r)y,ej),(ei,rx) Is divided into the out degree N of the entity eOD(e),(ry,ej) Is divided into the in-degree N of the entity eIN(e) In that respect If the knowledge graph meets one of the following three conditions, namely the knowledge graph has the characteristics of non-alignment, the knowledge graph is the target knowledge graph. The first condition is as follows: semantic isomerism of a head entity and a tail entity: with respect to the relation r, it is,
Figure BDA0002905496810000081
or
Figure BDA0002905496810000082
Semantic Categories and S representing all head entities linked to relationship rTrRepresenting the semantic categories of all tail entities linked to the relationship r. And a second condition: the local knowledge structure of the head entity and the tail entity is heterogeneous: for quadruplets<h,r,t,τ>,
Figure BDA0002905496810000083
Or
Figure BDA0002905496810000084
Figure BDA0002905496810000085
And (3) carrying out a third condition: the number of head entities and tail entities is heterogeneous: with respect to the relation r, it is,
Figure BDA0002905496810000086
or in the case of the knowledge-graph G,
Figure BDA0002905496810000087
wherein, | hr| represents the number of head entities linked by the relation r, | tr | represents the number of tail entities linked by the relation r, | H | represents the number of all head entities in the knowledge-graph and | T | represents the number of all tail entities in the knowledge-graph. Wherein, the key of coping with the unequal characteristics of the head entity and the tail entity is as follows: correctly distinguishing a head entity and a tail entity, and distinguishing the head entity and the tail entity from the overall angle or the individual angle; modeling interactions of entities with relationships, capturing interactions between entities and relationshipsThe interaction of (a).
In the embodiment, the target knowledge graph with unequal characteristics is determined through the characteristics of the knowledge graph, and a data basis is provided for independent embedded representation of the entities and the relations in the target knowledge graph.
In one embodiment, as shown in fig. 3, an implementation of step S300 includes:
step 310, the first entity is mapped to the first hyperplane corresponding to the first normal vector, so as to obtain a first mapped entity.
Step 320, mapping the second entity to a second hyperplane corresponding to the second normal vector to obtain a second mapping entity.
Step 330, for the target relationship, mapping the first entity and the second entity through the cyclic matrix corresponding to the relationship matrix to obtain an entity relationship mapping vector corresponding to the target relationship.
The hyperplane is a linear subspace with the remaining dimension equal to one in an n-dimensional Euclidean space, the first normal vector corresponds to the first hyperplane, and the second normal vector corresponds to the second hyperplane.
Specifically, the determination manner regarding the first mapping entity and the second mapping entity is as follows:
both the entity (first entity or second entity) and the relationship (target relationship) have semantics with a near-far score. Typically, within a sliding window, the semantics of different relationships are different and the semantics of linked entities are also different, while the semantics of linked entities of the same relationship are close. As shown in equation 1, an action function is given to the head entity (first entity) and the tail entity (second entity) of each relationship.
Figure BDA0002905496810000091
Wherein the content of the first and second substances,
Figure BDA0002905496810000092
and
Figure BDA0002905496810000093
is an action function, may be a weight, vector, matrix or other function,
Figure BDA0002905496810000094
indicate a correspondence
Figure BDA0002905496810000095
An operation on h, or
Figure BDA0002905496810000096
And (5) operating on t. The embedded representation of an entity can be accomplished by three steps: unified calculation of one, two entities and relationship
Figure BDA0002905496810000097
Secondly, preparing for calculating the tail entity by using the mapping relation of the head entity and the relation, namely calculating
Figure BDA0002905496810000098
Thirdly, calculating the similarity of the operation of the head entity and the tail entity, namely setting a scoring function
Figure BDA0002905496810000099
In the translation model, sim () | | | | l1, l2 is a first or second order distance.
For independent modeling of the head entity and the tail entity, as shown in fig. 4, the method is a schematic diagram of an entity-independent mapping method, the entity-independent mapping method has Universality (Universality), the translation model can be counted as a TransU, and the TransU model can be applied to a knowledge graph with unequal head entities and tail entities, and can also be applied to a knowledge graph with equal head entities and tail entities. The TransU model is embodied in that each relation r adopts 2 normal vectors, a first normal vector wrh is allocated to a head entity, and a second normal vector wrt is allocated to a tail entity so as to distinguish the unequal characteristics of the two.
Inside the sliding window, entities (first entity and second entity), relationships (target relationships) are imaged collectively. Based on the hyperplane mapping principle, the image formed by the relation r is an r vector, the image where the head entity h and the tail entity t are located is a vector obtained by hyperplane mapping, and a calculation formula which can be obtained by the hyperplane mapping principle in fig. 4 is shown as a formula 2:
Figure BDA00029054968100000910
optionally, elements in the relationship matrix are translated to obtain a circulant matrix. The determination of the circulant matrix and entity-relationship mapping vectors is as follows:
when the entity and the relationship are required to carry out fine-grained interaction in the sliding window, the method is mainly represented by the step of mapping the entity and the relationship. Therefore, the circulant matrix is used as a function to obtain the interaction of the entities and the relationships. Each row in the circulant matrix is shifted one element to the left or right relative to the previous row vector. Therefore, it can be divided into left and right circulant matrices, denoted A respectivelyLCircl (a) and aRCircr (a), where a is the first row vector, which is a circular vector.
The elements of the left circulant matrix are represented by equation (3), the elements of the right circulant matrix are represented by equation (4), and the conversion relationship between the left circulant matrix and the right circulant matrix is shown by equation (5).
Figure BDA0002905496810000101
Figure BDA0002905496810000102
Figure BDA0002905496810000103
In the above embodiment, the first entity, the second entity, and the target relationship are mapped separately, so as to obtain a first mapping entity corresponding to the first entity, a second mapping entity corresponding to the second entity, and an entity relationship mapping vector corresponding to the target relationship. The single mapping mode can keep the respective characteristics of the first entity, the second entity and the target relation, provides a data basis for the embedding of the subsequent knowledge graph, and accurately predicts at least one of semantic knowledge and association relation corresponding to the target knowledge graph.
In one embodiment, as shown in fig. 5, an implementation of step S400 includes:
step S410, training the first mapping entity and the second mapping entity according to the first scoring function, so as to obtain a first embedded entity corresponding to the first mapping entity and a second embedded entity corresponding to the second mapping entity.
And step S420, training the target relation and the entity relation mapping vector according to a second scoring function to obtain a target embedding relation corresponding to the target relation.
The preset scoring function comprises a first scoring function and a second scoring function.
Optionally, determining an entity portrait corresponding to the second entity according to the relation between the first mapping entity and the target; acquiring the similarity between the second mapping entity and the entity portrait; and training the first mapping entity and the second mapping entity according to the first scoring function and the mapping similarity to obtain a first embedded entity corresponding to the first mapping entity and a second embedded entity corresponding to the second mapping entity.
Specifically, for an entity, first, a mapping of a head entity and a relationship is used to render a tail entity (an entity representation corresponding to a second entity), and h is addedThe linear operation of the sum r is seen as tIs mapped tomappingAccording to the parallelogram rule of vector space, the following can be obtained:
tmapping=h+r (6)
where h is the first entity, t is the second entity, hIs a first mapping entity, tIs the second mapping entity.
Next, the similarity of the head entity (first entity), tail entity (second entity) operations (similarity between the second mapping entity and the entity representation) is computed. Calculation of Tail entity t Using l1, l2-normAnd the calculated mapping tmappingThe similarity between the two is shown as a formula (7):
Figure BDA0002905496810000111
inside the sliding window, h is needed due to the TransU modelAnd tThe relation vectors r on the hyperplane can be connected in a low-error mode to satisfy the formula (2), the formula (3) and the formula (7). Therefore, the scoring function can be expressed by formula (8).
Figure BDA0002905496810000112
The first scoring function of equation (8) is converted to a minimization problem with constraints (e.g., equation (9)), and then trained.
Figure BDA0002905496810000113
In order to solve the problem of long training time of an entity which does not occur frequently, an Adadelta training model with self-adaptive capacity can be adopted. The model may use an exponentially decaying average value of the squared gradient, E g2]Sum squared update E [ Delta ]2]To enlarge recent gradients and updates.
For the relationship, an adaptive learning model based on a circulant matrix is set inside a sliding window. For each quadruple<h,r,t,τ>Setting an entity embedding expression E ═ { h, t } ∈ EnThe relationship embedding is expressed as R ∈ Rn. For each R, by a cyclic matrix A ∈ Rn×mOr A ∈ Rm×n(m>n), mapping the entity vector e to obtain a vector er. Here, let AerFor the right circulant matrix, the left circulant matrix is similar, and the second scoring function is shown in equation (10):
Figure BDA0002905496810000114
in the training phase, a scoring function f based on a circulant matrixr(h, t) can be converted into a minimization problem with constraints, and an Adadelta model with self-adaptive capacity can be selected to optimize the solution.
Through the optimization of the first scoring function corresponding to the above formula (9), a first embedded entity corresponding to the first mapping entity and a second embedded entity corresponding to the second mapping entity can be obtained. And obtaining the target embedding relationship corresponding to the target relationship through the second scoring function corresponding to the formula (10). The first embedded entity, the second embedded entity and the target embedded relation are embedded representations corresponding to a target knowledge graph, the characteristics of the first entity, the second entity and the target relation can be considered, and at least one of semantic knowledge and association relation corresponding to the target knowledge graph is accurately predicted by applying the first embedded entity, the second embedded entity and the target embedded relation.
In the above embodiment, the knowledge graph embedding representation includes a first embedding entity, a second embedding entity, and a target embedding relationship, and is optimized through a scoring function, and the knowledge graph embedding representation can give consideration to characteristics of the first embedding entity, the second embedding entity, and the target embedding relationship.
In one embodiment, the prediction method based on the knowledge-graph embedded representation further comprises:
setting a corresponding time window for the target knowledge graph, and constructing the target knowledge graph based on streaming data; and according to the time window, executing the step of obtaining a target knowledge graph based on semantic knowledge and association relation until a first embedded entity, a second embedded entity and the target embedded relation are obtained, and applying the first embedded entity, the second embedded entity and the target embedded relation to predict at least one of the semantic knowledge and the association relation corresponding to the target knowledge graph based on the streaming data.
Specifically, in order to meet the dynamic change of the data stream corresponding to the knowledge graph, a corresponding time window is set for the target knowledge graph, and the target knowledge graph based on the streaming data is constructed. When embedding the knowledge map, the step of obtaining a target knowledge map based on semantic knowledge and association relation can be executed according to a time window, a first normal vector and a second normal vector corresponding to the target relation are obtained, a relation matrix formed based on the first entity, the second entity and the target relation is obtained, a first mapping entity corresponding to the first entity is determined according to the first normal vector, a second mapping entity corresponding to the second entity is determined according to the second normal vector, an entity relation mapping vector corresponding to the target relation is determined according to a circulation matrix corresponding to the relation matrix, the first mapping entity, the second mapping entity and the entity relation mapping vector are trained according to a preset scoring function, and a first embedding entity corresponding to the first mapping entity, a second embedding entity corresponding to the second mapping entity and a target embedding relation corresponding to the target relation are obtained, and applying the first embedded entity, the second embedded entity and the target embedded relation to predict at least one of semantic knowledge and association relation corresponding to the target knowledge graph based on the streaming data. τ in the above embodiment represents a time stamp, and Ω is a time window. By setting the time window Ω, embedded representation based on the streaming knowledge graph can be realized.
In the above embodiment, by setting the time window, the continuously changing data stream may be subjected to embedded representation of the knowledge graph, and based on the embedded representation of the knowledge graph, at least one of semantic knowledge and association relationship corresponding to the target knowledge graph based on the streaming data may be predicted.
It should be understood that although the various steps in the flowcharts of fig. 1-3, 5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-3 and 5 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least some of the other steps or stages.
In one embodiment, as shown in fig. 6, there is provided a prediction apparatus based on a knowledge-graph embedded representation, comprising: a first data acquisition module 601, a second data acquisition module 602, a mapping data acquisition module 603, a data embedding representation module 604, and an embedding prediction module 605, wherein:
the first data acquisition module 601 is configured to acquire a target knowledge graph based on semantic knowledge and an association relationship, and acquire a triplet in the target knowledge graph, where the triplet includes a first entity, a second entity, and a target relationship;
a second data obtaining module 602, configured to obtain a first normal vector and a second normal vector corresponding to a target relationship, and obtain a relationship matrix formed based on the first entity, the second entity, and the target relationship;
a mapping data obtaining module 603, configured to determine a first mapping entity corresponding to the first entity according to the first normal vector, determine a second mapping entity corresponding to the second entity according to the second normal vector, and determine an entity relationship mapping vector corresponding to the target relationship according to a cyclic matrix corresponding to the relationship matrix;
the data embedding representation module 604 is configured to train the first mapping entity, the second mapping entity, and the entity relationship mapping vector according to a preset scoring function, so as to obtain a first embedding entity corresponding to the first mapping entity, a second embedding entity corresponding to the second mapping entity, and a target embedding relationship corresponding to the target relationship;
and the embedded prediction module 605 is configured to apply the first embedded entity, the second embedded entity, and the target embedded relationship to predict at least one of semantic knowledge and an association relationship corresponding to the target knowledge graph.
In one embodiment, the first data obtaining module 601 is further configured to determine the knowledge graph corresponding to the first entity and the second entity as the target knowledge graph if the inverse relationship between the first entity and the second entity is inconsistent with the target relationship, or the semantic category corresponding to the first entity is inconsistent with the semantic category corresponding to the second entity, or the out-degree or in-degree corresponding to the first entity or the second entity is inconsistent, or the number of first entities corresponding to the target relationship connection is inconsistent with the number of second entities.
In one embodiment, the mapping data obtaining module 603 is further configured to map the first entity to a first hyperplane corresponding to the first normal vector, so as to obtain a first mapping entity; mapping the second entity to a second hyperplane corresponding to a second normal vector to obtain a second mapping entity; and for the target relation, mapping the first entity and the second entity through the cyclic matrix corresponding to the relation matrix to obtain an entity relation mapping vector corresponding to the target relation.
In one embodiment, the mapping data obtaining module 603 is further configured to translate elements in the relationship matrix to obtain a cyclic matrix.
In one embodiment, the preset scoring function comprises a first scoring function and a second scoring function; the mapping data obtaining module 603 is further configured to train the first mapping entity and the second mapping entity according to the first scoring function, so as to obtain a first embedded entity corresponding to the first mapping entity and a second embedded entity corresponding to the second mapping entity; and training the target relation and the entity relation mapping vector according to the second scoring function to obtain a target embedding relation corresponding to the target relation.
In one embodiment, the data embedding representation module 604 is further configured to determine an entity representation corresponding to the second entity according to the first mapping entity and the target relationship; acquiring the similarity between the second mapping entity and the entity portrait; and training the first mapping entity and the second mapping entity according to the first scoring function and the mapping similarity to obtain a first embedded entity corresponding to the first mapping entity and a second embedded entity corresponding to the second mapping entity.
In one embodiment, the prediction apparatus based on the embedded representation of the knowledge graph further comprises a data flow determination module, configured to set a corresponding time window for the target knowledge graph, and construct a target knowledge graph based on the streaming data; and according to the time window, executing the step of obtaining a target knowledge graph based on semantic knowledge and association relation until a first embedded entity, a second embedded entity and the target embedded relation are obtained, and applying the first embedded entity, the second embedded entity and the target embedded relation to predict at least one of the semantic knowledge and the association relation corresponding to the target knowledge graph based on the streaming data.
For specific limitations of the prediction apparatus based on the knowledge-graph embedded representation, reference may be made to the above limitations of the prediction method based on the knowledge-graph embedded representation, which are not described herein again. The various modules in the prediction apparatus based on the knowledge-map embedded representation described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a prediction method based on an embedded representation of a knowledge-graph. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring a target knowledge graph based on semantic knowledge and association relation, and acquiring triples in the target knowledge graph, wherein the triples comprise a first entity, a second entity and a target relation;
acquiring a first normal vector and a second normal vector corresponding to the target relationship, and acquiring a relationship matrix formed based on the first entity, the second entity and the target relationship;
determining a first mapping entity corresponding to the first entity according to the first normal vector, determining a second mapping entity corresponding to the second entity according to the second normal vector, and determining an entity relation mapping vector corresponding to the target relation according to a cyclic matrix corresponding to the relation matrix;
training the first mapping entity, the second mapping entity and the entity relationship mapping vector according to a preset scoring function to obtain a first embedded entity corresponding to the first mapping entity, a second embedded entity corresponding to the second mapping entity and a target embedded relationship corresponding to the target relationship;
and applying the first embedded entity, the second embedded entity and the target embedded relation to predict at least one of semantic knowledge and association relation corresponding to the target knowledge graph.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and if the reverse relationship between the first entity and the second entity is inconsistent with the target relationship, or the semantic category corresponding to the first entity is inconsistent with the semantic category corresponding to the second entity, or the out-degree or in-degree corresponding to the first entity or the second entity is inconsistent, or the number of the first entity corresponding to the target relationship connection is inconsistent with the number of the second entity, determining the knowledge map spectrum corresponding to the first entity and the second entity as the target knowledge map.
In one embodiment, the processor, when executing the computer program, further performs the steps of: mapping the first entity to a first hyperplane corresponding to the first normal vector to obtain a first mapping entity; mapping the second entity to a second hyperplane corresponding to a second normal vector to obtain a second mapping entity; and for the target relation, mapping the first entity and the second entity through the cyclic matrix corresponding to the relation matrix to obtain an entity relation mapping vector corresponding to the target relation.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and translating the elements in the relation matrix to obtain a cyclic matrix.
In one embodiment, the processor, when executing the computer program, further performs the steps of: training the first mapping entity and the second mapping entity according to a first scoring function to obtain a first embedded entity corresponding to the first mapping entity and a second embedded entity corresponding to the second mapping entity; and training the target relation and the entity relation mapping vector according to the second scoring function to obtain a target embedding relation corresponding to the target relation.
In one embodiment, the processor, when executing the computer program, further performs the steps of: determining an entity portrait corresponding to the second entity according to the relation between the first mapping entity and the target; acquiring the similarity between the second mapping entity and the entity portrait; and training the first mapping entity and the second mapping entity according to the first scoring function and the mapping similarity to obtain a first embedded entity corresponding to the first mapping entity and a second embedded entity corresponding to the second mapping entity.
In one embodiment, the processor, when executing the computer program, further performs the steps of: setting a corresponding time window for the target knowledge graph, and constructing the target knowledge graph based on streaming data; and according to the time window, executing the step of obtaining a target knowledge graph based on semantic knowledge and association relation until a first embedded entity, a second embedded entity and the target embedded relation are obtained, and applying the first embedded entity, the second embedded entity and the target embedded relation to predict at least one of the semantic knowledge and the association relation corresponding to the target knowledge graph based on the streaming data.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a target knowledge graph based on semantic knowledge and association relation, and acquiring triples in the target knowledge graph, wherein the triples comprise a first entity, a second entity and a target relation;
acquiring a first normal vector and a second normal vector corresponding to the target relationship, and acquiring a relationship matrix formed based on the first entity, the second entity and the target relationship;
determining a first mapping entity corresponding to the first entity according to the first normal vector, determining a second mapping entity corresponding to the second entity according to the second normal vector, and determining an entity relation mapping vector corresponding to the target relation according to a cyclic matrix corresponding to the relation matrix;
training the first mapping entity, the second mapping entity and the entity relationship mapping vector according to a preset scoring function to obtain a first embedded entity corresponding to the first mapping entity, a second embedded entity corresponding to the second mapping entity and a target embedded relationship corresponding to the target relationship;
and applying the first embedded entity, the second embedded entity and the target embedded relation to predict at least one of semantic knowledge and association relation corresponding to the target knowledge graph.
In one embodiment, the computer program when executed by the processor further performs the steps of: and if the reverse relationship between the first entity and the second entity is inconsistent with the target relationship, or the semantic category corresponding to the first entity is inconsistent with the semantic category corresponding to the second entity, or the out-degree or in-degree corresponding to the first entity or the second entity is inconsistent, or the number of the first entity corresponding to the target relationship connection is inconsistent with the number of the second entity, determining the knowledge map spectrum corresponding to the first entity and the second entity as the target knowledge map.
In one embodiment, the computer program when executed by the processor further performs the steps of: mapping the first entity to a first hyperplane corresponding to the first normal vector to obtain a first mapping entity; mapping the second entity to a second hyperplane corresponding to a second normal vector to obtain a second mapping entity; and for the target relation, mapping the first entity and the second entity through the cyclic matrix corresponding to the relation matrix to obtain an entity relation mapping vector corresponding to the target relation.
In one embodiment, the computer program when executed by the processor further performs the steps of: and translating the elements in the relation matrix to obtain a cyclic matrix.
In one embodiment, the computer program when executed by the processor further performs the steps of: training the first mapping entity and the second mapping entity according to a first scoring function to obtain a first embedded entity corresponding to the first mapping entity and a second embedded entity corresponding to the second mapping entity; and training the target relation and the entity relation mapping vector according to the second scoring function to obtain a target embedding relation corresponding to the target relation.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining an entity portrait corresponding to the second entity according to the relation between the first mapping entity and the target; acquiring the similarity between the second mapping entity and the entity portrait; and training the first mapping entity and the second mapping entity according to the first scoring function and the mapping similarity to obtain a first embedded entity corresponding to the first mapping entity and a second embedded entity corresponding to the second mapping entity.
In one embodiment, the computer program when executed by the processor further performs the steps of: setting a corresponding time window for the target knowledge graph, and constructing the target knowledge graph based on streaming data; and according to the time window, executing the step of obtaining a target knowledge graph based on semantic knowledge and association relation until a first embedded entity, a second embedded entity and the target embedded relation are obtained, and applying the first embedded entity, the second embedded entity and the target embedded relation to predict at least one of the semantic knowledge and the association relation corresponding to the target knowledge graph based on the streaming data.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A prediction method based on an embedded representation of a knowledge-graph, the method comprising:
acquiring a target knowledge graph based on semantic knowledge and association relation, and acquiring triples in the target knowledge graph, wherein the triples comprise a first entity, a second entity and a target relation;
acquiring a first normal vector and a second normal vector corresponding to the target relationship, and acquiring a relationship matrix formed based on the first entity, the second entity and the target relationship;
determining a first mapping entity corresponding to the first entity according to the first normal vector, determining a second mapping entity corresponding to the second entity according to the second normal vector, and determining an entity relation mapping vector corresponding to the target relation according to a cyclic matrix corresponding to the relation matrix;
training the first mapping entity, the second mapping entity and the entity relationship mapping vector according to a preset scoring function to obtain a first embedded entity corresponding to the first mapping entity, a second embedded entity corresponding to the second mapping entity and a target embedded relationship corresponding to the target relationship;
and applying the first embedded entity, the second embedded entity and the target embedded relation to predict at least one of semantic knowledge and association relation corresponding to the target knowledge graph.
2. The method of claim 1, wherein obtaining a target knowledge graph based on semantic knowledge and associative relations comprises:
and if the reverse relationship between the first entity and the second entity is inconsistent with the target relationship, or the semantic category corresponding to the first entity is inconsistent with the semantic category corresponding to the second entity, or the out-degree or in-degree corresponding to the first entity or the second entity is inconsistent, or the number of first entities corresponding to the target relationship connection is inconsistent with the number of second entities corresponding to the target relationship connection, determining the knowledge graph spectrum corresponding to the first entity and the second entity as the target knowledge graph spectrum.
3. The method of claim 1, wherein the determining a first mapping entity corresponding to the first entity according to the first normal vector, determining a second mapping entity corresponding to the second entity according to the second normal vector, and determining an entity relationship mapping vector corresponding to the target relationship according to a cyclic matrix corresponding to the relationship matrix comprises:
mapping the first entity to a first hyperplane corresponding to the first normal vector to obtain a first mapping entity;
mapping the second entity to a second hyperplane corresponding to the second normal vector to obtain a second mapping entity;
and for the target relationship, mapping the first entity and the second entity through a cyclic matrix corresponding to the relationship matrix to obtain an entity relationship mapping vector corresponding to the target relationship.
4. The method of claim 1, wherein the obtaining of the circulant matrix comprises:
and translating the elements in the relation matrix to obtain the cyclic matrix.
5. The method of claim 1, wherein the preset scoring function comprises a first scoring function and a second scoring function;
the training the first mapping entity, the second mapping entity and the entity relationship mapping vector according to a preset scoring function to obtain a first embedded entity corresponding to the first mapping entity, a second embedded entity corresponding to the second mapping entity and a target embedded relationship corresponding to the target relationship comprises:
training the first mapping entity and the second mapping entity according to the first scoring function to obtain a first embedded entity corresponding to the first mapping entity and a second embedded entity corresponding to the second mapping entity;
and training the target relation and the entity relation mapping vector according to the second scoring function to obtain a target embedding relation corresponding to the target relation.
6. The method according to claim 5, wherein the training the first mapping entity and the second mapping entity according to the first scoring function to obtain a first embedded entity corresponding to the first mapping entity and a second embedded entity corresponding to the second mapping entity comprises:
determining an entity portrait corresponding to the second entity according to the first mapping entity and the target relation;
obtaining a similarity between the second mapping entity and the entity representation;
and training the first mapping entity and the second mapping entity according to the first scoring function and the mapping similarity to obtain a first embedded entity corresponding to the first mapping entity and a second embedded entity corresponding to the second mapping entity.
7. The method according to any one of claims 1 to 6, further comprising:
setting a corresponding time window for the target knowledge graph, and constructing a target knowledge graph based on streaming data;
and according to the time window, executing the step of obtaining the target knowledge graph based on the semantic knowledge and the association relation until the first embedded entity, the second embedded entity and the target embedded relation are obtained, and applying the first embedded entity, the second embedded entity and the target embedded relation to predict at least one of the semantic knowledge and the association relation corresponding to the target knowledge graph based on the streaming data.
8. A prediction apparatus based on a knowledge-graph-embedded representation, the apparatus comprising:
the system comprises a first data acquisition module, a second data acquisition module and a third data acquisition module, wherein the first data acquisition module is used for acquiring a target knowledge graph based on semantic knowledge and association relation and acquiring triples in the target knowledge graph, and the triples comprise a first entity, a second entity and a target relation;
the second data acquisition module is used for acquiring a first normal vector and a second normal vector corresponding to the target relationship and acquiring a relationship matrix formed based on the first entity, the second entity and the target relationship;
a mapping data obtaining module, configured to determine a first mapping entity corresponding to the first entity according to the first normal vector, determine a second mapping entity corresponding to the second entity according to the second normal vector, and determine an entity relationship mapping vector corresponding to the target relationship according to a cyclic matrix corresponding to the relationship matrix;
the data embedding representation module is used for training the first mapping entity, the second mapping entity and the entity relationship mapping vector according to a preset scoring function to obtain a first embedding entity corresponding to the first mapping entity, a second embedding entity corresponding to the second mapping entity and a target embedding relationship corresponding to the target relationship;
and the embedded prediction module is used for applying the first embedded entity, the second embedded entity and the target embedded relation to predict at least one of semantic knowledge and association relation corresponding to the target knowledge graph.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110070124.7A 2021-01-19 2021-01-19 Prediction method and device based on knowledge graph embedded representation and computer equipment Active CN112800237B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110070124.7A CN112800237B (en) 2021-01-19 2021-01-19 Prediction method and device based on knowledge graph embedded representation and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110070124.7A CN112800237B (en) 2021-01-19 2021-01-19 Prediction method and device based on knowledge graph embedded representation and computer equipment

Publications (2)

Publication Number Publication Date
CN112800237A true CN112800237A (en) 2021-05-14
CN112800237B CN112800237B (en) 2023-08-11

Family

ID=75810470

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110070124.7A Active CN112800237B (en) 2021-01-19 2021-01-19 Prediction method and device based on knowledge graph embedded representation and computer equipment

Country Status (1)

Country Link
CN (1) CN112800237B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113946695A (en) * 2021-12-20 2022-01-18 山东新希望六和集团有限公司 Method and device for generating animal pedigree and computer equipment
CN114022058A (en) * 2022-01-06 2022-02-08 成都晓多科技有限公司 Small and medium-sized enterprise confidence loss risk prediction method based on time sequence knowledge graph
CN115114411A (en) * 2022-08-30 2022-09-27 中国科学院自动化研究所 Prediction method and device based on knowledge graph and electronic equipment
CN115964503A (en) * 2021-12-28 2023-04-14 北方工业大学 Safety risk prediction method and system based on community equipment facilities
CN115964504A (en) * 2021-12-28 2023-04-14 北方工业大学 Food safety risk prediction method and system
CN116934556A (en) * 2023-09-08 2023-10-24 四川三思德科技有限公司 Target personnel accurate control method based on big data fusion

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528609A (en) * 2016-09-28 2017-03-22 厦门理工学院 Vector constraint embedded transformation knowledge graph inference method
US20190122111A1 (en) * 2017-10-24 2019-04-25 Nec Laboratories America, Inc. Adaptive Convolutional Neural Knowledge Graph Learning System Leveraging Entity Descriptions
CN111221981A (en) * 2019-12-31 2020-06-02 腾讯科技(深圳)有限公司 Method and device for training knowledge graph embedded model and computer storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528609A (en) * 2016-09-28 2017-03-22 厦门理工学院 Vector constraint embedded transformation knowledge graph inference method
US20190122111A1 (en) * 2017-10-24 2019-04-25 Nec Laboratories America, Inc. Adaptive Convolutional Neural Knowledge Graph Learning System Leveraging Entity Descriptions
CN111221981A (en) * 2019-12-31 2020-06-02 腾讯科技(深圳)有限公司 Method and device for training knowledge graph embedded model and computer storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杜文倩;李弼程;王瑞;: "融合实体描述及类型的知识图谱表示学习方法", 中文信息学报, no. 07 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113946695A (en) * 2021-12-20 2022-01-18 山东新希望六和集团有限公司 Method and device for generating animal pedigree and computer equipment
CN115964503A (en) * 2021-12-28 2023-04-14 北方工业大学 Safety risk prediction method and system based on community equipment facilities
CN115964504A (en) * 2021-12-28 2023-04-14 北方工业大学 Food safety risk prediction method and system
CN115964504B (en) * 2021-12-28 2023-06-30 北方工业大学 Food safety risk prediction method and system
CN115964503B (en) * 2021-12-28 2023-07-07 北方工业大学 Safety risk prediction method and system based on community equipment facilities
CN114022058A (en) * 2022-01-06 2022-02-08 成都晓多科技有限公司 Small and medium-sized enterprise confidence loss risk prediction method based on time sequence knowledge graph
CN115114411A (en) * 2022-08-30 2022-09-27 中国科学院自动化研究所 Prediction method and device based on knowledge graph and electronic equipment
CN116934556A (en) * 2023-09-08 2023-10-24 四川三思德科技有限公司 Target personnel accurate control method based on big data fusion
CN116934556B (en) * 2023-09-08 2023-12-26 四川三思德科技有限公司 Target personnel accurate control method based on big data fusion

Also Published As

Publication number Publication date
CN112800237B (en) 2023-08-11

Similar Documents

Publication Publication Date Title
CN112800237A (en) Prediction method and device based on knowledge graph embedded representation and computer equipment
CN111191791B (en) Picture classification method, device and equipment based on machine learning model
US20230023101A1 (en) Data processing method and device
US11694109B2 (en) Data processing apparatus for accessing shared memory in processing structured data for modifying a parameter vector data structure
CN114048331A (en) Knowledge graph recommendation method and system based on improved KGAT model
EP4163831A1 (en) Neural network distillation method and device
KR20200060302A (en) Processing method and apparatus
CN113705772A (en) Model training method, device and equipment and readable storage medium
CA3108956C (en) Adaptive differentially private count
US20220076052A1 (en) Similarity determining method and device, network training method and device, search method and device, and electronic device and storage medium
US20140279771A1 (en) Novel Quadratic Regularization For Neural Network With Skip-Layer Connections
Xu et al. Bipolar fuzzy Petri nets for knowledge representation and acquisition considering non-cooperative behaviors
CN111339724B (en) Method, apparatus and storage medium for generating data processing model and layout
Mai et al. Optimization of interval type-2 fuzzy system using the PSO technique for predictive problems
CN113566831B (en) Unmanned aerial vehicle cluster navigation method, device and equipment based on human-computer interaction
Verma et al. A systematic review on the advancement in the study of fuzzy variational problems
CN116168053B (en) Polyp segmentation model training method, polyp segmentation method and related device
CN116072298B (en) Disease prediction system based on hierarchical marker distribution learning
Yang et al. Efficient knowledge management for heterogenous federated continual learning on resource-constrained edge devices
Vivar et al. Peri-diagnostic decision support through cost-efficient feature acquisition at test-time
CN113947185B (en) Task processing network generation method, task processing device, electronic equipment and storage medium
CN113762648B (en) Method, device, equipment and medium for predicting male Wei Heitian goose event
CN114707643A (en) Model segmentation method and related equipment thereof
Yu et al. Dynamic knowledge distillation for black-box hypothesis transfer learning
You et al. A fast, memory-efficient alpha-tree algorithm using flooding and tree size estimation

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