Heterogeneous knowledge network node similarity measurement method based on multi-view consistency

By adopting a node similarity measurement method with multi-view consistency in heterogeneous knowledge networks, node representations and views are constructed, and the problem that traditional methods are difficult to accurately measure node similarity in heterogeneous knowledge networks is solved, achieving higher accuracy and robustness.

CN119577480AActive Publication Date: 2025-03-07INST OF WAR STUDIES ACAD OF MILITARY SCI OF THE CHINESE PEOPLES LIBERATION ARMY
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510135009.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-07
Publication Date
2025-03-07
Estimated Expiration
2045-02-07

Smart Images

  • Figure CN119577480A_ABST
    Figure CN119577480A_ABST
Patent Text Reader

Abstract

The invention provides a heterogeneous knowledge network node similarity measurement method based on multi-view consistency, and the method comprises the steps: constructing node features for different types of nodes in a heterogeneous knowledge network through node representation learning, carrying out the path sampling based on a plurality of predefined meta paths, and obtaining a plurality of views, a common characterization is determined based on the node characterization of the nodes in each view, and a similarity is determined based on the common characterization of the two nodes. By constructing a plurality of views with different relation modes, different types of information in the heterogeneous knowledge network can be comprehensively utilized, the features and relations of the nodes in different aspects can be captured, the incidence relation between the nodes is more comprehensively considered, and the comprehensiveness and accuracy of similarity measurement are improved. Moreover, by defining the common representation of the nodes in different views, the influence caused by the difference of node types or relation types in the heterogeneous knowledge network can be reduced, and the robustness and accuracy of node similarity measurement are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of knowledge graph technology, and in particular to a multi-view Figure 1 A node similarity measurement method for heterogeneous knowledge networks with consistent consistency. Background Art

[0002] Node similarity refers to the degree of similarity between two nodes in a graph or network. When understanding, mining, and applying knowledge networks, node similarity measurement is a key factor in supporting data mining tasks. For example, when making recommendations based on knowledge networks, if an object that strictly meets the recommendation requirements is not available in the current scenario, by analyzing the similarity of nodes, similar objects can be recommended to users, thereby improving the performance of the recommendation system. For another example, when completing knowledge graphs, by measuring node similarity, we can better understand the missing information in the knowledge graph, thereby completing the knowledge graph and predicting relationships.

[0003] Traditional node similarity measures are usually based on feature similarity and node connectivity. However, these traditional measurement methods face many challenges when facing heterogeneous knowledge networks. On the one hand, the nodes in heterogeneous knowledge networks involve multimodal and multi-source data, which makes the similarity measurement between nodes more complicated; on the other hand, the connection relationship between nodes in heterogeneous knowledge networks is complex and the edge types are numerous, which brings new challenges to the methods based on node connectivity. Therefore, an innovative node similarity measurement method is needed to more accurately reflect the node similarity in heterogeneous knowledge networks. Summary of the invention

[0004] Based on this, it is necessary to provide a multi-view based method that can more accurately reflect the node similarity in heterogeneous knowledge networks in response to the above technical problems. Figure 1 A node similarity measurement method for heterogeneous knowledge networks with consistent consistency.

[0005] This application provides a multi-view Figure 1 A consistent method for measuring node similarity in heterogeneous knowledge networks, including: Construct node representations for different types of nodes in heterogeneous knowledge networks through node representation learning; Based on a plurality of predefined meta-paths, path sampling is performed on the heterogeneous knowledge network respectively, and a view corresponding to each meta-path is constructed; For each node in the heterogeneous knowledge network, determining a common representation of the node in multiple different views based on the node representation of the node in each view; For any two nodes in the heterogeneous knowledge network, the similarity between the two nodes is determined based on the common representation of each node.

[0006] In some embodiments, node representations are constructed for different types of nodes in a heterogeneous knowledge network through node representation learning, including: For each node in the heterogeneous knowledge network, obtaining a node type corresponding to the node; Determine a corresponding target representation model based on the node type; The node attribute corresponding to the node is input into the target representation model to obtain the node representation output by the target representation model.

