Method for processing multi-scenario heterogeneous data
By using graph convolutional neural networks and transE models in multi-scenario heterogeneous data processing methods, we extract structural topological features and entity relationship features in the knowledge graph, and construct an entity alignment probability matrix, which solves the problem of entity alignment caused by the heterogeneity of the knowledge graph. accuracy issues and achieve more efficient data fusion.
Patent Information
- Application Number
- PCT/CN2023/114849
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-19
- Filing Date
- 2023-08-25
- Publication Date
- 2024-10-24
AI Technical Summary
In the existing technology, the heterogeneity of knowledge graphs is too strong, resulting in poor accuracy of entity alignment, and some knowledge graphs are missing and incomplete.
A multi-scenario heterogeneous data processing method based on graph convolutional neural network and transE model is used to extract the structural topological features and entity relationship features of text entities from knowledge graphs in different scenarios, construct an entity alignment probability matrix, and determine aligned entity pairs. , and perform data fusion.
It improves the accuracy of text entity semantic extraction, overcomes the problem of inaccurate semantic information extraction caused by the heterogeneity of knowledge graphs, enhances the accuracy of entity alignment and data fusion effect, and effectively solves the problems of data redundancy and data conflict.
Smart Images

Figure CN2023114849_24102024_PF_FP_ABST
Abstract
Description
A multi-scenario heterogeneous data processing method Technical Field
[0001] The present invention relates to the technical field of text data processing, and in particular to a method for processing heterogeneous data in multiple scenarios. Background Art
[0002] With the advent of the big data era, data scattered across various application scenarios can be effectively integrated to achieve centralized management of data information and improve the performance of tasks such as data analysis and data retrieval. In areas such as data recommendation and data retrieval, corresponding knowledge graphs are constructed for text data in specific fields or scenarios (such as film and medicine). Data fusion is achieved by connecting the knowledge graphs from different scenarios.
[0003] Data in different application scenarios are heterogeneous and redundant, that is, data in different application scenarios have different structures and expressions, resulting in a considerable degree of heterogeneity between the generated knowledge graphs for different scenarios. When fusing heterogeneous knowledge graphs from multiple scenarios, data redundancy and data conflicts are prone to occur. Therefore, in order to improve the fusion accuracy of heterogeneous data in multiple scenarios, text entity alignment can be performed on knowledge graphs in different scenarios, and text entities corresponding to the same object can be aligned to reduce data redundancy and data conflicts in the fused data. However, the current knowledge graphs are too heterogeneous, and text entities have different expressions with the same meaning, different meanings with the same expression, different knowledge graph network structures, and even different languages, making it difficult to guarantee the accuracy of entity alignment. Technical issues
[0004] The present invention provides a multi-scenario heterogeneous data processing method to solve the defects in the prior art that the knowledge graph is too heterogeneous and some knowledge graphs are missing or incomplete, resulting in poor accuracy of entity alignment. Technical Solutions
[0005] The present invention provides a multi-scenario heterogeneous data processing method, comprising:
[0006] Based on a first graph neural network, structural topological features of corresponding text entities are obtained from the neighbor subgraphs of each text entity in the first knowledge graph and the second knowledge graph in different scenarios; the first graph neural network is constructed based on a graph convolutional neural network;
[0007] Based on a second graph neural network, relational features of entity relationships connecting respective text entities are obtained from each triple in the first knowledge graph and the second knowledge graph; the second graph neural network is constructed based on the transE model; the triple includes two text entities and an entity relationship connecting the two text entities;
[0008] Fusing the structural topological features of each text entity in the first knowledge graph and the second knowledge graph and the relational features of the entity relationships connecting the corresponding text entities to obtain a first entity representation of each text entity;
[0009] constructing a first entity alignment probability matrix based on the similarity between the first entity representation of any text entity in the first knowledge graph and the first entity representation of any text entity in the second knowledge graph;
[0010] Determining an aligned entity pair between the first knowledge graph and the second knowledge graph based on the first entity alignment probability matrix, and fusing data of the first knowledge graph and the second knowledge graph based on the aligned entity pair;
[0011] The step of obtaining the structural topological features of the corresponding text entity from the neighbor subgraphs of each text entity in the first knowledge graph and the second knowledge graph under different scenarios specifically includes:
[0012] Graph structure information extraction step: for any text entity, based on the graph entity features of any neighbor text entity of the any text entity in the previous network layer and the graph relationship features of the entity relationship connecting the any neighbor text entity and the any text entity in the previous network layer, determine the association features of the any neighbor text entity transmitted to the any text entity in the current network layer, and then fuse the association features of each neighbor text entity transmitted to the any text entity in the current network layer to obtain the graph entity features of the any text entity in the current network layer, and update the graph relationship features of the entity relationship connecting the any neighbor text entity and the any text entity in the current network layer; the graph entity features of any text entity in the first network layer and the graph relationship features of any entity relationship in the first network layer are initialized;
[0013] Iterative step: repeating the graph structure information extraction step until the graph entity features of each text entity at the last network layer are obtained, and determining the structural topological features of each text entity based on the graph entity features of each text entity at each network layer;
[0014] The step of obtaining the relational features of the entity relationships connecting the text entities from the triples of the first knowledge graph and the second knowledge graph specifically includes:
[0015] Obtaining, based on a second graph neural network, second entity representations of the head and tail text entities in each triple of the first knowledge graph and the second knowledge graph, as well as initial relational features of the entity relationships;
[0016] fusing initial relational features of entity relations connecting the same text entity to obtain relational features of entity relations connecting the same text entity;
[0017] Among them, the second entity representation of any text entity is a vector representing the semantic information of any text entity output by the second graph neural network, the second entity representation of the head text entity in any triple is equal to the vector of the initial relationship features of the entity relationship and the second entity representation of the tail text entity, and the second entity representation of each text entity satisfies the constraint that the distance between the second entity representations of the matching text entities is less than a preset value.
[0018] According to a multi-scenario heterogeneous data processing method provided by the present invention, the method determines the association features of any neighboring text entity transmitted to the any text entity at the current network layer based on the graph entity features of any neighboring text entity of the any text entity at the previous network layer and the graph relationship features of the entity relationship connecting the any neighboring text entity and the any text entity at the previous network layer, specifically including:
[0019] Fusing the graph entity features of any neighboring text entity of any text entity at the previous network layer and the graph relationship features of the entity relationship connecting any neighboring text entity and any text entity at the previous network layer to obtain a fused feature;
[0020] Based on the direction of the entity relationship connecting any neighbor text entity and any text entity and the weights corresponding to different directions, the fusion features are weighted to obtain the associated features of any neighbor text entity transmitted to the any text entity in the current network layer.
[0021] According to a multi-scenario heterogeneous data processing method provided by the present invention, the updating obtains the graph relationship feature of the entity relationship connecting any neighbor text entity and any text entity at the current network layer, specifically including:
[0022] Based on the relationship transformation matrix corresponding to each type of entity relationship in the current network layer, the graph relationship features of the entity relationship connecting any neighbor text entity and any text entity in the previous network layer are transformed to obtain the graph relationship features of the entity relationship connecting any neighbor text entity and any text entity in the current network layer; wherein, the relationship transformation matrix corresponding to each type of entity relationship in the current network layer is obtained through training.
[0023] According to a multi-scenario heterogeneous data processing method provided by the present invention, determining the structural topological features of each text entity based on the graph entity features of each text entity at each network layer specifically includes:
[0024] Splicing the graph entity features of any text entity at each network layer to obtain the graph splicing entity features of the any text entity;
[0025] Based on the linear transformation matrix, the graph splicing entity features of any text entity are linearly transformed to obtain the structural topological features of any text entity.
[0026] According to a multi-scenario heterogeneous data processing method provided by the present invention, determining the aligned entity pairs of the first knowledge graph and the second knowledge graph based on the first entity alignment probability matrix specifically includes:
[0027] After constructing the second entity alignment probability matrix, the first entity alignment probability matrix and the second entity alignment probability matrix are fused to obtain an entity alignment probability fusion matrix, and the aligned entity pairs of the first knowledge graph and the second knowledge graph are determined based on the entity alignment probability fusion matrix;
[0028] The second entity alignment probability matrix is constructed based on the similarity between the second entity representation of any text entity in the first knowledge graph and the second entity representation of any text entity in the second knowledge graph.
[0029] According to a multi-scenario heterogeneous data processing method provided by the present invention, the first graph neural network and the second graph neural network are jointly trained based on the following steps:
[0030] Obtaining seed-aligned entity pairs of the first knowledge graph and the second knowledge graph;
[0031] Based on the first graph neural network, obtaining sample structural topological features of corresponding seed text entities from neighbor subgraphs of various sub-text entities in the seed aligned entity pairs;
[0032] Based on the second graph neural network, obtaining sample relationship features of entity relationships connecting the seed text entities from the triples containing the seed text entities;
[0033] fusing the sample structural topological features of the seed text entity and the sample relational features of the entity relations connecting the corresponding seed text entities to obtain a sample first entity representation of the seed text entity;
[0034] Based on the differences between the sample structural topological features of the two seed text entities aligned in the seed aligned entity pair, the differences between the sample relationship features, and the differences between the sample first entity representations, the parameters of the first graph neural network and the second graph neural network are updated.
[0035] According to a multi-scenario heterogeneous data processing method provided by the present invention, the parameters of the first graph neural network and the second graph neural network are updated based on the differences between the sample structural topological features of the two seed text entities aligned in the seed alignment entity pair, the differences between the sample relationship features, and the differences between the sample first entity representations, specifically including:
[0036] determining a first loss based on a difference between sample structural topological features of two seed text entities aligned in each seed aligned entity pair;
[0037] determining a second loss based on a difference between sample relationship features of two aligned seed text entities in each seed aligned entity pair;
[0038] determining a third loss based on a difference between sample first entity representations of two aligned seed text entities in each seed aligned entity pair;
[0039] Determining a fourth loss based on a difference between the graph splicing relationship features of each entity relationship output by the first graph neural network and the initial relationship features of the corresponding entity relationship output by the second graph neural network; wherein the graph splicing relationship features of any entity relationship are obtained by splicing the graph relationship features of the any entity relationship at each network layer of the first graph neural network;
[0040] Based on the first loss, the second loss, the third loss, and the fourth loss, parameters of the first graph neural network and the second graph neural network are updated.
[0041] According to a multi-scenario heterogeneous data processing method provided by the present invention, determining the aligned entity pairs of the first knowledge graph and the second knowledge graph based on the first entity alignment probability matrix specifically includes:
[0042] The first entity alignment probability matrix is searched based on a greedy matching algorithm to determine aligned entity pairs between the first knowledge graph and the second knowledge graph.
[0043] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a heterogeneous data processing method for multiple scenarios as described above is implemented.
[0044] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for processing heterogeneous data in multiple scenarios as described above is implemented.
[0045] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned methods for processing heterogeneous data in multiple scenarios. Beneficial effects
[0046] The present invention provides a multi-scenario heterogeneous data processing method. By extracting the graph structure information of the neighboring subgraph of a certain text entity in the corresponding knowledge graph, the information of other closely related text entities and the entity relationship information between them are used to help construct the semantic information of the text entity itself, and the structural topological features of the text entity are obtained, thereby improving the accuracy of text entity semantic extraction. On the other hand, the relational features of the entity relationship connecting a certain text entity can also be extracted from the triple. By obtaining and summarizing the semantic information of all entity relationships connecting the text entity, the semantics of the text entity can be deduced or the semantic scope of the text entity can be narrowed, thereby removing some noise interference brought about by the text entity semantic construction process in the previous step. The structural topological features of each text entity in the first knowledge graph and the second knowledge graph and the relational features of the entity relationship connecting the corresponding text entities are then fused to obtain the first entity representation of each text entity, obtaining richer, more accurate, and more complete semantic information for any text entity. This overcomes the problem of inaccurate semantic information extraction caused by the heterogeneity of the knowledge graph, makes the entity alignment pairs obtained by entity alignment more accurate, and improves the fusion effect of knowledge graph data, effectively solving the data redundancy and data conflict problems in the knowledge graph fusion process. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0048] FIG1 is a flow chart of a method for processing heterogeneous data in multiple scenarios provided by the present invention;
[0049] FIG2 is a schematic flow chart of a method for extracting structural topological features provided by the present invention;
[0050] FIG3 is a schematic flow chart of the correlation feature extraction method provided by the present invention;
[0051] FIG4 is a schematic flow chart of a relationship feature extraction method provided by the present invention;
[0052] FIG5 is a flow chart of the model training method provided by the present invention;
[0053] FIG6 is a schematic structural diagram of an electronic device provided by the present invention. Modes for Carrying Out the Invention
[0054] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0055] FIG1 is a flow chart of a method for processing heterogeneous data in multiple scenarios provided by the present invention. As shown in FIG1 , the method includes:
[0056] Step 110: Based on the first graph neural network, obtain the structural topological features of the corresponding text entity from the neighbor subgraphs of each text entity in the first knowledge graph and the second knowledge graph in different scenarios.
[0057] Specifically, the first knowledge graph and the second knowledge graph are knowledge graphs constructed under different application scenarios, such as knowledge graphs in the medical field constructed by different hospitals. The two knowledge graphs contain entities pointing to the same object, but the entity names and relationships with other entities of the entities pointing to the same object may be different in the different knowledge graphs, resulting in heterogeneity between the two. To avoid data redundancy and data conflicts during data fusion, the two knowledge graphs need to be entity aligned. Any knowledge graph is a graph-structured data containing text information, in which each node (i.e., text entity) corresponds to a text expressing a specific meaning in this field / application scenario, such as a person's name, place name, organization name, proper noun, etc., and the edges between nodes (i.e., entity relationships) correspond to the relationship names of the entity relationships between the two connected nodes. Therefore, the entity alignment operation of the knowledge graph is essentially a text matching operation that matches text entities expressing the same specific meaning in multiple knowledge graphs.
[0058] Compared to common text matching, entity alignment in knowledge graphs is unique in that text entities are expressed in different ways, including heterogeneous phenomena such as different languages, different meanings for the same word, and different synonyms for the same word. Therefore, accurate entity alignment is difficult to achieve by simply considering the semantic information of the text entity itself (i.e., the semantic information of the entity name). Therefore, the unique structural information of the knowledge graph can be utilized to obtain the graph structure information of a text entity's neighborhood subgraph in the corresponding knowledge graph. Information about other closely related text entities and the entity relationships between them can be used to help construct the semantic information of the text entity itself, thereby improving the accuracy of text entity semantic extraction. Specifically, based on a first graph neural network, such as a graph convolutional neural network (GCN), the structural topological features of the corresponding text entity can be obtained from the neighborhood subgraph of each text entity in the first and second knowledge graphs. Here, the neighborhood subgraph of any text entity is the subgraph formed by the text entity and other text entities in the knowledge graph that have a one-hop connection with the text entity.
[0059] By extracting the graph structure information from the text entity's neighbor subgraph, including the semantic information of other text entities themselves and the association information between other text entities and the text entity (including the entity relationship type (i.e., entity relationship name), association direction (i.e., the direction of the edge in a directed graph), etc.), we can construct a structural topological feature containing this graph structure information as one of the representation methods of the text entity's semantic information. The structural topological feature is a d-dimensional vector (s1, s2, ..., sd).
[0060] Step 120: Based on the second graph neural network, obtain the relational features of the entity relationships connecting the various text entities from the triples of the first knowledge graph and the second knowledge graph.
[0061] Specifically, in addition to the graph structure information in the neighbor subgraph, the entity relationship connecting a certain text entity can also help determine the semantic information of the text entity to a certain extent. In particular, in a complex knowledge graph, the same text entity may have multiple types of entity relationships with many other text entities. By obtaining and summarizing the semantic information of these entity relationships, the semantics of the text entity can be deduced or the semantic scope of the text entity can be narrowed, thereby removing some of the noise interference brought about by the previous step of the text entity semantic construction process. Therefore, based on another graph neural network, such as the transE (translating Embedding) model, the relational features of the entity relationship connecting each text entity can be extracted from each triple of the first knowledge graph and the second knowledge graph. Among them, the triple contains the head text entity, the tail text entity and the relationship name of the entity relationship between the head and tail text entities, such as the triple <Einstein, founded, relativity>. The relational feature of the entity relationship connecting any text entity is a d-dimensional vector (r1, r2, ..., rd), which contains the semantic information of all entity relationships connecting the text entity. It can be obtained by extracting the semantic information of the relationship names of all entity relationships connecting the text entity separately and then fusing them (for example, splicing).
[0062] Step 130: Fusing the structural topological features of each text entity in the first knowledge graph and the second knowledge graph and the relational features of the entity relationships connecting the corresponding text entities, obtain a first entity representation of each text entity.
[0063] Specifically, the results of the two aforementioned steps of constructing text entity semantic information from different perspectives are fused to obtain the first entity representation of each text entity. This allows for richer, more accurate, and more complete semantic information for any text entity, overcoming the problem of inaccurate semantic information extraction caused by the heterogeneity of knowledge graphs. When fusing the structural topological features of any text entity with the relational features of the entity relationships connecting that text entity, corresponding weights can be assigned to the structural topological features and the relational features, respectively. A weighted fusion is then performed to obtain the first entity representation (e1, e2, ..., ed) of the text entity, thereby highlighting the importance of certain features. For example, the weights can be set based on the completeness of the knowledge graph itself. If the knowledge graph is relatively complete, the weight of the structural topological features can be higher, while if the knowledge graph is relatively complete, the weight of the relational features can be higher.
[0064] Step 140: construct a first entity alignment probability matrix based on the similarity between the first entity representation of any text entity in the first knowledge graph and the first entity representation of any text entity in the second knowledge graph.
[0065] Specifically, the similarity between the first entity representation of any text entity in the first knowledge graph and the first entity representation of any text entity in the second knowledge graph can be calculated, for example, using the cosine similarity calculation method, to construct a first entity alignment probability matrix. The rows and columns of the first entity alignment probability matrix correspond to each text entity in the first knowledge graph and each text entity in the second knowledge graph, respectively, and any matrix element represents the similarity between the first entity representation of the text entity in the corresponding row and the first entity representation of the text entity in the corresponding column. The higher the similarity, the more likely the two corresponding text entities are to be aligned entities with each other.
[0066] Step 150: Determine aligned entity pairs between the first knowledge graph and the second knowledge graph based on the first entity alignment probability matrix, and fuse the data of the first knowledge graph and the second knowledge graph based on the aligned entity pairs.
[0067] Specifically, a greedy matching algorithm can be used to search the first entity alignment probability matrix to find all mutually aligned text entities to form multiple aligned entity pairs. Among them, the two text entities contained in any aligned entity pair come from the first knowledge graph and the second knowledge graph respectively, and the two text entities have the same meaning, such as the same disease, the same person, the same university, etc. Based on the above aligned entity pairs, a text entity in the first knowledge graph can be merged with a text entity in the second knowledge graph that is an aligned entity with the text entity, thereby realizing data fusion of the two knowledge graphs.
[0068] The method provided by the embodiment of the present invention extracts the graph structure information of the neighboring subgraph of a certain text entity in the corresponding knowledge graph, and uses the information of other text entities closely related to it and the entity relationship information between them to help construct the semantic information of the text entity itself, thereby obtaining the structural topological features of the text entity, thereby improving the accuracy of text entity semantic extraction. On the other hand, the method can also extract the relational features of the entity relationship connecting a certain text entity from the triple. By obtaining and summarizing the semantic information of all entity relationships connecting the text entity, the semantics of the text entity can be deduced or the semantic scope of the text entity can be narrowed, thereby removing some of the noise interference brought about by the text entity semantic construction process in the previous step. The structural topological features of each text entity in the first knowledge graph and the second knowledge graph and the relational features of the entity relationship connecting the corresponding text entities are then integrated to obtain the first entity representation of each text entity, obtaining richer, more accurate, and more complete semantic information for any text entity, overcoming the problem of inaccurate semantic information extraction caused by the heterogeneity of the knowledge graph, making the entity alignment pairs obtained by entity alignment more accurate, and the fusion effect of knowledge graph data better, effectively solving the data redundancy and data conflict problems in the knowledge graph fusion process.
[0069] Based on the above embodiment, step 110 specifically includes:
[0070] Graph structure information extraction step: for any text entity, based on the graph entity features of any neighbor text entity of the any text entity in the previous network layer and the graph relationship features of the entity relationship connecting the any neighbor text entity and the any text entity in the previous network layer, determine the association features of the any neighbor text entity transmitted to the any text entity in the current network layer, and then fuse the association features of each neighbor text entity transmitted to the any text entity in the current network layer to obtain the graph entity features of the any text entity in the current network layer, and update the graph relationship features of the entity relationship connecting the any neighbor text entity and the any text entity in the current network layer; the graph entity features of any text entity in the first network layer and the graph relationship features of any entity relationship in the first network layer are initialized;
[0071] Iterative step: Repeat the graph structure information extraction step until the graph entity features of each text entity in the last network layer are obtained, and based on the graph entity features of each text entity in each network layer, determine the structural topological features of each text entity.
[0072] Specifically, the first graph neural network is a multi-layer network structure, and each network layer performs feature extraction operations on all text entities in a certain knowledge graph (the first knowledge graph or the second knowledge graph). As shown in Figure 2, assuming that the first graph neural network has a total of K network layers, for the first network layer, the graph entity features of any text entity in that layer and the graph relationship features of any entity relationship in that layer are randomly initialized. Among them, the graph entity features of a text entity in any layer contain the graph structure information about the text entity in the neighboring subgraph extracted by the network layer of the graph neural network, and the graph relationship features of any entity relationship in any layer contain the semantic information of the relationship name of the entity relationship extracted by the network layer of the graph neural network.
[0073] In the i-th network layer, for any text entity, the association features of the neighboring text entity transmitted to the text entity in the current network layer can be determined based on the graph entity features of any neighboring text entity of the text entity (i.e., text entities other than the text entity in the neighboring subgraph of the text entity) in the previous network layer and the graph relationship features of the entity relationship connecting the neighboring text entity and the text entity in the previous network layer. Among them, different neighboring text entities are connected to the text entity with different types of entity relationships, so the semantic information provided by different neighboring text entities for the text entity should be different. In order to improve the accuracy of text entity semantic extraction, improvements can be made to the original feature extraction ideas of graph neural networks, introducing entity relationships and the semantic information of neighboring text entities for fusion and expansion, and using entity relationships to strengthen the semantic information of neighboring text entities that is more associated with the entity relationship, so as to distinguish the role of the semantic information of different neighboring text entities in the semantic construction of the text entity. Therefore, the association features obtained after fusing the graph entity features of any neighbor text entity in the previous network layer and the graph relationship features of the entity relationship connecting the neighbor text entity and the text entity in the previous network layer contain semantic information corresponding to the neighbor text entity that is more relevant to the entity relationship connecting the neighbor text entity and the text entity.
[0074] Specifically, the method of fusing the graph structure features of any neighbor text entity in the previous network layer and the graph relationship features of the entity relationship connecting the neighbor text entity and the text entity in the previous network layer is shown in FIG3 . The method of determining the association features of any neighbor text entity transmitted to the any text entity in the current network layer based on the graph entity features of any neighbor text entity of the any text entity and the graph relationship features of the entity relationship connecting the any neighbor text entity and the any text entity in the previous network layer specifically includes:
[0075] Step 310: Fusing the graph entity features of any neighboring text entity of any text entity at the previous network layer and the graph relationship features of the entity relationship connecting any neighboring text entity and any text entity at the previous network layer to obtain a fused feature;
[0076] Step 320, based on the direction of the entity relationship connecting any neighbor text entity and any text entity and the weights corresponding to different directions, the fusion features are weighted to obtain the associated features transmitted by any neighbor text entity to any text entity in the current network layer.
[0077] Specifically, for knowledge graphs constructed as directed graphs, entity relationships between text entities are directional. For entity relationships of different directions, the connected text nodes may play different roles in locating the semantics of the connected text entity. Therefore, when determining the associated features that any neighboring text entity conveys to the text entity at the current network layer, the graph entity features of any neighboring text entity at the previous network layer and the graph relationship features of the entity relationship connecting the neighboring text entity and the text entity at the previous network layer can be first fused to obtain fused features. For example, an attention mechanism can be used to fuse the graph entity features of the neighboring text entity at the previous network layer with the graph relationship features of the corresponding entity relationship at the previous network layer, thereby enhancing the semantic information of the neighboring text entity that is more relevant to the entity relationship. The graph entity features of the neighboring text entity at the previous network layer can be divided into multiple graph entity sub-features with the same vector dimensions as the graph relationship features of the corresponding entity relationship at the previous network layer (with any missing dimensions padded with zeros). Each graph entity sub-feature is then vector-wise multiplied with the graph relationship features of the corresponding entity relationship at the previous network layer to obtain the vector inner product corresponding to each graph entity sub-feature. The inner product of the vectors corresponding to each graph entity sub-feature is input into the softmax function for calculation to obtain the attention weight corresponding to each graph entity sub-feature. Each graph entity sub-feature is then multiplied by its corresponding attention weight, and the multiplication results are then concatenated to obtain the attention feature of the graph entity feature of the neighboring text entity in the previous network layer. Among them, the more relevant any graph entity sub-feature is to the corresponding entity relationship, the greater its attention weight, and the greater the proportion of the semantic information corresponding to the graph entity sub-feature in the entire attention feature, thereby achieving the purpose of strengthening the semantic information corresponding to the neighboring text entity that is more relevant to the entity relationship. The attention feature of the graph entity feature of the neighboring text entity in the previous network layer is concatenated with the graph relationship feature of the corresponding entity relationship in the previous network layer to obtain a fusion feature.
[0078] Subsequently, the fused features can be weighted based on the direction of the entity relationship connecting the neighboring text entity and the text entity and the predetermined weights corresponding to different directions, to obtain the associated features that the neighboring text entity transmits to the text entity at the current network layer, thereby improving the semantic expression ability of the associated features. The weights corresponding to different directions can be set according to the application scenario or field of the knowledge graph, or can be obtained by training the first graph neural network during the training process, and this is not specifically limited in the embodiments of the present invention.
[0079] Then, the associated features of each neighboring text entity of the text entity passed to the text entity in the current network layer are fused to obtain the graph entity features of the text entity in the current network layer. Here, the current network layer can use a linear transformation layer (such as a tanh activation function) to fuse the associated features of each neighboring text entity of the text entity passed to the text entity in the current network layer. The above operation will be repeated in the network layer until the graph entity features of all text entities in the knowledge graph input into the model are obtained in the current network layer. In addition, the graph relationship features of the entity relationship in the previous network layer also need to be updated in the current network layer to obtain the graph relationship features of the entity relationship in the current network layer, so that the semantic expression ability of the graph relationship features tends to be stronger.
[0080] Each layer of the first graph neural network iteratively executes the above steps until the graph entity features of each text entity are output by the last network layer. Then, based on the graph entity features of each text entity at each network layer, the structural topological features of the corresponding text entity are fused.
[0081] Based on any of the above embodiments, the updating of the graph relationship feature of the entity relationship connecting any neighbor text entity and any text entity at the current network layer specifically includes:
[0082] Based on the relationship transformation matrix corresponding to each type of entity relationship in the current network layer, the graph relationship features of the entity relationship connecting any neighbor text entity and any text entity in the previous network layer are transformed to obtain the graph relationship features of the entity relationship connecting any neighbor text entity and any text entity in the current network layer; wherein, the relationship transformation matrix corresponding to each type of entity relationship in the current network layer is obtained through training.
[0083] Specifically, in the current network layer, the graph relational features of the entity relationship in the previous network layer can be updated based on the relational transformation matrix of that layer to obtain the graph relational features of the entity relationship in the current network layer. The relational transformation matrix is learned during the training process of the first graph neural network. The relational transformation matrices of each network layer obtained through network training can extract semantic information from low-level to high-level, concrete to abstract, from entity relationships, and can ensure that the graph relational features of each entity relationship obtained by transformation in each network layer are in the same vector space.
[0084] Based on any of the above embodiments, determining the structural topological features of each text entity based on the graph entity features of each text entity at each network layer specifically includes:
[0085] Splicing the graph entity features of any text entity at each network layer to obtain the graph splicing entity features of the any text entity;
[0086] Based on the linear transformation matrix, the graph splicing entity features of any text entity are linearly transformed to obtain the structural topological features of any text entity.
[0087] Specifically, the graph entity features of any text entity at each network layer are spliced to obtain the graph splicing entity features of the text entity. The graph entity features of the text entity at each network layer can be connected end to end to obtain the graph splicing entity features of the text entity. Subsequently, the graph splicing entity features of the text entity are linearly transformed based on the linear transformation matrix to achieve the transformation of the vector space, thereby obtaining the structural topological features of the text entity. Here, the graph splicing entity features of the text entity can be matrix multiplied with the linear transformation matrix to obtain the structural topological features of the text entity. The linear transformation matrix can also be learned during the training process of the first graph neural network, that is, when the parameters of the first graph neural network are updated using a neural network training algorithm (such as a gradient descent algorithm), the matrix values of the linear transformation matrix are also updated, and the training method of the first graph neural network will be described in detail later.
[0088] Based on any of the above embodiments, as shown in FIG4 , step 120 specifically includes:
[0089] Step 121: obtaining, based on a second graph neural network, second entity representations of the head and tail text entities in each triple of the first knowledge graph and the second knowledge graph, and initial relationship features of the entity relationship;
[0090] Step 122, fusing the initial relationship features of the entity relationships connecting the same text entity to obtain the relationship features of the entity relationships connecting the same text entity;
[0091] Among them, the sum of the vectors of the initial relationship features of the second entity representation of the head text entity in any triple and the entity relationship is equal to the second entity representation of the tail text entity, and the second entity representation of each text entity satisfies the constraint that the distance between the second entity representations of the matching text entities is less than a preset value.
[0092] Specifically, the second graph neural network is built based on the transE model, thus having the ability to extract entity embedding representations (entity embedding) and entity relationship embedding representations (relation embedding). Specifically, the first knowledge graph and the second knowledge graph can be input into the second graph neural network respectively, and the second entity representations of the head and tail text entities in each triple of the first knowledge graph and the second knowledge graph, as well as the initial relational features of the entity relationship, are obtained based on the second graph neural network. The head text entity or the tail text entity are both text entities in the corresponding knowledge graph. The second entity representation of any text entity is the d-dimensional vector (e1', e2', ..., ed') output by the second graph neural network when the first knowledge graph and the second knowledge graph are input into the second graph neural network. This vector represents the semantic information of the text entity extracted by the second graph neural network. The initial relational features of the entity relationship connecting the head and tail text entities contain the semantic information of the entity relationship extracted by the second graph neural network.
[0093] Here, the network structures of the first graph neural network (built based on GCN) and the second graph neural network (built based on transE) are different. Graph neural networks with different structures extract semantics in different ways, so they can extract semantic information of text entities and entity relationships from different angles, thereby achieving complementarity between models.
[0094] For the second graph neural network, since it is built based on the transE model, a constraint is added during its training process: that is, the vector sum of the second entity representation of the head text entity and the initial relationship features of the entity relationship in any sample triple is equal to the second entity representation of the tail text entity. Therefore, after training, the second entity representations of the head and tail text entities in each triple of the first knowledge graph and the second knowledge graph, as well as the initial relationship features of the entity relationship, extracted by the second graph neural network also satisfy the above constraints. In addition, there is another constraint during the training process of the second graph neural network: that is, the distance between the second entity representations of the seed text entities that are aligned entities is less than a preset value. Therefore, after training, the second entity representations of the head and tail text entities in each triple of the first knowledge graph and the second knowledge graph extracted by the second graph neural network also satisfy the above constraints.
[0095] Under the guidance of the above two constraints, the second entity representation of each text entity and the initial relational features of the entity relationship extracted by the second graph neural network have high semantic expression capabilities and contain accurate semantic information. Based on the fusion results of the initial relational features of the entity relationship connecting the same text entity, the relational features of the entity relationship connecting the same text entity are obtained, which can effectively complement the first graph neural network for subsequent entity alignment.
[0096] Based on any of the foregoing embodiments, determining aligned entity pairs between the first knowledge graph and the second knowledge graph based on the first entity alignment probability matrix specifically includes:
[0097] After constructing the second entity alignment probability matrix, the first entity alignment probability matrix and the second entity alignment probability matrix are fused to obtain an entity alignment probability fusion matrix, and the aligned entity pairs of the first knowledge graph and the second knowledge graph are determined based on the entity alignment probability fusion matrix;
[0098] The second entity alignment probability matrix is constructed based on the similarity between the second entity representation of any text entity in the first knowledge graph and the second entity representation of any text entity in the second knowledge graph.
[0099] Specifically, in order to enhance the complementary effect between the first graph neural network and the second graph neural network, considering that the second entity representation of each text entity extracted by the second graph neural network also has high semantic expression capabilities and contains accurate semantic information, the similarity between the second entity representation of any text entity in the first knowledge graph and the second entity representation of any text entity in the second knowledge graph can be calculated based on a vector similarity calculation method (such as vector dot product), thereby constructing a second entity alignment probability matrix, which complements the first entity alignment probability matrix and improves the accuracy of entity alignment. Similar to the first entity alignment probability matrix, the rows and columns of the second entity alignment probability matrix also correspond to each text entity in the first knowledge graph and each text entity in the second knowledge graph, respectively, and any matrix element represents the similarity between the second entity representation of the text entity in the corresponding row and the second entity representation of the text entity in the corresponding column. The higher the similarity, the more likely the two corresponding text entities are to be aligned entities with each other.
[0100] After constructing the second entity alignment probability matrix, the first entity alignment probability matrix and the second entity alignment probability matrix are fused to obtain a fused entity alignment probability matrix. The two matrices can be added together or weighted together to obtain the fused entity alignment probability matrix. The weights assigned to the two matrices during weighted addition can be determined based on the test performance of the two graph neural networks. A matching search based on this fused entity alignment probability matrix can be performed to determine aligned entity pairs in the first and second knowledge graphs.
[0101] Based on any of the above embodiments, as shown in FIG5 , the first graph neural network and the second graph neural network are jointly trained based on the following steps:
[0102] Step 510: Obtain seed-aligned entity pairs of the first knowledge graph and the second knowledge graph;
[0103] Step 520: Based on the first graph neural network, obtain the sample structure topological features of the corresponding seed text entity from the neighbor subgraphs of various sub-text entities in the seed aligned entity pair;
[0104] Step 530: obtaining, based on a second graph neural network, sample relationship features of entity relationships connecting the seed text entities from triples containing the seed text entities;
[0105] Step 540: Fusing the sample structural topological features of the seed text entity and the sample relationship features of the entity relationships connecting the corresponding seed text entities to obtain a sample first entity representation of the seed text entity;
[0106] Step 550: Update the parameters of the first graph neural network and the second graph neural network based on the differences between the sample structural topological features of the two seed text entities aligned in the seed aligned entity pair, the differences between the sample relationship features, and the differences between the sample first entity representations.
[0107] Specifically, by jointly training the first and second graph neural networks, the performance of the two networks can be improved using a multi-task learning approach. The two networks can be trained using a supervised learning approach. Therefore, before training, seed aligned entity pairs of the first and second knowledge graphs can be obtained to iteratively train the two networks. The seed aligned entity pairs contain two seed text entities that are manually annotated as mutually aligned entities, one from the first knowledge graph and the other from the second knowledge graph.
[0108] Subsequently, on the one hand, the first knowledge graph and the second knowledge graph are respectively input into the first graph neural network, and based on the first graph neural network, the sample structural topological features of the corresponding seed text entity are obtained from the neighbor subgraphs of various sub-text entities in each seed aligned entity pair. On the other hand, the first knowledge graph and the second knowledge graph are respectively input into the second graph neural network, and based on the second graph neural network, the sample relational features of the entity relations connecting each seed text entity are obtained from the triples containing each seed text entity. The sample structural topological features of the seed text entity and the sample relational features of the entity relations connecting the corresponding seed text entities are then fused to obtain the sample first entity representation of the seed text entity. Among them, the method for obtaining the sample structural topological features, sample relational features and sample first entity representation is the same as the method for obtaining the structural topological features, relational features and first entity representation given in the above embodiment, and will not be repeated here.
[0109] Based on the differences between the sample structural topological features of the two seed text entities that are aligned with each other in the seed aligned entity pair, the differences between the sample relationship features, and the differences between the sample first entity representations, the parameters of the first graph neural network and the second graph neural network are updated, and then the above steps are repeated until the two networks converge.
[0110] Based on any of the above embodiments, step 550 specifically includes:
[0111] determining a first loss based on a difference between sample structural topological features of two seed text entities aligned in each seed aligned entity pair;
[0112] determining a second loss based on a difference between sample relationship features of two aligned seed text entities in each seed aligned entity pair;
[0113] determining a third loss based on a difference between sample first entity representations of two aligned seed text entities in each seed aligned entity pair;
[0114] Determining a fourth loss based on a difference between the graph splicing relationship features of each entity relationship output by the first graph neural network and the initial relationship features of the corresponding entity relationship output by the second graph neural network; wherein the graph splicing relationship features of any entity relationship are obtained by splicing the graph relationship features of the any entity relationship at each network layer of the first graph neural network;
[0115] Based on the first loss, the second loss, the third loss, and the fourth loss, parameters of the first graph neural network and the second graph neural network are updated.
[0116] Specifically, during each round of iterative training, a first loss is determined based on the differences between the sample structural topological features of the two aligned seed text entities. The first loss can be used to constrain the sample structural topological features of the two aligned seed text entities, bringing them closer together. The first loss can be obtained by calculating the vector distance (e.g., Manhattan distance or Chebyshev distance) between the sample structural topological features of the two aligned seed text entities in a seed entity pair, and averaging the vector distance for each seed entity pair. A second loss is determined based on the differences between the sample relational features of the two aligned seed text entities. The second loss can be used to constrain the sample relational features of the two aligned seed text entities, bringing them closer together. The third loss is determined based on the differences between the sample first entity representations of the two aligned seed text entities. The third loss can be used to constrain the sample first entity representations of the two aligned seed text entities, bringing them closer together. Among them, the vector distance (such as Manhattan distance or Chebyshev distance) between the sample first entity representations of the two seed text entities aligned in the seed aligned entity pair can be calculated, and the average value of the above vector distances of each seed aligned entity pair can be obtained to obtain the third loss.
[0117] In addition, to strengthen the constraints between the first and second graph neural networks, thereby improving the accuracy of the first and second graph neural networks in extracting graph relational features and initial relational features of entity relationships, respectively, a fourth loss can be determined based on the difference between the graph splicing relational features of each entity relationship output by the first graph neural network and the initial relational features of the corresponding entity relationship output by the second graph neural network. The graph splicing relational features of any entity relationship are obtained by splicing the graph relational features of that entity relationship from the various network layers of the first graph neural network. The fourth loss can be calculated by calculating the vector distance (e.g., Manhattan distance or Chebyshev distance) between the graph splicing relational features of any entity relationship and the initial relational features of the corresponding entity relationship output by the second graph neural network, and averaging these vector distances for each entity relationship. The fourth loss can be used to constrain the graph splicing relational features and initial relational features of the same entity relationship, gradually aligning them, ensuring consistency when extracting semantic information about the same entity relationship between the two networks, thereby improving their ability to extract semantic information about the entity relationship. Subsequently, the parameters of the first and second graph neural networks are updated based on the sum of the first, second, third, and fourth losses.
[0118] Figure 6 is a structural diagram of the electronic device provided by the present invention. As shown in Figure 6, the electronic device may include: a processor (processor) 610, a memory (memory) 620, a communication interface (Communications Interface) 630 and a communication bus 640, wherein the processor 610, the memory 620, and the communication interface 630 communicate with each other through the communication bus 640. The processor 610 can call the logic instructions in the memory 620 to execute a multi-scenario heterogeneous data processing method, which includes: based on the first graph neural network, obtaining the structural topological features of the corresponding text entity from the neighbor subgraphs of each text entity in the first knowledge graph and the second knowledge graph in different scenarios; the first graph neural network is constructed based on the graph convolutional neural network; based on the second graph neural network, obtaining the relational features of the entity relationship connecting each text entity from each triple of the first knowledge graph and the second knowledge graph; the second graph neural network is constructed based on the transE model; the triple includes two text entities and the entity relationship connecting the two text entities; the structural topological features of each text entity in the first knowledge graph and the second knowledge graph and the relational features of the entity relationship connecting the corresponding text entities are integrated to obtain the first entity representation of each text entity; based on the similarity between the first entity representation of any text entity in the first knowledge graph and the first entity representation of any text entity in the second knowledge graph, a first entity alignment probability matrix is constructed; based on the first entity alignment probability matrix , determine the aligned entity pairs of the first knowledge graph and the second knowledge graph, and fuse the data of the first knowledge graph and the second knowledge graph based on the aligned entity pairs; the structural topological features of the corresponding text entity are obtained from the neighbor subgraphs of each text entity in the first knowledge graph and the second knowledge graph in different scenarios, specifically including: a graph structure information extraction step: for any text entity, based on the graph entity features of any neighbor text entity of any text entity in the previous network layer and the graph relationship features of the entity relationship connecting any neighbor text entity and any text entity in the previous network layer, determine the association features of any neighbor text entity transmitted to any text entity in the current network layer, and then fuse the association features of each neighbor text entity transmitted to any text entity in the current network layer to obtain the graph entity features of any text entity in the current network layer, and update the graph relationship features of the entity relationship connecting any neighbor text entity and any text entity in the current network layer; the graph entity features of any text entity in the first network layer and the graph relationship features of any entity relationship in the first network layer are initialized;Iterative step: Repeat the graph structure information extraction step until the graph entity features of each text entity in the last network layer are obtained, and based on the graph entity features of each text entity in each network layer, determine the structural topological features of each text entity; the step of obtaining the relational features of the entity relationships connecting each text entity from each triple of the first knowledge graph and the second knowledge graph specifically includes: obtaining the second entity representations of the head and tail text entities in each triple of the first knowledge graph and the second knowledge graph and the initial relational features of the entity relationships based on the second graph neural network; fusing the initial relational features of the entity relationships connecting the same text entity to obtain the relational features of the entity relationships connecting the same text entity; wherein the second entity representation of any text entity is a vector representing the semantic information of any text entity output by the second graph neural network, the sum of the vector of the second entity representation of the head text entity and the initial relational features of the entity relationship in any triple is equal to the second entity representation of the tail text entity, and the second entity representations of each text entity satisfy the constraint that the distance between the second entity representations of the matching text entities is less than a preset value.
[0119] In addition, the logic instructions in the aforementioned memory 620 can be implemented in the form of a software functional unit and, when sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or the portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or 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 code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0120] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a multi-scenario heterogeneous data processing method provided by the above methods, the method comprising: based on a first graph neural network, obtaining the structural topological features of the corresponding text entity from the neighbor subgraphs of each text entity in the first knowledge graph and the second knowledge graph in different scenarios; the first graph neural network is constructed based on a graph convolutional neural network; based on a second graph neural network, obtaining the structural topological features of the corresponding text entity from the neighbor subgraphs of each text entity in the first knowledge graph and the second knowledge graph The relational features of the entity relationships connecting each text entity are obtained from the tuple; the second graph neural network is constructed based on the transE model; the triple includes two text entities and the entity relationship connecting the two text entities; the structural topological features of each text entity in the first knowledge graph and the second knowledge graph and the relational features of the entity relationships connecting the corresponding text entities are integrated to obtain the first entity representation of each text entity; based on the similarity between the first entity representation of any text entity in the first knowledge graph and the first entity representation of any text entity in the second knowledge graph, a first entity alignment probability matrix is constructed; based on the first entity alignment probability matrix, the first entity alignment probability matrix is determined. An aligned entity pair of the first knowledge graph and the second knowledge graph, and a fusion of the data of the first knowledge graph and the second knowledge graph based on the aligned entity pair; the obtaining of the structural topological features of the corresponding text entity from the neighbor subgraph of each text entity in the first knowledge graph and the second knowledge graph in different scenarios, specifically including: a graph structure information extraction step: for any text entity, based on the graph entity features of any neighbor text entity of the any text entity in the previous network layer and the graph relationship features of the entity relationship connecting the any neighbor text entity and the any text entity in the previous network layer, determine the association of the any neighbor text entity to the any text entity in the current network layer. Features, and then fuse the associated features of each neighboring text entity transmitted to any text entity in the current network layer to obtain the graph entity features of any text entity in the current network layer, and update the graph relationship features of the entity relationship connecting any neighboring text entity and any text entity in the current network layer; the graph entity features of any text entity in the first network layer and the graph relationship features of any entity relationship in the first network layer are initialized; iterative step: repeat the graph structure information extraction step until the graph entity features of each text entity in the last network layer are obtained, and based on the graph entity features of each text entity in each network layer, determine the structural topological features of each text entity;The method of obtaining relational features of entity relationships connecting various text entities from each triple in the first knowledge graph and the second knowledge graph specifically includes: obtaining, based on a second graph neural network, second entity representations of the head and tail text entities and initial relational features of the entity relationships in each triple in the first knowledge graph and the second knowledge graph; fusing the initial relational features of the entity relationships connecting the same text entity to obtain relational features of the entity relationships connecting the same text entity; wherein the second entity representation of any text entity is a vector output by the second graph neural network representing the semantic information of the any text entity, the sum of the vector of the second entity representation of the head text entity and the initial relational features of the entity relationship in any triple is equal to the second entity representation of the tail text entity, and the second entity representations of each text entity satisfy the constraint that the distance between the second entity representations of matching text entities is less than a preset value.
[0121] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the above-mentioned heterogeneous data processing method for multiple scenarios, the method comprising: based on a first graph neural network, obtaining the structural topological features of the corresponding text entity from the neighbor subgraphs of each text entity in the first knowledge graph and the second knowledge graph in different scenarios; the first graph neural network is constructed based on a graph convolutional neural network; based on a second graph neural network, obtaining the relational features of the entity relationship connecting each text entity from each triple of the first knowledge graph and the second knowledge graph; the second graph neural network is constructed based on a transE model; the triple includes two text entities and the entity relationship connecting the two text entities; the structural topological features of each text entity in the first knowledge graph and the second knowledge graph and the relational features of the entity relationship connecting the corresponding text entities are integrated to obtain the first entity representation of each text entity; based on the similarity between the first entity representation of any text entity in the first knowledge graph and the first entity representation of any text entity in the second knowledge graph, a first entity alignment probability matrix is constructed; based on the first entity alignment probability matrix, the alignment probability matrix of the first knowledge graph and the second knowledge graph is determined. The method comprises the following steps: obtaining the structural topological features of the corresponding text entity from the neighbor subgraphs of each text entity in the first knowledge graph and the second knowledge graph in different scenarios, specifically comprising: a graph structure information extraction step: for any text entity, based on the graph entity features of any neighbor text entity of the any text entity in the previous network layer and the graph relationship features of the entity relationship connecting the any neighbor text entity and the any text entity in the previous network layer, determining the association features of the any neighbor text entity transmitted to the any text entity in the current network layer, and then fusing the graphs of each neighbor text entity. The associated features of the neighboring text entity are transferred to any text entity at the current network layer to obtain the graph entity features of any text entity at the current network layer, and the graph relationship features of the entity relationship connecting any neighboring text entity and any text entity at the current network layer are updated; the graph entity features of any text entity at the first network layer and the graph relationship features of any entity relationship at the first network layer are initialized; iterative step: repeating the graph structure information extraction step until the graph entity features of each text entity at the last network layer are obtained, and based on the graph entity features of each text entity at each network layer, determining the structural topological features of each text entity;The method of obtaining relational features of entity relationships connecting various text entities from each triple in the first knowledge graph and the second knowledge graph specifically includes: obtaining, based on a second graph neural network, second entity representations of the head and tail text entities and initial relational features of the entity relationships in each triple in the first knowledge graph and the second knowledge graph; fusing the initial relational features of the entity relationships connecting the same text entity to obtain relational features of the entity relationships connecting the same text entity; wherein the second entity representation of any text entity is a vector output by the second graph neural network representing the semantic information of the any text entity, the sum of the vector of the second entity representation of the head text entity and the initial relational features of the entity relationship in any triple is equal to the second entity representation of the tail text entity, and the second entity representations of each text entity satisfy the constraint that the distance between the second entity representations of matching text entities is less than a preset value.
[0122] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0123] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.
[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A multi-scenario heterogeneous data processing method, characterized in that: include: Based on the first graph neural network, the structural topological features of the corresponding text entity are obtained from the neighbor subgraphs of each text entity in the first knowledge graph and the second knowledge graph in different scenarios; the first graph neural network is constructed based on the graph convolutional neural network; Based on the second graph neural network, the relational features of the entity relations connecting the respective text entities are obtained from the triples of the first knowledge graph and the second knowledge graph; the second graph neural network is constructed based on the transE model; the triples include two text entities and the entity relations connecting the two text entities; Fusing the structural topological features of each text entity in the first knowledge graph and the second knowledge graph and the relational features of the entity relations connecting the corresponding text entities to obtain a first entity representation of each text entity; Based on the similarity between the first entity representation of any text entity in the first knowledge graph and the first entity representation of any text entity in the second knowledge graph, construct a first entity alignment probability matrix; Based on the first entity alignment probability matrix, determine an aligned entity pair between the first knowledge graph and the second knowledge graph, and fuse data of the first knowledge graph and the second knowledge graph based on the aligned entity pair; The step of obtaining the structural topological features of the corresponding text entity from the neighbor subgraphs of each text entity in the first knowledge graph and the second knowledge graph under different scenarios specifically includes: Graph structure information extraction step: for any text entity, based on the graph entity features of any neighbor text entity of the any text entity in the previous network layer and the graph relationship features of the entity relationship connecting the any neighbor text entity and the any text entity in the previous network layer, determine the association features of the any neighbor text entity transmitted to the any text entity in the current network layer, then fuse the association features of each neighbor text entity transmitted to the any text entity in the current network layer to obtain the graph entity features of the any text entity in the current network layer, and update the graph relationship features of the entity relationship connecting the any neighbor text entity and the any text entity in the current network layer; the graph entity features of any text entity in the first network layer and the graph relationship features of any entity relationship in the first network layer are initialized; Iteration step: repeating the graph structure information extraction step until the graph entity features of each text entity at the last network layer are obtained, and based on the graph entity features of each text entity at each network layer, determining the structural topological features of each text entity; The step of obtaining the relational features of the entity relations connecting the text entities from the triples of the first knowledge graph and the second knowledge graph specifically includes: Obtaining, based on a second graph neural network, second entity representations of head and tail text entities in each triple of the first knowledge graph and the second knowledge graph and initial relationship features of entity relationships; The initial relation features of the entity relations connecting the same text entity are merged to obtain the relation features of the entity relations connecting the same text entity; Among them, the second entity representation of any text entity is a vector representing the semantic information of any text entity output by the second graph neural network, the second entity representation of the head text entity in any triplet and the vector of the initial relationship features of the entity relationship are equal to the second entity representation of the tail text entity, and the second entity representation of each text entity satisfies the constraint that the distance between the second entity representations of the matching text entities is less than a preset value.
2. The method for processing heterogeneous data in multiple scenarios according to claim 1, characterized in that: The determining of the association feature of any neighbor text entity transmitted to any text entity at the current network layer by any neighbor text entity based on the graph entity feature of any neighbor text entity at the previous network layer and the graph relationship feature of the entity relationship connecting any neighbor text entity and any text entity at the previous network layer specifically includes: Fusing the graph entity features of any neighbor text entity of any text entity at the previous network layer and the graph relationship features of the entity relationship connecting any neighbor text entity and any text entity at the previous network layer to obtain a fused feature; Based on the direction of the entity relationship connecting any neighbor text entity and any text entity and the weights corresponding to different directions, the fused features are weighted to obtain the associated features that any neighbor text entity transmits to any text entity in the current network layer.
3. The method for processing heterogeneous data in multiple scenarios according to claim 1, characterized in that: The updating obtains the graph relationship feature of the entity relationship connecting any neighbor text entity and any text entity at the current network layer, specifically including: Based on the relationship transformation matrix corresponding to each type of entity relationship in the current network layer, the graph relationship feature of the entity relationship connecting any neighbor text entity and any text entity in the previous network layer is transformed to obtain the graph relationship feature of the entity relationship connecting any neighbor text entity and any text entity in the current network layer; wherein the relationship transformation matrix corresponding to each type of entity relationship in the current network layer is obtained through training.
4. The method for processing heterogeneous data in multiple scenarios according to claim 1, characterized in that: The determining of the structural topological features of each text entity based on the graph entity features of each text entity at each network layer specifically includes: Splicing the graph entity features of any text entity at each network layer to obtain the graph splicing entity features of the any text entity; Based on the linear transformation matrix, the graph splicing entity features of any text entity are linearly transformed to obtain the structural topological features of any text entity.
5. The method for processing heterogeneous data in multiple scenarios according to claim 1, characterized in that: The determining, based on the first entity alignment probability matrix, an aligned entity pair of the first knowledge graph and the second knowledge graph specifically includes: After constructing the second entity alignment probability matrix, the first entity alignment probability matrix and the second entity alignment probability matrix are fused to obtain an entity alignment probability fusion matrix, and the aligned entity pairs of the first knowledge graph and the second knowledge graph are determined based on the entity alignment probability fusion matrix; The second entity alignment probability matrix is constructed based on the similarity between the second entity representation of any text entity in the first knowledge graph and the second entity representation of any text entity in the second knowledge graph.
6. The method for processing heterogeneous data in multiple scenarios according to claim 1, characterized in that: The first graph neural network and the second graph neural network are jointly trained based on the following steps: Obtaining seed-aligned entity pairs of the first knowledge graph and the second knowledge graph; Based on the first graph neural network, obtaining sample structural topological features of corresponding seed text entities from neighbor subgraphs of various sub-text entities in the seed alignment entity pair; Based on the second graph neural network, obtaining sample relationship features of entity relationships connecting the seed text entities from triples containing the seed text entities; Fusing the sample structural topological features of the seed text entity and the sample relational features of the entity relations connecting the corresponding seed text entities, to obtain a sample first entity representation of the seed text entity; Based on the differences between sample structural topological features of two seed text entities aligned in the seed aligned entity pair, the differences between sample relationship features, and the differences between sample first entity representations, the parameters of the first graph neural network and the second graph neural network are updated.
7. The method for processing heterogeneous data in multiple scenarios according to claim 6, characterized in that: The updating of the parameters of the first graph neural network and the second graph neural network based on the difference between the sample structural topological features of the two seed text entities aligned in the seed alignment entity pair, the difference between the sample relationship features, and the difference between the sample first entity representations specifically includes: Determining a first loss based on a difference between sample structural topological features of two seed text entities aligned in each seed aligned entity pair; Determining a second loss based on a difference between sample relationship features of two seed text entities aligned in each of the seed aligned entity pairs; determining a third loss based on a difference between sample first entity representations of two seed text entities aligned in each of the seed aligned entity pairs; Determine a fourth loss based on the difference between the graph splicing relationship features of each entity relationship output by the first graph neural network and the initial relationship features of the corresponding entity relationship output by the second graph neural network; wherein the graph splicing relationship features of any entity relationship are obtained by splicing the graph relationship features of any entity relationship at each network layer of the first graph neural network; Based on the first loss, the second loss, the third loss and the fourth loss, parameters of the first graph neural network and the second graph neural network are updated.
8. The method for processing heterogeneous data in multiple scenarios according to any one of claims 1 to 4, characterized in that: The determining, based on the first entity alignment probability matrix, an aligned entity pair of the first knowledge graph and the second knowledge graph specifically includes: The first entity alignment probability matrix is searched based on a greedy matching algorithm to determine aligned entity pairs between the first knowledge graph and the second knowledge graph.
Citation Information
Patent Citations
Graph neural network model and method for performing entity alignment based on relation context
CN113157935A
Multi-modal entity alignment method based on adaptive feature fusion
CN113407759A
Entity alignment method and device, electronic equipment and computer readable storage medium
CN114117063A
Knowledge graph entity alignment method, system and equipment based on graph neural network
CN115271071A
Multi-scene heterogeneous data processing method
CN116150405A
Cited By
Multi-modal intelligent medical scene dynamic reasoning method and device based on medical knowledge
CN119294534A
Multi-dimensional fusion meta universe and vertical AI model collaborative innovation platform
CN119443116A
Digital airspace multi-source sensing data processing method, system, equipment and medium
CN120219986A
Multi-source heterogeneous corpus fusion method and system based on government affair service data
CN120493159A
A multi-source heterogeneous corpus fusion method and system based on government service data
CN120493159B
