An ontology matching method based on true-false triplet neural network
By simultaneously learning semantic information of similar and dissimilar annotation attributes through a true-pseudo-triad neural network (GP-TNN), the problem of low ontology matching accuracy in existing technologies is solved, the accuracy and quality of ontology matching are improved, and effective interaction between intelligent systems is promoted.
Patent Information
- Application Number
- CN202211175689.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2042-09-26
AI Technical Summary
Existing machine learning-based ontology matching methods cannot fully mine the semantic information of the ontology, resulting in low matching accuracy. Especially in the case of highly heterogeneous ontology, they cannot effectively represent the true semantics of entities, affecting the interaction and collaboration between intelligent systems.
We employ a true-pseudo triplet neural network (GP-TNN) to simultaneously learn semantic information of similar and dissimilar annotation attributes through internal sub-twin neural networks and sub-pseudo neural networks, construct a training dataset, and utilize recurrent neural networks and long short-term memory networks to optimize feature vectors and improve matching accuracy.
It enables more comprehensive semantic information mining, improves the accuracy and quality of ontology matching, and meets the interaction requirements between intelligent systems.
Smart Images

Figure CN115577117B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ontology matching of machine learning, and in particular to an ontology matching method based on a true-false triplet neural network. Background Art
[0002] An ontology is an explicit specification of a conceptual [1] , that is, a formal and standardized description of entities existing in a certain field and the relationships between them. Ontology enables knowledge-based intelligent systems to automatically and accurately understand the true meaning of each other's data and realize interaction and collaboration between systems at the semantic level. Therefore, it is widely used in application fields such as semantic annotation, data format standardization, knowledge representation and sharing. In order to meet the huge application needs, ontology engineers in various fields have developed a large number of ontologies in recent years, such as steam turbine generator set ontology, sensor ontology, etc.
[0003] However, due to the different knowledge backgrounds of ontology engineers, there are differences in describing the same entity in the same field. For example, in the sensor ontology, a class is called "Input", while in another ontology, the class is called "Sensor Input", which leads to the heterogeneity problem of ontology, which seriously hinders the interaction and collaboration between ontology-based intelligent systems.
[0004] Ontology matching is currently the most effective way to solve the problem of ontology heterogeneity. Similarity measurement technology is the core technology in ontology matching methods, which is used to calculate the similarity value between entities. In order to cope with different heterogeneous situations, term-based and semantic-based similarity measurement technologies are applied respectively. [2] and Cosine [3] It is a representative technology among term-based similarity measurement technologies. It uses substrings and vectors of entities to be matched to achieve similarity measurement. Among them, Cosine can have an outstanding measurement effect on long texts. Sim WP [4] WordNet [5] As an external knowledge base, similarity measurement is performed from a semantic perspective, and good matching results can often be achieved by using an external knowledge base.
[0005] However, due to the complexity of ontology heterogeneity and the need for high-quality semantic interaction, using only similarity measurement technology in the matching process can no longer meet actual requirements. The ontology matching method based on machine learning can determine the semantic features of the entities to be matched through character embedding technology, and then judge the corresponding relationship between entities in the ontology, which can effectively solve the heterogeneity problem of ontology matching.
[0006] Bento et al. [6]The ontology matching is regarded as a binary classification problem, and the reference alignment is used as input. Convolutional Neural Networks (CNN) is used for semantic learning. Machine learning replaces the similarity measurement technology, which improves the time performance and has good universality.
[0007] Jiang et al. [7] An ontology matching method based on Long Short-term Memory (LSTM) network is proposed, which achieves better matching effect by using the structure and semantic information of entities to match ontologies.
[0008] Iyer et al. [8] In order to make character embeddings more embodying the semantics and structural information of entities, a supervised learning-based neural network is proposed to match ontology, which uses dual attention to generate contextual representations of entities and shows excellent performance in state-of-the-art similarity metrics. However, most machine learning-based ontology matching methods require the use of reference alignment, which is often not met in actual matching tasks.
[0009] To address this issue, Xue et al. [9] A Siamese Neural Network based Ontology Matching technique (SNN-OM) is proposed. A training data set is constructed by combining multiple similarity measurement techniques with logical rules, and a Siamese network is used to learn the semantic features of similar entities using a network structure with two shared parameters, achieving better matching results.
[0010] However, the existing machine learning-based ontology matching technology has the problem of low matching accuracy due to the inability to fully mine the semantic information of the ontology. For example, SNN-OM only uses the label annotation attribute of the entity, but when faced with highly heterogeneous ontologies (including terminological heterogeneity, linguistic heterogeneity, and structural heterogeneity), the label may be garbled, causing the neural network to be unable to represent the true semantics of the entity for the semantic features extracted by it. When the similarity of the semantic features is calculated, the matching accuracy will be reduced. Summary of the invention
[0011] In response to the above-mentioned problems existing in the prior art, the present application provides an ontology matching method based on a true-pseudo triplet neural network, and proposes a new concept for the first time: the Genunine-pseudo Triplet Neural Network (GP-TNN), which realizes the simultaneous learning of semantic information of similar annotation attributes and heterogeneous annotation attributes through internal sub-twin neural networks and sub-pseudo neural networks, and can conduct a more comprehensive mining of the semantic information of the ontology, so that the learned feature vectors can better reflect the semantic characteristics of the entity's essence, thereby improving the accuracy of ontology matching, and providing a new idea for solving the ontology matching problem based on machine learning.
[0012] The technical solution of the present invention is as follows:
[0013] An ontology matching method based on a true-false triplet neural network comprises the following steps:
[0014] S1: Given an ontology to be matched, extract representative entities from the ontology to be matched and obtain a core entity set for constructing a training dataset;
[0015] S2: Build training dataset;
[0016] S3: Perform character embedding on the training data set to convert characters into character vectors that can be recognized by computers;
[0017] S4: sending the encoded character vector to a true-pseudo triplet neural network for model training; the true-pseudo triplet neural network uses two recurrent neural networks RNN as a sub-network structure in a twin neural network SNN, and one of the two recurrent neural networks RNN is used together with a long short-term memory network LSTM as a sub-network structure of a pseudo twin neural network PSNN;
[0018] S5: sending the verification data into the true-false triplet neural network for matching;
[0019] S6: Evaluate the matching results to verify the effectiveness of the true-false triplet neural network model.
[0020] Furthermore, the specific steps of step S1 are as follows:
[0021] S1-1: Calculate the degree centrality of the entity in the ontology; the degree centrality is an indicator for determining the importance of an entity in the network, and is a quantification of the importance of an entity. The higher the degree centrality of an entity, the more representative the entity is in the ontology;
[0022] The degree centrality is calculated by the sum of the out-degree and in-degree of the entity; the out-degree and in-degree of the entity refer to the number of outgoing edges and the number of incoming edges of the entity in the parent-child entity relationship network of the entity respectively;
[0023] S1-2: Sort the calculated results of the degree centrality of the entities in descending order, and select the top 30% entities as core entities.
[0024] Furthermore, the specific steps of step S2 are as follows:
[0025] S2-1: Determine the matching relationship between core entities as follows:
[0026] Given the ontologies O1 and O2 to be matched and the threshold T, randomly select the core entities e1 and e2 of the same type to be matched of O1 and O2 to form a pair of entities to be matched, and take the annotation attributes label1 and label2, comment1 and comment2 of the pair of entities to be matched, and use the N-gram technology to calculate the similarity value of e1 and e2: s1 = N-gram (label1, label2);
[0027] If s1>T, then the similarity value between e1 and e2 is s1, otherwise Sim WP Technically calculate the similarity value of e1 and e2:
[0028] s2=Sim WP (label1, label2)
[0029] If s2>T, then the similarity value of e1 and e2 is s2, otherwise the Cosine technique is used to calculate the similarity value of c1 and c2:
[0030] s3=Cosine(comment1,comment2)
[0031] If s3>T, then the similarity value of e1 and e2 is s3, otherwise e1 and e2 do not match;
[0032] S2-2: Construct a training data set as follows:
[0033] Make a Cartesian product of all core entities in the matching ontologies O1 and O2, and calculate the similarity value of each core entity pair in the Cartesian product according to the method in step S2-1. The core entity pairs with similarity values greater than the threshold T will be selected as positive samples of training data; as a constraint, replace one entity in the positive sample with other entities in the core entity of the ontology where the entity is located through random assignment, and then complete the construction of negative samples. The number of negative samples is consistent with the number of positive samples; finally, 80% of the sample quantity is randomly selected as the training set and 20% as the validation set.
[0034] Furthermore, the specific steps of step S4 are as follows:
[0035] S4-1: Calculate the distance between two eigenvectors:
[0036]
[0037] where ||·|| represents the Euclidean norm, dis(F1, F2)∈[0, 1);
[0038] S4-2: Calculate the similarity value of two entities e1 and e2:
[0039] sim(e1,e2)=1-dis(F1,F2)
[0040] where sim(e1,e2)∈(0,1];
[0041] S4-3: Calculate the loss. The loss function is as follows:
[0042]
[0043] Among them, d′ i and d″ i are the distances between the feature vectors of the entities to be matched through SNN and PSNN respectively; N represents the number of sample groups; the sample groups can be divided into two categories, the first category is composed of the labels of the two entities to be matched and the comments of the second entity (i.e., label2, label1, and comment2), in order to enable the model to learn semantic information from different similar and heterogeneous annotation attributes, the second category of sample groups is composed of the comments of the two entities to be matched and the labels of the second entity (i.e., comment2, comment1, and label2); y represents the type of sample, y=1 represents a positive sample, and y=0 represents a negative sample;
[0044] S4-4: Adjust model parameters according to the calculation results of the loss function; in order to minimize the loss function, RNN and LSTM optimize the relevant parameters through back propagation and gradient descent;
[0045] S4-5: Given a training round size, model training ends when the corresponding round of training is completed.
[0046] Furthermore, the specific steps of step S5 are as follows:
[0047] S5-1: First, extract two sets of input from each entity pair to be matched: and as well as and The superscript indicates the group number, and the subscript indicates whether the annotation attribute comes from the ontology to be matched O1 or O2. Secondly, the input is embedded in characters. Then it is fed into GP-TNN to map the input to a new space and form a feature vector representation of the input in the new space. Finally, the similarity of the corresponding feature vectors is calculated by the sim(e1,e2) similarity measurement technology. The two groups of inputs of the entities to be matched are respectively passed through SNN and PSNN to obtain a total of 4 similarity values, and the maximum value is taken as the final similarity value of the entity pair to be matched.
[0048] S5-2: Given a threshold, filter the similarity values of each pair of entities to be matched to obtain a matching result.
[0049] Furthermore, the specific steps of step S6 are as follows:
[0050] S6-1: Calculate the recall rate, which refers to the proportion of correct matching pairs found to the correct matching pairs:
[0051]
[0052] Where R is the reference alignment, and A is the matching result obtained by a certain ontology matching method;
[0053] S6-2: Calculate the precision rate, which refers to the ratio of the correct matching pairs found to the matching pairs found:
[0054]
[0055] S6-3: Evaluate the quality of ontology matching results through the comprehensive evaluation index f-measure:
[0056]
[0057] Where a∈[0,1] is the relative weight of recall and precision.
[0058] The beneficial technical effects of the present invention are:
[0059] A GP-TNN-based ontology matching method is proposed, which can simultaneously perform semantic learning on similar and heterogeneous annotation attributes in the ontology through SNN and PSNN. The obtained semantic features can more comprehensively represent the semantic information of the entity, and thus can effectively promote the improvement of the quality of ontology matching results. It solves the problem that the existing ontology matching methods based on machine learning cannot comprehensively learn the semantic information of the ontology, resulting in the semantic features obtained cannot effectively represent the semantic information of the entity, and then the quality of the matching results cannot meet the actual interaction requirements between ontology-based intelligent systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 It is an ontology matching technology framework based on the true-false triplet neural network;
[0061] Figure 1 In the figure, the correspondence between the component names and the figure numbers is as follows: O1 and O2 represent the entities to be matched; Entity1 and Entity2 are the same entities from O1 and O2 respectively; the superscripts 1 and 2 of Label and Comment represent two types of samples; Label1 and Label2 are the labels of Entity1 and Entity2 respectively; Comment1 and Comment2 are the interpretations of Entity1 and Entity2 respectively; Vector1, Vector2 and Vector3 are the word vectors of Label1 / Comment1, Label2 / Comment2 and Comment2 / Label2 after character embedding respectively; Feature1, Feature2 and Feature3 are the feature vectors of Vector1, Vector2 and Vector3 obtained by GP-TNN respectively;
[0062] Figure 2 It is the entity relationship diagram of the sensor ontology;
[0063] Figure 2 In the figure, the correspondence between the component names and the figure numbers is as follows: the circle nodes are class nodes, "is_a" is used to connect the child and parent classes, indicating their subordinate relationship; the other relationship attributes connecting two class nodes define the relationship between the two classes; the data attributes connect a class and its related attribute values (box content), indicating the assignment of values to the class. DETAILED DESCRIPTION
[0064] The present invention is described in detail below in conjunction with the accompanying drawings and embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] like Figure 1 As shown, the embodiment includes the following steps:
[0066] S1: Given an ontology to be matched, extract representative entities from each ontology to obtain a core entity set for constructing a training dataset. The specific steps are as follows:
[0067] S1-1: Calculate the degree centrality of the entity in the ontology. The degree centrality (DC) is an indicator for determining the importance of an entity in the network and is a quantification of the importance of an entity. The higher the degree centrality DC of an entity, the more representative the entity is in the ontology. In order to obtain effective training data, it is necessary to extract the core entities with higher DC in the ontology to be matched for the construction of the training set.
[0068] The degree centrality DC is calculated as the sum of the out-degree and in-degree of the entity; the out-degree and in-degree of the entity refer to the number of outgoing edges and the number of incoming edges of the entity in the parent-child entity relationship network of the entity, respectively.
[0069] S1-2: Sort the calculated results of the degree centrality DC of the entities in descending order, and select the top 30% entities as core entities.
[0070] Figure 2 The entity relationship diagram of the sensor entity is shown. In the diagram, classes are connected by "is_a", indicating the parent-child relationship between the two classes. Among them, the out-degree of "Device" is 1, the in-degree is 2, and the DC is 3; the out-degree of "sensor" is 1, the in-degree is 1, and the DC is 2, so the DC of "Device" is higher than that of "sensor", that is, "Device" is more important than "sensor" and is more likely to be selected as the core entity.
[0071] S2: Construct a training data set. In order to provide high-quality data for model training, the present invention adopts a new hybrid similarity measurement method, which uses multiple similarity measurement technologies to solve various heterogeneous problems in the ontology. The present invention only calculates the similarity of core entities, and the amount of calculation is greatly reduced. However, in order to prevent the huge amount of calculation caused by the matching work of core entities when facing ultra-large-scale ontologies, the present invention adopts a sequential matching strategy, that is, different similarity measurement technologies are used to measure the similarity of entity attributes in a top-down order. When a similarity measurement technology determines the matching relationship of the entity, the subsequent similarity calculation work is no longer performed. The specific steps are as follows:
[0072] S2-1: Determine the matching relationship between core entities as follows:
[0073] Given the ontologies O1 and O2 to be matched and the threshold T, randomly select the core entities e1 and e2 of the same type to be matched of O1 and O2 to form a pair of entities to be matched, and take the annotation attributes label1 and label2, comment1 and comment2 of the pair of entities to be matched, and use the N-gram technology to calculate the similarity value of e1 and e2: s1 = N-gram (label1, label2);
[0074] If s1>T, then the similarity value between e1 and e2 is s1, otherwise Sim WP Technically calculate the similarity value of e1 and e2:
[0075] s2=Sim WP (label1, label2)
[0076] If s2>T, then the similarity value of e1 and e2 is s2, otherwise the Cosine technique is used to calculate the similarity value of e1 and e2:
[0077] s3=Cosine(comment1,comment2)
[0078] If s3>T, then the similarity value of e1 and e2 is s3, otherwise e1 and e2 do not match.
[0079] S2-2: Construct a training data set as follows:
[0080] Cartesian product is performed on all core entities in the matching ontology O1 and O2, and the similarity value of each core entity pair in the Cartesian product is calculated according to the method of S2-1. The core entity pairs with similarity values greater than the threshold T will be selected as positive samples of training data. As a constraint, one entity in the positive sample is replaced with other entities in the core entity of the ontology where the entity is located by random assignment, and then the construction of negative samples is completed. The number of negative samples is consistent with the number of positive samples. Finally, 80% of the sample quantity is randomly selected as the training set and 20% as the validation set.
[0081] S3: Perform character embedding on the training data set to convert characters into character vectors that can be recognized by computers.
[0082] GP-TNN extracts the semantic features of the input entities and calculates the similarity to determine the similarity relationship of the entities to be matched. In order to enable the computer to recognize the input characters, the characters need to be encoded into character vectors. In order to make the character vectors rich in semantic information, character embedding (https: / / github.com / minimaxir / char-embeddings) is selected. The character embedding is trained by deep learning from GloVe840B / 300D word vectors (https: / / nlp.stanford.edu / projects / glove). It can effectively convert uncommon entities into character vectors, making up for the shortcomings of GloVe 840B / 300D word vectors. After character embedding encoding, the character vectors of semantically similar entities are closer in the new dimensional space. After character embedding, GP-TNN combines the original semantic information with the specific semantic information in the input entity, and further extracts semantic features to realize the similarity judgment of the matching entities.
[0083] S4: Send the encoded character vector to the true-pseudo triplet neural network for model training. The true-pseudo triplet neural network uses two recurrent neural networks RNN as the sub-network structure in the twin neural network SNN, and one of the two recurrent neural networks RNN is used together with the long short-term memory network LSTM as the sub-network structure of the pseudo twin neural network PSNN.
[0084] GP-TNN is an extension of Siamese Neural Network (SNN). GP-TNN feeds input into the internal network, which maps the input to a new space to form a feature vector representation of the input in the new space. The similarity between inputs is evaluated by calculating the similarity of the feature vectors. The triple neural network includes both SNN and Pseudo-Siamese Neural Network (PSNN), which aims to determine the similarity relationship of the entities to be matched from both the same attributes and different attributes in the ontology.
[0085] Among them, SNN contains two identical and shared parameter sub-network structures, which are often used to calculate the similarity relationship of similar inputs. In the present invention, two recurrent neural networks (RNN) are used as the sub-network structure in SNN. Because the length of label and comment characters in the ontology is short, RNN can effectively learn the semantic information before and after the entity. It is worth mentioning that because RNN needs to learn fewer parameters, it can quickly capture the relationship and semantic information between the entities to be matched during the cycle. The present invention uses RNN and long short-term memory network (Long Short-Term Memory, LSTM) as the sub-network structure of PSNN. LSTM controls the proportion of long-term memory and short-term memory by gating, and can effectively focus on key semantic information on the timeline, thereby improving model performance. In GP-TNN, SNN and PSNN share the same RNN to realize the true-false triplet network structure.
[0086] The model training process of GP-TNN is as follows:
[0087] S4-1: Calculate the distance between two eigenvectors:
[0088]
[0089] where ||·|| represents the Euclidean norm, dis(F1, F2)∈[0, 1);
[0090] S4-2: Calculate the similarity value of two entities e1 and e2:
[0091] sim(e1,e2)=1-dis(F1,F2)
[0092] where sim(e1,e2)∈(0,1];
[0093] S4-3: Calculate the loss. The loss function is as follows:
[0094]
[0095] Among them, d′ i and d″ iare the distances between the feature vectors of the entities to be matched through SNN and PSNN respectively; N represents the number of sample groups; the sample groups can be divided into two categories, the first category consists of the labels of the two entities to be matched and the comments of the second entity (i.e. label2, label1 and comment2). In order to enable the model to learn semantic information from different similar and heterogeneous annotation attributes, the second category of sample groups consists of the comments of the two entities to be matched and the labels of the second entity (i.e. comment2, comment1 and label2); y represents the type of sample, y=1 represents a positive sample, and y=0 represents a negative sample. When the input sample is a similar entity, i.e. a positive sample, the loss function only has If the semantic feature vectors of the concepts to be matched are far apart in the feature space, it means that the current model is not good, thus increasing the loss. Then, if the distance between originally dissimilar entities is smaller in the feature space, the loss value will become larger, which meets the loss requirement.
[0096] S4-4: Adjust model parameters according to the calculation results of the loss function; in order to minimize the loss function, LSTM and RNN optimize the relevant parameters through back propagation and gradient descent.
[0097] S4-5: Given a training round size, model training ends when the corresponding round of training is completed.
[0098] S5: Send the verification data to the true-false triplet neural network for matching. The specific steps are as follows:
[0099] S5-1: First, extract two sets of input from each entity pair to be matched: and as well as and The superscript indicates the group number, and the subscript indicates whether the annotation attribute comes from the ontology to be matched O1 or O2; secondly, the input is embedded in characters; then it is fed into GP-TNN to map the input to a new space and form a feature vector representation of the input in the new space; finally, the similarity of the corresponding feature vector is calculated through the sim(e1,e2) similarity measurement technology. The two groups of inputs of the entities to be matched will obtain a total of 4 similarity values through SNN and PSNN respectively, and the maximum value will be taken as the final similarity value of the entity pair to be matched.
[0100] S5-2: Given a threshold, filter the similarity values of each pair of entities to be matched to obtain a matching result.
[0101] S6: Evaluate the matching results to verify the effectiveness of the true-false triplet neural network model. The specific steps are as follows:
[0102] S6-1: Calculate the recall rate, which refers to the proportion of correct matching pairs found to the correct matching pairs:
[0103]
[0104] Where R is the reference alignment, and A is the matching result obtained by a certain ontology matching method;
[0105] S6-2: Calculate the precision rate, which refers to the ratio of the correct matching pairs found to the matching pairs found:
[0106]
[0107] S6-3: Evaluate the quality of ontology matching results through the comprehensive evaluation index f-measure:
[0108]
[0109] Where a∈[0,1] is the relative weight of recall and precision.
[0110] Terminology explanation:
[0111] (1) Ontology: an explicit specification of a conceptualization;
[0112] (2) Entity: A general term for the classes, data attributes, and relationship attributes that make up an ontology;
[0113] (3) Annotation attributes: used to describe, quantify, and limit entities, usually including labels and comments. Matching between entities is achieved by matching their annotation attributes;
[0114] (4) Similarity measurement technology: a function used to calculate the similarity values between entities in the ontology to be matched;
[0115] (5) Character embedding: Through machine learning, characters are mapped to multidimensional space and vectorized. The character vector will contain the semantic and structural information of the original character, and similar characters will be closer in the multidimensional space.
[0116] (6) Heterogeneity: Due to the subjectivity of domain experts, differences in language, semantics, and structure will occur when constructing ontologies, which will lead to heterogeneity between ontologies when they interact.
[0117] (7) Reference matching: ontology matching results used for reference;
[0118] (8) Semantic features: the basic conceptual components of lexical meaning.
[0119] References:
[0120] [1] Gruber T R. A translation approach to portable ontology specifications[J]. Knowledge acquisition, 1993, 5(2): 199 - 220.
[0121] [2] Mascardi V, Locoro A, Rosso P. Automatic ontology matching via upper ontologies: A systematic evaluation[J]. IEEE Transactions on knowledge and data engineering, 2009, 22(5): 609 - 623.
[0122] [3] Lu J, Xue X, Lin G, et al. A new ontology meta - matching technique with a hybrid semantic similarity measure[M]. Advances in Intelligent Information Hiding and Multimedia Signal Processing. Springer, Singapore, 2020: 37 - 45.
[0123] [4] Wu Z, Palmer M. Verb semantics and lexical selection[J]. arXiv preprint cmp - lg / 9406033, 1994.
[0124] [5] Miller G A. WordNet: a lexical database for English[J]. Communications of the ACM, 1995, 38(11): 39 - 41.
[0125] [6] Bento A, Zouaq A, Gagnon M. Ontology matching using convolutional neural networks [C]. Proceedings of the 12th language resources and evaluation conference. Marseille, France: European Language Resources Association, 2020: 5648-5653.
[0126] [7]Jiang C, Xue
[0127] [8]Iyer V, Agarwal A, Kumar H.VeeAlign: a supervised deep learning approach to ontology alignment[C].OM@ISWC 2020.Athens,Greece:CEUR-WS.org,2020:216-224.
[0128] [9]Xue X, Jiang C, Zhang J, et al. Matching sensor ontologies through siamese neural networks without using reference alignment[J]. PeerJ ComputerScience, 2021,7:1-22.
[0129] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and implementation modes, and can be fully applicable to various fields suitable for the present invention. For those familiar with the art, for those of ordinary skill in the art, various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principle and spirit of the present invention. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to specific details.
Claims
1. An ontology matching method based on a true-false triplet neural network, characterized in that: The following steps are involved: S1: Given an ontology to be matched, extract representative entities from the ontology to be matched and obtain a core entity set for constructing a training dataset; S2: Build training dataset; S3: Perform character embedding on the training data set to convert characters into character vectors that can be recognized by computers; S4: sending the encoded character vector to a true-pseudo triplet neural network for model training; the true-pseudo triplet neural network uses two recurrent neural networks RNN as a sub-network structure in a twin neural network SNN, and one of the two recurrent neural networks RNN is used together with a long short-term memory network LSTM as a sub-network structure of a pseudo twin neural network PSNN; S5: sending the verification data into the true-false triplet neural network for matching; S6: Evaluate the matching results to verify the effectiveness of the true-false triplet neural network model; The specific steps of step S4 are as follows: S4-1: Calculate the distance between two eigenvectors: where ||·|| represents the Euclidean norm, dis(F1, F2)∈[0, 1); S4-2: Calculate the similarity value of two entities e1 and e2: sim(e1,e2)=1-dis(F1,F2) where sim(e1,e2)∈(0,1]; S4-3: Calculate the loss. The loss function is as follows: Among them, d′ i and d″ i are the distances between the feature vectors of the entities to be matched through SNN and PSNN respectively; N represents the number of sample groups; the sample groups can be divided into two categories, the first category is composed of the labels of the two entities to be matched and the comments of the second entity, namely label2, label1 and comment2; in order to enable the model to learn semantic information from different similar and heterogeneous annotation attributes, the second category of sample groups is composed of the comments of the two entities to be matched and the labels of the second entity, namely comment2, comment1 and label2; y represents the type of sample, y=1 represents a positive sample, and y=0 represents a negative sample; S4-4: Adjust model parameters according to the calculation results of the loss function; in order to minimize the loss function, RNN and LSTM optimize the relevant parameters through back propagation and gradient descent; S4-5: Given a training round size, model training ends when the corresponding round of training is completed.
2. The ontology matching method based on true-false triplet neural network according to claim 1, characterized in that: The specific steps of step S1 are as follows: S1-1: Calculate the degree centrality of the entity in the ontology; the degree centrality is an indicator for determining the importance of an entity in the network, and is a quantification of the importance of an entity. The higher the degree centrality of an entity, the more representative the entity is in the ontology; The degree centrality is calculated by the sum of the out-degree and in-degree of the entity; the out-degree and in-degree of the entity refer to the number of outgoing edges and the number of incoming edges of the entity in the parent-child entity relationship network of the entity respectively; S1-2: Sort the calculated results of the degree centrality of the entities in descending order, and select the top 30% entities as core entities.
3. The ontology matching method based on true-false triplet neural network according to claim 1, characterized in that: The specific steps of step S2 are as follows: S2-1: Determine the matching relationship between core entities as follows: Given the ontologies O1 and O2 to be matched and the threshold T, randomly select the core entities e1 and e2 of the same type to be matched of O1 and O2 to form a pair of entities to be matched, and take the annotation attributes label1 and label2, comment1 and comment2 of the pair of entities to be matched, and use the N-gram technology to calculate the similarity value of e1 and e2: s1 = N-gram (label1, label2); If s1>T, then the similarity value of e1 and e2 is s1, otherwise SimW is used P Technically calculate the similarity value of e1 and e2: <h2 style=";text-align:left;direction:ltr">s2=Sim<h2 style=";text-align:left;direction:ltr"> WP <h2 style=";text-align:left;direction:ltr"> (label1, label2) If s2>T, then the similarity value of e1 and e2 is s2, otherwise the Cosine technique is used to calculate the similarity value of c1 and c2: s3=Cosine(comment1,comment2) If s3>T, then the similarity value of e1 and e2 is s3, otherwise e1 and e2 do not match; S2-2: Construct a training data set as follows: Make a Cartesian product of all core entities in the matching ontologies O1 and O2, and calculate the similarity value of each core entity pair in the Cartesian product according to the method in step S2-1. The core entity pairs with similarity values greater than the threshold T will be selected as positive samples of training data; as a constraint, replace one entity in the positive sample with other entities in the core entity of the ontology where the entity is located through random assignment, and then complete the construction of negative samples. The number of negative samples is consistent with the number of positive samples; finally, 80% of the sample quantity is randomly selected as the training set and 20% as the validation set.
4. The ontology matching method based on true-false triplet neural network according to claim 1, characterized in that: The specific steps of step S5 are as follows: S5-1: First, extract two sets of input from each pair of entities to be matched: and as well as and The superscript indicates the group number, and the subscript indicates whether the annotation attribute comes from the ontology to be matched O1 or O2. Secondly, the input is embedded in characters. Then it is fed into GP-TNN to map the input to a new space and form a feature vector representation of the input in the new space. Finally, the similarity of the corresponding feature vectors is calculated by the sim(e1,e2) similarity measurement technology. The two groups of inputs of the entities to be matched are respectively passed through SNN and PSNN to obtain a total of 4 similarity values, and the maximum value is taken as the final similarity value of the entity pair to be matched. S5-2: Given a threshold, filter the similarity values of each pair of entities to be matched to obtain a matching result.
5. The ontology matching method based on true-false triplet neural network according to claim 1, characterized in that: The specific steps of step S6 are as follows: S6-1: Calculate the recall rate, which refers to the proportion of correct matching pairs found to the correct matching pairs: Where R is the reference alignment, and A is the matching result obtained by the ontology matching method; S6-2: Calculate the precision rate, which refers to the ratio of the correct matching pairs found to the matching pairs found: S6-3: Evaluate the quality of ontology matching results through the comprehensive evaluation index f-measure: Where a∈[0,1] is the relative weight of recall and precision.