[0007] In some implementations, determining a corresponding target representation model based on the node type includes: Based on the node type of the node, a target representation model corresponding to the node type is determined from a preconfigured correspondence relationship, wherein the correspondence relationship represents a correspondence relationship between the node type and the representation model.

[0008] In some implementations, the node type includes one or more of an image, text, and entity; The representation model includes one or more of a visual Transformer model, a word embedding model, and a multi-layer perceptron.

[0009] In some implementations, based on a plurality of predefined meta-paths, path sampling is performed on the heterogeneous knowledge network to construct a view corresponding to each meta-path, including: Based on a plurality of predefined meta-paths, path sampling is performed on the heterogeneous knowledge network to obtain a node relationship sequence corresponding to each meta-path; A view corresponding to each meta-path is constructed based on the node relationship sequence.

[0010] In some implementations, based on a plurality of predefined meta-paths, path sampling is performed on the heterogeneous knowledge network to obtain a node relationship sequence corresponding to each meta-path, including: Define multiple meta-paths based on different node types and relationship types between nodes; For each meta-path, extracting a path instance from the heterogeneous knowledge network based on the node type and the relationship type represented by the meta-path; A node relationship sequence corresponding to the meta-path is obtained according to the extracted path instance.

[0011] In some implementations, for each node in the heterogeneous knowledge network, determining a common representation of the node in multiple different views based on the node representation of the node in each view includes: For each node in the heterogeneous knowledge network, two views are randomly selected from multiple views to form a view pair; The node representations of the nodes in the view pair are input into a pre-trained heterogeneous graph neural network model to obtain the common representation output by the heterogeneous graph neural network model.

[0012] In some implementations, for any two nodes in the heterogeneous knowledge network, determining the similarity between the two nodes based on the common representation of each node includes: For any two nodes in the heterogeneous knowledge network, the cosine similarity or Euclidean distance between the two nodes is calculated based on the common representation of each node to obtain the similarity.

[0013] In the implementation method of the present application, by constructing multiple views of different relationship patterns, it is possible to comprehensively utilize different types of information in heterogeneous knowledge networks, capture the characteristics and relationships of different aspects of nodes, more comprehensively consider the associations between nodes, and improve the comprehensiveness and accuracy of similarity measurement. Moreover, by defining the common representation of nodes in different views, it is possible to reduce the impact of differences in node types or relationship types in heterogeneous knowledge networks, and improve the robustness and accuracy of node similarity measurement. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 This is a flowchart of a similarity measurement method in one embodiment of the present application; Figure 2 This is a flowchart of a similarity measurement method in one embodiment of the present application; Figure 3 This is a schematic diagram of a similarity measurement method in one embodiment of the present application; Figure 4 This is a schematic diagram of a similarity measurement method in one embodiment of the present application; Figure 5 This is a schematic diagram of a similarity measurement method in one embodiment of the present application; Figure 6 This is a flowchart of a similarity measurement method in one embodiment of the present application; Figure 7 This is a schematic diagram of a similarity measurement method in one embodiment of the present application; Figure 8 This is a schematic diagram of a similarity measurement method in one embodiment of the present application. DETAILED DESCRIPTION

[0015] In order to make the purpose, technical solution and advantages of this application more clear, the following further describes this application in detail in conjunction with the accompanying drawings and implementation methods. It should be understood that the specific implementation methods described here are only used to explain this application and are not used to limit this application.

[0016] Drone swarm confrontation refers to the use of drones to perform collaborative operations. Due to the limitations of single drones, such as fragility and limited mission execution capabilities, researchers have turned their research direction to drone swarms. Drone swarm confrontation requires drones to have autonomous judgment, planning and decision-making capabilities, and to be able to achieve information exchange and collaborative actions between swarms.

[0017] To address the confrontation problem between drone clusters with different maneuverability, we currently mainly rely on establishing a collaborative confrontation model between drone clusters. We use the collaborative confrontation model to simulate the collaborative confrontation behavior of drones in two-dimensional and three-dimensional space, and provide drones with autonomous decision-making capabilities.

[0018] In order to realize the construction of collaborative confrontation model, it is necessary to build a multi-source heterogeneous knowledge network. Multi-source refers to the diverse sources of knowledge, and heterogeneous refers to the diverse structure of knowledge. By recommending, integrating and applying multi-source heterogeneous knowledge, a data foundation is provided for the collaborative confrontation model of drone clusters. Among them, the heterogeneous knowledge network needs to associate knowledge by calculating the node similarity between knowledge.

