An entity alignment method based on triple attention and type space enhancement

By employing a triplet-based attention and type space enhancement approach, the problem of external attribute unavailability in cross-linguistic entity alignment is addressed, resulting in more accurate cross-linguistic knowledge graph entity alignment and improved semantic fusion depth and alignment performance of triples.

CN115964515BActive Publication Date: 2025-12-05TONGJI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310087096.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-19
Publication Date
2025-12-05
Estimated Expiration
2043-01-19

AI Technical Summary

Technical Problem

Existing cross-language entity alignment methods are limited in cross-domain applications by the unavailability or unreliability of external knowledge attributes, resulting in the underutilization of semantic relationships and type features within triples. Furthermore, existing methods ignore the overall representation of triples, affecting the unified representation effect of cross-language knowledge graphs.

Method used

We employ a method based on triple attention and type space enhancement. By expanding the adjacency relationships of the knowledge graph, we obtain topological structure information, use triple attention to form an overall representation in the semantic space, and combine it with global relationship enhancement in the type space to form a hierarchical cyclic representation of head and tail entities, ultimately achieving entity alignment.

Benefits of technology

It improves the expressiveness of cross-language entity alignment, reduces noise from external attributes, enhances the semantic fusion depth of triples, and achieves more accurate cross-language knowledge graph entity alignment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115964515B_ABST
    Figure CN115964515B_ABST
Patent Text Reader

Abstract

The application relates to an entity alignment method based on triple attention and type space enhancement, which comprises the following steps: extending the adjacency relation of entities in a knowledge graph and obtaining topological structure information of the knowledge graph; overall using information carried by triples, using triple attention in a semantic space to obtain overall triple representation of the semantic space; using global relation triples of a type space to strengthen the semantic space representation again, forming type space enhanced triple fusion representation; using triple fusion representation to pay attention to head and tail entities, respectively forming head and tail entity representations and mutually strengthening the head and tail entity representations in the head and tail entity representation stage, forming final entity representation, and realizing entity alignment of the knowledge graph. Compared with the prior art, the application avoids noise caused by external attributes and space transformation, and can better perform cross-language entity alignment by using type enhanced triple overall representation and head and tail entity role features.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of multilingual and cross-lingual natural language processing, and in particular to a cross-lingual entity alignment method based on triple attention and type space enhancement. BACKGROUND

[0002] With the continuous fermentation and diffusion of social risk events, the event and its element information gradually show the characteristics of cross-lingual and multi-domain cross. Especially with the rise of mobile Internet, the spread of social risk events has become more fragmented and decentralized, making the perception and regulation of social risk events more complex. In addition, due to the specificity of different fields, the same element has different representations in different fields, and the knowledge of different fields is integrated into different knowledge graphs. Therefore, how to uniformly represent cross-domain and cross-lingual risk event knowledge is the focus of our research, and cross-knowledge graph entity alignment is the element-level research focus of event uniform representation.

[0003] Cross-lingual entity alignment has always been one of the research hotspots of natural language processing and knowledge fusion. The current cross-lingual entity alignment method takes the Embedding-based representation method as the core, which can be divided into two types: whether to use external attribute information. The method of not using external attributes mainly includes 1) updating the attention relationship of entities based on TransE and its variants, and 2) using graph neural networks (GNNs) and their variants to fuse the topological structure information of knowledge graphs (KGs), trying to reflect the association between entities to strengthen the representation of entities. The method of using external attributes mainly uses the fusion of entity names, entity descriptions and other external semantics to strengthen the representation of entities, supplemented by topological structure internal information to enhance the fusion representation of entities.

[0004] In these existing technical solutions, the external knowledge attributes of some fields are not available or not reliable, so that the method of using external attribute knowledge cannot be applied to general domain knowledge. In the related research without using external attribute knowledge, the entity representation relationship is mainly mapped to the representation of the entity, thereby optimizing the representation of the entity. However, in these methods, the components in the triple are independent, and there are few overall representations of triples, thereby ignoring the semantic relationship between the head entity-relation-tail entity in the triple and the semantic enhancement effect of the type triple. Therefore, exploring the internal association of triples and aligning the knowledge of the overall triple representation is also an important problem in the present application. SUMMARY

[0005] The purpose of the present application is to provide a kind of entity alignment method based on triple attention and type space enhancement to overcome the defects of prior art.

[0006] The purpose of the present application can be realized by the following technical solutions:

