An entity matching method, device and medium for multi-version knowledge graph
Through the twin-graph convolutional neural network method, the complexity and accuracy of entity matching in multi-version knowledge graphs are solved, and efficient entity matching between different versions of knowledge graphs is achieved.
Patent Information
- Application Number
- CN202310116057.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-13
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2043-02-13
AI Technical Summary
The existing entity matching methods have high computational complexity, difficult to obtain data quality and prior matching knowledge in multi-version knowledge graphs, and it is difficult to efficiently match entities.
The twin-graph convolution neural network is used to obtain historical versions of knowledge graph data, build a version library, determine entity numbers and labels, calculate text attribute feature vectors, build entity sets, calculate node features using graph convolution subnetwork, and perform entity matching through similarity evaluation and loss functions.
Reduces the complexity of entity matching, improves the accuracy and efficiency of matching, and enables efficient matching between knowledge graphs of different sizes and dimensions.
Smart Images

Figure CN116306933B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an entity matching method, device, and medium for multi-version knowledge graphs. Background Art
[0002] Knowledge graphs use a graphical data structure to represent knowledge. Nodes in the graph represent entities, and edges represent relationships between entities. This data structure better reflects the complexity and structure of knowledge, enabling it to represent a variety of relationships between entities and better reflect the authenticity and richness of knowledge. With the passage of time and technological advancements, knowledge is growing explosively. Knowledge graphs typically utilize distributed storage technology, offering scalability and maintainability, adapting to the ever-increasing volume of knowledge and supporting the storage and management of large-scale knowledge. Consequently, knowledge graphs are widely used to organize and manage large amounts of data and information.
[0003] However, due to differences in requirements and design concepts, any organization or institution can create a knowledge graph, resulting in diverse and heterogeneous knowledge and a lot of duplicate knowledge. To efficiently integrate knowledge from different knowledge graphs and improve storage space utilization, the problem of entity matching between different versions of knowledge graphs has attracted increasing research attention.
[0004] Entity matching refers to the process of determining whether two entities in a knowledge graph with multiple versions refer to the same real-world object. To illustrate the usefulness of entity matching, let's take the intelligent transportation system as an example. In recent years, guided by national policies, the development of information technologies such as traffic control, analysis, and big data management, as well as diversified mobility needs, has driven the rapid development and innovation of intelligent transportation systems, and their services are gradually evolving and upgrading towards autonomy through three generations: "assisted autonomy, high autonomy, and full autonomy." During the development of autonomous transportation systems, entity matching is required between the knowledge graph versions corresponding to the three generations to support their evolutionary analysis and intuitively demonstrate the dynamic changes in the transportation system.
[0005] Under the current big data conditions, existing mainstream matching methods face many problems and challenges, the most prominent of which are computational complexity, data quality, and the acquisition of prior matching knowledge. All of these require effective algorithms designed based on actual conditions to solve them. Summary of the Invention
[0006] In view of this, the embodiments of the present invention provide an entity matching method, device and medium for multi-version knowledge graphs with low complexity, high accuracy and high efficiency, which can adapt to knowledge graphs of different sizes or dimensions and effectively match, verify and extract the same entity in multiple versions of the knowledge graph.
[0007] One aspect of an embodiment of the present invention provides an entity matching method for a multi-version knowledge graph, including:
[0008] Obtain historical versions of knowledge graph data and build a knowledge graph version library;
[0009] Determine the entity number and entity label in each version of the knowledge graph in the knowledge graph version library;
[0010] Calculate the text attribute feature vector of each entity;
[0011] Search for neighboring entities of each entity based on the graph structure and construct an entity set containing each entity and its neighboring entities;
[0012] Extracting a feature matrix of each entity set according to the connection attributes between the text attribute feature vector and the entity set to obtain a data set;
[0013] According to the twin neural network, the entities are input into the graph convolution sub-network according to different versions to calculate the node features of each entity;
[0014] Calculate the feature value and loss of each entity based on the similarity evaluation function, the loss function, and the entity number and entity label in each version of the knowledge graph in the knowledge graph version library;
[0015] The loss of each entity is shared and back-propagated, and the similarity of entities between versions is calculated based on the node features of each entity calculated by the twin neural network to complete entity matching.
[0016] Optionally, the method further includes the step of constructing a twin-graph convolutional network, which includes:
[0017] Build a knowledge graph based on the same ontology data source and different versions;
[0018] Through the graph convolution sub-network, node features of entities between knowledge graph versions are obtained;
[0019] Shared loss is achieved through twin neural networks to support entity matching between different versions in knowledge graphs of different sizes.
[0020] Optionally, determining the entity numbers and entity labels in each version of the knowledge graph in the knowledge graph version library includes:
[0021] For each entity, determine the entity number of other versions of the knowledge graph that matches the entity a priori.
[0022] Optionally, calculating the text attribute feature vector of each entity includes:
[0023] According to the entity attribute set of the knowledge graph database, a corpus is constructed to train word vector or sentence vector models;
[0024] Depending on the size of the corpus, choose whether to use a pre-trained model to calculate the text attribute feature vector of each entity.
[0025] Optionally, searching for neighboring entities of each entity according to the graph structure and constructing an entity set including each entity and its neighboring entities includes:
[0026] According to the characteristics of the knowledge graph, different numbers of adjacent entities are selected to generate entity sets.
[0027] Optionally, extracting a feature matrix of each entity set based on the connection attributes between the text attribute feature vector and the entity set to obtain a data set includes:
[0028] Generate different adjacency matrices based on the weight and directionality of the edges connecting entities;
[0029] According to the node degree principle, different degree matrices are generated.
[0030] Optionally, the method further comprises the step of constructing a twin neural sub-network, which comprises at least one of the following:
[0031] According to the difference in matching targets, the twin neural sub-network is determined to be a graph convolutional network-graph convolutional network;
[0032] Alternatively, based on the difference in matching targets, the twin neural sub-network is determined to be a graph convolutional network-convolutional network;
[0033] Alternatively, based on the difference in matching targets, the twin neural sub-network is determined to be a convolutional network-convolutional network.
[0034] Another aspect of the present invention provides an entity matching device for a multi-version knowledge graph, including:
[0035] The first module is used to obtain historical versions of knowledge graph data and build a knowledge graph version library;
[0036] The second module is used to determine the entity number and entity label in each version of the knowledge graph in the knowledge graph version library;
[0037] The third module is used to calculate the text attribute feature vector of each entity;
[0038] The fourth module is used to search for neighboring entities of each entity based on the graph structure and construct an entity set containing each entity and its neighboring entities;
[0039] A fifth module is configured to extract a feature matrix of each entity set based on the text attribute feature vector and the connection attribute between the entity set to obtain a data set;
[0040] The sixth module is used to input entities into the graph convolution sub-network according to different versions of the twin neural network and calculate the node features of each entity;
[0041] The seventh module is used to calculate the feature value and loss of each entity based on the similarity evaluation function, the loss function, and the entity number and entity label in each version of the knowledge graph in the knowledge graph version library;
[0042] The eighth module is used to share and back-propagate the loss of each entity, calculate the similarity of entities between versions based on the node features of each entity calculated by the twin neural network, and complete entity matching.
[0043] Another aspect of an embodiment of the present invention further provides an electronic device, including a processor and a memory;
[0044] The memory is used to store programs;
[0045] The processor executes the program to implement the method described above.
[0046] Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described above.
[0047] The present invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the above method.
[0048] The embodiment of the present invention obtains the knowledge graph data of historical versions and constructs a knowledge graph version library; determines the entity number and entity label in each version of the knowledge graph in the knowledge graph version library; calculates the text attribute feature vector of each entity; searches for the neighboring entities of each entity according to the graph structure, and constructs an entity set containing each entity and the neighboring entities; extracts the feature matrix of each entity set according to the connection attributes between the text attribute feature vector and the entity set, and obtains a data set; according to the twin neural network, inputs the entity into the graph convolution subnetwork according to different versions, and calculates the node features of each entity; calculates the feature value and loss of each entity according to the similarity evaluation function, the loss function and the entity number and entity label in each version of the knowledge graph in the knowledge graph version library; shares and backpropagates the loss of each entity, calculates the similarity of entities between versions according to the node features of each entity calculated by the twin neural network, and completes entity matching. The present invention is based on the twin-graph convolutional neural network, which can accurately extract the node features of entities and can complete entity matching between knowledge graphs of multiple versions and different sizes (dimensions). The present invention reduces complexity and improves accuracy and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0050] Figure 1 An overall step flow chart provided for an embodiment of the present invention;
[0051] Figure 2 A diagram of the twin-graph convolutional neural network framework provided by an embodiment of the present invention;
[0052] Figure 3 A diagram of the data structure provided for the implementation of the present invention;
[0053] Figure 4 This is a schematic diagram of the knowledge graph for L2 autonomous driving;
[0054] Figure 5 This is a schematic diagram of the knowledge graph for L3 autonomous driving;
[0055] Figure 6 This is a comparison chart of the accuracy rates provided for the implementation of the present invention. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0057] To address the problems in the prior art, one aspect of an embodiment of the present invention provides an entity matching method for a multi-version knowledge graph, including:
[0058] Obtain historical versions of knowledge graph data and build a knowledge graph version library;
[0059] Determine the entity number and entity label in each version of the knowledge graph in the knowledge graph version library;
[0060] Calculate the text attribute feature vector of each entity;
[0061] Search for neighboring entities of each entity based on the graph structure and construct an entity set containing each entity and its neighboring entities;
[0062] Extracting a feature matrix of each entity set according to the connection attributes between the text attribute feature vector and the entity set to obtain a data set;
[0063] According to the twin neural network, the entities are input into the graph convolution sub-network according to different versions to calculate the node features of each entity;
[0064] Calculate the feature value and loss of each entity based on the similarity evaluation function, the loss function, and the entity number and entity label in each version of the knowledge graph in the knowledge graph version library;
[0065] The loss of each entity is shared and back-propagated, and the similarity of entities between versions is calculated based on the node features of each entity calculated by the twin neural network to complete entity matching.
[0066] Optionally, the method further includes the step of constructing a twin-graph convolutional network, which includes:
[0067] Build a knowledge graph based on the same ontology data source and different versions;
[0068] Through the graph convolution sub-network, node features of entities between knowledge graph versions are obtained;
[0069] Shared loss is achieved through twin neural networks to support entity matching between different versions in knowledge graphs of different sizes.
[0070] Optionally, determining the entity numbers and entity labels in each version of the knowledge graph in the knowledge graph version library includes:
[0071] For each entity, determine the entity number of other versions of the knowledge graph that matches the entity a priori.
[0072] Optionally, calculating the text attribute feature vector of each entity includes:
[0073] According to the entity attribute set of the knowledge graph database, a corpus is constructed to train word vector or sentence vector models;
[0074] Depending on the size of the corpus, choose whether to use a pre-trained model to calculate the text attribute feature vector of each entity.
[0075] Optionally, searching for neighboring entities of each entity according to the graph structure and constructing an entity set including each entity and its neighboring entities includes:
[0076] According to the characteristics of the knowledge graph, different numbers of adjacent entities are selected to generate entity sets.
[0077] Optionally, extracting a feature matrix of each entity set based on the connection attributes between the text attribute feature vector and the entity set to obtain a data set includes:
[0078] Generate different adjacency matrices based on the weight and directionality of the edges connecting entities;
[0079] According to the node degree principle, different degree matrices are generated.
[0080] Optionally, the method further comprises the step of constructing a twin neural sub-network, which comprises at least one of the following:
[0081] According to the difference in matching targets, the twin neural sub-network is determined to be a graph convolutional network-graph convolutional network;
[0082] Alternatively, based on the difference in matching targets, the twin neural sub-network is determined to be a graph convolutional network-convolutional network;
[0083] Alternatively, based on the difference in matching targets, the twin neural sub-network is determined to be a convolutional network-convolutional network.
[0084] Another aspect of the present invention provides an entity matching device for a multi-version knowledge graph, including:
[0085] The first module is used to obtain historical versions of knowledge graph data and build a knowledge graph version library;
[0086] The second module is used to determine the entity number and entity label in each version of the knowledge graph in the knowledge graph version library;
[0087] The third module is used to calculate the text attribute feature vector of each entity;
[0088] The fourth module is used to search for neighboring entities of each entity based on the graph structure and construct an entity set containing each entity and its neighboring entities;
[0089] A fifth module is configured to extract a feature matrix of each entity set based on the text attribute feature vector and the connection attribute between the entity set to obtain a data set;
[0090] The sixth module is used to input entities into the graph convolution sub-network according to different versions of the twin neural network and calculate the node features of each entity;
[0091] The seventh module is used to calculate the feature value and loss of each entity based on the similarity evaluation function, the loss function, and the entity number and entity label in each version of the knowledge graph in the knowledge graph version library;
[0092] The eighth module is used to share and back-propagate the loss of each entity, calculate the similarity of entities between versions based on the node features of each entity calculated by the twin neural network, and complete entity matching.
[0093] Another aspect of an embodiment of the present invention further provides an electronic device, including a processor and a memory;
[0094] The memory is used to store programs;
[0095] The processor executes the program to implement the method described above.
[0096] Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described above.
[0097] The present invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the above method.
[0098] The specific implementation process of the present invention is described in detail below in conjunction with the accompanying drawings:
[0099] To address the problems in the prior art, an embodiment of the present invention provides an entity matching method for a multi-version knowledge graph, including:
[0100] Based on the autonomous driving ontology data source, we obtain two versions of the knowledge graph database: L2 and L3. The elements of the knowledge graph include the collection of entities and relationships, as well as the attributes of each entity.
[0101] Based on the knowledge graph database, each entity is numbered. Then, according to the manual annotation principle, the labels between versions are determined to obtain the prior matching entities.
[0102] It is worth noting that the label is the number of the entity and the matching entity in other versions (generations / levels) of the knowledge graph. If there is no label, it means that there is no entity matching the entity in the other versions (generations / levels) of the knowledge graph.
[0103] It should be noted that when the label is input into the model, it will be processed as a 1 / 0 variable. 1 indicates a match and 0 indicates a mismatch. That is, except for the entity corresponding to the label, which is 1, all other entities are 0. Examples of prior matching entities in the knowledge graph at the L2 and L3 levels are shown in Table 1.
[0104] Table 1
[0105] L2 entity serial number Label L3 entity Label Label user 00001 10000 Emergency braking system 10005 00006 Geographic Information Systems 00003 10002 Dynamic driving task takeover 10014 Level 2 driving automation system 00023 10055 Level 3 driving automation system 10055 00023 Ultrasonic radar 00058 Collision Mitigation 10119 Object detection and recognition systems 00067 10062 Display and alarm system 10126 00127
[0106] Based on the word vector model, calculate the 300-dimensional feature vector of the text attributes of each entity definition according to the number and store them in sequence;
[0107] Based on the graph structure and according to the jump rule, the nine neighboring entities of each entity are searched according to the number, thereby constructing an entity set containing the entity and its neighboring entities;
[0108] Based on the feature vectors of entity text attributes and the connection attributes of entity sets, the adjacency matrix and degree matrix of each entity set are calculated and stored to construct a data set;
[0109] Based on the 7:3 dataset division principle, the dataset is divided into training set and test set;
[0110] Based on the twin neural network, the sub-networks are input separately according to the training sets of different versions (generations / levels);
[0111] Based on the graph convolutional subnetwork, the features of each entity node in the knowledge graph of different versions (generations / levels) are calculated and recorded according to the number;
[0112] Based on the cosine similarity evaluation function, the feature value of each entity between different versions is determined as follows;
[0113]
[0114] Among them, A i , B j They represent the node features of entity i in the knowledge graph of version A (generation / level) and the node features of entity j in the knowledge graph of version B (generation / level);
[0115] Based on the loss function and labels, the loss of entities between versions is calculated, and positive and negative samples are extracted according to the 1:2 sampling ratio rule;
[0116] Based on the twin neural network, the loss is shared and back-propagated, and the entity similarity is calculated and output according to the sigmoid activation function of the fully connected layer, as shown in the following formula;
[0117]
[0118] Based on the test set, complete the testing of entity matching and verification of the method.
[0119] Optionally, calculating the feature vector of the text attribute of each entity definition includes:
[0120] According to the granularity of the entity text description, determine whether to use word vector or sentence vector model to extract feature vector
[0121] Alternatively, the feature vectors are extracted by setting feature vectors of different dimensions according to the computing capability and accuracy of the storage medium.
[0122] Optionally, the method further includes:
[0123] According to the entity attribute set of the knowledge graph database, a corpus is constructed to train word vector or sentence vector models;
[0124] Alternatively, depending on the size of your corpus, choose whether to use a pre-trained model.
[0125] Optionally, the search for neighboring entities of each entity may select different numbers of neighboring entities according to the knowledge graph characteristics to generate an entity set.
[0126] Optionally, calculating the feature matrix of each entity set includes:
[0127] Different adjacency matrices can be generated based on the weight and directionality of the edges connecting entities;
[0128] Alternatively, different degree matrices can be generated based on the node degree principle.
[0129] Optionally, the dataset division principle may set different degrees of division between the training set and the test set according to the quality and size of the dataset.
[0130] Optionally, the training sets are input separately according to different versions (levels); different twin neural sub-networks can be set according to the differences in training objectives.
[0131] Optionally, the twin neural sub-network includes but is not limited to the following forms:
[0132] According to the model training results, the "graph convolutional network-graph convolutional network" form is used;
[0133] Alternatively, depending on the model training results, use the "graph convolutional network-convolutional network" form;
[0134] Alternatively, depending on the model training results, use the "convolutional network-convolutional network" form.
[0135] Optionally, the determination of the feature value of each entity between different versions may adopt different similarity evaluation functions according to the complexity of the knowledge graph and its entity attributes.
[0136] Optionally, the sampling rate rule can set different sampling rates according to the model training effect, training set characteristics, and label quality, and extract different numbers of positive and negative samples.
[0137] Optionally, the activation function of the fully connected layer can be set to different activation functions according to the test accuracy of the test set.
[0138] Figure 1 The figure shows a flow chart of the overall steps provided by an embodiment of the present invention, and the method includes:
[0139] Obtain multiple different versions of the knowledge graph database of the autonomous driving ontology data source;
[0140] Determine the feature vector of each entity and the feature matrix of the entity set containing its neighboring entities according to the text attributes and connection attributes of the entity;
[0141] Determine the node features of each entity based on the graph convolutional subnetwork;
[0142] According to the similarity evaluation function, the feature value of each entity in different versions is determined;
[0143] Extract positive and negative samples based on the loss function, label and sampling rate rules;
[0144] According to the twin neural network, the loss is shared and back-propagated; according to the fully connected layer activation function, the entity similarity is calculated.
[0145] Among them, the model framework diagram of the twin-graph convolutional neural network of the present invention is as follows Figure 2 As shown in Figure 2, the model is based on a shared loss on two independent graph convolutional sub-networks, where the loss is the cosine loss of entities and labels of different versions of the knowledge graph.
[0146] It is worth noting that the node features of each entity are determined based on the graph convolutional network, including:
[0147] The network parameter update process based on the adjacency matrix and degree matrix is as follows:
[0148]
[0149]
[0150] Among them, l represents the number of graph convolutional subnetwork layers, A represents the adjacency matrix, D represents the degree matrix, and i and j represent the entity and its adjacent entities respectively.
[0151] The node feature calculation process based on the adjacency matrix and word vector is as follows:
[0152]
[0153]
[0154] Here, X represents the word vector.
[0155] It should be noted that the cosine loss function is used for data E(A, B, L) containing N samples. A and B represent the two input entities, and L represents the true label, which belongs to {0, 1}, indicating dissimilarity and similarity respectively. The loss corresponding to the i-th sample is as follows:
[0156]
[0157] Among them, the schematic diagram of the knowledge graph database construction structure of multiple versions of the present invention is as follows Figure 3 As shown in Figure 1, the structure is based on the components of an autonomous vehicle, including users, functions, systems, hardware, and data. There are differences between the multiple versions of the knowledge graph.
[0158] It is worth noting that the database data source can be a CSV (Comma-Separated Values), OWL (Web Ontology Language) file, and a database. When the data source is a database, the storage type is a graph database.
[0159] It should be noted that the differences between different versions of the knowledge graph database include at least one of the following:
[0160] Changes to constituent elements, including addition, deletion, and modification of elements;
[0161] Or, changes in relationships, including connectivity and directionality.
[0162] The following uses a specific multi-version knowledge graph as an example, combined with the accompanying drawings and specific data to further explain the present invention in detail. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0163] According to the SAE (Society of Automotive Engineer) classification of autonomous driving automation levels into six levels, from L0 to L5, two versions of knowledge graphs are constructed for L2 and L3 autonomous driving to represent the key elements required for autonomous driving vehicles at each level. Figure 4 、 Figure 5 ,in, Figure 4 Represents the knowledge graph of L2 autonomous driving vehicles, Figure 5 Represents the knowledge graph of L3 autonomous driving vehicles.
[0164] After obtaining the L2 and L3 knowledge graphs, we manually annotate the entities in both versions of the knowledge graphs. We then calculate the 300-dimensional word vectors for the text attributes defined for each entity. Based on the graph structure, we search for nine adjacent entities to form an entity set. We then extract the adjacency matrix and degree matrix for each entity set's connection attributes.
[0165] A dataset was constructed based on the text attribute feature vectors and the connection attribute feature matrix. The dataset was split into training and test sets at a ratio of 7:3. The dataset was then fed into two graph convolutional subnetworks based on version (generation / level). After computing entity node features, the loss was calculated using the cosine similarity evaluation function and the labels. Positive and negative samples were extracted using a 1:2 sampling ratio. The results of the dataset construction are shown in Table 2.
[0166] Table 2
[0167]
[0168] After summarizing the positive and negative samples, the shared loss is calculated using the cosine loss function according to the twin neural network. Finally, the similarity between each two entities is calculated using the sigmoid activation function of the fully connected layer. Figure 6 shown.
[0169] In summary, the present invention first obtains a knowledge graph database of multiple versions (generations / levels), wherein the elements of the knowledge graph include a set of entities and relationships, and a set of information related to the attributes of each entity; then, the adjacent entities of each entity are extracted according to the graph structure, and an entity set is constructed; then, according to the text attributes of the entity and the connection attributes of the entity set of the entity set, the word vector, the adjacency matrix and the degree matrix are determined to construct a data set. Then, after dividing the data set, the graph convolution subnetwork is input according to the version to determine the node features of each entity; then, according to the similarity evaluation function and label extraction, the loss is calculated and shared according to the twin neural network loss function after extracting the sample; finally, the similarity between each two entities of different versions is determined by the fully connected layer activation function. Based on different versions of the same knowledge graph, the present invention further accurately calculates the node features of the entity according to the twin-graph convolutional neural network, reduces the complexity of entity matching, and can complete entity matching with higher accuracy and efficiency between knowledge graphs of various versions and different sizes (dimensions).
[0170] In some optional embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided in an exemplary manner for the purpose of providing a more comprehensive understanding of the technology. The disclosed method is not limited to the operation and logic flow presented herein. Optional embodiments are contemplated in which the order of the various operations is changed and the sub-operations described as a part of a larger operation are performed independently.
[0171] Furthermore, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise indicated, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It will also be understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present invention. More specifically, given the properties, functions, and internal relationships of the various functional modules in the devices disclosed herein, the actual implementation of the module will be understood within the ordinary skill of an engineer. Therefore, a person skilled in the art using ordinary skill will be able to implement the present invention set forth in the claims without undue experimentation. It will also be understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0172] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0173] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0174] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.
[0175] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0176] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0177] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the claims and their equivalents.
[0178] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. An entity matching method for multi-version knowledge graphs, characterized in that: include: Obtain historical versions of knowledge graph data and build a knowledge graph version library; Determine the entity number and entity label in each version of the knowledge graph in the knowledge graph version library; Calculate the text attribute feature vector of each entity; Search for neighboring entities of each entity based on the graph structure and construct an entity set containing each entity and its neighboring entities; Extracting a feature matrix of each entity set according to the connection attributes between the text attribute feature vector and the entity set to obtain a data set; According to the twin neural network, the entities are input into the graph convolution sub-network according to different versions to calculate the node features of each entity; Calculate the feature value and loss of each entity based on the similarity evaluation function, the loss function, and the entity number and entity label in each version of the knowledge graph in the knowledge graph version library; The loss of each entity is shared and back-propagated, and the similarity of entities between versions is calculated based on the node features of each entity calculated by the twin neural network to complete entity matching; The method further includes the step of constructing a twin-graph convolutional network, which includes: Build a knowledge graph based on the same ontology data source and different versions; Through the graph convolution sub-network, node features of entities between knowledge graph versions are obtained; Shared loss is achieved through twin neural networks, supporting entity matching between different versions of knowledge graphs of different sizes. The method extracts a feature matrix of each entity set according to the connection attributes between the text attribute feature vector and the entity set to obtain a data set, including: Generate different adjacency matrices based on the weight and directionality of the edges connecting entities; According to the node degree principle, different degree matrices are generated; The method further includes the step of constructing a twin neural sub-network, which includes at least one of the following: According to the difference in matching targets, the twin neural sub-network is determined to be a graph convolutional network-graph convolutional network; Alternatively, based on the difference in matching targets, the twin neural sub-network is determined to be a graph convolutional network-convolutional network; Alternatively, based on the difference in matching targets, the twin neural sub-network is determined to be a convolutional network-convolutional network.
2. The entity matching method for multi-version knowledge graph according to claim 1 is characterized in that: Determining the entity number and entity label in each version of the knowledge graph in the knowledge graph version library includes: For each entity, determine the entity number of other versions of the knowledge graph that matches the entity a priori.
3. The entity matching method for multi-version knowledge graph according to claim 1 is characterized in that: The calculation of the text attribute feature vector of each entity includes: According to the entity attribute set of the knowledge graph database, a corpus is constructed to train word vector or sentence vector models; Depending on the size of the corpus, choose whether to use a pre-trained model to calculate the text attribute feature vector of each entity.
4. The entity matching method for multi-version knowledge graph according to claim 1 is characterized in that: The step of searching for neighboring entities of each entity based on the graph structure and constructing an entity set including each entity and its neighboring entities includes: According to the characteristics of the knowledge graph, different numbers of adjacent entities are selected to generate entity sets.
5. A device for implementing the entity matching method for multi-version knowledge graphs as described in any one of claims 1 to 4, characterized in that: include: The first module is used to obtain historical versions of knowledge graph data and build a knowledge graph version library; The second module is used to determine the entity number and entity label in each version of the knowledge graph in the knowledge graph version library; The third module is used to calculate the text attribute feature vector of each entity; The fourth module is used to search for neighboring entities of each entity based on the graph structure and construct an entity set containing each entity and its neighboring entities; A fifth module is configured to extract a feature matrix of each entity set based on the text attribute feature vector and the connection attribute between the entity set to obtain a data set; The sixth module is used to input entities into the graph convolution sub-network according to different versions of the twin neural network and calculate the node features of each entity; The seventh module is used to calculate the feature value and loss of each entity based on the similarity evaluation function, the loss function, and the entity number and entity label in each version of the knowledge graph in the knowledge graph version library; The eighth module is used to share and back-propagate the loss of each entity, calculate the similarity of entities between versions based on the node features of each entity calculated by the twin neural network, and complete entity matching.
6. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that The storage medium stores a program, and the program is executed by a processor to implement the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Multi-language knowledge matching method and device for nodes and links in knowledge graph
CN111858961A
Knowledge graph entity alignment method, system and equipment based on graph neural network
CN115271071A