[0019] Node similarity refers to the degree of similarity between two nodes in a graph or network. When understanding, mining, and applying knowledge networks, node similarity measurement is a key factor in supporting data mining tasks. For example, when making recommendations based on knowledge networks, if an object that strictly meets the recommendation requirements is not available in the current scenario, by analyzing the similarity of nodes, similar objects can be recommended to users, thereby improving the performance of the recommendation system. For another example, when completing knowledge graphs, by measuring node similarity, we can better understand the missing information in the knowledge graph, thereby completing the knowledge graph and predicting relationships.

[0020] Traditional node similarity metrics are usually based on feature similarity and node connectivity. However, these traditional metrics face many challenges when facing heterogeneous knowledge networks. Heterogeneous knowledge networks refer to complex networks composed of different types of data sources and different types of data objects. In heterogeneous knowledge networks, nodes can represent different types of information, such as text, images, entities, etc., and edges represent the associations between these different types of information.

[0021] On the one hand, the nodes in heterogeneous knowledge networks involve multi-modal and multi-source data, which makes the similarity measurement between nodes more complicated. Traditional similarity measurement methods are often based on a single type of data features and are difficult to cope with the complex data structure in heterogeneous knowledge networks. On the other hand, the connection relationship between nodes in heterogeneous knowledge networks is complex and the edge types are numerous, which brings new challenges to the methods based on node connectivity.

[0022] In related technologies, in order to achieve node similarity measurement in heterogeneous knowledge networks, some methods rely on manual analysis. Manual analysis can use artificial knowledge, combined with the semantics, background and actual application scenarios of nodes, to measure the node similarity in heterogeneous knowledge networks. Although analysts can make more flexible and intuitive judgments based on specific scenarios, which helps to deal with some complex problems that are difficult to solve with computational models, methods based on manual analysis have certain limitations. First, manual analysis is affected by individual subjective judgments, and different analysts may produce different results, resulting in subjectivity and inconsistency in the analysis. Secondly, heterogeneous knowledge networks are large in scale, and manual analysis is limited by time and resources when dealing with large-scale networks. Analysts cannot effectively process all nodes and relationships in large-scale networks.

[0023] Another part of the methods is based on the similarity of node features, directly calculating feature similarity as nodes, which can intuitively understand the similarity between nodes. At the same time, compared with some complex deep learning methods, methods based on node feature similarity are usually more efficient. However, methods based on node feature similarity usually ignore the topological structure and relationship information between nodes. In some cases, the structural information of the network may contain important relationships, and this method may not be able to fully capture these relationships. In addition, this method is sensitive to the quality and expressiveness of node features. If the characteristics of the node are not sufficient to accurately reflect its position or attributes in the network, the accuracy of the similarity measurement is low.

[0024] Based on the problems and adjustments in the above-mentioned related technologies, the present application provides a multi-view Figure 1 A consistent node similarity measurement method for heterogeneous knowledge networks takes the consistency of nodes in heterogeneous knowledge networks under multiple views as the starting point to improve the accuracy and robustness of node similarity measurement.

[0025] like Figure 1 As shown, the application provides a multi-view Figure 1 A consistent method for measuring node similarity in heterogeneous knowledge networks, including: S110. Construct node representations for different types of nodes in a heterogeneous knowledge network through node representation learning.

[0026] It can be understood that a heterogeneous knowledge network refers to a graph data network composed of different types of data sources or different kinds of data objects. Therefore, the nodes in a heterogeneous knowledge network often correspond to multiple types, and different types of nodes may have different attributes and relationships.

[0027] For example, in one example, the node types include but are not limited to images, texts, entities, etc. The node attributes corresponding to the image nodes may be pixels, the node attributes corresponding to the text nodes may be word sequences, and the node attributes corresponding to the entity nodes may be entity features.

[0028] At the same time, in heterogeneous knowledge networks, the relationship types of connection relationships between different types of nodes are also complex. For example, a text node may be connected to an image node through a certain relationship type, and connected to another text node through another relationship type.