[0007] A kind of entity alignment method based on triple attention and type space enhancement, the entity alignment method includes the following steps:

[0008] The adjacent relationship of the entity in the extended knowledge graph is expanded, and the topological structure information of the knowledge graph is obtained;

[0009] The information carried by the triple is used as a whole, and the triple attention is used in semantic space to obtain the overall triple representation of semantic space;

[0010] The semantic space representation is strengthened again using the global relationship triple of type space, forming the triple fusion representation strengthened by type space;

[0011] The head and tail entity attention is obtained using the triple fusion representation, the head and tail entity representation is formed respectively and strengthened in the head and tail entity representation stage, forming the final entity representation, and the entity alignment of the knowledge graph is realized.

[0012] Further, the step of expanding the adjacent relationship of the entity in the knowledge graph includes:

[0013] The entity name-based embedding is obtained using the Glove word vector model, and each knowledge graph relationship is expanded to a combination of original relationship, inverse relationship and self relationship.

[0014] Further, the step of obtaining the topological information of the knowledge graph includes:

[0015] The topological structure between entities is represented using graph convolutional neural network, and the calculation method is as follows:

[0016]

[0017] Wherein, The entity adjacency matrix is represented, I represents the unit matrix, The degree matrix of X (l) The entity representation of the lth layer is represented, and ReLU represents the relu activation function.

[0018] The topological structure and the original entity features are balanced using high-speed network, and the calculation method is as follows:

[0019]

[0020]

[0021] where T(·) denotes the transformer of Highway network, σ denotes the sigmod activation function, W (l) ,b (l) denote the relevant trainable parameters.

[0022] Further, the semantic space triple representation is obtained by using the triple attention in the semantic space:

[0023] The triple semantic representation is regarded as a whole in the semantic space, the association between the internal relations of the triple is considered, the head entity, the tail entity and the triple relation are obtained by using the triple attention to obtain the deep representation, and the original triple semantic is combined to retain the unique relation of the triple, so that the semantic space representation of the triple is formed.

[0024] Further, the specific steps of obtaining the semantic space whole triple representation by using the triple attention in the semantic space include:

[0025] For a specific triple (e i ,r,e j ), where e i , e j denote the head and tail entities of the triple with relation r, first, the splicing of the head and tail entities is taken as the preliminary representation of the specific triple relation, and the representation method is as follows:

[0026]

[0027] where e i , e j denote the head and tail entity embeddings of the triple with relation r; || denotes the splicing operation; W sr ,b sr denote the fully connected layer parameters; σ denotes the fully connected layer activation function.

[0028] The triple attention mechanism is used to obtain the enhanced representation of the triple in the semantic space, and the specific representation method is as follows:

[0029] The head entity is calculated as follows:

[0030]

[0031]

[0032]

[0033] where W h ,W hT denote the attention parameters of the head entity and the triple respectively; h r denotes the set of head entities containing the fixed relation r in the triple. denotes the preliminary representation of a specific triple relation; T r denotes the set of triples whose relation is r; denotes the head entity representation of a triple;

[0034] The tail entity pair triple attention is calculated as follows:

[0035]

[0036]

[0037] where W t ,W tT denote the attention parameters of the tail entity and the triple, respectively; t r denotes the set of tail entities in the triple that contain the fixed relation r; denotes the tail entity representation of a triple;

[0038] The relation pair triple attention is calculated as follows:

[0039]

[0040]

[0041] where W ij ,W rT denote the attention parameters of the triple and the relation, respectively; denotes the relation representation of a triple;

[0042] To retain the characteristics of each triple itself carrying its own specificity, the triple-specific attention is calculated as follows:

[0043]

[0044]

[0045] where W sp ,b sp denote the parameters of the fully connected layer; σ denotes the fully connected layer activation function; denotes the global feature of the triple whose relation is r; is the global specificity feature representation of the triple (e i , r, e j );

[0046] The original triple feature representation is fused with the triple representation obtained by attention to form the semantic space triple representation, and the specific calculation method is as follows:

[0047]

[0048] in, The head entity representation of the triple; The tail entity representation of the triple; Representation of the relation of triples; S represents the global specific features of a triple; irj It is a semantic space triple representation.

[0049] Furthermore, the use of global relation triples in the type space to further enhance the semantic space representation, forming a holistic triple fusion representation containing more information, includes:

[0050] Type triples are constructed by utilizing the global relation features of triples in the type space and the overall entity pairs, and then fused with semantic space triples to form an enhanced representation of the triples through mutual attention.

