A method for entity alignment that combines entity category and neighborhood information
By constructing entity relationship, attribute, and category models, and combining BERT and convolutional neural networks, the problem of insufficient utilization of category information in entity alignment is solved, thereby achieving higher entity alignment accuracy and semantic understanding.
Patent Information
- Application Number
- CN202410769190.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-06-14
AI Technical Summary
Existing entity alignment methods struggle to fully utilize entity category information and lack sufficient mining of deep semantic and attribute information in the text, resulting in inaccurate entity alignment.
By constructing entity relationship models, attribute models, and category models, and combining BERT pre-trained language models and convolutional neural networks, features of entity, attribute, and category information are extracted. Explicit and implicit conflict matrices are used to handle category conflicts, and a neural network is constructed for entity alignment.
It improves the accuracy of entity alignment, enables better integration of different knowledge graphs, and enhances the semantic and contextual understanding of entity alignment.
Smart Images

Figure CN118484502B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of entity alignment, and more specifically to an entity alignment method that combines entity category and neighborhood information. Background Technology
[0002] Knowledge graphs represent real-world knowledge in the form of triples <head entity, relation, tail entity>, allowing for an intuitive and efficient description of various facts. However, different languages and rules within knowledge graph data lead to varying construction methods, making it difficult to integrate different entity databases. Therefore, entity alignment is a crucial step in achieving knowledge graph fusion, aiming to find the same entity pointing to the real world from different knowledge graphs.
[0003] In recent years, embedding-based entity alignment methods have embedded knowledge graphs into low-dimensional vector spaces for computation. Through approximate relations and entity embeddings, vectorized learning is performed, resulting in stronger similarity between the same entity in different spaces. With the development of entity alignment work, relevant entity information has been increasingly incorporated to assist in the process. Initially, only relation structure triples were used; later, the role of entity name and attribute triples in entity alignment was gradually emphasized. Besides this information, entities with not entirely identical representations may belong to the same category, while entities with very similar representations may belong to different categories. Therefore, entity category information is also crucial for entity alignment; however, current entity alignment methods suffer from insufficient utilization of entity category information. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of current entity alignment methods in fully utilizing entity category information and in mining deep semantic and attribute information of text. This invention proposes an entity alignment method that combines entity category and neighborhood information to improve the accuracy of entity alignment and achieve the fusion of different knowledge graphs.
[0005] To achieve the above-mentioned objectives, the present invention provides the following technical solution:
[0006] A method for entity alignment that combines entity category and neighborhood information, comprising the following steps:
[0007] Step S1: Initialize the entity triples and attribute triples of the knowledge graph into vectors based on the corresponding text information;
[0008] Step S2: Obtain entity triples, model the relationships in the entity triples to obtain an entity relationship model; use the entity relationship model to map the entity triples to the entity vector space corresponding to the knowledge graph;
[0009] Step S3: Obtain attribute triples, construct an attribute model, extract the first feature of the attribute and attribute value from the attribute triples, convert the first feature into an attribute vector; use the attribute model to map the attribute triples to the entity vector space;
[0010] Step S4: Obtain category triples, model the hierarchical structure between entity categories to obtain an entity category model; use the entity category model to map the category triples to the category vector space;
[0011] Step S5: Based on whether entity categories are directly mutually exclusive, classify conflicts between entity categories into explicit conflicts and implicit conflicts; establish an explicit conflict matrix based on the degree of explicit conflict; calculate an implicit conflict matrix based on the degree of implicit conflict; map the explicit conflict matrix and the implicit conflict matrix to the category vector space;
[0012] Step S6: Model the known entities and their categories to obtain a category embedding model; map the entity vector space to the category vector space using the category embedding model;
[0013] Step S7: Obtain multiple knowledge graphs, map each knowledge graph according to steps S1 to S6 to obtain the corresponding category vector space; construct a neural network using a known set of seed words, and connect multiple category vector spaces through the neural network to achieve entity alignment between knowledge graphs.
[0014] As a preferred technical solution of this application, the initialization method in step S1 includes: extracting character features, sentence features and word order features from text information through the BERT language translation model, compressing all features into a low-dimensional vector through a fully connected layer, and performing normalization on the low-dimensional vector to achieve vector initialization.
[0015] As a preferred technical solution of this application, in step S5, the method for establishing the explicit conflict matrix includes: taking the categories of the explicit conflict as rows and columns, and comparing all categories sequentially according to the first step; the first step includes:
[0016] Step S51: If the first category and the second category are the same, set the matrix element to 0 and execute step S51; if the first category and the second category are different, execute step S52.
[0017] Step S52: Preset conflict-free category relationship; if the first category and the second category belong to the conflict-free category relationship, set the matrix element to 1 and execute step S51; if the first category and the second category do not belong to the first category relationship, execute step S53;
[0018] Step S53: Obtain the seed entities in the seed word set; if the first category and the second category are the categories of the seed entities, set the matrix elements to 0 and execute step S51; if the entities corresponding to the first category and / or the second category are not the seed entities, execute step S54;
[0019] Step S54: Calculate the explicit conflict matrix element values based on the distance between the first category and the second category in the hierarchical structure.
[0020] As a preferred technical solution of this application, in step S5, the method for establishing the implicit conflict matrix includes: taking the categories of the implicit conflict as rows and columns, calculating the similarity between the third category and the fourth category, and calculating the element values of the implicit conflict matrix based on the similarity.
[0021] As a preferred technical solution of this application, it further includes constructing a first function to map the explicit conflict matrix and the implicit conflict matrix to the category vector space, wherein the first function is a function that minimizes the negative log-likelihood loss.
[0022] As a preferred technical solution of this application, step S6 further includes: obtaining multiple categories corresponding to the entity, calculating the average value of the multiple categories, and mapping the average value as the category vector of the entity to the category vector space.
[0023] As a preferred technical solution of this application, it further includes: adding the entities aligned in step S7 to the seed word set, and updating the explicit conflict matrix and the implicit conflict matrix.
[0024] As a preferred technical solution of this application, in step S2, the modeling method of the entity relationship model includes: negatively sampling the entity triples to obtain a first negative sample, and using the entity triples and the first negative sample as a first training set; predicting tail entities based on the head entities and relationships in the first training set using the RotatE model; calculating a score based on the predicted tail entities and the tail entities in the first training set; constructing a loss function based on the score of the entity triples and the score of the first negative sample, and optimizing the entity relationship model by minimizing the loss function.
[0025] As a preferred technical solution of this application, the method for constructing the attribute model includes: extracting the first feature using a convolutional neural network, converting the first feature into the attribute vector using a vec function; calculating a score based on the head entity of the attribute triple and the attribute vector, constructing a loss function based on the score, and optimizing the attribute model by minimizing the loss function.
[0026] As a preferred technical solution of this application, the modeling method of the entity category model includes: negatively sampling the category triples to obtain a second negative sample, and using the category triples and the second negative sample as a second training set; predicting the tail entity category based on the head entity category of the second training set through nonlinear transformation, calculating a score based on the predicted tail entity category and the tail entity category of the second training set; constructing a loss function based on the score of the category triples and the score of the second negative sample, and optimizing the entity category model by minimizing the loss function.
[0027] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0028] 1. Using the BERT pre-trained language model to initialize the encoding of relevant text in the knowledge graph can capture the complex contextual dependencies in the text, generate high-quality text representations, and make the encoded vectors contain rich semantic and word order features.
[0029] 2. Since entity category information is also crucial for entity alignment, some entity categories conflict due to mutual exclusion. By constructing explicit and implicit conflict matrices for entity categories, and combining class hierarchy and category mutual exclusion in the entity category information, conflicts between entity categories are resolved, thus improving the accuracy of entity alignment using category information.
[0030] 3. Entity attribute information can enrich entity descriptions, provide contextual information, and help distinguish entities during entity alignment. Convolutional neural networks can be used to fully extract features from attributes and attribute values. During iterative training, these extracted features are fused into the entity vector space, which helps distinguish entities and improves the accuracy of entity alignment. Attached Figure Description
[0031] Figure 1 This is a flowchart illustrating the entity alignment method.
[0032] Figure 2 This is a schematic diagram of the text and feature extraction structure of the BERT model;
[0033] Figure 3 This is a schematic diagram of the output structure of the twelfth layer encoding in the BERT model;
[0034] Figure 4 This is a structural diagram illustrating the category hierarchy.
[0035] Figure 5 This is a schematic diagram of the conflict matrix results;
[0036] Figure 6 This is a comparison of experimental results between this application and other entity alignment methods. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0038] Therefore, the following detailed description of embodiments of the present invention is not intended to limit the scope of the claimed invention, but merely illustrates some embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0039] It should be noted that, unless otherwise specified, the embodiments and features and technical solutions in the present invention can be combined with each other.
[0040] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0041] In the description of this invention, it should be noted that the terms "upper," "lower," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use, or the orientation or positional relationship commonly understood by those skilled in the art. These terms are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention. In addition, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0042] Example 1: See Figures 1-6 As shown in the figure, this embodiment provides an entity alignment method that combines entity category and neighborhood information, the steps of which include:
[0043] Step S1: Use the publicly available datasets EN-FR-15K-V1 / V2 and EN-DE-15K-V1 / V2 as experimental datasets. Each dataset contains a source knowledge graph KG. i ={E i R i V i A i T i A target knowledge graph KG j ={E j R j V j A j Tj The information includes entity category information, hierarchical structure between entities and entity categories, and related textual information; where E is the entity, R is the relation, V is the attribute value, A is the attribute, and T is the type. Whether it's an entity triple, attribute triple, or entity category information, they all contain their own textual information, which serves as their most basic representation.
[0044] The BERT model, trained on a large-scale corpus, has captured linguistic features from massive text data and can capture complex contextual dependencies in text, generating high-quality text vectors. Therefore, this embodiment utilizes a pre-trained BERT model to initialize relevant text information into vector form. Specific steps include:
[0045] Step S11: Input entity triples, attribute triples, and text information into the BERT pre-trained model. Token Embeddings transform entities, entity categories, and relationships between entities and categories into 768-dimensional vectors; Position Embeddings learn the order attributes between sentence pairs; Segment Embeddings assist the BERT model in recognizing the contextual relationships between different clauses within a sentence pair. For example... Figure 2 As shown in the figure, this is a schematic diagram of the structure after the text information "Beijing is the capital of China" is transformed using the BERT model.
[0046] Step S12: Integrate Token Embeddings, Segment Embeddings, and Position Embeddings to obtain a composite vector of size (1, n, 768) as the input to the BERT encoding layer.
[0047] Step S13: Encode the input of the obtained BERT coding layer through twelve layers, and output the final vector after the twelfth layer encoding, for example... Figure 3 As shown.
[0048] Step S14: Compress the vector output by the twelfth coding layer into a low-dimensional vector of the same dimension using a fully connected layer.
[0049] Step S15: Perform L2 normalization on the low-dimensional vector to initialize the text information and obtain the entity vector with fused semantics.
[0050] Step S2: Obtain entity triples. Negatively sample the entity triples to obtain negatively sampled entity triples, denoted as the first negative sample. Use the entity triples and the first negative sample as the first training set. Model the relations in the entity triples using the RotatE model to obtain the entity relation model. Use the entity relation model to map the entity triples to the entity vector space corresponding to the knowledge graph.
[0051] The entity relationship model receives the first head entity, the first relationship, and the first tail entity from the first training set, and outputs the predicted tail entity. In the knowledge graph domain, the scoring function obtains a scalar value by performing vector operations on the triples, and evaluates the reasonableness of the triples based on this scalar value. Therefore, the scoring function is constructed to calculate the score based on the predicted tail entity and the first tail entity. The scoring function formula is as follows:
[0052] ;
[0053] Where, h, h (1) Let represent the first head entity; r represent the first relation; t represent the first tail entity; represent complex multiplication; and represent the norm of the vector. The loss function is used to calculate the difference between the true value and the model's predicted value based on the scoring function. By minimizing the loss function, the model parameters are optimized to improve the accuracy of the model's predictions. Therefore, the loss function constructed based on the first scoring function is as follows:
[0054] ;
[0055] Among them, T R T represents the set of entity triples. R ' represents the set of entity triples after negative sampling, α r >0 represents an edge hyperparameter. The entity relationship model optimizes its training parameters in the direction of reducing the loss function.
[0056] Step S3: Obtain the attribute triples transformed by the BERT model. Concatenate the attribute vectors and their corresponding attribute value vectors into a 2×d dimensional matrix, i.e.<a;v> ∈R 2×d , where d is the number of vectors containing attributes or attribute values, a is the attribute, and v is the attribute value. Attribute features have a constraining effect on the entity alignment process. To improve the accuracy of the constraints, in this embodiment, attribute triples from multiple knowledge graphs are extracted separately and fused together for training.
[0057] In this embodiment, a convolutional neural network is used to construct an attribute model. The spliced matrix is input into the attribute model, and the features of attributes and attribute values are extracted through a convolution kernel. The extracted features are transformed into vectors using the vectorization function vec(), and the transformed vectors are mapped into the entity vector space corresponding to the knowledge graph through the parameter matrix of the attribute model. The formula for the convolution operation is as follows:
[0058] ;
[0059] where CNN( ) represents the convolution operation, Ω is the convolution kernel with a size of 2×c (c < d), d is the number of vectors of attributes or attribute values; a is an attribute, v is an attribute value, <a; v> is the spliced matrix; W a is the parameter matrix, and б is the activation function. A scoring function is constructed based on the convolution result and the head entity vector in the attribute triple. The function formula is as follows:
[0060] ;
[0061] where h (2) is the head entity in the attribute triple, denoted as the second head entity; a is an attribute, v is an attribute value, and || || is the vector norm. The closer the second head entity h (2) is to its attributes and attribute values, the higher the scoring function of the attribute triple. The loss function formula of the convolutional neural network is as follows:
[0062] ;
[0063] where y + = y a +y b are all attribute triples in the source knowledge graph and the target knowledge graph, and exp( ) is the natural exponential function. The attribute model optimizes the training parameters in the direction of reducing the loss function.
[0064] Step S4: For example Figure 4 as shown, a given entity category hierarchy O = {C, H} is provided, where C is the category set and H is the simplified category triple, expressed as H = {(c h , c t )}, where (c h , c t ) is the category pair, c h is the category corresponding to the head entity, and c t is the category corresponding to the tail entity. Negative sampling is performed on the category triple to obtain a second negative sampling, and the category triple and the second negative sampling are used as the second training set.
[0065] Because the relationship between categories in an entity category hierarchy is fixed, it is difficult to use text translation models such as BERT to distinguish the corresponding tail entities based on the head entity and the relation. For example, consider the category hierarchy {(animal, mammal, bird), ((animal, mammal), (animal, bird))}. The entity triple (dog, is, mammal) is used, where "dog" is the head entity, "is" is the relation, and "mammal" is the tail entity. Since mammal is a subcategory of animal, when only the category "dog" and the relation "is" are available, the text translation model struggles to distinguish whether the tail entity is "mammal" or "animal".
[0066] Therefore, in this embodiment, a nonlinear transformation is used to model the hierarchical structure between categories to obtain an entity category model. This entity category model maps category triples to a category vector space. The categories of the head entities in the second training set are input into the entity category model to predict the categories of the tail entities. A scoring function is constructed to calculate a score based on the predicted categories of the tail entities and the categories of the tail entities in the second training set, as shown in the following formula:
[0067] ;
[0068] Among them, W o ∈R do x do b o ∈R do Here are the learnable parameters; R is the set of real numbers, do is the dimension of the entity vector; is L2 regularization, c h For the category of the head entity, c t The category is defined as the tail entity. A loss function is constructed based on the score of the category triplet and the score of the second negative sample, as shown in the following formula:
[0069] ;
[0070] in,[ ] + Let f(x) = max(0, x) be the function value; H is the set of class pairs, and H' is the set of class pairs after negative sampling; α o >0 represents an edge hyperparameter. The entity classification model optimizes its training parameters in the direction of reducing the loss function.
[0071] Step S5: Since the relationships in entity category triples are fixed, the vectors between child nodes of the same node in an entity category triple will be very similar. Therefore, in this embodiment, a conflict matrix is used to describe the conflicts between categories in order to distinguish the similarity between categories. Conflicts between entity categories are divided into explicit conflicts and implicit conflicts based on whether they are directly mutually exclusive. For example, if a person's category in one knowledge graph is "male" and their category in another knowledge graph is "female," then there is an explicit conflict between the categories "male" and "female" in these two knowledge graphs. Implicit conflicts require reasoning. For example, if a person's birthplace province in one knowledge graph is "Sichuan," and their birthplace category in another knowledge graph is "Guiyang," and Guiyang's province is Guizhou, then there is an implicit conflict between the province categories in these two knowledge graphs.
[0072] For explicit conflicts, the method for constructing the explicit conflict matrix includes: using the categories of explicit conflicts as the rows and columns of the explicit conflict matrix, and sequentially comparing all categories according to the first step. In this embodiment, the explicit conflict calculation method includes four cases, which are determined one by one in order during calculation. If one case is met, the calculation process for that category is terminated. The first step includes:
[0073] Step S51: If the first category and the second category are the same, and the category does not conflict with itself, set the matrix element to 0 and execute step S51 of the next loop; if the first category and the second category are different, execute step S52.
[0074] Step S52: Preset conflict-free category relationship; if the first category and the second category belong to the conflict-free category relationship, set the matrix element to 1 and execute step S51 of the next loop; if the first category and the second category do not belong to the first category relationship, execute step S53;
[0075] Step S53: Obtain the seed entities in the seed word set; if the first category and the second category are the categories of the seed entities, set the matrix elements to 0 and execute step S51 of the next loop; if the entities corresponding to the first category and / or the second category are not the seed entities, execute step S54;
[0076] Step S54: Calculate the element values of the explicit conflict matrix based on the distance between the first category and the second category in the hierarchical structure. The farther apart the first category and the second category are in the category hierarchy structure tree, the lower their semantic similarity and the higher their conflict level. The conflict level is calculated according to the following formula:
[0077] ;
[0078] Where, mi,j c represents the i-th entity category i and the j-th entity category c j The degree of explicit conflict between them, m i,j ∈[0,1]; S represents the set of entity categories in the path from the entity category to the root category, and represents the number of entity categories in the set.
[0079] For implicit conflicts, the method for constructing the implicit conflict matrix includes: using the categories of the implicit conflicts as rows and columns. The more similar the vector representations of the third and fourth categories are, the smaller the degree of conflict between them. In this embodiment, the element values of the implicit conflict matrix are calculated based on the similarity between the third and fourth categories, where the similarity includes, but is not limited to, cosine similarity. For example, the formula for calculating cosine similarity is as follows:
[0080] ;
[0081] Where cos() is the cosine similarity, c i For the i-th entity category, c j The j-th entity category.
[0082] A result of the explicit conflict matrix or the implicit conflict matrix is as follows: Figure 5 As shown in the figure, 0 to 9 represent ten different categories.
[0083] A first function is constructed to map the explicit conflict matrix and the implicit conflict matrix to the category vector space by minimizing the value of the first function. This first function includes, but is not limited to, the negative log-likelihood loss function. In this embodiment, the calculation formula for the negative log-likelihood loss function is as follows:
[0084] ;
[0085] Where C is the set of categories; m i,j Represents the i-th category c i and the j-th category c j The degree of implicit conflict between them, m i,j ∈[0,1].
[0086] Step S6: Given a set of entity and category membership pairs B = {(e, c)}, where e is an entity and c is a category. A category embedding model is obtained by modeling based on the known entities and their categories through a nonlinear transformation. The entity vector space is mapped to the category vector space through the category embedding model, thus associating the entity vector space with the category vector space. If an entity corresponds to multiple categories, the average of the multiple categories is calculated, and this average is used as the entity's category vector to map to the category vector space. The scoring function for the nonlinear transformation process is as follows:
[0087] ;
[0088] Among them, W c ∈R dr×do b c Here are the learnable parameters; e is the entity, c is the class, dr is the dimension of the entity vector, and do is the dimension of the entity vector. The loss function derived from the scoring function is as follows:
[0089] ;
[0090] Where B is the set of entity and class membership pairs, B' is the set of entity and class membership pairs after negative sampling, and α c >0 represents the edge hyperparameter, [ ] + Let f(y) = max(0, y) be the function value.
[0091] Step S7: Obtain multiple knowledge graphs, and map each knowledge graph according to steps S1 to S6 to obtain the corresponding category vector space. A neural network is constructed using a known set of seed words. In this embodiment, the neural network uses a fully connected connection, but it should be noted that the neural network includes, but is not limited to, fully connected neural networks and recurrent neural networks. The neural network connects the multiple category vector spaces to achieve entity alignment between knowledge graphs.
[0092] The neural network uses a known seed word set M={(e i e j Training is performed on e. i e j These are aligned entity pairs. The neural network uses a fully connected approach to connect the source knowledge graph KG. i Entities in the graph are mapped to the target knowledge graph KG. j Equivalent entities in the dataset. After each training iteration, the obtained aligned entity pairs are added to the seed word set, and the explicit conflict matrix, the implicit conflict matrix, and the neural network parameters are updated for the next training iteration. The scoring function formula constructed based on the entity pairs output by the neural network is as follows:
[0093] ;
[0094] Among them, W m ∈R dr×dr b m ∈R dr dr is the dimension of the entity vector; e i For entities in the source knowledge graph; e j For entities in the target knowledge graph. The loss function formula constructed based on the scoring function is as follows:
[0095] ;
[0096] Where M is the seed word set.
[0097] The loss functions of all steps S2-S7 are summed to obtain the loss function of the entire entity alignment method. The calculation formula is as follows:
[0098] ;
[0099] Among them, L O For entity class vector loss, L R For entity vector loss, L A For attribute vector loss, L D To construct the loss for the class conflict matrix, L C For category embedding loss, L M λ1 is the entity alignment loss; λ2 is the hyperparameter of the class conflict matrix; λ3 is the hyperparameter of the class embedding model; and λ4 is the hyperparameter of the fully connected neural network.
[0100] In this embodiment, the entity alignment method in this application is evaluated by calculating two evaluation metrics: Hits@k (k=1,5) and MRR. The larger the values of the two metrics, the more accurate the entity alignment. The calculation methods for the two evaluation metrics include: for the knowledge graph KG i For each entity in the graph, the knowledge graph KG is obtained using the entity alignment method. j For all candidate entities, calculate KG i The similarity between the entity and each candidate entity is calculated, and the entities are ranked from highest to lowest similarity. Based on the ranking results, two evaluation metrics, Hits@k and MRR, are calculated. The formula for calculating the similarity is as follows:
[0101] ;
[0102] Among them, e i For entities in the source knowledge graph, e j For entities in the target knowledge graph; e i (1) e j (1) For entities obtained by training based on entity triples, e i (2) e j (2) For entities trained based on attribute triples, c i c j For elements in the category set, β1 and β2 ∈ [0,1].
[0103] In this embodiment, the Adagrad optimizer is used during model training; the learning rate is 0.01; the embedding dimension is 300; the convolution kernel size Ω is [2×4]; and the marginal hyperparameter α... x (x∈{o,r,c}) is 0.01; the hyperparameters λ1 of the category conflict matrix, λ2 of the category guidance process, and λ3 of the fully connected neural network all have values in the range of {0,1,2,3,4,5}; the weights β1 of the attribute vector space and β2 of the first-level vector space all have values in the range of {0.1,0.2,0.3,0.4,0.5}.
[0104] In this embodiment, to verify the effectiveness of the model, seven mainstream entity alignment methods in the prior art were selected for comparison. The comparison results are as follows: Figure 6 As shown in the figure. In addition to focusing on the entity triplet structure of the KG itself, our model incorporates attribute information and entity category information. Attribute information is obtained through a convolutional neural network to guide entity alignment, and a conflict matrix is constructed using category information to correct incorrect entity mappings. Compared to OntoEA, the best-performing baseline model, JCNEA improves Hits@1 by 10.4%, 3.9%, 7.5%, and 3.1%, respectively. Hits@5 and MRR metrics also show good results, demonstrating the superiority of our proposed method.
[0105] The above embodiments are only used to illustrate the present invention and are not intended to limit the technical solutions described herein. Although the present invention has been described in detail with reference to the above embodiments, the present invention is not limited to the specific embodiments described above. Therefore, any modifications or equivalent substitutions to the present invention, as well as all technical solutions and improvements that do not depart from the spirit and scope of the invention, are covered within the scope of the claims of the present invention.
Claims
1. A method for entity alignment that combines entity category and neighborhood information, characterized in that the steps include... include: Step S1: Initialize the entity triples and attribute triples of the knowledge graph into vectors based on the corresponding text information; Step S2: Obtain entity triples, model the relationships in the entity triples to obtain an entity relationship model; use the entity relationship model to map the entity triples to the entity vector space corresponding to the knowledge graph; Step S3: Obtain attribute triples, construct an attribute model, extract the first feature of the attribute and attribute value from the attribute triples, and convert the first feature into an attribute vector; The attribute triples are mapped to the entity vector space using the attribute model. Step S4: Obtain category triples, model the hierarchical structure between entity categories to obtain an entity category model; use the entity category model to map the category triples to the category vector space; Step S5: Based on whether the entity categories are directly mutually exclusive, classify the conflicts between entity categories into explicit conflicts and implicit conflicts; Build an explicit conflict matrix based on the degree of explicit conflict; calculate an implicit conflict matrix based on the degree of implicit conflict. Map the explicit conflict matrix and the implicit conflict matrix to the category vector space; Step S6: Model the known entities and their categories to obtain a category embedding model; map the entity vector space to the category vector space using the category embedding model; Step S7: Obtain multiple knowledge graphs, map each knowledge graph according to steps S1 to S6 to obtain the corresponding category vector space; construct a neural network using a known set of seed words, and connect multiple category vector spaces through the neural network to achieve entity alignment between knowledge graphs; The method for establishing the explicit conflict matrix includes: using the categories of the explicit conflicts as rows and columns, and comparing all categories sequentially according to the first step; the first step includes: Step S51: If the first category and the second category are the same, set the matrix element to 0 and execute step S51; if the first category and the second category are different, execute step S52. Step S52: Preset conflict-free category relationship; if the first category and the second category belong to the conflict-free category relationship, set the matrix element to 1 and execute step S51; if the first category and the second category do not belong to the first category relationship, execute step S53; Step S53: Obtain the seed entities in the seed word set; if the first category and the second category are the categories of the seed entities, set the matrix elements to 0 and execute step S51; if the entities corresponding to the first category and / or the second category are not the seed entities, execute step S54; Step S54: Calculate the explicit conflict matrix element values based on the distance between the first category and the second category in the hierarchical structure.
2. The entity alignment method based on joint entity category and neighborhood information according to claim 1, characterized in that, The initialization method in step S1 includes: extracting character features, sentence features, and word order features from text information using the BERT language translation model; compressing all features into a low-dimensional vector using a fully connected layer; and normalizing the low-dimensional vector to achieve vector initialization.
3. The entity alignment method based on joint entity category and neighborhood information according to claim 1, characterized in that, In step S5, the method for establishing the implicit conflict matrix includes: using the categories of the implicit conflict as rows and columns, calculating the similarity between the third category and the fourth category, and calculating the element values of the implicit conflict matrix based on the similarity.
4. The entity alignment method based on joint entity category and neighborhood information according to claim 1 or 3, characterized in that, It also includes constructing a first function to map the explicit conflict matrix and the implicit conflict matrix to the category vector space, wherein the first function is a function that minimizes the negative log-likelihood loss.
5. The entity alignment method based on joint entity category and neighborhood information according to claim 4, characterized in that, Step S6 further includes: obtaining multiple categories corresponding to the entity, calculating the average value of the multiple categories, and mapping the average value as the category vector of the entity to the category vector space.
6. The entity alignment method based on joint entity category and neighborhood information according to claim 1 or 3, characterized in that, Also includes: The entities aligned in step S7 are added to the seed word set, and the explicit conflict matrix and the implicit conflict matrix are updated.
7. The entity alignment method based on joint entity category and neighborhood information according to claim 1, characterized in that, In step S2, the modeling method of the entity relationship model includes: negatively sampling the entity triples to obtain a first negative sample, and using the entity triples and the first negative sample as a first training set; predicting tail entities based on the head entities and relationships in the first training set using the RotatE model; calculating a score based on the predicted tail entities and the tail entities in the first training set; constructing a loss function based on the scores of the entity triples and the scores of the first negative sample, and optimizing the entity relationship model by minimizing the loss function.
8. The entity alignment method based on joint entity category and neighborhood information according to claim 1, characterized in that, The method for constructing the attribute model includes: extracting the first feature using a convolutional neural network, converting the first feature into the attribute vector using a vec function; calculating a score based on the head entity of the attribute triple and the attribute vector; constructing a loss function based on the score; and optimizing the attribute model by minimizing the loss function.
9. The entity alignment method based on joint entity category and neighborhood information according to claim 1, characterized in that, The modeling method for the entity category model includes: negatively sampling the category triples to obtain a second negative sample, and using the category triples and the second negative sample as a second training set; predicting the tail entity category based on the head entity category of the second training set through a nonlinear transformation, calculating a score based on the predicted tail entity category and the tail entity category of the second training set; constructing a loss function based on the score of the category triples and the score of the second negative sample, and optimizing the entity category model by minimizing the loss function.
Citation Information
Patent Citations
Cross-language entity alignment method based on multi-aspect subtask interaction
CN114969367A
Method for optimizing business success using a performance culture maturity model
US20110055117A1
Cited By
A chemical industry chain knowledge graph entity alignment method and system
CN122452716A