[0029] In the implementation manner of the present application, Entities Representation refers to the representation of the original node features in the vector space, which is a feature vector with a length of L. The purpose of constructing node representations for nodes in a heterogeneous knowledge network is to map the original node features of different types of nodes included in the heterogeneous knowledge network to the same representation space, so that these different types of nodes can be represented by feature vectors in the same space.

[0030] In some implementations, multiple representation models can be pre-trained, each of which corresponds to a type of node, so that a suitable representation model can be selected to construct a corresponding node representation according to different node types. Figure 2 Provide explanation.

[0031] like Figure 2 As shown, in some embodiments, in the similarity measurement method of the present application, node representations are constructed for different types of nodes in a heterogeneous knowledge network through node representation learning, including: S111. For each node in the heterogeneous knowledge network, obtain the node type corresponding to the node.

[0032] S112. Determine a corresponding target representation model based on the node type.

[0033] S113 . Input the node attribute corresponding to the node into the target representation model to obtain the node representation output by the target representation model.

[0034] In the implementation manner of the present application, first, a corresponding representation model can be constructed for each node type. The representation model is a neural network model based on deep learning. The input of the representation model is the node attribute, and the output is the node representation corresponding to the entity node.

[0035] For ease of explanation, in the following examples, the node types are taken as images, texts, and entities to illustrate the process of constructing node representations.

[0036] For image nodes, a visual Transformer model can be used. For example, in one example, a Transformer (ViT) model can be used to map the image corresponding to the image node from the pixel space to a vector space of length L, thereby obtaining the corresponding node representation.

[0037] For text nodes, a word embedding model can be used to map the text information of the text node to a vector space of length L, thereby obtaining the corresponding node representation. In one example, after mapping the text information of the text node to a vector space of length L, the Transformer model can be further used to learn the dependencies in the text sequence to obtain the node representation.

[0038] For entity nodes, a multi-layer perceptron (MLP) can be used to map the entity features of the entity nodes to a vector space of length L to obtain the corresponding node representation.

[0039] Here, L refers to the pre-set vector length of the node representation, which is a hyperparameter of the model. Its specific value can be selected according to demand, and this application does not impose any restrictions on this.

[0040] In the example of the present application, after constructing the representation model for each type of node, a corresponding relationship such as shown in Table 1 below can be generated based on the comparison relationship between the node type and the representation model: Table 1

[0041] In an implementation manner of the present application, when processing nodes in a heterogeneous knowledge network, taking any node as an example, the node type of the node can be obtained first, and then based on the correspondence relationship of the aforementioned configuration, the representation module corresponding to the node type of the node is determined by table lookup, that is, the target representation model in the present application, and then the node representation corresponding to the node is constructed using the target representation model.

[0042] For example, in an example, the node type is "image". First, through the corresponding relationship shown in Table 1 above, it can be determined that the target representation model corresponding to the image node is the "visual transformer model", and then the visual transformer model can be called to process the image node. Specifically, the node attributes of the image node (that is, the image corresponding to the image node) can be input into the visual transformer model, and then the visual transformer model is used to map the original pixel features to a vector space of length L to obtain a feature vector of length L. This feature vector is the node representation corresponding to the image node.

[0043] For example, in another example, the node type is "entity". First, through the corresponding relationship shown in Table 1 above, it can be determined that the target representation model corresponding to the entity node is "multi-layer perceptron", and then the multi-layer perceptron can be called to process the entity node. Specifically, the node attributes of the entity node (that is, the original entity features corresponding to the entity node) can be input into the multi-layer perceptron, and then the multi-layer perceptron is used to map the original entity features to a vector space of length L, and a feature vector of length L is obtained. The feature vector is the node representation corresponding to the entity node.

[0044] The above describes the method of constructing node representation by taking a node in a heterogeneous knowledge network as an example. For each node in the heterogeneous knowledge network, the above method is repeated in sequence to complete the node representation learning of the entire heterogeneous knowledge network, which will not be repeated in this application.

[0045] Based on the above, we can know that through node representation learning, all different types of nodes in heterogeneous knowledge networks can be uniformly mapped to a common representation space, so as to obtain the node representation corresponding to each node in the same space. The node representation is the feature vector corresponding to the node, which provides a data basis for subsequent similarity measurement.