[0051] Furthermore, the use of global relation triples in the type space to further enhance the semantic space representation, forming a holistic triple fusion representation containing more information, includes:

[0052] The influence of the unique type features of triples on the representation of triples is used. The average of each entity pair in a triple and the entity pairs with the same relationship is used as the type global relation representation of the triple. This is combined with the type space-enhanced semantic representation of triples to form a fusion representation from the perspective of triples.

[0053] Furthermore, the specific steps for further strengthening the semantic space representation using global relation triples of the type space to form a type space triple representation containing more information include:

[0054] Mapping the head and tail entities from the semantic space to the type space:

[0055] e = tanh(W) st e+b st )

[0056] Among them, W st and b st The shared spatial transformation parameters are represented; e on the left and right sides of the formula are the entity embedding representations in the type space and semantic space, respectively; tanh is the activation function during the spatial transformation process.

[0057] Considering the indivisibility of head and tail entity pairs in the type space and the global significance of relations in the type space, triples (e) that share the same relation in the type space are defined as follows: i ,r,e j The average of the concatenated head and tail entities is used as the global representation of the type triple relation:

[0058]

[0059] where T r denotes the set of head and tail entities of the triple with relation r; e i , e j denote the head and tail entity embeddings of the triple with relation r, respectively, and || denotes the concatenation operation. denotes the global representation of the type space relation;

[0060] The type space triple representation is constructed from the type space head and tail entity pairs and the global relation, with the specific calculation as follows:

[0061]

[0062] where, is the type space specific triple representation; W tp ,b tp denote the fully connected layer parameters, and σ denotes the fully connected layer activation function.

[0063] Considering the generality of the triple relations in the semantic space and the type space, the mutual attention of the semantic space overall representation and the type space overall representation of each triple is calculated to strengthen the type features and the triple-specific features to represent the triple. The specific calculation is as follows:

[0064]

[0065]

[0066]

[0067]

[0068] where W t , W s are the type space and semantic space triple attention parameters, respectively; denotes the type triple with relation r; S i'rj' denotes the semantic triple with relation r; and are the type-enhanced semantic triple representation and the semantic-enhanced type triple representation, respectively;

[0069] The type space-enhanced triple fusion representation is specifically represented as follows:

[0070]

[0071] where S irj , denote the aforementioned semantic space triple representation, type space triple representation, semantic-enhanced triple representation, and type space-enhanced triple representation, respectively. global representation representing type space relationship; T irj is the final fusion representation of the triplets.

[0072] Further, the representation of the head-tail entity is cyclically enhanced to form the final entity representation: the head-tail entity is represented in a separate manner, and the representation of the head-tail entity is formed by means of triplet attention, and the representation of the head-tail entity is cyclically enhanced to form the final entity representation, and the specific representation process includes the following steps:

[0073] The attention representation of the head entity and the tail entity is formed respectively, and the calculation method is as follows:

[0074]

[0075]

[0076]

[0077]

[0078] Wherein, e i represents the head entity of the triplet; e j represents the tail entity of the triplet; T i represents the set of triplets whose head entity is e i ; T j represents the set of triplets whose tail entity is e j ; W er ,W eh ,W et represent triplet attention parameters, head entity attention parameters and tail entity attention parameters respectively; T irj is the fusion representation of a specific triplet; T ir'j' , T i'r'j is the fusion representation of the triplet with the same head entity or tail entity as T irj .

[0079] The head entity fusion is performed again on the representation of the head entity and the representation of the tail entity to form the final entity representation.

[0080] Further, the entity alignment method also constructs a margin-based loss function and a semi-supervised cyclic alignment strategy based on L1 norm distance:

[0081] After forming the head-tail entity representation by triplet attention, the k-neighbor negative samples inside and between the two knowledge graphs are constructed by adopting a negative sampling strategy for the head-tail entity of the triplet to form a triplet negative sample; considering L1 norm distance as an index for measuring the distance between vectors, a margin-based loss function is constructed;

[0082] Cycle semi-supervised training is adopted, and the entity pair with the closest distance in both directions is found from the data set after each set number of iterations to fill the data set as new seeds.

[0083] Compared with the prior art, the present application has the following beneficial effects:

[0084] 1) The present application proposes a cross-lingual entity alignment method based on triple attention and type space enhancement, including data preprocessing, semantic space triple attention, type space triple enhancement, head and tail entity two-stage cyclic enhancement, alignment strategy, etc. Considering the untrustworthiness or unavailability of external attributes of domain risk events, the present application does not use external attributes but only uses the topological structure of the knowledge graph, thereby avoiding the noise brought by external attributes.