[0046] S120. Based on a plurality of predefined meta-paths, path sampling is performed on the heterogeneous knowledge network to construct a view corresponding to each meta-path.

[0047] Meta Path is a path defined in a heterogeneous knowledge network to describe the relationship between different types of nodes. Meta Path can help extract the structured relationship between nodes, form a structured description of the node relationship, and thus better understand the association between nodes. Meta Path can not only capture the topological structure of the knowledge network, but also introduce semantic information through the combination of node types and relationship types in the path.

[0048] In the implementation mode of the present application, multiple meta-paths can be pre-defined based on node types and relationship types, and multiple relationship views can be constructed by sampling multiple meta-paths for subsequent multi-viewing. Figure 1 Consistent learning.

[0049] In some embodiments, a meta-path can first be defined based on the node types and relationship types in a heterogeneous knowledge network. The meta-path consists of a sequence of node types and relationship types. For example, a meta-path of "ARB" represents a path from a node of type A through a relationship type R to a node of type B. Such a meta-path can capture the relationship patterns between nodes of different types.

[0050] Then, for each defined meta-path, path sampling can be performed in the heterogeneous knowledge network based on the meta-path definition, that is, path instances that meet the meta-path definition are extracted from the heterogeneous knowledge network. These path instances constitute a node relationship sequence consisting of a series of nodes and edges.

[0051] Finally, after obtaining the node relationship sequence, a subgraph can be constructed as a view based on the nodes and edges contained in the node relationship sequence. This view contains the nodes and edges that meet the meta-path definition.

[0052] The above method process of sampling only one meta-path is used as an example. For multiple pre-defined meta-paths, the above method process is repeated in sequence to obtain a view corresponding to each meta-path, thereby constructing a view set containing multiple different views.

[0053] S130 . For each node in the heterogeneous knowledge network, determine a common representation of the node in multiple different views based on the node representation of the node in each view.

[0054] In the implementation manner of the present application, the common representation of a node refers to the consistent representation of the node learned on multiple views, which reflects the consistency of the node between multiple views. Figure 1 The better the consistency, the higher the accuracy of the similarity between two nodes calculated for heterogeneous knowledge networks, and the stronger the robustness and generalization ability of the model.

[0055] In some embodiments, a heterogeneous graph neural network model can be pre-constructed by deep learning, and the heterogeneous graph neural network model can be used to evaluate the consistency of nodes in different views. The model parameters of the heterogeneous graph neural network model can be optimized through self-supervised learning to minimize the representation differences of nodes in multiple views. After the model training is completed, in the preset stage, the node representation of each node can be input into the heterogeneous graph neural network model, and the common representation of each node in different views can be predicted by the heterogeneous graph neural network model. This is explained in the following embodiments of the present disclosure and will not be described in detail here.

[0056] S140 . For any two nodes in the heterogeneous knowledge network, determine the similarity between the two nodes based on the common representation of each node.

[0057] In the implementation manner of the present application, a common representation corresponding to each node in a heterogeneous knowledge network is obtained through the aforementioned method process. The common representation can reflect the consistency of the node under multiple different views. Therefore, when calculating the similarity of any two nodes, the similarity between the two nodes can be calculated based on the common representation of the two nodes.

[0058] For example, in one example, when calculating the similarity between node A and node B, the cosine similarity or Euclidean distance can be calculated based on the common representation of node A and the common representation of node B, and the cosine similarity or Euclidean distance is determined as the similarity between node A and node B. The specific calculation process is described in the following implementation of the present application and will not be repeated here.

[0059] From the above, it can be seen that the implementation method of the present application, by constructing multiple views of different relationship patterns, can comprehensively utilize different types of information in heterogeneous knowledge networks, capture the characteristics and relationships of different aspects of nodes, more comprehensively consider the association relationship between nodes, and improve the comprehensiveness and accuracy of similarity measurement. Moreover, by defining the common representation of nodes in different views, it is possible to reduce the impact of differences in node types or relationship types in heterogeneous knowledge networks, and improve the robustness and accuracy of node similarity measurement.

[0060] To facilitate further understanding and explanation, the following text of this application takes the academic social network scenario as an example to illustrate the heterogeneous knowledge network node similarity measurement method of this application.

[0061] Academic social network is a special type of heterogeneous knowledge network, which focuses on researchers, scholars, papers and the relationships between them in the academic community. Academic social network is a multi-level heterogeneous knowledge network involving multiple types of nodes and edges, which have complex relationships between them.

[0062] For example Figure 3 is an example of an academic social network, see Figure 3 As can be seen, academic social networks contain a variety of node types and relationship types (edge ​​types). For example, node types include author nodes, paper nodes, conference nodes, and keyword nodes, and relationship types include collaboration relationships, publication relationships, citation relationships, location relationships, and keyword relationships.

[0063] In actual application scenarios, a series of practical functions can be achieved by measuring the similarity of nodes in the academic social network. For example, by measuring the similarity of authors, the system can recommend potential partners with similar academic interests to author A, thereby promoting academic cooperation. For another example, in academic search, by understanding articles similar to article A, the system can provide more personalized paper recommendations and improve information retrieval results. The node similarity measurement methods in related technologies are difficult to apply to such complex heterogeneous knowledge networks. Therefore, the similarity measurement method of this application aims to provide a comprehensive, accurate, and robust similarity measurement method for such complex heterogeneous knowledge networks, providing a reliable foundation for analysis tasks based on heterogeneous knowledge networks.

[0064] First, combine Figure 2 It can be seen from the implementation method that due to the variety of node types and different forms of node attributes in heterogeneous knowledge networks, it is impossible to use a unified model to represent and learn the nodes. Therefore, in the implementation method of this application, a corresponding representation model can be constructed for each node type, and then the node can be uniformly mapped to a vector space using the representation model corresponding to the node middle.

[0065] exist Figure 3 In the example, the author node can be regarded as an entity node, whose features include the author's research field, affiliated unit, cooperation mode, etc. The multi-layer perceptron in Table 1 can be used for mapping to obtain the node representation corresponding to the author node. For the paper node, its features are often text sequences such as abstracts, which can be mapped using the word embedding model and Transformer model in Table 1. Figure 4 The model structure of a multilayer perceptron in an example of this application is shown. Figure 5 The model structure of the word embedding model and the Transformer model in an example of the present application is shown. Those skilled in the art can refer to Figure 4 and Figure 5 The above can be understood and fully implemented, so no further elaboration is required.

[0066] In the present application example, after processing each node of the heterogeneous knowledge network through the aforementioned process, for any node in the heterogeneous knowledge network , we can get the corresponding node representation .

[0067] After obtaining the node representation of each node in the heterogeneous knowledge network, path sampling can be performed based on meta-paths in the heterogeneous knowledge network. Figure 6 Provide explanation.

[0068] like Figure 6 As shown, in some embodiments, the similarity measurement method of the present application example, the process of obtaining the node relationship sequence by meta-path sampling includes: S610 . Define multiple meta-paths according to different node types and relationship types between nodes.

[0069] S620 . For each meta-path, extract a path instance from the heterogeneous knowledge network based on the node type and relationship type represented by the meta-path.

[0070] S630: Obtain a node relationship sequence corresponding to the meta-path according to the extracted path instance.

[0071] In the implementation manner of the present application, multiple meta-paths can be pre-defined based on node types and relationship types. The meta-path consists of a sequence of node types and relationship types. Then, for each defined meta-path, path sampling can be performed in a heterogeneous knowledge network based on the meta-path definition, that is, path instances that meet the meta-path definition are extracted from the heterogeneous knowledge network. These path instances constitute a node relationship sequence consisting of a series of nodes and edges.

[0072] In some embodiments, the formal description of meta-path sampling is as follows: Assuming a heterogeneous knowledge network Contains a variety of node types and edge types, among which, represents a set of nodes in a heterogeneous knowledge network, Represents the edge set and node set of heterogeneous knowledge network Can be divided into different types of nodes, edge sets Contains heterogeneous relations connecting different types of nodes. A metapath is a sequence of nodes where the nodes are connected according to a predefined pattern. Formally, a metapath can be expressed as ,in Indicates the node type, Indicates the edge type, is the length of the path. In one example, Figure 7 Examples of meta-paths of different lengths that may exist in the academic social network of this application are shown. For example, for an academic social network, a meta-path may be .