[0085] 2) The present application uses the fusion representation of triples in semantic space and type space, and uses the relationship as the medium for information propagation in the two spaces, thereby avoiding or reducing the noise loss caused by space transformation.

[0086] 3) The present application uses triple attention in semantic space to form a fusion representation of triples using the internal association and component attention of triples, and fully considers the unique characteristic attributes of triples to form a triple semantic representation containing the unique characteristics of triples, thereby improving the fusion depth of triple semantics.

[0087] 4) The present application innovatively represents the head and tail entities in layers and cyclically enhances each other to obtain the final representation of the entities, thereby completing the cross-lingual entity alignment task with better expressiveness compared with the prior art. BRIEF DESCRIPTION OF DRAWINGS

[0088] Figure 1 The flowchart of the entity alignment method based on triple attention and type space enhancement of the present application;

[0089] Figure 2 The entity alignment process diagram based on triple attention and type space enhancement of the present application;

[0090] Figure 3 The result diagram of the comparison experiment between the alignment method of the present application and the prior art alignment method. DETAILED DESCRIPTION

[0091] The present application will be described in detail below in combination with the drawings and specific embodiments. The present embodiment is implemented on the premise of the technical solution of the present application, and detailed implementation modes and specific operation processes are given, but the protection scope of the present application is not limited to the following embodiments.

[0092] Embodiment 1

[0093] Focusing on the cross-social network user portrait and risk field multilingual knowledge alignment scene, the application proposes a cross-language entity alignment method based on triple attention and type space enhancement. Through the overall attention representation of semantic space triplets, the triple representation enhancement of type space and the hierarchical cyclic representation of head and tail entities, the entity alignment of cross-language knowledge graph with better expressiveness is realized, which includes the following three stages:

[0094] 1) Triple attention-based semantic space triple fusion representation: overall use the information carried by triplets, including the dispersed representation of head and tail entities, relationship pairs and the implicit unique features of triplets, form the fusion representation of triplets in semantic space, and consider retaining the unique features of triplets as much as possible, combine the attention representation with the original features to form the final representation of triplets in semantic space.

[0095] 2) Triple representation of type space enhancement: considering the enhanced representation of triple entity pairs to type semantics, using the overall entity of type space to enhance the representation fused in semantic space, forming a triple representation containing more information.

[0096] Further, due to the inseparability of type space to triple entity pairs, the overall head and tail entity pairs and global relationship representation of type space triplets are used, and based on the semantic space triplets, the enhanced representation of triplets is formed based on mutual attention.

[0097] The influence of triple-specific type features on the representation of triplets, taking the average of each entity pair of triplets and the entity pair with the same relationship as the global relationship representation of type triplets, combined with the triple semantic representation enhanced by type space to form a fusion representation from the perspective of triplets.

[0098] 3) Entity representation enhanced by head and tail entity attention cycle: considering the relationship overlap phenomenon of triplets, according to the order of head and tail entity separation, using triple representation to form the representation of head and tail entities by attention and mutually enhancing in the head and tail entity representation stage, forming the final entity representation.

[0099] Further, due to the existence of different types of relationship overlap in knowledge graph, the head and tail entity separation method is adopted, and the representation of head and tail entities is formed by the method of triple fusion representation attention, and is mutually enhanced in the representation process.

[0100] As shown in Figure 1 , it is a flow chart of the triple attention and type space enhanced cross-language entity alignment method, and the method steps include:

[0101] Step 1: Topology embedding polymerization: expand the adjacency relationship of entities in the knowledge graph, add the reverse relationship of the head and tail entities and the self-loop relationship of each entity in the original relationship, and use the combination of double-layer GCN and highway network to obtain the topology information of the knowledge graph.

[0102] Step 2: Semantic space triple generation based on attention: use the overall attention of the triple in the semantic space to obtain the semantic space representation of the triple for the first time.

[0103] Step 3: Type space enhanced triple fusion representation: in the type space, the head and tail entities are regarded as a whole, the mutual attention of the type global triple and the semantic triple is considered, and the fusion representation of the triple is enhanced.

[0104] Step 4: Cycle enhanced representation of head and tail entities: considering the possible overlap of the head and tail entities, the cycle representation of the head and tail entities is adopted to obtain the final fusion representation of the entities.