[0073] After defining the meta-path, meta-path sampling is to select a specific meta-path from all possible meta-paths. For example, the meta-path can be selected by random sampling, sampling based on heuristic rules, or other methods. Formally, let is a set of meta-paths, meta-path sampling can be expressed as ,in is the sampled meta-path.

[0074] After sampling, the meta-path set is obtained After that, you can use the meta-path collection Each meta-path in the heterogeneous knowledge network samples paths. Specifically, for each node, take it as the starting point and select Random or regular sampling is performed in the network to obtain multiple meta-paths, which represent different types of associations and will be used to construct multiple views.

[0075] For each meta-path, we extract relevant information about the node, including node attributes, neighbor nodes, edge weights, etc., and construct a corresponding node view. This view can be regarded as a subgraph extracted from the knowledge network, which contains the target node and its related neighbor nodes. Formally, the node view can be expressed as ,in is the set of nodes on the meta-path, is the set of edges connecting these nodes. Assume that for each node views, then for each node we can get a multi-view set . Figure 8 An example of building multiple views with author A as the target node is shown. Each view in the figure is an extracted path instance, that is, a node relationship sequence corresponding to the meta-path.

[0076] Constructing a multi-view set for each node Afterwards, the heterogeneous graph neural network model can be used to learn the corresponding common representation for each node and Figure 1 The heterogeneous graph neural network model is trained in a self-supervised manner.

[0077] Specifically, we first build a heterogeneous graph neural network model that can handle different node types and relationship types in heterogeneous knowledge networks, and optimize network parameters through forward and backward propagation to learn the representation of each node. In one example, to train the heterogeneous graph neural network model, we introduce multi-view Figure 1 Consistent self-supervised learning tasks optimize network parameters by maximizing or minimizing the consistency of node representations on multiple views. For example: Positive consistency: For each node, the representation in different views should be consistent. This is achieved by maximizing their similarity, which can be achieved using metrics such as cosine similarity and Euclidean distance; Negative consistency: For each node, the representation of other nodes should be inconsistent. Therefore, corresponding negative samples can be extracted from the network, and the model is encouraged to generate inconsistent node representations by minimizing the similarity between the node and the negative sample.

[0078] On this basis, by designing the corresponding loss function and using back propagation to train the network parameters, the model makes the representation learned by each node conform to the multi-view Figure 1 This process is described as follows: Taking the target node as an example, the multi-view set of the node is obtained through the above method process .set up The parameter is Heterogeneous graph neural network model, The corresponding node In view The node representation learned below, the corresponding training process is: (1) In formula (1), , The nodes are Two randomly sampled views, The node A random view of , as a negative sample. Function is a custom distance function, which can be cosine similarity or Euclidean distance.

[0079] It can be understood that the loss function shown in formula (1) can be used to implement the network training process of the heterogeneous graph neural network model, that is, the network parameters of the heterogeneous graph neural network model are continuously tuned until the convergence conditions are met, and then the model training process can be stopped to complete the model training.

[0080] In the prediction stage, after obtaining the node through the above method process, A collection of multiple views After that, two views can be randomly or regularly selected from multiple views to form a view pair, and then the view pair center node The node representation of the input is input into the heterogeneous graph neural network model, and the node of the model preset output can be obtained Common representation under different views.

[0081] After obtaining the common representation of nodes in heterogeneous knowledge networks under multiple views, for any two nodes and , that is, the similarity can be calculated based on the common representation of the two. In some embodiments, the cosine similarity or Euclidean distance can be used to measure the similarity between nodes, expressed as: (2) (3) For cosine similarity, the value is between [-1, 1], 1 means complete similarity, -1 means complete dissimilarity, and for Euclidean distance, smaller values ​​mean more similarity, and larger values ​​mean less similarity.

[0082] Through the above formulas (2) and (3), the similarity between any two nodes in the heterogeneous knowledge network can be calculated, and then tasks such as recommendation can be performed based on the similarity. This application will not go into details.

[0083] From the above, it can be seen that the implementation method of this application proposes corresponding solutions to the problems of low efficiency, low accuracy and insufficient robustness of existing methods. First, since it does not require a lot of manual judgment, this method can be applied to large-scale heterogeneous knowledge networks; secondly, the meta-path sampling method introduces topological information into the learning of node representation, and the multi-view representation based on the meta-path realizes the full utilization of heterogeneous graph data and improves the accuracy of node representation; finally, based on the multi-view Figure 1 Consistent self-supervised training improves the robustness of node representation. In summary, compared with existing methods, the present invention has the advantages of high efficiency, high accuracy and strong robustness.

[0084] The above-mentioned embodiments only express several embodiments of the present application, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present application, which all belong to the protection scope of the present application. Therefore, the protection scope of the patent of this application shall be based on the attached claims.

Claims

1. A method for measuring node similarity in heterogeneous knowledge networks based on multi-view consistency, characterized in that: include: Construct node representations for different types of nodes in heterogeneous knowledge networks through node representation learning; Based on a plurality of predefined meta-paths, path sampling is performed on the heterogeneous knowledge network respectively, and a view corresponding to each meta-path is constructed; For each node in the heterogeneous knowledge network, based on the node representation of the node in each view, determining a common representation of the node in multiple different views; For any two nodes in the heterogeneous knowledge network, the similarity between the two nodes is determined based on the common representation of each node.

2. The method according to claim 1, characterized in that Node representation learning is used to construct node representations for different types of nodes in heterogeneous knowledge networks, including: For each node in the heterogeneous knowledge network, obtaining a node type corresponding to the node; Determine a corresponding target representation model based on the node type; The node attribute corresponding to the node is input into the target representation model to obtain the node representation output by the target representation model.

3. The method according to claim 2, characterized in that Determining a corresponding target representation model based on the node type includes: Based on the node type of the node, a target representation model corresponding to the node type is determined from a preconfigured correspondence relationship, wherein the correspondence relationship represents a correspondence relationship between the node type and the representation model.

4. The method according to claim 3, characterized in that The node type includes one or more of image, text, and entity; The representation model includes one or more of a visual Transformer model, a word embedding model, and a multi-layer perceptron.

5. The method according to claim 1, characterized in that Based on a plurality of predefined meta-paths, the heterogeneous knowledge network is sampled respectively, and a view corresponding to each meta-path is constructed, including: Based on a plurality of predefined meta-paths, path sampling is performed on the heterogeneous knowledge network to obtain a node relationship sequence corresponding to each meta-path; A view corresponding to each meta-path is constructed based on the node relationship sequence.

6. The method according to claim 5, characterized in that Based on a plurality of predefined meta-paths, path sampling is performed on the heterogeneous knowledge network to obtain a node relationship sequence corresponding to each meta-path, including: Define multiple meta-paths based on different node types and relationship types between nodes; For each meta-path, extracting a path instance from the heterogeneous knowledge network based on the node type and the relationship type represented by the meta-path; A node relationship sequence corresponding to the meta-path is obtained according to the extracted path instance.

7. The method according to claim 1, characterized in that For each node in the heterogeneous knowledge network, based on the node representation of the node in each view, determining a common representation of the node in multiple different views includes: For each node in the heterogeneous knowledge network, two views are randomly selected from multiple views to form a view pair; The node representations of the nodes in the view pair are input into a pre-trained heterogeneous graph neural network model to obtain the common representation output by the heterogeneous graph neural network model.

8. The method according to claim 1, characterized in that For any two nodes in the heterogeneous knowledge network, determining the similarity between the two nodes based on the common representation of each node includes: For any two nodes in the heterogeneous knowledge network, the cosine similarity or Euclidean distance between the two nodes is calculated based on the common representation of each node to obtain the similarity.

Citation Information

Patent Citations

  • Academic cooperation relation prediction method based on heterogeneous graph neural network

    CN114564573A

  • Relation perception news recommendation method, system and equipment based on news heterogeneous network

    CN115422470A

  • Heterogeneous ontology matching system and method based on multi-view representation learning

    CN117807186A

  • Multi-view fusion heterogeneous node representation learning method based on large model technology

    CN118296554A

  • Heterogeneous tree graph neural network for label prediction

    US20240330679A1