[0105] Step 5: Construct margin-based loss function and L1 norm distance-based semi-supervised cycle alignment strategy.

[0106] Figure 2 The specific process of cross-language entity alignment based on triple attention and type space enhancement is shown, and each step of the method is described in detail as follows:

[0107] The first step: for all entity nodes in the knowledge graph, considering the global representation ability of the Glove word vector model and the limitation of the knowledge graph required by the task, first, the embedding based on the entity name is obtained by using the Glove word vector model, and each knowledge graph is expanded to a combination of original relationship, reverse relationship and self-relationship. Since the graph convolutional neural network (GCN) can fully represent the topology structure between entities, its calculation method is as follows:

[0108]

[0109] Wherein, A represents the entity adjacency matrix, I represents the unit matrix, D represents the degree matrix of X (l) represents the entity representation of the lth layer.

[0110] In addition, considering the need to maintain the unique information features of the original entity as much as possible, the high-speed (highway) network is used to balance the topology structure and the original entity features, and the calculation method is as follows:

[0111]

[0112]

[0113] where T(·) denotes the transformer of Highway network, σ denotes the sigmod activation function, W (l) ,b (l) denote the relevant trainable parameters.

[0114] The second step: in the semantic space, for a specific triple (e i ,r,e j ), where e i , e j denote the head and tail entities of the triple with relation r, firstly, the concatenation of the head and tail entities is taken as the preliminary representation of the specific triple relation, which is represented as follows:

[0115]

[0116] where e i , e j denote the head and tail entity embeddings of the triple with relation r; || denotes the concatenation operation; W sr ,b sr denote the fully connected layer parameters; σ denotes the fully connected layer activation function.

[0117] The triple attention mechanism is used to obtain the enhanced representation of the triple in the semantic space, which is represented as follows:

[0118] The head entity attention of the triple is calculated as follows:

[0119]

[0120]

[0121]

[0122] where W h ,W hT denote the head entity and triple attention parameters respectively; h r denotes the set of head entities in the triple with fixed relation r; denotes the preliminary representation of the specific triple relation; T r denotes the set of triples with relation r; denotes the head entity representation of the triple;

[0123] The tail entity attention of the triple is calculated as follows:

[0124]

[0125]

[0126] where W t ,W tT denote the attention parameters of the tail entity and the triple, respectively; t r denote the set of tail entities containing the fixed relation r in the triple; denote the tail entity representation of the triple;

[0127] The relation pair triple attention is calculated as follows:

[0128]

[0129]

[0130] where W ij ,W rT denote the attention parameters of the triple and the relation, respectively; denote the relation representation of the triple;

[0131] The feature that each triple itself carries to represent its own specificity is reserved, and the triple-specific attention is calculated as follows:

[0132]

[0133] where W sp ,b sp denote the parameters of the fully connected layer; σ denotes the fully connected layer activation function; denote the global feature of the triple whose relation is r; is the global-specific feature representation of the triple (e i ,r,e j );

[0134] The original triple feature representation and the triple representation obtained by attention are fused to form the semantic space triple representation, and the specific calculation method is as follows:

[0135]

[0136] where, is the head entity representation of the triple; is the tail entity representation of the triple; is the relation representation of the triple; is the global-specific feature representation of the triple; S irj is the semantic space triple representation.

[0137] Third step: Strengthening of type space representation of triples, considering the correspondence of relationship in semantic space and type space, the representation of triples in semantic space can be directly applied to type space, in addition, due to the pair correlation of head and tail entity types of type triples, that is, in type space, for any type triple, only when the head and tail entity types jointly express, the specific semantics will be shown, and the representation of head or tail entity alone almost does not have any specific meaning, therefore, the head and tail entity are always considered as a whole in type space. The specific calculation method is as follows:

[0138] Mapping head and tail entity from semantic space to type space:

[0139] e=tanh(W st e+b st )

[0140] Wherein, W st and b st represent shared space transformation parameters; e on both sides of the formula is the entity embedding representation in type space and semantic space respectively; tanh is the activation function in space transformation process;

[0141] Considering the indivisibility of head and tail entity pair in type space and the global meaning of relationship in type space, the average of the head and tail entity splicing of type triple (e i ,r,e j ) with the same relationship in type space is taken as the global representation of type triple relationship:

[0142]

[0143] Wherein, T r represents the set of head and tail entities of triples with relationship r; e i , e j respectively represent the head and tail entity embedding of triples with relationship r, and || represents splicing operation; represents the global representation of type space relationship;

[0144] The type space triple representation is constructed by type space head and tail entity pair and global relationship, and the specific calculation method is as follows:

[0145]

[0146] Wherein, is the specific triple representation in type space; W tp ,b tp represent the parameters of full connection layer, and σ represents the activation function of full connection layer;

[0147] Considering the generality of the triple relationship in the semantic space and the type space, the mutual attention of the semantic space overall representation and the type space overall representation of each triple is calculated to strengthen the representation of the type characteristics and the triple-specific characteristics to the triple, and the specific calculation method is as follows:

[0148]

[0149]

[0150]

[0151]

[0152] Wherein, W t , W s are the type space and semantic space triple attention parameters respectively. represents the type triple with the relationship r; S i'rj' represents the semantic triple with the relationship r. and are the type-strengthened semantic triple representation and the semantic-strengthened type triple representation respectively.

[0153] The combination of the triple fusion representation and the type is adopted as the type space-strengthened triple representation, and the specific representation method is as follows:

[0154]

[0155] Wherein, S irj , represent the aforementioned semantic space triple representation, type space triple representation, semantic-strengthened triple representation and type space-strengthened triple representation respectively. represents the global representation of the type space relationship; T irj is the final triple fusion representation.

[0156] The fourth step: the triple fusion representation is used by the application to represent the head entity and the tail entity respectively, and the representation of the head entity and the tail entity is cyclically strengthened by considering the overlapping relationship, and the specific representation process is as follows:

[0157] The attention representation of the head entity and the tail entity is formed respectively, and the calculation method is as follows:

[0158]

[0159]

[0160]

[0161]

[0162] wherein e i represents a head entity of a triple; e j represents a tail entity of a triple; T i represents a set of triples whose head entity is e i ; T j represents a set of triples whose tail entity is e j ; W er , W eh , W et respectively represent a triple attention parameter, a head entity attention parameter and a tail entity attention parameter; T irj is a specific triple fusion representation; T ir'j' , T i'r'j is a triple fusion representation with the same head entity or tail entity as T irj .

[0163] The representation of the head entity and the representation of the tail entity are fused again to form a final entity representation. It is verified through experiments that the alignment performance obtained by fusing the head entity again based on the representation of the head entity and the representation of the tail entity is optimal.

[0164] Step 5: Construct a margin-based loss function and a semi-supervised cycle alignment strategy based on L1 norm distance. After the head and tail entity representations are formed by triple attention, a negative sampling strategy is used to construct k-neighbor negative samples within the knowledge graph and between two knowledge graphs for the triple head and tail entities, forming triple negative samples; considering L1 norm distance as an index for measuring the distance between vectors, a margin-based loss function is constructed.

[0165] Considering the deficiency of seed entity pairs in specific scenarios, a semi-supervised cycle training is adopted, and every 5 iterations find the entity pair with the closest distance in both directions from the dataset as a new seed to fill in the dataset.

[0166] Finally, the L1 norm distance is used to measure the similarity of the fused entity representation, and the zh_en, fr_en and ja_en three open source datasets of DBP15K are used to establish the H@1, H@10 and MRR six indexes to measure the alignment accuracy.

[0167] The specific effect verification process of the cross-language alignment method provided in the embodiment is as follows:

[0168] Three cross-lingual datasets of the general dataset DBP15K disclosed and widely used in the art are used to evaluate the method of the embodiment of the present application. The three cross-lingual datasets respectively contain bilingual knowledge graph entities and relationships of Chinese-English, Japanese-English and French-English and respectively contain 15000 aligned entity pairs. In the experiment, 30% of the seed entity pairs are initially selected as the training set, and the rest are used as the test set. Comparative experiments are carried out from the relationship dimension d_r, the type dimension d_t and other model parameters, and finally d_r = 100, d_t = 100 are determined as the best parameter settings. Whether to add overall triple attention, whether to use type enhanced triple representation module and whether to add cyclic mutual enhancement entity representation module are used as model ablation experiments to verify the effectiveness of the model sub-modules. The embodiment of the present application uses the standard evaluation indicators Hits@N and MRR to measure the experimental results, and compares the experimental results with the methods based on the Trans series, the methods based on the GCN series and the methods using semi-supervised training. The experimental results are as shown in Table 1: Figure 3

[0169] The alignment method (OTIEA) described above in the embodiment is superior to the existing alignment methods in all indicators in the three evaluation datasets, proving the superiority and accuracy of the alignment method disclosed in the present application.

[0170] The preferred embodiments of the present application are described in detail above. It should be understood that those skilled in the art can make many modifications and changes without creative labor according to the concept of the present application. Therefore, any technical solutions obtained by logical analysis, reasoning or limited experiments on the basis of the prior art according to the concept of the present application shall be within the protection scope determined by the claims.​

Claims

1. A method for entity alignment based on triple attention and type space enhancement, characterized in that, The entity alignment method comprises the following steps: The adjacency relationship of entities in the knowledge graph is expanded, and the topological structure information of the knowledge graph is obtained; The information carried by the triple is used as a whole in the semantic space to obtain a semantic space triple representation using triple attention; The semantic space representation is further strengthened using global relationship triples in the type space to form a type space strengthened triple fusion representation; The triple fusion representation is used to obtain head entity and tail entity attention, respectively, to form the head entity and tail entity representations and to mutually strengthen them in the head entity and tail entity representation stage to form the final entity representation, thereby achieving entity alignment of the knowledge graph.

2. The entity alignment method based on triple attention and type space enhancement according to claim 1, characterized in that, The step of expanding the adjacency relationship of entities in the knowledge graph comprises: The Glove word vector model is used to obtain entity name-based embedding, and each relationship in the knowledge graph is expanded into a combination of the original relationship, the reverse relationship and the self relationship.

3. The entity alignment method based on triple attention and type space enhancement according to claim 1, characterized in that, The step of obtaining the topological information of the knowledge graph comprises: A graph convolutional neural network is used to represent the topological structure between entities, and the calculation method is as follows: wherein, A denotes an entity adjacency matrix, I denotes an identity matrix, denotes the degree matrix of X (l) denotes the l-th layer entity representation; ReLU denotes a relu activation function; A high-speed network is used to balance the topological structure and the original entity features, and the calculation method is as follows: T(X (l) ) = σ(X (l) W (l) +b (l) ) X (l+1) = T(X (l) ) · X (l+1) + (1 - T(X (l) )) · X (l) where T(·) denotes the transformer of the Highway network, σ denotes the sigmod activation function, W (l) ,b (l) denote the relevant trainable parameters.

4. The entity alignment method based on triple attention and type space enhancement according to claim 1, characterized in that, The semantic space triple representation is obtained using triple attention in the semantic space: In the semantic space, the triple semantic representation is regarded as a whole, the correlation between the internal relationships of the triple is considered, and the head entity, the tail entity and the triple relationship are obtained using triple attention to obtain a deep layer representation; The original triple semantics are combined to retain the unique relationship of the triple to form the semantic space representation of the triple.

5. The entity alignment method based on triple attention and type space enhancement according to claim 4, characterized in that, The specific steps of obtaining the semantic space triple representation using triple attention in the semantic space comprise: For a specific triple (e i ,r,e j ), where e i , e j represent the head and tail entities of the triple with relation r, the concatenation of the head and tail entities is first taken as the preliminary representation of the specific triple relation, which is represented as follows: where e i , e j denote the head and tail entity embeddings of a triple with relation r, respectively; || denotes the concatenation operation; W sr , b sr denote the fully connected layer parameters; and σ denotes the fully connected layer activation function. The triple attention mechanism is used to obtain a strengthened representation of the triple in the semantic space, and the specific representation method is as follows: The triple attention calculation for the head entity is as follows: where W h ,W hT denote the attention parameters for head entities and triples, respectively; h r denotes the set of head entities that contain the fixed relation r in the triple; denotes the preliminary representation of a specific triple relation; T r denotes the set of triples with relation r; denotes the head entity representation of a triple; The triple attention calculation for the tail entity is as follows: where W t ,W tT respectively represent the attention parameters of the tail entity and the triple; t r represents the set of tail entities containing the fixed relation r in the triple; represents the tail entity representation of the triple; The triple attention calculation for the relationship is as follows: wherein W ij ,W rT respectively represent the attention parameters for triples and relations; represents the relation representation for triples. The triple-specific attention calculation method is as follows to retain the characteristics of each triple itself that carry its own specificity: wherein W sp ,b sp denote parameters of the fully connected layer; σ denotes a fully connected layer activation function; denotes global features of the triplets of relation r; is a global specific feature representation for the triplets (e i ,r,e j ). The original triple feature representation and the triple representation obtained by attention are fused to form the semantic space triple representation, and the specific calculation method is as follows: wherein, is a head entity representation for the triple; is a tail entity representation for the triple; is a relation representation for the triple; is a global-specific feature representation for the triple;S irj is a semantic space triple representation.

6. The entity alignment method based on triple attention and type space enhancement according to claim 1, characterized in that, The semantic space representation is further strengthened using global relationship triples in the type space to form a type space strengthened triple fusion representation comprising: Type triples are constructed using the global relationship features of the triples in the type space and the overall entity pairs, and mutual attention is used with the semantic space triple fusion representation to form a strengthened representation of the triple.

7. The entity alignment method based on triple attention and type space enhancement according to claim 6, characterized in that, The semantic space representation is further strengthened using global relationship triples in the type space to form a type space strengthened triple fusion representation comprising: The influence of triple-specific type features on the representation of the triple is used, and the average of each entity pair of the triple and the entity pairs having the same relationship as it is used as the type global relationship representation of the triple, and the type space strengthened triple semantic representation is combined to form a fusion representation from the perspective of the triple.

8. The entity alignment method based on triple attention and type space enhancement according to claim 7, characterized in that, The specific steps of obtaining the semantic space representation further strengthened using global relationship triples in the type space to form a type space triple representation comprising more information are as follows: Mapping head-tail entities from semantic space to type space: e = tanh(W st e + b st ) where W st and b st represent shared spatial transformation parameters; e on both sides of the formula respectively represents type space and semantic space entity embedding representation; tanh is an activation function in the spatial transformation process; Considering the indivisibility of head-tail entity pairs in the type space and the global significance of relations in the type space, the average of the concatenation of the head and tail entities of triples (e i ,r,e j ) with the same relation in the type space is taken as the global representation of the type triple relation: where T r denotes the set of head and tail entities of triples that have a relation r; e i , e j denote the head and tail entity embeddings of triples that have a relation r, respectively; and || denotes the concatenation operation; denotes the global representation of a type space relation; Building type space triple representation from head-tail entity pairs and global relations in type space, the specific calculation method is as follows: wherein, is a type space-specific triple representation; W tp b tp denotes the fully connected layer parameters, and σ denotes the fully connected layer activation function. Considering the generality of triple relations in semantic space and type space, the mutual attention of the overall representation of each triple in semantic space and type space is calculated to strengthen the representation of type features and triple-specific features to triples, and the specific calculation method is as follows: where W t , W s are type space and semantic space triple attention parameters, respectively; denotes a type triple with relation r; S i'rj' denotes a semantic triple with relation r; and are type-enhanced semantic triple representation and semantic-enhanced type triple representation, respectively; Type space enhanced triple fusion representation, the specific representation is as follows: where S irj , respectively denote the aforementioned semantic space triple representation, the type space triple representation, the semantic enhanced triple representation and the type space enhanced triple representation; denotes the global representation of type space relations; T irj is the final triple fusion representation.

9. The entity alignment method based on triple attention and type space enhancement according to claim 1, characterized in that, The representation of the head-tail entity is cyclically strengthened to form the final entity representation: the head-tail entity is represented separately, and the representation of the head-tail entity is formed by means of triple attention, and the representation of the head-tail entity is cyclically strengthened to form the final entity representation, and the specific representation process includes the following steps: Form the attention representation of the head entity and the tail entity respectively, and the calculation method is as follows: wherein e i represents a head entity of a triple; e j represents a tail entity of a triple; T i represents a set of triples whose head entity is e i ; T j represents a set of triples whose tail entity is e j ; W er , W eh , and W et represent a triple attention parameter, a head entity attention parameter, and a tail entity attention parameter, respectively; T irj is a specific triple fusion representation; T ir'j' , T i'r'j is a triple fusion representation with the same head entity or tail entity as T irj ; The head entity representation and the tail entity representation are used to form the final entity representation.

10. The entity alignment method based on triple attention and type space enhancement according to claim 1, characterized in that, The entity alignment method also constructs a margin-based loss function and a semi-supervised cyclic alignment strategy based on L1 norm distance: After forming the head-tail entity representation by triple attention, a negative sampling strategy is used to construct k-neighbor negative samples of triples head-tail entity in the knowledge graph and between two knowledge graphs to form triple negative samples; considering L1 norm distance as an index to measure the distance between vectors, a margin-based loss function is constructed; Use cyclic semi-supervised training, and find the entity pair with the closest distance in both directions from the data set after each set number of iterations to fill as new seeds to the data set.